Re: [PATCH v4 4/4] net: mdio: Add RTL9300 MDIO driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

On 23/01/2025 10:47, Andrew Lunn wrote:
>> I believe the POLL_SEL configuration actually affects an internal port
>> polling unit. From the datasheets I have it seems pretty configurable, you
>> can tell it which phy registers to poll and what values indicate link
>> up/down (the defaults are conveniently setup to match the Realtek PHYs).
> You need to disable this. The linux PHY driver is driving the PHY, and
> the hardware has no idea what Linux is doing. Say the driver has
> changed the page to read a temperature sensor, when the switch does a
> poll. Rather than reading the link status, it gets some random value
> from the page containing the temperature sensor.

There's a mask that can be set via a register that can disable polling 
for a port. The trick will be deciding when to do so.

For C45 PHYs I think it's fine as the register space is so large that 
paging isn't really used (the only time I've seen it is in the vendor 
MMD). The PPU does seem to have some knowledge of paging for C22 but as 
far as I understand the page select register varies vendor to vendor and 
I can't see any way of telling it so it probably just uses whatever page 
select register that realtek use in their PHYs.

So I _think_ the PPU is OK. What might be a bit more tricky is the other 
way round where Linux is doing something involving changing pages and 
reading registers, there would need to be some kind mechanism that masks 
the port out of the PPU for the duration of the whole transaction.


>
> 	Andrew




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux