Re: Fwd: Fwd: EHCI driver problem

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

 



On Tue, 1 Nov 2011, Anton Alekseev wrote:

> ---------- Forwarded message ----------
> From: Anton Alekseev <nullakilla@xxxxxxxxx>
> Date: 2011/11/1
> Subject: Re: Fwd: EHCI driver problem
> To: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 
> 
> >> the last argument to handshake_on_error_set_halt() from 9 * 125 to
> >> something larger, such as 20 * 125.  Keep the other patches applied as
> >> well, and let's see what happens.
> 
> I set 20 * 125 in both places. Sending you two dmesg files cause they
> differ a little.

Still no better.

All right, two more things to try.  Set the delays back to 9 * 125 and
replace the previous patch with the updated version below.  If it still
doesn't work, try an extreme test: Set both delays to a much larger
value such as 20000.

Alan Stern




Index: usb-3.2/drivers/usb/host/ehci-sched.c
===================================================================
--- usb-3.2.orig/drivers/usb/host/ehci-sched.c
+++ usb-3.2/drivers/usb/host/ehci-sched.c
@@ -490,8 +490,10 @@ static int enable_periodic (struct ehci_
 	/* did clearing PSE did take effect yet?
 	 * takes effect only at frame boundaries...
 	 */
+ehci_info(ehci, "start enable periodic\n");
 	status = handshake_on_error_set_halt(ehci, &ehci->regs->status,
 					     STS_PSS, 0, 9 * 125);
+ehci_info(ehci, "enable periodic %d\n", status);
 	if (status) {
 		usb_hc_died(ehci_to_hcd(ehci));
 		return status;
@@ -517,9 +519,10 @@ static int disable_periodic (struct ehci
 	if (--ehci->periodic_sched)
 		return 0;
 
+ehci_info(ehci, "start disable periodic\n");
 	if (unlikely(ehci->broken_periodic)) {
 		/* delay experimentally determined */
-		ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000);
+		ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 2000);
 		ktime_t now = ktime_get_real();
 		s64 delay = ktime_us_delta(safe, now);
 
@@ -532,6 +535,7 @@ static int disable_periodic (struct ehci
 	 */
 	status = handshake_on_error_set_halt(ehci, &ehci->regs->status,
 					     STS_PSS, STS_PSS, 9 * 125);
+ehci_info(ehci, "disable periodic %d\n", status);
 	if (status) {
 		usb_hc_died(ehci_to_hcd(ehci));
 		return status;
@@ -539,7 +543,7 @@ static int disable_periodic (struct ehci
 
 	cmd = ehci_readl(ehci, &ehci->regs->command) & ~CMD_PSE;
 	ehci_writel(ehci, cmd, &ehci->regs->command);
-	/* posted write ... */
+	ehci_readl(ehci, &ehci->regs->command);	/* unblock posted write */
 
 	free_cached_lists(ehci);
 

--
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