From: Xinming Hu Date: Wed, 3 Feb 2016 06:05:03 +0000 (-0800) Subject: mwifiex: process pcie io memory read failure case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af05148392f50490c662dccee6c502d9fcba33e2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Cathy Luo Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 918e04954afe..b9fe1813cc4f 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -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; }