nvme/pci: Log PCI_STATUS when the controller dies
authorAndy Lutomirski <luto@kernel.org>
Sat, 3 Dec 2016 04:14:15 +0000 (21:14 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 14 Dec 2016 04:07:08 +0000 (21:07 -0700)
commitd2a61918401ea8db8a6f922e98e86a66b4930cec
tree86146d83d19701e535012a589223db27329fee06
parentbcc7f5b4bee8e327689a4d994022765855c807ff
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