diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-06-22 05:18:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-23 22:16:29 +0200 |
commit | 900c6cfffac668199aaa30a20e31d07602f8a8ce (patch) | |
tree | 237835d27c55be1e80dc3d3bc2213684a1bd70ca /drivers/net/qlcnic/qlcnic_init.c | |
parent | qlcnic: cleanup skb allocation (diff) | |
download | linux-900c6cfffac668199aaa30a20e31d07602f8a8ce.tar.xz linux-900c6cfffac668199aaa30a20e31d07602f8a8ce.zip |
qlcnic: handshake with card after fw load
Instead of delaying rcv handshake till interface comes up,
do it just after fw load.
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/qlcnic_init.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 1c3d5a90d21a..d19d0120e5b8 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c @@ -1138,7 +1138,7 @@ qlcnic_release_firmware(struct qlcnic_adapter *adapter) adapter->fw = NULL; } -int qlcnic_phantom_init(struct qlcnic_adapter *adapter) +static int qlcnic_cmd_peg_ready(struct qlcnic_adapter *adapter) { u32 val; int retries = 60; @@ -1163,7 +1163,8 @@ int qlcnic_phantom_init(struct qlcnic_adapter *adapter) QLCWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_FAILED); out_err: - dev_err(&adapter->pdev->dev, "firmware init failed\n"); + dev_err(&adapter->pdev->dev, "Command Peg initialization not " + "complete, state: 0x%x.\n", val); return -EIO; } @@ -1196,6 +1197,10 @@ int qlcnic_init_firmware(struct qlcnic_adapter *adapter) { int err; + err = qlcnic_cmd_peg_ready(adapter); + if (err) + return err; + err = qlcnic_receive_peg_ready(adapter); if (err) return err; |