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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 6B539C2D0A3 for ; Thu, 29 Oct 2020 23:16:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE60E20838 for ; Thu, 29 Oct 2020 23:16:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YK41PmfO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725944AbgJ2XQF (ORCPT ); Thu, 29 Oct 2020 19:16:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32426 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbgJ2XQF (ORCPT ); Thu, 29 Oct 2020 19:16:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604013363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pDzhIwz3SU8Sz2IfnKwo6SqdwTl4+6iL2g2rAqYfz8k=; b=YK41PmfOljRYjR4MSPPUY9iSSJiUSkwBZFjZ/agLViEvFsPBXqIPN+6gCYB8kaJq8bvKtp YzyeSqOEIXqMoreeE2DG+TMte2YChSdq3kt3bTZboXnrR89/s4wOFdz4ZJBcZ1GTFWJFan O9QjOW8Xx7EjdPnOQKv7D0ArTCU7viI= Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-UZAwYUwMOVe6oFmZQoB9QA-1; Thu, 29 Oct 2020 19:16:01 -0400 X-MC-Unique: UZAwYUwMOVe6oFmZQoB9QA-1 Received: by mail-io1-f70.google.com with SMTP id z18so3076244ioz.6 for ; Thu, 29 Oct 2020 16:16:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=pDzhIwz3SU8Sz2IfnKwo6SqdwTl4+6iL2g2rAqYfz8k=; b=t/3PXqWp8BXm8akdr3MGzHGeTUEUbTH6Q1wjed5kMwdwlPP6/1NvTBgVx7yZsEHoS7 4XYwJ2XukgewPvtVd4Bl9zYu5k1aNNNF2UajmgZwIBq7STWLfSTh2s8imGshPOq/VkTI hKRsVi1iF4iw302CpELBQN35euRhijSs9/2kpVbJy9bU2l281E+TSeqELSHIFzmi8XZ5 NWL3J16JsGhQjn49ctKPgGeOCcgpcRuYENaxzOHONfVBCqRv2VHbs+j9oYCGFP038Yeo UO44gaoEnMHWrQ5GYUOybfQLGGJMD0ux5trk8gEx79IhQzMtrirhIdzJzTyPcEJq6lcn fCNA== X-Gm-Message-State: AOAM533nrAFvg3zrvf/XyUkqFfLFQtvg7vcWb5NM0JeSBjJSOxRe79Kd S+EKxjM/IRlEmmAolvZhfSsC4C3NKnL2WHo82dwdBuprMymzfV674HL9YWcYAty6pXSVZwZnJ1K Ind4QNmZnUZI08U7jm3sv X-Received: by 2002:a02:a395:: with SMTP id y21mr5936803jak.58.1604013360966; Thu, 29 Oct 2020 16:16:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5Z4jlORGS3ePAxURBF+suifIZBQK75oOLjC+LuWqq0SFUHz2u3IzguJBFFDjrBwnqz6Bg0g== X-Received: by 2002:a02:a395:: with SMTP id y21mr5936789jak.58.1604013360813; Thu, 29 Oct 2020 16:16:00 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id m66sm4690441ill.69.2020.10.29.16.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 16:16:00 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 6E1DD181AD1; Fri, 30 Oct 2020 00:15:57 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Thomas Petazzoni , Bjorn Helgaas Cc: Pali =?utf-8?Q?Roh=C3=A1r?= , vtolkm@gmail.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Ilias Apalodimas , Marek =?utf-8?Q?Beh=C3=BAn?= , Jason Cooper Subject: Re: PCI trouble on mvebu (Turris Omnia) In-Reply-To: <20201029225409.2accead3@windsurf.home> References: <871rhhmgkq.fsf@toke.dk> <20201029193022.GA476048@bjorn-Precision-5520> <20201029225409.2accead3@windsurf.home> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 30 Oct 2020 00:15:57 +0100 Message-ID: <877dr8oc7m.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Thomas Petazzoni writes: > Hello, > > On Thu, 29 Oct 2020 14:30:22 -0500 > Bjorn Helgaas wrote: > >> We could quirk these NICs to avoid the retrain, but since aardvark and >> mvebu have no obvious connection and WLE200/WLE900 and MT76 have no >> obvious connection, I doubt there's a simple hardware defect that >> explains all these. > > aardvark and mvebu have one very strong connection: they are the only > two drivers making use of the PCI Bridge emulation logic in > drivers/pci/pci-bridge-emul.c: > > drivers/pci$ git grep pci-bridge-emul > akefile:obj-$(CONFIG_PCI_BRIDGE_EMUL) += pci-bridge-emul.o > controller/pci-aardvark.c:#include "../pci-bridge-emul.h" > controller/pci-mvebu.c:#include "../pci-bridge-emul.h" > pci-bridge-emul.c:#include "pci-bridge-emul.h" > > I haven't read the whole thread, but it is important to keep in mind > that on those two platforms, the PCI Bridge seen by Linux is *not* a > real HW bridge. It is faked by the the pci-bridge-emul code. So if this > code has defects/bugs in how it emulates a PCI Bridge behavior, you > might see weird things. Ohh, that's interesting. Why does it need to emulate it? And could this cause things weird interactions like what I'm seeing, where a somewhat buggy device in slot 2 affects the ability to retrain the link also in slot 1, but only if there's no device in slot 3? -Toke 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EA802C4741F for ; Thu, 29 Oct 2020 23:17:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50A3E2076E for ; Thu, 29 Oct 2020 23:17:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NVGgbPnY"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YK41PmfO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50A3E2076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1Ja4wOPxTkvHDo0f6TuFyb4N1Y5WXOuh7kvy+53y2NI=; b=NVGgbPnYl+KqojnsYAM1rKX8t Z85ZBTFsrjBSKo9jesPdF0k9kf+yQNqHikqQI/NgwRp0TVtp3qIRNTa2xanAyXh9CbmAg76nvnhU3 trv7wqtDhuTj/mQOOCrVpS6D8glpT+kuHpP4zii+wlIz73QxQoOEwW9JWi8NGoNEhDwsxAtOpRTTQ YJtVLMgog6aC5MyyGuwM0TMEkRcPKrvPEgQa2RezUq/8Ya2CQn226SeMRWLzv7DaE5Ysnl0ysfgQR y6haVT4wwOtl++gCB7ZeXY0yTFEo5LKZfZjUtf4zx/H2lxkVXKLVN2soSw5kwVyt4hpV5hpSslpmp 2qao57mRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYH9P-0005Qt-N8; Thu, 29 Oct 2020 23:16:11 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYH9I-0005Pc-GL for linux-arm-kernel@lists.infradead.org; Thu, 29 Oct 2020 23:16:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604013363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pDzhIwz3SU8Sz2IfnKwo6SqdwTl4+6iL2g2rAqYfz8k=; b=YK41PmfOljRYjR4MSPPUY9iSSJiUSkwBZFjZ/agLViEvFsPBXqIPN+6gCYB8kaJq8bvKtp YzyeSqOEIXqMoreeE2DG+TMte2YChSdq3kt3bTZboXnrR89/s4wOFdz4ZJBcZ1GTFWJFan O9QjOW8Xx7EjdPnOQKv7D0ArTCU7viI= Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-545-TEZlskHxM1GfOBcEya_WSg-1; Thu, 29 Oct 2020 19:16:01 -0400 X-MC-Unique: TEZlskHxM1GfOBcEya_WSg-1 Received: by mail-il1-f198.google.com with SMTP id b6so3232316ilm.6 for ; Thu, 29 Oct 2020 16:16:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=pDzhIwz3SU8Sz2IfnKwo6SqdwTl4+6iL2g2rAqYfz8k=; b=Za73Zq1ELNB305ZRShcy+ZLACVjs3I9PhlILcDPwHCNkY/MKBNNROJAVQ9SnK5TR87 Mr8DNZZGcwGtVkFNIhvTe7IoMWqDB2gXNDYsChcvxzMSV2AhyntUYsfF+wDL9S8oMWuG h26XsOgKr5OQQYHq4BKZuur4nZirIYucESLq9xfJWkWQtJk95Z6feJ+1CDFH+xQqD1xY vm49qf5KvjnzEW04Q31e5hI63yB5iMKuWAP5asBS3S+4DeaXmAwsuBEfyFTXRse+M1vN GNU4G3+R/IrKTG5zc+pwlsE/45kZJywziGhLq22Y+a7OJMl4oGV8wpqHjfSDBRTKc4aW UWpQ== X-Gm-Message-State: AOAM530MyBVq0lgWiCwCmSGhxio675CXj7Y4FfPgox5Fs9Mt9u4nm6QJ Rym6U4YOk9WEvdOVVYnA/PRF9zdfB2eNGtiMsToSZjid2RJpE+1mk6rpEXhkWuv623M76HdiGzt p/tTqP6NkuYQM9jxK3yEKn8NTh04rwNhxr7E= X-Received: by 2002:a02:a395:: with SMTP id y21mr5936815jak.58.1604013361018; Thu, 29 Oct 2020 16:16:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5Z4jlORGS3ePAxURBF+suifIZBQK75oOLjC+LuWqq0SFUHz2u3IzguJBFFDjrBwnqz6Bg0g== X-Received: by 2002:a02:a395:: with SMTP id y21mr5936789jak.58.1604013360813; Thu, 29 Oct 2020 16:16:00 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id m66sm4690441ill.69.2020.10.29.16.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 16:16:00 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 6E1DD181AD1; Fri, 30 Oct 2020 00:15:57 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Thomas Petazzoni , Bjorn Helgaas Subject: Re: PCI trouble on mvebu (Turris Omnia) In-Reply-To: <20201029225409.2accead3@windsurf.home> References: <871rhhmgkq.fsf@toke.dk> <20201029193022.GA476048@bjorn-Precision-5520> <20201029225409.2accead3@windsurf.home> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 30 Oct 2020 00:15:57 +0100 Message-ID: <877dr8oc7m.fsf@toke.dk> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=toke@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201029_191604_889353_28C0F740 X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Jason Cooper , Pali =?utf-8?Q?Roh=C3=A1r?= , Ilias Apalodimas , Marek =?utf-8?Q?Beh=C3=BAn?= , linux-pci@vger.kernel.org, vtolkm@gmail.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Thomas Petazzoni writes: > Hello, > > On Thu, 29 Oct 2020 14:30:22 -0500 > Bjorn Helgaas wrote: > >> We could quirk these NICs to avoid the retrain, but since aardvark and >> mvebu have no obvious connection and WLE200/WLE900 and MT76 have no >> obvious connection, I doubt there's a simple hardware defect that >> explains all these. > > aardvark and mvebu have one very strong connection: they are the only > two drivers making use of the PCI Bridge emulation logic in > drivers/pci/pci-bridge-emul.c: > > drivers/pci$ git grep pci-bridge-emul > akefile:obj-$(CONFIG_PCI_BRIDGE_EMUL) += pci-bridge-emul.o > controller/pci-aardvark.c:#include "../pci-bridge-emul.h" > controller/pci-mvebu.c:#include "../pci-bridge-emul.h" > pci-bridge-emul.c:#include "pci-bridge-emul.h" > > I haven't read the whole thread, but it is important to keep in mind > that on those two platforms, the PCI Bridge seen by Linux is *not* a > real HW bridge. It is faked by the the pci-bridge-emul code. So if this > code has defects/bugs in how it emulates a PCI Bridge behavior, you > might see weird things. Ohh, that's interesting. Why does it need to emulate it? And could this cause things weird interactions like what I'm seeing, where a somewhat buggy device in slot 2 affects the ability to retrain the link also in slot 1, but only if there's no device in slot 3? -Toke _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel