Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SDHCI Driver



Chris,
Thas was definately my problem. After adding IOStorageFamily to the OSBundleLibraries the kext loaded and I had got the following output from dmesg


SDHCI: init()!********************************************
SDHCI: start()!
SDHCI: Found 1 Controllers
SDHCI: Controller 0
SDHCI: Size of Mem Region 256
SDHCI: Card is present
SDHCI: Card is not Write Protected
SDHCI: BaseClock = 33MHz
SDHCI: SD Clock = 257KHz
SDHCI: BaseClock = 33MHz
SDHCI: SD Clock = 16500KHz
SDHCI: reportRemovability
SDHCI: reportPollRequirements
SDHCI: reportEjectability
SDHCI: reportLockability
SDHCI: reportMaxReadTransfer
SDHCI: reportMaxWriteTransfer
SDHCI: reportMediaState
SDHCI: reportBlockSize
SDHCI: reportMaxValidBlock
SDHCI: reportWriteProtection
SDHCI: getVendorString
SDHCI: getVendorString
SDHCI: getProductString
SDHCI: getProductString
SDHCI: doAsyncReadWrite, block: 694151374, nblks: 44847360, direction: in

As you can see the driver is loading up and calling my versions of the virtual functions, but this leads me to three questions.

1. The driver never does anything after the "doAsyncReadWrite" call, I think this is due to the "IOStorageCompletion" not getting called to let IOKit know the read/write is finished. I'm not sure who is responsible for calling, if it is me, what params do I pass, Do i just call it at the end of my "doAsyncReadWrite" function? Right now i'm not using any IRQ's to try and keep things simple.

2. The fact that it's not reading block 0 first and is trying to read so many blocks on the first read seems a little surprising. I'm guessing something is wrong there.

3.  Do I have to create a 64 bit version of doAsyncReadWrite?

4. was just going to ask three, but I just noticed getVendorString and getProductString seem to get called twice, Doesn't seem like a big deal, but is it a sign of something not being right?

Thanks again for the help,
Reggie

Chris Sarcone wrote:
Reggie --

Thanks for the pointers. I finally got around to working on this some more, and after much reading I have one more road block. After changing my class to be based of IOBlockStorageDevice the module will not load. When doing a "kextload -tv" I get the following error:

kextload: extension IOSDHCIBlockDevice.kext/ appears to be valid
Can't find superclass for 18IOSDHCIBlockDevice : 20IOBlockStorageDevice
kextload: a link/load error occured for kernel extension IOSDHCIBlockDevice.kext/
load failed for extension IOSDHCIBlockDevice.kext/
(run kextload with -t for diagnostic output)


Anyone have some advice, I will be glad to post code if needed.

Does your kext's Info.plist file have an OSBundleLibraries entry that includes com.apple.iokit.IOStorageFamily with a version of 1.0.0?


-- Chris

------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax:   (408) 862-7577
email: email@hidden <mailto:email@hidden>





_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-drivers mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden
References: 
 >SDHCI Driver (From: Reggie McMurtrey <email@hidden>)
 >Re: SDHCI Driver (From: Chris Sarcone <email@hidden>)
 >Re: SDHCI Driver (From: Reggie McMurtrey <email@hidden>)
 >Re: SDHCI Driver (From: Chris Sarcone <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.