Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp489402pxb; Wed, 29 Sep 2021 03:49:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRk+qD7nFiNgF8O7tQqS3NL8d+etBU5cX1XlBXZ4mW91JD9Lq4xB8AFUgPtperlCqHAAFc X-Received: by 2002:aa7:d1d1:: with SMTP id g17mr2928212edp.263.1632912545294; Wed, 29 Sep 2021 03:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632912545; cv=none; d=google.com; s=arc-20160816; b=GibuQASoZ/nCDIppD33XzCNDnDz3ZSzO15+87untW2adtc8FwMViYq+Rg2zLmz2IY3 2Zm9T0i50CgFvYKpGPI0cjF5KMr5SVKQ4sdEUdFtld4WeMkF9O9lKHkbcJQCViyB/A+w 0KfEceBwCUndWI58i6c5FIWbgOheRt81+7ny6vcDu7oQbs384T7HPaNUz+42F3Xookjl Jae+dhBko+vrrxiv3X/ILzIuVqS+GhCeA/yz24Mb2aoh7drOtRDekIQjTwg7qieWo3HL DDJNf1HxeMMtPnqLxV8GUupJbxaa/aqLHcwB+6KKOsAa+XdHi+Ohk+wRavJRYQHWoe8J BIng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=sq45dXWcOUAzNbjRvhL3R/biuAePk1raomyMBLM4rog=; b=uXTUgv3K0oC/5PHziwRDJ2lWd1IxV/m+8ZRZrPPo92cc+uwMrH5l7+3YQoHzgTfRGb l9vbmBfOkk1gRck8K9FoNxT5aAY1aqkzZMLDE61y+7z48WFBAKCLljxkKsjtNNPvbctG MfV73lt917vkvOHxhAAl1w0MVTQ1U6vE9d6GOT/oupf8XOlsqu41vQGEmDSR/odraXEG qs/1FfEMznGMROg5nwQWQvZGYNfqfbSeKUrxlL7kkaZBhVKu/w6iNZktp0ROCE4yKDoI KFh+NA1khBv8Jwu9H+xz4eJ8b4F2UEianOmTFmkvVWFndfcR6QGdEUuEuhiYP3N6Uqce m5pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si2012111ejc.522.2021.09.29.03.48.40; Wed, 29 Sep 2021 03:49:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245197AbhI2JyX (ORCPT + 99 others); Wed, 29 Sep 2021 05:54:23 -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: linux-kernel@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