Received: by 10.223.164.202 with SMTP id h10csp3047558wrb; Tue, 28 Nov 2017 05:31:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMaqCmhGgXSM3nmOdzhujby3cdo7dlaHO9kgKHNFg2V/3dCl7aqHViua809cserbYYY4UTJu X-Received: by 10.98.110.193 with SMTP id j184mr40029575pfc.187.1511875891702; Tue, 28 Nov 2017 05:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511875891; cv=none; d=google.com; s=arc-20160816; b=0+02oRnr/UujLPmMo6AYldkzhOy7psIP5/CRdLkN4pO8gg4h1jdniHk6Lf/Ve5DLFI +R/ioTLapiFLSkU6J2Qvcb9yt9KdJUXwC8pDym5V56h9v7lZ+caaqnXC8JLFuiRmhmQx ZMDl0G0BdKGCUB6Hp4ckXwQkJDQLAxiybXRbmvD9CAAmYpJGyAmUpBGOOiMD+4xaF+fZ 9yCx6ASD9Bv3WrxTcxPGpfLbjsAUGZJfOFFGbT4mIMMQ304/7kdBWwn9I+2f9QmWKAo6 b65UbVh6bNXpb+FhGU3nj82s6JPPtvkLeP3RzloP2NwQMmOPSVu7QA0N5naCLc9+j+2F /06A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3V6oW9lM7ClbffSXsEuC25NKmkJd+WjrKpmX6PMFPqA=; b=XMfBB7VzyMiFIWZ3sfIQfiT7E6tHCAYdDw9FzX+cOeQaMS0Q66XnhZM3Qlt0GD65t7 eONIkB8vwfyG/ZFbjOET+lJmwSeImc6rsLTxIlzTFghhU/SDNeRiVDH4jj3FR/2phYS8 c3w08jBWx4gfdjqkt6x9EDUbnO1uB4an4ABDRYdBwamOsNtjYht/F50Xsz3/e+ttBClN 10OzVAU0+dvEeRlr5IPjSUzEvx3koiKekR6s9f0fWQTdvafbfMVDOta+pAkKLCNBJQxE IM3t5UQ7Lf8WFjh81gH/m+Y4EWCeQggKPvN9jjq3nqvaWLABm2S81Xb2YaILzeEl68zB EyNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39si25578379plg.464.2017.11.28.05.31.20; Tue, 28 Nov 2017 05:31:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753268AbdK1NaP (ORCPT + 76 others); Tue, 28 Nov 2017 08:30:15 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:60304 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210AbdK1NaM (ORCPT ); Tue, 28 Nov 2017 08:30:12 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 28B7B2074B; Tue, 28 Nov 2017 14:30:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id E84E320741; Tue, 28 Nov 2017 14:30:00 +0100 (CET) From: Antoine Tenart To: rmk@armlinux.org.uk, andrew@lunn.ch, f.fainelli@gmail.com, davem@davemloft.net Cc: Antoine Tenart , gregory.clement@free-electrons.com, thomas.petazzoni@free-electrons.com, miquel.raynal@free-electrons.com, nadavh@marvell.com, mw@semihalf.com, stefanc@marvell.com, ymarkman@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net] net: phy: marvell10g: fix the PHY id mask Date: Tue, 28 Nov 2017 14:26:30 +0100 Message-Id: <20171128132630.26619-1-antoine.tenart@free-electrons.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Marvell 10G PHY driver supports different hardware revisions, which have their bits 3..0 differing. To get the correct revision number these bits should be ignored. This patch fixes this by using the already defined MARVELL_PHY_ID_MASK (0xfffffff0) instead of the custom 0xffffffff mask. Fixes: 20b2af32ff3f ("net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support") Suggested-by: Yan Markman Signed-off-by: Antoine Tenart --- drivers/net/phy/marvell10g.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index aebc08beceba..21b3f36e023a 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -16,6 +16,7 @@ * link takes priority and the other port is completely locked out. */ #include +#include enum { MV_PCS_BASE_T = 0x0000, @@ -338,7 +339,7 @@ static int mv3310_read_status(struct phy_device *phydev) static struct phy_driver mv3310_drivers[] = { { .phy_id = 0x002b09aa, - .phy_id_mask = 0xffffffff, + .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "mv88x3310", .features = SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Full | @@ -360,7 +361,7 @@ static struct phy_driver mv3310_drivers[] = { module_phy_driver(mv3310_drivers); static struct mdio_device_id __maybe_unused mv3310_tbl[] = { - { 0x002b09aa, 0xffffffff }, + { 0x002b09aa, MARVELL_PHY_ID_MASK }, { }, }; MODULE_DEVICE_TABLE(mdio, mv3310_tbl); -- 2.14.3 From 1585334849476027415@xxx Tue Nov 28 18:18:48 +0000 2017 X-GM-THRID: 1585314493852004005 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread