netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update
@ 2011-03-15  5:54 Jeff Kirsher
  2011-03-15  5:54 ` [net-next-2.6 1/2] igb: fix hw timestamping Jeff Kirsher
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeff Kirsher @ 2011-03-15  5:54 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, bphilips

The following series contains a fix for timestamping and the
addition of thermal sensor support for igb.

The following are changes since commit 0c0217b016ba8a970a6f6ab62ad0d858f39881ca:
  net: dcbnl: Add IEEE app selector value definitions
and are available in the git repository at:
  master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 master

Anders Berggren (1):
  igb: fix hw timestamping

Carolyn Wyborny (1):
  igb: Add messaging for thermal sensor events on i350 devices

 drivers/net/igb/e1000_defines.h |    5 ++++
 drivers/net/igb/e1000_regs.h    |    3 ++
 drivers/net/igb/igb_main.c      |   42 +++++++++++++++++++++++++++++++++++++-
 3 files changed, 48 insertions(+), 2 deletions(-)

-- 
1.7.4


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

* [net-next-2.6 1/2] igb: fix hw timestamping
  2011-03-15  5:54 [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update Jeff Kirsher
@ 2011-03-15  5:54 ` Jeff Kirsher
  2011-03-15  5:54 ` [net-next-2.6 2/2] igb: Add messaging for thermal sensor events on i350 devices Jeff Kirsher
  2011-03-15 21:51 ` [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2011-03-15  5:54 UTC (permalink / raw)
  To: davem
  Cc: Anders Berggren, netdev, gospo, bphilips, Anders Berggren,
	Jeff Kirsher

From: Anders Berggren <anders@halon.se>

Hardware timestamping for Intel 82580 didn't work in either 2.6.36 or
2.6.37. Comparing it to Intel's igb-2.4.12 I found that the
timecounter_init clock/counter initialization was done too early.

Signed-off-by: Anders Berggren <andfers@halon.se>
Tested-by:  Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/igb/igb_main.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index b4f92b0..5366f2a 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -106,6 +106,7 @@ static void igb_free_all_rx_resources(struct igb_adapter *);
 static void igb_setup_mrqc(struct igb_adapter *);
 static int igb_probe(struct pci_dev *, const struct pci_device_id *);
 static void __devexit igb_remove(struct pci_dev *pdev);
+static void igb_init_hw_timer(struct igb_adapter *adapter);
 static int igb_sw_init(struct igb_adapter *);
 static int igb_open(struct net_device *);
 static int igb_close(struct net_device *);
@@ -2048,6 +2049,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 	}
 
 #endif
+	/* do hw tstamp init after resetting */
+	igb_init_hw_timer(adapter);
+
 	dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n");
 	/* print bus type/speed/width info */
 	dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n",
@@ -2384,7 +2388,6 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
 		return -ENOMEM;
 	}
 
-	igb_init_hw_timer(adapter);
 	igb_probe_vfs(adapter);
 
 	/* Explicitly disable IRQ since the NIC can be in any state. */
-- 
1.7.4


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

