Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3598170pxv; Mon, 28 Jun 2021 08:15:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfO08nihj+RnJ3W4meRlN6lJ88CP0mce4yAQ8oi8p8OaNg83n/kC+/1KG1B1bvKEY40ZPT X-Received: by 2002:a17:906:c241:: with SMTP id bl1mr24588757ejb.536.1624893336420; Mon, 28 Jun 2021 08:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624893336; cv=none; d=google.com; s=arc-20160816; b=rVaI6pdnLkVNMjJf1V24mQUrcreoy//iXYhqUptTeWJ7N7gTiSB3SDFZuCFuY5CNBK GQb5UY4GKOS0sAn9pxFHLfMVvxvSDEUNXXOdMVBGbcNR5/GMC3bisM3+aG68DgOJ/SrX BNyQD/ddrjABmAnqk+O0wZ16HH+8lrqyEEAtUKZIN9bXfgl3jsrXvkfzhE/xVSxmoyGZ HRO2OYCsT4DF9JmlJONpSoZAlFTkPaVA/T6n3Q16Tp+rNHws7X3koY7dCAqL/LTdpTan HoJPdQzUIKx7js1xcriC0KrI4QiSf2AXWm6N4BhIuGB3j6EDoQs8LXIdlFwxTNRJ+uC6 iuOg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YNJXm7N/+r+xVTHkIeScg3fpCFR55RQTGRr7HyX468A=; b=fmypzoxaZK3rHN08svloJqlkUdFAYBTh9dB0MNR+R5sl87voRSE5Cyj+bXKsRDSdrQ CyGyMYkY3CcjOSDmKhgoOsv7R1wZte6f3Dh/2f0qQw7Gj1ZznhOYGc5IxYafKT6dKZBr WMCHQrpPdauRCxDS84BzpQB0pUVRvfzJxgMSZvigqs61XBIO2vAQHsKZajxv/bujFGpK F7DKYYwGw2bTCvI9Da2s0AoJKP1l9p0a1BYgnKMFo1NPyD07BRCUtuKoF3DY37HQAR0y 4XI3hfD0v2+hhvp9dBSSr1QmpWsO3Ji6i62O87PCLR8JI+y3FgTMS90dBAmRMPVrzvq1 5kmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P1yqnQBR; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de47si13631954ejc.372.2021.06.28.08.15.10; Mon, 28 Jun 2021 08:15:36 -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=@kernel.org header.s=k20201202 header.b=P1yqnQBR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237058AbhF1PMx (ORCPT + 99 others); Mon, 28 Jun 2021 11:12:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:54534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235651AbhF1OvY (ORCPT ); Mon, 28 Jun 2021 10:51:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAD9561CD5; Mon, 28 Jun 2021 14:37:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891032; bh=he4WoT1yPW5dtfZz8jDm5c6rWD1W7i/UuWR3pKzKTOI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1yqnQBR2Z15RpuCktDwwo8eveqFJTLOkE5DZ7D1oZfrix61faL5WPKzkeRorzmIe XyzTLCUk28PQ9Q44/emoq1SxQq2SSqiYGEoqANbET3G20+6tDFVphCYI31VLqoI8IF XVPoqyQcGLRdIGq52b1N5AkK5tpR6LIq3zY3UIi+HjqA0rFnDsV2lHuYJFoLdl/A8H IQ1uH/wUHdgbRR5ysddqBvGy+Et6oUZ2zZ3DofrefVaufKM9qV8oht0Hcwk41gomhR FSmYjR+9fXdVSQXkYla0gN05iT/ybym9HG+vVskmuPPCerGZewDp7mejaFFmiGhql6 +awju5wxiBQxw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Antti=20J=C3=A4rvinen?= , Bjorn Helgaas , Kishon Vijay Abraham I , Greg Kroah-Hartman Subject: [PATCH 4.14 49/88] PCI: Mark TI C667X to avoid bus reset Date: Mon, 28 Jun 2021 10:35:49 -0400 Message-Id: <20210628143628.33342-50-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore 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(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 510cb05aa96f..f0cd8f7ce881 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3402,6 +3402,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, 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) { /* -- 2.30.2