diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-15 20:59:29 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-15 20:59:29 -0200 |
commit | f1dccedc8148026d9071c6805f7cb77374a9e56f (patch) | |
tree | ba4a630084b8d21309930321ff53a6ed4381c0f3 /drivers/scsi/scsi_transport_fc.c | |
parent | c943aa859c392eb4cc76d911daa1f261555075b2 (diff) | |
parent | 0238cb4e7583c521bb3538060f98a73e65f61324 (diff) | |
download | op-kernel-dev-f1dccedc8148026d9071c6805f7cb77374a9e56f.zip op-kernel-dev-f1dccedc8148026d9071c6805f7cb77374a9e56f.tar.gz |
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/scsi/scsi_transport_fc.c')
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 685b997..f2c9acf 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -295,6 +295,7 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, */ fc_host_node_name(shost) = -1; fc_host_port_name(shost) = -1; + fc_host_permanent_port_name(shost) = -1; fc_host_supported_classes(shost) = FC_COS_UNSPECIFIED; memset(fc_host_supported_fc4s(shost), 0, sizeof(fc_host_supported_fc4s(shost))); @@ -795,6 +796,8 @@ static FC_CLASS_DEVICE_ATTR(host, supported_speeds, S_IRUGO, fc_private_host_rd_attr_cast(node_name, "0x%llx\n", 20, unsigned long long); fc_private_host_rd_attr_cast(port_name, "0x%llx\n", 20, unsigned long long); +fc_private_host_rd_attr_cast(permanent_port_name, "0x%llx\n", 20, + unsigned long long); fc_private_host_rd_attr(symbolic_name, "%s\n", (FC_SYMBOLIC_NAME_SIZE +1)); fc_private_host_rd_attr(maxframe_size, "%u bytes\n", 20); fc_private_host_rd_attr(serial_number, "%s\n", (FC_SERIAL_NUMBER_SIZE +1)); @@ -1090,17 +1093,23 @@ static int fc_rport_match(struct attribute_container *cont, /* * Must be called with shost->host_lock held */ -static struct device *fc_target_parent(struct Scsi_Host *shost, - int channel, uint id) +static int fc_user_scan(struct Scsi_Host *shost, uint channel, + uint id, uint lun) { struct fc_rport *rport; - list_for_each_entry(rport, &fc_host_rports(shost), peers) - if ((rport->channel == channel) && - (rport->scsi_target_id == id)) - return &rport->dev; + list_for_each_entry(rport, &fc_host_rports(shost), peers) { + if (rport->scsi_target_id == -1) + continue; - return NULL; + if ((channel == SCAN_WILD_CARD || channel == rport->channel) && + (id == SCAN_WILD_CARD || id == rport->scsi_target_id)) { + scsi_scan_target(&rport->dev, rport->channel, + rport->scsi_target_id, lun, 1); + } + } + + return 0; } struct scsi_transport_template * @@ -1139,7 +1148,7 @@ fc_attach_transport(struct fc_function_template *ft) /* Transport uses the shost workq for scsi scanning */ i->t.create_work_queue = 1; - i->t.target_parent = fc_target_parent; + i->t.user_scan = fc_user_scan; /* * Setup SCSI Target Attributes. @@ -1160,6 +1169,7 @@ fc_attach_transport(struct fc_function_template *ft) count=0; SETUP_HOST_ATTRIBUTE_RD(node_name); SETUP_HOST_ATTRIBUTE_RD(port_name); + SETUP_HOST_ATTRIBUTE_RD(permanent_port_name); SETUP_HOST_ATTRIBUTE_RD(supported_classes); SETUP_HOST_ATTRIBUTE_RD(supported_fc4s); SETUP_HOST_ATTRIBUTE_RD(symbolic_name); |