On Friday 04 February 2005 10:01 pm, Greg KH wrote: > > Hm, wait, care to change the following: > > > +/*-------------------------------------------------------------------------*/ > > + > > +#ifdef CONFIG_PM > > + > > +static int usbnet_suspend (struct usb_interface *intf, u32 state) > > +{ > > + struct usbnet *dev = usb_get_intfdata(intf); > > + > > + netif_device_detach (dev->net); > > + return 0; > > +} > > To use the correct typedef for the state? I'm having to merge enough > patches already for this :)
Right now usb_driver::suspend() expects a u32 state, so that's correct. Though there was some patch that claimed to fix usbcore for those new typedefs; it seems to have been at best incomplete, having missed the main paths where a "pm_message_t" would be right. Were there other USB patches yet to merge in this area? > Care to send a follow-on patch? Actually I kind of regret passing the "state" value down there anyway, its pretty useless since there's only one USB suspend state (unlike PCI). The rationale was that one state traditionally indicates suspend, and a different one traditionally indicates poweroff ... but for USB, it makes more sense to use disconnect() on poweroff and not complicate suspend processing unnecessarily. And hmm, there's no pm_message_t for "power off". I'm not sure where the knowledge gets discarded: that the host controller will enter a suspend state where the root hub won't provide any suspend current. The original problem there was that the PM core code has nasty driver model interactions, like self-deadlock if devices were removed during suspend or resume processing. (Part of that should be fixed now.) Which is why usbcore will now (with CONFIG_USB_SUSPEND) warn that "resume is unsafe!". So ... I'm not sure what a "follow-on" patch should do! Comments, anyone? - Dave ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel