diff options
author | Xinming Hu <huxm@marvell.com> | 2016-02-03 07:05:04 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-02-07 08:15:36 +0100 |
commit | 0172404d79ec37e2c7d9dc90f6876dc314dc0fe5 (patch) | |
tree | bbbc2474450dd24d6804dc69e9731e08812493e0 | |
parent | mwifiex: process pcie io memory read failure case (diff) | |
download | linux-0172404d79ec37e2c7d9dc90f6876dc314dc0fe5.tar.xz linux-0172404d79ec37e2c7d9dc90f6876dc314dc0fe5.zip |
mwifiex: skip firmware dump when read_regs() fails
If we are not able to read registers or PCIe memory,
it means PCIe device is in bad state. We will skip
firmware dump in this case.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/pcie.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index b9fe1813cc4f..a18d944c2f31 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -2366,9 +2366,13 @@ mwifiex_pcie_rdwr_firmware(struct mwifiex_adapter *adapter, u8 doneflag) { int ret, tries; u8 ctrl_data; + u32 fw_status; struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; + if (mwifiex_read_reg(adapter, reg->fw_status, &fw_status)) + return RDWR_STATUS_FAILURE; + ret = mwifiex_write_reg(adapter, reg->fw_dump_ctrl, FW_DUMP_HOST_READY); if (ret) { mwifiex_dbg(adapter, ERROR, |