Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132322
b: refs/heads/master
c: 5101ff9
h: refs/heads/master
v: v3
  • Loading branch information
Robert Love authored and James Bottomley committed Mar 6, 2009
1 parent b5ebebe commit a620f8c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 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: f7db2c150cf5082cf74555f30a1305938041de80
refs/heads/master: 5101ff99f59aefb72e0c96e82aa32048ac9f8425
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static int fc_disc_new_target(struct fc_disc *disc,
dp.ids.port_name = ids->port_name;
dp.ids.node_name = ids->node_name;
dp.ids.roles = ids->roles;
rport = fc_rport_rogue_create(&dp);
rport = lport->tt.rport_create(&dp);
}
if (!rport)
error = -ENOMEM;
Expand Down Expand Up @@ -617,7 +617,7 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)

if ((dp.ids.port_id != fc_host_port_id(lport->host)) &&
(dp.ids.port_name != lport->wwpn)) {
rport = fc_rport_rogue_create(&dp);
rport = lport->tt.rport_create(&dp);
if (rport) {
rdata = rport->dd_data;
rdata->ops = &fc_disc_rport_ops;
Expand Down Expand Up @@ -769,7 +769,7 @@ static void fc_disc_single(struct fc_disc *disc, struct fc_disc_port *dp)
if (rport)
fc_disc_del_target(disc, rport);

new_rport = fc_rport_rogue_create(dp);
new_rport = lport->tt.rport_create(dp);
if (new_rport) {
rdata = new_rport->dd_data;
rdata->ops = &fc_disc_rport_ops;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void fc_lport_ptp_setup(struct fc_lport *lport,
lport->ptp_rp = NULL;
}

lport->ptp_rp = fc_rport_rogue_create(&dp);
lport->ptp_rp = lport->tt.rport_create(&dp);

lport->tt.rport_login(lport->ptp_rp);

Expand Down Expand Up @@ -1282,7 +1282,7 @@ static void fc_lport_enter_dns(struct fc_lport *lport)

fc_lport_state_enter(lport, LPORT_ST_DNS);

rport = fc_rport_rogue_create(&dp);
rport = lport->tt.rport_create(&dp);
if (!rport)
goto err;

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/scsi/libfc/fc_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,9 @@ static void fc_rport_flush_queue(void)

int fc_rport_init(struct fc_lport *lport)
{
if (!lport->tt.rport_create)
lport->tt.rport_create = fc_rport_rogue_create;

if (!lport->tt.rport_login)
lport->tt.rport_login = fc_rport_login;

Expand Down
5 changes: 5 additions & 0 deletions trunk/include/scsi/libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ struct libfc_function_template {
* Remote Port interfaces
*/

/*
* Create a remote port
*/
struct fc_rport *(*rport_create)(struct fc_disc_port *);

/*
* Initiates the RP state machine. It is called from the LP module.
* This function will issue the following commands to the N_Port
Expand Down

0 comments on commit a620f8c

Please sign in to comment.