Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af051483 authored by Xinming Hu's avatar Xinming Hu Committed by Kalle Valo
Browse files

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: default avatarXinming Hu <huxm@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 6970cd44
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}