]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: prevent SK hynix PC400 from using Write Zeroes command
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Thu, 23 Jul 2020 17:29:10 +0000 (01:29 +0800)
committerChristoph Hellwig <hch@lst.de>
Sun, 26 Jul 2020 15:28:19 +0000 (17:28 +0200)
commit71d5ca14a4a5244019c4d72745340dcb73c149f1
tree4da85d6fa716eba1924c308bbb5accb4dcdfdc05
parent50b8c0a1f030bb4c48a5e26ac2cbc09687c85163
nvme-pci: prevent SK hynix PC400 from using Write Zeroes command

After commit 15e6d6fe45a5 ("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>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c