Re: [PATCH] net: mii: Fix the Speed display when the network cable is not connected

From: Yanteng Si
Date: Wed Jan 15 2025 - 20:42:50 EST


在 2025/1/15 19:18, Xiangqian Zhang 写道:
Two different models of usb card, the drivers are r8152 and asix. If no
network cable is connected, Speed = 10Mb/s. This problem is repeated in
linux 3.10, 4.19, and 5.4. Both drivers call
mii_ethtool_get_link_ksettings, but the value of cmd->base.speed in this
function can only be SPEED_1000 or SPEED_100 or SPEED_10.
When the network cable is not connected, set cmd->base.speed
=SPEED_UNKNOWN.

v2:
https://lore.kernel.org/20250111132242.3327654-1-zhangxiangqian@xxxxxxxxxx
So, you've already sent a v2. This patch should be sent as v3.

Also, the link to v2 should not be included in the commit message. Instead, it should be placed here:

---
v2: https://lore.kernel.org/20250111132242.3327654-1-zhangxiangqian@xxxxxxxxxx

drivers/net/mii.c | 3 +++
1 file changed, 3 insertions(+)

Thanks,
Yanteng