Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3921052pxj; Mon, 21 Jun 2021 09:24:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyijbeU+AvOfb9r3ZmzR9Fheh7/DwinOSn9muwXHopPwX1AJzdGvz+6UrNU733bi1vC+Cx8 X-Received: by 2002:a17:906:d1d5:: with SMTP id bs21mr26152009ejb.378.1624292669711; Mon, 21 Jun 2021 09:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292669; cv=none; d=google.com; s=arc-20160816; b=O8M6UEm0Kp2oIg8BKlrZCGTM3n6KzV6fXBA+bsdrB80+9VHoFz2bahBq9oHEooETeA mX1pPWlGw99WG+IQQb+LspSr9KeRBfliqGT0O5E4OUk4O3fMym8JRHMsM5js9m5KhKwv k6ZIWzEgp6akeSizofM9Ol8iTXqZS3knyo3StEWP84YMN+W0BvWwNStR7VI1EourhZEH ARPc34eomA096cHN4Sm3SRcSouQpHt7IBZAxWJWW5eTTeQrHpFHKWeLYR72CfuEASboe Q9xAHCSqrGjTmlNOS3izdYy6xS5JMHwgSflEFoqnCBox1p9OrC1DLmGXvS2cWEL5nDWE t/DQ== 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=JzJRGeSufRHBp5pCEm2rU39PEo9avPaehlDfhBq2fEY=; b=rchUPF43iQso9g86oJdaEHrHr4PtKblSiaDF0AiMP0mV5FeXXiHjZpZd9TQ/08eg1h ISZKC/S0Ss/X8/hV3+fmw1djC+G9TjxttoetS3kpt8oFungXlYpeRUnd4FLq1RPmb6wv AFdlqfnUJp+qUfbcXTW5EmvvfnDnY7PNhZ2KrI1tQn9R6IyxGz/btpRmO8ZIMsR3UT3r 79okScTJoSQ+he+ZkQ/gAAJc6E1xLQPM8sfwRrtGjuUlf6qUpakJVj/UeObcDjrQqDPV uI73/wb28IoBeq3RaAeMsm3tSWtPUJ4gVEvT0AvcIio76jMHc8LmzvlLJOCaUJF87SjZ saKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="AeuM4Fo/"; 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 r18si17682659edd.158.2021.06.21.09.24.06; Mon, 21 Jun 2021 09:24:29 -0700 (PDT) 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="AeuM4Fo/"; 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 S231302AbhFUQWh (ORCPT + 99 others); Mon, 21 Jun 2021 12:22:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:42544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbhFUQVY (ORCPT ); Mon, 21 Jun 2021 12:21:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADEC06128E; Mon, 21 Jun 2021 16:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292350; bh=4UBEDegR1+ok8VwfXrcRVjGbp2H2ycDcefRkifNqyCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeuM4Fo/nziXzYzQhXwawsWyhKazJBSJJG/JFQzeTWiOszeaEe6te5LNW05ctVmRY 2E5yg0xRUmtLcsZCtGrqAaa/mZUO3yNNamSFjfp4UFSvYE273w2BB4Qt13FoLfJFvb HunGOavExVUOAX0A3z26krJH/KUDvJzNSqat6I8g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Antti=20J=C3=A4rvinen?= , Bjorn Helgaas , Kishon Vijay Abraham I Subject: [PATCH 5.4 58/90] PCI: Mark TI C667X to avoid bus reset Date: Mon, 21 Jun 2021 18:15:33 +0200 Message-Id: <20210621154906.119817366@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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: Antti Järvinen commit b5cf198e74a91073d12839a3e2db99994a39995d upstream. Some TI KeyStone C667X devices do not support bus/hot reset. The PCIESS automatically disables LTSSM when Secondary Bus Reset is received and device stops working. Prevent bus reset for these devices. With this change, the device can be assigned to VMs with VFIO, but it will leak state between VMs. Reference: https://e2e.ti.com/support/processors/f/791/t/954382 Link: https://lore.kernel.org/r/20210315102606.17153-1-antti.jarvinen@gmail.com Signed-off-by: Antti Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Kishon Vijay Abraham I Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3577,6 +3577,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_A */ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset); +/* + * Some TI KeyStone C667X devices do not support bus/hot reset. The PCIESS + * automatically disables LTSSM when Secondary Bus Reset is received and + * the device stops working. Prevent bus reset for these devices. With + * this change, the device can be assigned to VMs with VFIO, but it will + * leak state between VMs. Reference + * https://e2e.ti.com/support/processors/f/791/t/954382 + */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0xb005, quirk_no_bus_reset); + static void quirk_no_pm_reset(struct pci_dev *dev) { /*