Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3576743pxb; Mon, 24 Jan 2022 12:38:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyP11YFXg3yuNOA2lAutEt0EAjJKtyEKr9TfE1BdzyalyG1eusGXEzvoOsVh44+LoT9iXID X-Received: by 2002:a17:90b:3908:: with SMTP id ob8mr28422pjb.47.1643056683536; Mon, 24 Jan 2022 12:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056683; cv=none; d=google.com; s=arc-20160816; b=lVbYz2eYhv6yvja/PfI6ADmif+SEOXp8fo59hnfW5qeZSKXpVne92XR8rUZpmWXpYy rH8VVzUQnj/sQkoiW9v4n2Fcb0eeNyTsJ6S9oYOt/jwaLXc7p1o+bz/eGgnwfgW7lKTu qg0HrLDjW8fxwQrfhEAmdjXsCFmtWl5EAK3n/QK2QbcTapARhVQUXBWkE4CrDOu9r33Y OmF/MHDoppfsNFQ9NuBeOYVYl4hiULsBdhWhUSbmSz8gu/4kzvxKehveUhx5SQyo2y7W nmbo5oP+39Oncq7FaVFW147cto2MLBwEM/X9JQuuOGxS4vsclacSOQXdS1kg6S1WYZR3 M6SQ== 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=kwkxo4j5bwQzQbRUYyqL9LuxooylkqfBnfnaCT/AjZg=; b=i3X2+L8qryzYyx7zPicMpXczBAtT30D1+gGE4WQ2qLph2VAJF6mhlwBV608cWLVssG 4G7C6ZFVvcLlWKMYXImOY5c6+VE/qcxUhfkiWT4KXrn1BuqAmuUwZuYFjY8G+DG4pAYT tohZmuj4f3dSwj2fNn24sicacsTw5utICu5rJ8pwzmkgFJFb0Oi1Hp5ZLKpyzDozeiN6 W0u8dQ4ZqETjstaho8qZDcYdzwofclCnRKi5Pn+VaZKi/xBTGPNtXxcEf+1QkQY8drsX 6pm3GozjoJDmLrY7bJzScQtVSujN2+UwMlnEo0UVE08ke0RMWsBOd/lnXeYVoXWov8ri wxJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=izp9fJBe; 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 d9si12491459pla.492.2022.01.24.12.37.50; Mon, 24 Jan 2022 12:38:03 -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=izp9fJBe; 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 S1353985AbiAXTr5 (ORCPT + 99 others); Mon, 24 Jan 2022 14:47:57 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:58860 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349723AbiAXTho (ORCPT ); Mon, 24 Jan 2022 14:37:44 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 189ABB8121C; Mon, 24 Jan 2022 19:37:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F5CAC340E5; Mon, 24 Jan 2022 19:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053061; bh=gvwNwUL2uzlUhdpiHJOTQEv4OnE/kqW5SjOPiiqcIDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=izp9fJBeCiTso3o57AIVNTnTZPlu3thMaFxTI/4in5HL5PBkc/dDjnXy7gWey8X7s dtp+18TtSiq9pglijoHILVBH7pElMA6oRk+NWZZKV0o2THsepPiHoUHEfOC94LX+lX aoZFD90hKVDfpQVM8zsHoNR880Mn6q/BN0mp7Ns0= 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.4 263/320] PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device Date: Mon, 24 Jan 2022 19:44:07 +0100 Message-Id: <20220124184002.931227601@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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 @@ -287,6 +287,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 =