Commit f4a8dbc7 authored by Shyam Sundar's avatar Shyam Sundar Committed by James Bottomley

[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: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent eb66dc60
...@@ -575,12 +575,15 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) ...@@ -575,12 +575,15 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
/* Check if the Vport has issued a SCR */ /* Check if the Vport has issued a SCR */
if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags)) if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags))
break; break;
/* Only handle SCNs for our Vport index. */
if (ha->flags.npiv_supported && ha->vp_idx != mb[3])
break;
DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n", DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n",
ha->host_no)); ha->host_no));
DEBUG(printk(KERN_INFO DEBUG(printk(KERN_INFO
"scsi(%ld): RSCN database changed -- %04x %04x.\n", "scsi(%ld): RSCN database changed -- %04x %04x %04x.\n",
ha->host_no, mb[1], mb[2])); ha->host_no, mb[1], mb[2], mb[3]));
rscn_entry = (mb[1] << 16) | mb[2]; rscn_entry = (mb[1] << 16) | mb[2];
host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) | host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment