aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_rport.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r--drivers/scsi/libfc/fc_rport.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 5f8f437e76b3..2fbc94aaf343 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -93,7 +93,8 @@ static void fc_rport_rogue_destroy(struct device *dev)
93 kfree(rport); 93 kfree(rport);
94} 94}
95 95
96struct fc_rport *fc_rport_rogue_create(struct fc_disc_port *dp) 96struct fc_rport *fc_rport_rogue_create(struct fc_lport *lport,
97 struct fc_rport_identifiers *ids)
97{ 98{
98 struct fc_rport *rport; 99 struct fc_rport *rport;
99 struct fc_rport_priv *rdata; 100 struct fc_rport_priv *rdata;
@@ -105,10 +106,10 @@ struct fc_rport *fc_rport_rogue_create(struct fc_disc_port *dp)
105 rdata = RPORT_TO_PRIV(rport); 106 rdata = RPORT_TO_PRIV(rport);
106 107
107 rport->dd_data = rdata; 108 rport->dd_data = rdata;
108 rport->port_id = dp->ids.port_id; 109 rport->port_id = ids->port_id;
109 rport->port_name = dp->ids.port_name; 110 rport->port_name = ids->port_name;
110 rport->node_name = dp->ids.node_name; 111 rport->node_name = ids->node_name;
111 rport->roles = dp->ids.roles; 112 rport->roles = ids->roles;
112 rport->maxframe_size = FC_MIN_MAX_PAYLOAD; 113 rport->maxframe_size = FC_MIN_MAX_PAYLOAD;
113 /* 114 /*
114 * Note: all this libfc rogue rport code will be removed for 115 * Note: all this libfc rogue rport code will be removed for
@@ -118,14 +119,14 @@ struct fc_rport *fc_rport_rogue_create(struct fc_disc_port *dp)
118 rport->dev.release = fc_rport_rogue_destroy; 119 rport->dev.release = fc_rport_rogue_destroy;
119 120
120 mutex_init(&rdata->rp_mutex); 121 mutex_init(&rdata->rp_mutex);
121 rdata->local_port = dp->lp; 122 rdata->local_port = lport;
122 rdata->trans_state = FC_PORTSTATE_ROGUE; 123 rdata->trans_state = FC_PORTSTATE_ROGUE;
123 rdata->rp_state = RPORT_ST_INIT; 124 rdata->rp_state = RPORT_ST_INIT;
124 rdata->event = RPORT_EV_NONE; 125 rdata->event = RPORT_EV_NONE;
125 rdata->flags = FC_RP_FLAGS_REC_SUPPORTED; 126 rdata->flags = FC_RP_FLAGS_REC_SUPPORTED;
126 rdata->ops = NULL; 127 rdata->ops = NULL;
127 rdata->e_d_tov = dp->lp->e_d_tov; 128 rdata->e_d_tov = lport->e_d_tov;
128 rdata->r_a_tov = dp->lp->r_a_tov; 129 rdata->r_a_tov = lport->r_a_tov;
129 INIT_DELAYED_WORK(&rdata->retry_work, fc_rport_timeout); 130 INIT_DELAYED_WORK(&rdata->retry_work, fc_rport_timeout);
130 INIT_WORK(&rdata->event_work, fc_rport_work); 131 INIT_WORK(&rdata->event_work, fc_rport_work);
131 /* 132 /*