f007db1
From 1b4b61e873240faea96995cd87cfbe7bc51a2b39 Mon Sep 17 00:00:00 2001
f007db1
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
f007db1
Date: Tue, 04 Mar 2014 22:23:47 +0000
f007db1
Subject: Revert "USBNET: ax88179_178a: enable tso if usb host supports sg dma"
f007db1
f007db1
This reverts commit 3804fad45411b48233b48003e33a78f290d227c8.
f007db1
f007db1
The xHCI driver does not implement TD fragment rules yet, so we can't
f007db1
properly support arbitrary-length scatter gather.  USB storage seems
f007db1
immune to these issues, and only the ASIX host seems to hit them, so
f007db1
disable scatter gather.
f007db1
f007db1
Note that we can't simply work around this by clearing the
f007db1
no_sg_constraint flag for 1.0 xHCI hosts that need TD fragments (and
f007db1
thus would cause the ASIX chipsets to drop packets).  We tried that with
f007db1
commit 247bf557273d "xhci 1.0: Limit arbitrarily-aligned scatter
f007db1
gather."  We found that commit breaks USB 3.0 mass storage devices.  It
f007db1
needs to get reverted, and this commit needs to get reverted before it
f007db1
to avoid dropped packets with the ASIX ethernet adapters.
f007db1
f007db1
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
f007db1
Cc: stable@vger.kernel.org # 3.12
f007db1
---
f007db1
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
f007db1
index 955df81..42085e6 100644
f007db1
--- a/drivers/net/usb/ax88179_178a.c
f007db1
+++ b/drivers/net/usb/ax88179_178a.c
f007db1
@@ -1029,20 +1029,12 @@ static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)
f007db1
 	dev->mii.phy_id = 0x03;
f007db1
 	dev->mii.supports_gmii = 1;
f007db1
 
f007db1
-	if (usb_device_no_sg_constraint(dev->udev))
f007db1
-		dev->can_dma_sg = 1;
f007db1
-
f007db1
 	dev->net->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
f007db1
 			      NETIF_F_RXCSUM;
f007db1
 
f007db1
 	dev->net->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
f007db1
 				 NETIF_F_RXCSUM;
f007db1
 
f007db1
-	if (dev->can_dma_sg) {
f007db1
-		dev->net->features |= NETIF_F_SG | NETIF_F_TSO;
f007db1
-		dev->net->hw_features |= NETIF_F_SG | NETIF_F_TSO;
f007db1
-	}
f007db1
-
f007db1
 	/* Enable checksum offload */
f007db1
 	*tmp = AX_RXCOE_IP | AX_RXCOE_TCP | AX_RXCOE_UDP |
f007db1
 	       AX_RXCOE_TCPV6 | AX_RXCOE_UDPV6;
f007db1
--
f007db1
cgit v0.9.2