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: 141768 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp675990ljj; Wed, 11 Jul 2018 12:36:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4v12+SGdNTCKkMjhapQM0RjJSk7ageQOR6A6nDCGiR+usj0U5hzE009wVXD9ThFeion5k X-Received: by 2002:a62:c505:: with SMTP id j5-v6mr7242961pfg.153.1531337778006; Wed, 11 Jul 2018 12:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531337778; cv=none; d=google.com; s=arc-20160816; b=awSk7rLV+27t2Pi94d9JU+dHx5agcrklDyBCxXlGRqxAzfx/EspCE6enb/EDBn21Pq AR2QpdSyKCp5ibjUhvtv6rohLusNBebswrKcK3vImH5QZ0B0DYzMxlvBL/JV/UFLm+KO KIik3ahybrYhFhsnrANpQVrl2jIijZ19+6BJpYfEPAs5yD6Vb82p/1ml6bUsYZCRoti5 11l4DJsFvxH2iVJWID40O9LGV5R+XSiI1jmV0TvOpV8c4R59bkk1RgAp+tZnV1utmoaZ pdN1N7t0AmB3OPEslP4FrOiXe6AtYBjabypO223NyO2OqicmofcJK7bFerD+q2VM+Z3Z xoDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LpgAKbHTu/H1aGrfb5s3js5+h9rRQAfrwcPR6GXVOnM=; b=0NyvXNuXxyGg3eOT5r/V1Egnf4JV+CcQvAQK7drWFzcbtYbxkAw0pUKXrRoorBnSmh LUPW4WBb/VmE1NHQn/7dj7g93d5rWWfVmmui+Ogw4jBWf71qN/XcQinFECKDHbavpZzd GlyCWVmqnNgZ7dl+5vjUWttPGMhwXfK/oJ+yoVcaME19rUlDvyks3sZRf6tQ27yGXW3c ERg0fcPhkJVYtwCjxgjQvLbSUOm43TtQgaT5axLuAYAf+jdShtaNn9txU7imUWfc2qn/ 5W3lvELbqIlvRZoDYcvbtx9aYC7NKLNAJR8huOBUSfzNipm85B9KtsD++i4RJjIgtg2h ru+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XeFA3jJ8; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 85-v6si21344993pfm.264.2018.07.11.12.36.17; Wed, 11 Jul 2018 12:36:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XeFA3jJ8; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388343AbeGKTmE (ORCPT + 10 others); 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-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(-) -- 2.17.1 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; }