From patchwork Thu Dec 17 04:02:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David Rivshin (Allworx)" X-Patchwork-Id: 7869331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1DBE9F32E for ; Thu, 17 Dec 2015 04:04:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1985203EC for ; Thu, 17 Dec 2015 04:04:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03727203E3 for ; Thu, 17 Dec 2015 04:04:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9Pmq-0002Tu-KD; Thu, 17 Dec 2015 04:03:28 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9PmS-0002MF-T1 for linux-arm-kernel@lists.infradead.org; Thu, 17 Dec 2015 04:03:06 +0000 Received: by mail-qk0-x235.google.com with SMTP id p187so94005345qkd.1 for ; Wed, 16 Dec 2015 20:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qCR4QGolQN6PySIU3pytLpg1wK2ZO1wJYSp0va+1w6I=; b=ZP+seyT/vKGVhp66NCcN3lzVfO7yCQ4MXLn4xmTatpTQcsUu/XVHMqxX93yeIp5vV5 SSrqF2Yp4I9VD8Jp9vwqechojHWX8cdclOPkUwZXphXnCbxffMIsMg1hSXITtuZ8brWF DssOZobIxpyw4zPWwhUvucI/ARRcRcZ3hEwV6KniLMeKA0e7bkK1T9dbS3HeB3toRg8R G+Hh/ZAvJ4ebMguXQpstN6k8/cxdOmAfMTENa/LZIgtpwsq7NZo2tRui6MaA0GghsTLf Hl1Lvz+vsOZAXac/JN7e95a0hqzQ+CDfXreZnMgK2ZYwEF2sm5TWzmR3SeDbZZ+YdKIy E12g== X-Received: by 10.55.80.197 with SMTP id e188mr3761873qkb.10.1450324963922; Wed, 16 Dec 2015 20:02:43 -0800 (PST) Received: from drivshin-linux.crosskeys.inscitek.com ([24.213.148.66]) by smtp.gmail.com with ESMTPSA id a15sm3944731qkj.42.2015.12.16.20.02.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Dec 2015 20:02:43 -0800 (PST) From: "David Rivshin (Allworx)" To: netdev@vger.kernel.org Subject: [PATCH v2 1/3] ethernet:ti:cpsw: fix phy identification with multiple slaves on fixed-phy Date: Wed, 16 Dec 2015 23:02:09 -0500 Message-Id: <51520f9b588a4386bed12168d6b4ec3441bd635f.1450309613.git.drivshin@allworx.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: <20151209223115.6c5a400f.drivshin.allworx@gmail.com> <5661B765.3050504@iktek.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151216_200305_133798_0587CD81 X-CRM114-Status: GOOD ( 11.86 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Brunner , Daniel Trautmann , Mugunthan V N , Pascal Speck , linux-omap@vger.kernel.org, David Miller , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pascal Speck (Iktek) Date: Fri, 04 Dec 2015 16:55:17 +0100 When using more than one slave with ti cpsw and fixed phy the pd->phy_id will be always zero, but slave_data->phy_id must be unique. pd->phy_id means a "phy hardware id" whereas slave_data->phy_id means an "unique id", so we should use pd->addr which has the same unique meaning. Fixes: 1f71e8c96fc6 ("drivers: net: cpsw: Add support for fixed-link PHY") Signed-off-by: Pascal Speck --- This was originally submitted by Pascal Speck on December 4, but was not picked up by patchwork. I suspect that is because the patch was mangled by the mailer. The only changes I made were to manually fix the patch whitespace and wrapping, and add the Fixes: tag. drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.5.0 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 48b92c9..e3b220d 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2047,7 +2047,7 @@ static int cpsw_probe_dt(struct cpsw_priv *priv, if (!pd) return -ENODEV; snprintf(slave_data->phy_id, sizeof(slave_data->phy_id), - PHY_ID_FMT, pd->bus->id, pd->phy_id); + PHY_ID_FMT, pd->bus->id, pd->addr); goto no_phy_slave; } parp = of_get_property(slave_node, "phy_id", &lenp);