aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTina Hsu <tina_hsu@phison.corp-partner.google.com>2022-09-22 14:16:30 +0800
committerChristoph Hellwig <hch@lst.de>2022-09-27 09:20:30 +0200
commitd14c273132aec81a1a8107c9ab4865b89e7910a7 (patch)
treec86021bca20a8597bebd4b9bbadd29d6a621ab16
parentc292a337d0e45a292c301e3cd51c35aa0ae91e95 (diff)
downloadlinux-sgx-d14c273132aec81a1a8107c9ab4865b89e7910a7.tar.gz
nvme-pci: disable Write Zeroes on Phison E3C/E4C
E3C/E4C SSDs do support the Write Zeroes command in theory, but have very bad performance when using it. As the firmware has been frozen for these products we can not expect firmware improvements for it, so disable Write Zeroes. Signed-off-by: Tina Hsu <tina_hsu@phison.corp-partner.google.com> [hch: update the commit message] Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/nvme/host/pci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index ca15602401235f..3bdb97205699cd 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3475,6 +3475,10 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN |
NVME_QUIRK_BOGUS_NID, },
+ { PCI_DEVICE(0x1987, 0x5019), /* phison E19 */
+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+ { PCI_DEVICE(0x1987, 0x5021), /* Phison E21 */
+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x1b4b, 0x1092), /* Lexar 256 GB SSD */
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
NVME_QUIRK_IGNORE_DEV_SUBNQN, },