Hi.

I am investigating the issue of writing a udev rule for my usb pen, read tons 
of doc on the web, tried in vane lots of suggestions from people on this list 
(thanks!)

Today I noticed that the output of
 udevinfo -a -p $(udevinfo -q path -n /dev/sda)
varies each time I plug in the usb stick. In particular, the first time I plug 
it into a USB port, I get

[EMAIL PROTECTED]:/etc/hotplug$ udevinfo -a -p $(udevinfo -q path -n /dev/sda)

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

device '/sys/block/sda' has major:minor 8:0
  looking at class device '/sys/block/sda':
    SUBSYSTEM="block"
    SYSFS{dev}="8:0"
    SYSFS{range}="16"
    SYSFS{removable}="1"
    SYSFS{size}="1019617"
    SYSFS{stat}="       6      234      240      204        0        0        0 
       0        0      134      204"

follow the class device's "device"
  looking at the device chain at 
'/sys/devices/pci0000:00/0000:00:10.1/usb2/2-2/2-2:1.0/host1/target1:0:0/1:0:0:0':
    BUS="scsi"
    ID="1:0:0:0"
    DRIVER="sd"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0xc9a"
    SYSFS{ioerr_cnt}="0x0"
    SYSFS{iorequest_cnt}="0xc9a"
    SYSFS{max_sectors}="240"
    SYSFS{model}=".2"
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{rev}=""
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}="linux.so"

but I can also get (plugging it in the very same port)
[...]
follow the class device's "device"
  looking at the device chain at 
'/sys/devices/pci0000:00/0000:00:10.1/usb2/2-2/2-2:1.0/host8/target8:0:0/8:0:0:0':
    BUS="scsi"
    ID="8:0:0:0"
    DRIVER="sd"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0xb2"
    SYSFS{ioerr_cnt}="0x0"
    SYSFS{iorequest_cnt}="0xb2"
    SYSFS{max_sectors}="240"
    SYSFS{model}="ric/sg1"
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{rev}=""
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}="csi_gene"

or even
[...]
follow the class device's "device"
  looking at the device chain at 
'/sys/devices/pci0000:00/0000:00:10.1/usb2/2-2/2-2:1.0/host9/target9:0:0/9:0:0:0':
    BUS="scsi"
    ID="9:0:0:0"
    DRIVER="sd"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0x8e"
    SYSFS{ioerr_cnt}="0x0"
    SYSFS{iorequest_cnt}="0x8e"
    SYSFS{max_sectors}="240"
    SYSFS{model}=""
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}=""

Note in particular that the vendor and model names keep changing. (And I seem 
to be cycling through these 3 results)

Isn't this odd? Any clues?

As I said in my previous thread, what I find possibly more odd is that the 
correct vendor and product info for my card are in the directory 
/sys/devices/pci0000:00/0000:00:10.1/usb2/2-2/
but /sys/block/sda/device points to a subdirectory of that one, which does not 
contain the correct vendor/product files

If no one has clues, could someone point me to a udev/hotplug/whatever mailing 
list?

Matteo


Reply via email to