aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/libfc/fc_disc.c
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-08-25 14:01:50 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 12:07:46 -0500
commit48f00902ba40d3e4467782a42258b952437a89f9 (patch)
tree9559e9a92cadd9988ff32940358c8b6d9dee5140 /drivers/scsi/libfc/fc_disc.c
parentb5cbf083736e14911c32fca2a93c540a92e8413d (diff)
[SCSI] libfc: make rport module maintain the rport list
The list of remote ports (struct fc_rport_priv) has been maintained by the discovery module. In preparation for having lport->tt.rport_create() do a lookup first, maintain the rports list in the rport module. It will still be protected by the disc_mutex. The DNS rport is an exception for until after further patches. For now, do not add it to the list. The point-to-point rport will be in the discovery list. So at shutdown, it doesn't need to be separately logged out. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_disc.c')
-rw-r--r--drivers/scsi/libfc/fc_disc.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 8427396909e..e6b13bfecf7 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -115,9 +115,6 @@ static void fc_disc_rport_callback(struct fc_lport *lport,
case RPORT_EV_LOGO:
case RPORT_EV_FAILED:
case RPORT_EV_STOP:
- mutex_lock(&disc->disc_mutex);
- list_del(&rdata->peers);
- mutex_unlock(&disc->disc_mutex);
break;
default:
break;
@@ -385,9 +382,6 @@ static int fc_disc_new_target(struct fc_disc *disc,
rdata = lport->tt.rport_create(lport, ids);
if (!rdata)
error = -ENOMEM;
- else
- list_add_tail(&rdata->peers,
- &disc->rports);
}
}
if (rdata) {
@@ -562,7 +556,6 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)
rdata = lport->tt.rport_create(lport, &ids);
if (rdata) {
rdata->ops = &fc_disc_rport_ops;
- list_add_tail(&rdata->peers, &disc->rports);
lport->tt.rport_login(rdata);
} else
printk(KERN_WARNING "libfc: Failed to allocate "
@@ -709,7 +702,6 @@ static void fc_disc_single(struct fc_disc *disc, struct fc_disc_port *dp)
if (rdata) {
rdata->ops = &fc_disc_rport_ops;
kfree(dp);
- list_add_tail(&rdata->peers, &disc->rports);
lport->tt.rport_login(rdata);
}
return;