Thread View: linux.kernel.netdev
4 messages
4 total messages
Started by Hanson Wang
Fri, 16 Oct 2026 12:48
[PATCH net v2] net: usb: aqc111: fix set_mac_address return value
Author: Hanson Wang
Date: Fri, 16 Oct 2026 12:48
Date: Fri, 16 Oct 2026 12:48
38 lines
8190 bytes
8190 bytes
aqc111_set_mac_addr() returns the result of aqc111_write_cmd() on success. That function wraps usb_control_msg(), which returns the number of bytes transferred (6 for ETH_ALEN) rather than zero. Callers such as netif_set_mac_address() and bonding treat any non-zero return value as failure when setting the MAC address. Return 0 on success and propagate negative error codes on failure. Link: https://lore.kernel.org/netdev/20260703073936.462231-1-hanson.wang@ugreen.com Signed-off-by: Hanson Wang <hanson.wang@ugreen.com> --- drivers/net/usb/aqc111.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c index 9201ee10a..827aab540 100644 --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c @@ -476,8 +476,12 @@ static int aqc111_set_mac_addr(struct net_device *net, void *p) return ret; /* Set the MAC address */ - return aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, - ETH_ALEN, net->dev_addr); + ret = aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, + ETH_ALEN, ETH_ALEN, net->dev_addr); + if (ret < 0) + return ret; + + return 0; } static int aqc111_vlan_rx_kill_vid(struct net_device *net, -- 2.34.1
Re: [PATCH net v2] net: usb: aqc111: fix set_mac_address return value
Author: netdev-bot+sinfo
Date: Fri, 16 Oct 2026 12:53
Date: Fri, 16 Oct 2026 12:53
22 lines
6211 bytes
6211 bytes
Hi! This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information: - How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan. - Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages. Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then. The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Re: [PATCH net v2] net: usb: aqc111: fix set_mac_address return value
Author: Simon Horman
Date: Fri, 23 Oct 2026 16:42
Date: Fri, 23 Oct 2026 16:42
49 lines
9413 bytes
9413 bytes
On Fri, Oct 16, 2026 at 08:48:58PM +0800, Hanson Wang wrote:
> aqc111_set_mac_addr() returns the result of aqc111_write_cmd() on
> success. That function wraps usb_control_msg(), which returns the
> number of bytes transferred (6 for ETH_ALEN) rather than zero.
>
> Callers such as netif_set_mac_address() and bonding treat any
> non-zero return value as failure when setting the MAC address.
>
> Return 0 on success and propagate negative error codes on failure.
>
> Link: https://lore.kernel.org/netdev/20260703073936.462231-1-hanson.wang@ugreen.com
>
> Signed-off-by: Hanson Wang <hanson.wang@ugreen.com>
Overall this looks good to me, thanks for your contribution.
Reviewed-by: Simon Horman <horms@kernel.org>
Some points on process to keep in mind.
There is no need to repost to address these.
1. Please respond to netdev-bot+sinfo.
It's not too late to do so!
https://lore.kernel.org/netdev/179215519735.408196.139629932849333374@kernel.org/
2. Please post new versions to patches in new email threads,
not as a reply to an earlier versions.
3. Please don't repost within 24h.
4. Please don't repost the same version, without either
incrementing the version number or including repost in the subject.
[PATCh net v2 repost] ...
5. Please do include a summary of what has changed below the scissors ('---').
Ideally including lore.kernel.org links to earlier versions.
v2: Fixes indentation
v1: https://lore.kernel.org/netdev/43a0904c-de59-4b40-b186-edd130f6c0cb@lunn.ch/
6. Please don't use the Link tag to link to an earlier version.
Instead use it if there is some extra information,
e.g. an otherwise unrelated email thread that lead to this patch.
For more information on Netdev processes please see
https://docs.kernel.org/process/maintainer-netdev.html
Re: [PATCH net v2] net: usb: aqc111: fix set_mac_address return value
Author: patchwork-bot+netdevbpf
Date: Fri, 23 Oct 2026 21:30
Date: Fri, 23 Oct 2026 21:30
24 lines
8537 bytes
8537 bytes
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 16 Oct 2026 20:48:58 +0800 you wrote:
> aqc111_set_mac_addr() returns the result of aqc111_write_cmd() on
> success. That function wraps usb_control_msg(), which returns the
> number of bytes transferred (6 for ETH_ALEN) rather than zero.
>
> Callers such as netif_set_mac_address() and bonding treat any
> non-zero return value as failure when setting the MAC address.
>
> [...]
Here is the summary with links:
- [net,v2] net: usb: aqc111: fix set_mac_address return value
https://git.kernel.org/netdev/net/c/c3a1ddd5e116
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads