Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp214622pxx; Wed, 28 Oct 2020 03:03:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcSzIVr9KhH+F49bIdcS1ejhxPGZqm0EErK0/mXPLDvnpJoiq96+jxcsd49xMaxoh1wtPD X-Received: by 2002:a17:906:c0c9:: with SMTP id bn9mr195882ejb.289.1603879405392; Wed, 28 Oct 2020 03:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603879405; cv=none; d=google.com; s=arc-20160816; b=NCImWzFmkAe5DQTMlST/NdnE+MY42Kj3e59U78/f9Lr+BLCAV9hkxS5srU+cD1N+hx XHvIg3CWb2FjgKaGzKNXH1K63RUpWI75mbefcp+5X+NIjj+v+NBU8r/vXeRTiumIVd5M RZKHuaMA4yiQqPMsqWb50XYfWrY6UX5U5dr736NNcqhOXK73lUgxGpLZ1A8CyE4APwL0 6kMMimr3AQH1qUbGqwVvraz00tlns2Rqcxn4YP6vjb5B8lAbu26EOku8q7QfBkgRcav3 UfFd1ij5K9prXvEeGALG1AMLWDmAY6vPnOc5/cUB2/GPNC0ws0DEwSl1PJgxoi+Jdd/i O0yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+eex2twYmX7Zonc44zkkSHizsxbKp+6/IoifdMIbtWY=; b=JhyyVR4eFH2Evt8CXaig1jLfuzpAtFlkZ/gdg9oandrueUaNTYGleorGhR8Kx8bmT3 01zXEqZWHDS1ruILrODHt3q+CxITU5kDtF3Nd+UadXrD2GMqDNf9JAZSpAon3kR2VB+4 I0oADUuA98/Afco/uh4gDgrO2QuP4xfiTyOp1a1Y9yoE2CnQT6sCoGYgH449Wkj+EYXe B4uhNBDrJz7t3r7fucH4gMBZkQKuZDe0lLJnkBGGnr/98/dO90yIvqu3S0OYDAqTOeN9 fZCfH4fvqPYFzRQ9UX4uc2cMP9ZYlb9pJnn68O/fOnUKKrzAbPtg2cD3bIPy4I5RlvM4 hCYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1R8uX0+8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p90si2749641edd.284.2020.10.28.03.02.58; Wed, 28 Oct 2020 03:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1R8uX0+8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S460367AbgJ0OcO (ORCPT + 99 others); Tue, 27 Oct 2020 10:32:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2901921AbgJ0O3S (ORCPT ); Tue, 27 Oct 2020 10:29:18 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB9C82222C; Tue, 27 Oct 2020 14:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808958; bh=Ln77mXgNfQcIb9MvmS/cJx97WtVrEZEx0pq0fYNPTVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1R8uX0+8sKZKllNkbg68TvUDVU1Rjy0CWfrXd7/iVAfoj2cTsVWhBEmd3xmLDVPZ1 4JFeh98Cbdcj7Z8mdqQ+s3sFynpknwnmpRaoOEsVDEyw8eKmNwZNrFbXn56nEZDeZE PWR5t7wXjnH0BDmD+C1q9+H270EyRuWxNPRxysvE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Sandeen , David Milburn , Eric Sandeen , Christoph Hellwig , Jason Andryuk Subject: [PATCH 5.4 024/408] nvme-pci: disable the write zeros command for Intel 600P/P3100 Date: Tue, 27 Oct 2020 14:49:22 +0100 Message-Id: <20201027135456.184570834@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Milburn 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 Signed-off-by: David Milburn Tested-by: Eric Sandeen Signed-off-by: Christoph Hellwig [ Fix-up for 5.4 since NVME_QUIRK_NO_TEMP_THRESH_CHANGE doesn't exist ] Signed-off-by: Jason Andryuk Signed-off-by: Greg Kroah-Hartman --- 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 */