]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: remove parameter new_link from phy_mac_interrupt()
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 10 Jan 2018 20:21:31 +0000 (21:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Jan 2018 18:45:03 +0000 (13:45 -0500)
commit3bef3ee0cdff31bfbe667e78c319ec0afc5d03ac
tree78f7165cb7332eafcc5269525f01416de38683d9
parentaaa216341c4405c70938aa3862de493519ab2945
net: phy: remove parameter new_link from phy_mac_interrupt()

I see two issues with parameter new_link:

1. It's not needed. See also phy_interrupt(), works w/o this parameter.
   phy_mac_interrupt sets the state to PHY_CHANGELINK and triggers the
   state machine which then calls phy_read_status. And phy_read_status
   updates the link state.

2. phy_mac_interrupt is used in interrupt context and getting the link
   state may sleep (at least when having to access the PHY registers
   via MDIO bus).

So let's remove it.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/phy/phy.c
include/linux/phy.h