提交 42aa15cf 编写于 作者: V Vivien Didelot 提交者: David S. Miller

net: dsa: mv88e6xxx: fix freeing unused SERDES IRQ

Now mv88e6xxx does not enable its ports at setup itself and let
the DSA core handle this, unused ports are disabled without being
powered on first. While that is expected, the SERDES powering code
was assuming that a port was already set up before powering it down,
resulting in freeing an unused IRQ. The patch fixes this assumption.

Fixes: b759f528 ("net: dsa: mv88e6xxx: enable SERDES after setup")
Signed-off-by: NVivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: NMarek Behún <marek.behun@nic.cz>
Tested-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5d24da1e
......@@ -2070,7 +2070,8 @@ static int mv88e6xxx_serdes_power(struct mv88e6xxx_chip *chip, int port,
if (chip->info->ops->serdes_irq_setup)
err = chip->info->ops->serdes_irq_setup(chip, port);
} else {
if (chip->info->ops->serdes_irq_free)
if (chip->info->ops->serdes_irq_free &&
chip->ports[port].serdes_irq)
chip->info->ops->serdes_irq_free(chip, port);
err = chip->info->ops->serdes_power(chip, port, false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册