diff options
| -rw-r--r-- | drivers/usb/host/pci-quirks.h | 1 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-pci.c | 1 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-ring.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/xhci.c | 17 |
4 files changed, 14 insertions, 7 deletions
diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h index 4b8a2092432f..978c849f9c9a 100644 --- a/drivers/usb/host/pci-quirks.h +++ b/drivers/usb/host/pci-quirks.h | |||
| @@ -13,6 +13,7 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); | |||
| 13 | void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); | 13 | void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); |
| 14 | void sb800_prefetch(struct device *dev, int on); | 14 | void sb800_prefetch(struct device *dev, int on); |
| 15 | #else | 15 | #else |
| 16 | struct pci_dev; | ||
| 16 | static inline void usb_amd_quirk_pll_disable(void) {} | 17 | static inline void usb_amd_quirk_pll_disable(void) {} |
| 17 | static inline void usb_amd_quirk_pll_enable(void) {} | 18 | static inline void usb_amd_quirk_pll_enable(void) {} |
| 18 | static inline void usb_amd_dev_put(void) {} | 19 | static inline void usb_amd_dev_put(void) {} |
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index cc24e39b97d5..f00cb203faea 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
| @@ -93,7 +93,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
| 93 | } | 93 | } |
| 94 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | 94 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && |
| 95 | pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) { | 95 | pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) { |
| 96 | xhci->quirks |= XHCI_SPURIOUS_SUCCESS; | ||
| 97 | xhci->quirks |= XHCI_EP_LIMIT_QUIRK; | 96 | xhci->quirks |= XHCI_EP_LIMIT_QUIRK; |
| 98 | xhci->limit_active_eps = 64; | 97 | xhci->limit_active_eps = 64; |
| 99 | xhci->quirks |= XHCI_SW_BW_CHECKING; | 98 | xhci->quirks |= XHCI_SW_BW_CHECKING; |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 1e57eafa6910..5b08cd85f8e7 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
| @@ -434,7 +434,7 @@ static void ring_doorbell_for_active_rings(struct xhci_hcd *xhci, | |||
| 434 | 434 | ||
| 435 | /* A ring has pending URBs if its TD list is not empty */ | 435 | /* A ring has pending URBs if its TD list is not empty */ |
| 436 | if (!(ep->ep_state & EP_HAS_STREAMS)) { | 436 | if (!(ep->ep_state & EP_HAS_STREAMS)) { |
| 437 | if (!(list_empty(&ep->ring->td_list))) | 437 | if (ep->ring && !(list_empty(&ep->ring->td_list))) |
| 438 | xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); | 438 | xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); |
| 439 | return; | 439 | return; |
| 440 | } | 440 | } |
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) |
