netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] igb: display a warning message when SmartSpeed works
@ 2013-01-16  2:21 Koki Sanagi
  2013-01-16  2:54 ` Jeff Kirsher
  0 siblings, 1 reply; 2+ messages in thread
From: Koki Sanagi @ 2013-01-16  2:21 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 igb 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 igb notify users that SmartSpeed worked.

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

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index a0a31b5..71f9088 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3647,6 +3647,7 @@ static void igb_watchdog_task(struct work_struct *work)
 	                                           struct igb_adapter,
                                                    watchdog_task);
 	struct e1000_hw *hw = &adapter->hw;
+	struct e1000_phy_info *phy = &hw->phy;
 	struct net_device *netdev = adapter->netdev;
 	u32 link;
 	int i;
@@ -3675,6 +3676,12 @@ static void igb_watchdog_task(struct work_struct *work)
 			       (ctrl & E1000_CTRL_RFCE) ?  "RX" :
 			       (ctrl & E1000_CTRL_TFCE) ?  "TX" : "None");
 
+			/* check if SmartSpeed worked */
+			igb_check_downshift(hw);
+			if (phy->speed_downgraded)
+				netdev_warn(netdev, "Link Speed was "
+					"downgraded by SmartSpeed\n");
+
 			/* check for thermal sensor event */
 			if (igb_thermal_sensor_event(hw,
 			    E1000_THSTAT_LINK_THROTTLE)) {

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

* Re: [PATCH 1/2] igb: display a warning message when SmartSpeed works
  2013-01-16  2:21 [PATCH 1/2] igb: display a warning message when SmartSpeed works Koki Sanagi
@ 2013-01-16  2:54 ` Jeff Kirsher
  0 siblings, 0 replies; 2+ 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: 591 bytes --]

On Wed, 2013-01-16 at 11:21 +0900, Koki Sanagi wrote:
> Current igb 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 igb notify users that SmartSpeed worked.
> 
> Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-) 

Thanks, I have added the patch to my queue.

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

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  2:21 [PATCH 1/2] igb: display a warning message when SmartSpeed works Koki Sanagi
2013-01-16  2:54 ` 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).