]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: don't apply NVME_QUIRK_DEALLOCATE_ZEROES when DSM is not supported
authorChristoph Hellwig <hch@lst.de>
Wed, 27 Nov 2024 06:42:18 +0000 (07:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:16 +0000 (20:03 +0100)
commit554888798756e86eeab3e24e73ce9cf0849e51b8
tree2109be62713f72b190a97e85ae8394400ad14122
parent913a3f1c06a4568f22bc1651912860fec65fbb11
nvme: don't apply NVME_QUIRK_DEALLOCATE_ZEROES when DSM is not supported

[ Upstream commit 58a0c875ce028678c9594c7bdf3fe33462392808 ]

Commit 63dfa1004322 ("nvme: move NVME_QUIRK_DEALLOCATE_ZEROES out of
nvme_config_discard") started applying the NVME_QUIRK_DEALLOCATE_ZEROES
quirk even then the Dataset Management is not supported.  It turns out
that there versions of these old Intel SSDs that have DSM support
disabled in the firmware, which will now lead to errors everytime
a Write Zeroes command is issued.  Fix this by checking for DSM support
before applying the quirk.

Reported-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
Fixes: 63dfa1004322 ("nvme: move NVME_QUIRK_DEALLOCATE_ZEROES out of nvme_config_discard")
Tested-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c