linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Udev rule for HSDPA modem
Date: Thu, 04 Dec 2008 19:11:36 +0000	[thread overview]
Message-ID: <20081204191136.GA30917@kroah.com> (raw)
In-Reply-To: <bed87e0b812045212a08a0c9ef4a06b2.squirrel@kone.netland.fin>

On Thu, Dec 04, 2008 at 10:56:32AM -0800, Greg KH wrote:
> On Thu, Dec 04, 2008 at 09:27:15AM -0600, Karl O. Pinc wrote:
> >
> > I think what the Digi Edgeport 4/16 needs is the same rule set, but
> > with the serial number also included in the name.  This is because
> > it has an internal hub with 8 endpoints, each endpoint driving 2
> > serial ports (io_ti), and my understanding is that the ports on the
> > internal hub may not be discovered in the same order every time.
> > However, each internal endpoint does have it's own serial
> > number.  If that showed in the name then there'd be no
> > problem.
> >
> > Of course I could be completely misunderstanding.
> 
> Hm, good point, I think the by_id stuff will start conflicting if 2 of
> the same types of devices are plugged in at the same time.
> 
> Let me go dig through my boxes of usb stuff to find some duplicate
> devices, and one of the 4/16 edgeport devices as well...

Not a problem, the serial number is added to the "by-id" tree if it is
present:

$ tree /dev/serial/
/dev/serial/
|-- by-id
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port0 -> ../../ttyUSB8
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port1 -> ../../ttyUSB9
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port2 -> ../../ttyUSB10
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port3 -> ../../ttyUSB11
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port4 -> ../../ttyUSB12
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port5 -> ../../ttyUSB13
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port6 -> ../../ttyUSB14
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port7 -> ../../ttyUSB15
|   |-- usb-Keyspan_Serial-if00-port0 -> ../../ttyUSB0
|   |-- usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USB_Serial_Adapter-if00-port0 -> ../../ttyUSB1
|   |-- usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USB_Serial_Adapter-if00-port1 -> ../../ttyUSB2
|   `-- usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -> ../../ttyUSB7
`-- by-path
    |-- pci-0000:00:1d.2-usb-0:1.3:1.0-port0 -> ../../ttyUSB7
    |-- pci-0000:00:1d.7-usb-0:6.1.4.1:1.0-port0 -> ../../ttyUSB0
    |-- pci-0000:00:1d.7-usb-0:6.1.4.4:1.0-port0 -> ../../ttyUSB1
    |-- pci-0000:00:1d.7-usb-0:6.1.4.4:1.0-port1 -> ../../ttyUSB2
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port0 -> ../../ttyUSB8
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port1 -> ../../ttyUSB9
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port2 -> ../../ttyUSB10
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port3 -> ../../ttyUSB11
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port4 -> ../../ttyUSB12
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port5 -> ../../ttyUSB13
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port6 -> ../../ttyUSB14
    `-- pci-0000:00:1d.7-usb-0:6.3:1.0-port7 -> ../../ttyUSB15


The problem is when you have 2 devices with no serial numbers, the last
one in wins the "by_id" classification:

$ tree /dev/serial/
/dev/serial/
|-- by-id
|   `-- usb-067b_2303-if00-port0 -> ../../ttyUSB3
`-- by-path
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.1:1.0-port0 -> ../../ttyUSB0
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.2:1.0-port0 -> ../../ttyUSB1
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.3:1.0-port0 -> ../../ttyUSB2
    `-- pci-0000:00:1d.7-usb-0:6.1.4.2.4:1.0-port0 -> ../../ttyUSB3

This is a 4 port, pl2303 device that is really a hub with 4 devices
behind it.  No serial number either, so the by-id path isn't the best
choice, but the by-path one is.

And, just for fun, here's a bunch of usb-serial devices all plugged in
at the same time:

