netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: phy: remove parameter new_link from phy_mac_interrupt()
@ 2018-01-10 20:05 Heiner Kallweit
  2018-01-10 20:11 ` [PATCH net-next 1/2] " Heiner Kallweit
  2018-01-10 20:11 ` [PATCH net-next 2/2] net: bcmgenet: " Heiner Kallweit
  0 siblings, 2 replies; 4+ messages in thread
From: Heiner Kallweit @ 2018-01-10 20:05 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller, Doug Berger
  Cc: netdev@vger.kernel.org

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

bcmgenet driver so far is the only user, therefore changing the API
has minimal impact.

Heiner Kallweit (2):
  net: phy: remove parameter new_link from phy_mac_interrupt()
  net: bcmgenet: remove parameter new_link from phy_mac_interrupt()

 drivers/net/ethernet/broadcom/genet/bcmgenet.c |  7 ++++---
 drivers/net/phy/phy.c                          | 10 +++-------
 include/linux/phy.h                            |  2 +-
 3 files changed, 8 insertions(+), 11 deletions(-)

-- 
2.15.1

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

end of thread, other threads:[~2018-01-10 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10 20:05 [PATCH net-next 0/2] net: phy: remove parameter new_link from phy_mac_interrupt() Heiner Kallweit
2018-01-10 20:11 ` [PATCH net-next 1/2] " Heiner Kallweit
2018-01-10 20:13   ` Florian Fainelli
2018-01-10 20:11 ` [PATCH net-next 2/2] net: bcmgenet: " Heiner Kallweit

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