From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755572AbbG1MbU (ORCPT ); Tue, 28 Jul 2015 08:31:20 -0400 Received: from rtits2.realtek.com ([60.250.210.242]:58257 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751874AbbG1MbS (ORCPT ); Tue, 28 Jul 2015 08:31:18 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.54 with qID t6SCV9Qm005180, This message is accepted by code: ctloc85258 From: Hayes Wang To: Oliver Neukum CC: "netdev@vger.kernel.org" , nic_swsd , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: RE: [PATCH net v2 2/2] r8152: reset device when tx timeout Thread-Topic: [PATCH net v2 2/2] r8152: reset device when tx timeout Thread-Index: AQHQyS4AWs20zW5jRUuoEFJdQdKEO53wRVKAgACJJdA= Date: Tue, 28 Jul 2015 12:31:09 +0000 Message-ID: <0835B3720019904CB8F7AA43166CEEB2F3C538@RTITMBSV03.realtek.com.tw> References: <1394712342-15778-156-Taiwan-albertk@realtek.com> <1394712342-15778-159-Taiwan-albertk@realtek.com> <1394712342-15778-161-Taiwan-albertk@realtek.com> <1438085645.1787.4.camel@suse.com> In-Reply-To: <1438085645.1787.4.camel@suse.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.71.143] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t6SCVOXU017604 Oliver Neukum [mailto:oneukum@suse.com] > Sent: Tuesday, July 28, 2015 8:14 PM [...] > > 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? Best Regards, Hayes ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