From nobody Sun Feb 8 18:24:54 2026 Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) (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 33C1713AA2D for ; Fri, 17 Jan 2025 16:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=34.202.193.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737132466; cv=none; b=N5MIPFw+evjLZkWo1fA3YTbtu+xqsSy4C+167tXxvm20LyTDYT1lGjM5Vf3Eo/dTSIgw0NDdpyfMRkXXkPnY+NNq3EL8XwIGYHhQmPh5iXt96vD+0nVH6n3I+jO0lRrbTKeMrzaiViK2yDbKa1IGCli1AbPsdE+C9Ic2o/P2+Lg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737132466; c=relaxed/simple; bh=7fKQJKlRwwvNQzUUn/etSC3eslnmt+/aDWavkdxJI0A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=WjOfJYBq5hfdkzriYneacDgo07dVkSlvKhn4+ZcRSiHOUkLLXyAimou7GKIYI2/4Xux1JGTLTekDCffLa9L7/2ZdDkbE47J+Umlnhp/HqYb4FDC6zXrTM4P8FE1++ZygqfVBky8AJ4AykEtEwNBcMPrxWRBQZsrbPa+shg8+b18= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=saulv.es; spf=pass smtp.mailfrom=saulv.es; dkim=pass (2048-bit key) header.d=saulv.es header.i=@saulv.es header.b=lcADisCF; dkim=pass (2048-bit key) header.d=purelymail.com header.i=@purelymail.com header.b=zCqipda1; arc=none smtp.client-ip=34.202.193.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=saulv.es Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=saulv.es Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=saulv.es header.i=@saulv.es header.b="lcADisCF"; dkim=pass (2048-bit key) header.d=purelymail.com header.i=@purelymail.com header.b="zCqipda1" Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=lcADisCFzhmo0ZJ4kmEAVT0aL8tLgB1mtA9B5TH0LV0Mw6HSyWE7IK97qaXVwiDei2WmUFVjCyJZKvm9OpdEgBwX3xjVXu8YmmNujdfJMlDB8sCDTPktF3h+SLU8qU7eaoR6g4isoTZ6HARsNEOiFRz4UfyYdVOe3pLVGkld+0MNIt7oQpjrbOIyMfDthycRVFKusRmpmutKa9QOC88FwbClfEM4eFkj/BWQLXrhNi0WMgWY+Lv6VTOYSBymvLvVRqZbhWN1TMhl4io9woEksdlw3sLBGmq7zOlOLkahY1g4QUZj6cblzOnTihm3DUqNM2pXsHBaOotvU8nARPC6Xw==; s=purelymail2; d=saulv.es; v=1; bh=7fKQJKlRwwvNQzUUn/etSC3eslnmt+/aDWavkdxJI0A=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=zCqipda1ciQ9470p9fKtzHJha74OfHg7UKCQdw773eTjvUOzp+o7pzA+4u8Nimu5f0zVovO/NFPDo+QAjYIEAIGjgFNGMOaJhCyU25sik00IxYchMQNnSJia5vWMlrKELZKrcVur/owBi0r7E2k5fr65y4xLrPlMGxoxf/DddOOOGrO/7NzpZSNym6w75602YwwEL8J+/WAG5u25hYP2eM7kgAJaeBCr2Os/TPBULwS+d/ffJqPqRyXHHtWkacB2lFT3GZYUbi1mAYo+IqwZzLvC2slWNsNi9oE+J76rMAxxLzd/xNE0uInm1BfOt4P1a91IfrI+gxJ0m96apzBghg==; s=purelymail2; d=purelymail.com; v=1; bh=7fKQJKlRwwvNQzUUn/etSC3eslnmt+/aDWavkdxJI0A=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 13394:2854:null:purelymail X-Pm-Original-To: linux-kernel@vger.kernel.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 707430678; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 17 Jan 2025 16:47:07 +0000 (UTC) From: =?UTF-8?q?Sa=C3=BAl=20Valdelvira?= To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me Cc: =?UTF-8?q?Sa=C3=BAl=20Valdelvira?= , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] nvme-pci: Avoid the deepest sleep state on Wester Digital SSD Date: Fri, 17 Jan 2025 17:46:53 +0100 Message-ID: <20250117164653.1751-1-saul@saulv.es> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset="utf-8" The Western Digital PC SN520 NVMe SSD has a firmware issue that causes it to hang when APST is enabled. This bug freezes the computer and forces the user to cold-reboot. Add a quirk for this model to avoid the deepest sleep states. Signed-off-by: Sa=C3=BAl Valdelvira --- Hello, my name is Sa=C3=BAl. Here's a patch that works arround a firmware issue I've been experiencing for years in the aforementioned SSD card model. Long story short: 4 years ago I bought a new laptop, and for some reason I was unable to install Linux on it. Everytime I booted Linux, the computer hanged after a few seconds. I've been working arround this issue by setting the following kernel parameter: nvme_core.default_ps_max_latency_us=3D14000 Adding the NVME_QUIRK_NO_DEEPEST_PS flag fixed the issue completely. This [1] page from Dell's web mentions a firmware update for this SSD with number 20240012 that seems to address the issue. The problem is that, as far as i know, Western Digital doesn't offer official firmware updates for Linux. At least, I haven't been able to update it. Here's some info about my SSD - Model: WDC PC SN520 SDAPNUW-512G-1014 - Vendor: Western Digital - Firmware Revision: 20110000 Hope you find this patch usefull. [1] https://www.dell.com/support/home/en-uk/drivers/driversdetails?driverid= =3Dffk91&lwp=3Drt --- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index e2634f437f33..20a94e479caf 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3760,6 +3760,8 @@ static const struct pci_device_id nvme_id_table[] =3D= { NVME_QUIRK_SHARED_TAGS | NVME_QUIRK_SKIP_CID_GEN | NVME_QUIRK_IDENTIFY_CNS }, + { PCI_DEVICE(0x15b7, 0x5003), /* WDC PC SN520 SDAPNUW-512G-1014 */ + .driver_data =3D NVME_QUIRK_NO_DEEPEST_PS }, { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, { 0, } }; -- 2.48.1