From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Tue, 14 Oct 2008 17:46:01 +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 Tue, Oct 14, 2008 at 7:24 PM, Jasem Mutlaq wrote: >> That's not a USB _device_, it's a (not interesting) USB endpoint. >> >> > which I then need to parse in some regexp magic in order to >> > extract the bus and dev num in order to construct the full path. I >> used to >> > be able to pull devnum and busnum ($env{BUSNUM}) but not anymore >> (using >> > openSUSE 11). >> >> That still works. > > I tried it on OpenSUSE 11 and it doesn't, $env{BUSNUM} and $env{DEVNUM} are empty strings, $env{DEVNAME} returns the USB endpoint which I can't pass to fxload. Sure you can't. As said, you need a device, not an endpoint, these values _do_ exist at the device event. >> Why not just use $DEVNAME? >> RUN+="/sbin/fxload -D $env{DEVNAME}" > > This is what I get: > > run_program: '/sbin/fxload' (stderr) '/dev/usbdev1.24_ep82: No such device or address' > run_program: '/sbin/fxload' returned with status 255 That's expected behavior for endpoints. > Thus far, fxload only works if it is passed something in the form of /dev/bus/usb/XXX/YYY It should work with any usb device device node, forget the endpoints, match on a usb device. You look at the wrong events, you get a bunch of them on plugin, only one of them will be the one that works with fxload, and definitely not the one with the *_ep*. The right one should have: DEVTYPE=usb_device set. Kay