nvme: add command id quirk for apple controllers
authorKeith Busch <kbusch@kernel.org>
Mon, 27 Sep 2021 15:43:06 +0000 (08:43 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Sep 2021 16:02:07 +0000 (10:02 -0600)
commita2941f6aa71a72be2c82c0a168523a492d093530
treebfc9bb93c2e69eeaf3c6d4c7d678bb61bf16efbf
parentf278eb3d8178f9c31f8dfad7e91440e603dd7f1a
nvme: add command id quirk for apple controllers

Some apple controllers use the command id as an index to implementation
specific data structures and will fail if the value is out of bounds.
The nvme driver's recently introduced command sequence number breaks
this controller.

Provide a quirk so these spec incompliant controllers can function as
before. The driver will not have the ability to detect bad completions
when this quirk is used, but we weren't previously checking this anyway.

The quirk bit was selected so that it can readily apply to stable.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=214509
Cc: Sven Peter <sven@svenpeter.dev>
Reported-by: Orlando Chamberlain <redecorating@protonmail.com>
Reported-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20210927154306.387437-1-kbusch@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c