]> git.hungrycats.org Git - linux/commitdiff
net: gemini: Allow multiple ports to instantiate
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Jul 2018 19:32:43 +0000 (21:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:40 +0000 (08:39 +0200)
[ Upstream commit 60cc7767b901dd1e3f70755c3d2505556ba487c2 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cortina/gemini.c

index 6d7404f66f84af7322c6b58def8cbff94958ca12..c9a061e707c4e57603036cc0ea012849a2a775b7 100644 (file)
@@ -1753,7 +1753,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;
        }