Greg: This patch is a repeat of as335, as described in
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=108861892700869&w=2 but updated to match the current source. It should be non-controversial; it has nothing to do with hubs or locking. Please apply. Alan Stern Signed-off-by: Alan Stern <[EMAIL PROTECTED]> ===== drivers/usb/core/message.c 1.103 vs edited ===== --- 1.103/drivers/usb/core/message.c Tue Aug 3 14:16:41 2004 +++ edited/drivers/usb/core/message.c Tue Aug 3 14:20:55 2004 @@ -1039,6 +1039,9 @@ int ret; int manual = 0; + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; + iface = usb_ifnum_to_if(dev, interface); if (!iface) { dev_dbg(&dev->dev, "selecting invalid interface %d\n", @@ -1136,6 +1139,9 @@ int i, retval; struct usb_host_config *config; + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; + /* caller must own dev->serialize (config won't change) * and the usb bus readlock (so driver bindings are stable); * so calls during probe() are fine @@ -1247,6 +1253,9 @@ */ if (cp && configuration == 0) dev_warn(&dev->dev, "config 0 descriptor??\n"); + + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; /* Allocate memory for new interfaces before doing anything else, * so that if we run out then nothing will have changed. */ ===== drivers/usb/core/usb.c 1.286 vs edited ===== --- 1.286/drivers/usb/core/usb.c Mon Jul 19 12:20:04 2004 +++ edited/drivers/usb/core/usb.c Tue Aug 3 14:18:53 2004 @@ -93,6 +93,8 @@ if (!driver->probe) return error; + if (interface_to_usbdev(intf)->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; id = usb_match_id (intf, driver->id_table); if (id) { ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel