[SCSI] qla2xxx: Skip RSCN processing on vha if event is global.
authorSantosh Vernekar <santosh.vernekar@qlogic.com>
Fri, 31 Jul 2009 22:09:25 +0000 (15:09 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:52:16 +0000 (17:52 -0500)
The RSCN processing is skipped if the event received is global and vha is not recipient.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_isr.c

index 417a9b9fb19c5da27a6751da86509c11b6392e54..00f23d20a983a6302226eaef883c00091f55506e 100644 (file)
@@ -598,10 +598,26 @@ skip_rio:
                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))
-                       break;
+               /*
+                * 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) {