Re: [PATCH v4] xhci - correct comp_mode_recovery_timer on return from hibernate

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

 



On 02/27/2013 07:20 PM, Sarah Sharp wrote:

Basically, I'd like Tony to make his first patch work, rather than
pursuing moving the timer manipulation to xhci_bus_suspend/resume.


Not to add confusion, but here is a less intrusive patch that simply
checks to see if the Compliance Mode Recovery Timer already exists
before attempting to initialize it.



---
 drivers/usb/host/xhci.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index f1f01a8..e51db78 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -445,6 +445,11 @@ static void compliance_mode_recovery(unsigned long arg)
  */
 static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci)
 {
+	if (timer_pending(&xhci->comp_mode_recovery_timer)) {
+		xhci_dbg(xhci, "Compliance Mode Recovery Timer already active.\n");
+		return;
+	}
+
 	xhci->port_status_u0 = 0;
 	init_timer(&xhci->comp_mode_recovery_timer);
 
-- 
1.7.1


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

  Powered by Linux