aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-15 13:24:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-15 13:24:55 -0500
commite29876723f7cb7728f0d6a674d23f92673e9f112 (patch)
treeea1da8bf77139f6cc6de029988208a7eddaf2002 /drivers/usb/host/pci-quirks.c
parent8c988ae787af4900bec5410658e8a82844185c85 (diff)
parent4d4bac4499e9955521af80198063ef9c2f2bd634 (diff)
Merge tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg KH: "Here's the big pull request for the USB driver tree for 3.20-rc1. Nothing major happening here, just lots of gadget driver updates, new device ids, and a bunch of cleanups. All of these have been in linux-next for a while with no reported issues" * tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (299 commits) usb: musb: fix device hotplug behind hub usb: dwc2: Fix a bug in reading the endpoint directions from reg. staging: emxx_udc: fix the build error usb: Retry port status check on resume to work around RH bugs Revert "usb: Reset USB-3 devices on USB-3 link bounce" uhci-hub: use HUB_CHAR_* usb: kconfig: replace PPC_OF with PPC ehci-pci: disable for Intel MID platforms (update) usb: gadget: Kconfig: use bool instead of boolean usb: musb: blackfin: remove incorrect __exit_p() USB: fix use-after-free bug in usb_hcd_unlink_urb() ehci-pci: disable for Intel MID platforms usb: host: pci_quirks: joing string literals USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd) USB: usbfs: allow URBs to be reaped after disconnection cdc-acm: kill unnecessary messages cdc-acm: add sanity checks usb: phy: phy-generic: Fix USB PHY gpio reset usb: dwc2: fix USB core dependencies usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel() ...
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index ce636466edb7..f9400564cb72 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -603,9 +603,9 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
603 msleep(10); 603 msleep(10);
604 } 604 }
605 if (wait_time <= 0) 605 if (wait_time <= 0)
606 dev_warn(&pdev->dev, "OHCI: BIOS handoff failed" 606 dev_warn(&pdev->dev,
607 " (BIOS bug?) %08x\n", 607 "OHCI: BIOS handoff failed (BIOS bug?) %08x\n",
608 readl(base + OHCI_CONTROL)); 608 readl(base + OHCI_CONTROL));
609 } 609 }
610#endif 610#endif
611 611
@@ -733,8 +733,9 @@ static void ehci_bios_handoff(struct pci_dev *pdev,
733 * and hope nothing goes too wrong 733 * and hope nothing goes too wrong
734 */ 734 */
735 if (try_handoff) 735 if (try_handoff)
736 dev_warn(&pdev->dev, "EHCI: BIOS handoff failed" 736 dev_warn(&pdev->dev,
737 " (BIOS bug?) %08x\n", cap); 737 "EHCI: BIOS handoff failed (BIOS bug?) %08x\n",
738 cap);
738 pci_write_config_byte(pdev, offset + 2, 0); 739 pci_write_config_byte(pdev, offset + 2, 0);
739 } 740 }
740 741
@@ -781,8 +782,9 @@ static void quirk_usb_disable_ehci(struct pci_dev *pdev)
781 case 0: /* Illegal reserved cap, set cap=0 so we exit */ 782 case 0: /* Illegal reserved cap, set cap=0 so we exit */
782 cap = 0; /* then fallthrough... */ 783 cap = 0; /* then fallthrough... */
783 default: 784 default:
784 dev_warn(&pdev->dev, "EHCI: unrecognized capability " 785 dev_warn(&pdev->dev,
785 "%02x\n", cap & 0xff); 786 "EHCI: unrecognized capability %02x\n",
787 cap & 0xff);
786 } 788 }
787 offset = (cap >> 8) & 0xff; 789 offset = (cap >> 8) & 0xff;
788 } 790 }
@@ -893,8 +895,7 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev)
893 */ 895 */
894 if (!IS_ENABLED(CONFIG_USB_XHCI_HCD)) { 896 if (!IS_ENABLED(CONFIG_USB_XHCI_HCD)) {
895 dev_warn(&xhci_pdev->dev, 897 dev_warn(&xhci_pdev->dev,
896 "CONFIG_USB_XHCI_HCD is turned off, " 898 "CONFIG_USB_XHCI_HCD is turned off, defaulting to EHCI.\n");
897 "defaulting to EHCI.\n");
898 dev_warn(&xhci_pdev->dev, 899 dev_warn(&xhci_pdev->dev,
899 "USB 3.0 devices will work at USB 2.0 speeds.\n"); 900 "USB 3.0 devices will work at USB 2.0 speeds.\n");
900 usb_disable_xhci_ports(xhci_pdev); 901 usb_disable_xhci_ports(xhci_pdev);
@@ -919,8 +920,9 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev)
919 920
920 pci_read_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, 921 pci_read_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN,
921 &ports_available); 922 &ports_available);
922 dev_dbg(&xhci_pdev->dev, "USB 3.0 ports that are now enabled " 923 dev_dbg(&xhci_pdev->dev,
923 "under xHCI: 0x%x\n", ports_available); 924 "USB 3.0 ports that are now enabled under xHCI: 0x%x\n",
925 ports_available);
924 926
925 /* Read XUSB2PRM, xHCI USB 2.0 Port Routing Mask Register 927 /* Read XUSB2PRM, xHCI USB 2.0 Port Routing Mask Register
926 * Indicate the USB 2.0 ports to be controlled by the xHCI host. 928 * Indicate the USB 2.0 ports to be controlled by the xHCI host.
@@ -941,8 +943,9 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev)
941 943
942 pci_read_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, 944 pci_read_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
943 &ports_available); 945 &ports_available);
944 dev_dbg(&xhci_pdev->dev, "USB 2.0 ports that are now switched over " 946 dev_dbg(&xhci_pdev->dev,
945 "to xHCI: 0x%x\n", ports_available); 947 "USB 2.0 ports that are now switched over to xHCI: 0x%x\n",
948 ports_available);
946} 949}
947EXPORT_SYMBOL_GPL(usb_enable_intel_xhci_ports); 950EXPORT_SYMBOL_GPL(usb_enable_intel_xhci_ports);
948 951
@@ -1010,8 +1013,9 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
1010 1013
1011 /* Assume a buggy BIOS and take HC ownership anyway */ 1014 /* Assume a buggy BIOS and take HC ownership anyway */
1012 if (timeout) { 1015 if (timeout) {
1013 dev_warn(&pdev->dev, "xHCI BIOS handoff failed" 1016 dev_warn(&pdev->dev,
1014 " (BIOS bug ?) %08x\n", val); 1017 "xHCI BIOS handoff failed (BIOS bug ?) %08x\n",
1018 val);
1015 writel(val & ~XHCI_HC_BIOS_OWNED, base + ext_cap_offset); 1019 writel(val & ~XHCI_HC_BIOS_OWNED, base + ext_cap_offset);
1016 } 1020 }
1017 } 1021 }
@@ -1039,8 +1043,8 @@ hc_init:
1039 if (timeout) { 1043 if (timeout) {
1040 val = readl(op_reg_base + XHCI_STS_OFFSET); 1044 val = readl(op_reg_base + XHCI_STS_OFFSET);
1041 dev_warn(&pdev->dev, 1045 dev_warn(&pdev->dev,
1042 "xHCI HW not ready after 5 sec (HC bug?) " 1046 "xHCI HW not ready after 5 sec (HC bug?) status = 0x%x\n",
1043 "status = 0x%x\n", val); 1047 val);
1044 } 1048 }
1045 1049
1046 /* Send the halt and disable interrupts command */ 1050 /* Send the halt and disable interrupts command */
@@ -1054,8 +1058,8 @@ hc_init:
1054 if (timeout) { 1058 if (timeout) {
1055 val = readl(op_reg_base + XHCI_STS_OFFSET); 1059 val = readl(op_reg_base + XHCI_STS_OFFSET);
1056 dev_warn(&pdev->dev, 1060 dev_warn(&pdev->dev,
1057 "xHCI HW did not halt within %d usec " 1061 "xHCI HW did not halt within %d usec status = 0x%x\n",
1058 "status = 0x%x\n", XHCI_MAX_HALT_USEC, val); 1062 XHCI_MAX_HALT_USEC, val);
1059 } 1063 }
1060 1064
1061 iounmap(base); 1065 iounmap(base);
@@ -1075,8 +1079,8 @@ static void quirk_usb_early_handoff(struct pci_dev *pdev)
1075 return; 1079 return;
1076 1080
1077 if (pci_enable_device(pdev) < 0) { 1081 if (pci_enable_device(pdev) < 0) {
1078 dev_warn(&pdev->dev, "Can't enable PCI device, " 1082 dev_warn(&pdev->dev,
1079 "BIOS handoff failed.\n"); 1083 "Can't enable PCI device, BIOS handoff failed.\n");
1080 return; 1084 return;
1081 } 1085 }
1082 if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) 1086 if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)