From patchwork Wed Jul 11 19:32:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 942660 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XeFA3jJ8"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41Qq7P5nzvz9s01 for ; Thu, 12 Jul 2018 05:36:17 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388343AbeGKTmE (ORCPT ); Wed, 11 Jul 2018 15:42:04 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:44775 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbeGKTmD (ORCPT ); Wed, 11 Jul 2018 15:42:03 -0400 Received: by mail-lf0-f65.google.com with SMTP id g6-v6so11511601lfb.11 for ; Wed, 11 Jul 2018 12:36:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LpgAKbHTu/H1aGrfb5s3js5+h9rRQAfrwcPR6GXVOnM=; b=XeFA3jJ8RTQMmuPlez3EvDhCWknfXX4ijVB1KFGuC7PnDlSMXIqIdqeAm1kH0Jeavo bAXWTD5Y4tDNlNKpKqbrV02AGvC5hKFIqVhW48q/HbgKmrZ1CNI29VbL/vepmvNFBu8V +Zhu5bnwqlrvEfLopjIEmGeihbU7OWIIDjVu8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LpgAKbHTu/H1aGrfb5s3js5+h9rRQAfrwcPR6GXVOnM=; b=C0SG8UsoR45EP/9YKyG7fAQwAViJSDuMZswBi/hufWLa/EhMx+r2Oxw8Dz3JPG9fJQ DnRbPEAA0V2ppUZW0PttnVuPNPEPCup2PYiZPIzexkY4an1Kjn+Q8WUjo/lUsZtXz4UG bUnKI7Fi3e6Kkb1LKr8QS6ts3hog6hwQxjaIssWggQuwiw1K7iJaqRsHTduX/AOpHzUJ UU8hO2XOC9y9R7PmvJfjUMu66w76OKV0JXiOxUglj9RkPSIAzqYlNK1nwwbytPvnxVoq KW8ZcHLNjCyXg9KzyJkSH5cZWAxsWJAgiLuDEuo5N+W2e1hiiyxcOPBiCLwg8EnzfKTR ZWtw== X-Gm-Message-State: APt69E0YFe5CLxqgsbuKIKfIDrfkISaQw8c8G8rhPg4S69UhGQEnZxzk CxCaG8lUYIbKf3SPJyQ2K0aEZCk+5ws= X-Google-Smtp-Source: AAOMgpedzI+kRRJs+WLPB6iMfq1qX1yuK5teugoQ5AJpwULO00r1RCm4cRlWK07G5Ebsa2A9nTZtcQ== X-Received: by 2002:a19:4e06:: with SMTP id c6-v6mr6615236lfb.30.1531337773450; Wed, 11 Jul 2018 12:36:13 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id y5-v6sm5502299lfc.58.2018.07.11.12.36.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 12:36:12 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Hans Ulli Kroll , Florian Fainelli , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , Andrew Lunn , Linus Walleij Subject: [PATCH net-next 3/5 v3] net: gemini: Allow multiple ports to instantiate Date: Wed, 11 Jul 2018 21:32:43 +0200 Message-Id: <20180711193245.21980-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180711193245.21980-1-linus.walleij@linaro.org> References: <20180711193245.21980-1-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- ChangeLog v2->v3: - No changes, just resending with the rest. ChangeLog v1->v2: - No changes, just resending with the rest. --- 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/cortina/gemini.c index f0ab6426daca..2457a1239d69 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; }