nvme-fabrics: fix kato initialization
authorMartin George <marting@netapp.com>
Thu, 11 Feb 2021 17:58:26 +0000 (23:28 +0530)
committerChristoph Hellwig <hch@lst.de>
Fri, 5 Mar 2021 12:41:03 +0000 (13:41 +0100)
commit32feb6de47242e54692eceab52cfae8616aa0518
treed5aac1927c9392e65ab94242e617ee5eca0c2343
parent78570f8873c8cd44c12714c7fa7db2601ec5617d
nvme-fabrics: fix kato initialization

Currently kato is initialized to NVME_DEFAULT_KATO for both
discovery & i/o controllers. This is a problem specifically
for non-persistent discovery controllers since it always ends
up with a non-zero kato value. Fix this by initializing kato
to zero instead, and ensuring various controllers are assigned
appropriate kato values as follows:

non-persistent controllers  - kato set to zero
persistent controllers      - kato set to NVMF_DEV_DISC_TMO
                              (or any positive int via nvme-cli)
i/o controllers             - kato set to NVME_DEFAULT_KATO
                              (or any positive int via nvme-cli)

Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c