/dev/serial
|-- by-id
|   |-- usb-067b_2303-if00-port0 -> ../../ttyUSB3
|   |-- usb-ACME_usb_widgets_ACME_USB_serial_widget_47-if00-port0 -> ../../ttyUSB19
|   |-- usb-Inside_Out_Networks_Edgeport_4_04-01-006467-if00-port0 -> ../../ttyUSB20
|   |-- usb-Inside_Out_Networks_Edgeport_4_04-01-006467-if00-port1 -> ../../ttyUSB21
|   |-- usb-Inside_Out_Networks_Edgeport_4_04-01-006467-if00-port2 -> ../../ttyUSB22
|   |-- usb-Inside_Out_Networks_Edgeport_4_04-01-006467-if00-port3 -> ../../ttyUSB23
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port0 -> ../../ttyUSB4
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port1 -> ../../ttyUSB5
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port2 -> ../../ttyUSB6
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port3 -> ../../ttyUSB7
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port4 -> ../../ttyUSB8
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port5 -> ../../ttyUSB9
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port6 -> ../../ttyUSB10
|   |-- usb-Inside_Out_Networks_Edgeport_8_V12124599-if00-port7 -> ../../ttyUSB11
|   |-- usb-Keyspan_Serial-if00-port0 -> ../../ttyUSB14
|   |-- usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USB_Serial_Adapter-if00-port0 -> ../../ttyUSB24
|   |-- usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USB_Serial_Adapter-if00-port1 -> ../../ttyUSB25
|   |-- usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -> ../../ttyUSB17
|   `-- usb-USB-RS232_Interface_Converter_USB_Ver1.1_Device_679016-if00-port0 -> ../../ttyUSB18
`-- by-path
    |-- pci-0000:00:1d.2-usb-0:1.2:1.0-port0 -> ../../ttyUSB19
    |-- pci-0000:00:1d.2-usb-0:1.3:1.0-port0 -> ../../ttyUSB17
    |-- pci-0000:00:1d.7-usb-0:6.1.1:1.0-port0 -> ../../ttyUSB24
    |-- pci-0000:00:1d.7-usb-0:6.1.1:1.0-port1 -> ../../ttyUSB25
    |-- pci-0000:00:1d.7-usb-0:6.1.2:1.0-port0 -> ../../ttyUSB20
    |-- pci-0000:00:1d.7-usb-0:6.1.2:1.0-port1 -> ../../ttyUSB21
    |-- pci-0000:00:1d.7-usb-0:6.1.2:1.0-port2 -> ../../ttyUSB22
    |-- pci-0000:00:1d.7-usb-0:6.1.2:1.0-port3 -> ../../ttyUSB23
    |-- pci-0000:00:1d.7-usb-0:6.1.3:1.0-port0 -> ../../ttyUSB18
    |-- pci-0000:00:1d.7-usb-0:6.1.4.1:1.0-port0 -> ../../ttyUSB15
    |-- pci-0000:00:1d.7-usb-0:6.1.4.1:1.0-port1 -> ../../ttyUSB16
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.1:1.0-port0 -> ../../ttyUSB0
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.2:1.0-port0 -> ../../ttyUSB1
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.3:1.0-port0 -> ../../ttyUSB2
    |-- pci-0000:00:1d.7-usb-0:6.1.4.2.4:1.0-port0 -> ../../ttyUSB3
    |-- pci-0000:00:1d.7-usb-0:6.1.4.3:1.0-port0 -> ../../ttyUSB14
    |-- pci-0000:00:1d.7-usb-0:6.1.4.4:1.0-port0 -> ../../ttyUSB12
    |-- pci-0000:00:1d.7-usb-0:6.1.4.4:1.0-port1 -> ../../ttyUSB13
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port0 -> ../../ttyUSB4
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port1 -> ../../ttyUSB5
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port2 -> ../../ttyUSB6
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port3 -> ../../ttyUSB7
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port4 -> ../../ttyUSB8
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port5 -> ../../ttyUSB9
    |-- pci-0000:00:1d.7-usb-0:6.3:1.0-port6 -> ../../ttyUSB10
    `-- pci-0000:00:1d.7-usb-0:6.3:1.0-port7 -> ../../ttyUSB11


Hope this helps,

greg k-h

  parent reply	other threads:[~2008-12-04 19:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 17:56 Udev rule for HSDPA modem Jar
2008-11-28 18:51 ` Greg KH
2008-11-29  8:00 ` Jar
2008-11-29 17:37 ` Greg KH
2008-11-30  5:21 ` Kay Sievers
2008-12-03  6:45 ` Greg KH
2008-12-03  9:27 ` Kay Sievers
2008-12-03 12:12 ` Kay Sievers
2008-12-03 15:11 ` Kay Sievers
2008-12-03 17:06 ` Karl O. Pinc
2008-12-03 17:37 ` Kay Sievers
2008-12-03 18:49 ` Karl O. Pinc
2008-12-03 23:10 ` Greg KH
2008-12-03 23:54 ` Kay Sievers
2008-12-04  0:04 ` Greg KH
2008-12-04  0:12 ` Kay Sievers
2008-12-04  0:40 ` Greg KH
2008-12-04  1:14 ` Kay Sievers
2008-12-04  6:28 ` Jar
2008-12-04  7:23 ` Kay Sievers
2008-12-04 14:22 ` Jar
2008-12-04 15:27 ` Karl O. Pinc
2008-12-04 18:56 ` Greg KH
2008-12-04 19:11 ` Greg KH [this message]
2008-12-05  2:53 ` Kay Sievers
2008-12-05  4:54 ` Karl O. Pinc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081204191136.GA30917@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).