From patchwork Sat Jun 9 14:13:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 927147 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="naN+E4Ng"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4131Wk3Q6Sz9s01 for ; Sun, 10 Jun 2018 00:15:14 +1000 (AEST) 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:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=skKBavI03PB0pVXdkasA401pDq+z216vsgAx5sh8fP0=; b=naN+E4NgrTsFub CXF2w5dyhvhHWxLVk1+mEhuzK3hDyDv774xpY2FJU5T7HY21kEgHmMTB6lmlsUdHBtMtcACtotRrq 4WeDf4aG4eYYjYm2m9fNLQW20MUu/qNhtBSQUP7ry0Tgu/f40wwnKz8P1gjspLiLkwK/z0Lgvsqsj rzBvjadIf+9MyapEch6D+UXLr4qLLryGD9H1Rnxc3YwupDJNqCjIwn9ot8y5n8Qz7EgPgv/uRTJ2L fTlpkwY0ojYZA7+N5zE/B8shDti+BMKeRGbaQf/E8i+rfS0yFwwmSHBcODnspr3oHm+FsWlHbUxRR CrDH5Q37BucQwSHNOT8w==; 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 1fReds-0006PA-PD; Sat, 09 Jun 2018 14:14:56 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fRedA-00067C-Os for openwrt-devel@lists.openwrt.org; Sat, 09 Jun 2018 14:14:52 +0000 Received: (wp-smtpd smtp.tlen.pl 33680 invoked from network); 9 Jun 2018 16:13:56 +0200 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 9 Jun 2018 16:13:56 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 9 Jun 2018 16:13:41 +0200 Message-Id: <20180609141342.23948-2-tomek_n@o2.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180609141342.23948-1-tomek_n@o2.pl> References: <20180609141342.23948-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 7190f7d5b941bb45eb9ed61fb2501d91 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 000000A [sXO0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180609_071412_989957_85DBCC71 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.158 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH 2/3] mvebu: reduce speed to gen1 for armada 37xx devices pcie X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Since the beginning there's been an issue with initializing the Atheros based MiniPCIe wlan cards. Here's an example of kerenel log: advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x44 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4 ath9k 0000:00:00.0: enabling device (0000 -> 0002) advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0xc advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x40 ath9k 0000:00:00.0: request_irq failed advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4 ath9k: probe of 0000:00:00.0 failed with error -22 The same happens for ath5k cards, while ath10k card didn't appear at all (not detected). Following the issue on esppressobin.net forum [1] the workaround seems to be limiting the speed of PCIe bridge to 1st generation. This fixed the initialization of ath5k, ath9k and ath10k cards. The change shouldn't affect the performance for wireless cards, it could reduce the performance of storage controller cards but since OpenWrt focuses on wireless connectivity, fixing compatibility with wireless cards should be a priority. For the record, the iwlwifi and mt76 cards were not affected by this issue. 1. http://espressobin.net/forums/topic/which-pcie-wlan-cards-are-supported Signed-off-by: Tomasz Maciej Nowak --- Please also cherry-pick this to OpenWrt 18.06. --- .../527-pci-aardvark-reduce-speed-to-gen1.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 target/linux/mvebu/patches-4.14/527-pci-aardvark-reduce-speed-to-gen1.patch diff --git a/target/linux/mvebu/patches-4.14/527-pci-aardvark-reduce-speed-to-gen1.patch b/target/linux/mvebu/patches-4.14/527-pci-aardvark-reduce-speed-to-gen1.patch new file mode 100644 index 0000000000..1974c5684f --- /dev/null +++ b/target/linux/mvebu/patches-4.14/527-pci-aardvark-reduce-speed-to-gen1.patch @@ -0,0 +1,15 @@ +--- a/drivers/pci/host/pci-aardvark.c ++++ b/drivers/pci/host/pci-aardvark.c +@@ -311,10 +311,10 @@ static void advk_pcie_setup_hw(struct ad + PCIE_CORE_CTRL2_TD_ENABLE; + advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG); + +- /* Set GEN2 */ ++ /* Set GEN1 */ + reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); + reg &= ~PCIE_GEN_SEL_MSK; +- reg |= SPEED_GEN_2; ++ reg |= SPEED_GEN_1; + advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); + + /* Set lane X1 */