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 65680A0352; Tue, 25 Jan 2022 13:20:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 101F3429C0; Tue, 25 Jan 2022 13:19:42 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2057.outbound.protection.outlook.com [40.107.223.57]) by mails.dpdk.org (Postfix) with ESMTP id 1CF89429B5 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=OAdPaR86U1VSjZ2jRlmDwMkqjRBs989BRdeidhyRZ5a1g7kQ6addBEyLOowcnzH8WfBRC5oa45I5PRv1iUiyM5r9WWvkfT4AJW86s0P7oxxT5b+2u1YYc3e6hXv9dZh9j0dx/zZy5kBqVi+DTrpcLb4kgvnV4SKnVgti7iRLD4bZolkRufv6OpVkkgxcSlGwRjx2t4seupxdda2CITSWiUQOWHcipMHFaMaemNtUZ5zhdUzreIfVrJY5oqo7lCKkXbJfeku/KTbObMhNIGSJA+xK4mUkqaFD+IyD7UOyARELhHXPzO1bYR84LEvu7tFq/eRNebmH7F3/Sw9TcV3pZw== 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=XCW3e/QnxKAPeuWqGOkEPsxvkaQC/u5dOFeyczExS8Y=; b=ft90aDYGjbZI0H9vEZxvHRKWWiRjqfpVPKpJ3EIyMNVTpT/lpyb0ARTPK6OiPoHmL1MXQNSBjygYNn3CaSKfGLtiRG0AwUdKLuTgssMCPPkKx+xTBeK3uGdGqxLepmqZywRUD67Qu6D8BJtb9wzWO5mIyk1EIAjsKB/t68GC2MOrv7ZGM21JnizbYLX4iqNjL21NxF9iCCaTbG4kf6oobULV7V9h66qh/mbAIbqghXFnJCRzhIen0OJg0RJu3OfOpJY7tTtRJSx+UvUurOSXEAXTjCTxtthC03qwzjpFVfxGr8j/2nCUxdBn9OiOfD+mbR0EQ7V59w4/AE1j91cukg== 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=XCW3e/QnxKAPeuWqGOkEPsxvkaQC/u5dOFeyczExS8Y=; b=WG8H6YuGY+QqMRoH1Ku9LbYnU60xOgMNyxJ2/5eXjuFxgOKuexr6doMJgP25xFRYiuTQKgkteKoEdNYCFJH+1togoqAwRGvkjwbwoPngNThXiYKcPowfZlnaW29+D4SiUfvWBQNh11ruy8aluN7L6vGzPmPmbEpFZHzHlReWzCc= Received: from BN0PR04CA0060.namprd04.prod.outlook.com (2603:10b6:408:e8::35) by SJ0PR12MB5634.namprd12.prod.outlook.com (2603:10b6:a03:429::7) 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::9c) by BN0PR04CA0060.outlook.office365.com (2603:10b6:408:e8::35) 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: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.18; Tue, 25 Jan 2022 06:19:36 -0600 From: To: Subject: [PATCH v2 5/6] net/axgbe: add support for new port mode Date: Tue, 25 Jan 2022 17:47:46 +0530 Message-ID: <20220125121747.344631-6-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: 53c568e8-c4c4-4c1a-8903-08d9dffcf4a2 X-MS-TrafficTypeDiagnostic: SJ0PR12MB5634: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: T1vaGXM901XSKsG6B3th8A7J6jLSJgjYeHvjm5dXcC6f5Bujx4uNXRVlc/32+ZHKuyBeR3lU8hIPuujc5PpRGrPjfu7ySVqUONGOIgWN+aP8cKb29C2xwbpxbDSf2moINhrs8NvXT6VezlIbZu+XrdD/SyOYnnRJqcVJy0oVW14ZbdDHQt9amNU3JC2T4f46J+5a2noC1VullFhvSZXtOYD3vpoD6/2073HG5lA2ef5C8ZWqyAhQY3XTQo2cWLaWFwpqjNmoMvo4bFFSbMyQXYpxqfxgCIZpJTqmbfKtplm49OWIJ385lPshvG1mlj2NZfde0jmMe+oU+t+ilOim6IfucR9g+bTNUjKq770MiNH0RX2HVQjK4kd72WQYXcYibEkCyIFFckVtDbZyeCbSpreYMfUBBlkZD4qfeeBUFRIgqXmy7To4DXCtpilz33WbLQBmdHSKo+w/tZ5eVbo4gnI7Zqld3R+MkzEvEPvzVvlnFolU7SVzZNT8xG4HceqFLFG4fDc2e6qUwmbO3UQe1Ypdvi9Z/rffo4TeFItyM2fLi5AKr/S5E6kRVavPYN51uAq0P/RwgBMwa959/FSbrmsf9VtfkDhKPsRpkRafbh+ZLuIagOb2+gaoBMsjPtvfvux9Z12OzqcEZFBJGMgj+VDvGRU6LEmWbgF2u03MywxSPwvNAEghrIVgmYo0QmYKD9jFAEiEdgnrKTdJcJEQSnAYsNfBeTdBHTMmoBKJNVMIozVfgGWnpHJRMkFUonIs1r+ABS1z9GKjbh3/6IMTMpfqCwUS6+TqbE+AGEiMWcY= 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)(2876002)(6666004)(6916009)(2616005)(36756003)(70586007)(426003)(81166007)(70206006)(316002)(36860700001)(2906002)(82310400004)(40460700003)(356005)(336012)(8936002)(7696005)(5660300002)(16526019)(186003)(26005)(1076003)(508600001)(8676002)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 12:19:37.8368 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 53c568e8-c4c4-4c1a-8903-08d9dffcf4a2 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: SJ0PR12MB5634 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 a backplane 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 eefb03e94e..b0e1c267b1 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