scsi: lpfc: Correct soft lockup when running mds diagnostics
authorJames Smart <jsmart2021@gmail.com>
Mon, 10 Sep 2018 17:30:45 +0000 (10:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:15:00 +0000 (11:15 -0800)
commit7f4b23ed2cdb5ba7a6edf002ea9cf0f5f684dca5
tree43e14e313c751766caeda2c98c001a7e64e6ff06
parentadfbc0d10727027a17fb1784548245cda2fae30e
scsi: lpfc: Correct soft lockup when running mds diagnostics

[ Upstream commit 0ef01a2d95fd62bb4f536e7ce4d5e8e74b97a244 ]

When running an mds diagnostic that passes frames with the switch, soft
lockups are detected. The driver is in a CQE processing loop and has
sufficient amount of traffic that it never exits the ring processing routine,
thus the "lockup".

Cap the number of elements in the work processing routine to 64 elements. This
ensures that the cpu will be given up and the handler reschedule to process
additional items.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_sli.c