From: Michal Pecio <michal.pecio@gmail.com>
To: "Xuetao (kirin)" <xuetao09@huawei.com>
Cc: <gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <caiyadong@huawei.com>,
<stable@kernel.org>
Subject: Re: [PATCH] usb: core: Fix bandwidth for devices with invalid wBytesPerInterval
Date: Fri, 3 Apr 2026 09:16:21 +0200 [thread overview]
Message-ID: <20260403091621.5a685d6e.michal.pecio@gmail.com> (raw)
In-Reply-To: <85ad518a-f87f-4ca6-a11c-1ccc37d60bd1@huawei.com>
On Thu, 2 Apr 2026 19:55:16 +0800, Xuetao (kirin) wrote:
> > Any other examples besides AX88179?
>
> We tested 18 different USB 3.0 docks, but they only contained two
> different types of USB 3.0 Ethernet devices based on VID/PID.
> The dwc3 controller works fine with all of the devices mentioned
> above. The other USB host controller works fine with all 12 Realtek
> devices, but fails with all 6 ASIX devices.
>
> 1. Realtek USB 10/100/1000 LAN (12 devices)
> All 12 devices share the same VID/PID and descriptor values.
>
> VID = 0x0BDA, PID = 0x8153
> wMaxPacketSize = 0x10
> bMaxBurst = 0
> wBytesPerInterval = 0x8
My RTL8153 has this endpoint for its default proprietary configuration:
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 8
bMaxBurst 0
wBytesPerInterval 2
which should be problem-free, and this for its CDC configuration:
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 8
bMaxBurst 0
wBytesPerInterval 8
The CDC configuration needs to be enabled with a patch, I'm not sure
if there is any other way. It will then use the r8153_ecm driver.
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -9641,6 +9641,7 @@ static int rtl_fw_init(struct r8152 *tp)
static u8 __rtl_get_hw_ver(struct usb_device *udev)
{
+ return 0;
u32 ocp_data = 0;
__le32 *tmp;
u8 version;
> 2. ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter (6 devices)
> All 6 devices share the same VID/PID.
>
> VID = 0x0B95, PID = 0x1790
> (a) 4 devices:
> wMaxPacketSize = 0x10
> bMaxBurst = 0
> wBytesPerInterval = 0x0
This looks like my AX88179 and it's obviously broken.
> (b) 2 devices:
> wMaxPacketSize = 0x10
> bMaxBurst = 0
> wBytesPerInterval = 0x8
But this is odd. When I use mine, I see that the driver submits 8 byte
URBs and they complete successfully with 8 bytes received, no babble.
ffff888100981b40 3364969734 S Ii:2:010:1 -115:1024 8 <
ffff888100981b40 3365097706 C Ii:2:010:1 0:1024 8 = a1000800 79490000
So I think this should work even with bandwidth reservation set to 8.
Can you check what happens here, before and after your patch?
Regards,
Michal
prev parent reply other threads:[~2026-04-03 7:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 2:14 [PATCH] usb: core: Fix bandwidth for devices with invalid wBytesPerInterval Tao Xue
2026-04-02 2:45 ` Alan Stern
2026-04-02 3:51 ` Greg KH
2026-04-02 6:59 ` Xuetao (kirin)
2026-04-02 7:10 ` Greg KH
2026-04-02 8:26 ` Xuetao (kirin)
2026-04-02 13:56 ` Alan Stern
2026-04-02 14:09 ` Greg KH
2026-04-02 15:03 ` Michal Pecio
2026-04-03 1:20 ` Xuetao (kirin)
2026-04-02 20:17 ` Michal Pecio
2026-04-02 9:44 ` Michal Pecio
2026-04-02 11:55 ` Xuetao (kirin)
2026-04-03 7:16 ` Michal Pecio [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=20260403091621.5a685d6e.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=caiyadong@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@kernel.org \
--cc=xuetao09@huawei.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