> > Hi Greg, I'm not sure when these problems started showing up, maybe they > > have been in 2.6.6- for a while. One patch that may be worth having in > > 2.6.6 by the way is the one for device_disconnect in devio.c that changes > > destroy_all_async to destroy_async_on_interface. It's clearly correct > > and does do some good! > > Care to point out which one this was? I'm swimming in a sea of patches > right now :)
I rediffed it against Linus's current tree. The extern -> static change is to make sure we avoid the problem reported by R. J. Wysocki for -rc3-mm1: unknown symbol destroy_all_async. --- linux-2.5/drivers/usb/core/devio.c.orig 2004-05-02 23:22:34.000000000 +0200 +++ linux-2.5/drivers/usb/core/devio.c 2004-05-02 23:40:40.000000000 +0200 @@ -315,7 +315,7 @@ destroy_async(ps, &hitlist); } -extern __inline__ void destroy_all_async(struct dev_state *ps) +static inline void destroy_all_async(struct dev_state *ps) { destroy_async(ps, &ps->async_pending); } @@ -335,6 +335,7 @@ static void driver_disconnect(struct usb_interface *intf) { struct dev_state *ps = usb_get_intfdata (intf); + unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber; if (!ps) return; @@ -345,11 +346,16 @@ /* prevent new I/O requests */ ps->dev = 0; - clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed); + + if (likely(ifnum < 8*sizeof(ps->ifclaimed))) + clear_bit(ifnum, &ps->ifclaimed); + else + warn("interface number %u out of range", ifnum); + usb_set_intfdata (intf, NULL); /* force async requests to complete */ - destroy_all_async (ps); + destroy_async_on_interface (ps, ifnum); } struct usb_driver usbdevfs_driver = { ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel