nvme: add quirk to force medium priority for SQ creation
authorJens Axboe <axboe@kernel.dk>
Tue, 8 May 2018 16:25:15 +0000 (10:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2018 08:10:30 +0000 (10:10 +0200)
commit57e2ce8bbacebbfd1c3bd83ddd526207bd6e2c5a
tree23d221f20adb234daa60bff2d3ceef0adb733a86
parentdb433f83a81fff62899fd11c0976bb0423f225ea
nvme: add quirk to force medium priority for SQ creation

commit 9abd68ef454c824bfd18629033367b4382b5f390 upstream.

Some P3100 drives have a bug where they think WRRU (weighted round robin)
is always enabled, even though the host doesn't set it. Since they think
it's enabled, they also look at the submission queue creation priority. We
used to set that to MEDIUM by default, but that was removed in commit
81c1cd98351b. This causes various issues on that drive. Add a quirk to
still set MEDIUM priority for that controller.

Fixes: 81c1cd98351b ("nvme/pci: Don't set reserved SQ create flags")
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c