Re: Problem with linux-3.7.7 (Stern - d01875f11f05f76fc471cec94d701201c1b34389)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Feb 2013, Adrian Bassett wrote:

> Dear Mr. Stern,
> 
> I have reported a problem at bugzilla.kernel.org (#53831) with
> respect to a recent commit to the stable linux kernel (3.7.7), which
> is causing me problems in connection with the kernel-based joint
> hibernate/suspend mechanism that was introduced in 3.6.
> 
> I did a git bisect from 3.7.6 and 3.7.7 and its was one of your
> commits that appeared to be the cause of the problem.  Reverting that
> commit solved my problem.
> 
> Greg K-H has suggested I contact you directly.  However, rather than
> re-iterating my comments here, perhaps I could ask if you would be
> kind enough to look at the bug report itself and edit with any
> response?
> 
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=53831

Okay, now I have some time to work on this problem.

First, things will be a lot easier if you do your testing with a 3.8 
kernel rather than 3.7.7.

Second, just to be certain we are on the same page, is it correct that
you find suspend works okay when you revert commit 6e0c3339a6f19d7 but
it fails if the commit is in place?

Third: Does applying the patch below help at all?

Fourth: If not, please build a kernel with CONFIG_USB_DEBUG enabled and
post the output from dmesg following a failed suspend attempt.

Alan Stern



Index: usb-3.8/drivers/usb/host/ehci-timer.c
===================================================================
--- usb-3.8.orig/drivers/usb/host/ehci-timer.c
+++ usb-3.8/drivers/usb/host/ehci-timer.c
@@ -113,15 +113,14 @@ static void ehci_poll_ASS(struct ehci_hc
 
 	if (want != actual) {
 
-		/* Poll again later */
-		ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true);
-		++ehci->ASS_poll_count;
-		return;
+		/* Poll again later, but give up after about 20 ms */
+		if (ehci->ASS_poll_count++ < 20) {
+			ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true);
+			return;
+		}
+		ehci_dbg(ehci, "Waited too long for the async schedule status (%x/%x), giving up\n",
+				want, actual);
 	}
-
-	if (ehci->ASS_poll_count > 20)
-		ehci_dbg(ehci, "ASS poll count reached %d\n",
-				ehci->ASS_poll_count);
 	ehci->ASS_poll_count = 0;
 
 	/* The status is up-to-date; restart or stop the schedule as needed */
@@ -160,14 +159,14 @@ static void ehci_poll_PSS(struct ehci_hc
 
 	if (want != actual) {
 
-		/* Poll again later */
-		ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true);
-		return;
+		/* Poll again later, but give up after about 20 ms */
+		if (ehci->PSS_poll_count++ < 20) {
+			ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true);
+			return;
+		}
+		ehci_dbg(ehci, "Waited too long for the periodic schedule status (%x/%x), giving up\n",
+				want, actual);
 	}
-
-	if (ehci->PSS_poll_count > 20)
-		ehci_dbg(ehci, "PSS poll count reached %d\n",
-				ehci->PSS_poll_count);
 	ehci->PSS_poll_count = 0;
 
 	/* The status is up-to-date; restart or stop the schedule as needed */

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux