From patchwork Fri Apr 12 13:28:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 10898295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 162DC1515 for ; Fri, 12 Apr 2019 13:28:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3227288F8 for ; Fri, 12 Apr 2019 13:28:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D628728E15; Fri, 12 Apr 2019 13:28:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 825CE288F8 for ; Fri, 12 Apr 2019 13:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:To:From:Subject:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ntmi2zwpbaOb2dceX6q10wc07DTbysdBQddUdGwv8MQ=; b=bFDaQZOba3jHSd Hk8/fcRgS5wdOEuIrPxsMLt2kpi/1NFRSm26s3FSLp9of+YQzn8TUGCvvmvjemcWOs4CWVmJ7ElpW 9kx8vkdyjD9UfLuYV+gTITdhA+7PzO2VkW58N4Xst62YlIp3vkF7RpEebi26lhNXz5850UJsDtEVf mO0sS3lZezKeS4bXddxuGANUIov2wm5aHzRy2fj/NggF5O92QXoISopVyQMi23OB9TdSZ6gXBZMhU Pv4NCXgkfSlkVzKuqMCjVXp8l4jlHo8oQrckGU1CsXQYVLP+HoMcQS4nZav5yWBwXcPuDH9JGm3nf ewrbMDEP6Ml/wk6EebzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEwET-0002kL-9Q; Fri, 12 Apr 2019 13:28:41 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEwEP-0002iC-Uk for ath10k@lists.infradead.org; Fri, 12 Apr 2019 13:28:39 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9926261785; Fri, 12 Apr 2019 13:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1555075717; bh=IOnC3d2srXx6IX8l6BUh1Xet/IovSgBdXNg3n8N/F3A=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=htyoHRADmqfdZ8aZ1/hGaFajDx6b2RifeRYt//5PA96Lrtzc239GFllt/lGZ2xfr+ ulA8AFOgQtrnLDghyhEwjR+/TdpuGQeoOInGhX/APihgQ0zLiMj5aUIg3Xs1dwg/fJ CUTLEwQE9mU7LMXy5XdrklZ6vgCgwqNoaCA9v4uI= Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7977461544; Fri, 12 Apr 2019 13:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1555075717; bh=IOnC3d2srXx6IX8l6BUh1Xet/IovSgBdXNg3n8N/F3A=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=htyoHRADmqfdZ8aZ1/hGaFajDx6b2RifeRYt//5PA96Lrtzc239GFllt/lGZ2xfr+ ulA8AFOgQtrnLDghyhEwjR+/TdpuGQeoOInGhX/APihgQ0zLiMj5aUIg3Xs1dwg/fJ CUTLEwQE9mU7LMXy5XdrklZ6vgCgwqNoaCA9v4uI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7977461544 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Subject: [PATCH 3/6] ath10k: htt: don't use txdone_fifo with SDIO From: Kalle Valo To: ath10k@lists.infradead.org Date: Fri, 12 Apr 2019 16:28:34 +0300 Message-ID: <155507571386.32018.4599069777915701774.stgit@potku.adurom.net> In-Reply-To: <155507569645.32018.15231567732563770250.stgit@potku.adurom.net> References: <155507569645.32018.15231567732563770250.stgit@potku.adurom.net> User-Agent: StGit/0.17.1-17-ge4e0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_062838_169747_67FCCE4E X-CRM114-Status: GOOD ( 10.31 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alagu Sankar HTT High Latency (ATH10K_DEV_TYPE_HL) does not use txdone_fifo at all, we don't even initialise it by skipping ath10k_htt_tx_alloc_buf() in ath10k_htt_tx_start(). Because of this using QCA6174 SDIO ath10k_htt_rx_tx_compl_ind() will crash when it accesses unitialised txdone_fifo. So skip txdone_fifo when using High Latency mode. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Co-developed-by: Wen Gong Signed-off-by: Alagu Sankar Signed-off-by: Wen Gong Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/htt_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index a20ea270d519..8d13d0c3e85e 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2277,7 +2277,9 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar, * Note that with only one concurrent reader and one concurrent * writer, you don't need extra locking to use these macro. */ - if (!kfifo_put(&htt->txdone_fifo, tx_done)) { + if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) { + ath10k_txrx_tx_unref(htt, &tx_done); + } else if (!kfifo_put(&htt->txdone_fifo, tx_done)) { ath10k_warn(ar, "txdone fifo overrun, msdu_id %d status %d\n", tx_done.msdu_id, tx_done.status); ath10k_txrx_tx_unref(htt, &tx_done);