From patchwork Tue Jan 14 16:47:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13938971 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2065.outbound.protection.outlook.com [40.107.247.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4F4C1B2180; Tue, 14 Jan 2025 16:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873270; cv=fail; b=kqRwNY1Mc2wrj72ZjP9rDXfchyDhdBVBMYcMLpTR0bKr2XEJWB1jWW3boB3gIMIGUugcV9XUgXfkYfQ76g1W/l0u6860ZVHa71L0bBnoaDzkltka5DgKiJN2GxvqsaE0crPpqf3k0YFP49Jm76wO/yWLmJnTUxPhxWjU+A/7eeI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873270; c=relaxed/simple; bh=9ATifKY/tAmH83o0EUtlVDvnXXNKt4Uq/qjawXHTih0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=hFM9Goi14jkJNRJBNd52qOkcrVFHhmMFO3Cx8F/4nDVZkZodnBS4TC+GM/cFHIQI3/dX5AijmiQkt59XdhP874lrr3qpbxgkw6S1XmDlX2ra3EwUsBL86yxth+VNTMilTiBzvenc5yP4W92cMAmJgRdwgqKl8MjZzX3pXwp8A8g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=KYJ6oY8M; arc=fail smtp.client-ip=40.107.247.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="KYJ6oY8M" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IUb++dPCn9s0Nvsdeon7X+HcXLWlFRzC5qu9AwniVSJTupbKbCmPpf+Un+Tznl5LB+SM5rqe8XWPfwu/TGEhpfSveJgbFuo30KFGt/QBZ5Xf8tLaBnmvFXorOSoakDvKBMZ5TcvaBuWxpnt1NuKCHQeZ4Xvxt090Mv1lIRJAouoBKlxDblwrzHUxxYd0l+rAHZ3alijdAyBEkDe/RJYIdCI4nwhuYRnr06AQFG/7qwomMirVbgohL2gULvmh6+OQis66uAz7+oLY0sWOcOLE5DrWhis1YDa5Cm8Z8ZD03hvjeL/6tO5kPTo6+7mq16QDA5xm/GB1P77NUWJhZJHIQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KAFDw/yjBwZN+1TiS0+ytoXf78smzHP0i2X8OhZxhaE=; b=Ru/trASFDhHDc3UWW5vNOe1AfBy3RH9/HKGwtyzHE+9pUE7JCTcXpn0vNoCPe1H45EpprBqQUKJVRske/83f8P1csAl2kbVYABMRDUQqwIXRcB7odwTehqI7xMyHp5aJd1S1f4jfNwY7gkSU8FfuE3kg/xnJ960DFqvFbOYHs4wPz+vFCfwYIyzllZL4E4+tGCyNPYLxBglDv+xqygQK8BLoY+TH1H7IcFwwM9y4zYQE12l+YIQC50ShhRhqtsEjTmZLJ0ELpThpnL1wTrRQDFm96I3R+Wa7HPyTrnZcGTvvP9hSoLD6n2YsxmaW0Q6tglYg2IbOzfh5LmBp0yWm1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KAFDw/yjBwZN+1TiS0+ytoXf78smzHP0i2X8OhZxhaE=; b=KYJ6oY8M7HOavPih/3HFesRr8oHRpXIjYB8eCWFPIkz4n6G0UhkJq2EKEh53pCfaBuCYvTH6EAINOGj38rq0z4EW0O2YPcvcEkEmp8d6/VNs4jTzsteIabhKTikZqsq8PZ4gnpr9/sXRB56wtheH/25CUIszJcgnuHQUkaT2+30pR0CZyiB+ShEKBN0PeCGg33q0twHhjnvMlSZtmTIeTr3JdmWOV60J5fzUEiucrU07EabErYdU7oS41B9AyA0Rg+JXNerDNZIbssQnhvZbXrET5w6pQ7EZNIgxuH1fLCb1C3Jcr1Ap4zPl9ceXlHvuJexLk5tiphXSdIh0gFzYzw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM8PR04MB7779.eurprd04.prod.outlook.com (2603:10a6:20b:24b::14) by AS8PR04MB9205.eurprd04.prod.outlook.com (2603:10a6:20b:44c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Tue, 14 Jan 2025 16:47:44 +0000 Received: from AM8PR04MB7779.eurprd04.prod.outlook.com ([fe80::7417:d17f:8d97:44d2]) by AM8PR04MB7779.eurprd04.prod.outlook.com ([fe80::7417:d17f:8d97:44d2%6]) with mapi id 15.20.8356.010; Tue, 14 Jan 2025 16:47:44 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Russell King (Oracle)" , Voon Weifeng , Michael Sit Wei Hong , linux-kernel@vger.kernel.org Subject: [PATCH net 2/2] net: pcs: xpcs: actively unset DW_VR_MII_DIG_CTRL1_2G5_EN for 1G SGMII Date: Tue, 14 Jan 2025 18:47:21 +0200 Message-Id: <20250114164721.2879380-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250114164721.2879380-1-vladimir.oltean@nxp.com> References: <20250114164721.2879380-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM4PR07CA0024.eurprd07.prod.outlook.com (2603:10a6:205:1::37) To AM8PR04MB7779.eurprd04.prod.outlook.com (2603:10a6:20b:24b::14) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM8PR04MB7779:EE_|AS8PR04MB9205:EE_ X-MS-Office365-Filtering-Correlation-Id: dd11c351-30d6-4a9f-2cd7-08dd34bb2b4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|38350700014; X-Microsoft-Antispam-Message-Info: bX0qqBcO1agvumef52QdsxCWmFR6Y6ZY3k/wR0BEUY109DBI/p6LG1/lobzUgkBw1iV4HfDNGRncmvYcsdYwZpfvcXGZVDMIed8jrWVXCGpDkPQSZVm00XiH0nIi3ffxtX0DR8VXR7JCvZ7Acvj7/z8C/AVyr/Z8FeQTnFdnlfVqtx0KSm9UhGgKMkywVj/EcBK5dKZh/PaHI13bh31ch4u4/Tj6npd9ijk+hDKLIeeld9gZM4NJsAPfOa2mKSnDlts50YyzEqAGJfr5At3AsM90IvcYzOer0c4KTqEuOfPEdbFCOupQs5hDRP2VWrSbC2FG6evTewH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qMCjlvyIlpc0eK6UKK0ncvQ1TCavleS2ctYsB1XOPFqGMt5nJaoKb7h9q92jgefJRo78PLM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR04MB7779.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WX+sd0n1ERVtVmx9CPKxEFHKRq6MJ5BN1Dg2TjVu08vP2JE8+UjtQENgxRAAx8Fnax5f4w4EE0bQ2L8pN3IT+76w9YNFdOWeSQXsQe62VUSSN5IKaFCauu4lqILptgDWqjuTH/iHS41aecd5vtdTJ8CRvaQmYhmmAyVjkxJ/m5jBO/EyXVmgbbF+nqzYjiz4zMWQcHgclCY5HI6+L8h87lR+fuQ4GwsbwIdn5/Cb2++mufv/tY+9dzd1x/y9tzLXi+0AoZTJsOsslRYjRVNFyTueDc/tFL7pNoU0KGjKNCSWKSpBGvH9TpYtqWv+AabumyrNd5gu4cSRw0ksLMNpw5KpoH7v591kdl2ul5lpeCXEqN5Pivb8h+mFlyEssKD4CRoTmw0MoZxS4Jx5dVcGFEg8CUIxGkK9gjRhHs8flh1ERZRd3t4UaLIOTHCKqv72eiMlfMWyuyYpS++JscRLuqnnSlvv6MGrgktw99HweCwWDvEmGHaFZ+ItIPAZpSVfOWE/5ClD5xBbM2+b3eSmrif4HPW3mnYmkopiff84PAGszbSSVb6wKkkVxdD6WiHsI6C8E0pK14FTVKx6DsjbNjwI2ckPfYQhSE13bw+Xq5X5aR2QYmwfPv8zSvs4RXC8iImcp2RlmAg+QG0kjr2LsZevEEzLwiVAaqK2d+IzpzK30Y0Bc15CjfH99B/vWUedWI918qWehNxEQIRpFg74/f+2hG8rFjgSGvfA1qbveXEgxLYdNqUmSDJHVxh5Iou1kceB+9gwGnit2mgo2iGO3hL3N8geKMI4OSl6oDl+gmBH1oGTYuuI5e/mlH+763mZyHZEQspZ21iBB5b4r0KWg+ToeO04gLVS70qtSCU9F++dAQbSgTOaegypHrld9xKRCJByvRzmwzpxpwkXkHPWAQBvLoPsSNpWA5PMYOAT/q5vj/CSUVU1UBBZWm23xbM5wkJ+LPhFtLIwoGsR0Y+Gt3LMbHIfOZXZ3eBN/dEMd4KKhzFaVF+LDwrctfPIH5LDMGlyha6qSSyHgylDgKPe68nHlbZkusqoTjnF4+h2zgZOtEVhe6SRatZrOQjyZUaKyigmoRxQ3cX+s4IWeS4tZ094TtztCPziRWQWqYP4Kv8PkqBbhlzLHlhQvUtWnL9PkDe1f88AkjQLxLECc22LxoCDyAA60/QWClrO/Rtbk66s4ICGi4mrKc+2KJa7cyHHgqa9Jw2n+26QVy3z1iTJrmmccgFF8iMOO2cmHe37T7PD6NkL+idfZwQmUE+/Pcn0n8uE8WLxqK+OJDxvVbd+1iPdoxWlZGuYeH2ahGQFBGsktDoquz88ToepI0ZCPheqXn8rBxWfDGXpBXmHzpqpoXBqWNUP2kvI3u8Cs/3PAwb5EHjb+NtGybyo0vTeeMOdHAZvh7W7mc7CtJHdDsTAn9ktEnQrZsNLpYI2P62O4/jG+6wyWuwxNIjJEaiWmqtHOeNpwfOGt8QgfB78ZgXkVWnHNmthjo3oISJcdKV85Fyd3txiTCFILjAoiq6uMd5RNpYh8KGRuawnyCR+E59TYWZH2trUNTX7hJm7kFlnaMJJK72ePeaMoJBDWZckaRBr0Un6DjaKbpxtapzunikuog== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd11c351-30d6-4a9f-2cd7-08dd34bb2b4e X-MS-Exchange-CrossTenant-AuthSource: AM8PR04MB7779.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2025 16:47:44.8047 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oHit+06l3GYCH7nB/qMFZGInSyELJFNSU8YgVKKbaTeQ+6e5IeruGDSdP538fNijTIFSV0fWsdhLJBGuzSyfhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9205 X-Patchwork-Delegate: kuba@kernel.org xpcs_config_2500basex() sets DW_VR_MII_DIG_CTRL1_2G5_EN, but xpcs_config_aneg_c37_sgmii() never unsets it. So, on a protocol change from 2500base-x to sgmii, the DW_VR_MII_DIG_CTRL1_2G5_EN bit will remain set. Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller") Signed-off-by: Vladimir Oltean Reviewed-by: Maxime Chevallier Reviewed-by: Russell King (Oracle) --- drivers/net/pcs/pcs-xpcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 3de0a25a1eca..2e2cc6153fdb 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -729,7 +729,8 @@ static int xpcs_config_aneg_c37_sgmii(struct dw_xpcs *xpcs, return ret; val = 0; - mask = DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW; + mask = DW_VR_MII_DIG_CTRL1_2G5_EN | DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW; + if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) val = DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW;