From patchwork Sun Oct 13 14:20:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 11187419 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8396515AB for ; Sun, 13 Oct 2019 14:20:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53292206A3 for ; Sun, 13 Oct 2019 14:20:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GQ9gMHsz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=pks.im header.i=@pks.im header.b="QHl0rRIy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ImBY+5Du" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53292206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org 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:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5f8zBQucO3gWHlbV4PZenE/NlR0KEjMJW/lhPcOLLl8=; b=GQ9gMHszdGcMgE MxbHrjT5uvztK4m2YrP94is3fZcmTnHS1tnoi7QfpG2XUoU9uivvH90ofoH2PtL1MG+xisrkTrT/e GcTt0zRhhkYKArpplYi5/DlZAJYUfcDrxgzQxn8NvWwv5AUiypbPnZWZtLpA9Fn7Ep93NaXimsSdQ Jza7hv7UNyTJdovN/v3iDtFKD58048jTqs0vgSU+p6KXkvHt4vceliRK1mABfSFw9uK0X7rH8p0uM B1xllQCxiUDqN9a6+DwJobNlk5dpay4Vvpky3dC3cgea2T4gz3KpM42GocYpN/dukvP8UOm3Gsrkc kFjH0/v39VG+2KEDwY2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iJejW-0006r7-Rc; Sun, 13 Oct 2019 14:20:30 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iJejP-0006qE-ML for ath10k@lists.infradead.org; Sun, 13 Oct 2019 14:20:28 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6E7122216E; Sun, 13 Oct 2019 10:20:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 Oct 2019 10:20:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=UBATMjiyRwriyy3gT3jJWdlqUj BGlS6GXCTBbiY9fhk=; b=QHl0rRIyWS/fpllJ/rp43mn67DsR+04OGGNwz73UoS 5UWA+mgVZk1715PRulwh12cQ/KI0s6fHlDJdtCftz3xfvPDdYsSlIOIh9uNqmkjR O8ait3wjpKxPAJXfd4NEgK+ok6AdXaBTjSNGECGTfQeHeO7NrX+PvAW/iMlG3d9O 4LKCJj0YxlTbupn62ABRRqnqtftPLfRZHFIjW3QuHyWI3QV3xqBDpqEXCaCvdLUm fBOj0gMRLFgdixVyOAlfnDjb64PZ8GIWf5vVRU70+2Z9UCDeemOae9aswCYq4AQf op4/JwRvoJ8dfqrOZ+vewshp7+wTihO6Czwb/PbuH9og== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=UBATMjiyRwriyy3gT 3jJWdlqUjBGlS6GXCTBbiY9fhk=; b=ImBY+5DuhnXVkpMI04ayJBJ33hbnl4mww VbS8zeqa/QdQxdBkf8m0rI4xoVUfeyQHqrl/qZV3qsG2WHv66CbmYf88QYrosd2P cqFeXO7g8anlG3P23IKYcFkhC+pM6BEHSo3MJixMh9ct0WKNashTKP4UWYr6NbIY TtKzFS0RX7pZJ3ghN0JCFbpPo2nu/u7RXKexdSHgXIv9xNUoRnyFu/uj3AansMw3 lUZ5vsag9X0G4DCp5ZU25IRzoW0XtqtiC7IPJfPC6ukkFM+CgJf5mGrD426U+dDz maECtXhri7j816KGJPRodfq4SQbHssFsVa/wrfeMTQLfOTw0HzS3A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrieelgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheprfgrthhrihgtkhcu ufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecukfhppeejkedrheegrdeghe drvdefieenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from NSJAIL (x4e362dec.dyn.telefonica.de [78.54.45.236]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F5B380065; Sun, 13 Oct 2019 10:20:12 -0400 (EDT) Received: from localhost (10.192.0.11 [10.192.0.11]) by NSJAIL (OpenSMTPD) with ESMTPSA id 2190664d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 13 Oct 2019 14:20:10 +0000 (UTC) From: Patrick Steinhardt To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: fix disabling of UART debugging Date: Sun, 13 Oct 2019 16:20:08 +0200 Message-Id: X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191013_072024_056061_B98C75D3 X-CRM114-Status: GOOD ( 12.19 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [66.111.4.28 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Patrick Steinhardt , Kalle Valo , Wen Gong Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org Starting with v5.3.0, it was observed that throughput of an access point with QCA988x-based wireless chip is severely degraded from at least 10MB/s to roughly 200KB/s. A bisect of the issue points to commit 4504f0e5b571 (ath10k: sdio: workaround firmware UART pin configuration bug, 2019-04-19), which employs a workaround for a firmware bug in some QCA6174 SDIO devices. If UART debugging is disabled via the "ath10k.uart_print" module parameter, then the UART initialization code is skipped. With the new workaround introduced in the mentioned commit, devices that need the workaround will also re-set the UART pin of the device to avoid a failing SDIO interrupt. But in fact, the change effectively removed the early return for all devices that do not use the workaround, and as a result UART debugging is now unconditionally turned on disregarding the value of "ath10k.uart_print", causing the decrease in throughput. Fix the issue by re-introducing the early return for all devices again, independent of the UART pin workaround. Tests show that throughput is back to normal levels again with this fix. Fixes: 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug") Signed-off-by: Patrick Steinhardt --- drivers/net/wireless/ath/ath10k/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index dc45d16e8d21..8e4ca231634d 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -2125,9 +2125,10 @@ static int ath10k_init_uart(struct ath10k *ar) ath10k_warn(ar, "failed to set UART TX pin: %d", ret); return ret; } + } + if (!uart_print) return 0; - } ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin); if (ret) {