From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 298DEC433F5 for ; Wed, 29 Sep 2021 09:52:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 106AB613A5 for ; Wed, 29 Sep 2021 09:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245200AbhI2JyY (ORCPT ); Wed, 29 Sep 2021 05:54:24 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:43948 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S233563AbhI2JyW (ORCPT ); Wed, 29 Sep 2021 05:54:22 -0400 X-UUID: 547a0fc1cb1546838bbdbd583c31fdfe-20210929 X-UUID: 547a0fc1cb1546838bbdbd583c31fdfe-20210929 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 48417275; Wed, 29 Sep 2021 17:52:38 +0800 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 29 Sep 2021 17:52:37 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 29 Sep 2021 17:52:37 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 29 Sep 2021 17:52:37 +0800 Message-ID: <4c2ad5e4a9747c59a55d92a8fa0c95df5821188f.camel@mediatek.com> Subject: Re: [PATCH] r8152: stop submitting rx for -EPROTO From: Jason-ch Chen To: Hayes Wang , "matthias.bgg@gmail.com" CC: "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "Project_Global_Chrome_Upstream_Group@mediatek.com" , "hsinyi@google.com" , nic_swsd Date: Wed, 29 Sep 2021 17:52:37 +0800 In-Reply-To: References: <20210929051812.3107-1-jason-ch.chen@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 2021-09-29 at 08:14 +0000, Hayes Wang wrote: > Jason-ch Chen > > Sent: Wednesday, September 29, 2021 1:18 PM > > [...] > > When unplugging RTL8152 Fast Ethernet Adapter which is plugged > > into an USB HUB, the driver would get -EPROTO for bulk transfer. > > There is a high probability to get the soft/hard lockup > > information if the driver continues to submit Rx before the HUB > > completes the detection of all hub ports and issue the > > disconnect event. > > I don't think it is a good idea. > For the other situations which return the same error code, you would > stop the rx, too. > However, the rx may re-work after being resubmitted for the other > cases. > > Best Regards, > Hayes > Hi Hayes, Sometimes Rx submits rapidly and the USB kernel driver of opensource cannot receive any disconnect event due to CPU heavy loading, which finally causes a system crash. Do you have any suggestions to modify the r8152 driver to prevent this situation happened? Regards, Jason