Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55903b9d authored by Santosh Vernekar's avatar Santosh Vernekar Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Skip RSCN processing on vha if event is global.



The RSCN processing is skipped if the event received is global and vha is not recipient.

Signed-off-by: default avatarSantosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 9764ff88
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -598,10 +598,26 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
		break;

	case MBA_PORT_UPDATE:		/* Port database update */
		/* Only handle SCNs for our Vport index. */
		if (mb[1] != 0xffff &&
		    vha->vp_idx && vha->vp_idx != (mb[3] & 0xff))
		/*
		 * Handle only global and vn-port update events
		 *
		 * Relevant inputs:
		 * mb[1] = N_Port handle of changed port
		 * OR 0xffff for global event
		 * mb[2] = New login state
		 * 7 = Port logged out
		 * mb[3] = LSB is vp_idx, 0xff = all vps
		 *
		 * Skip processing if:
		 *       Event is global, vp_idx is NOT all vps,
		 *           vp_idx does not match
		 *       Event is not global, vp_idx does not match
		 */
		if ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff)
			|| (mb[1] != 0xffff)) {
			if (vha->vp_idx != (mb[3] & 0xff))
				break;
		}

		/* Global event -- port logout or port unavailable. */
		if (mb[1] == 0xffff && mb[2] == 0x7) {