linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason-ch Chen <jason-ch.chen@mediatek.com>
To: <matthias.bgg@gmail.com>, <hayeswang@realtek.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>, Jason-ch Chen <jason-ch.chen@mediatek.com>
Subject: [PATCH] r8152: stop submitting rx for -EPROTO
Date: Wed, 29 Sep 2021 13:18:12 +0800	[thread overview]
Message-ID: <20210929051812.3107-1-jason-ch.chen@mediatek.com> (raw)

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.

[  644.786219] net_ratelimit: 113887 callbacks suppressed
[  644.786239] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786335] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786369] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786431] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786493] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786555] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786617] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786678] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786740] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  644.786802] r8152 1-1.2.4:1.0 eth0: Rx status -71
[  645.041159] mtk-scp 10500000.scp: scp_ipi_send: IPI timeout!
[  645.041211] cros-ec-rpmsg 10500000.scp.cros-ec-rpmsg.13.-1: rpmsg send failed
[  649.183350] watchdog: BUG: soft lockup - CPU#0 stuck for 12s! [migration/0:14]

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
---
 drivers/net/usb/r8152.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 60ba9b734055..250718f0dcb7 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1771,6 +1771,7 @@ static void read_bulk_callback(struct urb *urb)
 		netif_device_detach(tp->netdev);
 		return;
 	case -ENOENT:
+	case -EPROTO:
 		return;	/* the urb is in unlink state */
 	case -ETIME:
 		if (net_ratelimit())
-- 
2.18.0


             reply	other threads:[~2021-09-29  5:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  5:18 Jason-ch Chen [this message]
2021-09-29  8:14 ` [PATCH] r8152: stop submitting rx for -EPROTO Hayes Wang
2021-09-29  9:52   ` Jason-ch Chen
2021-09-30  2:41     ` Hayes Wang
2021-10-01  1:36       ` Jason-ch Chen
2021-09-30  9:30     ` Oliver Neukum
2021-09-30 15:18       ` Alan Stern
2021-10-01  2:40         ` Hayes Wang
2021-10-01  3:26           ` Hayes Wang
2021-10-01 15:22             ` Alan Stern
2021-10-04  2:15               ` Hayes Wang
2021-10-04 11:44               ` Oliver Neukum
2021-10-04 14:33                 ` Alan Stern
2021-09-30 16:13       ` Hayes Wang
2021-10-04  6:28 ` [PATCH net] r8152: avoid to resubmit rx immediately Hayes Wang
2021-10-05 11:50   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210929051812.3107-1-jason-ch.chen@mediatek.com \
    --to=jason-ch.chen@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=hayeswang@realtek.com \
    --cc=hsinyi@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).