]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Fix disk failure to rediscover
authorQuinn Tran <qutran@marvell.com>
Thu, 10 Mar 2022 09:25:53 +0000 (01:25 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 15 Mar 2022 04:29:13 +0000 (00:29 -0400)
commit3eb48bb1392bcb457cb1c96d838a68b97e159b6b
tree488dddc718d0371b167aeb4f9b8f090e38cc504a
parenta19c0b599ca2ab75a94f5c71e9b7b62f18f369f3
scsi: qla2xxx: Fix disk failure to rediscover

User experienced some of the LUN failed to get rediscovered after long
cable pull test. The issue is triggered by a race condition between driver
setting session online state vs starting the LUN scan process at the same
time. Current code set the online state after notifying the session is
available. In this case, trigger to start the LUN scan process happened
before driver could set the session in online state.  LUN scan ends up with
failure due to the session online check was failing.

Set the online state before reporting of the availability of the session.

Link: https://lore.kernel.org/r/20220310092604.22950-3-njavali@marvell.com
Fixes: 5911f2d97b07 ("scsi: qla2xxx: Fix Remote port registration")
Cc: stable@vger.kernel.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_nvme.c