lkml.org 
[lkml]   [2015]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net v2 2/2] r8152: reset device when tx timeout
From
Date
On Tue, 2015-07-28 at 20:08 +0800, Hayes Wang wrote:
> 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.

Regards
Oliver




\
 
 \ /
  Last update: 2015-07-28 14:41    [W:0.066 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site