From: Linus Walleij Date: Wed, 11 Jul 2018 19:32:43 +0000 (+0200) Subject: net: gemini: Allow multiple ports to instantiate X-Git-Tag: for-linus-20180825~89^2~373 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=60cc7767b901dd1e3f70755c3d2505556ba487c2;p=linux-block.git net: gemini: Allow multiple ports to instantiate 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 7b880878f22b..bd4602ebcea1 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -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; }