summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorVipul Pandya <vipul@chelsio.com>2012-09-26 02:39:41 +0000
committerDavid S. Miller <davem@davemloft.net>2012-09-27 17:55:50 -0400
commit1648a22b16ab05bd99dd8e2f33ca80bbcea60031 (patch)
tree29cc413af3050c935edf5173cd029bf274d09016 /drivers/net/ethernet
parent13ee15d396da78079918c5be7510ea1847393d4c (diff)
cxgb4: Inform caller if driver didn't upgrade firmware
If a card had already been initialized, on reloading cxgb4 driver firmware required an upgrade but the upgrade did not happen. In that case a mailbox timeout would occur during T4 configuration file stuff. The fix is to let the caller know the firmware was not upgraded so a reset would be issued before starting the T4 config stuff. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index b9cd08df39b3..a3f866d5b8f1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -933,7 +933,13 @@ static int upgrade_fw(struct adapter *adap)
if (!ret)
dev_info(dev, "firmware upgraded to version %pI4 from "
FW_FNAME "\n", &hdr->fw_ver);
+ } else {
+ /*
+ * Tell our caller that we didn't upgrade the firmware.
+ */
+ ret = -EINVAL;
}
+
out: release_firmware(fw);
return ret;
}