usbnet: do not pretend to support SG/TSO
authorEric Dumazet <edumazet@google.com>
Wed, 24 Jul 2013 00:15:54 +0000 (17:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Aug 2013 22:38:44 +0000 (15:38 -0700)
commitd8c47c3fdc007ff3efecca98881e8e91eb088d70
tree1c481a8e693b9440e8c84e0abfb66481d4b6a4ca
parent8d50892d6f963cd24104d7f821fb08b903519a6b
usbnet: do not pretend to support SG/TSO

[ Upstream commit 20f0170377264e8449b6987041f0bcc4d746d3ed ]

usbnet doesn't support yet SG, so drivers should not advertise SG or TSO
capabilities, as they allow TCP stack to build large TSO packets that
need to be linearized and might use order-5 pages.

This adds an extra copy overhead and possible allocation failures.

Current code ignore skb_linearize() return code so crashes are even
possible.

Best is to not pretend SG/TSO is supported, and add this again when/if
usbnet really supports SG for devices who could get a performance gain.

Based on a prior patch from Freddy Xin <freddy@asix.com.tw>

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/smsc75xx.c