Message ID | 20200427214824.6890-1-tyreld@linux.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | ibmvfc: don't send implicit logouts prior to NPIV login | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (54dc28ff5e0b3585224d49a31b53e030342ca5c3) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | warning | total: 2 errors, 5 warnings, 0 checks, 11 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
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;