2015-12-31 14:26:34

by Amitkumar Karwar

[permalink] [raw]
Subject: [PATCH 1/4] mwifiex: fix missing debug messages

From: Xinming Hu <[email protected]>

Some critical messages are missed until "adapter->dev"
gets initialized in mwifiex_register_dev().
We will use pr_* print message instead of mwifiex_dbg at
those places to resolve the problem.

Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/pcie.c | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 4000357..165fe4f 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -2480,50 +2480,44 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter)

pci_set_master(pdev);

- mwifiex_dbg(adapter, INFO,
- "try set_consistent_dma_mask(32)\n");
+ pr_notice("try set_consistent_dma_mask(32)\n");
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) {
- mwifiex_dbg(adapter, ERROR,
- "set_dma_mask(32) failed\n");
+ pr_err("set_dma_mask(32) failed\n");
goto err_set_dma_mask;
}

ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) {
- mwifiex_dbg(adapter, ERROR,
- "set_consistent_dma_mask(64) failed\n");
+ pr_err("set_consistent_dma_mask(64) failed\n");
goto err_set_dma_mask;
}

ret = pci_request_region(pdev, 0, DRV_NAME);
if (ret) {
- mwifiex_dbg(adapter, ERROR,
- "req_reg(0) error\n");
+ pr_err("req_reg(0) error\n");
goto err_req_region0;
}
card->pci_mmap = pci_iomap(pdev, 0, 0);
if (!card->pci_mmap) {
- mwifiex_dbg(adapter, ERROR, "iomap(0) error\n");
+ pr_err("iomap(0) error\n");
ret = -EIO;
goto err_iomap0;
}
ret = pci_request_region(pdev, 2, DRV_NAME);
if (ret) {
- mwifiex_dbg(adapter, ERROR, "req_reg(2) error\n");
+ pr_err("req_reg(2) error\n");
goto err_req_region2;
}
card->pci_mmap1 = pci_iomap(pdev, 2, 0);
if (!card->pci_mmap1) {
- mwifiex_dbg(adapter, ERROR,
- "iomap(2) error\n");
+ pr_err("iomap(2) error\n");
ret = -EIO;
goto err_iomap2;
}

- mwifiex_dbg(adapter, INFO,
- "PCI memory map Virt0: %p PCI memory map Virt2: %p\n",
- card->pci_mmap, card->pci_mmap1);
+ pr_notice("PCI memory map Virt0: %p PCI memory map Virt2: %p\n",
+ card->pci_mmap, card->pci_mmap1);

card->cmdrsp_buf = NULL;
ret = mwifiex_pcie_create_txbd_ring(adapter);
@@ -2642,11 +2636,11 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)

/* save adapter pointer in card */
card->adapter = adapter;
+ adapter->dev = &pdev->dev;

if (mwifiex_pcie_request_irq(adapter))
return -1;

- adapter->dev = &pdev->dev;
adapter->tx_buf_size = card->pcie.tx_buf_size;
adapter->mem_type_mapping_tbl = mem_type_mapping_tbl;
adapter->num_mem_types = ARRAY_SIZE(mem_type_mapping_tbl);
--
1.8.1.4



2015-12-31 16:32:26

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support

Hi Xinming,

[auto build test ERROR on wireless-drivers-next/master]
[cannot apply to v4.4-rc7 next-20151223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Amitkumar-Karwar/mwifiex-fix-missing-debug-messages/20151231-222922
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: mn10300-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=mn10300

All errors (new ones prefixed by >>):

In file included from drivers/net/wireless/marvell/mwifiex/main.h:45:0,
from drivers/net/wireless/marvell/mwifiex/main.c:20:
>> drivers/net/wireless/marvell/mwifiex/pcie.h:342:20: error: array type has incomplete element type
struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
^

vim +342 drivers/net/wireless/marvell/mwifiex/pcie.h

336 u8 *sleep_cookie_vbase;
337 dma_addr_t sleep_cookie_pbase;
338 void __iomem *pci_mmap;
339 void __iomem *pci_mmap1;
340 int msi_enable;
341 int msix_enable;
> 342 struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
343 struct mwifiex_msix_context msix_ctx[MWIFIEX_NUM_MSIX_VECTORS];
344 struct mwifiex_msix_context share_irq_ctx;
345 };

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.66 kB)
.config.gz (36.24 kB)
Download all attachments

2015-12-31 18:04:14

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support

Hi Xinming,

[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on next-20151231]
[cannot apply to v4.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Amitkumar-Karwar/mwifiex-fix-missing-debug-messages/20151231-222922
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: mips-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=mips

All errors (new ones prefixed by >>):

In file included from drivers/net/wireless/marvell/mwifiex/main.h:45:0,
from drivers/net/wireless/marvell/mwifiex/main.c:20:
>> drivers/net/wireless/marvell/mwifiex/pcie.h:342:20: error: array type has incomplete element type 'struct msix_entry'
struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
^

vim +342 drivers/net/wireless/marvell/mwifiex/pcie.h

336 u8 *sleep_cookie_vbase;
337 dma_addr_t sleep_cookie_pbase;
338 void __iomem *pci_mmap;
339 void __iomem *pci_mmap1;
340 int msi_enable;
341 int msix_enable;
> 342 struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
343 struct mwifiex_msix_context msix_ctx[MWIFIEX_NUM_MSIX_VECTORS];
344 struct mwifiex_msix_context share_irq_ctx;
345 };

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.70 kB)
.config.gz (39.19 kB)
Download all attachments

2015-12-31 14:26:39

by Amitkumar Karwar

[permalink] [raw]
Subject: [PATCH 3/4] mwifiex: increase priority for critical message

From: Xinming Hu <[email protected]>

This patch increase the priority for some critical
messages.

Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/pcie.c | 6 +++---
drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 57750f5..5e15464 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -2148,14 +2148,14 @@ static irqreturn_t mwifiex_pcie_interrupt(int irq, void *context)
struct mwifiex_adapter *adapter;

if (!pdev) {
- pr_debug("info: %s: pdev is NULL\n", (u8 *)pdev);
+ pr_err("info: %s: pdev is NULL\n", __func__);
goto exit;
}

card = pci_get_drvdata(pdev);
if (!card || !card->adapter) {
- pr_debug("info: %s: card=%p adapter=%p\n", __func__, card,
- card ? card->adapter : NULL);
+ pr_err("info: %s: card=%p adapter=%p\n", __func__, card,
+ card ? card->adapter : NULL);
goto exit;
}
adapter = card->adapter;
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index 024306a..ec1e8c3 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -796,8 +796,8 @@ mwifiex_sdio_interrupt(struct sdio_func *func)

card = sdio_get_drvdata(func);
if (!card || !card->adapter) {
- pr_debug("int: func=%p card=%p adapter=%p\n",
- func, card, card ? card->adapter : NULL);
+ pr_err("int: func=%p card=%p adapter=%p\n",
+ func, card, card ? card->adapter : NULL);
return;
}
adapter = card->adapter;
--
1.8.1.4


2015-12-31 14:26:37

by Amitkumar Karwar

[permalink] [raw]
Subject: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support

From: Xinming Hu <[email protected]>

Newer pcie chipsets (8997 onwards) support MSIx. This
patch enables it.

Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/pcie.c | 187 +++++++++++++++++++++++-----
drivers/net/wireless/marvell/mwifiex/pcie.h | 15 +++
2 files changed, 174 insertions(+), 28 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 165fe4f..57750f5 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -2082,20 +2082,28 @@ mwifiex_check_winner_status(struct mwifiex_adapter *adapter)
/*
* This function reads the interrupt status from card.
*/
-static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
+static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter,
+ int msg_id)
{
u32 pcie_ireg;
unsigned long flags;
+ struct pcie_service_card *card = adapter->card;

if (!mwifiex_pcie_ok_to_access_hw(adapter))
return;

- if (mwifiex_read_reg(adapter, PCIE_HOST_INT_STATUS, &pcie_ireg)) {
- mwifiex_dbg(adapter, ERROR, "Read register failed\n");
- return;
- }
+ if (card->msix_enable && msg_id >= 0) {
+ pcie_ireg = BIT(msg_id);
+ } else {
+ if (mwifiex_read_reg(adapter, PCIE_HOST_INT_STATUS,
+ &pcie_ireg)) {
+ mwifiex_dbg(adapter, ERROR, "Read register failed\n");
+ return;
+ }
+
+ if ((pcie_ireg == 0xFFFFFFFF) || !pcie_ireg)
+ return;

- if ((pcie_ireg != 0xFFFFFFFF) && (pcie_ireg)) {

mwifiex_pcie_disable_host_int(adapter);

@@ -2106,20 +2114,23 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
"Write register failed\n");
return;
}
- spin_lock_irqsave(&adapter->int_lock, flags);
- adapter->int_status |= pcie_ireg;
- spin_unlock_irqrestore(&adapter->int_lock, flags);
-
- if (!adapter->pps_uapsd_mode &&
- adapter->ps_state == PS_STATE_SLEEP &&
- mwifiex_pcie_ok_to_access_hw(adapter)) {
- /* Potentially for PCIe we could get other
- * interrupts like shared. Don't change power
- * state until cookie is set */
- adapter->ps_state = PS_STATE_AWAKE;
- adapter->pm_wakeup_fw_try = false;
- del_timer(&adapter->wakeup_timer);
- }
+ }
+
+ spin_lock_irqsave(&adapter->int_lock, flags);
+ adapter->int_status |= pcie_ireg;
+ spin_unlock_irqrestore(&adapter->int_lock, flags);
+ mwifiex_dbg(adapter, INTR, "ireg: 0x%08x\n", pcie_ireg);
+
+ if (!adapter->pps_uapsd_mode &&
+ adapter->ps_state == PS_STATE_SLEEP &&
+ mwifiex_pcie_ok_to_access_hw(adapter)) {
+ /* Potentially for PCIe we could get other
+ * interrupts like shared. Don't change power
+ * state until cookie is set
+ */
+ adapter->ps_state = PS_STATE_AWAKE;
+ adapter->pm_wakeup_fw_try = false;
+ del_timer(&adapter->wakeup_timer);
}
}

