diff mbox

staging: vt6655: Fix TX retransmission race condition

Message ID 1428796042-3390-1-git-send-email-tvboxspy@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Malcolm Priestley April 11, 2015, 11:47 p.m. UTC
With high tx flow the same buffer can transmit  more than
once and get stuck in loop.

Reset TCR to zero in device_tx_srv.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.19+
---
 drivers/staging/vt6655/device_main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Malcolm Priestley April 18, 2015, 7:18 a.m. UTC | #1
On 12/04/15 00:47, Malcolm Priestley wrote:
> With high tx flow the same buffer can transmit  more than
> once and get stuck in loop.
>
> Reset TCR to zero in device_tx_srv.
>
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
> Cc: <stable@vger.kernel.org> # v3.19+
> ---
>   drivers/staging/vt6655/device_main.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index c5f8233..9b5d840 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -963,6 +963,9 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx)
>   			vnt_int_report_rate(pDevice, pTD->pTDInfo, byTsr0, byTsr1);
>
>   			device_free_tx_buf(pDevice, pTD);
> +
> +			/* Done with TCR reset to avoid retransmission */
> +			pTD->m_td1TD1.byTCR = 0;
>   			pDevice->iTDUsed[uIdx]--;
>   		}
>   	}

Hi Greg

Please could you drop this patch, it causes a regression in driver.

Thanks

Malcolm
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index c5f8233..9b5d840 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -963,6 +963,9 @@  static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx)
 			vnt_int_report_rate(pDevice, pTD->pTDInfo, byTsr0, byTsr1);
 
 			device_free_tx_buf(pDevice, pTD);
+
+			/* Done with TCR reset to avoid retransmission */
+			pTD->m_td1TD1.byTCR = 0;
 			pDevice->iTDUsed[uIdx]--;
 		}
 	}