Skip to content

Commit

Permalink
Merge tag 'usb-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are 4 USB fixes for your current tree.

  Two of them are reverts to hopefully resolve the nasty XHCI
  regressions we have been having on some types of devices.  The other
  two are quirks for some Logitech video devices"

* tag 'usb-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  Revert "USBNET: ax88179_178a: enable tso if usb host supports sg dma"
  Revert "xhci 1.0: Limit arbitrarily-aligned scatter gather."
  usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests
  usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e
  • Loading branch information
Linus Torvalds committed Mar 10, 2014
2 parents a491ce7 + 469d417 commit cf8bf7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
8 changes: 0 additions & 8 deletions drivers/net/usb/ax88179_178a.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,20 +1029,12 @@ static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)
dev->mii.phy_id = 0x03;
dev->mii.supports_gmii = 1;

if (usb_device_no_sg_constraint(dev->udev))
dev->can_dma_sg = 1;

dev->net->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_RXCSUM;

dev->net->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_RXCSUM;

if (dev->can_dma_sg) {
dev->net->features |= NETIF_F_SG | NETIF_F_TSO;
dev->net->hw_features |= NETIF_F_SG | NETIF_F_TSO;
}

/* Enable checksum offload */
*tmp = AX_RXCOE_IP | AX_RXCOE_TCP | AX_RXCOE_UDP |
AX_RXCOE_TCPV6 | AX_RXCOE_UDPV6;
Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/core/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ int usb_get_configuration(struct usb_device *dev)
result = -ENOMEM;
goto err;
}

if (dev->quirks & USB_QUIRK_DELAY_INIT)
msleep(100);

result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,
bigbuffer, length);
if (result < 0) {
Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/core/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Microsoft LifeCam-VX700 v2.0 */
{ USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },

/* Logitech HD Pro Webcams C920 and C930e */
{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
{ USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },

/* Logitech Quickcam Fusion */
{ USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME },

Expand Down
14 changes: 3 additions & 11 deletions drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -4733,6 +4733,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
/* Accept arbitrarily long scatter-gather lists */
hcd->self.sg_tablesize = ~0;

/* support to build packet from discontinuous buffers */
hcd->self.no_sg_constraint = 1;

/* XHCI controllers don't stop the ep queue on short packets :| */
hcd->self.no_stop_on_short = 1;

Expand All @@ -4757,14 +4760,6 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
/* xHCI private pointer was set in xhci_pci_probe for the second
* registered roothub.
*/
xhci = hcd_to_xhci(hcd);
/*
* Support arbitrarily aligned sg-list entries on hosts without
* TD fragment rules (which are currently unsupported).
*/
if (xhci->hci_version < 0x100)
hcd->self.no_sg_constraint = 1;

return 0;
}

Expand Down Expand Up @@ -4793,9 +4788,6 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
if (xhci->hci_version > 0x96)
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;

if (xhci->hci_version < 0x100)
hcd->self.no_sg_constraint = 1;

/* Make sure the HC is halted. */
retval = xhci_halt(xhci);
if (retval)
Expand Down

0 comments on commit cf8bf7c

Please sign in to comment.