Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3940388pxj; Mon, 21 Jun 2021 09:49:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh96LbQdJWCCMQ3dSvuTLzG3IlangeR4tK7W3pQTmzyIRIvvgR7moojYWtrn0zsCeM9yVI X-Received: by 2002:a17:907:3e17:: with SMTP id hp23mr5151104ejc.259.1624294169351; Mon, 21 Jun 2021 09:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294169; cv=none; d=google.com; s=arc-20160816; b=oQ5+8cObpgEV2F1oMv3mULfh5TJ+O3ClOzoyVKzVVpY7WPdCjfk1v1c1tym4MZto5C YIc0M0uZ+WqTt79rrL9XHYQRzykI9ls+gPvLUV2ULSmDAsOpc8T+lsHIOmdlgxHLcnYE zkS/PV8VgNCaPW1AhCxUMGnwIaK/SRRfDL4xsQOXevCAtKOJB2K9xOBKOejuqK6ePMNK LULZUxEadF/wzNqVWtyiLb+NwsBrsuPbNyFgpvEPrZtGGNd4lvnoW8517mTQ1/OcM1+b fmeSuIrg7JKZ2c2XenbIcIcAhheGCcCtNETSFK+GDUuO85XhY6HwF4K5jtxD8I+hX+oD vOWA== 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=jaYJZHPVVy3U80Mv0H5a26EPMHa4mijfWHZm3z+lvA8=; b=cjVPEoBGIaPG66ZmTYwuSA9n4e7m2NIXfc9v5/H70IUX3w8dObrFDJiRW1KXKdmgTa y28V9P6zkP50h0lB7cHjZ2QRONLqwdAn7b6Wr0oJb7ZT8+v0Xu9leymbePcepzrXUM3G PAp8+NmEn1Il1d5sYp1vXXtLAeR/A9gVr+GeC0dgO3QX3//XUC365nfXywqGQw7hc5Pi 2TajH6hSvmg9PXB4YqWQFHzBSuiIjXoMw5+8ZOUmomQQm8SOGqYx0hEpy2YNMA3Scj6D 2N/i27GuVFGxLH2IlLKIR4yAykB54yTX16geaDEBO5EYWZA5jTgtAyTcFGlwnYP9ppG4 s42w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wru6BaVx; 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 ci23si5324358ejc.149.2021.06.21.09.49.06; Mon, 21 Jun 2021 09:49: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=wru6BaVx; 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 S233656AbhFUQuH (ORCPT + 99 others); Mon, 21 Jun 2021 12:50:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:37530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233978AbhFUQp5 (ORCPT ); Mon, 21 Jun 2021 12:45:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 95F2161406; Mon, 21 Jun 2021 16:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293179; bh=ZOYjvPygqd9xeSZF9e2e3lFo7W6uC0aFrun7hmzr5pY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wru6BaVx++6KQFjjdd8yxZKCy6Fbx/Qb0kHf8p5jt4sn9pumdAs39d+UsplZuz4Zf Lg8dT5YBMa1HCx9jltPlUJuAKWbJVAL2cfpg06R2J7nYp+3uuRXKligRcI31kmPLXW AnscZrELGkuQwEByejf6qQdMK6cUgpHtqJcc5db0= 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.12 126/178] PCI: Mark TI C667X to avoid bus reset Date: Mon, 21 Jun 2021 18:15:40 +0200 Message-Id: <20210621154927.070109566@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 @@ -3578,6 +3578,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) { /*