]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Oct 2020 12:14:35 +0000 (14:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Oct 2020 12:14:35 +0000 (14:14 +0200)
added patches:
nvme-pci-disable-the-write-zeros-command-for-intel-600p-p3100.patch

queue-5.4/nvme-pci-disable-the-write-zeros-command-for-intel-600p-p3100.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/nvme-pci-disable-the-write-zeros-command-for-intel-600p-p3100.patch b/queue-5.4/nvme-pci-disable-the-write-zeros-command-for-intel-600p-p3100.patch
new file mode 100644 (file)
index 0000000..1210626
--- /dev/null
@@ -0,0 +1,53 @@
+From ce4cc3133dc72c31bd49ddcf22d0f9eeff47a761 Mon Sep 17 00:00:00 2001
+From: David Milburn <dmilburn@redhat.com>
+Date: Thu, 10 Sep 2020 16:18:50 -0500
+Subject: nvme-pci: disable the write zeros command for Intel 600P/P3100
+
+From: David Milburn <dmilburn@redhat.com>
+
+commit ce4cc3133dc72c31bd49ddcf22d0f9eeff47a761 upstream.
+
+The write zeros command does not work with 4k range.
+
+bash-4.4# ./blkdiscard /dev/nvme0n1p2
+bash-4.4# strace -efallocate xfs_io -c "fzero 536895488 2048" /dev/nvme0n1p2
+fallocate(3, FALLOC_FL_ZERO_RANGE, 536895488, 2048) = 0
++++ exited with 0 +++
+bash-4.4# dd bs=1 if=/dev/nvme0n1p2 skip=536895488 count=512 | hexdump -C
+00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
+*
+00000200
+
+bash-4.4# ./blkdiscard /dev/nvme0n1p2
+bash-4.4# strace -efallocate xfs_io -c "fzero 536895488 4096" /dev/nvme0n1p2
+fallocate(3, FALLOC_FL_ZERO_RANGE, 536895488, 4096) = 0
++++ exited with 0 +++
+bash-4.4# dd bs=1 if=/dev/nvme0n1p2 skip=536895488 count=512 | hexdump -C
+00000000  5c 61 5c b0 96 21 1b 5e  85 0c 07 32 9c 8c eb 3c  |\a\..!.^...2...<|
+00000010  4a a2 06 ca 67 15 2d 8e  29 8d a8 a0 7e 46 8c 62  |J...g.-.)...~F.b|
+00000020  bb 4c 6c c1 6b f5 ae a5  e4 a9 bc 93 4f 60 ff 7a  |.Ll.k.......O`.z|
+
+Reported-by: Eric Sandeen <esandeen@redhat.com>
+Signed-off-by: David Milburn <dmilburn@redhat.com>
+Tested-by: Eric Sandeen <sandeen@redhat.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+[ Fix-up for 5.4 since NVME_QUIRK_NO_TEMP_THRESH_CHANGE doesn't exist ]
+Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/nvme/host/pci.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3110,7 +3110,8 @@ static const struct pci_device_id nvme_i
+                               NVME_QUIRK_DEALLOCATE_ZEROES, },
+       { PCI_VDEVICE(INTEL, 0xf1a5),   /* Intel 600P/P3100 */
+               .driver_data = NVME_QUIRK_NO_DEEPEST_PS |
+-                              NVME_QUIRK_MEDIUM_PRIO_SQ },
++                              NVME_QUIRK_MEDIUM_PRIO_SQ |
++                              NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+       { PCI_VDEVICE(INTEL, 0xf1a6),   /* Intel 760p/Pro 7600p */
+               .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+       { PCI_VDEVICE(INTEL, 0x5845),   /* Qemu emulated controller */
index 6dfd9cd5e0128c954c60a2d156ce70c24e464746..4f43acbbd548db61e8b19f9511f49515f0e05a0c 100644 (file)
@@ -21,3 +21,4 @@ binder-fix-uaf-when-releasing-todo-list.patch
 alsa-bebob-potential-info-leak-in-hwdep_read.patch
 alsa-hda-fix-jack-detection-with-realtek-codecs-when-in-d3.patch
 alsa-hda-hdmi-fix-incorrect-locking-in-hdmi_pcm_close.patch
+nvme-pci-disable-the-write-zeros-command-for-intel-600p-p3100.patch