diff options
author | Robert Love <robert.w.love@intel.com> | 2009-02-27 13:55:18 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-06 16:41:01 -0500 |
commit | 5101ff99f59aefb72e0c96e82aa32048ac9f8425 (patch) | |
tree | 83fba57c7cf542eed4466265619632e7d804eb88 /drivers/scsi | |
parent | f7db2c150cf5082cf74555f30a1305938041de80 (diff) |
[SCSI] libfc: Don't violate transport template for rogue port creation
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 6 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 4 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index dd1564c9e04a..15e3f840c049 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -430,7 +430,7 @@ static int fc_disc_new_target(struct fc_disc *disc, | |||
430 | dp.ids.port_name = ids->port_name; | 430 | dp.ids.port_name = ids->port_name; |
431 | dp.ids.node_name = ids->node_name; | 431 | dp.ids.node_name = ids->node_name; |
432 | dp.ids.roles = ids->roles; | 432 | dp.ids.roles = ids->roles; |
433 | rport = fc_rport_rogue_create(&dp); | 433 | rport = lport->tt.rport_create(&dp); |
434 | } | 434 | } |
435 | if (!rport) | 435 | if (!rport) |
436 | error = -ENOMEM; | 436 | error = -ENOMEM; |
@@ -617,7 +617,7 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len) | |||
617 | 617 | ||
618 | if ((dp.ids.port_id != fc_host_port_id(lport->host)) && | 618 | if ((dp.ids.port_id != fc_host_port_id(lport->host)) && |
619 | (dp.ids.port_name != lport->wwpn)) { | 619 | (dp.ids.port_name != lport->wwpn)) { |
620 | rport = fc_rport_rogue_create(&dp); | 620 | rport = lport->tt.rport_create(&dp); |
621 | if (rport) { | 621 | if (rport) { |
622 | rdata = rport->dd_data; | 622 | rdata = rport->dd_data; |
623 | rdata->ops = &fc_disc_rport_ops; | 623 | rdata->ops = &fc_disc_rport_ops; |
@@ -769,7 +769,7 @@ static void fc_disc_single(struct fc_disc *disc, struct fc_disc_port *dp) | |||
769 | if (rport) | 769 | if (rport) |
770 | fc_disc_del_target(disc, rport); | 770 | fc_disc_del_target(disc, rport); |
771 | 771 | ||
772 | new_rport = fc_rport_rogue_create(dp); | 772 | new_rport = lport->tt.rport_create(dp); |
773 | if (new_rport) { | 773 | if (new_rport) { |
774 | rdata = new_rport->dd_data; | 774 | rdata = new_rport->dd_data; |
775 | rdata->ops = &fc_disc_rport_ops; | 775 | rdata->ops = &fc_disc_rport_ops; |
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index e6ea4f119530..07335ae2947c 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -232,7 +232,7 @@ static void fc_lport_ptp_setup(struct fc_lport *lport, | |||
232 | lport->ptp_rp = NULL; | 232 | lport->ptp_rp = NULL; |
233 | } | 233 | } |
234 | 234 | ||
235 | lport->ptp_rp = fc_rport_rogue_create(&dp); | 235 | lport->ptp_rp = lport->tt.rport_create(&dp); |
236 | 236 | ||
237 | lport->tt.rport_login(lport->ptp_rp); | 237 | lport->tt.rport_login(lport->ptp_rp); |
238 | 238 | ||
@@ -1282,7 +1282,7 @@ static void fc_lport_enter_dns(struct fc_lport *lport) | |||
1282 | 1282 | ||
1283 | fc_lport_state_enter(lport, LPORT_ST_DNS); | 1283 | fc_lport_state_enter(lport, LPORT_ST_DNS); |
1284 | 1284 | ||
1285 | rport = fc_rport_rogue_create(&dp); | 1285 | rport = lport->tt.rport_create(&dp); |
1286 | if (!rport) | 1286 | if (!rport) |
1287 | goto err; | 1287 | goto err; |
1288 | 1288 | ||
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 600a8fffa940..81b3ca188789 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -1271,6 +1271,9 @@ static void fc_rport_flush_queue(void) | |||
1271 | 1271 | ||
1272 | int fc_rport_init(struct fc_lport *lport) | 1272 | int fc_rport_init(struct fc_lport *lport) |
1273 | { | 1273 | { |
1274 | if (!lport->tt.rport_create) | ||
1275 | lport->tt.rport_create = fc_rport_rogue_create; | ||
1276 | |||
1274 | if (!lport->tt.rport_login) | 1277 | if (!lport->tt.rport_login) |
1275 | lport->tt.rport_login = fc_rport_login; | 1278 | lport->tt.rport_login = fc_rport_login; |
1276 | 1279 | ||