netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] e1000e: display a warning message when SmartSpeed works
@ 2013-01-16  2:23 Koki Sanagi
  2013-01-16  2:54 ` Jeff Kirsher
  2013-01-16 12:59 ` Bjørn Mork
  0 siblings, 2 replies; 4+ messages in thread
From: Koki Sanagi @ 2013-01-16  2:23 UTC (permalink / raw)
  To: netdev
  Cc: davem, jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
	peter.p.waskiewicz.jr, alexander.h.duyck, john.ronciak,
	tushar.n.dave, e1000-devel

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.

Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 337644d..1c416fc 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -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
 			 */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] e1000e: display a warning message when SmartSpeed works
  2013-01-16  2:23 [PATCH 2/2] e1000e: display a warning message when SmartSpeed works Koki Sanagi
@ 2013-01-16  2:54 ` Jeff Kirsher
  2013-01-16 12:59 ` Bjørn Mork
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2013-01-16  2:54 UTC (permalink / raw)
  To: Koki Sanagi
  Cc: netdev, davem, jesse.brandeburg, bruce.w.allan, carolyn.wyborny,
	donald.c.skidmore, gregory.v.rose, peter.p.waskiewicz.jr,
	alexander.h.duyck, john.ronciak, tushar.n.dave, e1000-devel

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

On Wed, 2013-01-16 at 11:23 +0900, Koki Sanagi wrote:
> 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.
> 
> Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> ---
>  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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] e1000e: display a warning message when SmartSpeed works
  2013-01-16  2:23 [PATCH 2/2] e1000e: display a warning message when SmartSpeed works Koki Sanagi
  2013-01-16  2:54 ` Jeff Kirsher
@ 2013-01-16 12:59 ` Bjørn Mork
  2013-01-16 21:16   ` Jeff Kirsher
  1 sibling, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2013-01-16 12:59 UTC (permalink / raw)
  To: Koki Sanagi
  Cc: netdev, davem, jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
	peter.p.waskiewicz.jr, alexander.h.duyck, john.ronciak,
	tushar.n.dave, e1000-devel

Koki Sanagi <sanagi.koki@jp.fujitsu.com> writes:

> +			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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] e1000e: display a warning message when SmartSpeed works
  2013-01-16 12:59 ` Bjørn Mork
@ 2013-01-16 21:16   ` Jeff Kirsher
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2013-01-16 21:16 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: Koki Sanagi, netdev, davem, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
	peter.p.waskiewicz.jr, alexander.h.duyck, john.ronciak,
	tushar.n.dave, e1000-devel

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

On Wed, 2013-01-16 at 13:59 +0100, Bjørn Mork wrote:
> Koki Sanagi <sanagi.koki@jp.fujitsu.com> writes:
> 
> > +			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

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-16 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  2:23 [PATCH 2/2] e1000e: display a warning message when SmartSpeed works Koki Sanagi
2013-01-16  2:54 ` Jeff Kirsher
2013-01-16 12:59 ` Bjørn Mork
2013-01-16 21:16   ` Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).