Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp13958lqz; Fri, 29 Mar 2024 07:11:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfuYo69CsVy1Ir4YVRv/qFnvT45BAnlicNfsUffC2sOiDCObW1TZFJI6CtCnWgxkoSeOoItF3US747hFYNglXvxzPi7ZFKNtLKofeB1w== X-Google-Smtp-Source: AGHT+IE/3f7fXj+10kJJ/GISUT+Nisb7BYN9lSBFwnmsHhTAeAHnrtPymfQ5sC4a7x8hMoDEmmFD X-Received: by 2002:a17:902:ce8a:b0:1e0:b677:293b with SMTP id f10-20020a170902ce8a00b001e0b677293bmr7536242plg.29.1711721517325; Fri, 29 Mar 2024 07:11:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711721517; cv=pass; d=google.com; s=arc-20160816; b=U0gQqxqHZ2TMkXwqQKvRxlN1e3+hhQvCDoKWpZf5DtuoyyNBptHdzwbTiEdNLMBtqT CG/IKsir22akIbuEzBEbgz/b0j70trH/uCPw77rrS3oYu6a44EKFI2TDylQz81E1a0VH 61D26L93GytPE2b71lqn6OGy5wM0Baj+NmkevKhtzCriqcTxTSiULEF97ll+AqjkcyoR ph8Run5gnjptY9AiamPpBZ7SA5DA0oO6wdfmC0gwbZmvNPkORdDt9MZahFpVtTRSAGVQ +JFE2i6wRUJGSQPMspT2CpSnyIfBnPsxwEBIFBC4vVaZEIqayco+egI/7KEjv3HHkKK4 ho2w== 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=ngk5Kj+jNZc0o1R+EaDhdZnRg8OENwezC8PTEgAeVDg=; fh=Zhrfu3gl6HLhIGz63xoGB6Emdq8+QCvm3MtiWr49NAg=; b=jHeOXYV7fpf8hVLKLbxrSc7wkpEKw1wmjeoy4pC5Y97FzOQtcwAzDLXWiNd70GkWTA 4iiZI/SF9MJ0FUen/7O4Za4DvLBdT9JfFGyOh9vIQTRicA4yxczut+iMcfsKhrtd4Bby sTYOaMsX8VVScdL1NAsvIghPC/DknOMlAcmdvyWw4plujUqa9bFxjKHAwkPAXXWQinnI //iK6Kn8klvew3WHjwa07rvTVJsIJ+lrCu2rSR3fEcKHc3Lrbzx2PP5FbBx9tHW6T5zW ksJHfSlgMfIUi25z1p6XfOfPl9p8RHl+F/EqyBJJyTeJKAfev7m3tYRY7zG9bguzs+Fe mi8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dxmYgiOD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id me8-20020a170902fc4800b001dda3fa4180si3873935plb.618.2024.03.29.07.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 07:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dxmYgiOD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124861-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124861-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 01F27282C2C for ; Fri, 29 Mar 2024 14:11:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B1F41C68B7; Fri, 29 Mar 2024 12:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dxmYgiOD" 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 690691C68A5; Fri, 29 Mar 2024 12:45:08 +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=1711716308; cv=none; b=flkNocJGzA1YdgRm72FOy7V6Rova8SQ5YxNbXzfG3Sh5149S9yPIKPdsI4HE6HcNPlk/eZVbN8SMQcYw8C/bkFiPRi0kOLnFofbi8vQPNFoCTVO9XZkF98JnKLdjBQV3xxJUkaTQRn8EXEyuAOrBp/j8n5iN/FAezXGL9e06Bvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716308; c=relaxed/simple; bh=MNK7HuWoOXNVT4BfoeYZQGbxdA+Bd16yswGD6fUDbyQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EYu4Xip30PmNWiq1vS7w/E94Wny9VYkYgh2eVfS3aidICft4n5+3Jq0NbZABaQU3rsrj9Nn1T/tGiNc0Qqe6RiIOfluPRcQnR2rnXDVNfIICK62NUZgaV3nYjgOCyujTUKGG8Yjub3dVxoQOWGM+8fs2iY2AyUs0xaauw4B+v1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dxmYgiOD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9411FC43609; Fri, 29 Mar 2024 12:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716308; bh=MNK7HuWoOXNVT4BfoeYZQGbxdA+Bd16yswGD6fUDbyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dxmYgiODu2zB8VbXShVv1M8azTJjzBpzLsSaPvF6TfubHK5gh2ELt7VDKGj8jE4np uiKwd9abkShYTnIsMJ0lonxa9ee6eVEypR0Zb+nawrNpflHck01jHCiAB89tQJf6FH 4yFPJkGSv66tPqT55CUkUi5GY5uH9Z9y3bqUlDGssfGRqLgLSTzb1Mke1hGGNhvCH5 o8MCNPHToL84xhA2Hx+s3pvmryPOpMQpf4WJvWF9SmJ5V0BTan2ZlOq69pk3rEvdPe Q9A0PnPIQg7PDoZNDyTjs3frBF0QnJ9Bi4vsFtt7uyUHhfu/zzq7n2THTQVt6zQ3Ua 0aaxet59bLiSA== 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.6 52/75] PCI: Mark LSI FW643 to avoid bus reset Date: Fri, 29 Mar 2024 08:42:33 -0400 Message-ID: <20240329124330.3089520-52-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329124330.3089520-1-sashal@kernel.org> References: <20240329124330.3089520-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.6.23 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 b5b96d2a9f4ba..687f9b00b3057 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3758,6 +3758,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