Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp22329lqz; Fri, 29 Mar 2024 07:25:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRYZRnEQL6t0w5Reem6fn+LMS0WHN/Dl6ijQodMY7h/BEdKCQ6PQ4THAb3XkkTFgXumwIyc7KEGETs/Bu8lY2H+0kUwC+UESShQ+TlJQ== X-Google-Smtp-Source: AGHT+IHegBBgsc00s90FCDM2htWqEJf2EgqKgZlB97wgMmYPlFP6NnPt2Qw0xg8KJFm7SaCHcIqa X-Received: by 2002:ac8:5f08:0:b0:431:9bea:82ab with SMTP id x8-20020ac85f08000000b004319bea82abmr2247351qta.35.1711722350822; Fri, 29 Mar 2024 07:25:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711722350; cv=pass; d=google.com; s=arc-20160816; b=cLIJiSvO5fB3WGbUuKyt+oIsN8192cL6XInIHByFNpFJcTjZXxjT+tX9JQint9SZGu o1+LwuOca+/a44UB0Mle0VbolrFjAT7QsfOjz6gE4GBcbYhMBnpPoAVWVa0CMZ/SMv4P qW2Gph2VoZYcAzKoW+GrOF0Qaa9GCEFTPJt+osCssnCUxRgbhS6GZJVUnOXSQ0DEW5Hi j8JcMveGvnvpl/gLyhusKzbj7nuXS8Nmwaz3L5OWb8ABsh9VoTn70MxhiRE3HyrgE+40 BFb8Qqq0/Ls9B0nBSxGVaillfVJpisRoZkfI0gwpCuoeKJ4QlbTIL8DBG3dAUx5phd2p Sd5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Lrp6FZnOmK+x20WQ4EK2ssUbwlJdl9tO3igIvDfD+Vg=; fh=Zhrfu3gl6HLhIGz63xoGB6Emdq8+QCvm3MtiWr49NAg=; b=LcFzRw1cXKvYYSOWwcNcAtB6ojLGCPoYJG1rkyxI9I5ov0JucYI6B0FFD9kmVZtZdN /W7kS1oAnHpxfGbqeP2g/qOkRvIdHKQfckEZq/YUmI0shD9Gpb8u0jK8QfLDJ6g5bGBI s4jngi1vwGIbFbPmi6DHc+kvjXUdteFNxc/PMBQdsbVtFIg7azk9I8AwAHuS/QMGPYGc W4SLi8eHpr6MqQWcLOG1TaKQFDxWjUhEehvRExE09LzEbDmRbIq/7D4q/SueTa+mpeR/ cTq6qEhqZT0Wx16nt5xU5mlSAGxUSVp7Z+toTLNXJrBgIeSSTzqJpW6XYKRTH64u7SP1 qg3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="F/xiYUB5"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e2-20020a05622a110200b00431f81013a3si3835788qty.191.2024.03.29.07.25.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 07:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="F/xiYUB5"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C39F1C27BBF for ; Fri, 29 Mar 2024 14:25:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 848B43165CD; Fri, 29 Mar 2024 12:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F/xiYUB5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A772E14C580; Fri, 29 Mar 2024 12:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716427; cv=none; b=HIdU7hJxThAkvaJJT4GXDy726Ztujpoy7IcnJlDLdHURbyONmp4V6A5o5pIEVbiGgxEjshPptGvhklj48nxoe26GVNNmBsVSPwPLXp602vvuzgA6n+Yn4Tf5Kua8Q8dlE+k7mn7OsKZ5Zp2fn8D5ZnkprNxeupcf2bpYg31vx1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716427; c=relaxed/simple; bh=3ltKAP+Cgy7PTZG6vBDKVQLPkdWTOdneISLREIlq3Bg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DmqT8yC06NFzEbchQ8NIb8/GH4eG14Ra3FPsCs0QHzp7gyQAI6CbAg4ZkPSa0WdXU5a9AhaEoxx3Vi6nMVIe9EygT8+WsRO263hfCLG2vlJeMMkVT6DMEsp7SoApVmF2isjMAfDErEyCf5CvsFpYGg5Oss0aJDjTCUFO+gOSMC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F/xiYUB5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DE1DC43609; Fri, 29 Mar 2024 12:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716427; bh=3ltKAP+Cgy7PTZG6vBDKVQLPkdWTOdneISLREIlq3Bg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/xiYUB5s/JORz5PjqJTS55UmSvQAiIDoIEkGYXAlTl+sPUXSnerrMIbwYGUyJr6m exAfya1ERbpR9sMBuxSMxiCgsEaQRgGk9DcOqNPzZ7wazh5MS5q+SB+gAWo+1L4owz Ypne7GYQbYJv6dCoby9e+c4EaFbNRHRRugGOSjGE3+w2RbThwRS0AoNaVygvh+6rcV VvPXhLIHLA3KHAxxf0tZEJuPKcj8bRPtZSzb6KzCPfN/bbmvm8YA6fJWDyV5+eG9et vit34ACrapLmOfmTjU8254kXD0ZEQWR+ks8YMdFCBcUcxqXlva45vSkgtj6U6pWuZn 4jNjcPunxfdtw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Edmund Raile , Bjorn Helgaas , Sasha Levin , linux-pci@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 33/52] PCI: Mark LSI FW643 to avoid bus reset Date: Fri, 29 Mar 2024 08:45:27 -0400 Message-ID: <20240329124605.3091273-33-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329124605.3091273-1-sashal@kernel.org> References: <20240329124605.3091273-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.83 Content-Transfer-Encoding: 8bit From: Edmund Raile [ Upstream commit 29a43dc130ce65d365a8ea9e1cc4bc51005a353e ] Apparently the LSI / Agere FW643 can't recover after a Secondary Bus Reset and requires a power-off or suspend/resume and rescan. VFIO resets a device before assigning it to a VM, and the FW643 doesn't support any other reset methods, so this problem prevented assignment of FW643 to VMs. Prevent use of Secondary Bus Reset for this device. With this change, the FW643 can be assigned to VMs with VFIO. Note that it will not be reset, resulting in leaking state between VMs and host. Link: https://lore.kernel.org/r/20240227131401.17913-1-edmund.raile@proton.me Signed-off-by: Edmund Raile [bhelgaas: commit log, comment] Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 51d634fbdfb8e..9090da46213b5 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3663,6 +3663,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003e, quirk_no_bus_reset); */ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset); +/* + * Apparently the LSI / Agere FW643 can't recover after a Secondary Bus + * Reset and requires a power-off or suspend/resume and rescan. Prevent + * use of that reset. + */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATT, 0x5900, quirk_no_bus_reset); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATT, 0x5901, 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 -- 2.43.0