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 E2634A034D; Mon, 10 Jan 2022 12:36:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB4204114D; Mon, 10 Jan 2022 12:35:44 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2074.outbound.protection.outlook.com [40.107.220.74]) by mails.dpdk.org (Postfix) with ESMTP id DDD174117A for ; Mon, 10 Jan 2022 12:35:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g3DaxQ+UczB6CjWYm625HIkD8RK6mbdO3ckt9wfbTgpg7eo20LdsBP2k67Ctwnpdgd14sN0kAWe11ERZ2OJuYBtb0fgbb3htIjN9VDJ2CyAdOTfBvHVAedwCmEuTWkg2RGF97gSCxpZZmaLJVWTSnDPZNQkgE3XMXkzZSvT7QGdhQLajmcqdG0l8v3HNMYsAhSKv5mXndv0y0ba6sD/SYii+7Wte9BG1FqAnfksNR5SmD6xjOCnfKTjj5AW9UwSjwEu/bMo8dF/v4rSBgW4f2Xrpb/n3lgGtW+dzgVyNme5GNWnzmHIOjj6CF2EnQJzvFubCUVC2fEHm5JmjV6wK5g== 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=azGXpJ5Otn7f/HWzUYEnPa4pJKVL4xCS+CbfFYhIS6Y=; b=cA9/Jy3k0TYBEJXT/P+2rWMP+nfxc0YO0YKjKem/2oPj+H33HEyVqvc3BFqXI3IBGc2hNr2qtDtGNXddMYbrXW7pFX6Sm9oOklkM9DEerypKQ8Da8mEoQJok5bebB3hxpnfLjNR//AW0ZpYGReM2mWTKnTPtDrRQ4UfO34kvUXmwwN95CstFFcHbl5OmfZ3kAmNPnqLTpTObWtMtd6rbxK2Vnb5AQR1MowxUS4IPCdJngL9kIuO3Tb1jmPAUmpdz0Hr2HzmtpNzRBvVj28YBhA9FOWVNDA30kNMrjhYo6FX6Eg3ctED8xGtwaVylHMcc7N19GqKxzgBpu+tVkhPKkQ== 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=azGXpJ5Otn7f/HWzUYEnPa4pJKVL4xCS+CbfFYhIS6Y=; b=Xa7L9aIk/988mWWAgGW80NsVw/QZ0Y6+bf01TZFUXW9kPEf4rzpav2SdDJhB0fowzYGTHi6dyLe9nH97soL2yxBQXPP8zoJQ3BMwL7zig6p55zrBgBy7lALuGT1o/xR1jZYPPx1O/KfLWvvNQFBjEBMAyhVcpaNSbl+ufG4Kkzs= Received: from CO2PR04CA0153.namprd04.prod.outlook.com (2603:10b6:104::31) by DM6PR12MB3867.namprd12.prod.outlook.com (2603:10b6:5:1cf::33) 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:37 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:104:0:cafe::5e) by CO2PR04CA0153.outlook.office365.com (2603:10b6:104::31) 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:37 +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:37 +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:36 -0600 From: To: Subject: [PATCH v1 5/6] net/axgbe: add support for new port mode Date: Mon, 10 Jan 2022 17:05:08 +0530 Message-ID: <20220110113509.553184-6-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: 95c0c194-0496-4e5a-c489-08d9d42d52d4 X-MS-TrafficTypeDiagnostic: DM6PR12MB3867:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1468; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dsNdcs57qQU069rdPgYc+LRGHfoXo6EEW0/3P2/gxqS6GhgTRSyAKQstpVGI38LntTwpn1vkmFjgGT8ecaSDvPsa9cpQ0LS+P60nwVwvUk6NGA/w/mNsyfcWgQnGV+aYoH/36NnsFdbAF8H8E4z8Mw3146hAeJs2bGcjf0qp7eP1s8/8+80G4AjLBiMYrPy61StfpPJHGfeRt7qHZaN7vSksGENd88ixUzL9BlnqeIePnYvwP0w2LvrxPVGfvnCGT93u+c35jaRvCdzU+R4z45QJPp+Y64qwN6XZC3vGxJmp9V6sBNLeqHvDDoCSwcbGZidWFZmIn0mmhorxdhHJQ4qs45i6D5CDNoh+VXB7C2kNQxiruJH/aqItRynvG7X5jMUA44rQfitYSPmw8cOk0tYQ3XJcWetP21LcWyqW1KDATnQuqM0GAVR+ofesy1OGkzhKM4I8YYuz7XHDfd3OwSuouGR+ufqR+nbSK3pg1ax3L5zEcdUHH5N+4ftWT2rDTak9b5cJfkOS8mo4TrX1jpSrJv/bMHShm7dI8kJKafsUV15fp+8QEkLJi/Mj6uEpqEp0P3nAnlfwWZvFZ1QcuOjpi4pWrm3FM6iGe0yIg41aGYGh7OMXvyWTce0TMLyqt1oEmGch+Kdf+3xiFAgETPd1AalqW5l06bRakidNX5FUa+t6U2vcArbIqmitdGy0695oSPTS0NmnT6u7KJxVKHJFVC7E+SZPNG4zai4zzgOyn3qbgkqXUDwkZQn2XPBEnGV2ERM7kw8iaWNJL3eJr7xXAiirvGDicE4pqQgXrEA= 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)(36840700001)(40470700002)(1076003)(2906002)(5660300002)(8676002)(16526019)(186003)(36860700001)(70206006)(36756003)(6666004)(26005)(7696005)(70586007)(8936002)(316002)(6916009)(40460700001)(81166007)(82310400004)(2876002)(356005)(47076005)(2616005)(426003)(336012)(508600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2022 11:35:37.6365 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95c0c194-0496-4e5a-c489-08d9d42d52d4 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: DM6PR12MB3867 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 Add support for a new port mode that is abackplane connection without support for auto negotiation. Signed-off-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index e52dbb9585..2aad8babd2 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -46,6 +46,7 @@ enum axgbe_port_mode { AXGBE_PORT_MODE_10GBASE_T, AXGBE_PORT_MODE_10GBASE_R, AXGBE_PORT_MODE_SFP, + AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG, AXGBE_PORT_MODE_MAX, }; @@ -885,6 +886,7 @@ static enum axgbe_mode axgbe_phy_an73_redrv_outcome(struct axgbe_port *pdata) if (ad_reg & 0x80) { switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: mode = AXGBE_MODE_KR; break; default: @@ -894,6 +896,7 @@ static enum axgbe_mode axgbe_phy_an73_redrv_outcome(struct axgbe_port *pdata) } else if (ad_reg & 0x20) { switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: mode = AXGBE_MODE_KX_1000; break; case AXGBE_PORT_MODE_1000BASE_X: @@ -1052,6 +1055,7 @@ static unsigned int axgbe_phy_an_advertising(struct axgbe_port *pdata) switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: advertising |= ADVERTISED_10000baseKR_Full; break; case AXGBE_PORT_MODE_BACKPLANE_2500: @@ -1122,6 +1126,7 @@ static enum axgbe_an_mode axgbe_phy_an_mode(struct axgbe_port *pdata) switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: return AXGBE_AN_MODE_CL73; + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: case AXGBE_PORT_MODE_BACKPLANE_2500: return AXGBE_AN_MODE_NONE; case AXGBE_PORT_MODE_1000BASE_T: @@ -1400,6 +1405,7 @@ static enum axgbe_mode axgbe_phy_switch_mode(struct axgbe_port *pdata) switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: return axgbe_phy_switch_bp_mode(pdata); case AXGBE_PORT_MODE_BACKPLANE_2500: return axgbe_phy_switch_bp_2500_mode(pdata); @@ -1495,6 +1501,7 @@ static enum axgbe_mode axgbe_phy_get_mode(struct axgbe_port *pdata, switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: return axgbe_phy_get_bp_mode(speed); case AXGBE_PORT_MODE_BACKPLANE_2500: return axgbe_phy_get_bp_2500_mode(speed); @@ -1644,6 +1651,7 @@ static bool axgbe_phy_use_mode(struct axgbe_port *pdata, enum axgbe_mode mode) switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: return axgbe_phy_use_bp_mode(pdata, mode); case AXGBE_PORT_MODE_BACKPLANE_2500: return axgbe_phy_use_bp_2500_mode(pdata, mode); @@ -1806,6 +1814,7 @@ static bool axgbe_phy_port_mode_mismatch(struct axgbe_port *pdata) switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: if ((phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_1000) || (phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_10000)) return false; @@ -1858,6 +1867,7 @@ static bool axgbe_phy_conn_type_mismatch(struct axgbe_port *pdata) switch (phy_data->port_mode) { case AXGBE_PORT_MODE_BACKPLANE: + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: case AXGBE_PORT_MODE_BACKPLANE_2500: if (phy_data->conn_type == AXGBE_CONN_TYPE_BACKPLANE) return false; @@ -2122,6 +2132,8 @@ static int axgbe_phy_init(struct axgbe_port *pdata) /* Backplane support */ case AXGBE_PORT_MODE_BACKPLANE: pdata->phy.supported |= SUPPORTED_Autoneg; + /*fallthrough;*/ + case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG: pdata->phy.supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; pdata->phy.supported |= SUPPORTED_Backplane; if (phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_1000) { -- 2.25.1