Skip to contentSkip to conversation

mwifiex: fix RX data stall issue on USB interface

PATCH Superseded Ganapathi Bhat 3 participants 19 messages Jan 22, 2018 – Jan 31, 2018 2 messages not in the archive Marvell mwifiex wireless driver

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover mwifiex: fix RX data stall issue on USB interface

This patch series contains 2 fixes to avoid RX data stall on observed on high through put scenarios on some slower platforms.

Shrenik Shikhare (2):
mwifiex: schedule rx_work on RX interrupt for USB
mwifiex: use more_rx_task_flag to avoid USB RX stall

 drivers/net/wireless/marvell/mwifiex/main.c | 17 +++++++++++++----
 drivers/net/wireless/marvell/mwifiex/main.h |  2 ++
 drivers/net/wireless/marvell/mwifiex/usb.c  |  2 ++
 3 files changed, 17 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 mwifiex: schedule rx_work on RX interrupt for USB

From: Shrenik Shikhare <[email protected]>

There is race for data_received flag between main thread and RX data interrupt(mwifiex_usb_rx_complete()):
1. USB received an RX data interrupt, set data_received flag
2. main thread checks data_received, if set queues rx_work
3. rx worker thread independently start processing rx_data_q
4. rx work exits (once rx_data_q is empty)
5. main thread resets the data_received flag(after #2)
6. Now at the corner case there will be high RX data interrupts between #4 and #5
7. Driver stops submitting URBs to firmware, once rx_pending exceeds HIGH_RX_PENDING
8. The flag data_received(cleared in #5) will remain unset since there will be no interrupts from firmware to set it(after #7)

Above scenario causes RX stall in driver, which will finally result in command/TX timeouts in firmware.

As a fix, queue rx_work directly in mwifiex_usb_rx_complete() callback, instead in the main thread. This removes dependency of RX processing on data_received flag.

---
 drivers/net/wireless/marvell/mwifiex/main.c | 7 ++++---
 drivers/net/wireless/marvell/mwifiex/main.h | 1 +
 drivers/net/wireless/marvell/mwifiex/usb.c  | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/wireless/marvell/mwifiex/main.c +4 -3
index 12e7399..6e6e1a7 100644
@@ -171,7 +171,7 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
 }
 EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
 
-static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
 {
 	unsigned long flags;
 
@@ -183,6 +183,7 @@ static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
 		queue_work(adapter->rx_workqueue, &adapter->rx_work);
 	}
 }
+EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);
 
 static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
 {
@@ -283,10 +284,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
 				mwifiex_process_hs_config(adapter);
 			if (adapter->if_ops.process_int_status)
 				adapter->if_ops.process_int_status(adapter);
+			if (adapter->rx_work_enabled && adapter->data_received)
+				mwifiex_queue_rx_work(adapter);
 		}
 
-		if (adapter->rx_work_enabled && adapter->data_received)
-			mwifiex_queue_rx_work(adapter);
 
 		/* Need to wake up the card ? */
 		if ((adapter->ps_state == PS_STATE_SLEEP) &&
drivers/net/wireless/marvell/mwifiex/main.h +1 -0
index 6b5539b..66ba95c 100644
@@ -1667,6 +1667,7 @@ u8 mwifiex_adjust_data_rate(struct mwifiex_private *priv,
 void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter);
 void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
 void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter);
 int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
 			      int cmd_type,
 			      struct mwifiex_ds_wakeup_reason *wakeup_reason);
