net: dsa: b53: Only call b53_port_event() for SGMII ports
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 10 Sep 2018 23:47:07 +0000 (16:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 07:06:55 +0000 (00:06 -0700)
Built-in PHY ports are still being polled, avoid generating spurious
and duplicate events which the PHY library resolves through polling
anyways.

Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_srab.c

index b0ed818..3210527 100644 (file)
@@ -373,7 +373,8 @@ static irqreturn_t b53_srab_port_thread(int irq, void *dev_id)
        struct b53_srab_port_priv *port = dev_id;
        struct b53_device *dev = port->dev;
 
-       b53_port_event(dev->ds, port->num);
+       if (port->mode == PHY_INTERFACE_MODE_SGMII)
+               b53_port_event(dev->ds, port->num);
 
        return IRQ_HANDLED;
 }