diff mbox

[NET-NEXT,1/5] igb: link up/down messages must follow a specific format

Message ID 20081127000206.22431.53339.stgit@gitlost.lost
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Kirsher, Jeffrey T Nov. 27, 2008, 12:02 a.m. UTC
From: Alexander Duyck <alexander.h.duyck@intel.com>

The system log messages created on a link status change need to follow a
specific format to work with tools some customers use.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Nov. 27, 2008, 8:21 a.m. UTC | #1
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 26 Nov 2008 16:02:06 -0800

> From: Alexander Duyck <alexander.h.duyck@intel.com>
> 
> The system log messages created on a link status change need to follow a
> specific format to work with tools some customers use.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andi Kleen Nov. 27, 2008, 10:50 a.m. UTC | #2
Jeff Kirsher <jeffrey.t.kirsher@intel.com> writes:

> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> The system log messages created on a link status change need to follow a
> specific format to work with tools some customers use.

It would be better to define standard helper functions that output this
format somewhere. Then this could be also used in other drivers.

-Andi
David Miller Nov. 27, 2008, 11:34 a.m. UTC | #3
From: Andi Kleen <andi@firstfloor.org>
Date: Thu, 27 Nov 2008 11:50:45 +0100

> Jeff Kirsher <jeffrey.t.kirsher@intel.com> writes:
> 
> > From: Alexander Duyck <alexander.h.duyck@intel.com>
> >
> > The system log messages created on a link status change need to follow a
> > specific format to work with tools some customers use.
> 
> It would be better to define standard helper functions that output this
> format somewhere. Then this could be also used in other drivers.

He's already been told this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ab37ab0..0919a2f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2328,9 +2328,10 @@  static void igb_watchdog_task(struct work_struct *work)
 						   &adapter->link_duplex);
 
 			ctrl = rd32(E1000_CTRL);
-			dev_info(&adapter->pdev->dev,
-				 "NIC Link is Up %d Mbps %s, "
+			/* Links status message must follow this format */
+			printk(KERN_INFO "igb: %s NIC Link is Up %d Mbps %s, "
 				 "Flow Control: %s\n",
+			         netdev->name,
 				 adapter->link_speed,
 				 adapter->link_duplex == FULL_DUPLEX ?
 				 "Full Duplex" : "Half Duplex",
@@ -2365,7 +2366,9 @@  static void igb_watchdog_task(struct work_struct *work)
 		if (netif_carrier_ok(netdev)) {
 			adapter->link_speed = 0;
 			adapter->link_duplex = 0;
-			dev_info(&adapter->pdev->dev, "NIC Link is Down\n");
+			/* Links status message must follow this format */
+			printk(KERN_INFO "igb: %s NIC Link is Down\n",
+			       netdev->name);
 			netif_carrier_off(netdev);
 			netif_tx_stop_all_queues(netdev);
 			if (!test_bit(__IGB_DOWN, &adapter->state))