lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3ae72650706190209i77b577aaue7324825587358b4@mail.gmail.com>
Date:	Tue, 19 Jun 2007 11:09:05 +0200
From:	"Kay Sievers" <kay.sievers@...y.org>
To:	"Greg KH" <greg@...ah.com>
Cc:	"Joerg Pommnitz" <pommnitz@...oo.com>,
	linux-kernel@...r.kernel.org, linux-usb-users@...ts.sourceforge.net
Subject: Re: [Linux-usb-users] Stable identification of identical USB hardware

On 6/18/07, Greg KH <greg@...ah.com> wrote:
> On Mon, Jun 18, 2007 at 08:35:35AM -0700, Joerg Pommnitz wrote:
> > I want to be able to distinguish between two (or more) mostly
> > identical USB serial devices. The devices in question are UMTS modems.
> > AFAIK they are identical except for the SIM card and the point of
> > attachment. Externally the cards are CardBus devices with an
> > integrated USB host adapter. The actual UMTS device is (internally)
> > connected to the USB host adapter.
> >
> > If I have to cardbus sockets, how do I get from what I know ("the card
> > is in socket 0") to "I have to talk to ttyUSB2 to talk to the card"? I
> > suspect I have to follow the thread from /sys/bus/pci to
> > /sys/bus/usb/devices, but how exactly?
>
> Walk up the "chain" of devices in sysfs and in udev.  The udev man pages
> and documentation should show you how to do this.  If you have specific
> questions about this, please ask them on the linux-hotplug-devel mailing
> list.

This should create a symlink for the serial device in the first slot:
  KERNEL="ttyUSB*", SUBSYSTEMS=="pcmcia", KERNELS=="0.0",
SYMLINK+="serial-slot0"

You find the keys used with udevinfo. Here is an example for a PCMCIA
CF Memory card:
  udevinfo --attribute-walk --name hda4
  ...

  looking at device '/block/hda/hda4':
    KERNEL=="hda4"
    SUBSYSTEM=="block"
  ...

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.0/0.0':
    KERNELS=="0.0"
    SUBSYSTEMS=="pcmcia"
    DRIVERS=="ide-cs"
  ...

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:00.0':
    KERNELS=="0000:04:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="yenta_cardbus"
  ...

Kay
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