From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9345A0352; Tue, 25 Jan 2022 13:20:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A09F429C6; Tue, 25 Jan 2022 13:19:43 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2064.outbound.protection.outlook.com [40.107.92.64]) by mails.dpdk.org (Postfix) with ESMTP id 691B0429B4 for ; Tue, 25 Jan 2022 13:19:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VqovlyXJSh4OrLaTU92O0I8ZZ06xalRKhOgA1nsl2npyO5nmhzriRp1e1QqqfLzlSTr7vbkT65zFcLbctD7IxXXwDIJuyKzaU8Ki7/6e8lCHKJe2+IxzZRgLePBmKonVMTWtz6SaC4pnM/b9v4p+DR43zMkl/+Nk1GwO3yH/ggK0h9/rVA0OtilIhDeaFXnbi8u5G8tBNxAsOnWxatGcc/r4x2pyuNrG6ifOE91igcfT+NuGyQBvbAmfS7oTUMz3b4F11mi3hUcK6jtD9Lc8+uy+SvRiibZWgOcBLvJsZAdSGujV9vrDk3HwGkfQeC74z76mwPbbF0juG+AquObC0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=PhgD1idLyQZK8E5d+/B6ee7TfiVqxGc3dtiZoNCPbD4=; b=dPi4G6Ig+TUT/aCk0LGHkOQ/S/zxaA7WHKF4txGp8bCgAXwnKehM6M34ebhdxSlhE823wIqjyCcaShQEdofap2/sS9UWmR29tZaYnT/ew6/RrBvxvy0iGDYb6iL/PnSszyRPAgtpXNKbIeZh5chUUSpT0odZo592o0pglsjgdf10/oUf6P0n6iHxA0xES5+41RcHu4j7bLcnvv6X/pH7nIbOPkSqaBGCgDDiEK2CM99sxeX/By3wth8ABcOKFNQf2pUtTNedBlSJUX9303b26d2a6X2XGzfkA6pmnz+vFmWEs7NpBFcjx/NIUswI0Z+nAIM2eDqt+9KN8CGAMdCa4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PhgD1idLyQZK8E5d+/B6ee7TfiVqxGc3dtiZoNCPbD4=; b=fA9XEJIZRf1+hqchO7iB57UIeVGt30pZ/iIzLOsqCRHfIVgeTFyZ4axhA8KsXzc+NssSuidDre/RsCrjaWBtFit1/lYHXjZNfHDpJtHHTa4HH/NJnArOT3oOXh8ukaX5O4799NJbQkCj6npks4DMxXd7IR/3/h/w4/R/6biCrTM= Received: from BN0PR04CA0045.namprd04.prod.outlook.com (2603:10b6:408:e8::20) by CY4PR1201MB0215.namprd12.prod.outlook.com (2603:10b6:910:1d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.13; Tue, 25 Jan 2022 12:19:38 +0000 Received: from BN8NAM11FT051.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e8:cafe::fd) by BN0PR04CA0045.outlook.office365.com (2603:10b6:408:e8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10 via Frontend Transport; Tue, 25 Jan 2022 12:19:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT051.mail.protection.outlook.com (10.13.177.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4909.7 via Frontend Transport; Tue, 25 Jan 2022 12:19:38 +0000 Received: from cae-Lilac-RMB.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Tue, 25 Jan 2022 06:19:37 -0600 From: To: Subject: [PATCH v2 6/6] net/axgbe: alter the port speed bit range Date: Tue, 25 Jan 2022 17:47:47 +0530 Message-ID: <20220125121747.344631-7-ssebasti@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220125121747.344631-1-ssebasti@amd.com> References: <20220125121747.344631-1-ssebasti@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6fad619-5876-49b5-b930-08d9dffcf538 X-MS-TrafficTypeDiagnostic: CY4PR1201MB0215:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j+DELffewcCqkFzPaoZmenzMte7OPV5FN5j/yStOS+avMyKPxG7+AQ0EBi8DNtJZbprKhDyYu51L5SGFHyHJP7RYcTYsBO8r2xauxCjIoZAMTNDQ64CnT5QhvvEcI/tqEiYLBy4mjPLxgd7afbnO10G/PPlCnWoXxPMUlYdNSqUyPmsSWKEgxePuxr7MXUCPzouw3zItTNL+z3MrX3XRZhxMUud7tnlMiPfTCgCG0Z5x2l+7IFFdwFFYKvKU3aw+9AtLgXJCmTX3Sa/9ZBKtSPMP4id32HmOTTeroy/gzOKR/hdnbWt3G+BCV6cUmX5cnDldhvvp8lcLc6SQGVUA+hbAgaKX3pbz9Qq1q15fNWlVnufhV94EhTOFyKWSf543p5abLcXpDGMQW5l4Wut06qBREH1FX38b8j1ZlVOs6u7s94e1pRtr9Jc5lAZ9DaPrCuaLE2nrlRCTrWsm9OgV2SlyAr5aRG2pudR+LsF1BmUIQoNDensesGS3rrDI1e2v2eL7Lm8gRXa5uUAqVmYRKzDB760OLXrrfrP5ONK/Nzt1RszqUdpxlXTqfeb2yqRNKxePmorYBpTMFrfOQiXNkffkZEh4w3b76lITtthm3M3uJRG0tnG3phJK6/Foli9VmMY6iRv3w0n3fgmCOw41MJepcfNq3lOHhjYoMsTtPAZTmbYp7M/H/6ySfRrXMrHAtg2U1QBJa+70uEg7vW66lqGUPsgZZsp8DBgngojojWZukzdIYzmf1bxzAjtHswE80k5TZykPaMZBdrH2K/MtM+COZ9NwYlNMCb6+fg5+Qew= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(46966006)(40470700004)(36840700001)(8936002)(70586007)(70206006)(36860700001)(7696005)(316002)(83380400001)(1076003)(16526019)(82310400004)(47076005)(426003)(186003)(6666004)(356005)(26005)(81166007)(2906002)(36756003)(336012)(40460700003)(5660300002)(508600001)(2616005)(6916009)(8676002)(2876002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 12:19:38.8055 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6fad619-5876-49b5-b930-08d9dffcf538 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0215 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Selwin Sebastian Newer generation Hardware uses the slightly different port speed bit widths, so alter the existing port speed bit range to extend support to the newer generation hardware while maintaining the backward compatibility with older generation hardware. The previously reserved bits are now being used which then requires the adjustment to the BIT values, e.g.: Before: PORT_PROPERTY_0[22:21] - Reserved PORT_PROPERTY_0[26:23] - Supported Speeds After: PORT_PROPERTY_0[21] - Reserved PORT_PROPERTY_0[26:22] - Supported Speeds To make this backwards compatible, the existing BIT definitions for the port speeds are incremented by one to maintain the original position. Signed-off-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_common.h | 4 ++-- drivers/net/axgbe/axgbe_phy_impl.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index a5431dd998..5310ac54f5 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -1032,8 +1032,8 @@ #define XP_PROP_0_PORT_ID_WIDTH 8 #define XP_PROP_0_PORT_MODE_INDEX 8 #define XP_PROP_0_PORT_MODE_WIDTH 4 -#define XP_PROP_0_PORT_SPEEDS_INDEX 23 -#define XP_PROP_0_PORT_SPEEDS_WIDTH 4 +#define XP_PROP_0_PORT_SPEEDS_INDEX 22 +#define XP_PROP_0_PORT_SPEEDS_WIDTH 5 #define XP_PROP_1_MAX_RX_DMA_INDEX 24 #define XP_PROP_1_MAX_RX_DMA_WIDTH 5 #define XP_PROP_1_MAX_RX_QUEUES_INDEX 8 diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index b0e1c267b1..d97fbbfddd 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -7,10 +7,10 @@ #include "axgbe_common.h" #include "axgbe_phy.h" -#define AXGBE_PHY_PORT_SPEED_100 BIT(0) -#define AXGBE_PHY_PORT_SPEED_1000 BIT(1) -#define AXGBE_PHY_PORT_SPEED_2500 BIT(2) -#define AXGBE_PHY_PORT_SPEED_10000 BIT(3) +#define AXGBE_PHY_PORT_SPEED_100 BIT(1) +#define AXGBE_PHY_PORT_SPEED_1000 BIT(2) +#define AXGBE_PHY_PORT_SPEED_2500 BIT(3) +#define AXGBE_PHY_PORT_SPEED_10000 BIT(4) #define AXGBE_MUTEX_RELEASE 0x80000000 -- 2.25.1