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.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index aa605d2012e0..a7fe6b8d38b8 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -143,14 +143,12 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
143 struct fc_rport_priv *rdata, 143 struct fc_rport_priv *rdata,
144 enum fc_rport_event event) 144 enum fc_rport_event event)
145{ 145{
146 struct fc_rport *rport = PRIV_TO_RPORT(rdata);
147
148 FC_LPORT_DBG(lport, "Received a %d event for port (%6x)\n", event, 146 FC_LPORT_DBG(lport, "Received a %d event for port (%6x)\n", event,
149 rport->port_id); 147 rdata->ids.port_id);
150 148
151 switch (event) { 149 switch (event) {
152 case RPORT_EV_CREATED: 150 case RPORT_EV_CREATED:
153 if (rport->port_id == FC_FID_DIR_SERV) { 151 if (rdata->ids.port_id == FC_FID_DIR_SERV) {
154 mutex_lock(&lport->lp_mutex); 152 mutex_lock(&lport->lp_mutex);
155 if (lport->state == LPORT_ST_DNS) { 153 if (lport->state == LPORT_ST_DNS) {
156 lport->dns_rp = rdata; 154 lport->dns_rp = rdata;
@@ -160,7 +158,7 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
160 "on port (%6x) for the directory " 158 "on port (%6x) for the directory "
161 "server, but the lport is not " 159 "server, but the lport is not "
162 "in the DNS state, it's in the " 160 "in the DNS state, it's in the "
163 "%d state", rport->port_id, 161 "%d state", rdata->ids.port_id,
164 lport->state); 162 lport->state);
165 lport->tt.rport_logoff(rdata); 163 lport->tt.rport_logoff(rdata);
166 } 164 }
@@ -168,12 +166,12 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
168 } else 166 } else
169 FC_LPORT_DBG(lport, "Received an event for port (%6x) " 167 FC_LPORT_DBG(lport, "Received an event for port (%6x) "
170 "which is not the directory server\n", 168 "which is not the directory server\n",
171 rport->port_id); 169 rdata->ids.port_id);
172 break; 170 break;
173 case RPORT_EV_LOGO: 171 case RPORT_EV_LOGO:
174 case RPORT_EV_FAILED: 172 case RPORT_EV_FAILED:
175 case RPORT_EV_STOP: 173 case RPORT_EV_STOP:
176 if (rport->port_id == FC_FID_DIR_SERV) { 174 if (rdata->ids.port_id == FC_FID_DIR_SERV) {
177 mutex_lock(&lport->lp_mutex); 175 mutex_lock(&lport->lp_mutex);
178 lport->dns_rp = NULL; 176 lport->dns_rp = NULL;
179 mutex_unlock(&lport->lp_mutex); 177 mutex_unlock(&lport->lp_mutex);
@@ -181,7 +179,7 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
181 } else 179 } else
182 FC_LPORT_DBG(lport, "Received an event for port (%6x) " 180 FC_LPORT_DBG(lport, "Received an event for port (%6x) "
183 "which is not the directory server\n", 181 "which is not the directory server\n",
184 rport->port_id); 182 rdata->ids.port_id);
185 break; 183 break;
186 case RPORT_EV_NONE: 184 case RPORT_EV_NONE:
187 break; 185 break;