I hate to say this, but it sounds like you're in _way_ over your head.... But, here are a few pointers:
First, read the documentation on usb.org -- specifically, read the section on class-specific drivers. What you'll find is that the Cls=08 means that it conforms to the USB Mass Storage specification -- you should bind to that, instead of the vendor and device ID. The usb.org documentation can also explain the nature of configs, interfaces, altsettings, and endpoints. Just because it has bulk endpoints does not imply (necessarily) anything about how you register the device. Again, refer to the usb.org documentation. The glue with the SCSI layer is not for file_operations support. file_operations is implemented by the filesystem code. The filesystem wants to talk to a block device -- that's where SCSI comes in. By registering as an HBA, we get to be a block device -- that happens to mesh very well with the USB Mass Storage protocol (again, see usb.org). Matt On Sat, Jan 10, 2004 at 01:49:44PM +0530, mohanlal jangir wrote: > I have a USB 8IN1 card reader and when I insert the device, I get following > new entry in /proc/bus/usb/devices > > T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 > D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=058f ProdID=9360 Rev= 1.00 > S: Manufacturer=Generic > S: Product=Mass Storage Device > S: SerialNumber=9206051 > C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA > I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage > E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms > E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms > > This tells that usb-storage is the driver for this device. Well, I am not > going to reinvent the wheel, but for learning purpose, I thought to write > the driver by myself. Therefore I compiled the kernel without usb-storage > and now I get exactly same entry in /proc/bus/usb/devices expect Driver=none > and also I get message like "device 58f/9360 not claimed by any active > driver", which seems to be OK. > > I have some questions regarding usb driver: > > 1. I don't have any manual for my device. Can someone tell me information > about "Vendor=058f ProdID=9360". While searching over web, I found an > article "AU9360 USB Multiple Slots Flash Memory Card Reader Controller TRM". > Is my device belong to this? > > 2. While querying about my device through my novice driver, I found > following information regarding device. > It has 1 configuration, 1 interface, 1 alternate setting and 2 endpoints. 1 > endpoint is bulk in and other is bulk out. Can somebody explain me these > with respect to my device. I have been reading "Programming Guide for Linux > USB Device Drivers", but yet not very much clear about these terms? > > 3. As I mentioned, I see endpoints as bulk in and bulk out. Does it mean I > have to register the device as block device? > > 4. In usb-storage.c, I see the driver glues with SCSI. So far I am not able > to understand usb-storage.c very well, but I think this is done for > file_operations support. If I provide my separate file_operations (like > read, write etc), do I still need to glue with SCSI drivers? > > Regards > Mohanlal > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > [EMAIL PROTECTED] > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver G: Let me guess, you started on the 'net with AOL, right? C: WOW! d00d! U r leet! -- Greg and Customer User Friendly, 2/12/1999
pgp00000.pgp
Description: PGP signature
