be2net: Fix FW download in Lancer
Increase time given by driver to adapter for completing FW download to 30 seconds. Also return correct status when FW download times out. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0fc16ebf69
commit
804c751599
@@ -1824,18 +1824,16 @@ int lancer_cmd_write_object(struct be_adapter *adapter, struct be_dma_mem *cmd,
|
|||||||
spin_unlock_bh(&adapter->mcc_lock);
|
spin_unlock_bh(&adapter->mcc_lock);
|
||||||
|
|
||||||
if (!wait_for_completion_timeout(&adapter->flash_compl,
|
if (!wait_for_completion_timeout(&adapter->flash_compl,
|
||||||
msecs_to_jiffies(12000)))
|
msecs_to_jiffies(30000)))
|
||||||
status = -1;
|
status = -1;
|
||||||
else
|
else
|
||||||
status = adapter->flash_status;
|
status = adapter->flash_status;
|
||||||
|
|
||||||
resp = embedded_payload(wrb);
|
resp = embedded_payload(wrb);
|
||||||
if (!status) {
|
if (!status)
|
||||||
*data_written = le32_to_cpu(resp->actual_write_len);
|
*data_written = le32_to_cpu(resp->actual_write_len);
|
||||||
} else {
|
else
|
||||||
*addn_status = resp->additional_status;
|
*addn_status = resp->additional_status;
|
||||||
status = resp->status;
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user