linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: Add Write Zero support to Intel 660p
@ 2018-10-26 22:41 Gwendal Grignou
  2018-10-26 22:58 ` Keith Busch
  0 siblings, 1 reply; 10+ messages in thread
From: Gwendal Grignou @ 2018-10-26 22:41 UTC (permalink / raw)


Given Intel 660p returns 0 when reading discarded data,
allow Write Zero.

nvme id-ns /dev/nvme0n1
...
dlfeat  : 1
...

Check Write Zeros is now enabled:
cat /sys/block/nvme0n1/queue/write_zeroes_max_bytes
2199023255040

Signed-off-by: Gwendal Grignou <gwendal at chromium.org>
---
 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 7e09e45b0b28d..b81ad51d78b72 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2694,6 +2694,8 @@ static const struct pci_device_id nvme_id_table[] = {
 	{ PCI_VDEVICE(INTEL, 0xf1a5),	/* Intel 600P/P3100 */
 		.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
 				NVME_QUIRK_MEDIUM_PRIO_SQ },
+	{ PCI_VDEVICE(INTEL, 0xf1a8), /* Intel 660P */
+		.driver_data = NVME_QUIRK_DEALLOCATE_ZEROES, },
 	{ PCI_VDEVICE(INTEL, 0x5845),	/* Qemu emulated controller */
 		.driver_data = NVME_QUIRK_IDENTIFY_CNS, },
 	{ PCI_DEVICE(0x1bb1, 0x0100),   /* Seagate Nytro Flash Storage */
-- 
2.19.1.568.g152ad8e336-goog

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-03  8:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-26 22:41 [PATCH] nvme-pci: Add Write Zero support to Intel 660p Gwendal Grignou
2018-10-26 22:58 ` Keith Busch
2018-10-27  7:44   ` Christoph Hellwig
2018-10-27  9:19     ` Chaitanya Kulkarni
2018-10-29 15:24     ` Keith Busch
2018-11-01  5:27       ` Christoph Hellwig
2018-11-01 14:38         ` Keith Busch
2018-11-02  6:08           ` Christoph Hellwig
2018-11-02 14:21             ` Keith Busch
2018-11-03  8:21               ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).