From patchwork Sat Apr 11 23:47:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 6202231 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 58CDEBF4A6 for ; Sat, 11 Apr 2015 23:48:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6487920260 for ; Sat, 11 Apr 2015 23:48:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67EFA20254 for ; Sat, 11 Apr 2015 23:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750794AbbDKXr6 (ORCPT ); Sat, 11 Apr 2015 19:47:58 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:35188 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750854AbbDKXr5 (ORCPT ); Sat, 11 Apr 2015 19:47:57 -0400 Received: by wgyo15 with SMTP id o15so48481038wgy.2; Sat, 11 Apr 2015 16:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=EcBlfwX5dScrXlRJ7XH6xlG9SquaMJ8wD5MjCQRkvo4=; b=Wcmt6a9SpcgvHO+C0CESrDV/6OK+0Hf1u9gjWiEu/9kiHm1jw2B6dx7/sVJ+gvnKja oURoTjgBkQan6vD8ZlAS9cgvDv7tPf5HQyBrfw7gPonW8WDe3v0WdUY3ICDCkcheN/h4 dBSqZLQ1vwQCDZI9kZ8M06favw+G1wvl6OP13ojPZGs3dbnXrz7BllosCwixj1JoaUrn UVkMmcpEvQvU0wRUO7sc3gytRoGvaYJ34gHpMeqCfwb0bpeWRX3XP6Zpecz2xDZyzR73 S4q+ijojxHYfCNoTlIPAOgWoN1z4eKLao5aMAZ5M3J/IC1qjKNTrQ8GzSWw8dJqyH4g1 cJGA== X-Received: by 10.180.92.138 with SMTP id cm10mr8790133wib.51.1428796076070; Sat, 11 Apr 2015 16:47:56 -0700 (PDT) Received: from localhost.localdomain (188.29.36.12.threembb.co.uk. [188.29.36.12]) by mx.google.com with ESMTPSA id l3sm6022573wiv.18.2015.04.11.16.47.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Apr 2015 16:47:55 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley , Subject: [PATCH] staging: vt6655: Fix TX retransmission race condition Date: Sun, 12 Apr 2015 00:47:22 +0100 Message-Id: <1428796042-3390-1-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: # 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]--; } }