aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-05-16 21:22:14 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-17 20:30:56 -0400
commita7fc948f4d11d80ac2bd08335dc1e0fb77ddf468 (patch)
tree657962c3060a5534932e8e4101b724209ba578e4 /drivers/net/qlcnic
parent20c67bd40eacf26c8d61727aaf9cc791d682b40a (diff)
qlcnic: mark device state fail
Device state need to be mark as FAILED, if fail to start firmware. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index f8bd1bd29b4b..1003eb76fda3 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -635,9 +635,12 @@ wait_init:
635 635
636 adapter->need_fw_reset = 0; 636 adapter->need_fw_reset = 0;
637 637
638 /* fall through and release firmware */ 638 qlcnic_release_firmware(adapter);
639 return 0;
639 640
640err_out: 641err_out:
642 QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_FAILED);
643 dev_err(&adapter->pdev->dev, "Device state set to failed\n");
641 qlcnic_release_firmware(adapter); 644 qlcnic_release_firmware(adapter);
642 return err; 645 return err;
643} 646}
@@ -1100,8 +1103,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1100 goto err_out_iounmap; 1103 goto err_out_iounmap;
1101 1104
1102 err = qlcnic_start_firmware(adapter); 1105 err = qlcnic_start_firmware(adapter);
1103 if (err) 1106 if (err) {
1107 dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n");
1104 goto err_out_decr_ref; 1108 goto err_out_decr_ref;
1109 }
1105 1110
1106 qlcnic_clear_stats(adapter); 1111 qlcnic_clear_stats(adapter);
1107 1112
@@ -2061,6 +2066,7 @@ qlcnic_can_start_firmware(struct qlcnic_adapter *adapter)
2061 break; 2066 break;
2062 2067
2063 case QLCNIC_DEV_FAILED: 2068 case QLCNIC_DEV_FAILED:
2069 dev_err(&adapter->pdev->dev, "Device in failed state.\n");
2064 qlcnic_api_unlock(adapter); 2070 qlcnic_api_unlock(adapter);
2065 return -1; 2071 return -1;
2066 2072