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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no 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 11DC4C2D0A3 for ; Thu, 29 Oct 2020 20:59:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4DD920791 for ; Thu, 29 Oct 2020 20:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726320AbgJ2U7F convert rfc822-to-8bit (ORCPT ); Thu, 29 Oct 2020 16:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgJ2U7E (ORCPT ); Thu, 29 Oct 2020 16:59:04 -0400 X-Greylist: delayed 70663 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 29 Oct 2020 13:59:04 PDT Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97CAFC0613CF for ; Thu, 29 Oct 2020 13:59:04 -0700 (PDT) Received: from localhost (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id C059F140837; Thu, 29 Oct 2020 21:59:01 +0100 (CET) Date: Thu, 29 Oct 2020 21:58:53 +0100 From: Marek Behun To: Bjorn Helgaas Cc: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Pali =?UTF-8?B?Um9ow6Fy?= , vtolkm@gmail.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Ilias Apalodimas , Thomas Petazzoni , Jason Cooper Subject: Re: PCI trouble on mvebu (Turris Omnia) Message-ID: <20201029215853.6ccce4e0@nic.cz> In-Reply-To: <20201029193022.GA476048@bjorn-Precision-5520> References: <871rhhmgkq.fsf@toke.dk> <20201029193022.GA476048@bjorn-Precision-5520> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, 29 Oct 2020 14:30:22 -0500 Bjorn Helgaas wrote: > On Thu, Oct 29, 2020 at 12:12:21PM +0100, Toke Høiland-Jørgensen wrote: > > Pali Rohár writes: > > > > I have been testing mainline kernel on Turris Omnia with two PCIe > > > default cards (WLE200 and WLE900) and it worked fine. But I do not know > > > if I had ASPM enabled or not. > > > > > > So it is working fine for you when CONFIG_PCIEASPM is disabled and whole > > > issue is only when CONFIG_PCIEASPM is enabled? > > > > Yup, exactly. And I'm also currently testing with the default WLE200/900 > > cards... I just tried sticking an MT76-based WiFi card into the third > > PCI slot, and that doesn't come up either when I enable PCIEASPM. > > Huh. So IIUC, the following cases all try to retrain the link and it > fails to come up again: > > - aardvark + WLE900VX (see commit 43fc679ced18) > - mvebu + WLE200 > - mvebu + WLE900 > - mvebu + MT76 Bjorn, IIRC Pali's patches fix the WLE900VX card for Aardvark (both in kernel and in U-Boot). IMO mvebu has similar issues. Both these drivers handle the PCIe reset signal incorrectly (or at least Aardvark did before Pali's work). mvebu is used on Turris Omnia, and our HW guys first solved the WLE900VX not working issue by using different capacitors for the SerDeses (this was 5 years ago). But after Pali's work on Aardvark I think this could also be solved for mvebu driver in software. BTW the WLE900VX card has problems on many systems, it won't work for example on Thinkpad X230. There is a bug on kernel bugzilla reported for this. My opinion is that many drivers do not respect the PCIe specification for reset and link training totally correctly (Pali was talking about this when he was looking at Aardvark) and that WLE900VX has a bug that in combination with those drivers causes the fail. If you look at the drivers, they are incompatible in how they handle the reset signal and link training. I am curious what Pali will tell us, he said that he will look into the mvebu driver. Marek