From patchwork Tue Jan 15 06:31:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Wang X-Patchwork-Id: 10764019 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 6393313BF for ; Tue, 15 Jan 2019 06:34:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51DA12ACE7 for ; Tue, 15 Jan 2019 06:34:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 436A72ADA6; Tue, 15 Jan 2019 06:34:04 +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 ED9FC2ACE7 for ; Tue, 15 Jan 2019 06:34:03 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=TjQKYRtNA/sGvt+0rt3MWhWABnGzdQwdpe8ImO7ZgRw=; b=jz0 +34G6/u1VXhYG7dfiVNRXzwQqLzbwkvcTgJGyvSjueYOg5Quh2pbUADRTKkueiM5IhY7FDUxtdpQv Vy7/TITL7xyCLFE2N0qZck5bhsQMrvtNfxAWuql+BW6OCGHi2fA+Rfm5X+hLK0UpDZfy/jkaCeIN/ EiGG2zZ2w20t1XdrDapZ0Th0U4ByW+hT+MtHIjJNvPZml2lLgL3C9HrcOY0zNBq3nBMNJJ+ZKh6Gl ouRy2qSkmt789JLw+8rMWAUFJkA3TdCb4lvAA5unZDLKufQPx/Tx7jdRyhZvgb041s0rTlfcpHxz7 9WuxOGZ5ZKEycYBzExsp3Wbl+9F8HZg==; 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 1gjIIR-00024U-H7; Tue, 15 Jan 2019 06:33:59 +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 1gjIIP-00023v-7a for ath10k@lists.infradead.org; Tue, 15 Jan 2019 06:33:58 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2D2C760807; Tue, 15 Jan 2019 06:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547534036; bh=5/J9fr22DksbDPxQY3rjDXo8aLkdx1I0dzAF6Fa7iok=; h=From:To:Cc:Subject:Date:From; b=fwN+GCytinzrmTktT0ZNIXki+VwkUWXWXgYBmzU4E97Qm/aXNvjlm9rMcIXAOc8T0 gmiyejicnYVDaAgbMSEfHYU2sdo693FHhLsiU7A/Barq1j+uNS31koJy8f5nW68Fxz oPM94cLDK7LZpb+xNvcvJzxpJFaL8eYggsWgrHI0= Received: from localhost.localdomain (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: yyuwang@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9DC026074C; Tue, 15 Jan 2019 06:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547534035; bh=5/J9fr22DksbDPxQY3rjDXo8aLkdx1I0dzAF6Fa7iok=; h=From:To:Cc:Subject:Date:From; b=PK8PXOPRW5ssYaoZozcEM3x8TtzGW8Ofm+wMFhQdA5n1GqpNCNle+1rdAvUOIIrNT +1PsON0B5mNOkWm4ynvooFpuXQ5RWovgwaMIi4XRmFKk/pe4M4OxHUCQ1vTNLbUwiP 9yJ2FJTulTBglSqA+szWw4kRZAMeiNxyt4HxWFn4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9DC026074C 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=yyuwang@codeaurora.org From: Yu Wang To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: fix S5 power consumption issue for QCA9377 Date: Tue, 15 Jan 2019 14:31:07 +0800 Message-Id: <1547533867-15131-1-git-send-email-yyuwang@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190114_223357_294435_83C53585 X-CRM114-Status: GOOD ( 11.13 ) 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: Yu Wang , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP After system entering S5 (shut down but system still providing power to QCA9377) on Ubuntu platform, power consumption of QCA9377 is 69mA, which is too high. The root cause is pci_soft_reset is not set for QCA9377 during pci probe. To fix this issue, set 'pci_soft_reset' to 'th10k_pci_warm_reset', and then the power consumption drops to a normal value(10mA). Verified on Dell Ubuntu platform with firmware: WLAN.TF.1.0-00002-QCATFSWPZ-5 Signed-off-by: Yu Wang Signed-off-by: Yu Wang --- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 01b4edb..0a4ce98 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -3554,7 +3554,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, case QCA9377_1_0_DEVICE_ID: hw_rev = ATH10K_HW_QCA9377; pci_ps = true; - pci_soft_reset = NULL; + pci_soft_reset = ath10k_pci_warm_reset; pci_hard_reset = ath10k_pci_qca6174_chip_reset; targ_cpu_to_ce_addr = ath10k_pci_qca6174_targ_cpu_to_ce_addr; break;