From: Chih Kai Hsu <hsu.chih.kai@realtek.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "kuba@kernel.org" <kuba@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
nic_swsd <nic_swsd@realtek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: [PATCH net] r8152: handle the return value of usb_reset_device()
Date: Fri, 5 Jun 2026 06:26:46 +0000 [thread overview]
Message-ID: <19bdb89de51c46408b7e7d7cdeba8e4d@realtek.com> (raw)
In-Reply-To: <3e108daa-7913-4890-8331-9761a4654b1f@lunn.ch>
On 05/06/26 12:04 pm, Andrew Lunn wrote:
> On Fri, Jun 05, 2026 at 02:42:34AM +0000, Chih Kai Hsu wrote:
> > On 04/06/26 8:54 pm, Andrew Lunn wrote:
> >
> > > On Thu, Jun 04, 2026 at 05:22:47PM +0800, Chih Kai Hsu wrote:
> > > > If usb_reset_device() returns a negative error code, stop the
> > > > process of probing.
> > > >
> > > > Fixes: 10c3271712f5 ("r8152: disable the ECM mode")
> > >
> > > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.h
> > > tml
> > >
> > > Does this bother people?
> > Yes, it does.
> > If the driver does not return early when receiving an error code from
> > usb_reset_device(), the subsequent execution will trigger a kernel call trace.
>
> Please include a link to such a bug report, kernel call trace etc, to to show it
> bothers somebody. Do you have the hardware and can trigger this?
If the driver ignores the error from usb_reset_device(), I get the following call trace.
[ 2405.758846] Call Trace:
[ 2405.758853] <TASK>
[ 2405.758872] usb_probe_interface+0x15b/0x350
[ 2405.758895] really_probe+0xdb/0x340
[ 2405.758910] ? pm_runtime_barrier+0x55/0x90
[ 2405.758926] __driver_probe_device+0x78/0x140
[ 2405.758940] driver_probe_device+0x1f/0xa0
[ 2405.75895s3] ? __pfx___driver_attach+0x10/0x10
[ 2405.758965] __driver_attach+0xcb/0x1e0
[ 2405.758979] bus_for_each_dev+0x82/0xd0
[ 2405.758992] bus_add_driver+0x12f/0x210
[ 2405.759035] ? __pfx_rtl8152_driver_init+0x10/0x10 [r8152]
[ 2405.759069] driver_register+0x75/0xe0
[ 2405.759079] usb_register_driver+0x99/0x150
[ 2405.759092] ? usb_register_device_driver.cold+0x3a/0x40
[ 2405.759107] do_one_initcall+0x58/0x300
[ 2405.759124] do_init_module+0x84/0x280
[ 2405.759138] init_module_from_file+0x8a/0xe0
[ 2405.759160] idempotent_init_module+0x114/0x310
[ 2405.759178] __x64_sys_finit_module+0x6d/0xd0
[ 2405.759190] ? syscall_trace_enter+0x173/0x1f0
[ 2405.759205] do_syscall_64+0x7e/0x250
[ 2405.759216] ? syscall_exit_work+0xb0/0x1b0
[ 2405.759228] ? do_syscall_64+0xb6/0x250
[ 2405.759239] ? count_memcg_events+0x15d/0x230
[ 2405.759251] ? handle_mm_fault+0x248/0x360
[ 2405.759264] ? do_user_addr_fault+0x21a/0x690
[ 2405.759278] ? irqentry_exit_to_user_mode+0x2c/0x1c0
[ 2405.759290] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 2405.759300] RIP: 0033:0x7f7fa09010cd
[ 2405.759335] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 03 4d 0f 00 f7 d8 64 89 01 48
[ 2405.759344] RSP: 002b:00007fff7deaa418 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 2405.759356] RAX: ffffffffffffffda RBX: 0000555bbeb58750 RCX: 00007f7fa09010cd
[ 2405.759362] RDX: 0000000000000000 RSI: 0000555bb09c65ee RDI: 0000000000000003
[ 2405.759368] RBP: 00007fff7deaa4d0 R08: 0000000000000000 R09: 00007fff7deaa460
[ 2405.759375] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 2405.759380] R13: 0000555bbeb583c0 R14: 0000555bb09c65ee R15: 0000000000000000
[ 2405.759395] </TASK>
[ 2405.759400] ---[ end trace 0000000000000000 ]---
>
> Andrew
Best Regards,
Chih-Kai
prev parent reply other threads:[~2026-06-05 6:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 9:22 [PATCH net] r8152: handle the return value of usb_reset_device() Chih Kai Hsu
2026-06-04 9:28 ` Hayes Wang
2026-06-04 12:53 ` Andrew Lunn
2026-06-05 2:42 ` Chih Kai Hsu
2026-06-05 4:03 ` Andrew Lunn
2026-06-05 6:26 ` Chih Kai Hsu [this message]
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=19bdb89de51c46408b7e7d7cdeba8e4d@realtek.com \
--to=hsu.chih.kai@realtek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/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