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 18:10:04 +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?
>
A follow-up to previous...
This is an excerpt from my pList, with arbitrary numbers for the maxes.
The keys look right to me, but in ioreg explorer, the two 'read' keys
are duplicated, and the 'write' keys are absent. MacOS 10.4.11,
MacPro1,1. Any ideas?
<key>OurUSB</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.us.driver.OurBundle</string>
<key>IOClass</key>
<string>com_us_USB</string>
<key>IOProviderClass</key>
<string>IOUSBInterface</string>
<key>Physical Interconnect</key>
<string>USB</string>
<key>Physical Interconnect Location</key>
<string>External</string>
<key>Read Time Out Duration</key>
<integer>30000</integer>
<key>Write Time Out Duration</key>
<integer>30000</integer>
<key>bInterfaceClass</key>
<integer>8</integer>
<key>bInterfaceSubClass</key>
<integer>6</integer>
<key>bInterfaceProtocol</key>
<integer>80</integer>
<key>SCSI Device Characteristics</key>
<dict>
<key>IOMaximumBlockCountWrite</key>
<string>32767</string>
<key>IOMaximumByteCountWrite</key>
<string>1048576</string>
<key>IOMaximumBlockCountRead</key>
<string>32767</string>
<key>IOMaximumByteCountRead</key>
<string>1048576</string>
</dict>
</dict>
_______________________________________________
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