]> www.infradead.org Git - nvme.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)
committerKeith Busch <kbusch@kernel.org>
Mon, 2 Dec 2024 18:03:19 +0000 (10:03 -0800)
commit58a0c875ce028678c9594c7bdf3fe33462392808
tree89dbd52eaddbdf3f1d3db40eb6927ec4c0ad0718
parent84909f7decbd8981a24be829f110c248ecb8c51a
nvme: don't apply NVME_QUIRK_DEALLOCATE_ZEROES when DSM is not supported

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>
drivers/nvme/host/core.c