Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360244
b: refs/heads/master
c: bb4cf5b
h: refs/heads/master
v: v3
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Feb 22, 2013
1 parent 86d2277 commit 0a9b495
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a11711ad00caebee07e262d188cea66f3473c38
refs/heads/master: bb4cf5b73b47fe78502b16bc3dc4af612aa37ad7
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla2xxx/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ extern uint8_t *qla25xx_read_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
uint32_t);
extern int qla25xx_write_nvram_data(scsi_qla_host_t *, uint8_t *, uint32_t,
uint32_t);
extern int qla2x00_is_a_vp_did(scsi_qla_host_t *, uint32_t);

extern int qla2x00_beacon_on(struct scsi_qla_host *);
extern int qla2x00_beacon_off(struct scsi_qla_host *);
Expand Down
21 changes: 3 additions & 18 deletions trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3368,8 +3368,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
int first_dev, last_dev;
port_id_t wrap = {}, nxt_d_id;
struct qla_hw_data *ha = vha->hw;
struct scsi_qla_host *vp, *base_vha = pci_get_drvdata(ha->pdev);
struct scsi_qla_host *tvp;
struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);

rval = QLA_SUCCESS;

Expand Down Expand Up @@ -3482,22 +3481,8 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha,
continue;

/* Bypass virtual ports of the same host. */
found = 0;
if (ha->num_vhosts) {
unsigned long flags;

spin_lock_irqsave(&ha->vport_slock, flags);
list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
if (new_fcport->d_id.b24 == vp->d_id.b24) {
found = 1;
break;
}
}
spin_unlock_irqrestore(&ha->vport_slock, flags);

if (found)
continue;
}
if (qla2x00_is_a_vp_did(vha, new_fcport->d_id.b24))
continue;

/* Bypass if same domain and area of adapter. */
if (((new_fcport->d_id.b24 & 0xffff00) ==
Expand Down
29 changes: 29 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,31 @@ qla83xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb)
}
}

int
qla2x00_is_a_vp_did(scsi_qla_host_t *vha, uint32_t rscn_entry)
{
struct qla_hw_data *ha = vha->hw;
scsi_qla_host_t *vp;
uint32_t vp_did;
unsigned long flags;
int ret = 0;

if (!ha->num_vhosts)
return ret;

spin_lock_irqsave(&ha->vport_slock, flags);
list_for_each_entry(vp, &ha->vp_list, list) {
vp_did = vp->d_id.b24;
if (vp_did == rscn_entry) {
ret = 1;
break;
}
}
spin_unlock_irqrestore(&ha->vport_slock, flags);

return ret;
}

/**
* qla2x00_async_event() - Process aynchronous events.
* @ha: SCSI driver HA context
Expand Down Expand Up @@ -901,6 +926,10 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
/* Ignore reserved bits from RSCN-payload. */
rscn_entry = ((mb[1] & 0x3ff) << 16) | mb[2];

/* Skip RSCNs for virtual ports on the same physical port */
if (qla2x00_is_a_vp_did(vha, rscn_entry))
break;

atomic_set(&vha->loop_down_timer, 0);
vha->flags.management_server_logged_in = 0;

Expand Down

0 comments on commit 0a9b495

Please sign in to comment.