RE: USB Mass Storage: command size limits
RE: USB Mass Storage: command size limits
- Subject: RE: USB Mass Storage: command size limits
- From: "Andy Green" <email@hidden>
- Date: Fri, 27 Jun 2008 17:50:19 +0100
- Thread-topic: USB Mass Storage: command size limits
Hi Chris,
let me just check I've got the right end of the stick....
> You should check the IOUSBMassStorageClass code which allows you to
specify keys in the SCSI
> Device Charateristics dictionary including max block count or max byte
count (i.e. you don't
> have to write any code to do this).
>
>> I was wondering if I could tweak this for our USB
device, which can
>> support bigger commands. However it looks like the
traffic is limited by
>> IOBlockStorageDriver.
>
>
> Yes, you can and should.
>
>> How could I change the behaviour of
IOBlockStorageDriver? I can subclass
>> and instantiate IOBlockStorageServices from a custom LUN
driver, but how
>> could I cause a subclass of IOBlockStorageDriver to be
loaded for my
>> device?
>
>
> Refer to the IOUSBMassStorageClass and you can look at information in
AppleStorageDrivers
> plugins that shows how some device overrides enable different I/O
sizes...
I've got a working plist that installs a subclass of
IOUSBMassStorageDevice (I know you said I don't have to write code but
it's easier to tell if it matched my plist if I subclass... I'll change
that later).
In the plist I've included the SCSI Device Characteristics dictionary,
containing IOMaximumByteCountRead, IOMaximumBlockCountRead,
IOMaximumByteCountWrite, IOMaximumBlockCountWrite
They now appear in IOReg explorer, and are transported up to the
PeripheralDeviceNub and the LUN driver. However they don't appear in the
IOBlockStorageServices object or any further up the food chain. The
IOBlockStorageServices object also has IOMaximumSegmentCountRead/Write
properties set to 32, which I guess is 128kB.
Am I on the right track?
Cheers,
Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden