From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, hkallweit1@gmail.com, linux@armlinux.org.uk,
shaojijie@huawei.com, horms@kernel.org, runyu.xiao@seu.edu.cn,
mmyangfl@gmail.com, hvr@gnu.org, danny.kukawka@bisect.de,
mugunthanvnm@ti.com, sebastian.hesselbarth@gmail.com,
linux-kernel@vger.kernel.org, manuel.lauss@gmail.com
Subject: Re: [PATCH net v4 08/10] net: phy: smsc: wait for LAN83C183 power-down recovery
Date: Tue, 24 Nov 2026 19:45:17 -0800 [thread overview]
Message-ID: <609904cc-0d66-498a-bf83-54ad0da6cc0c@gmail.com> (raw)
In-Reply-To: <179557011237.3135.15846967917791186180@kernel.org>
On 11/24/2026 5:28 PM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 · Medium: 1 · Low: 1
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [Medium] The new 500 ms recovery delay in lan83c183_resume()
> (drivers/net/phy/smsc.c) only runs if the smsc PHY driver is already…
> - [Low] This patch rewrites the SMSC_PHY Kconfig help line to 'Currently
> supports the LAN83C183, LAN83C185, LAN8187 and LAN8700 PHYs'…
>
> --
>
> net: phy: smsc: wait for LAN83C183 power-down recovery
>
> This adds a LAN83C183 entry to the smsc PHY driver. Its resume callback
> sleeps 500 ms after clearing BMCR_PDOWN, so the PHY has time to recover
> before the Au1000 MAC is started on MTX-1. The ID match also covers the
> LSI L80227, which has the same OUI and model number.
>
> Link: https://pdf.dzsc.com/LAN/LAN83C183.pdf#page=44
> Link: https://datasheet.octopart.com/L80223-LSI-datasheet-11757091.pdf#page=73
>
>> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
>> index 30e9d22c8d1a3..10466b2574eb4 100644
>> --- a/drivers/net/phy/Kconfig
>> +++ b/drivers/net/phy/Kconfig
>> @@ -421,7 +421,7 @@ config SMSC_PHY
>> tristate "SMSC PHYs"
>> select CRC16
>> help
>> - Currently supports the LAN83C185, LAN8187 and LAN8700 PHYs
>> + Currently supports the LAN83C183, LAN83C185, LAN8187 and LAN8700 PHYs
>
> [Severity: Low]
> This isn't a bug, but should the help text also mention the LSI L80227?
>
> The new 0x0016f840/0xfffffff0 entry in smsc_phy_driver[] and smsc_tbl[]
> also binds L80227 PHYs. The code comment says "shared with L80227". Those
> PHYs now also get the 500 ms delay when they leave power-down. The
> rewritten help line does not say this.
>
> Separately, the help text also leaves out the LAN911x internal,
> LAN8710/8720, LAN8740 and LAN8741/8742 PHYs that are already in
> smsc_tbl[]. That gap is pre-existing and was not introduced by this patch.
The driver was not tested on the LSI L80227 due to lack of availability,
so no, it does not make sense to be listing that in the PHY driver
Kconfig text unless it gets eventually tested.
>
>> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
>> index 48487149c2252..c0713017e54b0 100644
>> --- a/drivers/net/phy/smsc.c
>> +++ b/drivers/net/phy/smsc.c
>
> [ ... ]
>
>> @@ -684,8 +685,33 @@ int smsc_phy_probe(struct phy_device *phydev)
>> }
>> EXPORT_SYMBOL_GPL(smsc_phy_probe);
>>
>> +static int lan83c183_resume(struct phy_device *phydev)
>> +{
>> + int ret;
>> +
>> + ret = phy_modify_changed(phydev, MII_BMCR, BMCR_PDOWN, 0);
>> + if (ret < 0)
>> + return ret;
>> +
>> + /* The PHY needs up to 500 ms to restore operation after power-down. */
>> + if (ret)
>> + msleep(500);
>> +
>> + return 0;
>> +}
>> +
>> static struct phy_driver smsc_phy_driver[] = {
>> {
>> + /* LSI/SEEQ OUI 00:a0:7d, model 4; shared with L80227. */
>> + .phy_id = 0x0016f840,
>> + .phy_id_mask = 0xfffffff0,
>> + .name = "SMSC LAN83C183",
>> +
>> + .get_features = genphy_read_abilities,
>> + .suspend = genphy_suspend,
>> + .resume = lan83c183_resume,
>> + .set_loopback = genphy_loopback,
>> +}, {
>
> [Severity: Medium]
> Will lan83c183_resume() actually run with the in-tree MTX-1 config?
>
> The commit message says SMSC_PHY must be built in when the au1000 MAC is
> built in. Nothing in Kconfig or the defconfig enforces that.
> arch/mips/configs/mtx1_defconfig has:
>
> CONFIG_MIPS_MTX1=y
> CONFIG_SMSC_PHY=m
>
> It does not set CONFIG_MIPS_AU1X00_ENET at all.
>
> With CONFIG_MIPS_AU1X00_ENET=y and CONFIG_SMSC_PHY=m, the PHY is attached
> during the MAC probe:
>
> au1000_probe()
> mdiobus_register()
> au1000_mii_probe()
> phy_connect()
> phy_attach_direct()
>
> No driver is bound yet at that point, so phy_attach_direct() falls back
> to genphy:
>
> if (!d->driver) {
> if (phydev->is_c45)
> d->driver = &genphy_c45_driver.mdiodrv.driver;
> else
> d->driver = &genphy_driver.mdiodrv.driver;
>
>>From then on, genphy_resume() runs on reopen with no delay. Loading
> smsc.ko later does not rebind the PHY. So the reopen hang can still
> happen even with both patches in the series applied.
>
> Neither this patch nor the companion au1000 patch touches arch/mips/ or
> drivers/net/ethernet/amd/Kconfig.
>
> Could "imply SMSC_PHY" be added under MIPS_AU1X00_ENET or MIPS_MTX1, as
> drivers/net/dsa/Kconfig already does? Another option is to update
> mtx1_defconfig to CONFIG_MIPS_AU1X00_ENET=y and CONFIG_SMSC_PHY=y.
>
> When both drivers are modules, request_module() in phy_device_create()
> normally loads smsc.ko before attach, so that case looks fine.
mtx1_defconfig is outdated and it can serve as a reference but it would
need to be re-generated, this is separate from the scope of this patch.
--
Florian
next prev parent reply other threads:[~2026-11-25 3:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 0:47 [PATCH net v4 00/10] net: au1000: Bug fixes Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 01/10] net: au1000: recycle RX descriptors on allocation failure Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 02/10] net: au1000: clear all-multicast mode when restoring hash filtering Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 03/10] net: au1000: disconnect the PHY before freeing the MDIO bus Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 04/10] net: au1000: report MDIO transaction timeouts Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 05/10] net: au1000: serialize TX completion with packet submission Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 06/10] net: au1000: restore receive filtering before enabling RX Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 07/10] net: au1000: restore RX buffer addresses when restarting the MAC Florian Fainelli
2026-11-25 1:28 ` netdev-bot+sashiko
2026-11-25 3:45 ` Florian Fainelli
2026-11-21 0:48 ` [PATCH net v4 08/10] net: phy: smsc: wait for LAN83C183 power-down recovery Florian Fainelli
2026-11-25 1:28 ` netdev-bot+sashiko
2026-11-25 3:45 ` Florian Fainelli [this message]
2026-11-21 0:48 ` [PATCH net v4 09/10] net: au1000: keep the MAC stopped until the PHY link is ready Florian Fainelli
2026-11-25 1:28 ` netdev-bot+sashiko
2026-11-21 0:48 ` [PATCH net v4 10/10] net: au1000: reject frames larger than the TX bounce buffer Florian Fainelli
2026-11-21 0:53 ` [PATCH net v4 00/10] net: au1000: Bug fixes netdev-bot+sinfo
2026-11-21 0:54 ` Florian Fainelli
2026-11-21 18:38 ` Jakub Kicinski
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=609904cc-0d66-498a-bf83-54ad0da6cc0c@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=danny.kukawka@bisect.de \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=hvr@gnu.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=manuel.lauss@gmail.com \
--cc=mmyangfl@gmail.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shaojijie@huawei.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
all inboxes | Powered by JetHome®