Stability fixes for Marvell Wi-Fi
https://bugzilla.kernel.org/show_bug.cgi?id=109681#c56
This commit is contained in:
parent
301ce22ee9
commit
da075d68de
|
@ -0,0 +1,48 @@
|
|||
From patchwork Fri Jul 15 13:37:04 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [1/2] mwifiex: fix PCIe legacy interrupt problem
|
||||
From: Amitkumar Karwar <akarwar@marvell.com>
|
||||
X-Patchwork-Id: 9232091
|
||||
Message-Id: <1468589825-9188-1-git-send-email-akarwar@marvell.com>
|
||||
To: <linux-wireless@vger.kernel.org>
|
||||
Cc: Cathy Luo <cluo@marvell.com>, Nishant Sarmukadam <nishants@marvell.com>,
|
||||
Amitkumar Karwar <akarwar@marvell.com>
|
||||
Date: Fri, 15 Jul 2016 19:07:04 +0530
|
||||
|
||||
In corner case, we may end up processing same interrupt twice.
|
||||
We have a logic to read pending interrupts at the end of interrupt
|
||||
processing routine. It has a race with interrupts read in interrupt
|
||||
handler. This patch solves the problem by ORing the interrupt bitmap
|
||||
in this case.
|
||||
|
||||
The symptom for this bug is below messages in dmesg log.
|
||||
|
||||
[ 11.522123] mwifiex_pcie 0000:01:00.0: CMD_RESP: invalid cmd resp
|
||||
[ 11.680412] mwifiex_pcie 0000:01:00.0: There is no command but got cmdrsp
|
||||
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=109681
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Cathy Luo <cluo@marvell.com>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index d61d4ad..38bd62e 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -2300,6 +2300,12 @@ static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
|
||||
}
|
||||
|
||||
}
|
||||
+ if (!card->msi_enable) {
|
||||
+ spin_lock_irqsave(&adapter->int_lock, flags);
|
||||
+ pcie_ireg |= adapter->int_status;
|
||||
+ adapter->int_status = 0;
|
||||
+ spin_unlock_irqrestore(&adapter->int_lock, flags);
|
||||
+ }
|
||||
}
|
||||
mwifiex_dbg(adapter, INTR,
|
||||
"info: cmd_sent=%d data_sent=%d\n",
|
|
@ -0,0 +1,34 @@
|
|||
From patchwork Fri Jul 15 13:37:05 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [2/2] mwifiex: update command response skb length correctly
|
||||
From: Amitkumar Karwar <akarwar@marvell.com>
|
||||
X-Patchwork-Id: 9232093
|
||||
Message-Id: <1468589825-9188-2-git-send-email-akarwar@marvell.com>
|
||||
To: <linux-wireless@vger.kernel.org>
|
||||
Cc: Cathy Luo <cluo@marvell.com>, Nishant Sarmukadam <nishants@marvell.com>,
|
||||
Amitkumar Karwar <akarwar@marvell.com>
|
||||
Date: Fri, 15 Jul 2016 19:07:05 +0530
|
||||
|
||||
Same skb is being reused for storing command response from firmware
|
||||
in PCIe chipsets. There was a bug while updating the skb length.
|
||||
This patch ensures skb length correctly gets updated based on rx_len.
|
||||
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 38bd62e..a6af85d 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -1616,6 +1616,7 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
|
||||
|
||||
pkt_len = *((__le16 *)skb->data);
|
||||
rx_len = le16_to_cpu(pkt_len);
|
||||
+ skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
|
||||
skb_trim(skb, rx_len);
|
||||
skb_pull(skb, INTF_HEADER_LEN);
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From d41376ca8ba74e954ba931c69271d0b29546a202 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Norris <briannorris@chromium.org>
|
||||
Date: Thu, 30 Jun 2016 15:21:02 -0700
|
||||
Subject: mwifiex: mask PCIe interrupts before removal
|
||||
|
||||
The PCIe driver didn't mask the host interrupts before trying to tear
|
||||
down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
|
||||
since the MSI handler gets confused and locks up the system.
|
||||
|
||||
Also tested on 8897, which does not support MSI-X (and wasn't
|
||||
experiencing this same bug). No regressions seen there.
|
||||
|
||||
Signed-off-by: Brian Norris <briannorris@chromium.org>
|
||||
Tested-by: Douglas Anderson <dianders@chromium.org>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 012733c..c7f5df8 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -440,6 +440,11 @@ static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void mwifiex_pcie_disable_host_int_noerr(struct mwifiex_adapter *adapter)
|
||||
+{
|
||||
+ WARN_ON(mwifiex_pcie_disable_host_int(adapter));
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* This function enables the host interrupt.
|
||||
*
|
||||
@@ -2946,6 +2951,7 @@ static struct mwifiex_if_ops pcie_ops = {
|
||||
.register_dev = mwifiex_register_dev,
|
||||
.unregister_dev = mwifiex_unregister_dev,
|
||||
.enable_int = mwifiex_pcie_enable_host_int,
|
||||
+ .disable_int = mwifiex_pcie_disable_host_int_noerr,
|
||||
.process_int_status = mwifiex_process_int_status,
|
||||
.host_to_card = mwifiex_pcie_host_to_card,
|
||||
.wakeup = mwifiex_pm_wakeup_card,
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 141bcf099076df1a74317a5b14dcd56c933b9de8 Mon Sep 17 00:00:00 2001
|
||||
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Date: Wed, 18 May 2016 01:16:01 +0200
|
||||
Subject: mwiflex: avoid possible null pointer dereference
|
||||
|
||||
Do not dereference card before checking against NULL value.
|
||||
|
||||
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 9246ce8..a35db02 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -2901,10 +2901,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
|
||||
{
|
||||
struct pcie_service_card *card = adapter->card;
|
||||
const struct mwifiex_pcie_card_reg *reg;
|
||||
- struct pci_dev *pdev = card->dev;
|
||||
+ struct pci_dev *pdev;
|
||||
int i;
|
||||
|
||||
if (card) {
|
||||
+ pdev = card->dev;
|
||||
if (card->msix_enable) {
|
||||
for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)
|
||||
synchronize_irq(card->msix_entries[i].vector);
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
From 473dfbfa09934cea0d08cc9023c749a5fce10cb0 Mon Sep 17 00:00:00 2001
|
||||
From: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Date: Thu, 30 Jun 2016 22:24:57 +0530
|
||||
Subject: mwifiex: Change default firmware for PCIe8997 chipset
|
||||
|
||||
PCIe-USB8997 variant is being used in the product. Let's change default
|
||||
firmware from PCIe-UART to PCIe-USB. So by default PCIe-USB firmware would
|
||||
be downloaded if version register doesn't give any information.
|
||||
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 12 ++++++------
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.h | 4 ++--
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 1b1e266..012733c 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -2841,20 +2841,20 @@ static void mwifiex_pcie_get_fw_name(struct mwifiex_adapter *adapter)
|
||||
version &= 0x7;
|
||||
switch (revision_id) {
|
||||
case PCIE8997_V2:
|
||||
- if (version == CHIP_VER_PCIEUSB)
|
||||
+ if (version == CHIP_VER_PCIEUART)
|
||||
strcpy(adapter->fw_name,
|
||||
- PCIEUSB8997_FW_NAME_V2);
|
||||
+ PCIEUART8997_FW_NAME_V2);
|
||||
else
|
||||
strcpy(adapter->fw_name,
|
||||
- PCIEUART8997_FW_NAME_V2);
|
||||
+ PCIEUSB8997_FW_NAME_V2);
|
||||
break;
|
||||
case PCIE8997_Z:
|
||||
- if (version == CHIP_VER_PCIEUSB)
|
||||
+ if (version == CHIP_VER_PCIEUART)
|
||||
strcpy(adapter->fw_name,
|
||||
- PCIEUSB8997_FW_NAME_Z);
|
||||
+ PCIEUART8997_FW_NAME_Z);
|
||||
else
|
||||
strcpy(adapter->fw_name,
|
||||
- PCIEUART8997_FW_NAME_Z);
|
||||
+ PCIEUSB8997_FW_NAME_Z);
|
||||
break;
|
||||
default:
|
||||
strcpy(adapter->fw_name, PCIE8997_DEFAULT_FW_NAME);
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h b/drivers/net/wireless/marvell/mwifiex/pcie.h
|
||||
index 9c00c7e..f05061c 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin"
|
||||
#define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin"
|
||||
#define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin"
|
||||
-#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieuart8997_combo_v2.bin"
|
||||
+#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieusb8997_combo_v2.bin"
|
||||
#define PCIEUART8997_FW_NAME_Z "mrvl/pcieuart8997_combo.bin"
|
||||
#define PCIEUART8997_FW_NAME_V2 "mrvl/pcieuart8997_combo_v2.bin"
|
||||
#define PCIEUSB8997_FW_NAME_Z "mrvl/pcieusb8997_combo.bin"
|
||||
@@ -48,7 +48,7 @@
|
||||
#define PCIE8897_B0 0x1200
|
||||
#define PCIE8997_Z 0x0
|
||||
#define PCIE8997_V2 0x471
|
||||
-#define CHIP_VER_PCIEUSB 0x2
|
||||
+#define CHIP_VER_PCIEUART 0x3
|
||||
|
||||
/* Constants for Buffer Descriptor (BD) rings */
|
||||
#define MWIFIEX_MAX_TXRX_BD 0x20
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
From 5781fc29dbbd3ee5e11c1bf4fa6696ae89d19840 Mon Sep 17 00:00:00 2001
|
||||
From: Shengzhen Li <szli@marvell.com>
|
||||
Date: Fri, 1 Jul 2016 18:26:52 +0530
|
||||
Subject: mwifiex: fix interrupt processing corner case in MSI mode
|
||||
|
||||
As interrupt is read in interrupt handler as well as interrupt processing
|
||||
thread, we observed a corner case issue for MSI in which interrupt gets
|
||||
processed twice.
|
||||
|
||||
This patch moves interrupt reading code for MSI mode from
|
||||
mwifiex_interrupt_status() to mwifiex_pcie_process_int() to avoid the
|
||||
issue.
|
||||
|
||||
Signed-off-by: Shengzhen Li <szli@marvell.com>
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 50 ++++++++++++++++++++++++++---
|
||||
1 file changed, 46 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index c7f5df8..22fe993 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -2091,6 +2091,13 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter,
|
||||
unsigned long flags;
|
||||
struct pcie_service_card *card = adapter->card;
|
||||
|
||||
+ if (card->msi_enable) {
|
||||
+ spin_lock_irqsave(&adapter->int_lock, flags);
|
||||
+ adapter->int_status = 1;
|
||||
+ spin_unlock_irqrestore(&adapter->int_lock, flags);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (!mwifiex_pcie_ok_to_access_hw(adapter))
|
||||
return;
|
||||
|
||||
@@ -2192,15 +2199,44 @@ exit:
|
||||
static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
|
||||
{
|
||||
int ret;
|
||||
- u32 pcie_ireg;
|
||||
+ u32 pcie_ireg = 0;
|
||||
unsigned long flags;
|
||||
+ struct pcie_service_card *card = adapter->card;
|
||||
|
||||
spin_lock_irqsave(&adapter->int_lock, flags);
|
||||
- /* Clear out unused interrupts */
|
||||
- pcie_ireg = adapter->int_status;
|
||||
+ if (!card->msi_enable) {
|
||||
+ /* Clear out unused interrupts */
|
||||
+ pcie_ireg = adapter->int_status;
|
||||
+ }
|
||||
adapter->int_status = 0;
|
||||
spin_unlock_irqrestore(&adapter->int_lock, flags);
|
||||
|
||||
+ if (card->msi_enable) {
|
||||
+ if (mwifiex_pcie_ok_to_access_hw(adapter)) {
|
||||
+ if (mwifiex_read_reg(adapter, PCIE_HOST_INT_STATUS,
|
||||
+ &pcie_ireg)) {
|
||||
+ mwifiex_dbg(adapter, ERROR,
|
||||
+ "Read register failed\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if ((pcie_ireg != 0xFFFFFFFF) && (pcie_ireg)) {
|
||||
+ if (mwifiex_write_reg(adapter,
|
||||
+ PCIE_HOST_INT_STATUS,
|
||||
+ ~pcie_ireg)) {
|
||||
+ mwifiex_dbg(adapter, ERROR,
|
||||
+ "Write register failed\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (!adapter->pps_uapsd_mode &&
|
||||
+ adapter->ps_state == PS_STATE_SLEEP) {
|
||||
+ adapter->ps_state = PS_STATE_AWAKE;
|
||||
+ adapter->pm_wakeup_fw_try = false;
|
||||
+ del_timer(&adapter->wakeup_timer);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
while (pcie_ireg & HOST_INTR_MASK) {
|
||||
if (pcie_ireg & HOST_INTR_DNLD_DONE) {
|
||||
pcie_ireg &= ~HOST_INTR_DNLD_DONE;
|
||||
@@ -2240,6 +2276,12 @@ static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ if (card->msi_enable) {
|
||||
+ spin_lock_irqsave(&adapter->int_lock, flags);
|
||||
+ adapter->int_status = 0;
|
||||
+ spin_unlock_irqrestore(&adapter->int_lock, flags);
|
||||
+ }
|
||||
+
|
||||
if (mwifiex_pcie_ok_to_access_hw(adapter)) {
|
||||
if (mwifiex_read_reg(adapter, PCIE_HOST_INT_STATUS,
|
||||
&pcie_ireg)) {
|
||||
@@ -2263,7 +2305,7 @@ static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
|
||||
mwifiex_dbg(adapter, INTR,
|
||||
"info: cmd_sent=%d data_sent=%d\n",
|
||||
adapter->cmd_sent, adapter->data_sent);
|
||||
- if (adapter->ps_state != PS_STATE_SLEEP)
|
||||
+ if (!card->msi_enable && adapter->ps_state != PS_STATE_SLEEP)
|
||||
mwifiex_pcie_enable_host_int(adapter);
|
||||
|
||||
return 0;
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
From 5c87a55adbd5eb3536893c40086253e15ea53cd5 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias Krause <minipli@googlemail.com>
|
||||
Date: Sat, 21 May 2016 15:43:31 +0200
|
||||
Subject: mwifiex: remove misleading GFP_DMA flag in buffer allocations
|
||||
|
||||
The GFP_DMA flag is obviously misunderstood in the mwifiex driver. It's
|
||||
meant for legacy ISA DMA memory mappings only -- the lower 16MB on x86.
|
||||
That doesn't apply to PCIe or SDIO devices, I guess.
|
||||
|
||||
Remove the GFP_DMA flag to reduce the need to place the socket buffer
|
||||
allocation into the low mem DMA area, which might already be in use by
|
||||
other drivers.
|
||||
|
||||
This misuse was flagged by the PaX USERCOPY feature by chance, as it
|
||||
detected the user copy operation from a DMA buffer in the recvfrom()
|
||||
syscall path.
|
||||
|
||||
Signed-off-by: Mathias Krause <minipli@googlemail.com>
|
||||
Tested-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
|
||||
Cc: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Cc: Nishant Sarmukadam <nishants@marvell.com>
|
||||
Cc: Xinming Hu <huxm@marvell.com>
|
||||
Cc: Kalle Valo <kvalo@codeaurora.org>
|
||||
Cc: Brad Spengler <spender@grsecurity.net>
|
||||
Cc: PaX Team <pageexec@freemail.hu>
|
||||
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 2 +-
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 4 ++--
|
||||
drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
|
||||
index 1efef3b..dc49c3d 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
|
||||
@@ -184,7 +184,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
|
||||
|
||||
tx_info_src = MWIFIEX_SKB_TXCB(skb_src);
|
||||
skb_aggr = mwifiex_alloc_dma_align_buf(adapter->tx_buf_size,
|
||||
- GFP_ATOMIC | GFP_DMA);
|
||||
+ GFP_ATOMIC);
|
||||
if (!skb_aggr) {
|
||||
spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
|
||||
ra_list_flags);
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index a35db02..1b1e266 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -507,7 +507,7 @@ static int mwifiex_init_rxq_ring(struct mwifiex_adapter *adapter)
|
||||
for (i = 0; i < MWIFIEX_MAX_TXRX_BD; i++) {
|
||||
/* Allocate skb here so that firmware can DMA data from it */
|
||||
skb = mwifiex_alloc_dma_align_buf(MWIFIEX_RX_DATA_BUF_SIZE,
|
||||
- GFP_KERNEL | GFP_DMA);
|
||||
+ GFP_KERNEL);
|
||||
if (!skb) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
"Unable to allocate skb for RX ring.\n");
|
||||
@@ -1319,7 +1319,7 @@ static int mwifiex_pcie_process_recv_data(struct mwifiex_adapter *adapter)
|
||||
}
|
||||
|
||||
skb_tmp = mwifiex_alloc_dma_align_buf(MWIFIEX_RX_DATA_BUF_SIZE,
|
||||
- GFP_KERNEL | GFP_DMA);
|
||||
+ GFP_KERNEL);
|
||||
if (!skb_tmp) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
"Unable to allocate skb.\n");
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
|
||||
index bdc51ff..674465e 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
|
||||
@@ -1492,7 +1492,7 @@ rx_curr_single:
|
||||
mwifiex_dbg(adapter, INFO, "info: RX: port: %d, rx_len: %d\n",
|
||||
port, rx_len);
|
||||
|
||||
- skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL | GFP_DMA);
|
||||
+ skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL);
|
||||
if (!skb) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
"single skb allocated fail,\t"
|
||||
@@ -1597,7 +1597,7 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
|
||||
rx_len = (u16) (rx_blocks * MWIFIEX_SDIO_BLOCK_SIZE);
|
||||
mwifiex_dbg(adapter, INFO, "info: rx_len = %d\n", rx_len);
|
||||
|
||||
- skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL | GFP_DMA);
|
||||
+ skb = mwifiex_alloc_dma_align_buf(rx_len, GFP_KERNEL);
|
||||
if (!skb)
|
||||
return -1;
|
||||
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 2af86f9d954ee86e9b1c492e025de37a1b6d2db8 Mon Sep 17 00:00:00 2001
|
||||
From: Karthik D A <karthida@marvell.com>
|
||||
Date: Fri, 15 Jul 2016 18:18:39 +0530
|
||||
Subject: mwifiex: Fix request_irq() failure handling
|
||||
|
||||
It's been observed that request_irq() failure leads to a system crash
|
||||
due to a bug in mwifiex driver.
|
||||
When this failure happens, mwifiex_add_card() already takes care of
|
||||
clearing and freeing adapter->card pointer. This patch removes the
|
||||
redundant cleanup code causing crash.
|
||||
|
||||
Signed-off-by: Karthik D A <karthida@marvell.com>
|
||||
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/pcie.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 22fe993..0faf4a2 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -202,7 +202,6 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
||||
if (mwifiex_add_card(card, &add_remove_card_sem, &pcie_ops,
|
||||
MWIFIEX_PCIE)) {
|
||||
pr_err("%s failed\n", __func__);
|
||||
- kfree(card);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2843,7 +2842,6 @@ static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter)
|
||||
"MRVL_PCIE", &card->share_irq_ctx);
|
||||
if (ret) {
|
||||
pr_err("request_irq failed: ret=%d\n", ret);
|
||||
- adapter->card = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -659,6 +659,15 @@ Patch918: ASoC_Intel_Add_support_for_surface3_tablet.patch
|
|||
Patch919: 07d5c17b80f67d1b2cc2c8243590e2abed4bd7ae..5d554ea4f287665b839975ecb11bd29d49a5c9b5.patch
|
||||
Patch920: 5d554ea4f287665b839975ecb11bd29d49a5c9b5..24dad509ed5528bbbe31ff17f9fb39c0473ec8f4.patch
|
||||
|
||||
Patch921: 6b3c33e985f20e7de07fc4b9b1a96dc452e37cb4..141bcf099076df1a74317a5b14dcd56c933b9de8.patch
|
||||
Patch922: ee6e7aa383944ce62860f35c86f1ac7da7dd27b6..5c87a55adbd5eb3536893c40086253e15ea53cd5.patch
|
||||
Patch923: c18b104dd2495da60ec92f40e14559591644cc3a..473dfbfa09934cea0d08cc9023c749a5fce10cb0.patch
|
||||
Patch924: 473dfbfa09934cea0d08cc9023c749a5fce10cb0..d41376ca8ba74e954ba931c69271d0b29546a202.patch
|
||||
Patch925: d41376ca8ba74e954ba931c69271d0b29546a202..5781fc29dbbd3ee5e11c1bf4fa6696ae89d19840.patch
|
||||
Patch926: fd3ed33f51c2a586412d35b4f64803f019ab589f..2af86f9d954ee86e9b1c492e025de37a1b6d2db8.patch
|
||||
Patch927: 1-2-mwifiex-fix-PCIe-legacy-interrupt-problem.patch
|
||||
Patch928: 2-2-mwifiex-update-command-response-skb-length-correctly.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
|
|
Loading…
Reference in New Issue