Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3729249pxb; Mon, 24 Jan 2022 16:31:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHh/puhIzAVxluJEZhXg+y3H5tz3Jl1VW46trlTWsMcnPZ2t6D9pnb06bFZlb5LQEEBPPv X-Received: by 2002:a17:902:c612:b0:14b:36d1:9ea6 with SMTP id r18-20020a170902c61200b0014b36d19ea6mr10583830plr.64.1643070714432; Mon, 24 Jan 2022 16:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070714; cv=none; d=google.com; s=arc-20160816; b=DDj8Z1OcAeOT7Q67OD9L4Wu8DmmJbAayzOPFgtzjfh/lTSR0xzYaPFfJ9GGCOJAbVx ZRgYIiRVGOW1Y4gT2+xWJaXmsHUMs9qLLszQDSAtB5mQ5VmhfksqCiK1JfR/ufArqD5q fxrKYopKOA8+LrcoIoqXujix9YJelHuubArry/AGwUuajFn4pGiV1+iqMS4efHsBAqeL XuHLILXr5IE0IgqRh1YHvBoBA92RT496VAnpdB+GW+cQD7S8AdmP1fu8FLDyufq0mwNh L4epl6n0Fu1HIlbeI2gt3fFzLcHD+FQe/2I5QqwHK7tKMwC6Q5p1fdkUSbEGXcaY7Mtz 3M7Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/ueL8QC3WUSQMFm4PXK74VliXX9Vt9Ki687ZnWw/aYk=; b=Jm/UU1oUxtUn9dXHbLrU4cLtiRP4hoXtQSbR86N2GISpPX7eqOQjZWp+MLma+n03+b rIIYkBkJcx29e1AqD50X1VL9QiaEY6T/zX6iK/YwUp7ql2v72y4f30KvXB+p7zwYxJdy XEmXVrjvUGm6lsMvDJDr6j1O3yckKFM2TNH7unID9a0SWmfbnf5DPO3kX5wdxNK6ujn0 fyDKvQ0vJw6Jd0dSNyYaHaNu6nZKDH5xpYc7iGGMqiZdk8vfg+vK1/dqh1HRDQlbVluG c5OqfO5J4KCsEzq4kPX5VJyCiHdWIZy1MEikw6bpDY7/lrg8POR7NGBWHUCmws5dS4sn CAVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cxzcgK0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si17088430pfc.87.2022.01.24.16.31.42; Mon, 24 Jan 2022 16:31:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cxzcgK0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3410171AbiAYA2m (ORCPT + 99 others); Mon, 24 Jan 2022 19:28:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2360146AbiAXXgJ (ORCPT ); Mon, 24 Jan 2022 18:36:09 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E325C075D37; Mon, 24 Jan 2022 13:37:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BF7036150D; Mon, 24 Jan 2022 21:37:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB009C340E4; Mon, 24 Jan 2022 21:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060223; bh=YcFsUeslYa8xYA7haRFrlwUsZXiclWBMo3itOg4vcr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cxzcgK0v82+wCNtPNr9GT/vwBP0RXE3NPRHzJXsVncM6iBZOdDXbJFM0AZvuRa2Bb bvHSmxT50A6F6bYJOOmpz24MeH/Ulwq+gdcbPvGiAsIjX1ylIlasKe9ybGkWHMy6Jf VXwyczEWSO+f51eCj9nkeFvL8aEF1UtMV7s5hTzc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Lorenzo Pieralisi Subject: [PATCH 5.16 0879/1039] PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device Date: Mon, 24 Jan 2022 19:44:28 +0100 Message-Id: <20220124184154.845878511@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Rohár commit 3be9d243b21724d49b65043d4520d688b6040b36 upstream. Since all PCI Express device Functions are required to implement the PCI Express Capability structure, Capabilities List bit in PCI Status Register must be hardwired to 1b. Capabilities Pointer register (which is already set by pci-bride-emul.c driver) is valid only when Capabilities List is set to 1b. Link: https://lore.kernel.org/r/20211124155944.1290-7-pali@kernel.org Fixes: 23a5fba4d941 ("PCI: Introduce PCI bridge emulated config space common logic") Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pci-bridge-emul.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/pci/pci-bridge-emul.c +++ b/drivers/pci/pci-bridge-emul.c @@ -296,6 +296,7 @@ int pci_bridge_emul_init(struct pci_brid if (bridge->has_pcie) { bridge->conf.capabilities_pointer = PCI_CAP_PCIE_START; + bridge->conf.status |= cpu_to_le16(PCI_STATUS_CAP_LIST); bridge->pcie_conf.cap_id = PCI_CAP_ID_EXP; bridge->pcie_conf.cap |= cpu_to_le16(PCI_EXP_TYPE_ROOT_PORT << 4); bridge->pcie_cap_regs_behavior =