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 DF0DEA034D; Mon, 10 Jan 2022 12:36:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CDDF4117E; Mon, 10 Jan 2022 12:35:41 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2089.outbound.protection.outlook.com [40.107.94.89]) by mails.dpdk.org (Postfix) with ESMTP id E1A57410FC for ; Mon, 10 Jan 2022 12:35:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DjiSFfyK7J1qaai0wft7jkVI7K75fWhXlQiA50JglPLahxpcYkLxCKuYE9PTG5vSZKkreXstWAwWdtaofcAUl2R6fa1olVCYF+sadlSD1rmVvDPNPiD53TNF9fIqHqr/h8Un6p+CQA8i/pqJ7U0NymRaX7o518h4ckflzNa9WFry9P6TzHjiKIa1RRGWQtxrfILc3EZOjn0uw/n/6B3KMSexv0+5Hm5GO1GzDbJuorQUiA80+jmzkwv+8BNKPLmFdzowe0T3w3EJoe8lAFErtLG4VSQ3bh0cx06mGmjA6NF1IbwFGSMTb803ymmRjdcnDBu+97RJzG7A2kYBfNRaHg== 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=GUu28vnZ9ISIbby5FD7Acu6YBVfFnuluPJLI0vIswmk=; b=XVKPfoS1kCGJ6w1vjMMg+Thm+qLOjTVzkEPtv3BQNH8wEUbuTtzyByKjLvIYFIOi2akk6B4IRQ0ECiv+RpLT4CEPPbqYlfCinHSR2S40i6Wmim2MB7xskvIzHwk8++jfhn/snPN+QFpUaXcWPj0q8Vy81jPi27uUSk+JbCaUZpFZvWSUQmT+pFwA2+VHIbl2POlGmL2m1pvq3YTZLxrClSp3PVywS5PGBW+WCpOGyw6sAN4bgA9lfgZQFbvWaAtugsXjSI7YVcaNY9uw18uHCSc1cQ3VHCutyJZN4RQH/eGP3MsY1ymAoHh/YdB781wXal5AIxBwdkOvPpUiq5q+Gg== 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=GUu28vnZ9ISIbby5FD7Acu6YBVfFnuluPJLI0vIswmk=; b=kXPlIe0TeWAw2MiHiGfFMoSDzE98Nf7+tJuoAyj/Kf5qHvcn5582csr9zkPoSpj5fDWLqL8Tf380AggZuCWw4uMFDQUeTKwkIh0l45swh1YI+dXJwCMqrMe+M7l8qLfFA+D2+iSsJKykw6Hc2z5htNZ72QQV6mZBuM08q4IFt9w= Received: from CO2PR04CA0146.namprd04.prod.outlook.com (2603:10b6:104::24) by CO6PR12MB5489.namprd12.prod.outlook.com (2603:10b6:303:139::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Mon, 10 Jan 2022 11:35:38 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:104:0:cafe::ad) by CO2PR04CA0146.outlook.office365.com (2603:10b6:104::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9 via Frontend Transport; Mon, 10 Jan 2022 11:35: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 CO1NAM11FT021.mail.protection.outlook.com (10.13.175.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4867.7 via Frontend Transport; Mon, 10 Jan 2022 11:35: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.17; Mon, 10 Jan 2022 05:35:37 -0600 From: To: Subject: [PATCH v1 6/6] net/axgbe: alter the port speed bit range Date: Mon, 10 Jan 2022 17:05:09 +0530 Message-ID: <20220110113509.553184-7-ssebasti@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220110113509.553184-1-ssebasti@amd.com> References: <20220110113509.553184-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: 4e4c635b-08a9-4632-835e-08d9d42d5336 X-MS-TrafficTypeDiagnostic: CO6PR12MB5489: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: VEBG+O5+Tcp/+oDUFkhMK1voKFN1LBze2oDfkTvOX5+egzZQfGfaFnDYv0pOUJ2B02tDj9f6NKavOCNRunq6UpWhobOAXVDa6faojetGZ6dMUef3ZgRi0lNvL8UEgCi4fHD1ziwwSOsKT1DJ9Be3Rigvjah/WdqHFsL19LSSz9TBn1Xb5ufyMdZTc/OYuXk6uvZiNgObvbe/A1RUUz3wx25ztRksfQbVzWpSzAXlV0scsbhnbDXVyk8X42+WjnawIfld8EUtFf27KIm8sBk4SJ8ofjmy5KZdsZAFg4V7dGeELJ/V9lUTsoN6DAtrOu5F/UUubiOw8JDFis2FVH6114thRWRBsWr9hq4YGzwEIcuYvRdray9oEkU2IojNwsNB2V53GffkDSaT9fgr8cOpFCvc0D0212TBb1IPMGNbQUEqOImCDDYqOrzEyDiTxPy4f6XcMpzzPWHyG9brhY/S8J7c9I/PWMU/G6uE6JIJfnoxfAUxHzVRlwI02JFa8DsIBIlby0u2S4Z6+/lc9bZnBFhcdNmvy+eNCGHl2as8qlA+Xz3Uw6/I26lbOuHjHFMNgXQ8XzpQArXEZMdX6i+pt+aSm1zpgROdat7mZOLej1uwfvYsccEf151WTP5GIo1nYjUtgsfKhHD5vOnwzc9HYPlohCLWYUB3nyDEdcxd2+L6bgbV6cC5Nb0+rldhTpPeuVpf30ZMl9F+WN6kBEuQ0WScX1GGpqd68HqdmF7NrIXGxxg6X9rv94evef7k1e9aJ9WEqh/tgj8NmZ9j/c1K/2FlHCK6sa47UK5+yGnC2pw= 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)(40470700002)(46966006)(36840700001)(70586007)(6916009)(36860700001)(6666004)(426003)(2616005)(16526019)(82310400004)(2906002)(336012)(70206006)(316002)(7696005)(40460700001)(1076003)(8936002)(36756003)(8676002)(5660300002)(508600001)(26005)(47076005)(186003)(356005)(2876002)(83380400001)(81166007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2022 11:35:38.2771 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e4c635b-08a9-4632-835e-08d9d42d5336 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: CO1NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5489 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 2aad8babd2..776144696a 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