netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net-next v2 0/2] net: phy: mxl-gpy: broken interrupt fixes
@ 2022-12-28 16:40 Michael Walle
  2022-12-28 16:40 ` [PATCH RFC net-next v2 1/2] net: phy: allow a phy to opt-out of interrupt handling Michael Walle
  2022-12-28 16:40 ` [PATCH RFC net-next v2 2/2] net: phy: mxl-gpy: disable interrupts on GPY215 by default Michael Walle
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Walle @ 2022-12-28 16:40 UTC (permalink / raw)
  To: Xu Liang, Andrew Lunn, Heiner Kallweit, Russell King,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, Michael Walle

The GPY215 has a broken interrupt pin. This patch series tries to
workaround that and because in general that is not possible, disables the
interrupts by default and falls back to polling mode. There is an opt-in
via the devicetree.

The devicetree binding is missing for now because there is still an
ongoing discussion. I'm sending this, because I want to get some feedback
on the new handling in the phy core. As Andrew pointed out, we cannot
change the irq in the PHY's .probe() because a MAC driver might overwrite
it afterwards, e.g. the stmmac does so. Instead introduce a new flag which
can be set by the PHY driver and which is evaluated just before the PHY is
attached and thus the interrupt is requested.

Btw. I'm not sure dev_flags is the correct place here. I couldn't see
when to use dev_flags and when to use the plain one-bit properties in the
struct phy_device. The latter seems to be used internally, but of course
there is at least one exception, the .mac_managed_pm is set by the MAC
drivers.

v2:
 - new handling of how to disable the interrupts

Michael Walle (2):
  net: phy: allow a phy to opt-out of interrupt handling
  net: phy: mxl-gpy: disable interrupts on GPY215 by default

 drivers/net/phy/mxl-gpy.c    | 5 +++++
 drivers/net/phy/phy_device.c | 7 +++++++
 include/linux/phy.h          | 2 ++
 3 files changed, 14 insertions(+)

-- 
2.30.2


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

end of thread, other threads:[~2023-01-03 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-28 16:40 [PATCH RFC net-next v2 0/2] net: phy: mxl-gpy: broken interrupt fixes Michael Walle
2022-12-28 16:40 ` [PATCH RFC net-next v2 1/2] net: phy: allow a phy to opt-out of interrupt handling Michael Walle
2022-12-28 16:49   ` Florian Fainelli
2022-12-28 16:54     ` Andrew Lunn
2023-01-03 10:27     ` Russell King (Oracle)
2022-12-28 16:40 ` [PATCH RFC net-next v2 2/2] net: phy: mxl-gpy: disable interrupts on GPY215 by default Michael Walle

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