From: Hanson Wang <hanson.wang@ugreen.com>
To: netdev@vger.kernel.org
Cc: andrew@lunn.ch, linux-usb@vger.kernel.org, oneukum@suse.com
Subject: Re: [PATCH 1/1] net: usb: aqc111: fix set_mac_address return value for bonding
Date: Sat, 4 Jul 2026 16:42:58 +0800 [thread overview]
Message-ID: <20260704084258.3513069-1-hanson.wang@ugreen.com> (raw)
In-Reply-To: <43a0904c-de59-4b40-b186-edd130f6c0cb@lunn.ch>
Hi Andrew,
Thanks for the review. You are right that this is not bonding-specific -
any caller of ndo_set_mac_address() (including netif_set_mac_address()
and "ip link set address") expects 0 on success and treats any non-zero
return value as failure.
I audited all drivers under drivers/net/usb/ that implement a custom
ndo_set_mac_address callback:
aqc111.c - BUG: returns usb_control_msg byte count (6) [this patch]
ax88179_178a.c - OK: returns 0 after ax_write_cmd()
asix_common.c - OK: returns 0 (async write to hardware)
ch397.c - OK: returns 0
dm9601.c - OK: returns 0 (async write)
lan78xx.c - OK: returns 0
mcs7830.c - OK: returns 0
qmi_wwan.c - OK: returns 0
r8152.c/r8157.c - OK: returns 0 on success (via usb_autopm_get_interface)
rtl8150.c - OK: returns 0
sr9700.c - OK: returns 0 (async write)
sr9800.c - OK: returns 0 (async write)
Drivers that use eth_mac_addr as ndo_set_mac_address (smsc95xx,
smsc75xx, cdc_ncm, rndis, pegasus, usbnet default, etc.) always
return 0 from the netdev op.
As far as I can tell, aqc111 is the only driver that directly returns
the result of a USB control write without normalizing success to 0.
Please let me know if you would like any further changes to this patch.
Best regards,
Hanson Wang
next prev parent reply other threads:[~2026-07-04 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 7:39 [PATCH 1/1] net: usb: aqc111: fix set_mac_address return value for bonding Hanson Wang
2026-07-03 16:46 ` Andrew Lunn
2026-07-04 8:42 ` Hanson Wang [this message]
2026-07-04 14:32 ` Andrew Lunn
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=20260704084258.3513069-1-hanson.wang@ugreen.com \
--to=hanson.wang@ugreen.com \
--cc=andrew@lunn.ch \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.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