浏览代码

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 <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Walleij 7 年之前
父节点
当前提交
60cc7767b9
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/net/ethernet/cortina/gemini.c

+ 4 - 1
drivers/net/ethernet/cortina/gemini.c

@@ -1789,7 +1789,10 @@ static int gmac_open(struct net_device *netdev)
 	phy_start(netdev->phydev);
 	phy_start(netdev->phydev);
 
 
 	err = geth_resize_freeq(port);
 	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");
 		netdev_err(netdev, "could not resize freeq\n");
 		goto err_stop_phy;
 		goto err_stop_phy;
 	}
 	}