From patchwork Mon Apr 3 14:03:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 746468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3vxYjr4mxMz9s81 for ; Tue, 4 Apr 2017 00:03:43 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I+P9mIJb"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b="wKZ0KNbW"; dkim-atps=neutral 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:To:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xYdtXCfrS3R2+EBAX3flrgQhBkbX0/hHw0CBaPpHnUk=; b=I+P9mIJbZvYgnu l1a/E3jsW2sLTy43qlmOFRy+05L/QXUMtUG7PAWeNalDfAw2bxZBT9kasbjHm4KFRsBm+JO1O/0VU Tc6SmbOD3/nQ/A1hHVeJxjhy9mP8kBFEQ8xZs2nWetiuElWoP6z3dZu1NQxVDlGHe7mE+11ff98aU l6XQSilS3WwqRrQWJ/G2ooQhv06UcWbdEcHafHwHM57jnJ40pCJrR/CdROAdc0agFP/c9t5j3YYVj liJW+Y4tFQqyVnthmkK/F6f8X9p0IPqBEFtl4UtTGoz0LPU04hTtmcn9rSQawqbeLJzwRTIzjVB0e ce/9GrD2r88MlyTkdp1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cv2a0-0005NJ-R8; Mon, 03 Apr 2017 14:03:36 +0000 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cv2Zs-0005KB-TW for lede-dev@lists.infradead.org; Mon, 03 Apr 2017 14:03:34 +0000 Received: by mail-io0-x22b.google.com with SMTP id f84so75481478ioj.0 for ; Mon, 03 Apr 2017 07:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VzWWEXpwOUG9AnqMBJyvyB1NtK16dG30qFvN4AaEB7k=; b=wKZ0KNbWJChGMzRKOciB5o3j/J9X2jgYxoM0Sv1TeoQGANKTMzK49/CJPMWcduBKJQ OzamI+m7JQZzIPWKNb4rvKXkh95E2YC0/I+zbTtUMz0bj+PR5zzE5fvwmJruXDWcYw6X QvqcRd7YxIrk6GFVaY+dfP3ULel1PsznntAejf9JcRWQSpjySeQ2jeal1qmCZTj7HvTz Ae7QAfVP3ktCw/FuI+KTVdCW3c1uUEog4lSiSFwjL00tHcy/nZgD5W2El0MJhdaXoKre UHOpzwcaYgTQUE9+FDAABFqQlGf4QeQoYhEHhSJRoB82HaGkFuqkd4nd0VcbOxjhP8G9 7mSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VzWWEXpwOUG9AnqMBJyvyB1NtK16dG30qFvN4AaEB7k=; b=MTZ24Px7oc2xm9+JEZcRS6Z/dZ+p19YoLcxhuHsh2tPEMf6PAyLs6grNXaQ1F/AJn0 JgjLSw1RH84omJ03sHmq1i0yauCbsC1tDeyfZSR5ZKmXhEHQgc1rd+5TQhj53Tlt+VWJ MhNN1J+CGT90spHI4T6WqNNjAFOR93fcOlz0Ri3xSDvcEhz5qXhYjPBbivPhG0YQ5irF NAxjdYzKcyFqldLc+LQhJG0CbtsinCNRGKT7nfW5D29OoY2Za7Ar6G3gTQxhAPPHviFV fivxR9CDYtSk4OgH+lbxfwgQN/hWAEOgd/i6N2lAU9fOH0QBDBcrF3xtDlhh72aUSDfS 1eNQ== X-Gm-Message-State: AFeK/H1P7Jq+oPuoyRLPXeZ11xmObopxnkgyRJSDF2FK9bER222k+pt+8j02WCLnbS5ttVw0AUD+Gc/E2og6iQ== X-Received: by 10.107.186.67 with SMTP id k64mr18395721iof.28.1491228186979; Mon, 03 Apr 2017 07:03:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.151.69 with HTTP; Mon, 3 Apr 2017 07:03:06 -0700 (PDT) In-Reply-To: References: <4a918478-5334-7a66-b877-b14abca57704@ncentric.com> From: Tim Harvey Date: Mon, 3 Apr 2017 07:03:06 -0700 Message-ID: To: Koen Vandeputte X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170403_070329_117006_19B85258 X-CRM114-Status: GOOD ( 29.17 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4001:c06:0:0:0:22b listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Subject: Re: [LEDE-DEV] imx6: fail to start IBSS link X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robin Leblon , LEDE Development List , Felix Fietkau Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Mon, Mar 6, 2017 at 7:52 AM, Koen Vandeputte wrote: > > > On 2017-02-17 17:19, Koen Vandeputte wrote: >> >> >> >>> Koen, >>> >>> Can you try to disable MSI? I've seen issues with it in the past for >>> IMX6 and I typically leave it disabled as it doesn't buy us anything >>> and can instead hurt performance. If I recall, I think its now >>> 'required' by the IMX6 PCIe driver so it may take a kernel change to >>> disable it. Other than that, how does mainline 4.9 behave and what >>> card/chipset are you using? >>> >>> Tim >> >> >> Hi Tim, >> >> I will try with disabled MSI and let you know. >> The earliest time I see in my planning is next week Friday. >> >> fyi, I'm testing on 3 different Ventana boards: >> >> - GW5100 (dualcore - single PCIe) >> - GW5200 (dualcore - Dual PCIe) >> - GW5410 (quadcore - 6x PCIe) >> >> All 3 boards utilize a single MiktroTik R11e-5HnD radio (AR 9300 based) >> Koen, Sorry for the late reply - I keep getting diverted elsewhere. When the IMX6 PCIe host controller uses MSI legacy interrupts stop working and thus any card/driver using legacy will not have functioning interrupts. I'm not sure what that list of card/drivers is that require legacy interrupts but I know ath9k is one of them and just verified it doesn't get any interrupts currently on LEDE master with 4.9. The Linux 4.5 kernel enables PCI_MSI by default for imx_v6_v7_defconfig (31e98e0d24cd2537a63e06e235e050a06b175df7) and the Linux 4.8 kernel additionally requires PCI_MSI to be enabled for IMX6 (3ee803641e76bea76ec730c80dcc64739a9919ff). I'm discussing this upstream as I don't think MSI should be enabled on IMX6. You can check the ath9k interrupts (grep ath9k /proc/interrupts) to see this - if you've got 0 interrupts after your radio is up and running you've hit this issue. You can do the following to hack out the requirement of MSI for the IMX6 PCIe host controller, then disable CONFIG_PCI_MSI is kernel config >> >> Other issues seen so far compared to kernel 4.4: >> - A simple "reboot" doesn't work. UART output shows "Reboot failed" and >> the board stalls. Powercycle is needed This can occur on older revision boards where the PMIC is not reset on IMX6 watchdog reset and a watchdog reset (which is what is used on soft reboot) occurs when the CPU is above 800Mhz. Can you provide the serial number of the board you are seeing this on and verify that if you force the cpu to 800mhz (ie userspace cpufreq governor) prior to reset the issue does not occur? The work-around for this is to use the Gateworks System Controller watchdog to restart the board which does a full board power cycle, but I haven't had time to get that driver mainlined yet (and thus have also not submitted it to LEDE/OpenWrt). >> - UART DMA disabled is required to avoid some boot errors (I've made a >> custom backport from your upstream patch fixing this, but not submitted here >> yet) which boot error specifically? I don't know that I've seen it, but I can confirm that UART DMA needs to be disabled for RS485 to work (which is a more obscure case) which is why I've done it on our kernels. AFAIK there are still some issues upstream with IMX UART flow-control and mctrl_gpio. >> >> General issues in kernels 4.4 & 4.9 >> - Even using the latest UBI FS sources + using the Sync option in bootarg, >> files can get corrupted on a power cut. If the corrupted file is a boot >> file .. :) can you point me to documentation on this bootarg, i'm not familiar with it? >> >> >> >> Other than this it runs pretty stable :) >> > Tim, > > I found 1 more issue on 4.4 & 4.9 kernels: > > https://lists.debian.org/debian-arm/2016/02/msg00000.html > > I'm also seeing this on 4.4 kernel. > It can take up to a few days before it triggers normally, but I have a setup > running which reproduces this within a few hours. > > I've made a patch which increases the timeout in the FEC driver just for > testing .. but it still occurs causing the port to be disabled suddenly. > I've seen reports of this as well but usually it takes days of activity if/before it happens. The MDIO timeout in FEC is currently 3ms - what did you increase it to and are you certain it makes these issues go away? Perhaps we need to start a discussion about this on linux-net. I'm not clear if an MDIO read timeout should cause an interface to go down (or if some layer should retry). I'm also not clear why an MDIO read would not complete in 3ms. Tim diff --git a/drivers/pci/dwc/Kconfig b/drivers/pci/dwc/Kconfig index dfb8a69..31cf8ad 100644 --- a/drivers/pci/dwc/Kconfig +++ b/drivers/pci/dwc/Kconfig @@ -6,7 +6,6 @@ config PCIE_DW config PCIE_DW_HOST bool depends on PCI - depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW config PCI_DRA7XX @@ -45,7 +44,6 @@ config PCI_IMX6 bool "Freescale i.MX6 PCIe controller" depends on PCI depends on SOC_IMX6Q - depends on PCI_MSI_IRQ_DOMAIN select PCIEPORTBUS select PCIE_DW_HOST