Received: by 2002:ab2:855:0:b0:1ef:b27b:cc29 with SMTP id 21csp1722129lqy; Fri, 29 Mar 2024 06:49:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQ41Knk6OCCRcXGthKRHJKuom500M5U3e18wqXupLkpS9dTtyUbt4xDGMhEOlZPeV7rlHNtiT8DgVvNLuYsOLhoTLOFWA8U/5eFC5mDQ== X-Google-Smtp-Source: AGHT+IFME1iDgznRGrMOj2Y9u4rUcU/381UoBlaqyeux1bgPk7QtxoN6oussAdDn0TMAZZcu+cgt X-Received: by 2002:ac8:59c4:0:b0:431:6cc3:8bb6 with SMTP id f4-20020ac859c4000000b004316cc38bb6mr2837274qtf.57.1711720195153; Fri, 29 Mar 2024 06:49:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711720195; cv=pass; d=google.com; s=arc-20160816; b=vwrVNMeXi/hEVcNZ5uO8UCWf3B06Rfc265Dap0CPjia9PUMZb2LzIT17ov8FYcn8nx su6KTEEk1MJRyzemoT5QJqkZVG7s0jYOqi1QUSnxXIHEnaXiL38uBdo4IfhdoVdSMoOg OOz+4Fcdzb37v8wfbET3pE4s7YEtaYtVTRmYcvynYfRDyh7VxoqFo0lKHfsgxqM4xanv k3ttLysWcGVMAhRbLopPkOl9J+/8ND/ud9g+0Q7wQ9H03An6rhIg9H0I/pvT9iDQBwn+ KFxigulN9AJlqITMTzH1TjsY0T9PcS3pWsp8rAfuFCmZY615WV6OtH21RnXaczKmtFzp M5dA== 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=jg3abX41ceh1IA/hOad/FcUgumjozQxGygUzfgKuUo4=; fh=Zhrfu3gl6HLhIGz63xoGB6Emdq8+QCvm3MtiWr49NAg=; b=gbvFu0AOw1KvIWLJYr6pZXHVCZ0+nrBia+4EPXHtz6dJdlTXWsC3zJDb9+MFAn+r9N qSb7x62DzNC3JUcJDkgThgakrM5GH+lJ/W5q/kboTJwpEYQKg1ARqZjPGnCYkhragEsf udJjhUcOmBdO/Srduy7mML52W2nQCWIulA9S3tINGUsA1nspyG129pSa2rPIU/xSD/PJ 2GeKPyb/tS1B5fgAOUnv5MPqcNW3S/l1bhmBPx/KRt6e0CtNDqDxD0AekbkFmVs0EYuW 4fol0hUUE6yDE3LlmznCMB4AL/JPCcY9qxWSI1i4DrfgtG/SEt8jDEpQV405PZL7tlvo vzEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dwwTRNPu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124781-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. [147.75.199.223]) by mx.google.com with ESMTPS id w8-20020ac857c8000000b0043130380ae0si3736867qta.386.2024.03.29.06.49.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dwwTRNPu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124781-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 D17E81C241ED for ; Fri, 29 Mar 2024 13:49:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA38E18786C; Fri, 29 Mar 2024 12:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dwwTRNPu" 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 CC01D187668; Fri, 29 Mar 2024 12:42:12 +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=1711716132; cv=none; b=h5yVXN/vAymdE5EVwqCT34pVCPkI+uoyB6GGdPsz4Hl35tAOHw5m/8QnXrjcq0lJmDMGwNVsG4gjv5L5M0NOdLg7Hw4AYAePX+w4SazTEE4jMvstJPxtkoCxancd3MRlolp4/o3sSn/l+szgmrphCkNFLnokFL6ad2Q0raFDLd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716132; c=relaxed/simple; bh=L3hRlVqiQCKM/HmF6+MB8eWM8qumHarZlp9R63F0ZzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lqJX03eyJmTnus2omgAhIem1NjKItYf4xrzaTEXQni65+XvHfRXPhGo7cQfSVEjz866MvtNxid/isn0oH1bguY2X7aMrcjB4ALKujAQD0LVfcn9ca+wMgfqwCVhLg2AVjQGVfGQHeNPpmN8xSdBqGKZz507COHlTfuQ9v4od7OA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dwwTRNPu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF50BC433F1; Fri, 29 Mar 2024 12:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716132; bh=L3hRlVqiQCKM/HmF6+MB8eWM8qumHarZlp9R63F0ZzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dwwTRNPuZashv/fa/lM7Ob7UsnzHF03OFb+fIt0+RsH8DATbWHUkPQYT6qT8gh8oK TTTRv8Pzsnd5onkfrPgsL2gu0xMaIGS5oP+r2+c7Lfn4n3Phcm0AIXNjaRtMfQsOD4 wreodviznbfIVZPNnP2YgNLlLknSJEo8XIK+e8ngRR72LPfNQpSZNGoS6yxa7ft9b0 vgy9z9oKQKlMAfcBdNjbwJ0K1nczfdTAPttLGGe8CFbWLGiGoEv53LIRomR9HnRbOV W1Sw1ym1fC5GPd95n7PBtDiNlLBR9AB0d5glePOSalubrmPMPWUJrtsjiDxM2aPOAp Nr6BnKBRg3agg== 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.8 71/98] PCI: Mark LSI FW643 to avoid bus reset Date: Fri, 29 Mar 2024 08:37:42 -0400 Message-ID: <20240329123919.3087149-71-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329123919.3087149-1-sashal@kernel.org> References: <20240329123919.3087149-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.8.2 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 d797df6e5f3e9..6ac58cd098b2b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3765,6 +3765,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