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

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

From: Ming Lei <hidden>
Date: 2013-08-07 00:41:54

On Wed, Aug 7, 2013 at 1:09 AM, Grant Grundler [off-list ref] wrote:
On Tue, Aug 6, 2013 at 5:22 AM, Eric Dumazet [off-list ref] wrote:
...
quoted
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?
This patch won't touch other settings because that isn't related with
this patch.
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
I am afraid that PCI network devices' setting still won't survive unbound&
re-probed, will they?
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.)
Some usbnet devices may have random MAC address assigned in every
probe().


Thanks,
--
Ming Lei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help