From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB581A04F9; Fri, 10 Jan 2020 09:36:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 828B51E8E0; Fri, 10 Jan 2020 09:36:29 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2088.outbound.protection.outlook.com [40.107.223.88]) by dpdk.org (Postfix) with ESMTP id B553C1E8D6 for ; Fri, 10 Jan 2020 09:36:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cMZeRcIKYyQvIPVk+qWNneISk2jy2fYl0O6xkC4C1Yc2RL07n1aGEOL1FCBI4sOqve/ux8QxkWp+Hma6FdwKcktGTPYOCuALWnVucF+D30ZtTS79AsfnlfUppeTGYWd+hx+NzPZhwHUI0erRCBnTRKn+LFftL15t2D/n5lLT8v4UmmaHh0p6XVSGsHfHMRNGFkSSmZQ3D5d4LODpdSx+ZVT+4Hvd43f5YbaP0RvMWJyOp5PcpbNvXBIi72EC2HPH6Bd9vIDCTfAzdkbRnU7jIwg6TLPU5inuILXibXp6tE2UDpc8CDcE+Tr705wrTxPEKIUZOGW4y4M6Xg2xNvxREQ== 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-SenderADCheck; bh=3wrlk1rA5Wf53DRk5uSf6L2slgrJYYHd7Pi4vk7OUY8=; b=PYU41Tfk9kTekaSSV94eKhIyTuoBV0w2VGmGsFTM6ipiORupr87WlIZluzLHuSJz2rZWD+Fg1J0xxOPccjNrFA0+i3RCiDnuG2JUdhBgz9oBFmoKHwKqglMxofoOrytpoiLwPEpH6SRGpsydDTSOiKceUsQFzn4+gcKekj6Jj5Di57e/x6F2AEa8hsGUeRHspBRs5Lf1HJAvWqshj0+/hNJWHS1QmhRmgkhcGykaK007ndkhTpWaeCjap7YWWKeFeN3Yj07fOnblVCOmHa8nZFf0PYMBawxwzbtJ8uNu/u24ASGA0woUhX0Zt43hfPtkxlCjd7Rt4+b+gOwrWWZVbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3wrlk1rA5Wf53DRk5uSf6L2slgrJYYHd7Pi4vk7OUY8=; b=J/t9dk8mLQWdiaHBTCRZ9Eie4VM2fnbEzl4ZHdvmg64Xh2K9GhLinbze9abWAtQYX+fsskJ/0XLVKse1nbVkPwg3Ewbis9ILV+8fQJWIugTYE2aUcU9c3Sd94qjv/tC7bBxm2HwqIHWQuCV/KSEF9ZTCFWxQ72h/AZ/xQTIWFW0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shamshersingh.Sardar@amd.com; Received: from DM6PR12MB3193.namprd12.prod.outlook.com (20.179.105.159) by DM6PR12MB3052.namprd12.prod.outlook.com (20.178.31.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12; Fri, 10 Jan 2020 08:36:25 +0000 Received: from DM6PR12MB3193.namprd12.prod.outlook.com ([fe80::a51f:f98a:4006:43d7]) by DM6PR12MB3193.namprd12.prod.outlook.com ([fe80::a51f:f98a:4006:43d7%2]) with mapi id 15.20.2623.010; Fri, 10 Jan 2020 08:36:25 +0000 From: ssardar@amd.com To: dev@dpdk.org Date: Fri, 10 Jan 2020 14:06:04 +0530 Message-Id: <20200110083604.25864-1-ssardar@amd.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) To DM6PR12MB3193.namprd12.prod.outlook.com (2603:10b6:5:186::31) MIME-Version: 1.0 Received: from amar-Wallaby.amd.com (165.204.156.251) by MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.10 via Frontend Transport; Fri, 10 Jan 2020 08:36:24 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [165.204.156.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4597c38d-0d5f-4b49-883b-08d795a82ddf X-MS-TrafficTypeDiagnostic: DM6PR12MB3052: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:186; X-Forefront-PRVS: 02788FF38E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(396003)(366004)(346002)(376002)(189003)(199004)(16526019)(6666004)(81166006)(186003)(36756003)(6916009)(66946007)(26005)(956004)(316002)(5660300002)(66556008)(66476007)(2616005)(8676002)(52116002)(7696005)(81156014)(30864003)(8936002)(478600001)(6486002)(1076003)(9686003)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB3052; H:DM6PR12MB3193.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fd+AhSEvccHYURc7MaQVOOaiS//JqGfaiiKy8/Bw5OexnMQiiqw1hx8cq3CtLJfvkso5DC7mPshj0cEC0rrOfM86zWL0iYgmsfBxm2IS6v/xY4wINGBP2gC/iuBZeBamUc+sXOSHg0Xi9+FuWELkm7Hpieh+OCJx/Uvxelac1o8+4pFrCD6ucwYU+Xyx2XzxFzLdXlGpR+mmzOaC8kqSO7dnYJVbUJj0L+tTPrRoMJuZoAJA0XxyRJQwJpYFQbr9RmOFOeiYZEI/HdSgR6zfzU1qMordiTbaCCWGxpwD4ze2dRs2CBVLfSJ0QO3Jr08oMef8m6o8OIGz9glfvvs8ExIeQjSFI5tBXvgYkAgLNqDtIIyvpnoq/XJy+dvBiUQhpHIymSrMN0heyaSvJwYoGJq6xYlitAELFpkvLvCRqVznIYjB0Q0Nl3lduTm39v1T X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4597c38d-0d5f-4b49-883b-08d795a82ddf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2020 08:36:25.4721 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MapamxS1iLzi7u2H+CNppJ05AN+T8F2g0KLpMGWe8/73MZX0BkDbWZHepV8u3x8K X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3052 Subject: [dpdk-dev] [PATCH v1 2/2] net/axgbe: auto-negotiation support enabled for 1Gbps X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Sardar Shamsher Singh Added CL37 Auto-neg support for 1Gbps interface in axgbe driver Signed-off-by: Sardar Shamsher Singh --- drivers/net/axgbe/axgbe_common.h | 1 + drivers/net/axgbe/axgbe_mdio.c | 192 +++++++++++++++++++++++++++-- drivers/net/axgbe/axgbe_phy_impl.c | 37 ++++++ 3 files changed, 219 insertions(+), 11 deletions(-) diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 34f60f156..99fa92d5c 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -1296,6 +1296,7 @@ #define AXGBE_AN_CL37_PCS_MODE_BASEX 0x00 #define AXGBE_AN_CL37_PCS_MODE_SGMII 0x04 #define AXGBE_AN_CL37_TX_CONFIG_MASK 0x08 +#define AXGBE_AN_CL37_MII_CTRL_8BIT 0x0100 #define AXGBE_PMA_CDR_TRACK_EN_MASK 0x01 #define AXGBE_PMA_CDR_TRACK_EN_OFF 0x00 diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c index 2721e5cc9..3902b1ec3 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -29,6 +29,19 @@ static void axgbe_an37_disable_interrupts(struct axgbe_port *pdata) XMDIO_WRITE(pdata, MDIO_MMD_PCS, MDIO_PCS_DIG_CTRL, reg); } +static void axgbe_an37_enable_interrupts(struct axgbe_port *pdata) +{ + unsigned int reg; + + reg = XMDIO_READ(pdata, MDIO_MMD_PCS, MDIO_PCS_DIG_CTRL); + reg |= AXGBE_PCS_CL37_BP; + XMDIO_WRITE(pdata, MDIO_MMD_PCS, MDIO_PCS_DIG_CTRL, reg); + + reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL); + reg |= AXGBE_AN_CL37_INT_MASK; + XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL, reg); +} + static void axgbe_an73_clear_interrupts(struct axgbe_port *pdata) { XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_AN_INT, 0); @@ -54,7 +67,7 @@ static void axgbe_an_enable_interrupts(struct axgbe_port *pdata) break; case AXGBE_AN_MODE_CL37: case AXGBE_AN_MODE_CL37_SGMII: - PMD_DRV_LOG(ERR, "Unsupported AN_MOD_37\n"); + axgbe_an37_enable_interrupts(pdata); break; default: break; @@ -254,6 +267,12 @@ static void axgbe_an37_set(struct axgbe_port *pdata, bool enable, XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_CTRL1, reg); } +static void axgbe_an37_restart(struct axgbe_port *pdata) +{ + axgbe_an37_enable_interrupts(pdata); + axgbe_an37_set(pdata, true, true); +} + static void axgbe_an37_disable(struct axgbe_port *pdata) { axgbe_an37_set(pdata, false, false); @@ -302,7 +321,7 @@ static void axgbe_an_restart(struct axgbe_port *pdata) break; case AXGBE_AN_MODE_CL37: case AXGBE_AN_MODE_CL37_SGMII: - PMD_DRV_LOG(ERR, "Unsupported AN_MODE_CL37\n"); + axgbe_an37_restart(pdata); break; default: break; @@ -321,7 +340,7 @@ static void axgbe_an_disable(struct axgbe_port *pdata) break; case AXGBE_AN_MODE_CL37: case AXGBE_AN_MODE_CL37_SGMII: - PMD_DRV_LOG(ERR, "Unsupported AN_MODE_CL37\n"); + axgbe_an37_disable(pdata); break; default: break; @@ -573,6 +592,53 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata) axgbe_an73_enable_interrupts(pdata); } +static void axgbe_an37_state_machine(struct axgbe_port *pdata) +{ + enum axgbe_an cur_state = pdata->an_state; + + if (!pdata->an_int) + return; + if (pdata->an_int & AXGBE_AN_CL37_INT_CMPLT) { + pdata->an_state = AXGBE_AN_COMPLETE; + pdata->an_int &= ~AXGBE_AN_CL37_INT_CMPLT; + + /* If SGMII is enabled, check the link status */ + if (pdata->an_mode == AXGBE_AN_MODE_CL37_SGMII && + !(pdata->an_status & AXGBE_SGMII_AN_LINK_STATUS)) + pdata->an_state = AXGBE_AN_NO_LINK; + } + + cur_state = pdata->an_state; + + switch (pdata->an_state) { + case AXGBE_AN_READY: + break; + case AXGBE_AN_COMPLETE: + break; + case AXGBE_AN_NO_LINK: + break; + default: + pdata->an_state = AXGBE_AN_ERROR; + break; + } + + if (pdata->an_state == AXGBE_AN_ERROR) { + PMD_DRV_LOG(ERR, "error during auto-negotiation, state=%u\n", + cur_state); + pdata->an_int = 0; + axgbe_an37_clear_interrupts(pdata); + } + + if (pdata->an_state >= AXGBE_AN_COMPLETE) { + pdata->an_result = pdata->an_state; + pdata->an_state = AXGBE_AN_READY; + if (pdata->phy_if.phy_impl.an_post) + pdata->phy_if.phy_impl.an_post(pdata); + } + + axgbe_an37_enable_interrupts(pdata); +} + static void axgbe_an73_isr(struct axgbe_port *pdata) { /* Disable AN interrupts */ @@ -580,6 +646,7 @@ static void axgbe_an73_isr(struct axgbe_port *pdata) /* Save the interrupt(s) that fired */ pdata->an_int = XMDIO_READ(pdata, MDIO_MMD_AN, MDIO_AN_INT); + axgbe_an73_clear_interrupts(pdata); if (pdata->an_int) { /* Clear the interrupt(s) that fired and process them */ @@ -593,6 +660,29 @@ static void axgbe_an73_isr(struct axgbe_port *pdata) } } +static void axgbe_an37_isr(struct axgbe_port *pdata) +{ + unsigned int reg = 0; + /* Disable AN interrupts */ + axgbe_an37_disable_interrupts(pdata); + + /* Save the interrupt(s) that fired */ + reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_STAT); + pdata->an_int = reg & AXGBE_AN_CL37_INT_MASK; + pdata->an_status = reg & ~AXGBE_AN_CL37_INT_MASK; + axgbe_an37_clear_interrupts(pdata); + + if (pdata->an_int & 0x01) { + /* Clear the interrupt(s) that fired and process them */ + reg &= ~AXGBE_AN_CL37_INT_MASK; + XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_STAT, reg); + axgbe_an37_state_machine(pdata); + } else { + /* Enable AN interrupts */ + axgbe_an37_enable_interrupts(pdata); + } +} + static void axgbe_an_isr(struct axgbe_port *pdata) { switch (pdata->an_mode) { @@ -602,7 +692,7 @@ static void axgbe_an_isr(struct axgbe_port *pdata) break; case AXGBE_AN_MODE_CL37: case AXGBE_AN_MODE_CL37_SGMII: - PMD_DRV_LOG(ERR, "AN_MODE_37 not supported\n"); + axgbe_an37_isr(pdata); break; default: break; @@ -614,6 +704,48 @@ static void axgbe_an_combined_isr(struct axgbe_port *pdata) axgbe_an_isr(pdata); } +static void axgbe_an37_init(struct axgbe_port *pdata) +{ + unsigned int advertising; + unsigned int reg = 0; + + advertising = pdata->phy_if.phy_impl.an_advertising(pdata); + + reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_ADVERTISE); + if (advertising & ADVERTISED_Pause) + reg |= 0x100; + else + reg &= ~0x100; + if (advertising & ADVERTISED_Asym_Pause) + reg |= 0x80; + else + reg &= ~0x80; + + /* Full duplex, but not half */ + reg |= AXGBE_AN_CL37_FD_MASK; + reg &= ~AXGBE_AN_CL37_HD_MASK; + + XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_ADVERTISE, reg); + + /* Set up the Control register */ + reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL); + reg &= ~AXGBE_AN_CL37_TX_CONFIG_MASK; + reg &= ~AXGBE_AN_CL37_PCS_MODE_MASK; + + switch (pdata->an_mode) { + case AXGBE_AN_MODE_CL37: + reg |= AXGBE_AN_CL37_PCS_MODE_BASEX; + break; + case AXGBE_AN_MODE_CL37_SGMII: + reg |= AXGBE_AN_CL37_PCS_MODE_SGMII; + break; + default: + break; + } + reg |= AXGBE_AN_CL37_MII_CTRL_8BIT; + XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL, reg); +} + static void axgbe_an73_init(struct axgbe_port *pdata) { unsigned int advertising, reg; @@ -673,7 +805,7 @@ static void axgbe_an_init(struct axgbe_port *pdata) break; case AXGBE_AN_MODE_CL37: case AXGBE_AN_MODE_CL37_SGMII: - PMD_DRV_LOG(ERR, "Unsupported AN_CL37\n"); + axgbe_an37_init(pdata); break; default: break; @@ -782,9 +914,6 @@ static int __axgbe_phy_config_aneg(struct axgbe_port *pdata) /* Disable and stop any in progress auto-negotiation */ axgbe_an_disable_all(pdata); - /* Clear any auto-negotitation interrupts */ - axgbe_an_clear_interrupts_all(pdata); - pdata->an_result = AXGBE_AN_READY; pdata->an_state = AXGBE_AN_READY; pdata->kr_state = AXGBE_RX_BPA; @@ -792,6 +921,7 @@ static int __axgbe_phy_config_aneg(struct axgbe_port *pdata) /* Re-enable auto-negotiation interrupt */ rte_intr_enable(&pdata->pci_dev->intr_handle); + axgbe_an37_enable_interrupts(pdata); axgbe_an_init(pdata); axgbe_an_restart(pdata); @@ -875,10 +1005,26 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata) axgbe_set_mode(pdata, mode); } +static int autoneg_time_out(unsigned long autoneg_start_time) +{ + unsigned long autoneg_timeout; + unsigned long ticks; + + autoneg_timeout = autoneg_start_time + (AXGBE_LINK_TIMEOUT * + 2 * rte_get_timer_hz()); + ticks = rte_get_timer_cycles(); + if (time_after(ticks, autoneg_timeout)) + return 1; + else + return 0; +} + static void axgbe_phy_status(struct axgbe_port *pdata) { unsigned int link_aneg; - int an_restart; + int an_restart, ret; + unsigned int reg = 0; + unsigned long autoneg_start_time; if (axgbe_test_bit(AXGBE_LINK_ERR, &pdata->dev_state)) { pdata->phy.link = 0; @@ -896,8 +1042,32 @@ static void axgbe_phy_status(struct axgbe_port *pdata) if (pdata->phy.link) { if (link_aneg && !axgbe_phy_aneg_done(pdata)) { - axgbe_check_link_timeout(pdata); - return; + if (axgbe_cur_mode(pdata) == AXGBE_MODE_SGMII_1000) { + /*autoneg not complete, so re-intializing*/ + /* and restarting it*/ + axgbe_an_init(pdata); + axgbe_an_restart(pdata); + reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, + MDIO_VEND2_AN_STAT); + autoneg_start_time = rte_get_timer_cycles(); + /*poll for autoneg to complete*/ + while (!(reg & AXGBE_AN_CL37_INT_CMPLT)) { + ret = + autoneg_time_out(autoneg_start_time); + if (ret) + break; + reg = XMDIO_READ(pdata, + MDIO_MMD_VEND2, + MDIO_VEND2_AN_STAT); + if (reg & AXGBE_AN_CL37_INT_CMPLT) { + axgbe_an37_isr(pdata); + break; + } + } + } else { + axgbe_check_link_timeout(pdata); + return; + } } axgbe_phy_status_result(pdata); if (axgbe_test_bit(AXGBE_LINK_INIT, &pdata->dev_state)) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index f0dc11695..a324a2bc9 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -957,6 +957,41 @@ static enum axgbe_mode axgbe_phy_an73_outcome(struct axgbe_port *pdata) return mode; } +static enum axgbe_mode axgbe_phy_an37_sgmii_outcome(struct axgbe_port *pdata) +{ + enum axgbe_mode mode; + + pdata->phy.lp_advertising |= ADVERTISED_Autoneg; + pdata->phy.lp_advertising |= ADVERTISED_1000baseT_Full; + + if (pdata->phy.pause_autoneg) + axgbe_phy_phydev_flowctrl(pdata); + + switch (pdata->an_status & AXGBE_SGMII_AN_LINK_SPEED) { + case AXGBE_SGMII_AN_LINK_SPEED_100: + if (pdata->an_status & AXGBE_SGMII_AN_LINK_DUPLEX) { + pdata->phy.lp_advertising |= ADVERTISED_100baseT_Full; + mode = AXGBE_MODE_SGMII_100; + } else { + mode = AXGBE_MODE_UNKNOWN; + } + break; + case AXGBE_SGMII_AN_LINK_SPEED_1000: + if (pdata->an_status & AXGBE_SGMII_AN_LINK_DUPLEX) { + pdata->phy.lp_advertising |= ADVERTISED_1000baseT_Full; + mode = AXGBE_MODE_SGMII_1000; + } else { + /* Half-duplex not supported */ + mode = AXGBE_MODE_UNKNOWN; + } + break; + default: + mode = AXGBE_MODE_UNKNOWN; + break; + } + return mode; +} + static enum axgbe_mode axgbe_phy_an_outcome(struct axgbe_port *pdata) { switch (pdata->an_mode) { @@ -966,6 +1001,7 @@ static enum axgbe_mode axgbe_phy_an_outcome(struct axgbe_port *pdata) return axgbe_phy_an73_redrv_outcome(pdata); case AXGBE_AN_MODE_CL37: case AXGBE_AN_MODE_CL37_SGMII: + return axgbe_phy_an37_sgmii_outcome(pdata); default: return AXGBE_MODE_UNKNOWN; } @@ -1957,6 +1993,7 @@ static int axgbe_phy_start(struct axgbe_port *pdata) default: break; } + pdata->phy.advertising &= axgbe_phy_an_advertising(pdata); return ret; } -- 2.17.1