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

Re: udev - easy setup ?



On Sun, 31 Jul 2005 22:52:46 -0600, Jules Dubois wrote:

> Mount your devices as you've done previously, so that they're sda1 and sdi1. 
> Then run
> 
>   udevinfo -a -p $(udevinfo -q path -n /dev/sda)

$ 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}="2880"
    SYSFS{stat}="      20       15      168     8636        0        0        0        0        0     8636     8636"

follow the class device's "device"
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/host1/1:0:0:0':
    BUS="scsi"
    ID="1:0:0:0"
    DRIVER="sd"
    SYSFS{detach_state}="0"
    SYSFS{device_blocked}="0"
    SYSFS{max_sectors}="240"
    SYSFS{model}="USB UF000x      "
    SYSFS{queue_depth}="1"
    SYSFS{rev}="1.50"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}="NEC     "

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/host1':
    BUS=""
    ID="host1"
    DRIVER="unknown"
    SYSFS{detach_state}="0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0':
    BUS="usb"
    ID="2-2:1.0"
    DRIVER="usb-storage"
    SYSFS{bAlternateSetting}=" 0"
    SYSFS{bInterfaceClass}="08"
    SYSFS{bInterfaceNumber}="00"
    SYSFS{bInterfaceProtocol}="00"
    SYSFS{bInterfaceSubClass}="04"
    SYSFS{bNumEndpoints}="03"
    SYSFS{detach_state}="0"
    SYSFS{iInterface}="00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2':
    BUS="usb"
    ID="2-2"
    DRIVER="usb"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="00"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="500mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0150"
    SYSFS{bmAttributes}="80"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="3"
    SYSFS{idProduct}="0040"
    SYSFS{idVendor}="0409"
    SYSFS{manufacturer}="NEC"
    SYSFS{maxchild}="0"
    SYSFS{product}="NEC USB UF000x"
    SYSFS{speed}="12"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1/usb2':
    BUS="usb"
    ID="usb2"
    DRIVER="usb"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="09"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="  0mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0206"
    SYSFS{bmAttributes}="c0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="1"
    SYSFS{idProduct}="0000"
    SYSFS{idVendor}="0000"
    SYSFS{manufacturer}="Linux 2.6.8-2-686 uhci_hcd"
    SYSFS{maxchild}="2"
    SYSFS{product}="Intel Corp. 82801DB (ICH4) USB UHCI #2"
    SYSFS{serial}="0000:00:1d.1"
    SYSFS{speed}="12"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.1':
    BUS="pci"
    ID="0000:00:1d.1"
    DRIVER="uhci_hcd"
    SYSFS{class}="0x0c0300"
    SYSFS{detach_state}="0"
    SYSFS{device}="0x24c4"
    SYSFS{irq}="11"
    SYSFS{subsystem_device}="0x4541"
    SYSFS{subsystem_vendor}="0x8086"
    SYSFS{vendor}="0x8086"

  looking at the device chain at '/sys/devices/pci0000:00':
    BUS=""
    ID="pci0000:00"
    DRIVER="unknown"
    SYSFS{detach_state}="0"

> 
> and
> 
>   udevinfo -a -p $(udevinfo -q path -n /dev/sdi)

$ udevinfo -a -p $(udevinfo -q path -n /dev/sdi1)

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/sdi/sdi1' has major:minor 8:129
  looking at class device '/sys/block/sdi/sdi1':
    SUBSYSTEM="block"
    SYSFS{dev}="8:129"
    SYSFS{size}="250592"
    SYSFS{start}="32"
    SYSFS{stat}="      64      274        0        0"

follow the class device's "device"
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/4-5.2/4-5.2:1.0/host2/2:0:0:0':
    BUS="scsi"
    ID="2:0:0:0"
    DRIVER="sd"
    SYSFS{detach_state}="0"
    SYSFS{device_blocked}="0"
    SYSFS{max_sectors}="240"
    SYSFS{model}="DATA TRAVELER   "
    SYSFS{queue_depth}="1"
    SYSFS{rev}="1.11"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}="KINGSTON"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/4-5.2/4-5.2:1.0/host2':
    BUS=""
    ID="host2"
    DRIVER="unknown"
    SYSFS{detach_state}="0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/4-5.2/4-5.2:1.0':
    BUS="usb"
    ID="4-5.2:1.0"
    DRIVER="usb-storage"
    SYSFS{bAlternateSetting}=" 0"
    SYSFS{bInterfaceClass}="08"
    SYSFS{bInterfaceNumber}="00"
    SYSFS{bInterfaceProtocol}="50"
    SYSFS{bInterfaceSubClass}="06"
    SYSFS{bNumEndpoints}="02"
    SYSFS{detach_state}="0"
    SYSFS{iInterface}="00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5/4-5.2':
    BUS="usb"
    ID="4-5.2"
    DRIVER="usb"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="00"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}=" 90mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0001"
    SYSFS{bmAttributes}="80"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="7"
    SYSFS{idProduct}="0100"
    SYSFS{idVendor}="04e8"
    SYSFS{manufacturer}="KINGSTON     "
    SYSFS{maxchild}="0"
    SYSFS{product}="DATA TRAVELER"
    SYSFS{serial}="0106883178720"
    SYSFS{speed}="12"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-5':
    BUS="usb"
    ID="4-5"
    DRIVER="usb"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="09"
    SYSFS{bDeviceProtocol}="01"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="100mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0100"
    SYSFS{bmAttributes}="e0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="3"
    SYSFS{idProduct}="0059"
    SYSFS{idVendor}="0409"
    SYSFS{maxchild}="4"
    SYSFS{speed}="480"
    SYSFS{version}=" 2.00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb4':
    BUS="usb"
    ID="usb4"
    DRIVER="usb"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="09"
    SYSFS{bDeviceProtocol}="01"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="  0mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0206"
    SYSFS{bmAttributes}="e0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="1"
    SYSFS{idProduct}="0000"
    SYSFS{idVendor}="0000"
    SYSFS{manufacturer}="Linux 2.6.8-2-686 ehci_hcd"
    SYSFS{maxchild}="6"
    SYSFS{product}="Intel Corp. 82801DB (ICH4) USB2 EHCI Controller"
    SYSFS{serial}="0000:00:1d.7"
    SYSFS{speed}="480"
    SYSFS{version}=" 2.00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7':
    BUS="pci"
    ID="0000:00:1d.7"
    DRIVER="ehci_hcd"
    SYSFS{class}="0x0c0320"
    SYSFS{detach_state}="0"
    SYSFS{device}="0x24cd"
    SYSFS{irq}="11"
    SYSFS{subsystem_device}="0x0139"
    SYSFS{subsystem_vendor}="0x1028"
    SYSFS{vendor}="0x8086"

  looking at the device chain at '/sys/devices/pci0000:00':
    BUS=""
    ID="pci0000:00"
    DRIVER="unknown"
    SYSFS{detach_state}="0"

> 
> and post the output here.

Done.
Still, I have no clue what now makes the *characteristic* difference
between USB-floppy and thumb-drive and could be coded ?

Uwe





Reply to: