Skip to content

Commit 8e6af82

Browse files
khfenggregkh
authored andcommitted
nvme-pci: prevent SK hynix PC400 from using Write Zeroes command
[ Upstream commit 5611ec2 ] After commit 6e02318 ("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 <[email protected]> Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 802df1e commit 8e6af82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/nvme/host/pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3140,6 +3140,8 @@ static const struct pci_device_id nvme_id_table[] = {
31403140
{ PCI_DEVICE(0x1cc1, 0x8201), /* ADATA SX8200PNP 512GB */
31413141
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
31423142
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
3143+
{ PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
3144+
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
31433145
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
31443146
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
31453147
.driver_data = NVME_QUIRK_SINGLE_VECTOR },

0 commit comments

Comments
 (0)