]>
Commit | Line | Data |
---|---|---|
7accec13 GKH |
1 | From 4f7ba432202c8330cc03ab959c6228d0de5dc4a3 Mon Sep 17 00:00:00 2001 |
2 | From: Avinash Patil <patila@marvell.com> | |
3 | Date: Tue, 18 Feb 2014 15:41:54 -0800 | |
4 | Subject: mwifiex: clean pcie ring only when device is present | |
5 | ||
6 | From: Avinash Patil <patila@marvell.com> | |
7 | ||
8 | commit 4f7ba432202c8330cc03ab959c6228d0de5dc4a3 upstream. | |
9 | ||
10 | Write io memory to clean PCIe buffer only when PCIe device is | |
11 | present else this results into crash because of invalid memory | |
12 | access. | |
13 | ||
14 | Signed-off-by: Avinash Patil <patila@marvell.com> | |
15 | Signed-off-by: Bing Zhao <bzhao@marvell.com> | |
16 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | ||
19 | --- | |
20 | drivers/net/wireless/mwifiex/wmm.c | 3 ++- | |
21 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
22 | ||
23 | --- a/drivers/net/wireless/mwifiex/wmm.c | |
24 | +++ b/drivers/net/wireless/mwifiex/wmm.c | |
25 | @@ -556,7 +556,8 @@ mwifiex_clean_txrx(struct mwifiex_privat | |
26 | mwifiex_wmm_delete_all_ralist(priv); | |
27 | memcpy(tos_to_tid, ac_to_tid, sizeof(tos_to_tid)); | |
28 | ||
29 | - if (priv->adapter->if_ops.clean_pcie_ring) | |
30 | + if (priv->adapter->if_ops.clean_pcie_ring && | |
31 | + !priv->adapter->surprise_removed) | |
32 | priv->adapter->if_ops.clean_pcie_ring(priv->adapter); | |
33 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags); | |
34 | } |