From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev: rules using multiple sysfs directories
Date: Fri, 29 Apr 2005 20:09:32 +0000 [thread overview]
Message-ID: <20050429200932.GA2443@kroah.com> (raw)
In-Reply-To: <200504282041.56905.typo@mcflan.org>
On Thu, Apr 28, 2005 at 03:28:31PM -0500, Ian Pilcher wrote:
> I've got another example -- the AirPrime 5220 1xEVDO wireless modem for
> which Greg K-H just whipped out a driver. (Thanks Greg!)
>
> This is a composite device with two serial ports:
>
> Bus 004 Device 004: ID 0f3d:0112
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 1.10
> bDeviceClass 0 (Defined at Interface level)
> bDeviceSubClass 0
> bDeviceProtocol 0
> bMaxPacketSize0 16
> idVendor 0x0f3d
> idProduct 0x0112
> bcdDevice 0.01
> iManufacturer 1 AirPrime, Incorporated
> iProduct 2 AirPrime CDMA Wireless PC Card
> iSerial 0
> bNumConfigurations 1
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 62
> bNumInterfaces 2
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0xc0
> Self Powered
> MaxPower 100mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 3
> bInterfaceClass 255 Vendor Specific Class
> bInterfaceSubClass 255 Vendor Specific Subclass
> bInterfaceProtocol 255 Vendor Specific Protocol
> iInterface 4 Data Interface
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type none
> Usage Type Data
> wMaxPacketSize 0x0010 bytes 16 once
> bInterval 128
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x8a EP 10 IN
> bmAttributes 2
> Transfer Type Bulk
> Synch Type none
> Usage Type Data
> wMaxPacketSize 0x0040 bytes 64 once
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x0b EP 11 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type none
> Usage Type Data
> wMaxPacketSize 0x0040 bytes 64 once
> bInterval 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 255 Vendor Specific Class
> bInterfaceSubClass 255 Vendor Specific Subclass
> bInterfaceProtocol 255 Vendor Specific Protocol
> iInterface 4 Data Interface
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x82 EP 2 IN
> bmAttributes 2
> Transfer Type Bulk
> Synch Type none
> Usage Type Data
> wMaxPacketSize 0x0040 bytes 64 once
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x05 EP 5 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type none
> Usage Type Data
> wMaxPacketSize 0x0040 bytes 64 once
> bInterval 0
> Language IDs: (length=4)
> 0409 English(US)
>
> The first port (bInterfaceNumber 0) is the CDMA modem port; the second
> port (bInterfaceNumber 1) is the "control port" which is used for
> diagnostic information, etc. I would like to create persistent names
> for these two ports (/dev/cdma_modem and /dev/cdma_ctl or something
> similar). Since idVendor and idProduct are a directory above
> bInterfaceNumber, there doesn't appear to be any way to do this.
You can do this, as you get two different hotplug events. This is
because usb drivers bind to the USB inteface, not the main device
itself.
> This seems like a significant limitation for USB composite devices.
No, all USB devices work like this.
I'll try to make a udev rule that would work for this, can you send me
the output of udevinfo for this:
udevinfo -a /sys/class/tty/ttyUSB0
udevinfo -a /sys/class/tty/ttyUSB1
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-04-29 20:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-28 19:41 udev: rules using multiple sysfs directories James Macfarlane
2005-04-28 20:28 ` Ian Pilcher
2005-04-28 21:44 ` Kay Sievers
2005-04-29 0:59 ` James Macfarlane
2005-04-29 12:55 ` Ian Pilcher
2005-04-29 17:13 ` James Macfarlane
2005-04-29 18:15 ` Kay Sievers
2005-04-29 20:09 ` Greg KH [this message]
2005-04-30 0:44 ` Ian Pilcher
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=20050429200932.GA2443@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).