On Wed, 22 Dec 2004, Daniel Drake wrote: > Hi Alan/Robert, > > I've been working on extending your shuttle_usbat driver to support
It's Robert's driver! I just helped with some updates. > flash-based storage devices connected via the USBAT02 chip. I've got working > code here and am nearly ready to submit this for inclusion, but there is one > last problem that I'm trying to address. > > The present-time shuttle_usbat driver supports hp8200 cd drives connected > through a USBAT01 chip. Currently, my driver extension adds the USBAT02 USB > ID > into unusual_devs.h, and assumes that any device connected through the > usbat02 > chip is a flash-storage device. This isn't clear to me. The chip supports multiple protocols on the device side, and you're assuming that a particular protocol (one appropriate for flash devices) is the correct one? Whereas the shuttle_usbat driver assumes ATAPI is correct? Doesn't the USBAT02 chip provide some way to tell which protocol to use? Or do I have it all wrong? > This isn't ideal though. According to SCM, HP released some later revisions > of > the 8200 drive based on the USBAT02 chip. We also recieved a mail from an > owner of one of these devices, so they definately exist. Also, SCM can > neither > confirm or deny that the HP8200 was the only user of the original USBAT. > ( If you don't know, the only real difference between the USBAT and USBAT02 is > that the USBAT had a nasty bug where it doesn't work when connected through > certain USB hubs. That's fixed in USBAT02, and its also a simple > rebranding: > SCM acquired shuttle at about this time, so most USBAT02's are branded as > SCM ) > > So, rather than assuming usbat=hp8200, usbat02=flash, we ideally want to be > able to detect which device is being used during the initialization of the > driver. > > My question is, how can we do this? > > With my USBAT02 flash devices, I have tried examining the device > identification data returned from the ATAPI IDENTIFY DEVICE command (0xEC). Unfortunately I don't have my reference documents at hand. Is IDENTIFY DEVICE an ATAPI command or (as I seem to remember) is it really an ATA command that was carried over? Isn't there a true ATAPI command you can use, such as INQUIRY? > Specifically, I've looked at word 0 (signature), words 10-19 (serial number), > words 23-26 (firmware revision), and words 27-46 (model number). > Unfortunately, all of these fields appear to be media-dependant, and > suprisingly only 1 of my 4 CF cards produces the CF signature defined in the > CF specs (0x848A), there is definately no consistency here. (Plus, the driver > should ideally support connection when no media is present.) Again, I'm stymied without the specs. Is there some ATA-level command you can use to find out whether a device supports ATAPI? Function when no medium is present shouldn't be too hard. Just return a "Medium not present" error to almost every command. > Any suggestions for other things I could try? Perhaps there is something > unique to the HP8200 which would allow us to do e.g.: > if (some condition) > //device is hp8200 > else > //device is flash Nothing that I know of. But I am far from being an expert on the hp8200. Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel