aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2009-05-07 06:39:54 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-07 17:52:31 -0400
commitbf069c9726b592432ed646e72b910ac3c098d025 (patch)
treefeb8ab0e94f443ed532001a78aa18f4108e566e7 /drivers/net/ixgbe/ixgbe_main.c
parentdfa12f05f60eb23b1670f3a7756ed814f886a7fb (diff)
ixgbe: fix failing to log fan failures
We weren't logging the 82598AT fan failure if it occurred before (ixgbe_open) as we hadn't sent up to catch the interrupt that event caused. This patch checks for this failure in: ixgbe_probe - So we can log the failure asap. We check right after we set up the adapter->flags, which is when we know that we have a fan. ixgbe_up_complete - To catch failures that may have happened between probe and when we set up the interrupt that would normally detect the fan failure. To enable all of this we need to initialize the adapter flag with IXGBE_FLAG_FAN_FAIL_CAPABLE when the NIC contained a fan. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 01d8b6b12be6..4a316e9c0541 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2458,6 +2458,17 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
2458 ixgbe_irq_enable(adapter); 2458 ixgbe_irq_enable(adapter);
2459 2459
2460 /* 2460 /*
2461 * If this adapter has a fan, check to see if we had a failure
2462 * before we enabled the interrupt.
2463 */
2464 if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
2465 u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
2466 if (esdp & IXGBE_ESDP_SDP1)
2467 DPRINTK(DRV, CRIT,
2468 "Fan has stopped, replace the adapter\n");
2469 }
2470
2471 /*
2461 * For hot-pluggable SFP+ devices, a new SFP+ module may have 2472 * For hot-pluggable SFP+ devices, a new SFP+ module may have
2462 * arrived before interrupts were enabled. We need to kick off 2473 * arrived before interrupts were enabled. We need to kick off
2463 * the SFP+ module setup first, then try to bring up link. 2474 * the SFP+ module setup first, then try to bring up link.
@@ -3382,9 +3393,11 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
3382 adapter->ring_feature[RING_F_RSS].indices = rss; 3393 adapter->ring_feature[RING_F_RSS].indices = rss;
3383 adapter->flags |= IXGBE_FLAG_RSS_ENABLED; 3394 adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
3384 adapter->ring_feature[RING_F_DCB].indices = IXGBE_MAX_DCB_INDICES; 3395 adapter->ring_feature[RING_F_DCB].indices = IXGBE_MAX_DCB_INDICES;
3385 if (hw->mac.type == ixgbe_mac_82598EB) 3396 if (hw->mac.type == ixgbe_mac_82598EB) {
3397 if (hw->device_id == IXGBE_DEV_ID_82598AT)
3398 adapter->flags |= IXGBE_FLAG_FAN_FAIL_CAPABLE;
3386 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; 3399 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598;
3387 else if (hw->mac.type == ixgbe_mac_82599EB) { 3400 } else if (hw->mac.type == ixgbe_mac_82599EB) {
3388 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; 3401 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599;
3389 adapter->flags |= IXGBE_FLAG_RSC_CAPABLE; 3402 adapter->flags |= IXGBE_FLAG_RSC_CAPABLE;
3390 adapter->flags |= IXGBE_FLAG_RSC_ENABLED; 3403 adapter->flags |= IXGBE_FLAG_RSC_ENABLED;
@@ -4915,6 +4928,17 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4915 if (err) 4928 if (err)
4916 goto err_sw_init; 4929 goto err_sw_init;
4917 4930
4931 /*
4932 * If there is a fan on this device and it has failed log the
4933 * failure.
4934 */
4935 if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
4936 u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
4937 if (esdp & IXGBE_ESDP_SDP1)
4938 DPRINTK(PROBE, CRIT,
4939 "Fan has stopped, replace the adapter\n");
4940 }
4941
4918 /* reset_hw fills in the perm_addr as well */ 4942 /* reset_hw fills in the perm_addr as well */
4919 err = hw->mac.ops.reset_hw(hw); 4943 err = hw->mac.ops.reset_hw(hw);
4920 if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { 4944 if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {