diff options
author | Xinming Hu <huxm@marvell.com> | 2016-02-03 07:05:03 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-02-07 08:15:35 +0100 |
commit | af05148392f50490c662dccee6c502d9fcba33e2 (patch) | |
tree | facf99c922348e93052282a95ecd4d466cb80528 /drivers | |
parent | mwifiex: display right transmit packet delay (diff) | |
download | linux-af05148392f50490c662dccee6c502d9fcba33e2.tar.xz linux-af05148392f50490c662dccee6c502d9fcba33e2.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/pcie.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |