* [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
@ 2020-04-17 8:36 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-04-17 8:36 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi
Cc: Kai-Heng Feng, linux-stable, open list:NVM EXPRESS DRIVER, open list
After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
command"), SK hynix SC300 becomes very slow with the following error
message:
[ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
BugLink: https://bugs.launchpad.net/bugs/1872383
Cc: linux-stable <stable@vger.kernel.org> # >= 5.1
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
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 4e79e412b276..e3f4dac823d8 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3068,6 +3068,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x1c58, 0x0023), /* WDC SN200 adapter */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+ { PCI_DEVICE(0x1c5c, 0x1504), /* SK hynix SC300 */
+ .driver_data = NVME_QUIRK_DEALLOCATE_ZEROES, },
{ PCI_DEVICE(0x1c5f, 0x0540), /* Memblaze Pblaze4 adapter */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x144d, 0xa821), /* Samsung PM1725 */
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
@ 2020-04-17 12:59 ` Christoph Hellwig
2020-04-21 4:51 ` Kai-Heng Feng
2020-04-17 19:25 ` Chaitanya Kulkarni
2020-07-23 15:57 ` [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Kai-Heng Feng
2 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2020-04-17 12:59 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: kbusch, axboe, hch, sagi, linux-stable,
open list:NVM EXPRESS DRIVER, open list
On Fri, Apr 17, 2020 at 04:36:41PM +0800, Kai-Heng Feng wrote:
> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
> command"), SK hynix SC300 becomes very slow with the following error
> message:
> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>
> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
Do you have a written guarantee from SK Hynix that it will always zero
all blocks discarded?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
@ 2020-04-17 19:25 ` Chaitanya Kulkarni
2020-04-21 4:51 ` Kai-Heng Feng
2020-07-23 15:57 ` [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Kai-Heng Feng
2 siblings, 1 reply; 14+ messages in thread
From: Chaitanya Kulkarni @ 2020-04-17 19:25 UTC (permalink / raw)
To: Kai-Heng Feng, kbusch, axboe, hch, sagi
Cc: open list:NVM EXPRESS DRIVER, linux-stable, open list
On 04/17/2020 01:37 AM, Kai-Heng Feng wrote:
> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
> command"), SK hynix SC300 becomes very slow with the following error
> message:
> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>
> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
Can you share
nvme id-ctrl -H /dev/nvme0 | grep oncs -A 8
output?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 12:59 ` Christoph Hellwig
@ 2020-04-21 4:51 ` Kai-Heng Feng
0 siblings, 0 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-04-21 4:51 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Keith Busch, Jens Axboe, Sagi Grimberg, linux-stable,
open list:NVM EXPRESS DRIVER, open list
> On Apr 17, 2020, at 20:59, Christoph Hellwig <hch@lst.de> wrote:
>
> On Fri, Apr 17, 2020 at 04:36:41PM +0800, Kai-Heng Feng wrote:
>> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
>> command"), SK hynix SC300 becomes very slow with the following error
>> message:
>> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>>
>> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
>
> Do you have a written guarantee from SK Hynix that it will always zero
> all blocks discarded?
Raised the issue to SK Hynix and waiting for their reply...
Kai-Heng
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300
2020-04-17 19:25 ` Chaitanya Kulkarni
@ 2020-04-21 4:51 ` Kai-Heng Feng
0 siblings, 0 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-04-21 4:51 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: kbusch, axboe, hch, sagi, open list:NVM EXPRESS DRIVER,
linux-stable, open list
> On Apr 18, 2020, at 03:25, Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com> wrote:
>
> On 04/17/2020 01:37 AM, Kai-Heng Feng wrote:
>> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
>> command"), SK hynix SC300 becomes very slow with the following error
>> message:
>> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>>
>> Use quirk NVME_QUIRK_DEALLOCATE_ZEROES to workaround this issue.
> Can you share
> nvme id-ctrl -H /dev/nvme0 | grep oncs -A 8
> output?
>
$ sudo nvme id-ctrl -H /dev/nvme0 | grep oncs -A 8
oncs : 0x1f
[7:7] : 0 Verify Not Supported
[6:6] : 0 Timestamp Not Supported
[5:5] : 0 Reservations Not Supported
[4:4] : 0x1 Save and Select Supported
[3:3] : 0x1 Write Zeroes Supported
[2:2] : 0x1 Data Set Management Supported
[1:1] : 0x1 Write Uncorrectable Supported
[0:0] : 0x1 Compare Supported
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
2020-04-17 19:25 ` Chaitanya Kulkarni
@ 2020-07-23 15:57 ` Kai-Heng Feng
2020-07-23 16:03 ` Christoph Hellwig
` (2 more replies)
2 siblings, 3 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-07-23 15:57 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi
Cc: Kai-Heng Feng, kyounghwan sohn, open list:NVM EXPRESS DRIVER, open list
After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
command"), SK hynix PC400 becomes very slow with the following error
message:
[ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
SK Hynix PC400 has a buggy firmware that treats NLB as max value instead
of a range, so the NLB passed isn't a valid value to the firmware.
According to SK hynix there are three commands are affected:
- Write Zeroes
- Compare
- Write Uncorrectable
Write Uncorrectable isn't implemented yet, so add a new quirk to
workaround the former two commands.
BugLink: https://bugs.launchpad.net/bugs/1872383
Cc: kyounghwan sohn <kyounghwan.sohn@sk.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v2:
- SK hynix found the root cause so change the approach accordingly.
- lspci is wrong, the device is PC400 instead of SC300.
drivers/nvme/host/core.c | 11 ++++++++++-
drivers/nvme/host/nvme.h | 5 +++++
drivers/nvme/host/pci.c | 2 ++
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index add040168e67..1b51b6f5e2dd 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -659,15 +659,21 @@ static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req,
static inline blk_status_t nvme_setup_write_zeroes(struct nvme_ns *ns,
struct request *req, struct nvme_command *cmnd)
{
+ u16 length;
+
if (ns->ctrl->quirks & NVME_QUIRK_DEALLOCATE_ZEROES)
return nvme_setup_discard(ns, req, cmnd);
+ length = (blk_rq_bytes(req) >> ns->lba_shift) - 1;
+ if (ns->ctrl->quirks & NVME_QUIRK_SKHYNIX_NLB_BUG)
+ length--;
+
cmnd->write_zeroes.opcode = nvme_cmd_write_zeroes;
cmnd->write_zeroes.nsid = cpu_to_le32(ns->head->ns_id);
cmnd->write_zeroes.slba =
cpu_to_le64(nvme_sect_to_lba(ns, blk_rq_pos(req)));
cmnd->write_zeroes.length =
- cpu_to_le16((blk_rq_bytes(req) >> ns->lba_shift) - 1);
+ cpu_to_le16(length);
cmnd->write_zeroes.control = 0;
return BLK_STS_OK;
}
@@ -1302,6 +1308,9 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
}
length = (io.nblocks + 1) << ns->lba_shift;
+ if (ns->ctrl->quirks & NVME_QUIRK_SKHYNIX_NLB_BUG && io.opcode == nvme_cmd_compare)
+ length--;
+
meta_len = (io.nblocks + 1) * ns->ms;
metadata = nvme_to_user_ptr(io.metadata);
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 1de3f9b827aa..4cbced5062a8 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -129,6 +129,11 @@ enum nvme_quirks {
* Don't change the value of the temperature threshold feature
*/
NVME_QUIRK_NO_TEMP_THRESH_CHANGE = (1 << 14),
+
+ /*
+ * SK Hynix PC400 NLB off-by-one bug
+ */
+ NVME_QUIRK_SKHYNIX_NLB_BUG = (1 << 15),
};
/*
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index b1d18f0633c7..b5a54e6726e4 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3122,6 +3122,8 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x1cc1, 0x8201), /* ADATA SX8200PNP 512GB */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+ { PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
+ .driver_data = NVME_QUIRK_SKHYNIX_NLB_BUG, },
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug
2020-07-23 15:57 ` [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Kai-Heng Feng
@ 2020-07-23 16:03 ` Christoph Hellwig
2020-07-23 16:10 ` Kai-Heng Feng
2020-07-23 17:29 ` [PATCH v3] nvme/pci: Prevent SK hynix PC400 from using Write Zeroes command Kai-Heng Feng
2020-10-13 8:34 ` [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk Kai-Heng Feng
2 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2020-07-23 16:03 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: kbusch, axboe, hch, sagi, kyounghwan sohn,
open list:NVM EXPRESS DRIVER, open list
On Thu, Jul 23, 2020 at 11:57:31PM +0800, Kai-Heng Feng wrote:
> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
> command"), SK hynix PC400 becomes very slow with the following error
> message:
> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>
> SK Hynix PC400 has a buggy firmware that treats NLB as max value instead
> of a range, so the NLB passed isn't a valid value to the firmware.
>
> According to SK hynix there are three commands are affected:
> - Write Zeroes
> - Compare
> - Write Uncorrectable
>
> Write Uncorrectable isn't implemented yet, so add a new quirk to
> workaround the former two commands.
compare isn't implemented either in the kernel, and we certainly
aren't going to do these quirks for passthrough. So I think we really
want a "write zeroes is buggy" quirk and just disable issuing that
command from the driver.
>
> BugLink: https://bugs.launchpad.net/bugs/1872383
> Cc: kyounghwan sohn <kyounghwan.sohn@sk.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> v2:
> - SK hynix found the root cause so change the approach accordingly.
> - lspci is wrong, the device is PC400 instead of SC300.
I don't remember seing a v1..
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug
2020-07-23 16:03 ` Christoph Hellwig
@ 2020-07-23 16:10 ` Kai-Heng Feng
0 siblings, 0 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-07-23 16:10 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kbusch, axboe, sagi, kyounghwan sohn,
open list:NVM EXPRESS DRIVER, open list
> On Jul 24, 2020, at 00:03, Christoph Hellwig <hch@lst.de> wrote:
>
> On Thu, Jul 23, 2020 at 11:57:31PM +0800, Kai-Heng Feng wrote:
>> After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
>> command"), SK hynix PC400 becomes very slow with the following error
>> message:
>> [ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
>>
>> SK Hynix PC400 has a buggy firmware that treats NLB as max value instead
>> of a range, so the NLB passed isn't a valid value to the firmware.
>>
>> According to SK hynix there are three commands are affected:
>> - Write Zeroes
>> - Compare
>> - Write Uncorrectable
>>
>> Write Uncorrectable isn't implemented yet, so add a new quirk to
>> workaround the former two commands.
>
> compare isn't implemented either in the kernel, and we certainly
> aren't going to do these quirks for passthrough. So I think we really
> want a "write zeroes is buggy" quirk and just disable issuing that
> command from the driver.
Ok, will send a new version based on your suggestion.
>
>>
>> BugLink: https://bugs.launchpad.net/bugs/1872383
>> Cc: kyounghwan sohn <kyounghwan.sohn@sk.com>
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> ---
>> v2:
>> - SK hynix found the root cause so change the approach accordingly.
>> - lspci is wrong, the device is PC400 instead of SC300.
>
> I don't remember seing a v1..
Well, because it took some time for the vendor to find the root cause...
Here's the v1:
https://lkml.org/lkml/2020/4/17/169
Kai-Heng
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3] nvme/pci: Prevent SK hynix PC400 from using Write Zeroes command
2020-07-23 15:57 ` [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Kai-Heng Feng
2020-07-23 16:03 ` Christoph Hellwig
@ 2020-07-23 17:29 ` Kai-Heng Feng
2020-07-26 15:29 ` Christoph Hellwig
2020-10-13 8:34 ` [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk Kai-Heng Feng
2 siblings, 1 reply; 14+ messages in thread
From: Kai-Heng Feng @ 2020-07-23 17:29 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi
Cc: Kai-Heng Feng, kyounghwan sohn, open list:NVM EXPRESS DRIVER, open list
After commit 6e02318eaea5 ("nvme: add support for the Write Zeroes
command"), SK hynix PC400 becomes very slow with the following error
message:
[ 224.567695] blk_update_request: operation not supported error, dev nvme1n1, sector 499384320 op 0x9:(WRITE_ZEROES) flags 0x1000000 phys_seg 0 prio class 0]
SK Hynix PC400 has a buggy firmware that treats NLB as max value instead
of a range, so the NLB passed isn't a valid value to the firmware.
According to SK hynix there are three commands are affected:
- Write Zeroes
- Compare
- Write Uncorrectable
Right now only Write Zeroes is implemented, so disable it completely on
SK hynix PC400.
BugLink: https://bugs.launchpad.net/bugs/1872383
Cc: kyounghwan sohn <kyounghwan.sohn@sk.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v3:
- Simply disable Write Zeroes command.
v2:
- SK hynix found the root cause so change the approach accordingly.
- lspci is wrong, the device is PC400 instead of SC300.
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 b1d18f0633c7..25a187e43dbe 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3122,6 +3122,8 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x1cc1, 0x8201), /* ADATA SX8200PNP 512GB */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+ { PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3] nvme/pci: Prevent SK hynix PC400 from using Write Zeroes command
2020-07-23 17:29 ` [PATCH v3] nvme/pci: Prevent SK hynix PC400 from using Write Zeroes command Kai-Heng Feng
@ 2020-07-26 15:29 ` Christoph Hellwig
0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2020-07-26 15:29 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: kbusch, axboe, hch, sagi, kyounghwan sohn,
open list:NVM EXPRESS DRIVER, open list
Thanks,
applied to nvme-5.8.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk
2020-07-23 15:57 ` [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Kai-Heng Feng
2020-07-23 16:03 ` Christoph Hellwig
2020-07-23 17:29 ` [PATCH v3] nvme/pci: Prevent SK hynix PC400 from using Write Zeroes command Kai-Heng Feng
@ 2020-10-13 8:34 ` Kai-Heng Feng
2020-10-14 0:20 ` Chaitanya Kulkarni
2020-10-16 14:04 ` Christoph Hellwig
2 siblings, 2 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-10-13 8:34 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi
Cc: Kai-Heng Feng, open list:NVM EXPRESS DRIVER, open list
Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using
Write Zeroes command"), Sandisk Skyhawk has the same issue:
[ 6305.633887] blk_update_request: operation not supported error, dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
So also disable Write Zeroes command on Sandisk Skyhawk.
BugLink: https://bugs.launchpad.net/bugs/1899503
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
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 8984796db0c8..d310d7317e2a 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3187,6 +3187,8 @@ static const struct pci_device_id nvme_id_table[] = {
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
+ { PCI_DEVICE(0x15b7, 0x2001), /* Sandisk Skyhawk */
+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk
2020-10-13 8:34 ` [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk Kai-Heng Feng
@ 2020-10-14 0:20 ` Chaitanya Kulkarni
2020-10-15 5:09 ` Kai-Heng Feng
2020-10-16 14:04 ` Christoph Hellwig
1 sibling, 1 reply; 14+ messages in thread
From: Chaitanya Kulkarni @ 2020-10-14 0:20 UTC (permalink / raw)
To: Kai-Heng Feng, kbusch, axboe, hch, sagi
Cc: open list, open list:NVM EXPRESS DRIVER
On 10/13/20 01:45, Kai-Heng Feng wrote:
> Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using
> Write Zeroes command"), Sandisk Skyhawk has the same issue:
> [ 6305.633887] blk_update_request: operation not supported error, dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
>
> So also disable Write Zeroes command on Sandisk Skyhawk.
>
> BugLink: https://bugs.launchpad.net/bugs/1899503
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Are you sure this happens all the devices of the same model
and not a firmware bug on specific device ?
If yes then looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk
2020-10-14 0:20 ` Chaitanya Kulkarni
@ 2020-10-15 5:09 ` Kai-Heng Feng
0 siblings, 0 replies; 14+ messages in thread
From: Kai-Heng Feng @ 2020-10-15 5:09 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: kbusch, axboe, hch, sagi, open list, open list:NVM EXPRESS DRIVER
> On Oct 14, 2020, at 08:20, Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com> wrote:
>
> On 10/13/20 01:45, Kai-Heng Feng wrote:
>> Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using
>> Write Zeroes command"), Sandisk Skyhawk has the same issue:
>> [ 6305.633887] blk_update_request: operation not supported error, dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0
>>
>> So also disable Write Zeroes command on Sandisk Skyhawk.
>>
>> BugLink: https://bugs.launchpad.net/bugs/1899503
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>
> Are you sure this happens all the devices of the same model
>
> and not a firmware bug on specific device ?
>
> If yes then looks good.
Yes, and this is the reply from WD, requested by the user:
"These are newest WD branded drives and WD already confirmed they are
the newest firmware / no upgrades are available."
Kai-Heng
>
> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
>
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk
2020-10-13 8:34 ` [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk Kai-Heng Feng
2020-10-14 0:20 ` Chaitanya Kulkarni
@ 2020-10-16 14:04 ` Christoph Hellwig
1 sibling, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2020-10-16 14:04 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: kbusch, axboe, hch, sagi, open list, open list:NVM EXPRESS DRIVER
Thanks,
applied to nvme-5.10.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-10-16 14:04 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 8:36 [PATCH] nvme/pci: Use Discard instead of Write Zeroes on SK hynix SC300 Kai-Heng Feng
2020-04-17 12:59 ` Christoph Hellwig
2020-04-21 4:51 ` Kai-Heng Feng
2020-04-17 19:25 ` Chaitanya Kulkarni
2020-04-21 4:51 ` Kai-Heng Feng
2020-07-23 15:57 ` [PATCH v2] nvme/pci: Add new quirk for SK hynix PC400 NLB off-by-one bug Kai-Heng Feng
2020-07-23 16:03 ` Christoph Hellwig
2020-07-23 16:10 ` Kai-Heng Feng
2020-07-23 17:29 ` [PATCH v3] nvme/pci: Prevent SK hynix PC400 from using Write Zeroes command Kai-Heng Feng
2020-07-26 15:29 ` Christoph Hellwig
2020-10-13 8:34 ` [PATCH] nvme-pci: Disable Write Zeroes on Sandisk Skyhawk Kai-Heng Feng
2020-10-14 0:20 ` Chaitanya Kulkarni
2020-10-15 5:09 ` Kai-Heng Feng
2020-10-16 14:04 ` 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).