nvmet: fix KATO offset in Set Features
authorDaniel Verkamp <daniel.verkamp@intel.com>
Fri, 9 Dec 2016 19:59:46 +0000 (12:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:39:15 +0000 (08:39 +0000)
commit82040f5c1bba893cf1a257a250962beb90d4b152
treebb7d2593a2e35e3b35effcf832a2c65dc2506945
parentfa6e02c62a616c8442e013c0df48a01be82d15a4
nvmet: fix KATO offset in Set Features

[ Upstream commit 6c73f949300f17851f53fa80c9d1611ccd6909d3 ]

The Set Features implementation for Keep Alive Timer was using the wrong
structure when retrieving the KATO value; it was treating the Set
Features command as a Property Set command.

The NVMe spec defines the Keep Alive Timer feature as having one input
in CDW11 (4 bytes at offset 44 in the command) whereas the code was
reading 8 bytes at offset 48.

Since the Linux NVMe over Fabrics host never sets this feature, this
code has presumably never been tested.

Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/target/admin-cmd.c