]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: lpfc: Fix frequency of Release WQE CQEs
authorJames Smart <jsmart2021@gmail.com>
Tue, 30 Jan 2018 23:58:45 +0000 (15:58 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 12:18:50 +0000 (07:18 -0500)
commitcbc386868caeb1b2e9932d36a0651b9ecb6646fa
tree4072008cf82a1d68e0debd3e620c47fc2e1734a0
parentd6864bd88d0e4313a75f6d86ada4c88706515546
scsi: lpfc: Fix frequency of Release WQE CQEs

BugLink: http://bugs.launchpad.net/bugs/1752182
The driver controls when the hardware sends completions that communicate
consumption of elements from the WQ. This is done by setting a WQEC bit
on a WQE.

The current driver sets it on every Nth WQE posting. However, the driver
isn't clearing the bit if the WQE is reused. Thus, if the queue depth
isn't evenly divisible by N, with enough time, it can be set on every
element, creating a lot of overhead and risking CQ full conditions.

Correct by clearing the bit when not setting it on an Nth element.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 04673e38f56b30cd39b1fa0f386137d818b17781 linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc_sli.c