提交 fafc672b 编写于 作者: A Aaro Koskinen 提交者: Zheng Zengkai

smsc95xx: fix stalled rx after link change

stable inclusion
from stable-5.10.71
commit 8321738c6e5ab8c85983c3ac5d7d36e0ccc451ae
bugzilla: 182981 https://gitee.com/openeuler/kernel/issues/I4I3KD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8321738c6e5ab8c85983c3ac5d7d36e0ccc451ae

--------------------------------

[ Upstream commit 5ab8a447 ]

After commit 05b35e7e ("smsc95xx: add phylib support"), link changes
are no longer propagated to usbnet. As a result, rx URB allocation won't
happen until there is a packet sent out first (this might never happen,
e.g. running just ssh server with a static IP). Fix by triggering usbnet
EVENT_LINK_CHANGE.

Fixes: 05b35e7e ("smsc95xx: add phylib support")
Signed-off-by: NAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 45abe3f1
...@@ -1178,7 +1178,10 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf) ...@@ -1178,7 +1178,10 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)
static void smsc95xx_handle_link_change(struct net_device *net) static void smsc95xx_handle_link_change(struct net_device *net)
{ {
struct usbnet *dev = netdev_priv(net);
phy_print_status(net->phydev); phy_print_status(net->phydev);
usbnet_defer_kevent(dev, EVENT_LINK_CHANGE);
} }
static int smsc95xx_start_phy(struct usbnet *dev) static int smsc95xx_start_phy(struct usbnet *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册