Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45196cee authored by Linus Torvalds's avatar Linus Torvalds
Browse files


USB bugfixes for 3.3-rc4

A number of new device ids, and a cleanup/fix for some of the option
device ids that shouldn't have been added in the first place.

There's also a few USB 3 fixes for problems that people have reported,
and a usb-storage bugfix to round it out.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

* tag 'usb-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: Added Kamstrup VID/PIDs to cp210x serial driver.
  USB: Serial: ti_usb_3410_5052: Add Abbot Diabetes Care cable id
  usb-storage: fix freezing of the scanning thread
  xhci: Fix encoding for HS bulk/control NAK rate.
  USB: Set hub depth after USB3 hub reset
  USB: Fix handoff when BIOS disables host PCI device.
  USB: option: cleanup zte 3g-dongle's pid in option.c
  USB: Don't fail USB3 probe on missing legacy PCI IRQ.
  xhci: Fix oops caused by more USB2 ports than USB3 ports.
  USB: Remove duplicate USB 3.0 hub feature #defines.
parents e2d4370b c6c1e449
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -187,7 +187,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
		return -ENODEV;
		return -ENODEV;
	dev->current_state = PCI_D0;
	dev->current_state = PCI_D0;


	if (!dev->irq) {
	/* The xHCI driver supports MSI and MSI-X,
	 * so don't fail if the BIOS doesn't provide a legacy IRQ.
	 */
	if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) {
		dev_err(&dev->dev,
		dev_err(&dev->dev,
			"Found HC with no IRQ.  Check BIOS/PCI %s setup!\n",
			"Found HC with no IRQ.  Check BIOS/PCI %s setup!\n",
			pci_name(dev));
			pci_name(dev));
+4 −2
Original line number Original line Diff line number Diff line
@@ -2447,8 +2447,10 @@ int usb_add_hcd(struct usb_hcd *hcd,
			&& device_can_wakeup(&hcd->self.root_hub->dev))
			&& device_can_wakeup(&hcd->self.root_hub->dev))
		dev_dbg(hcd->self.controller, "supports USB remote wakeup\n");
		dev_dbg(hcd->self.controller, "supports USB remote wakeup\n");


	/* enable irqs just before we start the controller */
	/* enable irqs just before we start the controller,
	if (usb_hcd_is_primary_hcd(hcd)) {
	 * if the BIOS provides legacy PCI irqs.
	 */
	if (usb_hcd_is_primary_hcd(hcd) && irqnum) {
		retval = usb_hcd_request_irqs(hcd, irqnum, irqflags);
		retval = usb_hcd_request_irqs(hcd, irqnum, irqflags);
		if (retval)
		if (retval)
			goto err_request_irq;
			goto err_request_irq;
+17 −13
Original line number Original line Diff line number Diff line
@@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
	if (type == HUB_INIT3)
	if (type == HUB_INIT3)
		goto init3;
		goto init3;


	/* After a resume, port power should still be on.
	/* The superspeed hub except for root hub has to use Hub Depth
	 * value as an offset into the route string to locate the bits
	 * it uses to determine the downstream port number. So hub driver
	 * should send a set hub depth request to superspeed hub after
	 * the superspeed hub is set configuration in initialization or
	 * reset procedure.
	 *
	 * After a resume, port power should still be on.
	 * For any other type of activation, turn it on.
	 * For any other type of activation, turn it on.
	 */
	 */
	if (type != HUB_RESUME) {
	if (type != HUB_RESUME) {
		if (hdev->parent && hub_is_superspeed(hdev)) {
			ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
					HUB_SET_DEPTH, USB_RT_HUB,
					hdev->level - 1, 0, NULL, 0,
					USB_CTRL_SET_TIMEOUT);
			if (ret < 0)
				dev_err(hub->intfdev,
						"set hub depth failed\n");
		}


		/* Speed up system boot by using a delayed_work for the
		/* Speed up system boot by using a delayed_work for the
		 * hub's initial power-up delays.  This is pretty awkward
		 * hub's initial power-up delays.  This is pretty awkward
@@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub,
		goto fail;
		goto fail;
	}
	}


	if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) {
		ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
				HUB_SET_DEPTH, USB_RT_HUB,
				hdev->level - 1, 0, NULL, 0,
				USB_CTRL_SET_TIMEOUT);

		if (ret < 0) {
			message = "can't set hub depth";
			goto fail;
		}
	}

	/* Request the entire hub descriptor.
	/* Request the entire hub descriptor.
	 * hub->descriptor can handle USB_MAXCHILDREN ports,
	 * hub->descriptor can handle USB_MAXCHILDREN ports,
	 * but the hub can/will return fewer bytes here.
	 * but the hub can/will return fewer bytes here.
+11 −0
Original line number Original line Diff line number Diff line
@@ -872,7 +872,17 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
	 */
	 */
	if (pdev->vendor == 0x184e)	/* vendor Netlogic */
	if (pdev->vendor == 0x184e)	/* vendor Netlogic */
		return;
		return;
	if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
			pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
			pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&
			pdev->class != PCI_CLASS_SERIAL_USB_XHCI)
		return;


	if (pci_enable_device(pdev) < 0) {
		dev_warn(&pdev->dev, "Can't enable PCI device, "
				"BIOS handoff failed.\n");
		return;
	}
	if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
	if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
		quirk_usb_handoff_uhci(pdev);
		quirk_usb_handoff_uhci(pdev);
	else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
	else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
@@ -881,5 +891,6 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
		quirk_usb_disable_ehci(pdev);
		quirk_usb_disable_ehci(pdev);
	else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
	else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
		quirk_usb_handoff_xhci(pdev);
		quirk_usb_handoff_xhci(pdev);
	pci_disable_device(pdev);
}
}
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
+1 −1
Original line number Original line Diff line number Diff line
@@ -93,7 +93,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
	 */
	 */
	memset(port_removable, 0, sizeof(port_removable));
	memset(port_removable, 0, sizeof(port_removable));
	for (i = 0; i < ports; i++) {
	for (i = 0; i < ports; i++) {
		portsc = xhci_readl(xhci, xhci->usb3_ports[i]);
		portsc = xhci_readl(xhci, xhci->usb2_ports[i]);
		/* If a device is removable, PORTSC reports a 0, same as in the
		/* If a device is removable, PORTSC reports a 0, same as in the
		 * hub descriptor DeviceRemovable bits.
		 * hub descriptor DeviceRemovable bits.
		 */
		 */
Loading