[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANEJEGvbS=o-942tFJTDzpNvgaB=KUZcBwzJCU-7OHaAF-aQFQ@mail.gmail.com>
Date: Tue, 6 Aug 2013 10:09:34 -0700
From: Grant Grundler <grundler@...gle.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Ming Lei <ming.lei@...onical.com>,
"David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Oliver Neukum <oneukum@...e.de>,
Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
netdev <netdev@...r.kernel.org>, linux-usb@...r.kernel.org,
Ben Hutchings <bhutchings@...arflare.com>,
Alan Stern <stern@...land.harvard.edu>,
Freddy Xin <freddy@...x.com.tw>
Subject: Re: [PATCH v3 4/4] USBNET: ax88179_178a: enable tso if usb host
supports sg dma
On Tue, Aug 6, 2013 at 5:22 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
...
>> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists