]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: add support for polling MAC PCS
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 6 Jan 2020 01:34:11 +0000 (03:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 07:22:32 +0000 (23:22 -0800)
commit01a295440d307c49adc16eeb7959f08cb503796c
treee51c2ad948a584c83523c85e1f612b1c7b0bd38e
parent0084193689bcedcd990152badb9dbda4ad7f7e8a
net: phylink: add support for polling MAC PCS

Some MAC PCS blocks are unable to provide interrupts when their status
changes. As we already have support in phylink for polling status, use
this to provide a hook for MACs to enable polling mode.

The patch idea was picked up from Russell King's suggestion on the macb
phylink patch thread here [0] but the implementation was changed.
Instead of introducing a new phylink_start_poll() function, which would
make the implementation cumbersome for common PHYLINK implementations
for multiple types of devices, like DSA, just add a boolean property to
the phylink_config structure, which is just as backwards-compatible.

https://lkml.org/lkml/2019/12/16/603

Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/sfp-phylink.rst
drivers/net/phy/phylink.c
include/linux/phylink.h