linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* c22/c45 descision in phy_restart_aneg()
@ 2025-08-29  7:39 markus.stockhausen
  2025-08-29 10:13 ` Russell King (Oracle)
  0 siblings, 1 reply; 2+ messages in thread
From: markus.stockhausen @ 2025-08-29  7:39 UTC (permalink / raw)
  To: rmk+kernel; +Cc: linux-phy, jan, 'Chris Packham'

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c22/c45 descision in phy_restart_aneg()
  2025-08-29  7:39 c22/c45 descision in phy_restart_aneg() markus.stockhausen
@ 2025-08-29 10:13 ` Russell King (Oracle)
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King (Oracle) @ 2025-08-29 10:13 UTC (permalink / raw)
  To: markus.stockhausen; +Cc: linux-phy, jan, 'Chris Packham'

On Fri, Aug 29, 2025 at 09:39:46AM +0200, markus.stockhausen@gmx.de wrote:
> Hi Russel,

1. It's "Russell" please.
2. linux-phy@lists.infradead.org is not the correct list to be
discussing phylib issues.
3. You haven't Cc'd the other phylib maintainers.

Please resend to the correct audience. Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-29 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29  7:39 c22/c45 descision in phy_restart_aneg() markus.stockhausen
2025-08-29 10:13 ` Russell King (Oracle)

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).