linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Udev rule for Digi Edgeport 8 (multi-port USB-serial adapter)
@ 2010-08-05  1:45 Philip Tait
  2010-08-05  2:17 ` Greg KH
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Philip Tait @ 2010-08-05  1:45 UTC (permalink / raw)
  To: linux-hotplug

I have been trying to overcome the loss of the '%e' enumeration
variable to make a version of the Edgeport rules that will work with
the current version of Udev.

Old version:

BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}="0244"
SYSFS{serial}="*-0" NAME="%k" SYMLINK="ttyEDGE8_0_%e"
BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}="0244"
SYSFS{serial}="*-1" NAME="%k" SYMLINK="ttyEDGE8_1_%e"

Replacing it with '%m" doesn't work, because then the numbering is
dependent on the presence of other USB-serial devices.

I tried this:

ENV{portnum}=ATTRS{port_number}
BUS="usb",SYSFS{idVendor}="1608",SYSFS{idProduct}="0244",SYSFS{serial}="I01846004-0",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`
BUS="usb",SYSFS{idVendor}="1608",SYSFS{idProduct}="0244",SYSFS{serial}="I01846004-1",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`
BUS="usb",SYSFS{idVendor}="1608",SYSFS{idProduct}="0244",SYSFS{serial}="I01846004-2",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`
BUS="usb",SYSFS{idVendor}="1608",SYSFS{idProduct}="0244",SYSFS{serial}="I01846004-3",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`

but this didn't work, I think because the 'port_number' attribute is
defined at a different hierarchical level than the 'serial' attribute:

  looking at parent device
'/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2.4/7-2.4:1.0/ttyUSB0':
    KERNELS="ttyUSB0"
    SUBSYSTEMS="usb-serial"
    DRIVERS="edgeport_ti_2"
    ATTRS{uart_mode}="0"
    ATTRS{port_number}="0"

  looking at parent device
'/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2.4/7-2.4:1.0':
[....]

looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2.4':
    KERNELS="7-2.4"
    SUBSYSTEMS="usb"
    DRIVERS="usb"
    ATTRS{configuration}=""
    ATTRS{bNumInterfaces}=" 1"
    ATTRS{bConfigurationValue}="1"
    ATTRS{bmAttributes}="e0"
    ATTRS{bMaxPower}="  0mA"
    ATTRS{urbnum}="38"
    ATTRS{idVendor}="1608"
    ATTRS{idProduct}="0244"
    ATTRS{bcdDevice}="0001"
    ATTRS{bDeviceClass}="ff"
    ATTRS{bDeviceSubClass}="00"
    ATTRS{bDeviceProtocol}="ff"
    ATTRS{bNumConfigurations}="1"
    ATTRS{bMaxPacketSize0}="8"
    ATTRS{speed}="12"
    ATTRS{busnum}="7"
    ATTRS{devnum}="18"
    ATTRS{version}=" 1.10"
    ATTRS{maxchild}="0"
    ATTRS{quirks}="0x0"
    ATTRS{authorized}="1"
    ATTRS{manufacturer}="Digi International"
    ATTRS{product}="Edgeport/8"
    ATTRS{serial}="I01846004-0"


Any clues or ideas would be welcome!

-- 
Philip J. Tait
Software Engineer, FMOS
http://subarutelescope.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-08-05 22:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05  1:45 Udev rule for Digi Edgeport 8 (multi-port USB-serial adapter) Philip Tait
2010-08-05  2:17 ` Greg KH
2010-08-05  2:18 ` Greg KH
2010-08-05  2:21 ` Philip Tait
2010-08-05  4:32 ` Kay Sievers
2010-08-05 14:50 ` Greg KH
2010-08-05 19:05 ` Philip Tait
2010-08-05 19:18 ` Philip Tait
2010-08-05 19:20 ` Kay Sievers
2010-08-05 19:24 ` Kay Sievers
2010-08-05 22:10 ` Philip Tait

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).