From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D403ECA9EC9 for ; Mon, 4 Nov 2019 22:08:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CCF1214E0 for ; Mon, 4 Nov 2019 22:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905312; bh=o9zWjotG85ira+gny4NLKdvv6viLLW0sHqAeRx+kY0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vLSJNRmqhZZtdBTtSsotGFuLKocdwjmbFdENlUqQo6ju3CM34SOAEZmF0gqKI2OKW 6jVYd2c+YXyHZAshEr+o5Tgmwq1u/w1yzLSiBzG7b8uaO7Zsl6494PyfwU2B3yOzkT ZAx40Adu1HGbpJBE+mZ51YkbubfQEDJ0wF+k+gH4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390235AbfKDWIb (ORCPT ); Mon, 4 Nov 2019 17:08:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:41360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390219AbfKDWI2 (ORCPT ); Mon, 4 Nov 2019 17:08:28 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45BC220650; Mon, 4 Nov 2019 22:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905306; bh=o9zWjotG85ira+gny4NLKdvv6viLLW0sHqAeRx+kY0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kym6v6IDUaDOaRlfuH/tPxE/M8Xe/HJr42DKNs1xKzXjpjzl9rX8DIw65Xszgw/aC KeVu1Ea9h8X6Y2s8ZxEhBchdh4tVDVCeVN3132Eo9yah87ZNuFfumvXICR0AEpG0CM I0zfesOthd8KERins5rzbftPLY8jkRJIy/YFxdVo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqing Pan , Kalle Valo Subject: [PATCH 5.3 101/163] ath10k: fix latency issue for QCA988x Date: Mon, 4 Nov 2019 22:44:51 +0100 Message-Id: <20191104212147.383576170@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaoqing Pan commit d79749f7716d9dc32fa2d5075f6ec29aac63c76d upstream. (kvalo: cherry picked from commit 1340cc631bd00431e2f174525c971f119df9efa1 in wireless-drivers-next to wireless-drivers as this a frequently reported regression) Bad latency is found on QCA988x, the issue was introduced by commit 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug"). If uart_pin_workaround is false, this change will set uart pin even if uart_print is false. Tested HW: QCA9880 Tested FW: 10.2.4-1.0-00037 Fixes: 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug") Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath10k/core.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -2118,12 +2118,15 @@ static int ath10k_init_uart(struct ath10 return ret; } - if (!uart_print && ar->hw_params.uart_pin_workaround) { - ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, - ar->hw_params.uart_pin); - if (ret) { - ath10k_warn(ar, "failed to set UART TX pin: %d", ret); - return ret; + if (!uart_print) { + if (ar->hw_params.uart_pin_workaround) { + ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, + ar->hw_params.uart_pin); + if (ret) { + ath10k_warn(ar, "failed to set UART TX pin: %d", + ret); + return ret; + } } return 0;