nvme/pci: Log PCI_STATUS when the controller dies for-4.10/post
authorAndy Lutomirski <luto@kernel.org>
Sat, 3 Dec 2016 04:14:15 +0000 (21:14 -0700)
committerJens Axboe <axboe@fb.com>
Sat, 3 Dec 2016 19:09:29 +0000 (12:09 -0700)
commit99666139f1ee102c93e26892ef5878c61c62bf82
treefff24664730cff8ff559ba328721a79aabaa0c64
parente88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed
nvme/pci: Log PCI_STATUS when the controller dies

When debugging nvme controller crashes, it's nice to know whether
the controller died cleanly so that the failure is just reflected in
CSTS, it died and put an error in PCI_STATUS, or whether it died so
badly that it stopped responding to PCI configuration space reads.

I've seen a failure that gives 0xffff in PCI_STATUS on a Samsung
"SM951 NVMe SAMSUNG 256GB" with firmware "BXW75D0Q".

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Fixed up white space and hunk reject.

Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/pci.c