Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5022
b: refs/heads/master
c: 77d7414
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jul 14, 2005
1 parent 92d3d63 commit 55e8c6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 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: 88c2666351f41a7d4459e79594f687a356f5e57c
refs/heads/master: 77d74143612c1dab6c055dac21f965929ba0a7e6
17 changes: 10 additions & 7 deletions trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,22 +2067,25 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
rport_ids.port_name = be64_to_cpu(*(uint64_t *)fcport->port_name);
rport_ids.port_id = fcport->d_id.b.domain << 16 |
fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa;
rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
fcport->rport = rport = fc_remote_port_add(ha->host, 0, &rport_ids);
if (!rport) {
qla_printk(KERN_WARNING, ha,
"Unable to allocate fc remote port!\n");
return;
}
rport->dd_data = fcport;

rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;
if (fcport->port_type == FCT_INITIATOR)
rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;
if (fcport->port_type == FCT_TARGET)
rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;

fcport->rport = rport = fc_remote_port_add(ha->host, 0, &rport_ids);
if (!rport)
qla_printk(KERN_WARNING, ha,
"Unable to allocate fc remote port!\n");
fc_remote_port_rolechg(rport, rport_ids.roles);

if (rport->scsi_target_id != -1 &&
rport->scsi_target_id < ha->host->max_id)
fcport->os_target_id = rport->scsi_target_id;

rport->dd_data = fcport;
}

/*
Expand Down
16 changes: 1 addition & 15 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,26 +1071,12 @@ qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport)
static int
qla2xxx_slave_alloc(struct scsi_device *sdev)
{
scsi_qla_host_t *ha = to_qla_host(sdev->host);
struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
fc_port_t *fcport;
int found;

if (!rport)
return -ENXIO;

found = 0;
list_for_each_entry(fcport, &ha->fcports, list) {
if (rport->port_name ==
be64_to_cpu(*(uint64_t *)fcport->port_name)) {
found++;
break;
}
}
if (!found)
return -ENXIO;

sdev->hostdata = fcport;
sdev->hostdata = rport->dd_data;

return 0;
}
Expand Down

0 comments on commit 55e8c6b

Please sign in to comment.