aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/igb/e1000_defines.h5
-rw-r--r--drivers/net/igb/e1000_regs.h3
-rw-r--r--drivers/net/igb/igb_main.c37
3 files changed, 44 insertions, 1 deletions
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index 9bb192825893..6b80d40110ca 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -51,6 +51,7 @@
51#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000 51#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000
52#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000 52#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000
53#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000 53#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
54#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
54#define E1000_CTRL_EXT_EIAME 0x01000000 55#define E1000_CTRL_EXT_EIAME 0x01000000
55#define E1000_CTRL_EXT_IRCA 0x00000001 56#define E1000_CTRL_EXT_IRCA 0x00000001
56/* Interrupt delay cancellation */ 57/* Interrupt delay cancellation */
@@ -788,6 +789,10 @@
788#define E1000_MDIC_ERROR 0x40000000 789#define E1000_MDIC_ERROR 0x40000000
789#define E1000_MDIC_DEST 0x80000000 790#define E1000_MDIC_DEST 0x80000000
790 791
792/* Thermal Sensor */
793#define E1000_THSTAT_PWR_DOWN 0x00000001 /* Power Down Event */
794#define E1000_THSTAT_LINK_THROTTLE 0x00000002 /* Link Speed Throttle Event */
795
791/* Energy Efficient Ethernet */ 796/* Energy Efficient Ethernet */
792#define E1000_IPCNFG_EEE_1G_AN 0x00000008 /* EEE Enable 1G AN */ 797#define E1000_IPCNFG_EEE_1G_AN 0x00000008 /* EEE Enable 1G AN */
793#define E1000_IPCNFG_EEE_100M_AN 0x00000004 /* EEE Enable 100M AN */ 798#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 ad77ed510d7c..958ca3bda482 100644
--- a/drivers/net/igb/e1000_regs.h
+++ b/drivers/net/igb/e1000_regs.h
@@ -342,6 +342,9 @@
342#define E1000_IPCNFG 0x0E38 /* Internal PHY Configuration */ 342#define E1000_IPCNFG 0x0E38 /* Internal PHY Configuration */
343#define E1000_EEER 0x0E30 /* Energy Efficient Ethernet */ 343#define E1000_EEER 0x0E30 /* Energy Efficient Ethernet */
344 344
345/* Thermal Sensor Register */
346#define E1000_THSTAT 0x08110 /* Thermal Sensor Status */
347
345/* OS2BMC Registers */ 348/* OS2BMC Registers */
346#define E1000_B2OSPC 0x08FE0 /* BMC2OS packets sent by BMC */ 349#define E1000_B2OSPC 0x08FE0 /* BMC2OS packets sent by BMC */
347#define E1000_B2OGPRC 0x04158 /* BMC2OS packets received by host */ 350#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 5366f2ab65f0..3d850af0cdda 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)
3550 watchdog_task); 3550 watchdog_task);
3551 struct e1000_hw *hw = &adapter->hw; 3551 struct e1000_hw *hw = &adapter->hw;
3552 struct net_device *netdev = adapter->netdev; 3552 struct net_device *netdev = adapter->netdev;
3553 u32 link; 3553 u32 link, ctrl_ext, thstat;
3554 int i; 3554 int i;
3555 3555
3556 link = igb_has_link(adapter); 3556 link = igb_has_link(adapter);
@@ -3574,6 +3574,25 @@ static void igb_watchdog_task(struct work_struct *work)
3574 ((ctrl & E1000_CTRL_RFCE) ? "RX" : 3574 ((ctrl & E1000_CTRL_RFCE) ? "RX" :
3575 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None"))); 3575 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
3576 3576
3577 /* check for thermal sensor event on i350,
3578 * copper only */
3579 if (hw->mac.type == e1000_i350) {
3580 thstat = rd32(E1000_THSTAT);
3581 ctrl_ext = rd32(E1000_CTRL_EXT);
3582 if ((hw->phy.media_type ==
3583 e1000_media_type_copper) && !(ctrl_ext &
3584 E1000_CTRL_EXT_LINK_MODE_SGMII)) {
3585 if (thstat &
3586 E1000_THSTAT_LINK_THROTTLE) {
3587 printk(KERN_INFO "igb: %s The "
3588 "network adapter link "
3589 "speed was downshifted "
3590 "because it "
3591 "overheated.\n",
3592 netdev->name);
3593 }
3594 }
3595 }
3577 /* adjust timeout factor according to speed/duplex */ 3596 /* adjust timeout factor according to speed/duplex */
3578 adapter->tx_timeout_factor = 1; 3597 adapter->tx_timeout_factor = 1;
3579 switch (adapter->link_speed) { 3598 switch (adapter->link_speed) {
@@ -3599,6 +3618,22 @@ static void igb_watchdog_task(struct work_struct *work)
3599 if (netif_carrier_ok(netdev)) { 3618 if (netif_carrier_ok(netdev)) {
3600 adapter->link_speed = 0; 3619 adapter->link_speed = 0;
3601 adapter->link_duplex = 0; 3620 adapter->link_duplex = 0;
3621 /* check for thermal sensor event on i350
3622 * copper only*/
3623 if (hw->mac.type == e1000_i350) {
3624 thstat = rd32(E1000_THSTAT);
3625 ctrl_ext = rd32(E1000_CTRL_EXT);
3626 if ((hw->phy.media_type ==
3627 e1000_media_type_copper) && !(ctrl_ext &
3628 E1000_CTRL_EXT_LINK_MODE_SGMII)) {
3629 if (thstat & E1000_THSTAT_PWR_DOWN) {
3630 printk(KERN_ERR "igb: %s The "
3631 "network adapter was stopped "
3632 "because it overheated.\n",
3633 netdev->name);
3634 }
3635 }
3636 }
3602 /* Links status message must follow this format */ 3637 /* Links status message must follow this format */
3603 printk(KERN_INFO "igb: %s NIC Link is Down\n", 3638 printk(KERN_INFO "igb: %s NIC Link is Down\n",
3604 netdev->name); 3639 netdev->name);