Re: 2.6.26-rc1 regression since 2.6.25 - problem in 2.6.26-rc8 again

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Stern
Date: Monday, June 30, 2008 - 10:21 am

On Mon, 30 Jun 2008, Lukas Hejtmanek wrote:


Ah, good.  I see the problem now.

To tell the truth, this has been fixed in the development tree for so 
long that I had forgotten about it.  Unfortunately those fixes won't 
get into the regular kernel until 2.6.27.  Until then we need another 
fix.

The patch below should take care of the problem.  Let me know how it 
works.

Alan Stern



Index: 2.6.26-rc8/drivers/usb/core/hub.c
===================================================================
--- 2.6.26-rc8.orig/drivers/usb/core/hub.c
+++ 2.6.26-rc8/drivers/usb/core/hub.c
@@ -713,18 +713,11 @@ static void hub_restart(struct usb_hub *
 		}
 
 		/* Was the power session lost while we were suspended? */
-		switch (type) {
-		case HUB_RESET_RESUME:
-			portstatus = 0;
-			portchange = USB_PORT_STAT_C_CONNECTION;
-			break;
+		status = hub_port_status(hub, port1, &portstatus, &portchange);
 
-		case HUB_RESET:
-		case HUB_RESUME:
-			status = hub_port_status(hub, port1,
-					&portstatus, &portchange);
-			break;
-		}
+		/* If the device is gone, khubd will handle it later */
+		if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION))
+			continue;
 
 		/* For "USB_PERSIST"-enabled children we must
 		 * mark the child device for reset-resume and

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: 2.6.26-rc1 regression since 2.6.25 - problem in 2.6.26 ..., Alan Stern, (Mon Jun 30, 10:21 am)