Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3838360pxv; Mon, 28 Jun 2021 14:19:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu33JT0z3cCetzQIk134mJuH2YQVQG8tHS6iWgTyaWv+SN3TgS0VXeF6JohrsTOjdejtWf X-Received: by 2002:a5e:8907:: with SMTP id k7mr1161933ioj.114.1624915148496; Mon, 28 Jun 2021 14:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624915148; cv=none; d=google.com; s=arc-20160816; b=ACwMZFfmFrm/81uGggAcfOHGQmrX5RmXv3UN1nEw2UzmcZdtuCnsTg4ctkMHpkPVhY e+xq/4T4MukHCypWmZipoqQ2GgMKwbVqrPYDo0lcqCjWRVog8ZLrvKMOEgSE3KjZrNya v33l2uTqa8ZZGNGAO+kyo89gjLvaWdWuBtg5XlcLGwHQeXPpIxxlAFm8FEpPo1b8mwqN 2YJCl2vYAE1JvUGkO5YHsBALgEI3bYAWMGFjLAoKuR+5Tsu51EKRqAgIWl+0sP0M8izv Pd3snJ3a2Ou6/QWkTmwirx/lsFEU8xm/GhHv61ByieySsFd9J6WyIvfkaMZg0ZWnOgmO pNDA== 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=3d2AE8nYSp/GJ32pCxGMhipwzohsf2C8dsRV3irkFY8=; b=HCvmKljAPeR3965DOXvYITrjtGA2f1l7yD+X59s9tslEgSyFRlKKdHGrw3wkDq2510 PL4XnElLo2Z+PlEkTMOxQht02ZpLBZd70jPj21inDDCKiO1lJE58xqq3+v+EoPo3YgCk 4XwDl+yoMZ09DlmuOGBwUnG199B+lG/KyKnRAW6FAew1XnMv5pBlFKHlLq/uPJNvxFNr +Xzv/VAJ6mplceVR4OQEczdVh8QfdhcPKK6bLcGa1ETf6cSzmKpMd8zCMcrok/HLEF9n breU/jQrg8Z9432ZXYxk3//THrm0riR6Xq5Gxo05Pm+/kEgKSzx5NytOH0PI20eTDIz9 qfuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rJQjzpDf; 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 d3si14719699ilg.84.2021.06.28.14.18.55; Mon, 28 Jun 2021 14:19:08 -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=rJQjzpDf; 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 S237305AbhF1PW5 (ORCPT + 99 others); Mon, 28 Jun 2021 11:22:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:36568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235303AbhF1O6g (ORCPT ); Mon, 28 Jun 2021 10:58:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D09161C83; Mon, 28 Jun 2021 14:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891240; bh=SGIhQe/NYaRJnyxsDSfQaiSwbpPhGhHTwOQ4lPyqLNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJQjzpDfRnTg0VXv/P+w4PVcZW5CUs43njj9QD1w87AUR86TrgfPZFaZQuIMz758R BB0z/D0EDhY75C8E4OiaTUCyCkzGACjygVhJDKlPdoAEZEJ5JU9W8Wg7IYty/rfQYp t7DevASmwBixkzNgBjBcZsh5Kep/vb4vPCYkdzwQSQKc7N8VCtlsQhZpiQgjL5M6q4 RO8uEWblwun9Tfiih4C4PgRLqqh/5yz8BBJfn2XQCkCVam18xJoRMKT5bs9bFKbN3W YiERU6qrbYY2Kt+yAOb4bXOw8B6dWGTpunGyROUJxiKYiIdNLER6WDu7bk59I6xBL5 uqcIn2fGQstAA== 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.9 40/71] PCI: Mark TI C667X to avoid bus reset Date: Mon, 28 Jun 2021 10:39:32 -0400 Message-Id: <20210628144003.34260-41-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-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.9.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+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 0ebf7500e171..77874187f5b3 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3358,6 +3358,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