qca-nss-dp: add patch fixing rmmod and insmod
[openwrt/openwrt.git] / package / kernel / qca-nss-dp / patches / 0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
1 From 655b07b701271bc00952fe64aeb14f993a48a50e Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Tue, 16 Apr 2024 16:17:36 +0200
4 Subject: [PATCH 5/6] nss_dp_main: use phy_detach instead of disconnect in
5 dp_remove
6
7 Use phy_detach instead of disconnect in dp_remove. On Module remove, phy
8 are already disconnected but they need to be detached to be correctly
9 reattached later with an insmod.
10
11 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 ---
13 nss_dp_main.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/nss_dp_main.c
17 +++ b/nss_dp_main.c
18 @@ -924,7 +924,7 @@ static int nss_dp_remove(struct platform
19 unregister_netdev(dp_priv->netdev);
20
21 if (dp_priv->phydev)
22 - phy_disconnect(dp_priv->phydev);
23 + phy_detach(dp_priv->phydev);
24
25 #if defined(NSS_DP_PPE_SUPPORT)
26 /*