aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-15 17:50:09 -0400
committerDavid S. Miller <davem@davemloft.net>2011-03-15 17:50:09 -0400
commitd87f4fe2121a017241e495fedc0a79d0dec05a92 (patch)
treee7ef9628bb8240dc8ea69f7af027fdefdc2b549c /drivers
parent918690f9811029667eaf132dbfeb180c6e4e2029 (diff)
parent7ef5ed1ce96c3f9a95b7327279f94b0700c689ef (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6
Diffstat (limited to 'drivers')
-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.c42
3 files changed, 48 insertions, 2 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 b4f92b06f2ac..3d850af0cdda 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 *);
106static void igb_setup_mrqc(struct igb_adapter *); 106static void igb_setup_mrqc(struct igb_adapter *);
107static int igb_probe(struct pci_dev *, const struct pci_device_id *); 107static int igb_probe(struct pci_dev *, const struct pci_device_id *);
108static void __devexit igb_remove(struct pci_dev *pdev); 108static void __devexit igb_remove(struct pci_dev *pdev);
109static void igb_init_hw_timer(struct igb_adapter *adapter);
109static int igb_sw_init(struct igb_adapter *); 110static int igb_sw_init(struct igb_adapter *);
110static int igb_open(struct net_device *); 111static int igb_open(struct net_device *);
111static int igb_close(struct net_device *); 112static int igb_close(struct net_device *);
@@ -2048,6 +2049,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
2048 } 2049 }
2049 2050
2050#endif 2051#endif
2052 /* do hw tstamp init after resetting */
2053 igb_init_hw_timer(adapter);
2054
2051 dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n"); 2055 dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n");
2052 /* print bus type/speed/width info */ 2056 /* print bus type/speed/width info */
2053 dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n", 2057 dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n",
@@ -2384,7 +2388,6 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
2384 return -ENOMEM; 2388 return -ENOMEM;
2385 } 2389 }
2386 2390
2387 igb_init_hw_timer(adapter);
2388 igb_probe_vfs(adapter); 2391 igb_probe_vfs(adapter);
2389 2392
2390 /* Explicitly disable IRQ since the NIC can be in any state. */ 2393 /* Explicitly disable IRQ since the NIC can be in any state. */
@@ -3547,7 +3550,7 @@ static void igb_watchdog_task(struct work_struct *work)
3547 watchdog_task); 3550 watchdog_task);
3548 struct e1000_hw *hw = &adapter->hw; 3551 struct e1000_hw *hw = &adapter->hw;
3549 struct net_device *netdev = adapter->netdev; 3552 struct net_device *netdev = adapter->netdev;
3550 u32 link; 3553 u32 link, ctrl_ext, thstat;
3551 int i; 3554 int i;
3552 3555
3553 link = igb_has_link(adapter); 3556 link = igb_has_link(adapter);
@@ -3571,6 +3574,25 @@ static void igb_watchdog_task(struct work_struct *work)
3571 ((ctrl & E1000_CTRL_RFCE) ? "RX" : 3574 ((ctrl & E1000_CTRL_RFCE) ? "RX" :
3572 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None"))); 3575 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
3573 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 }
3574 /* adjust timeout factor according to speed/duplex */ 3596 /* adjust timeout factor according to speed/duplex */
3575 adapter->tx_timeout_factor = 1; 3597 adapter->tx_timeout_factor = 1;
3576 switch (adapter->link_speed) { 3598 switch (adapter->link_speed) {
@@ -3596,6 +3618,22 @@ static void igb_watchdog_task(struct work_struct *work)
3596 if (netif_carrier_ok(netdev)) { 3618 if (netif_carrier_ok(netdev)) {
3597 adapter->link_speed = 0; 3619 adapter->link_speed = 0;
3598 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 }
3599 /* Links status message must follow this format */ 3637 /* Links status message must follow this format */
3600 printk(KERN_INFO "igb: %s NIC Link is Down\n", 3638 printk(KERN_INFO "igb: %s NIC Link is Down\n",
3601 netdev->name); 3639 netdev->name);