mwifiex: process pcie io memory read failure case
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>
This commit is contained in:
parent
6970cd446c
commit
af05148392
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue