linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mwifiex: fix missing debug messages
@ 2015-12-31 14:24 Amitkumar Karwar
  2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Amitkumar Karwar @ 2015-12-31 14:24 UTC (permalink / raw)
  To: linux-wireless
  Cc: Cathy Luo, Nishant Sarmukadam, Xinming Hu, Amitkumar Karwar

From: Xinming Hu <huxm@marvell.com>

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 <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support
  2015-12-31 14:24 [PATCH 1/4] mwifiex: fix missing debug messages Amitkumar Karwar
@ 2015-12-31 14:24 ` Amitkumar Karwar
  2015-12-31 16:31   ` kbuild test robot
                     ` (2 more replies)
  2015-12-31 14:24 ` [PATCH 3/4] mwifiex: increase priority for critical message Amitkumar Karwar
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 9+ messages in thread
From: Amitkumar Karwar @ 2015-12-31 14:24 UTC (permalink / raw)
  To: linux-wireless
  Cc: Cathy Luo, Nishant Sarmukadam, Xinming Hu, Amitkumar Karwar

From: Xinming Hu <huxm@marvell.com>

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

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] mwifiex: increase priority for critical message
  2015-12-31 14:24 [PATCH 1/4] mwifiex: fix missing debug messages Amitkumar Karwar
  2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
@ 2015-12-31 14:24 ` Amitkumar Karwar
  2015-12-31 14:24 ` [PATCH 4/4] mwifiex: reduce cloned skb queue size Amitkumar Karwar
  2016-01-07  9:15 ` [1/4] mwifiex: fix missing debug messages Kalle Valo
  3 siblings, 0 replies; 9+ messages in thread
From: Amitkumar Karwar @ 2015-12-31 14:24 UTC (permalink / raw)
  To: linux-wireless
  Cc: Cathy Luo, Nishant Sarmukadam, Xinming Hu, Amitkumar Karwar

From: Xinming Hu <huxm@marvell.com>

This patch increase the priority for some critical
messages.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] mwifiex: reduce cloned skb queue size
  2015-12-31 14:24 [PATCH 1/4] mwifiex: fix missing debug messages Amitkumar Karwar
  2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
  2015-12-31 14:24 ` [PATCH 3/4] mwifiex: increase priority for critical message Amitkumar Karwar
@ 2015-12-31 14:24 ` Amitkumar Karwar
  2016-01-07  9:15 ` [1/4] mwifiex: fix missing debug messages Kalle Valo
  3 siblings, 0 replies; 9+ messages in thread
From: Amitkumar Karwar @ 2015-12-31 14:24 UTC (permalink / raw)
  To: linux-wireless; +Cc: Cathy Luo, Nishant Sarmukadam, Amitkumar Karwar

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 <akarwar@marvell.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support
  2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
@ 2015-12-31 16:31   ` kbuild test robot
  2015-12-31 18:03   ` kbuild test robot
  2016-01-07  9:17   ` Kalle Valo
  2 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2015-12-31 16:31 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: kbuild-all, linux-wireless, Cathy Luo, Nishant Sarmukadam,
	Xinming Hu, Amitkumar Karwar

[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37105 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support
  2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
  2015-12-31 16:31   ` kbuild test robot
@ 2015-12-31 18:03   ` kbuild test robot
  2016-01-05 12:57     ` Amitkumar Karwar
  2016-01-07  9:17   ` Kalle Valo
  2 siblings, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2015-12-31 18:03 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: kbuild-all, linux-wireless, Cathy Luo, Nishant Sarmukadam,
	Xinming Hu, Amitkumar Karwar

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 40127 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support
  2015-12-31 18:03   ` kbuild test robot
@ 2016-01-05 12:57     ` Amitkumar Karwar
  0 siblings, 0 replies; 9+ messages in thread
From: Amitkumar Karwar @ 2016-01-05 12:57 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all@01.org, linux-wireless@vger.kernel.org, Cathy Luo,
	Nishant Sarmukadam, Xinming Hu

> From: kbuild test robot [mailto:lkp@intel.com]
> Sent: Thursday, December 31, 2015 11:33 PM
> To: Amitkumar Karwar
> Cc: kbuild-all@01.org; linux-wireless@vger.kernel.org; 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [1/4] mwifiex: fix missing debug messages
  2015-12-31 14:24 [PATCH 1/4] mwifiex: fix missing debug messages Amitkumar Karwar
                   ` (2 preceding siblings ...)
  2015-12-31 14:24 ` [PATCH 4/4] mwifiex: reduce cloned skb queue size Amitkumar Karwar
@ 2016-01-07  9:15 ` Kalle Valo
  3 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2016-01-07  9:15 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: linux-wireless, Cathy Luo, Nishant Sarmukadam, Xinming Hu,
	Amitkumar Karwar


> From: Xinming Hu <huxm@marvell.com>
> 
> 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 <huxm@marvell.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support
  2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
  2015-12-31 16:31   ` kbuild test robot
  2015-12-31 18:03   ` kbuild test robot
@ 2016-01-07  9:17   ` Kalle Valo
  2 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2016-01-07  9:17 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: linux-wireless, Cathy Luo, Nishant Sarmukadam, Xinming Hu

Amitkumar Karwar <akarwar@marvell.com> writes:

> From: Xinming Hu <huxm@marvell.com>
>
> Newer pcie chipsets (8997 onwards) support MSIx. This
> patch enables it.
>
> Signed-off-by: Xinming Hu <huxm@marvell.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

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

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-01-07  9:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-31 14:24 [PATCH 1/4] mwifiex: fix missing debug messages Amitkumar Karwar
2015-12-31 14:24 ` [PATCH 2/4] mwifiex: enable pcie MSIx interrupt mode support Amitkumar Karwar
2015-12-31 16:31   ` kbuild test robot
2015-12-31 18:03   ` kbuild test robot
2016-01-05 12:57     ` Amitkumar Karwar
2016-01-07  9:17   ` Kalle Valo
2015-12-31 14:24 ` [PATCH 3/4] mwifiex: increase priority for critical message Amitkumar Karwar
2015-12-31 14:24 ` [PATCH 4/4] mwifiex: reduce cloned skb queue size Amitkumar Karwar
2016-01-07  9:15 ` [1/4] mwifiex: fix missing debug messages Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).