From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Wed, 15 Oct 2008 12:32:27 +0000 Subject: Re: Loading firmware Message-Id: List-Id: References: <003c01c92d81$89978710$9cc69530$@com> In-Reply-To: <003c01c92d81$89978710$9cc69530$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Oct 15, 2008 at 2:05 PM, Jasem Mutlaq wrote: >> SUBSYSTEM="usb", ACTION="add", ENV{DEVTYPE}="usb_device", >> NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" > > Yes, this is exactly what I have in 50-udev-default.rules. > >> I suspect you'll end up with something like this (make sure it runs >> somewhere after the above rule that sets the name): >> >> SUBSYSTEM="usb", ACTION="add", ENV{DEVTYPE}="usb_device", >> ATTR{idVendor}="xxxx", ATTR{idProduct}="yyyy", RUN+="/sbin/fxload -I >> /lib/firmware/foo.hex -D $env{DEVNAME}" > > I tried that, and now the rule wouldn't even apply. It seems that DEVTYPE="usb_device" is not handled correctly. If I remove this condition, the rule is applied. I have one file 99-sbig.rules which has the following: > > SUBSYSTEM="usb", ACTION="add", SYSFS{idVendor}="0d97", SYSFS{idProduct}="0001", ENV{DEVTYPE}="usb_device", \ > RUN+="/sbin/fxload -I /lib/firmware/sbigucam.hex -D $env{DEVNAME}" > > I don't understand why DEVTYPE is not caught, I ran udev monitor and got the following when I plugged my USB cam: > > --------------------------------- > EVENT[1224070564.432382] add /devices/pci0000:00/0000:00:07.2/usb1/1-1 (usb) That reads "UDEV [...] ..." since a long time, what old version of udev you are running? It does not look like Fedora9 or openSUSE11. Such old udev versions might not work with device nodes created by a kernel bus-device. Kay