From patchwork Wed Sep 18 13:22:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2906761 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 21C559F1E3 for ; Wed, 18 Sep 2013 13:22:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D6DE201C0 for ; Wed, 18 Sep 2013 13:22:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5FE6420154 for ; Wed, 18 Sep 2013 13:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549Ab3IRNWY (ORCPT ); Wed, 18 Sep 2013 09:22:24 -0400 Received: from ebb05.tieto.com ([131.207.168.36]:47575 "EHLO ebb05.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533Ab3IRNWY (ORCPT ); Wed, 18 Sep 2013 09:22:24 -0400 X-AuditID: 83cfa824-b7f348e000004c45-0d-5239a90d087b Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb05.tieto.com (SMTP Mailer) with SMTP id 3E.63.19525.D09A9325; Wed, 18 Sep 2013 16:22:22 +0300 (EEST) Received: from uw001058.eu.tieto.com (10.28.19.57) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Wed, 18 Sep 2013 16:22:21 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH] ath10k: fix num_sends_allowed replenishing Date: Wed, 18 Sep 2013 15:22:17 +0200 Message-ID: <1379510537-8731-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsXSfL5DSZdvpWWQwe7t3BaPLh1jtniz4g67 xbetD9gcmD0+z7zL5rF5Sb3H501yAcxRXDYpqTmZZalF+nYJXBm7Dn9gKVjJWfH5yj7WBsbn 7F2MnBwSAiYSizv+sULYYhIX7q1n62Lk4hASWMUoMePHDyhnKaPErdb9zCBVbAK6Eq8az4J1 iAgoSPya9JENxGYW8JV49mQZE4gtLGAt8f92LyOIzSKgKnHx4AOwXl4BN4m/JzYC1XMAbVOQ mDPJBiIsKHFy5hMWiDESEgdfvAArFxJQkTi4fj/zBEa+WUjKZiEpW8DItIqRPzUpycBUryQz tSRfLzk/dxMjOKRWqOxgPPtA6hCjAAejEg/vhXKLICHWxLLiytxDjJIcTEqivMl9lkFCfEn5 KZUZicUZ8UWlOanFhxglOJiVRHjndgDleFMSK6tSi/JhUtIcLErivO9jgCYJpCeWpGanphak FsFkZTg4lCR4fSYBNQoWpaanVqRl5pQgpJk4OEGG8wANtwGp4S0uSMwtzkyHyJ9iVJQS5zUE SQiAJDJK8+B6YTH/ilEc6BVhXnGQKh5guoDrfgU0mAlo8PslZiCDSxIRUlINjKa6Js/0DYTN lV4lblI+EbFrsluQU034igln4oQ1DJKfdt3V13EXFyxKiy1hPlf7LPJk8HvZlzNLJCUerj/1 2Lz393XGl/UytVfl6vkL3jF+ifl68Cj3tyZGvZ2mv1Uz6gIZLT9qRf0/UcL16aqfeZfw37wt jJGGynI3XJ/r37/GuuhtU9sRJZbijERDLeai4kQAptVBtNQCAAA= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Recent ce_sendlist removal patch has broken num_sends_allowed incrementing. num_sends_allowed exceeded initial values and could overflow. This code was supposed to replenish num_sends_allowed for partial sendlist items (i.e. before final sendlist item from a sendlist was completed and could be processed by completion handlers). Fortunately it seems it cause any major breakage, yet. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/pci.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index f1faf46..dff23d9 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -626,10 +626,6 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state) while (ath10k_ce_completed_send_next(ce_state, &transfer_context, &ce_data, &nbytes, &transfer_id) == 0) { - spin_lock_bh(&pipe_info->pipe_lock); - pipe_info->num_sends_allowed++; - spin_unlock_bh(&pipe_info->pipe_lock); - compl = get_free_compl(pipe_info); if (!compl) break;