diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-08-25 14:01:55 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 12:07:46 -0500 |
commit | 19f97e3c0acc5eb03486044f5428395b7690a01a (patch) | |
tree | 640a956483f932f778706001a3582c79189aa482 /drivers/scsi/libfc/fc_disc.c | |
parent | 48f00902ba40d3e4467782a42258b952437a89f9 (diff) | |
download | linux-stable-19f97e3c0acc5eb03486044f5428395b7690a01a.tar.gz linux-stable-19f97e3c0acc5eb03486044f5428395b7690a01a.tar.bz2 linux-stable-19f97e3c0acc5eb03486044f5428395b7690a01a.zip |
[SCSI] libfc: have rport_create do a lookup for pre-existing rports first
For future discovery patches, change rport_create to return a previously
created rport_priv that has the FC_ID as long as it isn't in deleted state.
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.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index e6b13bfecf73..266aa1ea01e4 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -377,12 +377,9 @@ static int fc_disc_new_target(struct fc_disc *disc, ids->port_id != fc_host_port_id(lport->host) && ids->port_name != lport->wwpn) { if (!rdata) { - rdata = lport->tt.rport_lookup(lport, ids->port_id); - if (!rdata) { - rdata = lport->tt.rport_create(lport, ids); - if (!rdata) - error = -ENOMEM; - } + rdata = lport->tt.rport_create(lport, ids); + if (!rdata) + error = -ENOMEM; } if (rdata) { rdata->ops = &fc_disc_rport_ops; |