Skip to content

Commit

Permalink
mwifiex: process pcie io memory read failure case
Browse files Browse the repository at this point in the history
It is observed that ioread32 may fail to read pcie register
in certain scenarios, this patch handles these cases.

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>
  • Loading branch information
Xinming Hu authored and Kalle Valo committed Feb 7, 2016
1 parent 6970cd4 commit af05148
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/marvell/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ static int mwifiex_read_reg(struct mwifiex_adapter *adapter, int reg, u32 *data)
struct pcie_service_card *card = adapter->card;

*data = ioread32(card->pci_mmap1 + reg);
if (*data == 0xffffffff)
return 0xffffffff;

return 0;
}
Expand Down

0 comments on commit af05148

Please sign in to comment.