mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
mwifiex: clean pcie ring only when device is present
commit 4f7ba432202c8330cc03ab959c6228d0de5dc4a3 upstream. Write io memory to clean PCIe buffer only when PCIe device is present else this results into crash because of invalid memory access. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
45e5cb4f43
commit
193e9c47e0
@ -559,7 +559,8 @@ mwifiex_clean_txrx(struct mwifiex_private *priv)
|
||||
mwifiex_wmm_delete_all_ralist(priv);
|
||||
memcpy(tos_to_tid, ac_to_tid, sizeof(tos_to_tid));
|
||||
|
||||
if (priv->adapter->if_ops.clean_pcie_ring)
|
||||
if (priv->adapter->if_ops.clean_pcie_ring &&
|
||||
!priv->adapter->surprise_removed)
|
||||
priv->adapter->if_ops.clean_pcie_ring(priv->adapter);
|
||||
spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user