mirror of https://gitee.com/openkylin/linux.git
xhci: Bug fixes, now with more tags!
Hi Greg, Here's five bug fixes for 3.12. The three patches are marked for stable. Two fix NULL pointer dereferences. The third marked for stable suppresses some serious log spam from unnecessary xHCI driver warnings, whenever an isochronous short packet happens on an xHCI 1.0 host. The other two patches fix build warnings. Sarah Sharp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJR8UAgAAoJEBMGWMLi1Gc5bP8P/jqHycOH8vJTIY/oEO+e12kv G8XEaKdssN5ob8+VvQU7ngkC/tMTsLiZu63n5nOQOSsmF6Qhw+0Zvp4v0mp+T77T Z7ZrmMYA6h0YcJN2rEQMJwIn5RiUbGSs0rwhvodGMuVV4q9l2Kqy8E0OOL8bDwvI 6gRamRASFJeMkjNxjgWm7e5Ke+OnvS7AsmIYxVLUMPwDLsDZQQ9UcxbJuAOcfjq/ qi4HLmDVT/+Bea584j0TE26VG7RJPyo1/IkkLmfhZcH+usX39+0nh70iqPHhES1H I2CtX23m1YdsMakRMMq8RBBOyri3ngLb35SDoDYNgG/i6S1/hxTMTBHC1015QRax 4aNx872gm5gUG+bVfSbpNvut31ox4kKMEzqqFz01AjKvq/w5W/UBSHkfDSjNF3C7 DWmUgFAAUbWHpXo3k4WvAwYWapZbTPlk0t+dfQqtbKil41mz5WZOfpg0DVZhcvzQ FcP2kWuGvXYvQ5FukeHHeoAEBfvGUvdpU8CebcWBM4y7h8yrMxpQ3+7dGYm9koBj MYOuXP9gon6FRdz4uo0HvaM8Bq9rszkm8AH2OwxJQthrG6kK8OZALgz5iU3C6rLw /R3XgAzp9T6CzqKkg8o1vFcCeb1jI+1kXaGtrF1Aso3hRfLgf1G3+KNkv8uVasq+ JNR+6yUtM+LsWyNXWuMz =BrdB -----END PGP SIGNATURE----- Merge tag 'for-usb-linus-2013-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus Sarah writes: xhci: Bug fixes, now with more tags! Hi Greg, Here's five bug fixes for 3.12. The three patches are marked for stable. Two fix NULL pointer dereferences. The third marked for stable suppresses some serious log spam from unnecessary xHCI driver warnings, whenever an isochronous short packet happens on an xHCI 1.0 host. The other two patches fix build warnings. Sarah Sharp
This commit is contained in:
commit
00c5ec287a
|
@ -13,6 +13,7 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev);
|
|||
void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
|
||||
void sb800_prefetch(struct device *dev, int on);
|
||||
#else
|
||||
struct pci_dev;
|
||||
static inline void usb_amd_quirk_pll_disable(void) {}
|
||||
static inline void usb_amd_quirk_pll_enable(void) {}
|
||||
static inline void usb_amd_dev_put(void) {}
|
||||
|
|
|
@ -93,7 +93,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
|||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) {
|
||||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
|
||||
xhci->limit_active_eps = 64;
|
||||
xhci->quirks |= XHCI_SW_BW_CHECKING;
|
||||
|
|
|
@ -434,7 +434,7 @@ static void ring_doorbell_for_active_rings(struct xhci_hcd *xhci,
|
|||
|
||||
/* A ring has pending URBs if its TD list is not empty */
|
||||
if (!(ep->ep_state & EP_HAS_STREAMS)) {
|
||||
if (!(list_empty(&ep->ring->td_list)))
|
||||
if (ep->ring && !(list_empty(&ep->ring->td_list)))
|
||||
xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
|
|||
return;
|
||||
}
|
||||
|
||||
static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
|
||||
static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1181,9 +1181,6 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
|
|||
}
|
||||
|
||||
xhci = hcd_to_xhci(hcd);
|
||||
if (xhci->xhc_state & XHCI_STATE_HALTED)
|
||||
return -ENODEV;
|
||||
|
||||
if (check_virt_dev) {
|
||||
if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
|
||||
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,
|
|||
}
|
||||
}
|
||||
|
||||
if (xhci->xhc_state & XHCI_STATE_HALTED)
|
||||
return -ENODEV;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3898,7 +3898,7 @@ int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1)
|
|||
* Issue an Evaluate Context command to change the Maximum Exit Latency in the
|
||||
* slot context. If that succeeds, store the new MEL in the xhci_virt_device.
|
||||
*/
|
||||
static int xhci_change_max_exit_latency(struct xhci_hcd *xhci,
|
||||
static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci,
|
||||
struct usb_device *udev, u16 max_exit_latency)
|
||||
{
|
||||
struct xhci_virt_device *virt_dev;
|
||||
|
@ -4892,6 +4892,13 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
|||
|
||||
get_quirks(dev, xhci);
|
||||
|
||||
/* In xhci controllers which follow xhci 1.0 spec gives a spurious
|
||||
* success event after a short transfer. This quirk will ignore such
|
||||
* spurious event.
|
||||
*/
|
||||
if (xhci->hci_version > 0x96)
|
||||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
|
||||
/* Make sure the HC is halted. */
|
||||
retval = xhci_halt(xhci);
|
||||
if (retval)
|
||||
|
|
Loading…
Reference in New Issue