|
@@ -2929,16 +2929,26 @@ static int set_flash(struct net_device *netdev, struct ethtool_flash *ef)
|
|
|
int ret;
|
|
|
const struct firmware *fw;
|
|
|
struct adapter *adap = netdev2adap(netdev);
|
|
|
+ unsigned int mbox = FW_PCIE_FW_MASTER_MASK + 1;
|
|
|
|
|
|
ef->data[sizeof(ef->data) - 1] = '\0';
|
|
|
ret = request_firmware(&fw, ef->data, adap->pdev_dev);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = t4_load_fw(adap, fw->data, fw->size);
|
|
|
+ /* If the adapter has been fully initialized then we'll go ahead and
|
|
|
+ * try to get the firmware's cooperation in upgrading to the new
|
|
|
+ * firmware image otherwise we'll try to do the entire job from the
|
|
|
+ * host ... and we always "force" the operation in this path.
|
|
|
+ */
|
|
|
+ if (adap->flags & FULL_INIT_DONE)
|
|
|
+ mbox = adap->mbox;
|
|
|
+
|
|
|
+ ret = t4_fw_upgrade(adap, mbox, fw->data, fw->size, 1);
|
|
|
release_firmware(fw);
|
|
|
if (!ret)
|
|
|
- dev_info(adap->pdev_dev, "loaded firmware %s\n", ef->data);
|
|
|
+ dev_info(adap->pdev_dev, "loaded firmware %s,"
|
|
|
+ " reload cxgb4 driver\n", ef->data);
|
|
|
return ret;
|
|
|
}
|
|
|
|