From: sashiko-bot@kernel.org
To: "Birger Koblitz" <mail@birger-koblitz.de>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] r8152: Add support for 10Gbit Link Speeds and EEE
Date: Fri, 30 Oct 2026 04:53:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-190327@kernel.org> (raw)
In-Reply-To: <20260428-rtl8159_net_next-v1-1-52d03927b46f@birger-koblitz.de>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] 10G EEE advertisement incorrectly clears bit 3 in ADV2 register instead of configuring ADV1.
- [High] Missing `NWAY_10000M_FULL` switch case in `r8156_ups_flags()` causes incorrect firmware speed configuration.
--
commit 888cb24a1bd62bd09199a0e72a5e959941c2af81
Author: Birger Koblitz <mail@birger-koblitz.de>
r8152: Add support for 10Gbit Link Speeds and EEE
This commit adds support for 10Gbit Link speeds and 10Gbit EEE for the
RTL8159. It updates the setup routines and ethtool getters/setters.
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 7337bf1b7d6a..01e65d845f87 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -621,6 +621,7 @@ enum spd_duplex {
> FORCE_1000M_FULL,
> NWAY_2500M_FULL,
> NWAY_5000M_FULL,
> + NWAY_10000M_FULL,
> };
When updating link power states, r8156_ups_flags() maps the speed to USB UPS
flags using a switch statement on tp->ups_info.speed_duplex.
Since this patch introduces NWAY_10000M_FULL but does not add a corresponding
case in r8156_ups_flags(), will the 10G speed fall through to the default
case?
If it falls through, it appears the speed bits in ups_flags remain 0, which
corresponds to FORCE_10M_HALF. Could this configure the firmware and power
state for 10Mbps Half Duplex while the link is actually operating at 10Gbps?
[ ... ]
> @@ -5773,6 +5779,11 @@ static void r8156_eee_en(struct r8152 *tp, bool enable)
> else
> config &= ~MDIO_EEE_5GT;
>
> + if (enable && (tp->eee_adv2 & MDIO_EEE_10GT))
> + config |= MDIO_EEE_10GT;
> + else
> + config &= ~MDIO_EEE_10GT;
> +
> ocp_reg_write(tp, OCP_EEE_ADV2, config);
> }
Is MDIO_EEE_10GT correctly placed in OCP_EEE_ADV2? The 10GBASE-T EEE
capability is normally defined in EEE Advertisement 1 (Register 7.60),
rather than Advertisement 2 (Register 7.62).
Also, since tp->eee_adv2 is populated using linkmode_to_mii_eee_cap2_t(),
which ignores the 10G bit, tp->eee_adv2 & MDIO_EEE_10GT might always
evaluate to false.
Does this cause the else branch to execute unconditionally and unintentionally
clear bit 3 of OCP_EEE_ADV2?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260428-rtl8159_net_next-v1-0-52d03927b46f@birger-koblitz.de?part=1
next prev parent reply other threads:[~2026-10-30 4:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 3:47 [PATCH net-next 0/4] r8152: Add support for the RTL8159 10Gbit USB Ethernet chip Birger Koblitz
2026-04-28 3:47 ` [PATCH net-next 1/4] r8152: Add support for 10Gbit Link Speeds and EEE Birger Koblitz
2026-04-29 1:53 ` Andrew Lunn
2026-10-30 4:53 ` sashiko-bot [this message]
2026-04-28 3:47 ` [PATCH net-next 2/4] r8152: Add support for the RTL8159 chip Birger Koblitz
2026-04-29 1:52 ` Andrew Lunn
2026-04-29 3:52 ` Birger Koblitz
2026-04-28 3:47 ` [PATCH net-next 3/4] r8152: Add irq mitigation for RTL8157/9 Birger Koblitz
2026-04-29 1:56 ` Andrew Lunn
2026-04-29 4:06 ` Birger Koblitz
2026-04-29 18:02 ` Michal Pecio
2026-04-30 3:36 ` Birger Koblitz
2026-04-30 5:44 ` Michal Pecio
2026-04-30 14:19 ` Andrew Lunn
2026-05-01 5:24 ` Michal Pecio
2026-05-01 7:01 ` Birger Koblitz
2026-05-01 12:21 ` Andrew Lunn
2026-10-30 4:53 ` sashiko-bot
2026-04-28 3:47 ` [PATCH net-next 4/4] r8152: Add firmware upload capability for RTL8157/RTL8159 Birger Koblitz
2026-04-29 1:57 ` Andrew Lunn
2026-04-29 4:21 ` Birger Koblitz
2026-04-29 13:01 ` Andrew Lunn
2026-04-29 15:58 ` 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=sashiko-outbox-190327@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@birger-koblitz.de \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.