aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyam Sundar <shyam.sundar@qlogic.com>2007-11-12 13:30:59 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:45 -0500
commitf4a8dbc7f6ca8c0a7ec4f112320899b6b77d7e17 (patch)
treea54baadb6dc47d7a0ff9133cbbdca5521541c514
parenteb66dc60be5a72bc940458a5adfd400e4d810d49 (diff)
[SCSI] qla2xxx: Properly handle Vport state-change-notifications.
Drivers do SCRs for each Vport. When something changes in the fabric, firmware generates one interrupt for each RSCN. Based on the current implementation, in each case, we make recursive calls to handle RSCN for physical and each subsequent virtual ports. The fix is to also take into consideration the vp_idx, which is set by the firmware to indicate the vport the RSCN was meant for. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 343af399c95c..798b7e87e2e1 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -575,12 +575,15 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
575 /* Check if the Vport has issued a SCR */ 575 /* Check if the Vport has issued a SCR */
576 if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags)) 576 if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags))
577 break; 577 break;
578 /* Only handle SCNs for our Vport index. */
579 if (ha->flags.npiv_supported && ha->vp_idx != mb[3])
580 break;
578 581
579 DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n", 582 DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n",
580 ha->host_no)); 583 ha->host_no));
581 DEBUG(printk(KERN_INFO 584 DEBUG(printk(KERN_INFO
582 "scsi(%ld): RSCN database changed -- %04x %04x.\n", 585 "scsi(%ld): RSCN database changed -- %04x %04x %04x.\n",
583 ha->host_no, mb[1], mb[2])); 586 ha->host_no, mb[1], mb[2], mb[3]));
584 587
585 rscn_entry = (mb[1] << 16) | mb[2]; 588 rscn_entry = (mb[1] << 16) | mb[2];
586 host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) | 589 host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) |