Joel Stanley | 1154895 | 2016-03-03 11:41:59 +1030 | [diff] [blame] | 1 | From ca2c088493b9c02f33934d6c6dfb327b6dac3bd0 Mon Sep 17 00:00:00 2001 |
Joel Stanley | d9669fe | 2016-01-22 16:13:06 +1030 | [diff] [blame] | 2 | From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> |
| 3 | Date: Mon, 10 Mar 2014 13:02:13 -0300 |
Joel Stanley | 1154895 | 2016-03-03 11:41:59 +1030 | [diff] [blame] | 4 | Subject: [PATCH 3/7] xhci: do not halt the secondary HCD |
Joel Stanley | d9669fe | 2016-01-22 16:13:06 +1030 | [diff] [blame] | 5 | |
| 6 | We can't halt the secondary HCD, because it's also the primary HCD, |
| 7 | which will cause problems if we have devices attached to the primary |
| 8 | HCD, like a keyboard. |
| 9 | |
| 10 | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> |
| 11 | Signed-off-by: Joel Stanley <joel@jms.id.au> |
| 12 | --- |
| 13 | drivers/usb/host/xhci.c | 13 ++++++++++++- |
| 14 | 1 file changed, 12 insertions(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
Joel Stanley | 1154895 | 2016-03-03 11:41:59 +1030 | [diff] [blame] | 17 | index cef80e930db9..90f48eb32d93 100644 |
Joel Stanley | d9669fe | 2016-01-22 16:13:06 +1030 | [diff] [blame] | 18 | --- a/drivers/usb/host/xhci.c |
| 19 | +++ b/drivers/usb/host/xhci.c |
| 20 | @@ -670,7 +670,18 @@ static void xhci_only_stop_hcd(struct usb_hcd *hcd) |
| 21 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
| 22 | |
| 23 | spin_lock_irq(&xhci->lock); |
| 24 | - xhci_halt(xhci); |
| 25 | + /* |
| 26 | + * We can't halt the secondary HCD, because it's also the |
| 27 | + * primary HCD, which will cause problems if we have devices |
| 28 | + * attached to the primary HCD, like a keyboard. |
| 29 | + */ |
| 30 | + /*xhci_halt(xhci);*/ |
| 31 | + |
| 32 | + /* The shared_hcd is going to be deallocated shortly (the USB core only |
| 33 | + * calls this function when allocation fails in usb_add_hcd(), or |
| 34 | + * usb_remove_hcd() is called). So we need to unset xHCI's pointer. |
| 35 | + */ |
| 36 | + xhci->shared_hcd = NULL; |
| 37 | spin_unlock_irq(&xhci->lock); |
| 38 | } |
| 39 | |
| 40 | -- |
Joel Stanley | 1665840 | 2016-02-22 13:39:04 +1030 | [diff] [blame] | 41 | 2.7.0 |
Joel Stanley | d9669fe | 2016-01-22 16:13:06 +1030 | [diff] [blame] | 42 | |