On Wed, 24 Aug 2005, Singh, Brijeshkumar wrote:
> Hi Alan,
>
> Thanks for help.
>
> Unfortunately my system has four USB bus. Hence I am not to use the method
> you suggested. I was exploring possibility of adding little additional
> information in /proc/scsi/usb-storage-A/B. The information should be
> something like:
> [EMAIL PROTECTED] usb]# cat /proc/scsi/usb-storage-1/2
> Host scsi2: usb-storage
> Vendor: Genesyslogic
> Product: USB Mass Storage Device
> Serial Number: None
> Protocol: 8020i
> Transport: Bulk
> GUID: 05e307010000000000000000
> Attached: Yes
> Bus : 1
> Lev : 1
> Prnt: 1
> Port: 0
> [EMAIL PROTECTED] usb]#
>
> The above file will solve my entire problem.
>
> I have added few lines in drive/usb/storage/scsiglue.c
>
> static int proc_info (char *buffer, char **start, off_t offset, int
> length,int hostno, int inout)
> {
> ................
> /* ADDING bus & prnt */
> SPRINTF(" Bus: %d\n",us->pusb_dev->bus->busnum);
> SPRINTF(" prnt: %d\n",us->pusb_dev->parent->devnum);
> /*ADDITION ENDS */
> }
>
> But don't know how to get other filed ("level" and "index").
> Please guide me how to solve this problem.
By "index", I assume you mean the Dev# field. It's enough to know the
Dev# and the Bus, because they uniquely determine a USB device. You don't
need the level, port, or parent fields, since you can read them from
/proc/bus/usb/devices.
The Dev# is us->pusb_dev->devnum.
Alan Stern
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel