From: Birger Koblitz <mail@birger-koblitz.de>
To: Jianhui Xu <neuromoments@gmail.com>
Cc: andrew+netdev@lunn.ch, andrew@lunn.ch, davem@davemloft.net,
edumazet@google.com, hkallweit1@gmail.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
linux@armlinux.org.uk, netdev@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net-next v5 00/13] ax88179_178a: Add support for AX88179A-based chips
Date: Mon, 3 Aug 2026 11:53:54 +0200 [thread overview]
Message-ID: <82acabcc-7b98-468a-a989-cb95f620fe5f@birger-koblitz.de> (raw)
In-Reply-To: <20260803073348.2190800-1-neuromoments@gmail.com>
Thanks so much for testing, again, Jianhui!
On 03/08/2026 09:33, Jianhui Xu wrote:
> Hi Birger,
>
> I tested v5 on the same ASIX AX88179B adapter (USB 0b95:1790,
> bcdDevice 0x0200, firmware 1.3.0.0).
>
> The 13 patches applied to net-next commit
> df13c1df8147675470213ffff29dd5762fa321f5 and built successfully as
> 7.2.0-rc3-ax88179b-v5. The focused W=1 builds for ax88179.o and
> ax88796b.o were clean.
>
> Unfortunately I reproduced an intermittent cold-activation failure, so I cannot
> add a Tested-by for v5. In four fresh direct-kernel QEMU starts with complete
> diagnostic capture, the old lease was released before starting DHCPDISCOVER. Two
> reported 1000baseT/Full carrier but timed out DHCP, while two succeeded
> normally. In both failed runs, RX remained at zero while TX increased. Reloading
> ax88179 and ax88796b recovered DHCP, RX, and bound traffic in both cases.
>
> Before this follow-up campaign, in the earlier v5 validation session, I observed
> a separate 100baseT/Full failure: the adapter negotiated carrier after I changed
> the advertisement to 100baseT/Full-only, but ARP and bound traffic failed.
> I then tried to reproduce that result with three new advertise-0x008
> transitions. All three negotiated 100baseT/Full and passed bound gateway
> traffic; two also explicitly passed traffic to the test host. These repetitions
> included tests both with and without a preceding module reload. I could not
> reproduce the earlier 100-Mbit failure.
>
> That earlier v5 validation session also produced a separate guest ACPI S3
> failure: after resume, the adapter returned with 1000baseT/Full carrier, but RX
> remained frozen and traffic was broken. I then performed three new S3 cycles.
> All three logged QEMU's same emulated-XHCI resume reinitialization and USB
> reset, but returned working traffic with increasing RX counters immediately. The
> final repetition also recreated the earlier speed, EEE, and pause setting
> sequence and verified working gateway traffic immediately before suspend.
> I could not reproduce the earlier frozen-RX result. This remains a QEMU
> emulated-XHCI test, not a physical-XHCI suspend test.
>
> While reviewing the speed result, I noticed ax88179a_bulkin_config() selects its
> table using ax179_data->speed, while ax88179a_mac_link_up() receives the speed
> argument but I could not find an assignment to that private member. The new
> passing 100-Mbit tests do not support linking that source observation to the
> original one-off failure, and the same pattern appears in v4.
This issue is not critically problematic, the speed variable only affects the bulk
configuration settins that control how data is assembled in the controller and
assembled to larger USB transfers, including timing and so on. This should only harm
performance, but not the issues with the link after suspend/resume. It was introduced
in v3 or v4 when the speed info no longer came from the USB interrupt URB.
The following should fix this:
diff --git a/drivers/net/usb/ax88179a_devices.c b/drivers/net/usb/ax88179a_devices.c
index 37a55ff5464c..a4d782979c63 100644
--- a/drivers/net/usb/ax88179a_devices.c
+++ b/drivers/net/usb/ax88179a_devices.c
@@ -215,13 +215,13 @@ static void ax88179a_get_drvinfo(struct net_device *net, struct ethtool_drvinfo
priv->fw_version[2], priv->fw_version[3]);
}
-static void ax88179a_bulkin_config(struct usbnet *dev, u8 link_sts)
+static void ax88179a_bulkin_config(struct usbnet *dev, u8 link_sts, u8 speed)
{
struct ax88179_data *ax179_data = dev->driver_priv;
const struct ax_bulkin_settings *bulkin_data;
int index = 0;
- switch (ax179_data->speed) {
+ switch (speed) {
case ETHER_LINK_2500: /* AX88279 only */
index = 0;
break;
@@ -451,6 +451,7 @@ static void ax88179a_mac_link_up(struct phylink_config *config,
struct usbnet *dev = netdev_priv(to_net_dev(config->dev));
struct ax88179_data *ax179_data = dev->driver_priv;
u8 tmp8, link_sts, reg8[3];
+ u8 bulk_config_speed = 0;
u16 tmp16, mode;
/* Stop RX/TX for link configuration */
@@ -503,11 +504,13 @@ static void ax88179a_mac_link_up(struct phylink_config *config,
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX88179A_MAC_LSO_ENHANCE_CTRL, 1, 1, &tmp8);
mode |= AX_MEDIUM_GIGAMODE | AX_MEDIUM_FULL_DUPLEX;
+ bulk_config_speed = ETHER_LINK_2500;
break;
case SPEED_1000:
mode |= AX_MEDIUM_GIGAMODE;
+ bulk_config_speed = ETHER_LINK_1000;
fallthrough;
case SPEED_100:
@@ -518,6 +521,8 @@ static void ax88179a_mac_link_up(struct phylink_config *config,
tmp8 = 0x40;
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX88179A_MAC_RX_DATA_CDC_CNT, 1, 1, &tmp8);
+ if (!bulk_config_speed)
+ bulk_config_speed = ETHER_LINK_100;
break;
case SPEED_10:
@@ -529,12 +534,12 @@ static void ax88179a_mac_link_up(struct phylink_config *config,
tmp8 = 0xFA;
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX88179A_MAC_RX_DATA_CDC_CNT, 1, 1, &tmp8);
- speed = 10;
+ bulk_config_speed = ETHER_LINK_10;
break;
}
ax88179_read_cmd(dev, AX_ACCESS_MAC, PHYSICAL_LINK_STATUS, 1, 1, &link_sts);
- ax88179a_bulkin_config(dev, link_sts);
+ ax88179a_bulkin_config(dev, link_sts, bulk_config_speed);
if (ax179_data->chip_version < AX_VERSION_AX88279) {
tmp8 = 0;
>
> EEE disable/restore, pause enable/restore, EEPROM read, module reload, and USB
> detach/reattach otherwise worked. I also tried Wake-on-LAN in QEMU. The driver
> accepted magic-packet wake, ethtool read back Wake-on: g, and USB wakeup was
> enabled before the guest entered S3. QEMU was configured with USB remote-wake
> suppression disabled, but the guest did not resume after directed-broadcast,
> limited-broadcast, and unicast magic packets. I consider that result
> inconclusive because I did not independently verify the physical USB
> remote-wakeup propagation through QEMU.
>
> Please let me know if you would like me to test a fix or collect a specific
> register trace.
Could you trace the calls to __ax88179_write_cmd (registers, values) around the
suspend/resume events. Since the issue is not deterministic, it is probably sequence/timing-related.
My suspicion is that phylink sends PHY-polls after the controller got the sleep command.
Are there differences in the sequence of calls for the successfull suspend/resume
cycles and the unsuccessful ones?
Thanks!
Birger
next prev parent reply other threads:[~2026-08-03 9:54 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 16:31 [PATCH net-next v5 00/13] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-08-02 16:31 ` [PATCH net-next v5 01/13] ax88179_178a: Fix endianness of pause watermark register Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 02/13] ax88179_178a: Split driver into library and device specific code Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 03/13] ax88179_178a: Add netdev2data() convenience function Birger Koblitz
2026-08-02 21:10 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 04/13] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-08-02 21:28 ` Andrew Lunn
2026-08-06 19:32 ` Birger Koblitz
2026-08-02 21:36 ` Andrew Lunn
2026-08-06 19:34 ` Birger Koblitz
2026-08-02 21:47 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 05/13] ax88179_178a: Add EEE configuration support for AX88179A MACs Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 06/13] ax88179_178a: Add EEE configuration support for AX88179A PHYs Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 07/13] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-08-02 21:37 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 08/13] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 09/13] ax88179_178a: Add Suspend/resume support for AX88179A/772D/279 Birger Koblitz
2026-08-02 21:44 ` Andrew Lunn
2026-08-03 8:53 ` Birger Koblitz
2026-08-03 14:58 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 10/13] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 11/13] ax88179_178a: Update driver name and information Birger Koblitz
2026-08-02 21:45 ` Andrew Lunn
2026-08-02 16:32 ` [PATCH net-next v5 12/13] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-08-02 16:32 ` [PATCH net-next v5 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-08-02 21:55 ` Andrew Lunn
2026-08-06 19:35 ` Birger Koblitz
2026-08-06 21:16 ` Andrew Lunn
2026-08-03 7:33 ` [PATCH net-next v5 00/13] ax88179_178a: Add support for AX88179A-based chips Jianhui Xu
2026-08-03 9:53 ` Birger Koblitz [this message]
2026-08-03 14:39 ` Yuan Xu
2026-08-06 19:38 ` Birger Koblitz
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=82acabcc-7b98-468a-a989-cb95f620fe5f@birger-koblitz.de \
--to=mail@birger-koblitz.de \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=neuromoments@gmail.com \
--cc=pabeni@redhat.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