nvme: add error message on mismatching controller ids
authorJames Smart <jsmart2021@gmail.com>
Thu, 21 Nov 2019 17:58:10 +0000 (09:58 -0800)
committerKeith Busch <kbusch@kernel.org>
Tue, 26 Nov 2019 17:48:33 +0000 (02:48 +0900)
commita8157ff3607eccb21efd4eb2ca46ff0cc488d12d
treec96ac0723cbbc16700efdd28acbaf0ecc70fe411
parent863fbae929c7a5b64e96b8a3ffb34a29eefb9f8f
nvme: add error message on mismatching controller ids

We've seen a few devices that return different controller id's to
the Fabric Connect command vs the Identify(controller) command. It's
currently hard to identify this failure by existing error messages. It
comes across as a (re)connect attempt in the transport that fails with
a -22 (-EINVAL) status. The issue is compounded by older kernels not
having the controller id check or had the identify command overwrite the
fabrics controller id value before it checked. Both resulted in cases
where the devices appeared fine until more recent kernels.

Clarify the reject by adding an error message on controller id mismatches.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c