diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2019-02-23 19:11:15 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-02-23 21:45:28 -0500 |
| commit | 4c8e0459b585e2a7b367545be3e102737f1e489f (patch) | |
| tree | fd87c219b0556bf0eac5e2509896261dca11b0e2 /drivers | |
| parent | bf50b606cfd85ac8d3d0adb711f3e22204059848 (diff) | |
net: phy: realtek: Dummy IRQ calls for RTL8366RB
This fixes a regression introduced by
commit 0d2e778e38e0ddffab4bb2b0e9ed2ad5165c4bf7
"net: phy: replace PHY_HAS_INTERRUPT with a check for
config_intr and ack_interrupt".
This assumes that a PHY cannot trigger interrupt unless
it has .config_intr() or .ack_interrupt() implemented.
A later patch makes the code assume both need to be
implemented for interrupts to be present.
But this PHY (which is inside a DSA) will happily
fire interrupts without either callback.
Implement dummy callbacks for .config_intr() and
.ack_interrupt() in the phy header to fix this.
Tested on the RTL8366RB on D-Link DIR-685.
Fixes: 0d2e778e38e0 ("net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt")
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/phy/realtek.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index c6010fb1aa0f..cb4a23041a94 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c | |||
| @@ -282,6 +282,13 @@ static struct phy_driver realtek_drvs[] = { | |||
| 282 | .name = "RTL8366RB Gigabit Ethernet", | 282 | .name = "RTL8366RB Gigabit Ethernet", |
| 283 | .features = PHY_GBIT_FEATURES, | 283 | .features = PHY_GBIT_FEATURES, |
| 284 | .config_init = &rtl8366rb_config_init, | 284 | .config_init = &rtl8366rb_config_init, |
| 285 | /* These interrupts are handled by the irq controller | ||
| 286 | * embedded inside the RTL8366RB, they get unmasked when the | ||
| 287 | * irq is requested and ACKed by reading the status register, | ||
| 288 | * which is done by the irqchip code. | ||
| 289 | */ | ||
| 290 | .ack_interrupt = genphy_no_ack_interrupt, | ||
| 291 | .config_intr = genphy_no_config_intr, | ||
| 285 | .suspend = genphy_suspend, | 292 | .suspend = genphy_suspend, |
| 286 | .resume = genphy_resume, | 293 | .resume = genphy_resume, |
| 287 | }, | 294 | }, |
