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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 7, 2013 at 1:09 AM, Grant Grundler <grundler@xxxxxxxxxx> wrote:
> On Tue, Aug 6, 2013 at 5:22 AM, Eric Dumazet <eric.dumazet@xxxxxxxxx> 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 linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux