From: "Andreas Jellinghaus [c]" <aj@ciphirelabs.com>
To: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] why was MODALIAS removed from usb kernel events? [u]
Date: Tue, 21 Aug 2007 10:39:58 +0200 [thread overview]
Message-ID: <200708211039.59241.aj@ciphirelabs.com> (raw)
In-Reply-To: <20070821073656.GA6691@kroah.com>
Am Dienstag, 21. August 2007 schrieb Greg KH:
> On Fri, Aug 17, 2007 at 04:22:04PM +0200, Andreas Jellinghaus [c] wrote:
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit
> >diff;h=9f8b17e643fe6aa505629658445849397bda4e4f
> >
> > removes MODALIAS from one of the events,
>
> Which event?
here is the event with kernel 2.6.21:
UEVENT[1187683991.583384]
add /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.7/2-1.7:1.0 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.7/2-1.7:1.0
SUBSYSTEM=usb
SEQNUM=3070
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/002/006
PRODUCT=8e6/3438/100
TYPE=0/0/0
INTERFACE=11/0/0
MODALIAS=usb:v08E6p3438d0100dc00dsc00dp00ic0Bisc00ip00
note: it has both - MODALIAS and DEVICE.
here is the event with kernel 2.6.22 (with CONFIG_USB_DEVICE_CLASS):
UEVENT[1187684539.588975]
add /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.7/2-1.7:1.0 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.7/2-1.7:1.0
SUBSYSTEM=usb
SEQNUM=3029
DEVTYPE=usb_interface
PHYSDEVBUS=usb
INTERFACE=11/0/0
MODALIAS=usb:v08E6p3438d0100dc00dsc00dp00ic0Bisc00ip00
you see, it is missing DEVICE and PRODUCT and TYPE
and here is the event with kernel 2.6.22 with alans patch and
CONFIG_USB_DEVICE_CLASS:
UEVENT[1187684125.860105]
add /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.7/2-1.7:1.0 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.7/2-1.7:1.0
SUBSYSTEM=usb
SEQNUM=3029
DEVTYPE=usb_interface
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/002/006
BUSNUM=002
DEVNUM=006
INTERFACE=11/0/0
MODALIAS=usb:v08E6p3438d0100dc00dsc00dp00ic0Bisc00ip00
it still misses PRODUCT and TYPE, for real compatibility those should be added
too. (I can work around that, as the PRODUCT information is part of MODALIAS
and I don't use TYPE.)
> If you enable CONFIG_USB_DEVICE_CLASS, does everything work the same
> again?
both with CONFIG_USB_DEVICE_CLASS. would it change anything here?
> What specific udev rule are you matching against here that is now
> broken?
still trying to get it to work, so far I try:
SUBSYSTEM!="usb", GOTO="openct_usb_rules_end"
ACTION!="add", GOTO="openct_usb_rules_end"
ENV{MODALIAS}=="usb:v0973p0001*", RUN+="/lib/udev/openct_usb"
ENV{MODALIAS}=="usb:*ic0Bisc00*", RUN+="/lib/udev/openct_usb"
LABEL="openct_usb_rules_end"
this should work?
> > The text does not mention MODALIAS nor the reason for it's removal.
>
> The reason is we don't need the usb_device class anymore, but we still
> provide for the compatibility if you have an old distro with old udev
> rules that is expecting it (only rule we ran into was the one for the
> usbfs /dev nodes, but there might be more.)
I'm no udev expert, but old kernels provide an event with all three
informations I care about: MODALIAS, DEVICE and PRODUCT. this is changed,
and I don't understand what it has to do with usb_device class.
but I can say that without any event that has all three (or at least the first
two - I can create PRODUCT from MODALIAS i think), I would need to redesign
how openct finds out if new devices are plugged in. long term I might need
to do so anyway, but right now people complain "it doesn't work" to me, and
the culprit seems to be the kernel to me - 2.6.21 works, 2.6.22 does not.
Now I'm working on getting openct udev rules and handling script fixed so
they work at least with alans patch and work around missing PRODUCT.
Regards, Andreas
next prev parent reply other threads:[~2007-08-21 8:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 14:22 Andreas Jellinghaus [c]
2007-08-17 14:50 ` [linux-usb-devel] " Alan Stern
2007-08-17 15:05 ` Andreas Jellinghaus [c]
2007-08-17 17:12 ` Alan Stern
2007-08-18 19:32 ` Andreas Jellinghaus [c]
2007-08-20 15:59 ` Alan Stern
2007-08-21 6:45 ` Andreas Jellinghaus [c]
2007-08-21 7:36 ` Greg KH
2007-08-21 8:39 ` Andreas Jellinghaus [c] [this message]
2007-08-21 11:41 ` Kay Sievers
2007-08-21 12:21 ` Andreas Jellinghaus [c]
2007-08-21 15:22 ` Kay Sievers
2007-08-21 12:41 ` Andreas Jellinghaus [c]
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=200708211039.59241.aj@ciphirelabs.com \
--to=aj@ciphirelabs.com \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®