From patchwork Mon Apr 21 23:14:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 4027651 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84B6ABFF02 for ; Mon, 21 Apr 2014 23:15:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46D4B20219 for ; Mon, 21 Apr 2014 23:15:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 134C920204 for ; Mon, 21 Apr 2014 23:15:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754743AbaDUXPF (ORCPT ); Mon, 21 Apr 2014 19:15:05 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:39115 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754569AbaDUXPE (ORCPT ); Mon, 21 Apr 2014 19:15:04 -0400 Received: by mail-pa0-f42.google.com with SMTP id fb1so4247368pad.15 for ; Mon, 21 Apr 2014 16:15:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VKOKbTxUdGjO9qcOK2cAWIdA9149LTTQixo59vNIQWA=; b=mLTkB5oJJXfl9fmRNNV+DhygVc/PSu7vTZNLV+DyYvcrWg5G9pEkOpJtiFKVarTezR BbzdjMeK7oka/JUZtI4R5EczJij8oAtXV1iSsOwcTUNbD98YCS1RaqQgua0SevPBHhaE 96135mOLcXqQaUhxmPbcXZie6EOZtRdzvPKNhzLtht5xyO0sxWyQkpZ/yAoNpkgPbea2 mXxkfLFR/vhmWIjQ9uChrbD1JJ0ONxeTx14liDCz3EPNts2fY7jhRJW8cOagQS11OjHD vytWDMMW2ofDZ4wvh7DOvmBEeR+YOT7GrQLrFmeagzEurJYASJXtL2NsdZ/uMvxlQB3w FgMA== X-Gm-Message-State: ALoCoQm6fmIo0A0nHFrU+4/7bfzk85j5rEsXfWmxXMyMHVThP7uyzFy4by4RxJM1PjP68RoPyZi3 X-Received: by 10.66.148.230 with SMTP id tv6mr16333pab.155.1398122104201; Mon, 21 Apr 2014 16:15:04 -0700 (PDT) Received: from tharvey-gw.gw (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id ba5sm80463865pbc.61.2014.04.21.16.15.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 16:15:03 -0700 (PDT) From: Tim Harvey To: linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, nbd@openwrt.org Subject: [PATCH 1/2] ath9k: fix possible hang on flush Date: Mon, 21 Apr 2014 16:14:56 -0700 Message-Id: <1398122097-23544-1-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 1.8.3.2 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 If a flush is requested, make sure to clear the descriptor once we've processed it. This resolves a hang that will occur if all RX descriptors are full when a flush is requested. Signed-off-by: Tim Harvey --- drivers/net/wireless/ath/ath9k/recv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 6c9accd..e77a253 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1113,14 +1113,13 @@ requeue_drop_frag: } requeue: list_add_tail(&bf->list, &sc->rx.rxbuf); - if (flush) - continue; if (edma) { ath_rx_edma_buf_link(sc, qtype); } else { ath_rx_buf_relink(sc, bf); - ath9k_hw_rxena(ah); + if (!flush) + ath9k_hw_rxena(ah); } } while (1);