Thread (14 messages) flat view 14 messages, 6 authors, 2013-08-09

Re: [PATCH v3 4/4] USBNET: ax88179_178a: enable tso if usb host supports sg dma

From: Grant Grundler <hidden>
Date: 2013-08-06 17:09:34

On Tue, Aug 6, 2013 at 5:22 AM, Eric Dumazet [off-list ref] wrote:
...
quoted
@@ -1310,6 +1318,10 @@ static int ax88179_reset(struct usbnet *dev)

      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;
+     }
My concern with setting TSO on reset() is the following :

Admin can disable TSO with

ethtool -K ethX tso off


Then, one hour later, or one month later, a reset happens, and this code
magically re-enables TSO

So, I really think this part should be removed from your patch.
Following that logic, shouldn't all the features/hw_features settings
be removed from reset code path?

hw_features shouldn't change since power up.

FWIW, I do agree with you.

I'll note that any "hiccup" in the USB side that causes the device to
get dropped and re-probed will cause the same symptom. There is
nothing the driver can do about it in this case. Perhaps add some udev
rules to preserve ethtool settings the same way I've seen udev rules
to record MAC address to enumerate devices (eth0, eth1, etc.)

cheers,
grant
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help