How to find SCSI device to USB device association.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

System description: disk-less ARM, 32M, Linux 2.6.30, 4 USB ports.

I plug in two USB flash sticks and I get:

% df -h
/dev/sda1                 3.7G     32.1M      3.5G   1% /media/sda1
/dev/sdb1                 7.4G     32.1M      7.0G   0% /media/sdb1

The sysfs shows:

% ls /sys/bus/scsi/devices/
25:0:0:0  26:0:0:0

(25 being the sda1 and 26 sdb1)

% ls /sys/bus/usb/devices/
1-0:1.0    1-1        1-1.1      1-1.1:1.0  1-1.4      1-1.4:1.0  1-1:1.0   
 usb1

and:

% ls -l /sys/devices/dw_otg/usb1/1-1

drwxr-xr-x    4 root     root            0 Jan  1 14:10 1-1.1
drwxr-xr-x    4 root     root            0 Jan  1 14:18 1-1.4
...

>From all this information: how can I find out the association USB 
device number(1|4) to SCSI device (sda1|sdb1)

Thanks for your help,
Stephan.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux