diff options
author | Sony Chacko <sony.chacko@qlogic.com> | 2014-04-23 09:59:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-24 13:31:14 -0400 |
commit | 2c97e9e2633f3a4a3a301e5071fb0fe0d0d7543b (patch) | |
tree | 242df4746a7f582d3822fdd9713fcb760a849211 /drivers/net | |
parent | ed2da03c6907800871234f5cae42db7d80de8dfc (diff) | |
download | op-kernel-dev-2c97e9e2633f3a4a3a301e5071fb0fe0d0d7543b.zip op-kernel-dev-2c97e9e2633f3a4a3a301e5071fb0fe0d0d7543b.tar.gz |
qlcnic: Reset firmware API lock at driver load time
Some firmware versions fails to reset the lock during
initialization. Force reset firmware API lock during driver
probe to ensure lock availability.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index dbf7539..0bc9148 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2374,6 +2374,14 @@ void qlcnic_set_drv_version(struct qlcnic_adapter *adapter) qlcnic_fw_cmd_set_drv_version(adapter, fw_cmd); } +/* Reset firmware API lock */ +static void qlcnic_reset_api_lock(struct qlcnic_adapter *adapter) +{ + qlcnic_api_lock(adapter); + qlcnic_api_unlock(adapter); +} + + static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2476,6 +2484,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (qlcnic_82xx_check(adapter)) { qlcnic_check_vf(adapter, ent); adapter->portnum = adapter->ahw->pci_func; + qlcnic_reset_api_lock(adapter); err = qlcnic_start_firmware(adapter); if (err) { dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n" |