lede/package/qca/nss/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch
2021-07-19 12:52:07 +08:00

16 lines
537 B
Diff

--- a/ipq806x/nss_gmac_tx_rx_offload.c
+++ b/ipq806x/nss_gmac_tx_rx_offload.c
@@ -1027,8 +1027,10 @@ int nss_gmac_close(struct net_device *ne
nss_gmac_disable_interrupt_all(gmacdev);
gmacdev->data_plane_ops->link_state(gmacdev->data_plane_ctx, 0);
- if (!IS_ERR(gmacdev->phydev))
- phy_stop(gmacdev->phydev);
+ if (!IS_ERR(gmacdev->phydev)) {
+ if (test_bit(__NSS_GMAC_LINKPOLL, &gmacdev->flags))
+ phy_stop(gmacdev->phydev);
+ }
clear_bit(__NSS_GMAC_UP, &gmacdev->flags);
clear_bit(__NSS_GMAC_CLOSING, &gmacdev->flags);