On Fri, 16 Jun 2006, Greg KH wrote: > On Tue, Jun 13, 2006 at 10:21:06AM -0400, Alan Stern wrote: > > On Mon, 12 Jun 2006, Greg KH wrote: > > > One comment thought: > > > > + /* FIXME: What is an appropriate MODALIAS line for a > > > > + * USB device (not interface)? */ > > > > > > There isn't one.
> > It turns out that in fact we _do_ care now about adding USB devices. > > This is because of the new power-budgeting restrictions; people sometimes > > want to install a configuration automatically (in a udev script) even > > though it violates the power budget. Since by default no configuration > > is selected there _are_ no interfaces registered, so the only event to > > trigger from is the one corresponding to the device itself. > > Which, as you state, we already emit, and you can write udev rules based > on it today. > > But we don't want to add MODALIAS stuff without really thinking about > it, otherwise we are back to old, pre-2.4 ways with usb devices :) I'll take the MODALIAS comment out of the next version of this patch. But we should put the USB environment variables in, for the following reason: The existing udev rules may not work after this patch is added; they might have to be changed. (Luckily there aren't very many of them.) This is because they use sysfs attribute files to get the vendor and product ID -- there's no alternative since that info isn't in the environment. But the patch causes the sysfs attributes to be created _after_ the uevent is issued, not before. There's no choice about that: the attributes are registered by the usb_generic driver, and the driver isn't bound until after the usb_device is registered and its uevent is generated. So depending on the timing of userspace vs. kernel tasks, the udev rules may need to start checking the environment variables. Alan Stern _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel