net: gemini: Allow multiple ports to instantiate
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Jul 2018 19:32:43 +0000 (21:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2018 00:39:15 +0000 (17:39 -0700)
The code was not tested with two ports actually in use at
the same time. (I blame this on lack of actual hardware using
that feature.) Now after locating a system using both ports,
add necessary fix to make both ports come up.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cortina/gemini.c

index 7b880878f22b7be0205d6906af4cde6fdb21041e..bd4602ebcea1a1a3347669b3189acbf132f02a2f 100644 (file)
@@ -1789,7 +1789,10 @@ static int gmac_open(struct net_device *netdev)
        phy_start(netdev->phydev);
 
        err = geth_resize_freeq(port);
-       if (err) {
+       /* It's fine if it's just busy, the other port has set up
+        * the freeq in that case.
+        */
+       if (err && (err != -EBUSY)) {
                netdev_err(netdev, "could not resize freeq\n");
                goto err_stop_phy;
        }