RE: [PATCH net v2 2/2] r8152: reset device when tx timeout

Hayes Wang
2015-07-29T11:09:43Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1048 bytes --]

Oliver Neukum [mailto:oneukum@suse.com]
> Sent: Wednesday, July 29, 2015 3:22 PM
[...]
> Now, I think I got the reason for the confusion.
>
> You are using cancel_delayed_work(&tp->schedule); after you queue a reset.
> Therefore the order in which the work and the reset will be executed is undefined.
> Usually the scheduled work will be canceled, but not always.

Actually, the order is not important for me. There are some protections to avoid
the work and the reset run at the same time. Besides, the reset could be run before
or after the work. I cancel the work because I want to let the reset start as early as
possible. If the work runs before the reset, the reset wouldn't start until the work is
finished.

> That is not good.

I think I had better to remove cancel_delay_work(), because it makes confusion.
And, it doesn't seem to be necessary. Thanks.

Best Regards,
Hayes

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