From: <markus.stockhausen@gmx.de>
To: <rmk+kernel@armlinux.org.uk>
Cc: <linux-phy@lists.infradead.org>, <jan@3e8.eu>,
"'Chris Packham'" <chris.packham@alliedtelesis.co.nz>
Subject: c22/c45 descision in phy_restart_aneg()
Date: Fri, 29 Aug 2025 09:39:46 +0200 [thread overview]
Message-ID: <029301dc18b8$19059e80$4b10db80$@gmx.de> (raw)
Hi Russel,
once again some interesting finding from the limitations in the Realtek
mdio driver. Remember it can only run in c22 or in c45. This time in
autonegotiation restart.
int phy_restart_aneg(struct phy_device *phydev)
{
int ret;
if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
ret = genphy_c45_restart_aneg(phydev);
else
ret = genphy_restart_aneg(phydev);
return ret;
}
I assume BIT(0) means MDIO_DEVS_C22PRESENT. This basically
uses c22 for c45 PHYs if c22 presence is detected. So in our case
it fails as soon as the bus has been switched to c45. Of course
stupid but it is as it is. I see two options to fix the issue.
- Mask the c22 presence in the bus for all PHYs if running in c45
- Or drop the c22 condition check in above function
Any advise?
Thanks in advance.
Markus
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next reply other threads:[~2025-08-29 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 7:39 markus.stockhausen [this message]
2025-08-29 10:13 ` c22/c45 descision in phy_restart_aneg() Russell King (Oracle)
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='029301dc18b8$19059e80$4b10db80$@gmx.de' \
--to=markus.stockhausen@gmx.de \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=jan@3e8.eu \
--cc=linux-phy@lists.infradead.org \
--cc=rmk+kernel@armlinux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).