Re: [PATCH v3] net: usb: ax88179_178a: avoid failed operations when device is disconnected

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

 



Hi Oliver,

> this is much better.
>> ...
> This is problematic. ndo_stop() is not limited to disconnection.
> It is also used whenever an interface transitions from up to down.
>> ...
>
> On a general note, you are going for a belt and suspenders approach.
> It seems to me that you have two options.
> 1. Do as Alan suggested and ignore ENODEV. You'd be acknowledging that
> these devices are hotpluggable and therefore -ENODEV is not an error
> 2. Use only a flag. But if you do that, you are setting it in the wrong
> place. It should be set in usbnet_disconnect()
Thank you for you help, I will do what you say.
I would like to try 2 first so that it only affects the unbind operation.
If I find any problem, I will try 1.

> O and, well, this is a very mior issue, but you've introduced a memory
> ordering issue. You ought to use smp_wmb() after setting the flag and
> smp_rmb() before reading it.
Thank you again, I'll keep that in mind

Best regards
José Ignacio





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

  Powered by Linux