Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2686828imi; Mon, 25 Jul 2022 05:40:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1us2nh2mpjKfPAvLWUvQQ1vd80agOQ0m85kvA0tbjcrZv4gsR6XE6OOIjzGHWmuCJrQFHgR X-Received: by 2002:a05:6402:194d:b0:43b:f21b:e9f4 with SMTP id f13-20020a056402194d00b0043bf21be9f4mr6532016edz.180.1658752836106; Mon, 25 Jul 2022 05:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658752836; cv=none; d=google.com; s=arc-20160816; b=hsybvmzc/cBOxLRjmIxVkVGBv1JKuq+SYfa2B+zlLVkJqkDYodNC6FAT65CQYkXLKT xrDABxz1l/Zdi3TKi3r1FndzxeKZVAUtXLJZsJ9SAxPp6Fqt7odpQtt48JKB4NbWgrih ILiUbqhF5dfZtsgqZLbH+ManH08N5yYjY3ZxcECkrXjCRt014T5klr4QodN2aoZfJ/7v gGqWMExa1FNXG5LX6ETnVKDx0uSbr63sM3wo0HyGXUfyQx3K8Mp+7tCm7iMLG9155xv1 mkKljsfeaj5LV/YZGMSdLGLo0o9JEVPzIhSKdIWp+hSQ20U2eDw/aHfSVH+OZrP8LN+h nOEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=y+UzVL8kGSqCUz9xn5lz5WfJemKYihBdD0xz8EVTC0o=; b=nH51oVYAy7LrWJvUmMtpMG4MBlFEytdz/vcpPvab+wssa1JyDrv36nJXXQVcBK1YA+ QVhjuUja2lmMiFzQnBs1VZjHOAdkj+MHobPiIpcCXBdLfcg/r7M/K+XF18tjbJij4yt7 Ep4KB4onGMGq6NqZFjzigxLZoeKWIrmIL2hv0hb4G6xOVfKFbHQeL2yNpI3zeFpJ2G+i Oo+NDgjSMp7UJTkpBkcCYmX+FLdMBqNKjC1r1F4DmbqqBa+9dJjA0wddd+PfidZj2Bhw cgsDu3JIiouh/nXCalfq1qupE1a2Zvw+bPP7cjrc6bZqRelyrLnYafFSB3yFVwMIq6QA kpHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=Z1DvviqP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd21-20020a1709076e1500b0072b31010f6asi13492732ejc.622.2022.07.25.05.40.08; Mon, 25 Jul 2022 05:40:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=Z1DvviqP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234839AbiGYMYn (ORCPT + 99 others); Mon, 25 Jul 2022 08:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231722AbiGYMYl (ORCPT ); Mon, 25 Jul 2022 08:24:41 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4FAD167FA; Mon, 25 Jul 2022 05:24:40 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Lrzkb3ML7z4x1N; Mon, 25 Jul 2022 22:24:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1658751879; bh=y+UzVL8kGSqCUz9xn5lz5WfJemKYihBdD0xz8EVTC0o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Z1DvviqPDZM3kXdh6qx5DKZLAJwkCLKRe6kMJcBt6Dgy3QOS3nKZEToJrFofWf6Be Dsz2gLQz+XA2Shv1fQQoZCrpOK7vFZugs4ixemxh0eaKul3nKFHz5/8KsepR/Ne78d /Ff1pNZTj3LH6VVMa0kGIGGnpxPP9ybGDfc3r/uSXqlflQIhav7gL6q70jUOI3/SsN Q+q1lNadpqFZ0f6UixOZh2vc53xVdJl8gOPVmHv4K/TwRhqVAzztUBNqLX3uSxejZD 0theMhbpkPIjw+f0bvlYVQctYSQa7uFW6B0NKBeMgM4Cc9DlH/6CWhgm7ZCDDO8Du5 rfznUEDWqDjMA== From: Michael Ellerman To: Bjorn Helgaas , Pali =?utf-8?Q?Roh=C3=A1r?= Cc: Benjamin Herrenschmidt , Paul Mackerras , Bjorn Helgaas , linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/fsl-pci: Fix Class Code of PCIe Root Port In-Reply-To: <20220722194226.GA1927257@bhelgaas> References: <20220722194226.GA1927257@bhelgaas> Date: Mon, 25 Jul 2022 22:24:39 +1000 Message-ID: <87r129bcs8.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bjorn Helgaas writes: > On Wed, Jul 06, 2022 at 12:10:43PM +0200, Pali Roh=C3=A1r wrote: >> By default old pre-3.0 Freescale PCIe controllers reports invalid PCI Cl= ass >> Code 0x0b20 for PCIe Root Port. It can be seen by lspci -b output on P20= 20 >> board which has this pre-3.0 controller: >>=20 >> $ lspci -bvnn >> 00:00.0 Power PC [0b20]: Freescale Semiconductor Inc P2020E [1957:0070= ] (rev 21) >> !!! Invalid class 0b20 for header type 01 >> Capabilities: [4c] Express Root Port (Slot-), MSI 00 >>=20 >> Fix this issue by programming correct PCI Class Code 0x0604 for PCIe Root >> Port to the Freescale specific PCIe register 0x474. >>=20 >> With this change lspci -b output is: >>=20 >> $ lspci -bvnn >> 00:00.0 PCI bridge [0604]: Freescale Semiconductor Inc P2020E [1957:00= 70] (rev 21) (prog-if 00 [Normal decode]) >> Capabilities: [4c] Express Root Port (Slot-), MSI 00 >>=20 >> Without any "Invalid class" error. So class code was properly reflected >> into standard (read-only) PCI register 0x08. >>=20 >> Same fix is already implemented in U-Boot pcie_fsl.c driver in commit: >> http://source.denx.de/u-boot/u-boot/-/commit/d18d06ac35229345a0af80977a4= 08cfbe1d1015b >>=20 >> Fix activated by U-Boot stay active also after booting Linux kernel. >> But boards which use older U-Boot version without that fix are affected = and >> still require this fix. >>=20 >> So implement this class code fix also in kernel fsl_pci.c driver. >>=20 >> Cc: stable@vger.kernel.org >> Signed-off-by: Pali Roh=C3=A1r > > I assume the powerpc folks will take care of this. Will do. cheers