e1000e: display a warning message when SmartSpeed works
Subsystems (3)
PATCH 2/2 e1000e: display a warning message when SmartSpeed works
Current e1000e driver doesn't tell nothing when Link Speed is downgraded due to SmartSpeed. As a result, users suspect that there is something wrong with NIC. If the cause of it is SmartSpeed, there is no means to replace NIC. This patch make e1000e notify users that SmartSpeed worked.
--- drivers/net/ethernet/intel/e1000e/netdev.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +7 -0
@@ -4435,6 +4435,13 @@ static void e1000_watchdog_task(struct work_struct *work) &adapter->link_speed, &adapter->link_duplex);e1000_print_link_info (adapter); + +/* check if SmartSpeed worked */ +e1000e_check_downshift (hw); +if (phy->speed_downgraded) +netdev_warn (netdev,"Link Speed was " +"downgraded by SmartSpeed\n" ); +/* On supported PHYs, check for duplex mismatch only * if link has autonegotiated at 10/100 half */
Quoted 8 lines · Koki Sanagi
Current e1000e driver doesn't tell nothing when Link Speed is downgraded due to
SmartSpeed. As a result, users suspect that there is something wrong with
NIC. If the cause of it is SmartSpeed, there is no means to replace NIC. This
patch make e1000e notify users that SmartSpeed worked.
Quoted 4 lines
Signed-off-by Koki Sanagi <[email protected]>--- drivers/net/ethernet/intel/e1000e/netdev.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
Thanks, I have added this patch as well to my queue.
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 4444
Quoted 4 lines · Koki Sanagi
drivers/net/ethernet/intel/e1000e/netdev.c +4
-0+if (phy->speed_downgraded) +netdev_warn (netdev,"Link Speed was " +"downgraded by SmartSpeed\n" ); +
Could you please avoid breaking the string both here and in the igb patch? This breaks the ability to grep for the warning.
Quoting Documentation/CodingStyle, Chapter 2:
"However, never break user-visible strings such as printk messages,
because that breaks the ability to grep for them."
Bjørn
Quoted 10 lines · Bjørn Mork
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 4444
Quoted 4 lines · Koki Sanagi
drivers/net/ethernet/intel/e1000e/netdev.c +4
-0+if (phy->speed_downgraded) +netdev_warn (netdev,"Link Speed was " +"downgraded by SmartSpeed\n" ); +Could you please avoid breaking the string both here and in the igb patch? This breaks the ability to grep for the warning.
Quoted 6 lines
Quoting
Documentation/CodingStyle, Chapter 2:
"However, never break user-visible strings such as printk messages,
because that breaks the ability to grep for them."Bjørn
I have fixed both patches that are in my queue, since the original patches generated checkpatch.pl warnings on the strings being on 2 lines.