Message ID | 20200427214824.6890-1-tyreld@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | ibmvfc: don't send implicit logouts prior to NPIV login | expand |
Tyrel, > Commit ed830385a2b1 ("scsi: ibmvfc: Avoid loss of all paths during SVC > node reboot") introduced a regression where when the client resets or > re-enables its CRQ with the hypervisor there is a chance that if the > server side doesn't issue its INIT handshake quick enough the client > can issue an Implicit Logout prior to doing an NPIV Login. The server > treats this scenario as a protocol violation and closes the CRQ on its > end forcing the client through a reset that gets the client host state > and next host action out of agreement leading to a BUG assert. Applied to 5.7/scsi-fixes, thanks!
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 7da9e060b270..2b1326d6dd1f 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -3640,6 +3640,11 @@ static void ibmvfc_tgt_implicit_logout_and_del(struct ibmvfc_target *tgt) struct ibmvfc_host *vhost = tgt->vhost; struct ibmvfc_event *evt; + if (!vhost->logged_in) { + ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT); + return; + } + if (vhost->discovery_threads >= disc_threads) return;