[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVOOQZ8mtDXtCE669vEo=jA56g-ADzTZkGLLupZ5D4Z==A@mail.gmail.com>
Date: Wed, 7 Aug 2013 08:41:51 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Grant Grundler <grundler@...gle.com>
Cc: Eric Dumazet <eric.dumazet@...il.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 Wed, Aug 7, 2013 at 1:09 AM, Grant Grundler <grundler@...gle.com> wrote:
> 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?
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
--
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