diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-11-10 20:17:59 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-12 23:59:36 +0100 |
commit | 434b3648e9a58600cea5f3a1a0a7a89048e4df61 (patch) | |
tree | 71d4e591eca1400e0b4522588563675fac764566 | |
parent | be2net: stop checking the UE registers after an EEH error (diff) | |
download | linux-434b3648e9a58600cea5f3a1a0a7a89048e4df61.tar.xz linux-434b3648e9a58600cea5f3a1a0a7a89048e4df61.zip |
be2net: don't log more than one error on detecting EEH/UE errors
Currently we're spamming error messages each time a FW cmd call is made
while in EEH/UE error state. One log msg on error detection is enough.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 3 |
2 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index c5912c4ed24f..94cd77ca367a 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -31,11 +31,8 @@ static void be_mcc_notify(struct be_adapter *adapter) struct be_queue_info *mccq = &adapter->mcc_obj.q; u32 val = 0; - if (adapter->eeh_err) { - dev_info(&adapter->pdev->dev, - "Error in Card Detected! Cannot issue commands\n"); + if (adapter->eeh_err) return; - } val |= mccq->id & DB_MCCQ_RING_ID_MASK; val |= 1 << DB_MCCQ_NUM_POSTED_SHIFT; @@ -298,19 +295,13 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db) int msecs = 0; u32 ready; - if (adapter->eeh_err) { - dev_err(&adapter->pdev->dev, - "Error detected in card.Cannot issue commands\n"); + if (adapter->eeh_err) return -EIO; - } do { ready = ioread32(db); - if (ready == 0xffffffff) { - dev_err(&adapter->pdev->dev, - "pci slot disconnected\n"); + if (ready == 0xffffffff) return -1; - } ready &= MPU_MAILBOX_DB_RDY_MASK; if (ready) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 99da07ff4510..0e97b6d01c79 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -2007,7 +2007,8 @@ void be_detect_dump_ue(struct be_adapter *adapter) sliport_status & SLIPORT_STATUS_ERR_MASK) { adapter->ue_detected = true; adapter->eeh_err = true; - dev_err(&adapter->pdev->dev, "UE Detected!!\n"); + dev_err(&adapter->pdev->dev, + "Unrecoverable error in the card\n"); } if (ue_lo) { |