aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2013-02-08 01:58:01 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-02-22 09:31:24 -0500
commitbb4cf5b73b47fe78502b16bc3dc4af612aa37ad7 (patch)
tree52571a3d3ea98c29762ef03bd9fbe25ced7b8c86 /drivers/scsi/qla2xxx/qla_init.c
parent3a11711ad00caebee07e262d188cea66f3473c38 (diff)
[SCSI] qla2xxx: Don't process RSCNs for a vport on the same physical adapter.
Currently,the driver is processes RSCNs for each new NPIV ports that is created. Processing the RSCN includes a name server query to see what has changed at the name server side. The name server query is performed by the physical port and each virtual port on the physical adapter (since the RSCN is passed to each virtual port for processing). As the number of virtual ports being created increases, this causes a lot of traffic and busies the firmware. Processing the RSCN for a virtual port we already have a priori knowledge of is not necessary so check the 24-bit fabric ID of the RSCN entry and skip processing it if the RSCN is for a virtual port we already know about. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 891b8f1c03e9..a1e584842b85 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3368,8 +3368,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
3368 int first_dev, last_dev; 3368 int first_dev, last_dev;
3369 port_id_t wrap = {}, nxt_d_id; 3369 port_id_t wrap = {}, nxt_d_id;
3370 struct qla_hw_data *ha = vha->hw; 3370 struct qla_hw_data *ha = vha->hw;
3371 struct scsi_qla_host *vp, *base_vha = pci_get_drvdata(ha->pdev); 3371 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
3372 struct scsi_qla_host *tvp;
3373 3372
3374 rval = QLA_SUCCESS; 3373 rval = QLA_SUCCESS;
3375 3374
@@ -3482,22 +3481,8 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
3482 continue; 3481 continue;
3483 3482
3484 /* Bypass virtual ports of the same host. */ 3483 /* Bypass virtual ports of the same host. */
3485 found = 0; 3484 if (qla2x00_is_a_vp_did(vha, new_fcport->d_id.b24))
3486 if (ha->num_vhosts) { 3485 continue;
3487 unsigned long flags;
3488
3489 spin_lock_irqsave(&ha->vport_slock, flags);
3490 list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
3491 if (new_fcport->d_id.b24 == vp->d_id.b24) {
3492 found = 1;
3493 break;
3494 }
3495 }
3496 spin_unlock_irqrestore(&ha->vport_slock, flags);
3497
3498 if (found)
3499 continue;
3500 }
3501 3486
3502 /* Bypass if same domain and area of adapter. */ 3487 /* Bypass if same domain and area of adapter. */
3503 if (((new_fcport->d_id.b24 & 0xffff00) == 3488 if (((new_fcport->d_id.b24 & 0xffff00) ==