2014-01-06 16:50:09

by Julien Massot

[permalink] [raw]
Subject: [PATCH 0/2] ath6kl: Fix Tx credits management for ar6004 usb

By stressing the communication with different stream, iperf, ping,
and web browsing, the transmission is stuck after a while. (5-10 minutes)

The driver doesn't update correctly the tx credit,
and the transmission becomes very slow.

The ping latency raise to 20 secs, and finally stop with
"no buffer space available".

The first patch fixes a babble error in Rx message:
"ath6kl: ath6kl_usb_recv_complete: recv pipe: 5, stat:-75, len:1536 urb:0xffff8802010dad80".

The second patch decreases the Rx read threshold to make sure we read
the tx credit report as soon as possible.

Julien Massot (2):
ath6kl: increase usb rx buffer size to 4096
ath6kl: set rx urb count threshold to 1

drivers/net/wireless/ath/ath6kl/usb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--
1.8.4.2


2014-01-06 16:50:10

by Julien Massot

[permalink] [raw]
Subject: [PATCH 1/2] ath6kl: increase usb rx buffer size to 4096

With the previous value (1700), some urb are dropped
with a babble error (urb status equal -EOVERFLOW).

These error seems to only happen when urb length is a
multiple of packet size (512).

Signed-off-by: Julien Massot <[email protected]>
---
drivers/net/wireless/ath/ath6kl/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index f38ff6a..bbaf867 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -24,7 +24,7 @@
/* constants */
#define TX_URB_COUNT 32
#define RX_URB_COUNT 32
-#define ATH6KL_USB_RX_BUFFER_SIZE 1700
+#define ATH6KL_USB_RX_BUFFER_SIZE 4096

/* tx/rx pipes for usb */
enum ATH6KL_USB_PIPE_ID {
--
1.8.4.2


2014-01-06 16:50:11

by Julien Massot

[permalink] [raw]
Subject: [PATCH 2/2] ath6kl: set rx urb count threshold to 1

Reduce the Rx count threshold to make sure we read
the available credits for Tx.

Signed-off-by: Julien Massot <[email protected]>
---
drivers/net/wireless/ath/ath6kl/usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index bbaf867..56c3fd5 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -481,8 +481,8 @@ static void ath6kl_usb_start_recv_pipes(struct ath6kl_usb *ar_usb)
* ATH6KL_USB_RX_BUFFER_SIZE);
*/

- ar_usb->pipes[ATH6KL_USB_PIPE_RX_DATA].urb_cnt_thresh =
- ar_usb->pipes[ATH6KL_USB_PIPE_RX_DATA].urb_alloc / 2;
+ ar_usb->pipes[ATH6KL_USB_PIPE_RX_DATA].urb_cnt_thresh = 1;
+
ath6kl_usb_post_recv_transfers(&ar_usb->pipes[ATH6KL_USB_PIPE_RX_DATA],
ATH6KL_USB_RX_BUFFER_SIZE);
}
--
1.8.4.2


2014-01-18 09:41:59

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 0/2] ath6kl: Fix Tx credits management for ar6004 usb

Julien Massot <[email protected]> writes:

> By stressing the communication with different stream, iperf, ping,
> and web browsing, the transmission is stuck after a while. (5-10 minutes)
>
> The driver doesn't update correctly the tx credit,
> and the transmission becomes very slow.
>
> The ping latency raise to 20 secs, and finally stop with
> "no buffer space available".
>
> The first patch fixes a babble error in Rx message:
> "ath6kl: ath6kl_usb_recv_complete: recv pipe: 5, stat:-75, len:1536 urb:0xffff8802010dad80".
>
> The second patch decreases the Rx read threshold to make sure we read
> the tx credit report as soon as possible.
>
> Julien Massot (2):
> ath6kl: increase usb rx buffer size to 4096
> ath6kl: set rx urb count threshold to 1

Thanks, both patches applied.

--
Kalle Valo