diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-25 18:34:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-25 18:34:17 -0400 |
commit | 655db7980596f0ad4f15f8f4c51beb3e705762de (patch) | |
tree | 246124b86e0444a22cc5811ff45720eca6895484 /drivers/usb | |
parent | e064852072c47b69f62325c6b7fa4a58332655bd (diff) | |
parent | 80fab3b244a22e0ca539d2439bdda50e81e5666f (diff) |
Merge tag 'for-usb-next-2012-09-25' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
xHCI bug fixes for 3.7
Hi Greg,
Here's three small bug fixes for 3.7. They fix a NULL pointer deference
and lost USB device unplug events, as well as making sure the xHCI
driver doesn't prevent system suspend.
Sarah Sharp
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 9bfd4ca1153c..8345d7c23061 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -103,6 +103,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
103 | * PPT chipsets. | 103 | * PPT chipsets. |
104 | */ | 104 | */ |
105 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; | 105 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
106 | xhci->quirks |= XHCI_AVOID_BEI; | ||
106 | } | 107 | } |
107 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && | 108 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && |
108 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { | 109 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index f270e70559bd..c6ebb176dc4f 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -3672,7 +3672,9 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3672 | } else { | 3672 | } else { |
3673 | td->last_trb = ep_ring->enqueue; | 3673 | td->last_trb = ep_ring->enqueue; |
3674 | field |= TRB_IOC; | 3674 | field |= TRB_IOC; |
3675 | if (xhci->hci_version == 0x100) { | 3675 | if (xhci->hci_version == 0x100 && |
3676 | !(xhci->quirks & | ||
3677 | XHCI_AVOID_BEI)) { | ||
3676 | /* Set BEI bit except for the last td */ | 3678 | /* Set BEI bit except for the last td */ |
3677 | if (i < num_tds - 1) | 3679 | if (i < num_tds - 1) |
3678 | field |= TRB_BEI; | 3680 | field |= TRB_BEI; |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index a4b0ce13fa0c..8d7fcbbe6ade 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -471,6 +471,8 @@ static bool compliance_mode_recovery_timer_quirk_check(void) | |||
471 | 471 | ||
472 | dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME); | 472 | dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME); |
473 | dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR); | 473 | dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR); |
474 | if (!dmi_product_name || !dmi_sys_vendor) | ||
475 | return false; | ||
474 | 476 | ||
475 | if (!(strstr(dmi_sys_vendor, "Hewlett-Packard"))) | 477 | if (!(strstr(dmi_sys_vendor, "Hewlett-Packard"))) |
476 | return false; | 478 | return false; |
@@ -888,7 +890,7 @@ int xhci_suspend(struct xhci_hcd *xhci) | |||
888 | command &= ~CMD_RUN; | 890 | command &= ~CMD_RUN; |
889 | xhci_writel(xhci, command, &xhci->op_regs->command); | 891 | xhci_writel(xhci, command, &xhci->op_regs->command); |
890 | if (handshake(xhci, &xhci->op_regs->status, | 892 | if (handshake(xhci, &xhci->op_regs->status, |
891 | STS_HALT, STS_HALT, 100*100)) { | 893 | STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC)) { |
892 | xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); | 894 | xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); |
893 | spin_unlock_irq(&xhci->lock); | 895 | spin_unlock_irq(&xhci->lock); |
894 | return -ETIMEDOUT; | 896 | return -ETIMEDOUT; |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index e44e2d3c83b0..53df4e70ca07 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1511,6 +1511,7 @@ struct xhci_hcd { | |||
1511 | #define XHCI_INTEL_HOST (1 << 12) | 1511 | #define XHCI_INTEL_HOST (1 << 12) |
1512 | #define XHCI_SPURIOUS_REBOOT (1 << 13) | 1512 | #define XHCI_SPURIOUS_REBOOT (1 << 13) |
1513 | #define XHCI_COMP_MODE_QUIRK (1 << 14) | 1513 | #define XHCI_COMP_MODE_QUIRK (1 << 14) |
1514 | #define XHCI_AVOID_BEI (1 << 15) | ||
1514 | unsigned int num_active_eps; | 1515 | unsigned int num_active_eps; |
1515 | unsigned int limit_active_eps; | 1516 | unsigned int limit_active_eps; |
1516 | /* There are two roothubs to keep track of bus suspend info for */ | 1517 | /* There are two roothubs to keep track of bus suspend info for */ |