scsi: qla2xxx: Fix extraneous ref on sp's after adapter break
authorBill Kuzeja <William.Kuzeja@stratus.com>
Thu, 25 May 2017 19:26:31 +0000 (15:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:18:01 +0000 (09:18 +0100)
commit9f4a71db144905a41c795e5a67236e36cb20bb16
tree827aeb722dec16363a8dd707132769e73760ac90
parent8ae7720cf90b952b9dba9b1d31062068d29137ff
scsi: qla2xxx: Fix extraneous ref on sp's after adapter break

commit 4cd3b6ebff8510b2139d64024411207090cfe0a9 upstream.

Hung task timeouts can result if a qlogic board breaks unexpectedly
while running I/O. These tasks become hung because command srb reference
counts are not going to zero, hence the affected srbs and commands do
not get freed. This fix accounts for this extra reference in the srbs in
the case of a board failure.

Fixes: a465537ad1a4 ("qla2xxx: Disable the adapter and skip error recovery in case of register disconnect")
Signed-off-by: Bill Kuzeja <william.kuzeja@stratus.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_os.c