drivers/net/wireless/marvell/mwifiex/usb.c +2 -0
index 4bc2448..d20fda1 100644
@@ -144,6 +144,8 @@ static int mwifiex_usb_recv(struct mwifiex_adapter *adapter,
 		skb_queue_tail(&adapter->rx_data_q, skb);
 		adapter->data_received = true;
 		atomic_inc(&adapter->rx_pending);
+		if (adapter->rx_work_enabled)
+			mwifiex_queue_rx_work(adapter);
 		break;
 	default:
 		mwifiex_dbg(adapter, ERROR,
Signature · 1 line
1.9.1
#2 lore raw

Re: [1/2] mwifiex: schedule rx_work on RX interrupt for USB

Quoted 19 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is race for data_received flag between main thread and RX data interrupt(mwifiex_usb_rx_complete()):
1. USB received an RX data interrupt, set data_received flag
2. main thread checks data_received, if set queues rx_work
3. rx worker thread independently start processing rx_data_q
4. rx work exits (once rx_data_q is empty)
5. main thread resets the data_received flag(after #2)
6. Now at the corner case there will be high RX data interrupts between #4 and #5
7. Driver stops submitting URBs to firmware, once rx_pending exceeds HIGH_RX_PENDING
8. The flag data_received(cleared in #5) will remain unset since there will be no interrupts from firmware to set it(after #7)

Above scenario causes RX stall in driver, which will finally result in command/TX timeouts in firmware.

Quoted 6 lines

As a fix, queue rx_work directly in mwifiex_usb_rx_complete() callback, instead in the main thread. This removes dependency of RX processing on data_received flag.

Brian, did you have a chance to review these two?

Signature · 3 lines
https://patchwork.kernel.org/patch/10178731/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer
#4 lore raw

Re: [1/2] mwifiex: schedule rx_work on RX interrupt for USB

Quoted 21 lines · Kalle Valo
Quoted 19 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is race for data_received flag between main thread and RX data interrupt(mwifiex_usb_rx_complete()):
1. USB received an RX data interrupt, set data_received flag
2. main thread checks data_received, if set queues rx_work
3. rx worker thread independently start processing rx_data_q
4. rx work exits (once rx_data_q is empty)
5. main thread resets the data_received flag(after #2)
6. Now at the corner case there will be high RX data interrupts between #4 and #5
7. Driver stops submitting URBs to firmware, once rx_pending exceeds HIGH_RX_PENDING
8. The flag data_received(cleared in #5) will remain unset since there will be no interrupts from firmware to set it(after #7)

Above scenario causes RX stall in driver, which will finally result in command/TX timeouts in firmware.

Quoted 8 lines
Quoted 6 lines

As a fix, queue rx_work directly in mwifiex_usb_rx_complete() callback, instead in the main thread. This removes dependency of RX processing on data_received flag.

Brian, did you have a chance to review these two?

Not really. I don't generally make a lot of time to review the USB driver unless it's really screwing around with the main driver, since I don't use the USB driver. But I'll try to give it a few glances.

maintainer
#5 lore raw

Re: [PATCH 1/2] mwifiex: schedule rx_work on RX interrupt for USB

In reply to Ganapathi Bhat
Quoted 6 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is race for data_received flag between main thread and RX data interrupt(mwifiex_usb_rx_complete()):
1. USB received an RX data interrupt, set data_received flag
2. main thread checks data_received, if set queues rx_work

Stop right there.

There is a flag, data_received, and as you say, you are setting it one thread, and reading it in another thread (and later clearing it; step #5). Where is the locking? There is none. Therefore, you have a data race.

You are not resolving any locking problems here, so you're not really solving the entire problem.

Brian

Quoted 87 lines

3. rx worker thread independently start processing rx_data_q
4. rx work exits (once rx_data_q is empty)
5. main thread resets the data_received flag(after #2)
6. Now at the corner case there will be high RX data interrupts between #4 and #5
7. Driver stops submitting URBs to firmware, once rx_pending exceeds HIGH_RX_PENDING
8. The flag data_received(cleared in #5) will remain unset since there will be no interrupts from firmware to set it(after #7)

Above scenario causes RX stall in driver, which will finally result in command/TX timeouts in firmware.

As a fix, queue rx_work directly in mwifiex_usb_rx_complete() callback, instead in the main thread. This removes dependency of RX processing on data_received flag.

---
 drivers/net/wireless/marvell/mwifiex/main.c | 7 ++++---
 drivers/net/wireless/marvell/mwifiex/main.h | 1 +
 drivers/net/wireless/marvell/mwifiex/usb.c  | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/wireless/marvell/mwifiex/main.c +4 -3
index 12e7399..6e6e1a7 100644
@@ -171,7 +171,7 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
 }
 EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
 
-static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
 {
 	unsigned long flags;
 
@@ -183,6 +183,7 @@ static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
 		queue_work(adapter->rx_workqueue, &adapter->rx_work);
 	}
 }
+EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);
 
 static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
 {
@@ -283,10 +284,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
 				mwifiex_process_hs_config(adapter);
 			if (adapter->if_ops.process_int_status)
 				adapter->if_ops.process_int_status(adapter);
+			if (adapter->rx_work_enabled && adapter->data_received)
+				mwifiex_queue_rx_work(adapter);
 		}
 
-		if (adapter->rx_work_enabled && adapter->data_received)
-			mwifiex_queue_rx_work(adapter);
 
 		/* Need to wake up the card ? */
 		if ((adapter->ps_state == PS_STATE_SLEEP) &&
drivers/net/wireless/marvell/mwifiex/main.h +1 -0
index 6b5539b..66ba95c 100644
@@ -1667,6 +1667,7 @@ u8 mwifiex_adjust_data_rate(struct mwifiex_private *priv,
 void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter);
 void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
 void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter);
 int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
 			      int cmd_type,
 			      struct mwifiex_ds_wakeup_reason *wakeup_reason);
drivers/net/wireless/marvell/mwifiex/usb.c +2 -0
index 4bc2448..d20fda1 100644
@@ -144,6 +144,8 @@ static int mwifiex_usb_recv(struct mwifiex_adapter *adapter,
 		skb_queue_tail(&adapter->rx_data_q, skb);
 		adapter->data_received = true;
 		atomic_inc(&adapter->rx_pending);
+		if (adapter->rx_work_enabled)
+			mwifiex_queue_rx_work(adapter);
 		break;
 	default:
 		mwifiex_dbg(adapter, ERROR,
Signature · 1 line
1.9.1
#6 lore raw

RE: [EXT] Re: [PATCH 1/2] mwifiex: schedule rx_work on RX interrupt for USB

Hi Brian,

Quoted 20 lines

-----Original Message-----
From: Brian Norris [mailto:[email protected]]
Sent: Friday, January 26, 2018 12:30 AM
To: Ganapathi Bhat
Cc: [email protected]; Cathy Luo; Xinming Hu; Zhiyuan Yang; James Cao; Mangesh Malusare; Shrenik Shikhare
Subject: [EXT] Re: [PATCH 1/2] mwifiex: schedule rx_work on RX interrupt for USB

External Email

----------------------------------------------------------------------

Quoted 6 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is race for data_received flag between main thread and RX data interrupt(mwifiex_usb_rx_complete()):
1. USB received an RX data interrupt, set data_received flag 2. main thread checks data_received, if set queues rx_work

Quoted 5 lines

Stop right there.

There is a flag, data_received, and as you say, you are setting it one thread, and reading it in another thread (and later clearing it; step #5). Where is the locking? There is none. Therefore, you have a data race.

Yes. We missed it. We will add the locking and send it in v3.

Quoted 83 lines

You are not resolving any locking problems here, so you're not really solving the entire problem.

Brian

Quoted 5 lines

3. rx worker thread independently start processing rx_data_q 4. rx work exits (once rx_data_q is empty) 5. main thread resets the data_received flag(after #2) 6. Now at the corner case there will be high RX data interrupts between #4 and #5 7. Driver stops submitting URBs to firmware, once rx_pending exceeds HIGH_RX_PENDING 8. The

flag

drivers/net/wireless/marvell/mwifiex/main.c static void mwifiex_queue_rx_work(struct

Quoted 33 lines

data_received(cleared in #5) will remain unset since there will be no interrupts from firmware to set it(after #7)

Above scenario causes RX stall in driver, which will finally result in command/TX timeouts in firmware.

As a fix, queue rx_work directly in mwifiex_usb_rx_complete() callback, instead in the main thread. This removes dependency of RX processing on data_received flag.

---
 drivers/net/wireless/marvell/mwifiex/main.c | 7 ++++---
drivers/net/wireless/marvell/mwifiex/main.h | 1 +
drivers/net/wireless/marvell/mwifiex/usb.c  | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/wireless/marvell/mwifiex/main.c +1 -1
index 12e7399..6e6e1a7 100644
@@ -171,7 +171,7 @@ void mwifiex_queue_main_work(struct
 mwifiex_adapter *adapter)  }
 EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
 
-static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
 {
    unsigned long flags;
 
@@ -183,6 +183,7 @@ static void mwifiex_queue_rx_work(struct

mwifiex_adapter *adapter)

drivers/net/wireless/marvell/mwifiex/main.c static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)

Quoted 7 lines
drivers/net/wireless/marvell/mwifiex/main.c +1 -1
            queue_work(adapter->rx_workqueue, &adapter->rx_work);
    }
 }
+EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);
 
 static int mwifiex_process_rx(struct mwifiex_adapter *adapter)  { @@
-283,10 +284,10 @@ int mwifiex_main_process(struct mwifiex_adapter

*adapter)

Quoted 20 lines
                            mwifiex_process_hs_config(adapter);
                    if (adapter->if_ops.process_int_status)
                            adapter-

if_ops.process_int_status(adapter);
+ if (adapter->rx_work_enabled && adapter-
data_received)

drivers/net/wireless/marvell/mwifiex/main.c +1 -2
+                           mwifiex_queue_rx_work(adapter);
            }
 
-           if (adapter->rx_work_enabled && adapter->data_received)
-                   mwifiex_queue_rx_work(adapter);
 
            /* Need to wake up the card ? */
            if ((adapter->ps_state == PS_STATE_SLEEP) && diff --git

a/drivers/net/wireless/marvell/mwifiex/main.h
b/drivers/net/wireless/marvell/mwifiex/main.h
index 6b5539b..66ba95c 100644

drivers/net/wireless/marvell/mwifiex/main.h +0 -0
@@ -1667,6 +1667,7 @@ u8 mwifiex_adjust_data_rate(struct
Quoted 8 lines

mwifiex_private *priv, void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter); void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags); void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter);
int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
int cmd_type,
struct mwifiex_ds_wakeup_reason

*wakeup_reason); diff --git

Quoted 18 lines

drivers/net/wireless/marvell/mwifiex/usb.c static int mwifiex_usb_recv(struct mwifiex_adapter

Quoted 6 lines

a/drivers/net/wireless/marvell/mwifiex/usb.c
b/drivers/net/wireless/marvell/mwifiex/usb.c
index 4bc2448..d20fda1 100644

drivers/net/wireless/marvell/mwifiex/usb.c +0 -0
@@ -144,6 +144,8 @@ static int mwifiex_usb_recv(struct mwifiex_adapter

*adapter,

Quoted 11 lines
drivers/net/wireless/marvell/mwifiex/usb.c +2 -1
            skb_queue_tail(&adapter->rx_data_q, skb);
            adapter->data_received = true;
            atomic_inc(&adapter->rx_pending);
+           if (adapter->rx_work_enabled)
+                   mwifiex_queue_rx_work(adapter);
            break;
    default:
            mwifiex_dbg(adapter, ERROR,
--

1.9.1

Regards,
Ganapathi

#7 lore raw

PATCH 2/2 mwifiex: use more_rx_task_flag to avoid USB RX stall

In reply to Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is a race condition for acquiring rx_proc_lock between rx worker thread and USB RX data interrupt (mwifiex_usb_rx_complete):

1. USB receives an RX data interrupt, queues rx_work
2. rx_work empties rx_data_q, tries to acquire rx_proc_lock (to clear rx_processing flag)
3. While #2 is yet to acquire rx_proc_lock, driver receives continuous RX data interupts(mwifiex_usb_rx_complete)
3. For each interrupt at #3, driver acquires rx_proc_lock(it gets the lock since it is in interrupt context), tries to queue rx_work, but fails to do so since rx_processing is still set(#2)
4. When rx_pending exceeds HIGH_RX_PENDING, driver stops submitting URBs back to USB subsystem and thus firmware stops uploading RX data to driver
5. Now finally #2 will acquire rx_proc_lock, but because of #4, there are no further triggers to schedule rx_work again

The above scenario occurs in some platforms where the RX processing is comparitively slower. This results in RX stall in driver, command/TX timeouts in firmware. The above scenario is introduced after commit c7dbdcb2a4e1
("mwifiex: schedule rx_work on RX interrupt for USB")

To fix this set a new more_rx_task_flag whenever RX data callback is trying to schedule rx_work but rx_processing is not yet cleared. This will let the current rx_work(which was waiting for rx_proc_lock) to loopback and process newly arrived RX packets.

---
 drivers/net/wireless/marvell/mwifiex/main.c | 10 +++++++++-
 drivers/net/wireless/marvell/mwifiex/main.h |  1 +
 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/net/wireless/marvell/mwifiex/main.c +9 -1
index 6e6e1a7..ea87c7c 100644
@@ -163,6 +163,7 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
 	spin_lock_irqsave(&adapter->main_proc_lock, flags);
 	if (adapter->mwifiex_processing) {
 		adapter->more_task_flag = true;
+		adapter->more_rx_task_flag = true;
 		spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
 	} else {
 		spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
@@ -177,6 +178,7 @@ void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
 
 	spin_lock_irqsave(&adapter->rx_proc_lock, flags);
 	if (adapter->rx_processing) {
+		adapter->more_rx_task_flag = true;
 		spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
 	} else {
 		spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
@@ -193,13 +195,14 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
 
 	spin_lock_irqsave(&adapter->rx_proc_lock, flags);
 	if (adapter->rx_processing || adapter->rx_locked) {
+		adapter->more_rx_task_flag = true;
 		spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
 		goto exit_rx_proc;
 	} else {
 		adapter->rx_processing = true;
 		spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
 	}
-
+rx_process_start:
 	/* Check for Rx data */
 	while ((skb = skb_dequeue(&adapter->rx_data_q))) {
 		atomic_dec(&adapter->rx_pending);
@@ -221,6 +224,11 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
 		}
 	}
 	spin_lock_irqsave(&adapter->rx_proc_lock, flags);
+	if (adapter->more_rx_task_flag) {
+		adapter->more_rx_task_flag = false;
+		spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
+		goto rx_process_start;
+	}
 	adapter->rx_processing = false;
 	spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
 
drivers/net/wireless/marvell/mwifiex/main.h +1 -0
index 66ba95c..242e05e 100644
@@ -891,6 +891,7 @@ struct mwifiex_adapter {
 	spinlock_t main_proc_lock;
 	u32 mwifiex_processing;
 	u8 more_task_flag;
+	u8 more_rx_task_flag;
 	u16 tx_buf_size;
 	u16 curr_tx_buf_size;
 	/* sdio single port rx aggregation capability */
Signature · 1 line
1.9.1
#8 lore raw

Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Quoted 26 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is a race condition for acquiring rx_proc_lock between rx worker thread and USB RX data interrupt (mwifiex_usb_rx_complete):

1. USB receives an RX data interrupt, queues rx_work
2. rx_work empties rx_data_q, tries to acquire rx_proc_lock (to clear rx_processing flag)
3. While #2 is yet to acquire rx_proc_lock, driver receives continuous RX data interupts(mwifiex_usb_rx_complete)
3. For each interrupt at #3, driver acquires rx_proc_lock(it gets the lock since it is in interrupt context), tries to queue rx_work, but fails to do so since rx_processing is still set(#2)
4. When rx_pending exceeds HIGH_RX_PENDING, driver stops submitting URBs back to USB subsystem and thus firmware stops uploading RX data to driver
5. Now finally #2 will acquire rx_proc_lock, but because of #4, there are no further triggers to schedule rx_work again

The above scenario occurs in some platforms where the RX processing is comparitively slower. This results in RX stall in driver, command/TX timeouts in firmware. The above scenario is introduced after commit c7dbdcb2a4e1
("mwifiex: schedule rx_work on RX interrupt for USB")

Quoted 7 lines

To fix this set a new more_rx_task_flag whenever RX data callback is trying to schedule rx_work but rx_processing is not yet cleared. This will let the current rx_work(which was waiting for rx_proc_lock) to loopback and process newly arrived RX packets.

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Signature · 3 lines
https://patchwork.kernel.org/patch/10178729/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#9 lore raw

Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Quoted 33 lines · Kalle Valo
Quoted 31 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is a race condition for acquiring rx_proc_lock between rx worker thread and USB RX data interrupt (mwifiex_usb_rx_complete):

1. USB receives an RX data interrupt, queues rx_work
2. rx_work empties rx_data_q, tries to acquire rx_proc_lock (to clear rx_processing flag)
3. While #2 is yet to acquire rx_proc_lock, driver receives continuous RX data interupts(mwifiex_usb_rx_complete)
3. For each interrupt at #3, driver acquires rx_proc_lock(it gets the lock since it is in interrupt context), tries to queue rx_work, but fails to do so since rx_processing is still set(#2)
4. When rx_pending exceeds HIGH_RX_PENDING, driver stops submitting URBs back to USB subsystem and thus firmware stops uploading RX data to driver
5. Now finally #2 will acquire rx_proc_lock, but because of #4, there are no further triggers to schedule rx_work again

The above scenario occurs in some platforms where the RX processing is comparitively slower. This results in RX stall in driver, command/TX timeouts in firmware. The above scenario is introduced after commit c7dbdcb2a4e1
("mwifiex: schedule rx_work on RX interrupt for USB")

To fix this set a new more_rx_task_flag whenever RX data callback is trying to schedule rx_work but rx_processing is not yet cleared. This will let the current rx_work(which was waiting for rx_proc_lock) to loopback and process newly arrived RX packets.

Quoted 4 lines
Quoted 2 lines

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Oh, and please use Fixes line to mark the commit which broke this.

Signature · 1 line
Kalle Valo
#10 lore raw

RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Hi Kalle,

Quoted 35 lines

----------------------------------------------------------------------

Quoted 8 lines · Kalle Valo
Quoted 6 lines · Ganapathi Bhat

From: Shrenik Shikhare <[email protected]>

There is a race condition for acquiring rx_proc_lock between rx worker thread and USB RX data interrupt (mwifiex_usb_rx_complete):

Quoted 8 lines
Quoted 8 lines

1. USB receives an RX data interrupt, queues rx_work 2. rx_work empties rx_data_q, tries to acquire rx_proc_lock (to clear rx_processing flag) 3. While #2 is yet to acquire rx_proc_lock, driver receives continuous RX data interupts(mwifiex_usb_rx_complete)
3. For each interrupt at #3, driver acquires rx_proc_lock(it gets the lock since it is in interrupt context), tries to queue rx_work, but fails to do so since rx_processing is still set(#2) 4. When rx_pending exceeds HIGH_RX_PENDING, driver stops submitting URBs

back

Quoted 15 lines
Quoted 15 lines

to USB subsystem and thus firmware stops uploading RX data to driver
5. Now finally #2 will acquire rx_proc_lock, but because of #4, there are no further triggers to schedule rx_work again

The above scenario occurs in some platforms where the RX processing is comparitively slower. This results in RX stall in driver, command/TX timeouts in firmware. The above scenario is introduced after commit c7dbdcb2a4e1
("mwifiex: schedule rx_work on RX interrupt for USB")

To fix this set a new more_rx_task_flag whenever RX data callback is trying to schedule rx_work but rx_processing is not yet cleared. This will let the current rx_work(which was waiting for rx_proc_lock) to loopback and process newly arrived RX packets.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Oh, and please use Fixes line to mark the commit which broke this.

Ok Sure. I will do that and send v2.

Quoted 3 lines

--
Kalle Valo

Regards,
Ganapathi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

SGkgS2FsbGUsDQo+DQo+IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCj4gR2FuYXBhdGhpIEJoYXQgPGdiaGF0QG1h cnZlbGwuY29tPiB3cm90ZToNCj4NCj4gPiBGcm9tOiBTaHJlbmlrIFNoaWtoYXJlIDxzaHJlbmlr QG1hcnZlbGwuY29tPg0KPiA+DQo+ID4gVGhlcmUgaXMgYSByYWNlIGNvbmRpdGlvbiBmb3IgYWNx dWlyaW5nIHJ4X3Byb2NfbG9jayBiZXR3ZWVuIHJ4IHdvcmtlcg0KPiA+IHRocmVhZCBhbmQgVVNC IFJYIGRhdGEgaW50ZXJydXB0DQo+ID4gKG13aWZpZXhfdXNiX3J4X2NvbXBsZ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ZGJkY2IyYTRlMSBpcyB0aGUgUEFUQ0ggWzEvMl0gc2Vu dCBpbiB0aGlzIHNlcmllcy4NCj4NCj4gLS0NCj4gaHR0cHM6Ly9wYXRjaHdvcmsua2VybmVsLm9y Zy9wYXRjaC8xMDE3ODcyOS8NCj4NCj4gaHR0cHM6Ly93aXJlbGVzcy53aWtpLmtlcm5lbC5vcmcv ZW4vZGV2ZWxvcGVycy9kb2N1bWVudGF0aW9uL3N1Ym1pdHRpbmdwDQo+IGF0Y2hlcw0KUmVnYXJk cywNCkdhbmFwYXRoaQ0K

#13 lore raw

Re: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Quoted 11 lines · Ganapathi Bhat
Quoted 11 lines
Quoted 11 lines

The above scenario occurs in some platforms where the RX processing is comparitively slower. This results in RX stall in driver, command/TX timeouts in firmware. The above scenario is introduced after commit c7dbdcb2a4e1
("mwifiex: schedule rx_work on RX interrupt for USB")

To fix this set a new more_rx_task_flag whenever RX data callback is trying to schedule rx_work but rx_processing is not yet cleared. This will let the current rx_work(which was waiting for rx_proc_lock) to loopback and process newly arrived RX packets.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Correct. Actually the commit id c7dbdcb2a4e1 is the PATCH [1/2] sent in this series.

Actually the commit id will be different, I just tested it to be sure:

$ git reset --hard master
HEAD is now at b69c1df47281 brcmfmac: separate firmware errors from i/o errors
$ git am -s -3 1.patch
Applying: mwifiex: schedule rx_work on RX interrupt for USB
$ git log --oneline -1 | cat
676bc4833907 mwifiex: schedule rx_work on RX interrupt for USB
$ git reset --hard master
HEAD is now at b69c1df47281 brcmfmac: separate firmware errors from i/o errors
$ git am -s -3 1.patch
Applying: mwifiex: schedule rx_work on RX interrupt for USB
$ git log --oneline -1 | cat
74c5fc1d45b4 mwifiex: schedule rx_work on RX interrupt for USB
$ 

So the date, and most likely also the commiter, is included when calculating the hash. So you can't really refer to uncommited patches using a commit id as the id is determined only once the maintainer applies the patch.

Signature · 1 line
Kalle Valo
#14 lore raw

RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Hi Kalle,

Quoted 45 lines

-----Original Message-----
From: Kalle Valo [mailto:[email protected]]
Sent: Thursday, January 25, 2018 6:29 PM
To: Ganapathi Bhat
Cc: [email protected]; Brian Norris; Cathy Luo; Xinming Hu; Zhiyuan Yang; James Cao; Mangesh Malusare; Shrenik Shikhare
Subject: Re: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Quoted 12 lines · Ganapathi Bhat
Quoted 12 lines
Quoted 12 lines

The above scenario occurs in some platforms where the RX processing is comparitively slower. This results in RX stall in driver, command/TX timeouts in firmware. The above scenario is introduced after commit
c7dbdcb2a4e1
("mwifiex: schedule rx_work on RX interrupt for USB")

To fix this set a new more_rx_task_flag whenever RX data callback is trying to schedule rx_work but rx_processing is not yet cleared. This will let the current rx_work(which was waiting for rx_proc_lock) to loopback and process newly arrived RX packets.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Correct. Actually the commit id c7dbdcb2a4e1 is the PATCH [1/2] sent in this

series.

Actually the commit id will be different, I just tested it to be sure:

$ git reset --hard master
HEAD is now at b69c1df47281 brcmfmac: separate firmware errors from i/o
errors $ git am -s -3 1.patch
Applying: mwifiex: schedule rx_work on RX interrupt for USB $ git log --
oneline -1 | cat
676bc4833907 mwifiex: schedule rx_work on RX interrupt for USB $ git reset -
-hard master HEAD is now at b69c1df47281 brcmfmac: separate firmware
errors from i/o errors $ git am -s -3 1.patch
Applying: mwifiex: schedule rx_work on RX interrupt for USB $ git log --
oneline -1 | cat
74c5fc1d45b4 mwifiex: schedule rx_work on RX interrupt for USB $
Quoted 3 lines

So the date, and most likely also the commiter, is included when calculating the hash. So you can't really refer to uncommited patches using a commit id as the id is determined only once the maintainer applies the patch.

Ok. So, what can be done in this case. Should we wait for 1st patch to be committed and then send v3 of second patch?

Quoted 3 lines

--
Kalle Valo

Regards,
Ganapathi

maintainer
#15 lore raw

Re: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

In reply to Ganapathi Bhat
Quoted 2 lines · Ganapathi Bhat
Quoted 1 line

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Correct. Actually the commit id c7dbdcb2a4e1 is the PATCH [1/2] sent in this series.

What? Why would you introduce a bug and only fix it in the next patch? Does that mean you should just combine the two? Or reverse the order, if patch 2 doesn't cause problems on its own?

Brian

#16 lore raw

RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Hi Brian,

Quoted 9 lines

-----Original Message-----
From: Brian Norris [mailto:[email protected]]
Sent: Friday, January 26, 2018 12:04 AM
To: Ganapathi Bhat
Cc: Kalle Valo; [email protected]; Cathy Luo; Xinming Hu; Zhiyuan Yang; James Cao; Mangesh Malusare; Shrenik Shikhare
Subject: Re: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Quoted 6 lines
Quoted 2 lines · Ganapathi Bhat
Quoted 1 line

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Correct. Actually the commit id c7dbdcb2a4e1 is the PATCH [1/2] sent in this

series.

What? Why would you introduce a bug and only fix it in the next patch?

With the first patch the original issue took considerably longer time to recreate. Also it followed a different path to get recreated(shared in commit message).

Quoted 1 line

Does that mean you should just combine the two?

Let us know if that is fine to merge them. We can modify the commit message accordingly.

Quoted 1 line

Or reverse the order, if patch 2 doesn't cause problems on its own?

Patch 2 has a dependency on patch 1.

Quoted 2 lines

Brian

Regards,
Ganapathi

#17 lore raw

RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

In reply to Brian Norris

Hi Brian,

Quoted 27 lines

-----Original Message-----
From: Ganapathi Bhat
Sent: Monday, January 29, 2018 12:47 PM
To: 'Brian Norris'
Cc: Kalle Valo; [email protected]; Cathy Luo; Xinming Hu; Zhiyuan Yang; James Cao; Mangesh Malusare; Shrenik Shikhare
Subject: RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Hi Brian,

Quoted 9 lines

-----Original Message-----
From: Brian Norris [mailto:[email protected]]
Sent: Friday, January 26, 2018 12:04 AM
To: Ganapathi Bhat
Cc: Kalle Valo; [email protected]; Cathy Luo; Xinming Hu; Zhiyuan Yang; James Cao; Mangesh Malusare; Shrenik Shikhare
Subject: Re: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Quoted 7 lines
Quoted 3 lines · Ganapathi Bhat
Quoted 1 line

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Correct. Actually the commit id c7dbdcb2a4e1 is the PATCH [1/2] sent in this

series.

What? Why would you introduce a bug and only fix it in the next patch?

Quoted 8 lines

With the first patch the original issue took considerably longer time to recreate. Also it followed a different path to get recreated(shared in commit message).

Quoted 1 line

Does that mean you should just combine the two?

Let us know if that is fine to merge them. We can modify the commit message accordingly.

Quoted 1 line

Or reverse the order, if patch 2 doesn't cause problems on its own?

Patch 2 has a dependency on patch 1.

One correction. There is no commit dependency between patch 1 and 2(they can be applied in any order). But the result would be same. We need both fixes. Let us know if we can combine them.

Quoted 5 lines
Quoted 2 lines

Brian

Regards,
Ganapathi

Regards,
Ganapathi

maintainer
#18 lore raw

Re: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

Hi,

Quoted 12 lines · Ganapathi Bhat
Quoted 12 lines

From: Ganapathi Bhat

Quoted 8 lines

From: Brian Norris [mailto:[email protected]]

Quoted 3 lines · Ganapathi Bhat
Quoted 1 line

I can't find any commit with id c7dbdcb2a4e1, is it correct?

Correct. Actually the commit id c7dbdcb2a4e1 is the PATCH [1/2] sent in this

series.

What? Why would you introduce a bug and only fix it in the next patch?

With the first patch the original issue took considerably longer time to recreate. Also it followed a different path to get recreated(shared in commit message).

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

Does that mean you should just combine the two?

Let us know if that is fine to merge them. We can modify the commit message accordingly.

Quoted 1 line

Or reverse the order, if patch 2 doesn't cause problems on its own?

Patch 2 has a dependency on patch 1.

One correction. There is no commit dependency between patch 1 and 2(they can be applied in any order). But the result would be same. We need both fixes. Let us know if we can combine them.

I haven't closely looked at patch 2 yet. My only statement was that it makes no sense to have 2 commits, with the second one labeled as "Fixing" the first one. From your descriptions, it sounds like patch 2 should actually come first, but I'm not really sure. I only looked far enough to say that I didn't like patch 1 as-is :)

Brian

#19 lore raw

RE: [EXT] Re: [2/2] mwifiex: use more_rx_task_flag to avoid USB RX stall

SGkgQnJpYW4sDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQnJpYW4g Tm9ycmlzIFttYWlsdG86YnJpYW5ub3JyaXNAY2hyb21pdW0ub3JnXQ0KPiBTZW50OiBUdWVzZGF5 LCBKYW51YXJ5IDMwLCAyMDE4IDM6MzggQU0NCj4gVG86IEdhbmFwYXRoaSBCaGF0DQo+IENjOiBL YWxsZSBWYWxvOyBsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmc7IENhdGh5IEx1bzsgWGlu bWluZyBIdTsNCj4gWmhpeXVhbiBZYW5nOyBKYW1lcyBDYW87IE1hbmdlc2ggTWFsdXNhcmU7IFNo cmVuaWsgU2hpa2hhcmUNCj4gU3ViamVjdDogUmU6IFtFWFRdIFJlOiBbMi8yXSBtd2lmaWV4OiB1 c2UgbW9yZV9yeF90YXNrX2ZsYWcgdG8gYXZvaWQgVVNCIFJYDQo+IHN0YWxsDQo+DQo+IEhpLA0K Pg0KPiBPbiBTdW4sIEphbiAyOCwgMjAxOCBhdCAxMToxOSBQTSwgR2FuYXBhdGhpIEJoYXQgPGdi aGF0QG1hcnZlbGwuY29tPg0KPiB3cm90ZToNCj4gPj4gRnJvbTogR2FuYXBhdGhpIEJoYXQNCj4g Pj4gPiBGcm9tOiBCcmlhbiBOb3JyaXMgW21haWx0bzpicmlhbm5vcnJpc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