Re: [PATCH net-next v3] tg3: Avoid writing uninitialized MII_CTRL1000 in tg3_phy_reset_5703_4_5()

From: Ian Rogers

Date: Tue Dec 01 2026 - 12:37:26 EST


On Sun, Nov 29, 2026 at 12:55 AM <netdev-bot+sashiko@xxxxxxxxxx> wrote:
>
> [Severity: Medium]
> Can this still write 0 to MII_CTRL1000 when phy9_orig_set is true?
>
> Once phy9_orig_set is set it stays set. But every pass of the retry loop
> reads MII_CTRL1000 straight into phy9_orig. __tg3_readphy() clears the
> output before the MDIO transaction and only fills it in on success:

Good catch -- __tg3_readphy() clears *val before the MDIO read, so a
later timeout would overwrite phy9_orig with 0.

Since this is 20-year-old BCM5703/5704/5705 PHY reset code that I don't
have hardware to test, and it has already taken three revisions without
a clean fix, I'm going to drop this patch rather than add further churn.

Thanks,
Ian

pw-bot: cr