linux/drivers/scsi/ibmvscsi
Brian King e20f80b9b1 scsi: ibmvfc: Fix up duplicate response detection
Commit a264cf5e81 ("scsi: ibmvfc: Fix command state accounting and stale
response detection") introduced a regression in detecting duplicate
responses. This was observed in test where a command was sent to the VIOS
and completed before ibmvfc_send_event() set the active flag to 1, which
resulted in the atomic_dec_if_positive() call in ibmvfc_handle_crq()
thinking this was a duplicate response, which resulted in scsi_done() not
getting called, so we then hit a SCSI command timeout for this command once
the timeout expires.  This simply ensures the active flag gets set prior to
making the hcall to send the command to the VIOS, in order to close this
window.

Link: https://lore.kernel.org/r/20211019152129.16558-1-brking@linux.vnet.ibm.com
Fixes: a264cf5e81 ("scsi: ibmvfc: Fix command state accounting and stale response detection")
Cc: stable@vger.kernel.org
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-20 22:59:45 -04:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ibmvfc.c scsi: ibmvfc: Fix up duplicate response detection 2021-10-20 22:59:45 -04:00
ibmvfc.h scsi: ibmvfc: Do not wait for initial device scan 2021-08-17 22:28:40 -04:00
ibmvscsi.c scsi: ibmvscsi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request 2021-08-11 22:25:39 -04:00
ibmvscsi.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00