From patchwork Sat Jun 30 16:18:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 140682 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2138807ljj; Sat, 30 Jun 2018 09:20:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfXsI9t3JV0Xm+4CQdP/L8TDkXBKOqei/ym5DcPfW5MTAEwLPC8liSL2bZW+jdfW6+h1VxK X-Received: by 2002:a62:b94:: with SMTP id 20-v6mr18551558pfl.234.1530375643766; Sat, 30 Jun 2018 09:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530375643; cv=none; d=google.com; s=arc-20160816; b=ZGA34KkuHZQL1pgk/9I/LyvSwrt0Hn3q5Bqj8gwa046SgoIXprD65GaId5nYr9RHcJ bUzlSP4QnWxNgMweuPrTEafn18ezsrfwm0/+hIQl6Cy3P/5whR3wHT9qavYokpaEtkqy FgzjcVOvLtSHwzaEVcLBXE8eBxvUF0L+0B4ZgD3ploXjgo3acKaSN5j7Jjb2gXSNzm3v OQWGWbCecdPXC7E0ADChyojIFHhi0F2iUPn6r3ZizgOZdzFtwnt/5hd9ap5Xnu8NBMVi Q1TM1uZf86xPj4/2T6Rc/CiSaoNfbRoqeEXucldrtPsUWGPksXbphy09StGxGSOFdnsp TsRA== 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=bU62lQ3D52yGrEqTjFbWNMYMbSN8HfjijrnWjvZAtQQ=; b=sHtLEAGbqcySBj8G22rC55HI62eC3GG8lNYV3cOD6T/H8jfRRe/CQrQWMkOsRYc8ge JTy+9wLz7aVx1smVi7F6uj+pXhqPvfqYc3cvsedbBNBpP267g1OPBJ3m0hqltO+gQOwO YSfbicvqMjh3Y635EjhWcfkUBTnEajoMOojXpncVokLP3Qw949lyVMfr/0bJpO8lROhG xUUq8TKrQN51MhDCYt4fu1DvBhTXInHYa/lW22dypfbYSN0kimMdq4K/EoxtMkw2sOXU 1jofzrM/TP4SkRm/svIZAxcHcqjQqW7mNyN9FBGJbg2MkT2xIB43BPO59ovmiLQtFBdr Xa4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aDADMcSF; 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 l15-v6si3618264pgf.451.2018.06.30.09.20.43; Sat, 30 Jun 2018 09:20:43 -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=aDADMcSF; 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 S1751483AbeF3QUi (ORCPT + 9 others); Sat, 30 Jun 2018 12:20:38 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:45351 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbeF3QUf (ORCPT ); Sat, 30 Jun 2018 12:20:35 -0400 Received: by mail-lf0-f65.google.com with SMTP id m13-v6so8925018lfb.12 for ; Sat, 30 Jun 2018 09:20:34 -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=bU62lQ3D52yGrEqTjFbWNMYMbSN8HfjijrnWjvZAtQQ=; b=aDADMcSFgNOzkooI5MtNjQa62SPLUmLwKsBpqGEurVYf6KDbZlFQlShQIF+CQdkV1U 6T+8BWQEUELH0qpGi3wExLDJziZehYgMWei4LfZLgwbxdV3sQSW8NCHLCUtg/ioFQQvx wiGIeoq0j1oBh2/tcTrpDFqbtFlBaUVx6mAUg= 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=bU62lQ3D52yGrEqTjFbWNMYMbSN8HfjijrnWjvZAtQQ=; b=N6seE/fUP/NmH3kvl9bLAjlOc8fQQNkaJQ0JhGXk7bAGxR/JXGEpSwQfjDVG+4u0YT /61A6mAJNFZNowmyDL/KuOfTT6x/RVtIQsB8pXa1nigJIzbdDl4sUoUm5STNd7Dr1bQe 10f5Z4sKiFzV1XHbE+Frba0rQB3A3Brm0o5rLbQz3FHra/r18/fKoBLhYQouDH0X4Ale 7KKyMhc6qdKYzj5NqIcSH3SLvSyYmgMAURtayt2WwenYxpTTxBBQDbnVkqxjZGHv8Wn6 kXMK8L4ETceXwQUCrVpsvO6LyuJcIuAeZ3J2dEGYpm2KAv06Q894DVbvn95rMoc9fjuV f/WQ== X-Gm-Message-State: APt69E35KBaMW5spDZnhzh6vzOWzprSw0fCXucAILNvoxPsPx4vPKgdr +uJNWTsEjNRSavrdUcR1rsV5EQFkEgE= X-Received: by 2002:a19:1190:: with SMTP id 16-v6mr12047969lfr.122.1530375633531; Sat, 30 Jun 2018 09:20:33 -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 93-v6sm2271978lfy.64.2018.06.30.09.20.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Jun 2018 09:20:32 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , Linus Walleij Subject: [PATCH net-next 3/5] net: gemini: Allow multiple ports to instantiate Date: Sat, 30 Jun 2018 18:18:04 +0200 Message-Id: <20180630161806.24312-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180630161806.24312-1-linus.walleij@linaro.org> References: <20180630161806.24312-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 --- 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 b49ed8964026..8d192fcd51c8 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -1787,7 +1787,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; }