From patchwork Tue Sep 1 06:23:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: c_traja@qti.qualcomm.com X-Patchwork-Id: 7103421 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F0500BEEC1 for ; Tue, 1 Sep 2015 06:24:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 220B22051D for ; Tue, 1 Sep 2015 06:24:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E158204F6 for ; Tue, 1 Sep 2015 06:24:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZWeza-0005IW-6x; Tue, 01 Sep 2015 06:24:26 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZWezY-00057g-5G for ath10k@lists.infradead.org; Tue, 01 Sep 2015 06:24:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1441088664; x=1472624664; h=from:to:cc:subject:date:message-id:mime-version; bh=KTIVx8WjUUvnQgxBjRbGQw5K0I9EAzKyHiO5vEA9d4E=; b=AfLYB/GjBBKjO3HiZZ7WLKRNT58NZwJZ9nen8H8oU8vQjZmicvZwejUC 3wUc42Wdz4vSxoNnqLgpe+Eu2GF8BT7sELGaO05fXD0GbrIHeUnblbso1 Yk6/NftoNg28/6XV8Wh4FO0RTq7SeNv6TxyA3zIVmMZjUWAl+aDPyYZSp Q=; X-IronPort-AV: E=McAfee;i="5700,7163,7910"; a="95824288" Received: from ironmsg04-l.qualcomm.com ([172.30.48.19]) by sabertooth01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 31 Aug 2015 23:24:00 -0700 X-IronPort-AV: E=Sophos;i="5.17,446,1437462000"; d="scan'208";a="968506421" Received: from nasanexm01a.na.qualcomm.com ([10.85.0.81]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 31 Aug 2015 23:24:00 -0700 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by nasanexm01a.na.qualcomm.com (10.85.0.81) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Mon, 31 Aug 2015 23:23:58 -0700 Received: from localhost (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Tue, 1 Sep 2015 11:53:52 +0530 From: To: Subject: [PATCH] ath10k: Disable PCI power save for QCA99X0 Date: Tue, 1 Sep 2015 11:53:32 +0530 Message-ID: <1441088612-9517-1-git-send-email-c_traja@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150831_232424_307269_16B6CF64 X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.0 (-------) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tamizh chelvam , linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Tamizh chelvam Frequent failures in waking up the target is observed during interface (mostly observed with AP and Monitor mode) bring up on x86, this failures lead to firmware crash. Disabling PCI power save fixes this issue. Disabling ASPM also does not help, as a work around disable PCI power save for QCA99X0. The following kernel log is seen when this issue happens kworker/dying (667) used greatest stack depth: 12208 bytes left ath10k_pci 0000:07:00.0: failed to wake target for read32 at 0x00040050: -110 ath10k_pci 0000:07:00.0: failed to wake target for read32 at 0x0004a02c: -110 ath10k_pci 0000:07:00.0: failed to wake target for write32 of 0xfffffffe at 0x0004a02c: -110 ath10k_pci 0000:07:00.0: failed to wake target for read32 at 0x0004a034: -110 ath10k_pci 0000:07:00.0: failed to wake target for write32 of 0xfffff81f at 0x0004a034: -110 ath10k_pci 0000:07:00.0: failed to wake target for read32 at 0x0004a02c: -110 ath10k_pci 0000:07:00.0: failed to wake target for write32 of 0xffffffe1 at 0x0004a02c: -110 ath10k_pci 0000:07:00.0: failed to wake target for read32 at 0x0004a42c: -110 ath10k_pci 0000:07:00.0: failed to wake target for write32 of 0xfffffffe at 0x0004a42c: -110 ath10k_pci 0000:07:00.0: failed to wake target for read32 at 0x0004a434: -110 ath10k_pci 0000:07:00.0: firmware crashed! (uuid 40b345f1-db3d-4b97-bc54-6572994e02d5) Signed-off-by: Tamizh chelvam --- drivers/net/wireless/ath/ath10k/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 1046ab6..1ab4ee7 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1640,6 +1640,10 @@ static void ath10k_pci_hif_stop(struct ath10k *ar) ath10k_pci_safe_chip_reset(ar); ath10k_pci_irq_disable(ar); + + if (QCA_REV_99X0(ar)) + ath10k_pci_sleep(ar); + ath10k_pci_irq_sync(ar); ath10k_pci_flush(ar); @@ -2315,6 +2319,14 @@ static int ath10k_pci_hif_power_up(struct ath10k *ar) ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif power up\n"); + if (QCA_REV_99X0(ar)) { + ret = ath10k_pci_wake(ar); + if (ret) { + ath10k_warn(ar, "failed to wake target for qca99x0: %d\n", ret); + return ret; + } + } + pcie_capability_read_word(ar_pci->pdev, PCI_EXP_LNKCTL, &ar_pci->link_ctl); pcie_capability_write_word(ar_pci->pdev, PCI_EXP_LNKCTL,