@@ -2131,7 +2142,8 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
*/
static irqreturn_t mwifiex_pcie_interrupt(int irq, void *context)
{
- struct pci_dev *pdev = (struct pci_dev *)context;
+ struct mwifiex_msix_context *ctx = context;
+ struct pci_dev *pdev = ctx->dev;
struct pcie_service_card *card;
struct mwifiex_adapter *adapter;

@@ -2151,7 +2163,11 @@ static irqreturn_t mwifiex_pcie_interrupt(int irq, void *context)
if (adapter->surprise_removed)
goto exit;

- mwifiex_interrupt_status(adapter);
+ if (card->msix_enable)
+ mwifiex_interrupt_status(adapter, ctx->msg_id);
+ else
+ mwifiex_interrupt_status(adapter, -1);
+
mwifiex_queue_main_work(adapter);

exit:
@@ -2171,7 +2187,7 @@ exit:
* In case of Rx packets received, the packets are uploaded from card to
* host and processed accordingly.
*/
-static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
{
int ret;
u32 pcie_ireg;
@@ -2251,6 +2267,69 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
return 0;
}

+static int mwifiex_process_msix_int(struct mwifiex_adapter *adapter)
+{
+ int ret;
+ u32 pcie_ireg;
+ unsigned long flags;
+
+ spin_lock_irqsave(&adapter->int_lock, flags);
+ /* Clear out unused interrupts */
+ pcie_ireg = adapter->int_status;
+ adapter->int_status = 0;
+ spin_unlock_irqrestore(&adapter->int_lock, flags);
+
+ if (pcie_ireg & HOST_INTR_DNLD_DONE) {
+ mwifiex_dbg(adapter, INTR,
+ "info: TX DNLD Done\n");
+ ret = mwifiex_pcie_send_data_complete(adapter);
+ if (ret)
+ return ret;
+ }
+ if (pcie_ireg & HOST_INTR_UPLD_RDY) {
+ mwifiex_dbg(adapter, INTR,
+ "info: Rx DATA\n");
+ ret = mwifiex_pcie_process_recv_data(adapter);
+ if (ret)
+ return ret;
+ }
+ if (pcie_ireg & HOST_INTR_EVENT_RDY) {
+ mwifiex_dbg(adapter, INTR,
+ "info: Rx EVENT\n");
+ ret = mwifiex_pcie_process_event_ready(adapter);
+ if (ret)
+ return ret;
+ }
+
+ if (pcie_ireg & HOST_INTR_CMD_DONE) {
+ if (adapter->cmd_sent) {
+ mwifiex_dbg(adapter, INTR,
+ "info: CMD sent Interrupt\n");
+ adapter->cmd_sent = false;
+ }
+ /* Handle command response */
+ ret = mwifiex_pcie_process_cmd_complete(adapter);
+ if (ret)
+ return ret;
+ }
+
+ mwifiex_dbg(adapter, INTR,
+ "info: cmd_sent=%d data_sent=%d\n",
+ adapter->cmd_sent, adapter->data_sent);
+
+ return 0;
+}
+
+static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
+{
+ struct pcie_service_card *card = adapter->card;
+
+ if (card->msix_enable)
+ return mwifiex_process_msix_int(adapter);
+ else
+ return mwifiex_process_pcie_int(adapter);
+}
+
/*
* This function downloads data from driver to card.
*
@@ -2602,10 +2681,43 @@ static void mwifiex_pcie_cleanup(struct mwifiex_adapter *adapter)

static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter)
{
- int ret;
+ int ret, i, j;
struct pcie_service_card *card = adapter->card;
struct pci_dev *pdev = card->dev;

+ if (card->pcie.reg->msix_support) {
+ for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)
+ card->msix_entries[i].entry = i;
+ ret = pci_enable_msix_exact(pdev, card->msix_entries,
+ MWIFIEX_NUM_MSIX_VECTORS);
+ if (!ret) {
+ for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++) {
+ card->msix_ctx[i].dev = pdev;
+ card->msix_ctx[i].msg_id = i;
+
+ ret = request_irq(card->msix_entries[i].vector,
+ mwifiex_pcie_interrupt, 0,
+ "MWIFIEX_PCIE_MSIX",
+ &card->msix_ctx[i]);
+ if (ret)
+ break;
+ }
+
+ if (ret) {
+ mwifiex_dbg(adapter, INFO, "request_irq fail: %d\n",
+ ret);
+ for (j = 0; j < i; j++)
+ free_irq(card->msix_entries[j].vector,
+ &card->msix_ctx[i]);
+ pci_disable_msix(pdev);
+ } else {
+ mwifiex_dbg(adapter, MSG, "MSIx enabled!");
+ card->msix_enable = 1;
+ return 0;
+ }
+ }
+ }
+
if (pci_enable_msi(pdev) != 0)
pci_disable_msi(pdev);
else
@@ -2613,8 +2725,10 @@ static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter)

mwifiex_dbg(adapter, INFO, "msi_enable = %d\n", card->msi_enable);

+ card->share_irq_ctx.dev = pdev;
+ card->share_irq_ctx.msg_id = -1;
ret = request_irq(pdev->irq, mwifiex_pcie_interrupt, IRQF_SHARED,
- "MRVL_PCIE", pdev);
+ "MRVL_PCIE", &card->share_irq_ctx);
if (ret) {
pr_err("request_irq failed: ret=%d\n", ret);
adapter->card = NULL;
@@ -2660,11 +2774,28 @@ 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;
+ int i;

if (card) {
- mwifiex_dbg(adapter, INFO,
- "%s(): calling free_irq()\n", __func__);
- free_irq(card->dev->irq, card->dev);
+ if (card->msix_enable) {
+ for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)
+ synchronize_irq(card->msix_entries[i].vector);
+
+ for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)
+ free_irq(card->msix_entries[i].vector,
+ &card->msix_ctx[i]);
+
+ card->msix_enable = 0;
+ pci_disable_msix(pdev);
+ } else {
+ mwifiex_dbg(adapter, INFO,
+ "%s(): calling free_irq()\n", __func__);
+ free_irq(card->dev->irq, &card->share_irq_ctx);
+
+ if (card->msi_enable)
+ pci_disable_msi(pdev);
+ }

reg = card->pcie.reg;
if (reg->sleep_cookie)
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h b/drivers/net/wireless/marvell/mwifiex/pcie.h
index 6fc2873..41b7f5e 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.h
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.h
@@ -135,6 +135,7 @@ struct mwifiex_pcie_card_reg {
u16 fw_dump_ctrl;
u16 fw_dump_start;
u16 fw_dump_end;
+ u8 msix_support;
};

static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
@@ -166,6 +167,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
.ring_tx_start_ptr = 0,
.pfu_enabled = 0,
.sleep_cookie = 1,
+ .msix_support = 0,
};

static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = {
@@ -200,6 +202,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = {
.fw_dump_ctrl = 0xcf4,
.fw_dump_start = 0xcf8,
.fw_dump_end = 0xcff,
+ .msix_support = 0,
};

static const struct mwifiex_pcie_card_reg mwifiex_reg_8997 = {
@@ -231,6 +234,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8997 = {
.ring_tx_start_ptr = MWIFIEX_BD_FLAG_TX_START_PTR,
.pfu_enabled = 1,
.sleep_cookie = 0,
+ .msix_support = 1,
};

struct mwifiex_pcie_device {
@@ -290,6 +294,13 @@ struct mwifiex_pfu_buf_desc {
u32 reserved;
} __packed;

+#define MWIFIEX_NUM_MSIX_VECTORS 4
+
+struct mwifiex_msix_context {
+ struct pci_dev *dev;
+ u16 msg_id;
+};
+
struct pcie_service_card {
struct pci_dev *dev;
struct mwifiex_adapter *adapter;
@@ -327,6 +338,10 @@ struct pcie_service_card {
void __iomem *pci_mmap;
void __iomem *pci_mmap1;
int msi_enable;
+ int msix_enable;
+ struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
+ struct mwifiex_msix_context msix_ctx[MWIFIEX_NUM_MSIX_VECTORS];
+ struct mwifiex_msix_context share_irq_ctx;
};

static inline int
--
1.8.1.4


2015-12-31 14:26:42

by Amitkumar Karwar

[permalink] [raw]
Subject: [PATCH 4/4] mwifiex: reduce cloned skb queue size

Driver supports Tx status ack feature. When hostapd/
wpa_supplicant asks for ack status of an EAPOL/ACTION
frame, driver maintains a cloned skb for the packet
until TX_STATUS event is received from firmware.

Cloned skb queue gets flushed when connection is terminated
or driver is unloaded.

Let's reduce the queue size to avoid unnecessarily
keeping memory allocated when environment is busy.

Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 969ca1e..79c16de 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -763,7 +763,7 @@ mwifiex_clone_skb_for_tx_status(struct mwifiex_private *priv,

spin_lock_irqsave(&priv->ack_status_lock, flags);
id = idr_alloc(&priv->ack_status_frames, orig_skb,
- 1, 0xff, GFP_ATOMIC);
+ 1, 0x10, GFP_ATOMIC);
spin_unlock_irqrestore(&priv->ack_status_lock, flags);

if (id >= 0) {
--
1.8.1.4


2016-01-07 09:18:01

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support

Amitkumar Karwar <[email protected]> writes:

> From: Xinming Hu <[email protected]>
>
> Newer pcie chipsets (8997 onwards) support MSIx. This
> patch enables it.
>
> Signed-off-by: Xinming Hu <[email protected]>
> Signed-off-by: Amitkumar Karwar <[email protected]>

I have dropped this patch, please resend once the build issue is solved.

--
Kalle Valo

2016-01-05 12:57:43

by Amitkumar Karwar

[permalink] [raw]
Subject: RE: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support

> From: kbuild test robot [mailto:[email protected]]
> Sent: Thursday, December 31, 2015 11:33 PM
> To: Amitkumar Karwar
> Cc: [email protected]; [email protected]; Cathy Luo;
> Nishant Sarmukadam; Xinming Hu; Amitkumar Karwar
> Subject: Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode
> support
>
> Hi Xinming,
>
> [auto build test ERROR on wireless-drivers-next/master] [also build test
> ERROR on next-20151231] [cannot apply to v4.4-rc7] [if your patch is
> applied to the wrong git tree, please drop us a note to help improving
> the system]
>
> url: https://github.com/0day-ci/linux/commits/Amitkumar-
> Karwar/mwifiex-fix-missing-debug-messages/20151231-222922
> base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-
> drivers-next.git master
> config: mips-allyesconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-
> tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=mips
>
> All errors (new ones prefixed by >>):
>
> In file included from
> drivers/net/wireless/marvell/mwifiex/main.h:45:0,
> from drivers/net/wireless/marvell/mwifiex/main.c:20:
> >> drivers/net/wireless/marvell/mwifiex/pcie.h:342:20: error: array type
> has incomplete element type 'struct msix_entry'
> struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
> ^
>
> vim +342 drivers/net/wireless/marvell/mwifiex/pcie.h
>
> 336 u8 *sleep_cookie_vbase;
> 337 dma_addr_t sleep_cookie_pbase;
> 338 void __iomem *pci_mmap;
> 339 void __iomem *pci_mmap1;
> 340 int msi_enable;
> 341 int msix_enable;
> > 342 struct msix_entry
> msix_entries[MWIFIEX_NUM_MSIX_VECTORS];
> 343 struct mwifiex_msix_context
> msix_ctx[MWIFIEX_NUM_MSIX_VECTORS];
> 344 struct mwifiex_msix_context share_irq_ctx;
> 345 };
>

"struct msix_entry" has been defined in "include/linux/pci.h". We have already included this file.
Any suggestions to fix this MIPS specific compilation error? OR it's just a false alarm.

Regards,
Amitkumar Karwar

2016-01-07 09:15:45

by Kalle Valo

[permalink] [raw]
Subject: Re: [1/4] mwifiex: fix missing debug messages


> From: Xinming Hu <[email protected]>
>
> Some critical messages are missed until "adapter->dev"
> gets initialized in mwifiex_register_dev().
> We will use pr_* print message instead of mwifiex_dbg at
> those places to resolve the problem.
>
> Signed-off-by: Xinming Hu <[email protected]>
> Signed-off-by: Amitkumar Karwar <[email protected]>

Thanks, 3 patches applied to wireless-drivers-next.git:

fdb1e28e05c9 mwifiex: fix missing debug messages
91442431c3f9 mwifiex: increase priority for critical message
ee548d4b1036 mwifiex: reduce cloned skb queue size

Kalle Valo