diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-08-09 15:38:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-09 11:08:20 -0700 |
commit | 734447d4ed7b1f31617c28959fd5adfbd9e39d13 (patch) | |
tree | 7db8f2d5ce4007b17bfcf92083377228202a4a8a /drivers/net/dsa/mv88e6xxx/serdes.c | |
parent | efd1ba6af93ff63d40f92515a83405133145c028 (diff) | |
download | linux-stable-734447d4ed7b1f31617c28959fd5adfbd9e39d13.tar.gz linux-stable-734447d4ed7b1f31617c28959fd5adfbd9e39d13.tar.bz2 linux-stable-734447d4ed7b1f31617c28959fd5adfbd9e39d13.zip |
net: dsa: mv88e6xxx: Re-setup interrupts on CMODE change.
When a port changes CMODE, the SERDES interface being used can change.
Disable interrupts for the old SERDES interface, and enable interrupts
on the new.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/serdes.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/serdes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c b/drivers/net/dsa/mv88e6xxx/serdes.c index 519346b81b87..f007d109b385 100644 --- a/drivers/net/dsa/mv88e6xxx/serdes.c +++ b/drivers/net/dsa/mv88e6xxx/serdes.c @@ -214,7 +214,7 @@ static int mv88e6390_serdes_get_lane(struct mv88e6xxx_chip *chip, int port) * use multiple lanes. If so, return the first lane the port uses. * Returns -ENODEV if a port does not have a lane. */ -static int mv88e6390x_serdes_get_lane(struct mv88e6xxx_chip *chip, int port) +int mv88e6390x_serdes_get_lane(struct mv88e6xxx_chip *chip, int port) { u8 cmode_port9, cmode_port10, cmode_port; @@ -576,6 +576,8 @@ void mv88e6390_serdes_irq_free(struct mv88e6xxx_chip *chip, int port) mutex_unlock(&chip->reg_lock); free_irq(chip->ports[port].serdes_irq, &chip->ports[port]); mutex_lock(&chip->reg_lock); + + chip->ports[port].serdes_irq = 0; } int mv88e6341_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on) |