From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-cys01nam02on0090.outbound.protection.outlook.com ([104.47.37.90]:32953 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728584AbeIOGsC (ORCPT ); Sat, 15 Sep 2018 02:48:02 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Linus Walleij , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 59/92] net: gemini: Allow multiple ports to instantiate Date: Sat, 15 Sep 2018 01:30:30 +0000 Message-ID: <20180915012944.179481-58-alexander.levin@microsoft.com> References: <20180915012944.179481-1-alexander.levin@microsoft.com> In-Reply-To: <20180915012944.179481-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Linus Walleij [ 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/cortina/gemini.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/c= ortina/gemini.c index 6d7404f66f84..c9a061e707c4 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -1753,7 +1753,10 @@ static int gmac_open(struct net_device *netdev) phy_start(netdev->phydev); =20 err =3D 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 !=3D -EBUSY)) { netdev_err(netdev, "could not resize freeq\n"); goto err_stop_phy; } --=20 2.17.1