Thread (21 messages) 21 messages, 3 authors, 2015-07-30

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

From: Oliver Neukum <oneukum@suse.com>
Date: 2015-07-28 12:59:50
Also in: lkml

On Tue, 2015-07-28 at 12:31 +0000, Hayes Wang wrote:
Oliver Neukum [mailto:oneukum@suse.com]
quoted
Sent: Tuesday, July 28, 2015 8:14 PM
[...]
quoted
quoted
 static void rtl8152_tx_timeout(struct net_device *netdev)  {
        struct r8152 *tp = netdev_priv(netdev);
-       int i;

        netif_warn(tp, tx_err, netdev, "Tx timeout\n");
-       for (i = 0; i < RTL8152_MAX_TX; i++)
-               usb_unlink_urb(tp->tx_info[i].urb);
+
+       usb_queue_reset_device(tp->intf);
+       cancel_delayed_work(&tp->schedule);
Sorry to bother you again, but this looks wrong.
You want to cancel first. There is no point in running any work before the reset is
done. It will undo any progress anyway.
Excuse me. Do you mean I don't need cancel the other work because it wouldn't be
run before the reset is finished?
No, whatever the other work will do, the reset will undo.

	Regards
		Oliver
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help