]> asedeno.scripts.mit.edu Git - linux.git/commit
nvme_fc: rework sqsize handling
authorJames Smart <jsmart2021@gmail.com>
Wed, 7 Mar 2018 23:59:36 +0000 (15:59 -0800)
committerKeith Busch <keith.busch@intel.com>
Thu, 8 Mar 2018 17:39:58 +0000 (10:39 -0700)
commitd157e5343cb360a525e6b3e7924612a9a90df3b7
treecdf67d4de812be44eb63121a116b14ef3e9d8c80
parent0475821e229cfd9954b7501113d1acbc57b68689
nvme_fc: rework sqsize handling

Corrected four outstanding issues in the transport around sqsize.

1: Create Connection LS is sending the 1's-based sqsize, should be
sending the 0's-based value.

2: allocation of hw queue is using the 0's-base size. It should be
using the 1's-based value.

3: normalization of ctrl.sqsize by MQES is using MQES+1 (1's-based
value). It should be MQES (0's-based value).

4: Missing clause to ensure queue_count not larger than ctrl->sqsize.

Corrected by:
Clean up routines that pass queue size around. The queue size value is
the actual count (1's-based) value and determined from ctrl->sqsize + 1.

Routines that send 0's-based value adapt from queue size.

Sset ctrl->sqsize properly for MQES.

Added clause to nsure queue_count not larger than ctrl->sqsize + 1.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/fc.c