]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
ethernet: eqos: stop PHY state machine
authorBhadram Varka <vbhadram@nvidia.com>
Thu, 2 Feb 2017 14:10:58 +0000 (19:40 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 2 Mar 2017 10:03:35 +0000 (02:03 -0800)
Issue: While interface is going down eqos_stop_dev()
is not stopping the PHY sate machine while will
results in scheduling the work queue accessing
the PHY EEE registers in eqos_phy_init_eee().

Fix: Stop the PHY state machine in eqos_stop_dev().

Bug 200236154

Change-Id: Ia3a39a7844aaceaf05382b6e53b2928929cb1188
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: http://git-master/r/1298085
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
drivers/net/ethernet/nvidia/eqos/drv.c

index aa724f50422207423799e1deb7470b47a14a650b..4657588f9bddd1895deadf4c93b6934ece10b839 100644 (file)
@@ -5773,6 +5773,10 @@ void eqos_stop_dev(struct eqos_prv_data *pdata)
                gpio_set_value(pdata->phy_reset_gpio, 0);
        }
 
+       /* Stop the PHY state machine */
+       if (pdata->phydev)
+               phy_stop_machine(pdata->phydev);
+
        /* turn off sources of data into dev */
        netif_tx_disable(pdata->dev);