nvme: sanitize KATO setting
authorHannes Reinecke <hare@suse.de>
Fri, 16 Apr 2021 11:46:20 +0000 (13:46 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 21 Apr 2021 17:13:15 +0000 (19:13 +0200)
commita70b81bd4d9d2d6c05cfe6ef2a10bccc2e04357a
treeb8bf44fd9e9a4f1d7a8c2cc34d10743e33490af4
parent8f864c595bed20ef85fef3e7314212b73800d51d
nvme: sanitize KATO setting

According to the NVMe base spec the KATO commands should be sent
at half of the KATO interval, to properly account for round-trip
times.
As we now will only ever send one KATO command per connection we
can easily use the recommended values.
This also fixes a potential issue where the request timeout for
the KATO command does not match the value in the connect command,
which might be causing spurious connection drops from the target.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/fabrics.c
drivers/nvme/host/nvme.h