]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: realtek: Dummy IRQ calls for RTL8366RB
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 24 Feb 2019 00:11:15 +0000 (01:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Feb 2019 02:45:28 +0000 (18:45 -0800)
commitaccde3884f987b6d3df18a66f892993a2ab7b66f
treefd87c219b0556bf0eac5e2509896261dca11b0e2
parent18b343dabee4b4c6e884d937e5f34c1af8b26713
net: phy: realtek: Dummy IRQ calls for RTL8366RB

This fixes a regression introduced by
commit 3f8451dadb9d4e784673da75cb1f219455d39f0d
"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: 3f8451dadb9d ("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>
drivers/net/phy/realtek.c
include/linux/phy.h