* [net-next-2.6 2/2] igb: Add messaging for thermal sensor events on i350 devices
  2011-03-15  5:54 [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update Jeff Kirsher
  2011-03-15  5:54 ` [net-next-2.6 1/2] igb: fix hw timestamping Jeff Kirsher
@ 2011-03-15  5:54 ` Jeff Kirsher
  2011-03-15 21:51 ` [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2011-03-15  5:54 UTC (permalink / raw)
  To: davem; +Cc: Carolyn Wyborny, netdev, gospo, bphilips, Jeff Kirsher

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This feature adds messaging to the link status change to notify
the user if the device returned from a downshift or power off
event due to the Thermal Sensor feature in i350 parts. Feature
is only available on internal copper ports.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/igb/e1000_defines.h |    5 +++++
 drivers/net/igb/e1000_regs.h    |    3 +++
 drivers/net/igb/igb_main.c      |   37 ++++++++++++++++++++++++++++++++++++-
 3 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index 9bb1928..6b80d40 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -51,6 +51,7 @@
 #define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES  0x00C00000
 #define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX  0x00400000
 #define E1000_CTRL_EXT_LINK_MODE_SGMII   0x00800000
+#define E1000_CTRL_EXT_LINK_MODE_GMII   0x00000000
 #define E1000_CTRL_EXT_EIAME          0x01000000
 #define E1000_CTRL_EXT_IRCA           0x00000001
 /* Interrupt delay cancellation */
@@ -788,6 +789,10 @@
 #define E1000_MDIC_ERROR     0x40000000
 #define E1000_MDIC_DEST      0x80000000
 
+/* Thermal Sensor */
+#define E1000_THSTAT_PWR_DOWN       0x00000001 /* Power Down Event */
+#define E1000_THSTAT_LINK_THROTTLE  0x00000002 /* Link Speed Throttle Event */
+
 /* Energy Efficient Ethernet */
 #define E1000_IPCNFG_EEE_1G_AN       0x00000008  /* EEE Enable 1G AN */
 #define E1000_IPCNFG_EEE_100M_AN     0x00000004  /* EEE Enable 100M AN */
diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h
index ad77ed5..958ca3b 100644
--- a/drivers/net/igb/e1000_regs.h
+++ b/drivers/net/igb/e1000_regs.h
@@ -342,6 +342,9 @@
 #define E1000_IPCNFG  0x0E38  /* Internal PHY Configuration */
 #define E1000_EEER    0x0E30  /* Energy Efficient Ethernet */
 
+/* Thermal Sensor Register */
+#define E1000_THSTAT    0x08110 /* Thermal Sensor Status */
+
 /* OS2BMC Registers */
 #define E1000_B2OSPC    0x08FE0 /* BMC2OS packets sent by BMC */
 #define E1000_B2OGPRC   0x04158 /* BMC2OS packets received by host */
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 5366f2a..3d850af 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3550,7 +3550,7 @@ static void igb_watchdog_task(struct work_struct *work)
                                                    watchdog_task);
 	struct e1000_hw *hw = &adapter->hw;
 	struct net_device *netdev = adapter->netdev;
-	u32 link;
+	u32 link, ctrl_ext, thstat;
 	int i;
 
 	link = igb_has_link(adapter);
@@ -3574,6 +3574,25 @@ static void igb_watchdog_task(struct work_struct *work)
 			       ((ctrl & E1000_CTRL_RFCE) ?  "RX" :
 			       ((ctrl & E1000_CTRL_TFCE) ?  "TX" : "None")));
 
+			/* check for thermal sensor event on i350,
+			 * copper only */
+			if (hw->mac.type == e1000_i350) {
+				thstat = rd32(E1000_THSTAT);
+				ctrl_ext = rd32(E1000_CTRL_EXT);
+				if ((hw->phy.media_type ==
+				     e1000_media_type_copper) && !(ctrl_ext &
+				     E1000_CTRL_EXT_LINK_MODE_SGMII)) {
+					if (thstat &
+					    E1000_THSTAT_LINK_THROTTLE) {
+						printk(KERN_INFO "igb: %s The "
+						       "network adapter link "
+						       "speed was downshifted "
+						       "because it "
+						       "overheated.\n",
+						       netdev->name);
+					}
+				}
+			}
 			/* adjust timeout factor according to speed/duplex */
 			adapter->tx_timeout_factor = 1;
 			switch (adapter->link_speed) {
@@ -3599,6 +3618,22 @@ static void igb_watchdog_task(struct work_struct *work)
 		if (netif_carrier_ok(netdev)) {
 			adapter->link_speed = 0;
 			adapter->link_duplex = 0;
+			/* check for thermal sensor event on i350
+			 * copper only*/
+			if (hw->mac.type == e1000_i350) {
+				thstat = rd32(E1000_THSTAT);
+				ctrl_ext = rd32(E1000_CTRL_EXT);
+				if ((hw->phy.media_type ==
+				     e1000_media_type_copper) && !(ctrl_ext &
+				     E1000_CTRL_EXT_LINK_MODE_SGMII)) {
+					if (thstat & E1000_THSTAT_PWR_DOWN) {
+						printk(KERN_ERR "igb: %s The "
+						"network adapter was stopped "
+						"because it overheated.\n",
+						netdev->name);
+					}
+				}
+			}
 			/* Links status message must follow this format */
 			printk(KERN_INFO "igb: %s NIC Link is Down\n",
 			       netdev->name);
-- 
1.7.4


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

* Re: [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update
  2011-03-15  5:54 [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update Jeff Kirsher
  2011-03-15  5:54 ` [net-next-2.6 1/2] igb: fix hw timestamping Jeff Kirsher
  2011-03-15  5:54 ` [net-next-2.6 2/2] igb: Add messaging for thermal sensor events on i350 devices Jeff Kirsher
@ 2011-03-15 21:51 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-03-15 21:51 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 14 Mar 2011 22:54:22 -0700

> The following series contains a fix for timestamping and the
> addition of thermal sensor support for igb.
> 
> The following are changes since commit 0c0217b016ba8a970a6f6ab62ad0d858f39881ca:
>   net: dcbnl: Add IEEE app selector value definitions
> and are available in the git repository at:
>   master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 master
> 
> Anders Berggren (1):
>   igb: fix hw timestamping
> 
> Carolyn Wyborny (1):
>   igb: Add messaging for thermal sensor events on i350 devices

Pulled, thanks Jeff.

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

end of thread, other threads:[~2011-03-15 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15  5:54 [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update Jeff Kirsher
2011-03-15  5:54 ` [net-next-2.6 1/2] igb: fix hw timestamping Jeff Kirsher
2011-03-15  5:54 ` [net-next-2.6 2/2] igb: Add messaging for thermal sensor events on i350 devices Jeff Kirsher
2011-03-15 21:51 ` [net-next-2.6 0/2][pull request] Intel Wired LAN Driver Update David Miller

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).