From patchwork Wed Jul 4 18:33:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 141084 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1097850ljj; Wed, 4 Jul 2018 11:37:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfjSRBzjQlTFqeC9pIwvigmJWhGTy7A6QNBRjJ0B7R2FJelVySrKOcrTb6HdzLwSCEY7vI/ X-Received: by 2002:a65:5205:: with SMTP id o5-v6mr2842607pgp.108.1530729451586; Wed, 04 Jul 2018 11:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530729451; cv=none; d=google.com; s=arc-20160816; b=G0R91c40aZze4fX/RWO0kSViqdjS0B0Kzi+wRg+nWfdY1QMG5KxyL3yi7etS6aJ8x7 IHNBM4b/nZy7QXfORZuuf/wlKJS4MeS0LkKWjoQyfWeKrhHMZ/ciHn0RRFVvZDfFat1g h0/DNgc/qtrRdPDoS2gE/BKfO5ssn7HIdYYiJBBkmNKvm04gEvKYwGjuZftBToBZE8Ki 3uTmaTdUH5Ec9OxKm4SOy4NUd3GLDkYUXd4M4YndoQ/7Rhvqj93WT1WVj85w8H3ZV9yE msxypF1IKSJxd2v1ltCqw/0jMDbU3+EgjPgi6W3qeJSbbC8/OUR0PoZp+PY4hdYvUkxP W9nA== 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=6PPBwN1qDeLgFoQGn56q0rsA1XY/V0on4rQshZuYPCw=; b=JNQgn39Eb63E4/E0rn0Uz60kdu0STFHxVrUc2C5tdyPGqCFzWQNgYiNxngXS4srKQp BK54JfoAW2BCRiXYacmiA1Bt/JZehF9p8rbaUqNbb3dQnlf3B58w0XeIeapCcavCkfie 2KSYkZubA43ZHZ5Ms0e4tepxXNbtEthOvTmOHW3sLE20Gq+GAZZKle7Gh4L4ct/TWBpD f9oJSIG+GfwH+rEAVwHxIXzoE9uRsRGWhms1Gmes6s4MwrUmSNfteMJpXx6K1sYj9pKR MYY+ufY0hhocH71vjM/jKg/89w5hDMIKIAbvq6vq9n/XA0Fm5N1sCtP/HXc/cHT3XKET 7HJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hlQKdmbZ; 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 d6-v6si3961989pgh.569.2018.07.04.11.37.31; Wed, 04 Jul 2018 11:37:31 -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=hlQKdmbZ; 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 S1752755AbeGDSh3 (ORCPT + 10 others); Wed, 4 Jul 2018 14:37:29 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39306 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbeGDSh1 (ORCPT ); Wed, 4 Jul 2018 14:37:27 -0400 Received: by mail-lj1-f193.google.com with SMTP id t7-v6so4905245ljj.6 for ; Wed, 04 Jul 2018 11:37:26 -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=6PPBwN1qDeLgFoQGn56q0rsA1XY/V0on4rQshZuYPCw=; b=hlQKdmbZznJYBiu/9H+2EIo6IYYIpfqelQFdvkNaEUdcHmBJFS8JBI2+EJsmHvDHvy tPRSedgLFUeKWmEdxlxrbGlsPaJxzFSW25hYonKU5CuI7bi5InuCevwGHn+A1YADBBeW KkqFyLQz24Bu2Ni6iFj0nvjWSmQcueNFJmo0Q= 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=6PPBwN1qDeLgFoQGn56q0rsA1XY/V0on4rQshZuYPCw=; b=I7gmeNPSMMXpMDHDlB8j3vAQ4OxPf5d0JQclNDPDtsDpVxJzgLmWf7ws+aOHvGvwHo lWMnAWy7HM4EVibZmUmECCN/ak5vdjirsc3eg9b9HvwZimA+LpU1h1AmgrR6OXNXGNlC ht68CFrwjdtrhcVbXM3oKwUFP4fUb1/4FAAuzfQ9o22ohXcWmbqhIHuj7ib7jEQosdhC fkL6gdSLbtlz0sbRCn2uvu+1rguMhNwj1EeLY8j0HJxtuvDCy0mh9JAPw+ZoctM4KQe1 ufQW9Dtfx2P6BagGSym5mIotNqB4wzZ4fVAvbKG5EZ9lL+rK/rt8rlvlxErv6y8MOoOt cf1w== X-Gm-Message-State: APt69E3VSeZm1KTD6J7q0N/iaI/8FbIYz623C1zn05l2YOAVgM2cXDp4 lXUXHyKPiDYmgAAXL76l4AV7CWZ9PU8= X-Received: by 2002:a2e:5687:: with SMTP id k7-v6mr2172105lje.105.1530729445449; Wed, 04 Jul 2018 11:37:25 -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 g2-v6sm681094ljj.53.2018.07.04.11.37.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 11:37:24 -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 v2] net: gemini: Allow multiple ports to instantiate Date: Wed, 4 Jul 2018 20:33:22 +0200 Message-Id: <20180704183324.10605-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180704183324.10605-1-linus.walleij@linaro.org> References: <20180704183324.10605-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 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 f219208d2351..6b5aa5704c4f 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; }