diff options
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2c49f00260ca..41eb4fc33453 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -329,7 +329,7 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci) | |||
329 | return; | 329 | return; |
330 | } | 330 | } |
331 | 331 | ||
332 | static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) | 332 | static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci) |
333 | { | 333 | { |
334 | int i; | 334 | int i; |
335 | 335 | ||
@@ -1181,9 +1181,6 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev, | |||
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | xhci = hcd_to_xhci(hcd); | 1183 | xhci = hcd_to_xhci(hcd); |
1184 | if (xhci->xhc_state & XHCI_STATE_HALTED) | ||
1185 | return -ENODEV; | ||
1186 | |||
1187 | if (check_virt_dev) { | 1184 | if (check_virt_dev) { |
1188 | if (!udev->slot_id || !xhci->devs[udev->slot_id]) { | 1185 | if (!udev->slot_id || !xhci->devs[udev->slot_id]) { |
1189 | printk(KERN_DEBUG "xHCI %s called with unaddressed " | 1186 | printk(KERN_DEBUG "xHCI %s called with unaddressed " |
@@ -1199,6 +1196,9 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev, | |||
1199 | } | 1196 | } |
1200 | } | 1197 | } |
1201 | 1198 | ||
1199 | if (xhci->xhc_state & XHCI_STATE_HALTED) | ||
1200 | return -ENODEV; | ||
1201 | |||
1202 | return 1; | 1202 | return 1; |
1203 | } | 1203 | } |
1204 | 1204 | ||
@@ -3898,7 +3898,7 @@ int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1) | |||
3898 | * Issue an Evaluate Context command to change the Maximum Exit Latency in the | 3898 | * Issue an Evaluate Context command to change the Maximum Exit Latency in the |
3899 | * slot context. If that succeeds, store the new MEL in the xhci_virt_device. | 3899 | * slot context. If that succeeds, store the new MEL in the xhci_virt_device. |
3900 | */ | 3900 | */ |
3901 | static int xhci_change_max_exit_latency(struct xhci_hcd *xhci, | 3901 | static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci, |
3902 | struct usb_device *udev, u16 max_exit_latency) | 3902 | struct usb_device *udev, u16 max_exit_latency) |
3903 | { | 3903 | { |
3904 | struct xhci_virt_device *virt_dev; | 3904 | struct xhci_virt_device *virt_dev; |
@@ -4892,6 +4892,13 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) | |||
4892 | 4892 | ||
4893 | get_quirks(dev, xhci); | 4893 | get_quirks(dev, xhci); |
4894 | 4894 | ||
4895 | /* In xhci controllers which follow xhci 1.0 spec gives a spurious | ||
4896 | * success event after a short transfer. This quirk will ignore such | ||
4897 | * spurious event. | ||
4898 | */ | ||
4899 | if (xhci->hci_version > 0x96) | ||
4900 | xhci->quirks |= XHCI_SPURIOUS_SUCCESS; | ||
4901 | |||
4895 | /* Make sure the HC is halted. */ | 4902 | /* Make sure the HC is halted. */ |
4896 | retval = xhci_halt(xhci); | 4903 | retval = xhci_halt(xhci); |
4897 | if (retval) | 4904 | if (retval) |