aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_lport.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r--drivers/scsi/libfc/fc_lport.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 7000df573691..caf68240bddf 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -198,17 +198,12 @@ static void fc_lport_ptp_setup(struct fc_lport *lport,
198 u32 remote_fid, u64 remote_wwpn, 198 u32 remote_fid, u64 remote_wwpn,
199 u64 remote_wwnn) 199 u64 remote_wwnn)
200{ 200{
201 struct fc_rport_identifiers ids;
202
203 ids.port_id = remote_fid;
204 ids.port_name = remote_wwpn;
205 ids.node_name = remote_wwnn;
206 ids.roles = FC_RPORT_ROLE_UNKNOWN;
207
208 mutex_lock(&lport->disc.disc_mutex); 201 mutex_lock(&lport->disc.disc_mutex);
209 if (lport->ptp_rp) 202 if (lport->ptp_rp)
210 lport->tt.rport_logoff(lport->ptp_rp); 203 lport->tt.rport_logoff(lport->ptp_rp);
211 lport->ptp_rp = lport->tt.rport_create(lport, &ids); 204 lport->ptp_rp = lport->tt.rport_create(lport, remote_fid);
205 lport->ptp_rp->ids.port_name = remote_wwpn;
206 lport->ptp_rp->ids.node_name = remote_wwnn;
212 mutex_unlock(&lport->disc.disc_mutex); 207 mutex_unlock(&lport->disc.disc_mutex);
213 208
214 lport->tt.rport_login(lport->ptp_rp); 209 lport->tt.rport_login(lport->ptp_rp);
@@ -1287,12 +1282,6 @@ static struct fc_rport_operations fc_lport_rport_ops = {
1287static void fc_lport_enter_dns(struct fc_lport *lport) 1282static void fc_lport_enter_dns(struct fc_lport *lport)
1288{ 1283{
1289 struct fc_rport_priv *rdata; 1284 struct fc_rport_priv *rdata;
1290 struct fc_rport_identifiers ids;
1291
1292 ids.port_id = FC_FID_DIR_SERV;
1293 ids.port_name = -1;
1294 ids.node_name = -1;
1295 ids.roles = FC_RPORT_ROLE_UNKNOWN;
1296 1285
1297 FC_LPORT_DBG(lport, "Entered DNS state from %s state\n", 1286 FC_LPORT_DBG(lport, "Entered DNS state from %s state\n",
1298 fc_lport_state(lport)); 1287 fc_lport_state(lport));
@@ -1300,7 +1289,7 @@ static void fc_lport_enter_dns(struct fc_lport *lport)
1300 fc_lport_state_enter(lport, LPORT_ST_DNS); 1289 fc_lport_state_enter(lport, LPORT_ST_DNS);
1301 1290
1302 mutex_lock(&lport->disc.disc_mutex); 1291 mutex_lock(&lport->disc.disc_mutex);
1303 rdata = lport->tt.rport_create(lport, &ids); 1292 rdata = lport->tt.rport_create(lport, FC_FID_DIR_SERV);
1304 mutex_unlock(&lport->disc.disc_mutex); 1293 mutex_unlock(&lport->disc.disc_mutex);
1305 if (!rdata) 1294 if (!rdata)
1306 goto err; 1295 goto err;