frame = mempool_alloc(fnic->frame_pool, GFP_ATOMIC);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame");
return NULL;
}
*/
idx = find_next_zero_bit(oxid_pool->bitmap, FNIC_OXID_POOL_SZ, oxid_pool->next_idx);
if (idx == FNIC_OXID_POOL_SZ) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Alloc oxid: all oxid slots are busy iport state:%d\n",
iport->state);
return FNIC_UNASSIGNED_OXID;
oxid = FNIC_OXID_ENCODE(idx, oxid_frame_type);
*active_oxid = oxid;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"alloc oxid: 0x%x, iport state: %d\n",
oxid, iport->state);
return oxid;
lockdep_assert_held(&fnic->fnic_lock);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"free oxid idx: 0x%x\n", oxid_idx);
WARN_ON(!test_and_clear_bit(oxid_idx, oxid_pool->bitmap));
struct reclaim_entry_s *reclaim_entry, *next;
unsigned long delay_j, cur_jiffies;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Reclaim oxid callback\n");
spin_lock_irqsave(&fnic->fnic_lock, fnic->lock_flags);
delay_j = reclaim_entry->expires - cur_jiffies;
schedule_delayed_work(&oxid_pool->oxid_reclaim_work, delay_j);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Scheduling next callback at:%ld jiffies\n", delay_j);
}
lockdep_assert_held(&fnic->fnic_lock);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Schedule oxid free. oxid: 0x%x\n", *active_oxid);
*active_oxid = FNIC_UNASSIGNED_OXID;
kzalloc(sizeof(struct reclaim_entry_s), GFP_ATOMIC);
if (!reclaim_entry) {
- FNIC_FCS_DBG(KERN_WARNING, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_WARNING, fnic->host, fnic->fnic_num,
"Failed to allocate memory for reclaim struct for oxid idx: %d\n",
oxid_idx);
for_each_set_bit(idx, oxid_pool->pending_schedule_free, FNIC_OXID_POOL_SZ) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Schedule oxid free. oxid idx: %d\n", idx);
spin_unlock_irqrestore(&fnic->fnic_lock, fnic->lock_flags);
spin_lock_irqsave(&fnic->fnic_lock, fnic->lock_flags);
if (!reclaim_entry) {
- FNIC_FCS_DBG(KERN_WARNING, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_WARNING, fnic->host, fnic->fnic_num,
"Failed to allocate memory for reclaim struct for oxid idx: 0x%x\n",
idx);
struct fnic *fnic = iport->fnic;
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x: Canceling fabric disc timer\n",
iport->fcid);
fnic_del_fabric_timer_sync(fnic);
fabric_tov = jiffies + msecs_to_jiffies(timeout);
mod_timer(&iport->fabric.retry_timer, round_jiffies(fabric_tov));
iport->fabric.timer_pending = 1;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fabric timer is %d ", timeout);
}
struct fnic *fnic = iport->fnic;
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid 0x%x: Canceling disc timer\n",
tport->fcid);
fnic_del_tport_timer_sync(fnic, tport);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send RSCN response");
return;
}
oxid = FNIC_STD_GET_OX_ID(rscn_fchdr);
FNIC_STD_SET_OX_ID(pels_acc->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send RSCN response with oxid: 0x%x",
iport->fcid, oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send LOGO response");
return;
}
oxid = FNIC_STD_GET_OX_ID(req_fchdr);
FNIC_STD_SET_OX_ID(plogo_resp->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send LOGO response with oxid: 0x%x",
iport->fcid, oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send tport ABTS");
return;
}
FNIC_STD_SET_OX_ID(*ptport_abts, tport->active_oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send tport abts: tport->state: %d ",
iport->fcid, tport->state);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send fabric ABTS");
return;
}
oxid = iport->active_oxid_fabric_req;
FNIC_STD_SET_OX_ID(*pfabric_abts, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send fabric abts. iport->fabric.state: %d oxid: 0x%x",
iport->fcid, iport->fabric.state, oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send FDMI ABTS");
return;
}
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send FLOGI");
iport->fabric.flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send FLOGI",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(pflogi->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send fabric FLOGI with oxid: 0x%x", iport->fcid,
oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send PLOGI");
iport->fabric.flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
oxid = fdls_alloc_oxid(iport, FNIC_FRAME_TYPE_FABRIC_PLOGI,
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send fabric PLOGI",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(pplogi->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send fabric PLOGI with oxid: 0x%x", iport->fcid,
oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send FDMI PLOGI");
goto err_out;
}
&iport->active_oxid_fdmi_plogi);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send FDMI PLOGI",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
hton24(d_id, FC_FID_MGMT_SERV);
FNIC_STD_SET_D_ID(pplogi->fchdr, d_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send FDMI PLOGI with oxid: 0x%x",
iport->fcid, oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send RPN_ID");
iport->fabric.flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send RPN_ID",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(prpn_id->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send RPN ID with oxid: 0x%x", iport->fcid,
oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send SCR");
iport->fabric.flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
oxid = fdls_alloc_oxid(iport, FNIC_FRAME_TYPE_FABRIC_SCR,
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send SCR",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(pscr->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send SCR with oxid: 0x%x", iport->fcid,
oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send GPN FT");
iport->fabric.flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send GPN FT",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(pgpn_ft->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send GPN FT with oxid: 0x%x", iport->fcid,
oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send TGT ADISC");
tport->flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
oxid = fdls_alloc_oxid(iport, FNIC_FRAME_TYPE_TGT_ADISC, &tport->active_oxid);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send TGT ADISC",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
padisc->els.adisc_cmd = ELS_ADISC;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send ADISC to tgt fcid: 0x%x",
iport->fcid, tport->fcid);
if ((tport->state == FDLS_TGT_STATE_OFFLINING)
|| (tport->state == FDLS_TGT_STATE_OFFLINE)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid 0x%x: tport state is offlining/offline\n",
tport->fcid);
return false;
tport->flags |= FNIC_FDLS_TPORT_TERMINATING;
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid 0x%x: Canceling disc timer\n",
tport->fcid);
fnic_del_tport_timer_sync(fnic, tport);
tport_del_evt =
kzalloc(sizeof(struct fnic_tport_event_s), GFP_ATOMIC);
if (!tport_del_evt) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Failed to allocate memory for tport fcid: 0x%0x\n",
tport->fcid);
return false;
list_add_tail(&tport_del_evt->links, &fnic->tport_event_list);
queue_work(fnic_event_queue, &fnic->tport_work);
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport 0x%x not reg with scsi_transport. Freeing locally",
tport->fcid);
list_del(&tport->links);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send TGT PLOGI");
tport->flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
oxid = fdls_alloc_oxid(iport, FNIC_FRAME_TYPE_TGT_PLOGI, &tport->active_oxid);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate oxid to send PLOGI to fcid: 0x%x",
iport->fcid, tport->fcid);
mempool_free(frame, fnic->frame_pool);
hton24(d_id, tport->fcid);
FNIC_STD_SET_D_ID(pplogi->fchdr, d_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send tgt PLOGI to tgt: 0x%x with oxid: 0x%x",
iport->fcid, tport->fcid, oxid);
be16_to_cpu(plogi_rsp->els.fl_cssp[2].cp_rdfs) & FNIC_FC_C3_RDF;
struct fnic *fnic = iport->fnic;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"MFS: b2b_rdf_size: 0x%x spc3_rdf_size: 0x%x",
b2b_rdf_size, spc3_rdf_size);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send RFT");
return;
}
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send RFT",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(prft_id->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send RFT with oxid: 0x%x", iport->fcid,
oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send RFF");
return;
}
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send RFF",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
}
FNIC_STD_SET_OX_ID(prff_id->fchdr, oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send RFF with oxid: 0x%x", iport->fcid,
oxid);
if (IS_FNIC_FCP_INITIATOR(fnic)) {
prff_id->rff_id.fr_type = FC_TYPE_FCP;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Unknown type", iport->fcid);
}
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send TGT PRLI");
tport->flags |= FNIC_FDLS_RETRY_FRAME;
goto err_out;
oxid = fdls_alloc_oxid(iport, FNIC_FRAME_TYPE_TGT_PRLI, &tport->active_oxid);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send TGT PRLI to 0x%x",
iport->fcid, tport->fcid);
mempool_free(frame, fnic->frame_pool);
FNIC_STD_SET_S_ID(pprli->fchdr, s_id);
FNIC_STD_SET_D_ID(pprli->fchdr, d_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send PRLI to tgt: 0x%x with oxid: 0x%x",
iport->fcid, tport->fcid, oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send fabric LOGO");
return;
}
&iport->active_oxid_fabric_req);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send fabric LOGO",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
iport->fabric.flags &= ~FNIC_FDLS_FABRIC_ABORT_ISSUED;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send fabric LOGO with oxid: 0x%x",
iport->fcid, oxid);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send fabric LOGO");
return;
}
oxid = fdls_alloc_oxid(iport, FNIC_FRAME_TYPE_TGT_LOGO, &tport->active_oxid);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send tgt LOGO",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
hton24(d_id, tport->fcid);
FNIC_STD_SET_D_ID(plogo->fchdr, d_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send tgt LOGO with oxid: 0x%x",
iport->fcid, oxid);
u32 old_link_down_cnt = iport->fnic->link_down_cnt;
struct fnic *fnic = iport->fnic;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Starting FDLS target discovery", iport->fcid);
list_for_each_entry_safe(tport, next, &iport->tport_list, links) {
struct fnic *fnic = iport->fnic;
bool retval = true;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid: 0x%x state: %d restart_count: %d",
tport->fcid, tport->state, tport->nexus_restart_count);
retval = fdls_delete_tport(iport, tport);
if (retval != true) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Error deleting tport: 0x%x", fcid);
return;
}
if (nexus_restart_count >= FNIC_TPORT_MAX_NEXUS_RESTART) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Exceeded nexus restart retries tport: 0x%x",
fcid);
return;
*/
new_tport = fdls_create_tport(iport, fcid, wwpn);
if (!new_tport) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Error creating new tport: 0x%x", fcid);
return;
}
struct fnic_tport_s *tport;
struct fnic *fnic = iport->fnic;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS create tport: fcid: 0x%x wwpn: 0x%llx", fcid, wwpn);
tport = kzalloc(sizeof(struct fnic_tport_s), GFP_ATOMIC);
if (!tport) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Memory allocation failure while creating tport: 0x%x\n",
fcid);
return NULL;
tport->wwpn = wwpn;
tport->iport = iport;
- FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Need to setup tport timer callback");
timer_setup(&tport->retry_timer, fdls_tport_timer_callback, 0);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Added tport 0x%x", tport->fcid);
fdls_set_tport_state(tport, FDLS_TGT_STATE_INIT);
list_add_tail(&tport->links, &iport->tport_list);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send FDMI RHBA");
return;
}
&iport->active_oxid_fdmi_rhba);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send FDMI RHBA",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_NODE_NAME,
FNIC_FDMI_NN_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"NN set, off=%d", attr_off_bytes);
strscpy_pad(data, FNIC_FDMI_MANUFACTURER, FNIC_FDMI_MANU_LEN);
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_MANUFACTURER,
FNIC_FDMI_MANU_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"MFG set <%s>, off=%d", data, attr_off_bytes);
err = vnic_dev_fw_info(fnic->vdev, &fw_info);
FNIC_FDMI_SERIAL_LEN);
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_SERIAL_NUMBER,
FNIC_FDMI_SERIAL_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"SERIAL set <%s>, off=%d", data, attr_off_bytes);
}
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_MODEL, FNIC_FDMI_MODEL_LEN,
data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"MODEL set <%s>, off=%d", data, attr_off_bytes);
strscpy_pad(data, FNIC_FDMI_MODEL_DESCRIPTION, FNIC_FDMI_MODEL_DES_LEN);
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_MODEL_DES,
FNIC_FDMI_MODEL_DES_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"MODEL_DESC set <%s>, off=%d", data, attr_off_bytes);
if (!err) {
strscpy_pad(data, fw_info->hw_version, FNIC_FDMI_HW_VER_LEN);
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_HARDWARE_VERSION,
FNIC_FDMI_HW_VER_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"HW_VER set <%s>, off=%d", data, attr_off_bytes);
}
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_DRIVER_VERSION,
FNIC_FDMI_DR_VER_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"DRV_VER set <%s>, off=%d", data, attr_off_bytes);
strscpy_pad(data, "N/A", FNIC_FDMI_ROM_VER_LEN);
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_ROM_VERSION,
FNIC_FDMI_ROM_VER_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ROM_VER set <%s>, off=%d", data, attr_off_bytes);
if (!err) {
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_FIRMWARE_VERSION,
FNIC_FDMI_FW_VER_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FW_VER set <%s>, off=%d", data, attr_off_bytes);
}
len = sizeof(struct fc_std_fdmi_rhba) + attr_off_bytes;
frame_size += len;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send FDMI RHBA with oxid: 0x%x fs: %d", iport->fcid,
oxid, frame_size);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send FDMI RPA");
return;
}
&iport->active_oxid_fdmi_rpa);
if (oxid == FNIC_UNASSIGNED_OXID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate OXID to send FDMI RPA",
iport->fcid);
mempool_free(frame, fnic->frame_pool);
FNIC_FDMI_MFS_LEN, data, &attr_off_bytes);
snprintf(tmp_data, FNIC_FDMI_OS_NAME_LEN - 1, "host%d",
- fnic->lport->host->host_no);
+ fnic->host->host_no);
strscpy_pad(data, tmp_data, FNIC_FDMI_OS_NAME_LEN);
data[FNIC_FDMI_OS_NAME_LEN - 1] = 0;
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_OS_NAME,
FNIC_FDMI_OS_NAME_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"OS name set <%s>, off=%d", data, attr_off_bytes);
- sprintf(fc_host_system_hostname(fnic->lport->host), "%s", utsname()->nodename);
- strscpy_pad(data, fc_host_system_hostname(fnic->lport->host),
+ sprintf(fc_host_system_hostname(fnic->host), "%s", utsname()->nodename);
+ strscpy_pad(data, fc_host_system_hostname(fnic->host),
FNIC_FDMI_HN_LEN);
data[FNIC_FDMI_HN_LEN - 1] = 0;
fnic_fdmi_attr_set(fdmi_attr, FNIC_FDMI_TYPE_HOST_NAME,
FNIC_FDMI_HN_LEN, data, &attr_off_bytes);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Host name set <%s>, off=%d", data, attr_off_bytes);
len = sizeof(struct fc_std_fdmi_rpa) + attr_off_bytes;
frame_size += len;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send FDMI RPA with oxid: 0x%x fs: %d", iport->fcid,
oxid, frame_size);
struct fnic *fnic = iport->fnic;
unsigned long flags;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tp: %d fab state: %d fab retry counter: %d max_flogi_retries: %d",
iport->fabric.timer_pending, iport->fabric.state,
iport->fabric.retry_counter, iport->max_flogi_retries);
if (iport->fabric.del_timer_inprogress) {
iport->fabric.del_timer_inprogress = 0;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fabric_del_timer inprogress(%d). Skip timer cb",
iport->fabric.del_timer_inprogress);
return;
iport->fabric.flags &= ~FNIC_FDLS_FABRIC_ABORT_ISSUED;
fdls_send_fabric_flogi(iport);
} else
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Exceeded max FLOGI retries");
}
break;
iport->fabric.flags &= ~FNIC_FDLS_FABRIC_ABORT_ISSUED;
fdls_send_fabric_plogi(iport);
} else
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Exceeded max PLOGI retries");
}
break;
else {
/* ABTS has timed out */
fdls_schedule_oxid_free(iport, &iport->active_oxid_fabric_req);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ABTS timed out. Starting PLOGI: %p", iport);
fnic_fdls_start_plogi(iport);
}
} else {
/* ABTS has timed out */
fdls_schedule_oxid_free(iport, &iport->active_oxid_fabric_req);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ABTS timed out. Starting PLOGI: %p", iport);
fnic_fdls_start_plogi(iport); /* go back to fabric Plogi */
}
else {
/* ABTS has timed out */
fdls_schedule_oxid_free(iport, &iport->active_oxid_fabric_req);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ABTS timed out. Starting PLOGI %p", iport);
fnic_fdls_start_plogi(iport); /* go back to fabric Plogi */
}
if (iport->fabric.retry_counter < FDLS_RETRY_COUNT) {
fdls_send_gpn_ft(iport, iport->fabric.state);
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ABTS timeout for fabric GPN_FT. Check name server: %p",
iport);
}
spin_lock_irqsave(&fnic->fnic_lock, flags);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
if (!iport->fabric.fdmi_pending) {
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
return;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
/* if not abort pending, send an abort */
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
return;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
/* ABTS pending for an active fdmi request that is pending.
if (iport->fabric.fdmi_pending & FDLS_FDMI_RPA_PENDING)
fdls_schedule_oxid_free(iport, &iport->active_oxid_fdmi_rpa);
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
iport->fabric.fdmi_pending = 0;
/* If max retries not exhaused, start over from fdmi plogi */
if (iport->fabric.fdmi_retry < FDLS_FDMI_MAX_RETRY) {
iport->fabric.fdmi_retry++;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"retry fdmi timer %d", iport->fabric.fdmi_retry);
fdls_send_fdmi_plogi(iport);
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
}
tport_del_evt = kzalloc(sizeof(struct fnic_tport_event_s), GFP_ATOMIC);
if (!tport_del_evt) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Failed to allocate memory for tport event fcid: 0x%x",
tport->fcid);
return;
if (tport->del_timer_inprogress) {
tport->del_timer_inprogress = 0;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport_del_timer inprogress. Skip timer cb tport fcid: 0x%x\n",
tport->fcid);
return;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid: 0x%x timer pending: %d state: %d retry counter: %d",
tport->fcid, tport->timer_pending, tport->state,
tport->retry_counter);
} else {
/* exceeded retry count */
fdls_schedule_oxid_free(iport, &tport->active_oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ADISC not responding. Deleting target port: 0x%x",
tport->fcid);
fdls_send_delete_tport_msg(tport);
}
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"oxid: 0x%x Unknown tport state: 0x%x", oxid, tport->state);
break;
}
tport = fnic_find_tport_by_fcid(iport, tgt_fcid);
if (!tport) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Tgt ADISC response tport not found: 0x%x", tgt_fcid);
return;
}
if ((iport->state != FNIC_IPORT_STATE_READY)
|| (tport->state != FDLS_TGT_STATE_ADISC)
|| (tport->flags & FNIC_FDLS_TGT_ABORT_ISSUED)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping this ADISC response");
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport state: %d tport state: %d Is abort issued on PRLI? %d",
iport->state, tport->state,
(tport->flags & FNIC_FDLS_TGT_ABORT_ISSUED));
return;
}
if (FNIC_STD_GET_OX_ID(fchdr) != tport->active_oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping frame from target: 0x%x",
tgt_fcid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Reason: Stale ADISC/Aborted ADISC/OOO frame delivery");
return;
}
case ELS_LS_ACC:
atomic64_inc(&iport->iport_stats.tport_adisc_ls_accepts);
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport 0x%p Canceling fabric disc timer\n",
tport);
fnic_del_tport_timer_sync(fnic, tport);
frame_wwnn = get_unaligned_be64(&adisc_rsp->els.adisc_wwnn);
frame_wwpn = get_unaligned_be64(&adisc_rsp->els.adisc_wwpn);
if ((frame_wwnn == tport->wwnn) && (frame_wwpn == tport->wwpn)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ADISC accepted from target: 0x%x. Target logged in",
tgt_fcid);
fdls_set_tport_state(tport, FDLS_TGT_STATE_READY);
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Error mismatch frame: ADISC");
}
break;
if (((els_rjt->rej.er_reason == ELS_RJT_BUSY)
|| (els_rjt->rej.er_reason == ELS_RJT_UNAB))
&& (tport->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ADISC ret ELS_LS_RJT BUSY. Retry from timer routine: 0x%x",
tgt_fcid);
/* Retry ADISC again from the timer routine. */
tport->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ADISC returned ELS_LS_RJT from target: 0x%x",
tgt_fcid);
fdls_delete_tport(iport, tport);
fcid = FNIC_STD_GET_S_ID(fchdr);
tgt_fcid = ntoh24(fcid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS processing target PLOGI response: tgt_fcid: 0x%x",
tgt_fcid);
tport = fnic_find_tport_by_fcid(iport, tgt_fcid);
if (!tport) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport not found: 0x%x", tgt_fcid);
return;
}
if ((iport->state != FNIC_IPORT_STATE_READY)
|| (tport->flags & FNIC_FDLS_TGT_ABORT_ISSUED)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping frame! iport state: %d tport state: %d",
iport->state, tport->state);
return;
}
if (tport->state != FDLS_TGT_STATE_PLOGI) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI rsp recvd in wrong state. Drop the frame and restart nexus");
fdls_target_restart_nexus(tport);
return;
}
if (FNIC_STD_GET_OX_ID(fchdr) != tport->active_oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI response from target: 0x%x. Dropping frame",
tgt_fcid);
return;
switch (plogi_rsp->els.fl_cmd) {
case ELS_LS_ACC:
atomic64_inc(&iport->iport_stats.tport_plogi_ls_accepts);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI accepted by target: 0x%x", tgt_fcid);
break;
if (((els_rjt->rej.er_reason == ELS_RJT_BUSY)
|| (els_rjt->rej.er_reason == ELS_RJT_UNAB))
&& (tport->retry_counter < iport->max_plogi_retries)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI ret ELS_LS_RJT BUSY. Retry from timer routine: 0x%x",
tgt_fcid);
/* Retry plogi again from the timer routine. */
tport->flags |= FNIC_FDLS_RETRY_FRAME;
return;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI returned ELS_LS_RJT from target: 0x%x",
tgt_fcid);
fdls_delete_tport(iport, tport);
default:
atomic64_inc(&iport->iport_stats.tport_plogi_misc_rejects);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI not accepted from target fcid: 0x%x",
tgt_fcid);
return;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Found the PLOGI target: 0x%x and state: %d",
(unsigned int) tgt_fcid, tport->state);
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid 0x%x: Canceling disc timer\n",
tport->fcid);
fnic_del_tport_timer_sync(fnic, tport);
min(max_payload_size, iport->max_payload_size);
if (tport->max_payload_size < FNIC_MIN_DATA_FIELD_SIZE) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"MFS: tport max frame size below spec bounds: %d",
tport->max_payload_size);
tport->max_payload_size = FNIC_MIN_DATA_FIELD_SIZE;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"MAX frame size: %u iport max_payload_size: %d tport mfs: %d",
max_payload_size, iport->max_payload_size,
tport->max_payload_size);
fcid = FNIC_STD_GET_S_ID(fchdr);
tgt_fcid = ntoh24(fcid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS process tgt PRLI response: 0x%x", tgt_fcid);
tport = fnic_find_tport_by_fcid(iport, tgt_fcid);
if (!tport) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport not found: 0x%x", tgt_fcid);
/* Handle or just drop? */
return;
if ((iport->state != FNIC_IPORT_STATE_READY)
|| (tport->flags & FNIC_FDLS_TGT_ABORT_ISSUED)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping frame! iport st: %d tport st: %d tport fcid: 0x%x",
iport->state, tport->state, tport->fcid);
return;
}
if (tport->state != FDLS_TGT_STATE_PRLI) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PRLI rsp recvd in wrong state. Drop frame. Restarting nexus");
fdls_target_restart_nexus(tport);
return;
}
if (FNIC_STD_GET_OX_ID(fchdr) != tport->active_oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping PRLI response from target: 0x%x ",
tgt_fcid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Reason: Stale PRLI response/Aborted PDISC/OOO frame delivery");
return;
}
switch (prli_rsp->els_prli.prli_cmd) {
case ELS_LS_ACC:
atomic64_inc(&iport->iport_stats.tport_prli_ls_accepts);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PRLI accepted from target: 0x%x", tgt_fcid);
if (prli_rsp->sp.spp_type != FC_FC4_TYPE_SCSI) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"mismatched target zoned with FC SCSI initiator: 0x%x",
tgt_fcid);
mismatched_tgt = true;
|| (els_rjt->rej.er_reason == ELS_RJT_UNAB))
&& (tport->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PRLI ret ELS_LS_RJT BUSY. Retry from timer routine: 0x%x",
tgt_fcid);
tport->flags |= FNIC_FDLS_RETRY_FRAME;
return;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PRLI returned ELS_LS_RJT from target: 0x%x",
tgt_fcid);
default:
atomic64_inc(&iport->iport_stats.tport_prli_misc_rejects);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PRLI not accepted from target: 0x%x", tgt_fcid);
return;
break;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Found the PRLI target: 0x%x and state: %d",
(unsigned int) tgt_fcid, tport->state);
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport fcid 0x%x: Canceling disc timer\n",
tport->fcid);
fnic_del_tport_timer_sync(fnic, tport);
/* Check if the device plays Target Mode Function */
if (!(tport->fcp_csp & FCP_PRLI_FUNC_TARGET)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Remote port(0x%x): no target support. Deleting it\n",
tgt_fcid);
fdls_tgt_logout(iport, tport);
/* Inform the driver about new target added */
tport_add_evt = kzalloc(sizeof(struct fnic_tport_event_s), GFP_ATOMIC);
if (!tport_add_evt) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport event memory allocation failure: 0x%0x\n",
tport->fcid);
return;
}
tport_add_evt->event = TGT_EV_RPORT_ADD;
tport_add_evt->arg1 = (void *) tport;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x add tport event fcid: 0x%x\n",
tport->fcid, iport->fcid);
list_add_tail(&tport_add_evt->links, &fnic->tport_event_list);
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
if (fdls_get_state(fdls) != FDLS_STATE_REGISTER_FC4_FEATURES) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RFF_ID resp recvd in state(%d). Dropping.",
fdls_get_state(fdls));
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
return;
}
rsp = FNIC_STD_GET_FC_CT_CMD((&rff_rsp->fc_std_ct_hdr));
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS process RFF ID response: 0x%04x", iport->fcid,
(uint32_t) rsp);
switch (rsp) {
case FC_FS_ACC:
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
if (((reason_code == FC_FS_RJT_BSY)
|| (reason_code == FC_FS_RJT_UNABL))
&& (fdls->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RFF_ID ret ELS_LS_RJT BUSY. Retry from timer routine %p",
iport);
/* Retry again from the timer routine */
fdls->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RFF_ID returned ELS_LS_RJT. Halting discovery %p",
iport);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
if (fdls_get_state(fdls) != FDLS_STATE_REGISTER_FC4_TYPES) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RFT_ID resp recvd in state(%d). Dropping.",
fdls_get_state(fdls));
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
return;
rsp = FNIC_STD_GET_FC_CT_CMD((&rft_rsp->fc_std_ct_hdr));
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS process RFT ID response: 0x%04x", iport->fcid,
(uint32_t) rsp);
switch (rsp) {
case FC_FS_ACC:
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
if (((reason_code == FC_FS_RJT_BSY)
|| (reason_code == FC_FS_RJT_UNABL))
&& (fdls->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: RFT_ID ret ELS_LS_RJT BUSY. Retry from timer routine",
iport->fcid);
/* Retry again from the timer routine */
fdls->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: RFT_ID REJ. Halting discovery reason %d expl %d",
iport->fcid, reason_code,
rft_rsp->fc_std_ct_hdr.ct_explan);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
if (fdls_get_state(fdls) != FDLS_STATE_RPN_ID) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RPN_ID resp recvd in state(%d). Dropping.",
fdls_get_state(fdls));
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
return;
}
rsp = FNIC_STD_GET_FC_CT_CMD((&rpn_rsp->fc_std_ct_hdr));
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS process RPN ID response: 0x%04x", iport->fcid,
(uint32_t) rsp);
fdls_free_oxid(iport, oxid, &iport->active_oxid_fabric_req);
switch (rsp) {
case FC_FS_ACC:
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
if (((reason_code == FC_FS_RJT_BSY)
|| (reason_code == FC_FS_RJT_UNABL))
&& (fdls->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RPN_ID returned REJ BUSY. Retry from timer routine %p",
iport);
/* Retry again from the timer routine */
fdls->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RPN_ID ELS_LS_RJT. Halting discovery %p", iport);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
struct fnic *fnic = iport->fnic;
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS process SCR response: 0x%04x",
(uint32_t) scr_rsp->scr.scr_cmd);
if (fdls_get_state(fdls) != FDLS_STATE_SCR) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"SCR resp recvd in state(%d). Dropping.",
fdls_get_state(fdls));
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
}
case ELS_LS_ACC:
atomic64_inc(&iport->iport_stats.fabric_scr_ls_accepts);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
if (((els_rjt->rej.er_reason == ELS_RJT_BUSY)
|| (els_rjt->rej.er_reason == ELS_RJT_UNAB))
&& (fdls->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"SCR ELS_LS_RJT BUSY. Retry from timer routine %p",
iport);
/* Retry again from the timer routine */
fdls->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"SCR returned ELS_LS_RJT. Halting discovery %p",
iport);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n",
iport);
fnic_del_fabric_timer_sync(fnic);
u32 old_link_down_cnt = iport->fnic->link_down_cnt;
struct fnic *fnic = iport->fnic;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS process GPN_FT tgt list", iport->fcid);
gpn_ft_tgt =
fcid = ntoh24(gpn_ft_tgt->fcid);
wwpn = be64_to_cpu(gpn_ft_tgt->wwpn);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"tport: 0x%x: ctrl:0x%x", fcid, gpn_ft_tgt->ctrl);
if (fcid == iport->fcid) {
rem_len -= sizeof(struct fc_gpn_ft_rsp_iu);
}
if (rem_len <= 0) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"GPN_FT response: malformed/corrupt frame rxlen: %d remlen: %d",
len, rem_len);
}
list_for_each_entry_safe(tport, next, &iport->tport_list, links) {
if (!(tport->flags & FNIC_FDLS_TPORT_IN_GPN_FT_LIST)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Remove port: 0x%x not found in GPN_FT list",
tport->fcid);
fdls_delete_tport(iport, tport);
struct fnic *fnic = iport->fnic;
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS process GPN_FT response: iport state: %d len: %d",
iport->state, len);
&& ((fdls_get_state(fdls) == FDLS_STATE_RSCN_GPN_FT)
|| (fdls_get_state(fdls) == FDLS_STATE_SEND_GPNFT)
|| (fdls_get_state(fdls) == FDLS_STATE_TGT_DISCOVERY))))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"GPNFT resp recvd in fab state(%d) iport_state(%d). Dropping.",
fdls_get_state(fdls), iport->state);
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
}
switch (rsp) {
case FC_FS_ACC:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: GPNFT_RSP accept", iport->fcid);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Canceling fabric disc timer\n",
iport->fcid);
fnic_del_fabric_timer_sync(fnic);
* that will be taken care in next link up event
*/
if (iport->state != FNIC_IPORT_STATE_READY) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Halting target discovery: fab st: %d iport st: %d ",
fdls_get_state(fdls), iport->state);
break;
case FC_FS_RJT:
reason_code = gpn_ft_rsp->fc_std_ct_hdr.ct_reason;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: GPNFT_RSP Reject reason: %d", iport->fcid, reason_code);
if (((reason_code == FC_FS_RJT_BSY)
|| (reason_code == FC_FS_RJT_UNABL))
&& (fdls->retry_counter < FDLS_RETRY_COUNT)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: GPNFT_RSP ret REJ/BSY. Retry from timer routine",
iport->fcid);
/* Retry again from the timer routine */
fdls->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: GPNFT_RSP reject", iport->fcid);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Canceling fabric disc timer\n",
iport->fcid);
fnic_del_fabric_timer_sync(fnic);
count = 0;
list_for_each_entry_safe(tport, next, &iport->tport_list,
links) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"GPN_FT_REJECT: Remove port: 0x%x",
tport->fcid);
fdls_delete_tport(iport, tport);
}
count++;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"GPN_FT_REJECT: Removed (0x%x) ports", count);
}
break;
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
}
switch (flogo_rsp->els.fl_cmd) {
case ELS_LS_ACC:
if (iport->fabric.state != FDLS_STATE_FABRIC_LOGO) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Flogo response. Fabric not in LOGO state. Dropping! %p",
iport);
return;
iport->state = FNIC_IPORT_STATE_LINK_WAIT;
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport 0x%p Canceling fabric disc timer\n",
iport);
fnic_del_fabric_timer_sync(fnic);
}
iport->fabric.timer_pending = 0;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Flogo response from Fabric for did: 0x%x",
ntoh24(fchdr->fh_d_id));
return;
case ELS_LS_RJT:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Flogo response from Fabric for did: 0x%x returned ELS_LS_RJT",
ntoh24(fchdr->fh_d_id));
return;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGO response not accepted or rejected: 0x%x",
flogo_rsp->els.fl_cmd);
}
struct fnic *fnic = iport->fnic;
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS processing FLOGI response", iport->fcid);
if (fdls_get_state(fabric) != FDLS_STATE_FABRIC_FLOGI) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI response received in state (%d). Dropping frame",
fdls_get_state(fabric));
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fabric), oxid, iport->active_oxid_fabric_req);
return;
case ELS_LS_ACC:
atomic64_inc(&iport->iport_stats.fabric_flogi_ls_accepts);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x Canceling fabric disc timer\n",
iport->fcid);
fnic_del_fabric_timer_sync(fnic);
iport->fabric.retry_counter = 0;
fcid = FNIC_STD_GET_D_ID(fchdr);
iport->fcid = ntoh24(fcid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FLOGI response accepted", iport->fcid);
/* Learn the Service Params */
iport->max_payload_size = min(rdf_size,
iport->max_payload_size);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"max_payload_size from fabric: %u set: %d", rdf_size,
iport->max_payload_size);
if (FNIC_LOGI_FEATURES(flogi_rsp->els) & FNIC_FC_EDTOV_NSEC)
iport->e_d_tov = iport->e_d_tov / FNIC_NSEC_TO_MSEC;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"From fabric: R_A_TOV: %d E_D_TOV: %d",
iport->r_a_tov, iport->e_d_tov);
if (IS_FNIC_FCP_INITIATOR(fnic)) {
- fc_host_fabric_name(iport->fnic->lport->host) =
+ fc_host_fabric_name(iport->fnic->host) =
get_unaligned_be64(&FNIC_LOGI_NODE_NAME(flogi_rsp->els));
- fc_host_port_id(iport->fnic->lport->host) = iport->fcid;
+ fc_host_port_id(iport->fnic->host) = iport->fcid;
}
fnic_fdls_learn_fcoe_macs(iport, rx_frame, fcid);
if (fnic_fdls_register_portid(iport, iport->fcid, rx_frame) != 0) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FLOGI registration failed", iport->fcid);
break;
}
memcpy(&fcmac[3], fcid, 3);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Adding vNIC device MAC addr: %02x:%02x:%02x:%02x:%02x:%02x",
fcmac[0], fcmac[1], fcmac[2], fcmac[3], fcmac[4],
fcmac[5]);
if (fdls_get_state(fabric) == FDLS_STATE_FABRIC_FLOGI) {
fnic_fdls_start_plogi(iport);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI response received. Starting PLOGI");
} else {
/* From FDLS_STATE_FABRIC_FLOGI state fabric can only go to
* state, hence we don't have to worry about undoing:
* the fnic_fdls_register_portid and vnic_dev_add_addr
*/
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI response received in state (%d). Dropping frame",
fdls_get_state(fabric));
}
case ELS_LS_RJT:
atomic64_inc(&iport->iport_stats.fabric_flogi_ls_rejects);
if (fabric->retry_counter < iport->max_flogi_retries) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI returned ELS_LS_RJT BUSY. Retry from timer routine %p",
iport);
fabric->flags |= FNIC_FDLS_RETRY_FRAME;
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI returned ELS_LS_RJT. Halting discovery %p",
iport);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport 0x%p Canceling fabric disc timer\n",
iport);
fnic_del_fabric_timer_sync(fnic);
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI response not accepted: 0x%x",
flogi_rsp->els.fl_cmd);
atomic64_inc(&iport->iport_stats.fabric_flogi_misc_rejects);
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
if (fdls_get_state((&iport->fabric)) != FDLS_STATE_FABRIC_PLOGI) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Fabric PLOGI response received in state (%d). Dropping frame",
fdls_get_state(&iport->fabric));
return;
}
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fabric_req);
return;
case ELS_LS_ACC:
atomic64_inc(&iport->iport_stats.fabric_plogi_ls_accepts);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x fabric PLOGI response: Accepted\n",
iport->fcid);
fnic_del_fabric_timer_sync(fnic);
if (((els_rjt->rej.er_reason == ELS_RJT_BUSY)
|| (els_rjt->rej.er_reason == ELS_RJT_UNAB))
&& (iport->fabric.retry_counter < iport->max_plogi_retries)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Fabric PLOGI ELS_LS_RJT BUSY. Retry from timer routine",
iport->fcid);
} else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Fabric PLOGI ELS_LS_RJT. Halting discovery",
iport->fcid);
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x Canceling fabric disc timer\n",
iport->fcid);
fnic_del_fabric_timer_sync(fnic);
}
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI response not accepted: 0x%x",
plogi_rsp->els.fl_cmd);
atomic64_inc(&iport->iport_stats.fabric_plogi_misc_rejects);
uint16_t oxid = FNIC_STD_GET_OX_ID(fchdr);
if (iport->active_oxid_fdmi_plogi != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. state: %d, oxid recvd: 0x%x, active oxid: 0x%x\n",
fdls_get_state(fdls), oxid, iport->active_oxid_fdmi_plogi);
return;
iport->fabric.fdmi_pending = 0;
switch (plogi_rsp->els.fl_cmd) {
case ELS_LS_ACC:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS process fdmi PLOGI response status: ELS_LS_ACC\n");
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Sending fdmi registration for port 0x%x\n",
iport->fcid);
round_jiffies(fdmi_tov));
break;
case ELS_LS_RJT:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Fabric FDMI PLOGI returned ELS_LS_RJT reason: 0x%x",
els_rjt->rej.er_reason);
uint16_t oxid;
if (!iport->fabric.fdmi_pending) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Received FDMI ack while not waiting: 0x%x\n",
FNIC_STD_GET_OX_ID(fchdr));
return;
if ((iport->active_oxid_fdmi_rhba != oxid) &&
(iport->active_oxid_fdmi_rpa != oxid)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Incorrect OXID in response. oxid recvd: 0x%x, active oxids(rhba,rpa): 0x%x, 0x%x\n",
oxid, iport->active_oxid_fdmi_rhba, iport->active_oxid_fdmi_rpa);
return;
fdls_free_oxid(iport, oxid, &iport->active_oxid_fdmi_rpa);
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x: Received FDMI registration ack\n",
iport->fcid);
if (!iport->fabric.fdmi_pending) {
del_timer_sync(&iport->fabric.fdmi_timer);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport fcid: 0x%x: Canceling FDMI timer\n",
iport->fcid);
}
s_id = ntoh24(FNIC_STD_GET_S_ID(fchdr));
if (!(s_id != FC_FID_MGMT_SERV)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received abts rsp with invalid SID: 0x%x. Dropping frame",
s_id);
return;
fdls_free_oxid(iport, oxid, &iport->active_oxid_fdmi_rpa);
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received abts rsp with invalid oxid: 0x%x. Dropping frame",
oxid);
break;
if (!((s_id == FC_FID_DIR_SERV) || (s_id == FC_FID_FLOGI)
|| (s_id == FC_FID_FCTRL))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received abts rsp with invalid SID: 0x%x. Dropping frame",
s_id);
return;
oxid = FNIC_STD_GET_OX_ID(fchdr);
if (iport->active_oxid_fabric_req != oxid) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received abts rsp with invalid oxid: 0x%x. Dropping frame",
oxid);
return;
}
if (iport->fabric.timer_pending) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Canceling fabric disc timer %p\n", iport);
fnic_del_fabric_timer_sync(fnic);
}
iport->fabric.flags &= ~FNIC_FDLS_FABRIC_ABORT_ISSUED;
if (fchdr->fh_r_ctl == FC_RCTL_BA_ACC) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received abts rsp BA_ACC for fabric_state: %d OX_ID: 0x%x",
fabric_state, be16_to_cpu(ba_acc->acc.ba_ox_id));
} else if (fchdr->fh_r_ctl == FC_RCTL_BA_RJT) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"BA_RJT fs: %d OX_ID: 0x%x rc: 0x%x rce: 0x%x",
fabric_state, FNIC_STD_GET_OX_ID(&ba_rjt->fchdr),
ba_rjt->rjt.br_reason, ba_rjt->rjt.br_explan);
if (iport->fabric.retry_counter < iport->max_flogi_retries)
fdls_send_fabric_flogi(iport);
else
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Exceeded max FLOGI retries");
break;
case FNIC_FRAME_TYPE_FABRIC_LOGO:
if (iport->fabric.retry_counter < iport->max_plogi_retries)
fdls_send_fabric_plogi(iport);
else
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Exceeded max PLOGI retries");
break;
case FNIC_FRAME_TYPE_FABRIC_RPN:
if (iport->fabric.retry_counter < FDLS_RETRY_COUNT)
fdls_send_scr(iport);
else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"SCR exhausted retries. Start fabric PLOGI %p",
iport);
fnic_fdls_start_plogi(iport); /* go back to fabric Plogi */
if (iport->fabric.retry_counter < FDLS_RETRY_COUNT)
fdls_send_register_fc4_types(iport);
else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RFT exhausted retries. Start fabric PLOGI %p",
iport);
fnic_fdls_start_plogi(iport); /* go back to fabric Plogi */
if (iport->fabric.retry_counter < FDLS_RETRY_COUNT)
fdls_send_register_fc4_features(iport);
else {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RFF exhausted retries. Start fabric PLOGI %p",
iport);
fnic_fdls_start_plogi(iport); /* go back to fabric Plogi */
if (iport->fabric.retry_counter <= FDLS_RETRY_COUNT)
fdls_send_gpn_ft(iport, fabric_state);
else
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"GPN FT exhausted retries. Start fabric PLOGI %p",
iport);
break;
* We should not be here since we already validated rx oxid with
* our active_oxid_fabric_req
*/
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Invalid OXID/active oxid 0x%x\n", oxid);
WARN_ON(true);
return;
sizeof(struct fc_std_abts_ba_acc);
nport_id = ntoh24(fchdr->fh_s_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received abort from SID 0x%8x", nport_id);
tport = fnic_find_tport_by_fcid(iport, nport_id);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"0x%x: Failed to allocate frame to send response for ABTS req",
iport->fcid);
return;
pba_acc->acc.ba_rx_id = cpu_to_be16(FNIC_STD_GET_RX_ID(fchdr));
pba_acc->acc.ba_ox_id = cpu_to_be16(FNIC_STD_GET_OX_ID(fchdr));
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS send BA ACC with oxid: 0x%x",
iport->fcid, oxid);
sizeof(struct fc_std_els_rjt_rsp);
if (iport->fcid != d_id) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping unsupported ELS with illegal frame bits 0x%x\n",
d_id);
atomic64_inc(&iport->iport_stats.unsupported_frames_dropped);
if ((iport->state != FNIC_IPORT_STATE_READY)
&& (iport->state != FNIC_IPORT_STATE_FABRIC_DISC)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping unsupported ELS request in iport state: %d",
iport->state);
atomic64_inc(&iport->iport_stats.unsupported_frames_dropped);
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send response to unsupported ELS request");
return;
}
pls_rsp = (struct fc_std_els_rjt_rsp *) (frame + FNIC_ETH_FCOE_HDRS_OFFSET);
fdls_init_els_rjt_frame(frame, iport);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Process unsupported ELS request from SID: 0x%x",
iport->fcid, ntoh24(fchdr->fh_s_id));
uint16_t frame_size = FNIC_ETH_FCOE_HDRS_OFFSET +
sizeof(struct fc_std_rls_acc);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Process RLS request %d", iport->fnic->fnic_num);
if ((iport->state != FNIC_IPORT_STATE_READY)
&& (iport->state != FNIC_IPORT_STATE_FABRIC_DISC)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received RLS req in iport state: %d. Dropping the frame.",
iport->state);
return;
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send RLS accept");
return;
}
if ((iport->state != FNIC_IPORT_STATE_READY)
&& (iport->state != FNIC_IPORT_STATE_FABRIC_DISC)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping ELS frame type: 0x%x in iport state: %d",
type, iport->state);
return;
}
switch (type) {
case ELS_ECHO:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"sending LS_ACC for ECHO request %d\n",
iport->fnic->fnic_num);
break;
case ELS_RRQ:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"sending LS_ACC for RRQ request %d\n",
iport->fnic->fnic_num);
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"sending LS_ACC for 0x%x ELS frame\n", type);
break;
}
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send ELS response for 0x%x",
type);
return;
tport = fnic_find_tport_by_fcid(iport, s_id);
if (!tport) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Received tgt abts rsp with invalid SID: 0x%x", s_id);
return;
}
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"tport 0x%p Canceling fabric disc timer\n", tport);
fnic_del_tport_timer_sync(fnic, tport);
}
if (iport->state != FNIC_IPORT_STATE_READY) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Received tgt abts rsp in iport state(%d). Dropping.",
iport->state);
return;
switch (frame_type) {
case FNIC_FRAME_TYPE_TGT_ADISC:
if (fchdr->fh_r_ctl == FC_RCTL_BA_ACC) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"OX_ID: 0x%x tgt_fcid: 0x%x rcvd tgt adisc abts resp BA_ACC",
be16_to_cpu(ba_acc->acc.ba_ox_id),
tport->fcid);
} else if (fchdr->fh_r_ctl == FC_RCTL_BA_RJT) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"ADISC BA_RJT rcvd tport_fcid: 0x%x tport_state: %d ",
tport->fcid, tport_state);
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"reason code: 0x%x reason code explanation:0x%x ",
ba_rjt->rjt.br_reason,
ba_rjt->rjt.br_explan);
return;
}
fdls_free_oxid(iport, oxid, &tport->active_oxid);
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"ADISC not responding. Deleting target port: 0x%x",
tport->fcid);
fdls_delete_tport(iport, tport);
break;
case FNIC_FRAME_TYPE_TGT_PLOGI:
if (fchdr->fh_r_ctl == FC_RCTL_BA_ACC) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Received tgt PLOGI abts response BA_ACC tgt_fcid: 0x%x",
tport->fcid);
} else if (fchdr->fh_r_ctl == FC_RCTL_BA_RJT) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PLOGI BA_RJT received for tport_fcid: 0x%x OX_ID: 0x%x",
tport->fcid, FNIC_STD_GET_OX_ID(fchdr));
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"reason code: 0x%x reason code explanation: 0x%x",
ba_rjt->rjt.br_reason,
ba_rjt->rjt.br_explan);
break;
case FNIC_FRAME_TYPE_TGT_PRLI:
if (fchdr->fh_r_ctl == FC_RCTL_BA_ACC) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Received tgt PRLI abts response BA_ACC",
tport->fcid);
} else if (fchdr->fh_r_ctl == FC_RCTL_BA_RJT) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"PRLI BA_RJT received for tport_fcid: 0x%x OX_ID: 0x%x ",
tport->fcid, FNIC_STD_GET_OX_ID(fchdr));
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"reason code: 0x%x reason code explanation: 0x%x",
ba_rjt->rjt.br_reason,
ba_rjt->rjt.br_explan);
fdls_set_tport_state(tport, FDLS_TGT_STATE_PLOGI);
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received ABTS response for unknown frame %p", iport);
break;
}
sizeof(struct fc_std_els_rjt_rsp);
if (iport->fcid != d_id) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received PLOGI with illegal frame bits. Dropping frame from 0x%x",
d_id);
return;
}
if (iport->state != FNIC_IPORT_STATE_READY) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received PLOGI request in iport state: %d Dropping frame",
iport->state);
return;
frame = fdls_alloc_frame(iport);
if (frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send response to PLOGI request");
return;
}
pplogi_rsp = (struct fc_std_els_rjt_rsp *) (frame + FNIC_ETH_FCOE_HDRS_OFFSET);
fdls_init_els_rjt_frame(frame, iport);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: Process PLOGI request from SID: 0x%x",
iport->fcid, ntoh24(fchdr->fh_s_id));
nport_id = ntoh24(logo->els.fl_n_port_id);
nport_name = be64_to_cpu(logo->els.fl_n_port_wwn);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Process LOGO request from fcid: 0x%x", nport_id);
if (iport->state != FNIC_IPORT_STATE_READY) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Dropping LOGO req from 0x%x in iport state: %d",
nport_id, iport->state);
return;
if (!tport) {
/* We are not logged in with the nport, log and drop... */
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Received LOGO from an nport not logged in: 0x%x(0x%llx)",
nport_id, nport_name);
return;
}
if (tport->fcid != nport_id) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Received LOGO with invalid target port fcid: 0x%x(0x%llx)",
nport_id, nport_name);
return;
}
if (tport->timer_pending) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"tport fcid 0x%x: Canceling disc timer\n",
tport->fcid);
fnic_del_tport_timer_sync(fnic, tport);
if ((iport->state == FNIC_IPORT_STATE_READY)
&& (fdls_get_state(&iport->fabric) != FDLS_STATE_SEND_GPNFT)
&& (fdls_get_state(&iport->fabric) != FDLS_STATE_RSCN_GPN_FT)) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Sending GPNFT in response to LOGO from Target:0x%x",
nport_id);
fdls_send_gpn_ft(iport, FDLS_STATE_SEND_GPNFT);
fdls_send_logo_resp(iport, &logo->fchdr);
if ((fdls_get_state(&iport->fabric) != FDLS_STATE_SEND_GPNFT) &&
(fdls_get_state(&iport->fabric) != FDLS_STATE_RSCN_GPN_FT)) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Sending GPNFT in response to LOGO from Target:0x%x",
nport_id);
fdls_send_gpn_ft(iport, FDLS_STATE_SEND_GPNFT);
atomic64_inc(&iport->iport_stats.num_rscns);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS process RSCN %p", iport);
if (iport->state != FNIC_IPORT_STATE_READY) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS RSCN received in state(%d). Dropping",
fdls_get_state(fdls));
return;
|| (rscn_payload_len > 1024)
|| (rscn->els.rscn_page_len != 4)) {
num_ports = 0;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RSCN payload_len: 0x%x page_len: 0x%x",
rscn_payload_len, rscn->els.rscn_page_len);
/* if this happens then we need to send ADISC to all the tports. */
list_for_each_entry_safe(tport, next, &iport->tport_list, links) {
if (tport->state == FDLS_TGT_STATE_READY)
tport->flags |= FNIC_FDLS_TPORT_SEND_ADISC;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RSCN for port id: 0x%x", tport->fcid);
}
} else {
num_ports = (rscn_payload_len - 4) / rscn->els.rscn_page_len;
rscn_port = (struct fc_els_rscn_page *)(rscn + 1);
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RSCN received for num_ports: %d payload_len: %d page_len: %d ",
num_ports, rscn_payload_len, rscn->els.rscn_page_len);
if (tport->state == FDLS_TGT_STATE_READY)
tport->flags |= FNIC_FDLS_TPORT_SEND_ADISC;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RSCN for port id: 0x%x", tport->fcid);
}
break;
}
tport = fnic_find_tport_by_fcid(iport, nport_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"RSCN port id list: 0x%x", nport_id);
if (!tport) {
tport->flags |= FNIC_FDLS_TPORT_SEND_ADISC;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FDLS process RSCN sending GPN_FT: newports: %d", newports);
fdls_send_gpn_ft(iport, FDLS_STATE_RSCN_GPN_FT);
fdls_send_rscn_resp(iport, fchdr);
struct fnic *fnic = iport->fnic;
if (IS_FNIC_FCP_INITIATOR(fnic)) {
- fc_host_fabric_name(iport->fnic->lport->host) = 0;
- fc_host_post_event(iport->fnic->lport->host, fc_get_event_number(),
+ fc_host_fabric_name(iport->fnic->host) = 0;
+ fc_host_post_event(iport->fnic->host, fc_get_event_number(),
FCH_EVT_LIPRESET, 0);
}
uint16_t acc_frame_size = FNIC_ETH_FCOE_HDRS_OFFSET +
sizeof(struct fc_std_els_adisc);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Process ADISC request %d", iport->fnic->fnic_num);
fcid = FNIC_STD_GET_S_ID(fchdr);
tgt_fcid = ntoh24(fcid);
tport = fnic_find_tport_by_fcid(iport, tgt_fcid);
if (!tport) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"tport for fcid: 0x%x not found. Dropping ADISC req.",
tgt_fcid);
return;
}
if (iport->state != FNIC_IPORT_STATE_READY) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Dropping ADISC req from fcid: 0x%x in iport state: %d",
tgt_fcid, iport->state);
return;
if ((frame_wwnn != tport->wwnn) || (frame_wwpn != tport->wwpn)) {
/* send reject */
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"ADISC req from fcid: 0x%x mismatch wwpn: 0x%llx wwnn: 0x%llx",
tgt_fcid, frame_wwpn, frame_wwnn);
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"local tport wwpn: 0x%llx wwnn: 0x%llx. Sending RJT",
tport->wwpn, tport->wwnn);
rjt_frame = fdls_alloc_frame(iport);
if (rjt_frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate rjt_frame to send response to ADISC request");
return;
}
acc_frame = fdls_alloc_frame(iport);
if (acc_frame == NULL) {
- FNIC_FCS_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to allocate frame to send ADISC accept");
return;
}
/* some common validation */
if (fdls_get_state(fabric) > FDLS_STATE_FABRIC_FLOGI) {
if ((iport->fcid != d_id) || (!FNIC_FC_FRAME_CS_CTL(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"invalid frame received. Dropping frame");
return -1;
}
if ((fchdr->fh_r_ctl == FC_RCTL_BA_ACC)
|| (fchdr->fh_r_ctl == FC_RCTL_BA_RJT)) {
if (!(FNIC_FC_FRAME_TYPE_BLS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received ABTS invalid frame. Dropping frame");
return -1;
}
if (fdls_is_oxid_fabric_req(oxid)) {
if (!(iport->fabric.flags & FNIC_FDLS_FABRIC_ABORT_ISSUED)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unexpected ABTS RSP(oxid:0x%x) from 0x%x. Dropping frame",
oxid, s_id);
return -1;
} else if (fdls_is_oxid_tgt_req(oxid)) {
return FNIC_TPORT_BLS_ABTS_RSP;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received ABTS rsp with unknown oxid(0x%x) from 0x%x. Dropping frame",
oxid, s_id);
return -1;
/* BLS ABTS Req */
if ((fchdr->fh_r_ctl == FC_RCTL_BA_ABTS)
&& (FNIC_FC_FRAME_TYPE_BLS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Receiving Abort Request from s_id: 0x%x", s_id);
return FNIC_BLS_ABTS_REQ;
}
if ((!FNIC_FC_FRAME_FCTL_FIRST_LAST_SEQINIT(fchdr))
|| (!FNIC_FC_FRAME_UNSOLICITED(fchdr))
|| (!FNIC_FC_FRAME_TYPE_ELS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received LOGO invalid frame. Dropping frame");
return -1;
}
if ((!FNIC_FC_FRAME_FCTL_FIRST_LAST_SEQINIT(fchdr))
|| (!FNIC_FC_FRAME_TYPE_ELS(fchdr))
|| (!FNIC_FC_FRAME_UNSOLICITED(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received RSCN invalid FCTL. Dropping frame");
return -1;
}
if (s_id != FC_FID_FCTRL)
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received RSCN from target FCTL: 0x%x type: 0x%x s_id: 0x%x.",
fchdr->fh_f_ctl[0], fchdr->fh_type, s_id);
return FNIC_ELS_RSCN_REQ;
case ELS_RRQ:
return FNIC_ELS_RRQ;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Unsupported frame (type:0x%02x) from fcid: 0x%x",
type, s_id);
return FNIC_ELS_UNSUPPORTED_REQ;
/* solicited response from fabric or target */
oxid_frame_type = FNIC_FRAME_TYPE(oxid);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"oxid frame code: 0x%x, oxid: 0x%x\n", oxid_frame_type, oxid);
switch (oxid_frame_type) {
case FNIC_FRAME_TYPE_FABRIC_FLOGI:
if (type == ELS_LS_ACC) {
if ((s_id != FC_FID_FLOGI)
|| (!FNIC_FC_FRAME_TYPE_ELS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
if (type == ELS_LS_ACC) {
if ((s_id != FC_FID_DIR_SERV)
|| (!FNIC_FC_FRAME_TYPE_ELS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
if (type == ELS_LS_ACC) {
if ((s_id != FC_FID_FCTRL)
|| (!FNIC_FC_FRAME_TYPE_ELS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
case FNIC_FRAME_TYPE_FABRIC_RPN:
if ((s_id != FC_FID_DIR_SERV) || (!FNIC_FC_FRAME_TYPE_FC_GS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
case FNIC_FRAME_TYPE_FABRIC_RFT:
if ((s_id != FC_FID_DIR_SERV) || (!FNIC_FC_FRAME_TYPE_FC_GS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
case FNIC_FRAME_TYPE_FABRIC_RFF:
if ((s_id != FC_FID_DIR_SERV) || (!FNIC_FC_FRAME_TYPE_FC_GS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
case FNIC_FRAME_TYPE_FABRIC_GPN_FT:
if ((s_id != FC_FID_DIR_SERV) || (!FNIC_FC_FRAME_TYPE_FC_GS(fchdr))) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown frame. Dropping frame");
return -1;
}
return FNIC_TPORT_ADISC_RSP;
case FNIC_FRAME_TYPE_TGT_LOGO:
if (!FNIC_FC_FRAME_TYPE_ELS(fchdr)) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Dropping Unknown frame in tport solicited exchange range type: 0x%x.",
fchdr->fh_type);
return -1;
return FNIC_TPORT_LOGO_RSP;
default:
/* Drop the Rx frame and log/stats it */
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Solicited response: unknown OXID: 0x%x", oxid);
return -1;
}
break;
case FNIC_TPORT_LOGO_RSP:
/* Logo response from tgt which we have deleted */
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Logo response from tgt: 0x%x",
ntoh24(fchdr->fh_s_id));
break;
fdls_process_fdmi_reg_ack(iport, fchdr, frame_type);
break;
default:
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"s_id: 0x%x d_did: 0x%x", s_id, d_id);
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Received unknown FCoE frame of len: %d. Dropping frame", len);
break;
}
struct fnic_tport_s *tport, *next;
struct fnic *fnic = iport->fnic;
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS processing link down", iport->fcid);
fdls_set_state((&iport->fabric), FDLS_STATE_LINKDOWN);
fnic_scsi_fcpio_reset(iport->fnic);
spin_lock_irqsave(&fnic->fnic_lock, fnic->lock_flags);
list_for_each_entry_safe(tport, next, &iport->tport_list, links) {
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"removing rport: 0x%x", tport->fcid);
fdls_delete_tport(iport, tport);
}
iport->fabric.fdmi_pending = 0;
}
- FNIC_FCS_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"0x%x: FDLS finish processing link down", iport->fcid);
}
#include <scsi/scsi_tcq.h>
#include <scsi/fc/fc_els.h>
#include <scsi/fc/fc_fcoe.h>
-#include <scsi/libfc.h>
#include <scsi/fc_frame.h>
#include <scsi/scsi_transport_fc.h>
#include "fnic_io.h"
fnic_scsi_io_iter(fnic, fnic_count_portid_ioreqs_iter,
&portid, &count);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"portid = 0x%x count = %u\n", portid, count);
return count;
}
fnic_scsi_io_iter(fnic, fnic_count_lun_ioreqs_iter,
scsi_device, &count);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"lun = %p count = %u\n", scsi_device, count);
return count;
}
if (!vnic_wq_copy_desc_avail(wq))
ret = -EAGAIN;
else {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"ioreq_count: %u\n", ioreq_count);
fnic_queue_wq_copy_desc_fw_reset(wq, SCSI_NO_TAG);
atomic64_inc(&fnic->fnic_stats.fw_stats.active_fw_reqs);
if (!ret) {
atomic64_inc(&fnic->fnic_stats.reset_stats.fw_resets);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Issued fw reset\n");
} else {
fnic_clear_state_flags(fnic, FNIC_FLAGS_FWRESET);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Failed to issue fw reset\n");
}
fc_id, gw_mac,
fnic->iport.fpma,
iport->r_a_tov, iport->e_d_tov);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI FIP reg issued fcid: 0x%x src %p dest %p\n",
fc_id, fnic->iport.fpma, gw_mac);
} else {
fnic_queue_wq_copy_desc_flogi_reg(wq, SCSI_NO_TAG,
format, fc_id, gw_mac);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FLOGI reg issued fcid 0x%x dest %p\n",
fc_id, gw_mac);
}
free_wq_copy_descs(fnic, wq, hwq);
if (unlikely(!vnic_wq_copy_desc_avail(wq))) {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fnic_queue_wq_copy_desc failure - no descriptors\n");
atomic64_inc(&misc_stats->io_cpwq_alloc_failures);
return SCSI_MLQUEUE_HOST_BUSY;
rport = starget_to_rport(scsi_target(sc->device));
if (!rport) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"returning DID_NO_CONNECT for IO as rport is NULL\n");
sc->result = DID_NO_CONNECT << 16;
done(sc);
ret = fc_remote_port_chkready(rport);
if (ret) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"rport is not ready\n");
atomic64_inc(&fnic_stats->misc_stats.tport_not_ready);
sc->result = ret;
if (iport->state != FNIC_IPORT_STATE_READY) {
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"returning DID_NO_CONNECT for IO as iport state: %d\n",
iport->state);
sc->result = DID_NO_CONNECT << 16;
rdd_data = rport->dd_data;
tport = rdd_data->tport;
if (!tport || (rdd_data->iport != iport)) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"dd_data not yet set in SCSI for rport portid: 0x%x\n",
rport->port_id);
tport = fnic_find_tport_by_fcid(iport, rport->port_id);
if (!tport) {
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"returning DID_BUS_BUSY for IO as tport not found for: 0x%x\n",
rport->port_id);
sc->result = DID_BUS_BUSY << 16;
if ((tport->state != FDLS_TGT_STATE_READY)
&& (tport->state != FDLS_TGT_STATE_ADISC)) {
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"returning DID_NO_CONNECT for IO as tport state: %d\n",
tport->state);
sc->result = DID_NO_CONNECT << 16;
if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_FWRESET))) {
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"fnic flags FW reset: 0x%lx. Returning SCSI_MLQUEUE_HOST_BUSY\n",
fnic->state_flags);
return SCSI_MLQUEUE_HOST_BUSY;
atomic_dec(&tport->in_flight);
if (lun0_delay) {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"LUN0 delay\n");
mdelay(LUN0_DELAY_TIME);
}
if (fnic->state == FNIC_IN_FC_TRANS_ETH_MODE) {
/* Check status of reset completion */
if (!hdr_status) {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"reset cmpl success\n");
/* Ready to send flogi out */
fnic->state = FNIC_IN_ETH_MODE;
} else {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"reset failed with header status: %s\n",
fnic_fcpio_status_to_str(hdr_status));
ret = -1;
}
} else {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Unexpected state while processing reset completion: %s\n",
fnic_state_to_str(fnic->state));
atomic64_inc(&reset_stats->fw_reset_failures);
/* Check flogi registration completion status */
if (!hdr_status) {
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"FLOGI reg succeeded\n");
fnic->state = FNIC_IN_FC_MODE;
} else {
FNIC_SCSI_DBG(KERN_DEBUG,
- fnic->lport->host, fnic->fnic_num,
+ fnic->host, fnic->fnic_num,
"fnic flogi reg failed: %s\n",
fnic_fcpio_status_to_str(hdr_status));
fnic->state = FNIC_IN_ETH_MODE;
ret = -1;
}
} else {
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Unexpected fnic state %s while"
" processing flogi reg completion\n",
fnic_state_to_str(fnic->state));
spin_unlock_irqrestore(&fnic->wq_copy_lock[wq_index], flags);
FNIC_TRACE(fnic_fcpio_ack_handler,
- fnic->lport->host->host_no, 0, 0, ox_id_tag[2], ox_id_tag[3],
+ fnic->host->host_no, 0, 0, ox_id_tag[2], ox_id_tag[3],
ox_id_tag[4], ox_id_tag[5]);
}
hwq = blk_mq_unique_tag_to_hwq(mqtag);
if (hwq != cq_index) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x cq index: %d ",
hwq, mqtag, tag, cq_index);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hdr status: %s icmnd completion on the wrong queue\n",
fnic_fcpio_status_to_str(hdr_status));
}
if (tag >= fnic->fnic_max_tag_id) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x cq index: %d ",
hwq, mqtag, tag, cq_index);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hdr status: %s Out of range tag\n",
fnic_fcpio_status_to_str(hdr_status));
return;
}
spin_lock_irqsave(&fnic->wq_copy_lock[hwq], flags);
- sc = scsi_host_find_tag(fnic->lport->host, id);
+ sc = scsi_host_find_tag(fnic->host, id);
WARN_ON_ONCE(!sc);
if (!sc) {
atomic64_inc(&fnic_stats->io_stats.sc_null);
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"icmnd_cmpl sc is null - "
"hdr status = %s tag = 0x%x desc = 0x%p\n",
fnic_fcpio_status_to_str(hdr_status), id, desc);
FNIC_TRACE(fnic_fcpio_icmnd_cmpl_handler,
- fnic->lport->host->host_no, id,
+ fnic->host->host_no, id,
((u64)icmnd_cmpl->_resvd0[1] << 16 |
(u64)icmnd_cmpl->_resvd0[0]),
((u64)hdr_status << 16 |
atomic64_inc(&fnic_stats->io_stats.ioreq_null);
fnic_priv(sc)->flags |= FNIC_IO_REQ_NULL;
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"icmnd_cmpl io_req is null - "
"hdr status = %s tag = 0x%x sc 0x%p\n",
fnic_fcpio_status_to_str(hdr_status), id, sc);
if(FCPIO_ABORTED == hdr_status)
fnic_priv(sc)->flags |= FNIC_IO_ABORTED;
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"icmnd_cmpl abts pending "
"hdr status = %s tag = 0x%x sc = 0x%p "
"scsi_status = %x residual = %d\n",
if (icmnd_cmpl->scsi_status == SAM_STAT_TASK_SET_FULL)
atomic64_inc(&fnic_stats->misc_stats.queue_fulls);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"xfer_len: %llu", xfer_len);
break;
if (hdr_status != FCPIO_SUCCESS) {
atomic64_inc(&fnic_stats->io_stats.io_failures);
- shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
+ shost_printk(KERN_ERR, fnic->host, "hdr status = %s\n",
fnic_fcpio_status_to_str(hdr_status));
}
hwq = blk_mq_unique_tag_to_hwq(id & FNIC_TAG_MASK);
if (hwq != cq_index) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x cq index: %d ",
hwq, mqtag, tag, cq_index);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hdr status: %s ITMF completion on the wrong queue\n",
fnic_fcpio_status_to_str(hdr_status));
}
if (tag > fnic->fnic_max_tag_id) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x cq index: %d ",
hwq, mqtag, tag, cq_index);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hdr status: %s Tag out of range\n",
fnic_fcpio_status_to_str(hdr_status));
return;
} else if ((tag == fnic->fnic_max_tag_id) && !(id & FNIC_TAG_DEV_RST)) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x cq index: %d ",
hwq, mqtag, tag, cq_index);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hdr status: %s Tag out of range\n",
fnic_fcpio_status_to_str(hdr_status));
return;
if (io_req)
sc = io_req->sc;
} else {
- sc = scsi_host_find_tag(fnic->lport->host, id & FNIC_TAG_MASK);
+ sc = scsi_host_find_tag(fnic->host, id & FNIC_TAG_MASK);
}
WARN_ON_ONCE(!sc);
if (!sc) {
atomic64_inc(&fnic_stats->io_stats.sc_null);
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"itmf_cmpl sc is null - hdr status = %s tag = 0x%x\n",
fnic_fcpio_status_to_str(hdr_status), tag);
return;
atomic64_inc(&fnic_stats->io_stats.ioreq_null);
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
fnic_priv(sc)->flags |= FNIC_IO_ABT_TERM_REQ_NULL;
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"itmf_cmpl io_req is null - "
"hdr status = %s tag = 0x%x sc 0x%p\n",
fnic_fcpio_status_to_str(hdr_status), tag, sc);
if ((id & FNIC_TAG_ABORT) && (id & FNIC_TAG_DEV_RST)) {
/* Abort and terminate completion of device reset req */
/* REVISIT : Add asserts about various flags */
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x hst: %s Abt/term completion received\n",
hwq, mqtag, tag,
fnic_fcpio_status_to_str(hdr_status));
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
} else if (id & FNIC_TAG_ABORT) {
/* Completion of abort cmd */
- shost_printk(KERN_DEBUG, fnic->lport->host,
+ shost_printk(KERN_DEBUG, fnic->host,
"hwq: %d mqtag: 0x%x tag: 0x%x Abort header status: %s\n",
hwq, mqtag, tag,
fnic_fcpio_status_to_str(hdr_status));
&term_stats->terminate_fw_timeouts);
break;
case FCPIO_ITMF_REJECTED:
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"abort reject recd. id %d\n",
(int)(id & FNIC_TAG_MASK));
break;
if (!(fnic_priv(sc)->flags & (FNIC_IO_ABORTED | FNIC_IO_DONE)))
atomic64_inc(&misc_stats->no_icmnd_itmf_cmpls);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"abts cmpl recd. id %d status %s\n",
(int)(id & FNIC_TAG_MASK),
fnic_fcpio_status_to_str(hdr_status));
if (io_req->abts_done) {
complete(io_req->abts_done);
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- shost_printk(KERN_INFO, fnic->lport->host,
+ shost_printk(KERN_INFO, fnic->host,
"hwq: %d mqtag: 0x%x tag: 0x%x Waking up abort thread\n",
hwq, mqtag, tag);
} else {
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x hst: %s Completing IO\n",
hwq, mqtag,
tag, fnic_fcpio_status_to_str(hdr_status));
}
} else if (id & FNIC_TAG_DEV_RST) {
/* Completion of device reset */
- shost_printk(KERN_INFO, fnic->lport->host,
+ shost_printk(KERN_INFO, fnic->host,
"hwq: %d mqtag: 0x%x tag: 0x%x DR hst: %s\n",
hwq, mqtag,
tag, fnic_fcpio_status_to_str(hdr_status));
sc->device->host->host_no, id, sc,
jiffies_to_msecs(jiffies - start_time),
desc, 0, fnic_flags_and_state(sc));
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x hst: %s Terminate pending\n",
hwq, mqtag,
tag, fnic_fcpio_status_to_str(hdr_status));
sc->device->host->host_no, id, sc,
jiffies_to_msecs(jiffies - start_time),
desc, 0, fnic_flags_and_state(sc));
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"dev reset cmpl recd after time out. "
"id %d status %s\n",
(int)(id & FNIC_TAG_MASK),
}
fnic_priv(sc)->state = FNIC_IOREQ_CMD_COMPLETE;
fnic_priv(sc)->flags |= FNIC_DEV_RST_DONE;
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x hst: %s DR completion received\n",
hwq, mqtag,
tag, fnic_fcpio_status_to_str(hdr_status));
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
} else {
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"%s: Unexpected itmf io state: hwq: %d tag 0x%x %s\n",
__func__, hwq, id, fnic_ioreq_state_to_str(fnic_priv(sc)->state));
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
break;
default:
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"firmware completion type %d\n",
desc->hdr.type);
break;
io_req = fnic_priv(sc)->io_req;
if (!io_req) {
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d mqtag: 0x%x tag: 0x%x flags: 0x%x No ioreq. Returning\n",
hwq, mqtag, tag, fnic_priv(sc)->flags);
return true;
mempool_free(io_req, fnic->io_req_pool);
sc->result = DID_TRANSPORT_DISRUPTED << 16;
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"mqtag: 0x%x tag: 0x%x sc: 0x%p duration = %lu DID_TRANSPORT_DISRUPTED\n",
mqtag, tag, sc, (jiffies - start_time));
struct scsi_cmnd *sc = NULL;
io_count = fnic_count_all_ioreqs(fnic);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Outstanding ioreq count: %d active io count: %lld Waiting\n",
io_count,
atomic64_read(&fnic->fnic_stats.io_stats.active_ios));
- scsi_host_busy_iter(fnic->lport->host,
+ scsi_host_busy_iter(fnic->host,
fnic_cleanup_io_iter, fnic);
/* with sg3utils device reset, SC needs to be retrieved from ioreq */
spin_unlock_irqrestore(&fnic->wq_copy_lock[0], flags);
while ((io_count = fnic_count_all_ioreqs(fnic))) {
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Outstanding ioreq count: %d active io count: %lld Waiting\n",
io_count,
atomic64_read(&fnic->fnic_stats.io_stats.active_ios));
if (id >= fnic->fnic_max_tag_id)
return;
- sc = scsi_host_find_tag(fnic->lport->host, id);
+ sc = scsi_host_find_tag(fnic->host, id);
if (!sc)
return;
wq_copy_cleanup_scsi_cmd:
sc->result = DID_NO_CONNECT << 16;
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num, "wq_copy_cleanup_handler:"
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num, "wq_copy_cleanup_handler:"
" DID_NO_CONNECT\n");
FNIC_TRACE(fnic_wq_copy_cleanup_handler,
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
atomic_dec(&fnic->in_flight);
atomic_dec(&tport->in_flight);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"fnic_queue_abort_io_req: failure: no descriptors\n");
atomic64_inc(&misc_stats->abts_cpwq_alloc_failures);
return 1;
hwq = blk_mq_unique_tag_to_hwq(abt_tag);
if (!sc) {
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"sc is NULL abt_tag: 0x%x hwq: %d\n", abt_tag, hwq);
return true;
}
if ((fnic_priv(sc)->flags & FNIC_DEVICE_RESET) &&
!(fnic_priv(sc)->flags & FNIC_DEV_RST_ISSUED)) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d abt_tag: 0x%x flags: 0x%x Device reset is not pending\n",
hwq, abt_tag, fnic_priv(sc)->flags);
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
}
if (io_req->abts_done) {
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"fnic_rport_exch_reset: io_req->abts_done is set state is %s\n",
fnic_ioreq_state_to_str(fnic_priv(sc)->state));
}
if (!(fnic_priv(sc)->flags & FNIC_IO_ISSUED)) {
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"rport_exch_reset IO not yet issued %p abt_tag 0x%x",
sc, abt_tag);
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"flags %x state %d\n", fnic_priv(sc)->flags,
fnic_priv(sc)->state);
}
if (fnic_priv(sc)->flags & FNIC_DEVICE_RESET) {
atomic64_inc(&reset_stats->device_reset_terminates);
abt_tag |= FNIC_TAG_DEV_RST;
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
+ "dev reset sc 0x%p\n", sc);
}
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"fnic_rport_exch_reset: dev rst sc 0x%p\n", sc);
WARN_ON_ONCE(io_req->abts_done);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"fnic_rport_reset_exch: Issuing abts\n");
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
* lun reset
*/
spin_lock_irqsave(&fnic->wq_copy_lock[hwq], flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d abt_tag: 0x%x flags: 0x%x Queuing abort failed\n",
hwq, abt_tag, fnic_priv(sc)->flags);
if (fnic_priv(sc)->state == FNIC_IOREQ_ABTS_PENDING)
.term_cnt = 0,
};
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"fnic rport exchange reset for tport: 0x%06x\n",
port_id);
return;
io_count = fnic_count_ioreqs(fnic, port_id);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Starting terminates: rport:0x%x portid-io-count: %d active-io-count: %lld\n",
port_id, io_count,
atomic64_read(&fnic->fnic_stats.io_stats.active_ios));
}
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- scsi_host_busy_iter(fnic->lport->host, fnic_rport_abort_io_iter,
+ scsi_host_busy_iter(fnic->host, fnic_rport_abort_io_iter,
&iter_data);
if (iter_data.term_cnt > atomic64_read(&term_stats->max_terminates))
while ((io_count = fnic_count_ioreqs(fnic, port_id)))
schedule_timeout(msecs_to_jiffies(1000));
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"rport: 0x%x remaining portid-io-count: %d ",
port_id, io_count);
}
{
int hwq = 0;
- fc_remove_host(fnic->lport->host);
- scsi_remove_host(fnic->lport->host);
+ fc_remove_host(fnic->host);
+ scsi_remove_host(fnic->host);
for (hwq = 0; hwq < fnic->wq_copy_count; hwq++)
kfree(fnic->sw_copy_wq[hwq].io_req_table);
}
tport = rdd_data->tport;
if (!tport) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Abort cmd called after tport delete! rport fcid: 0x%x",
rport->port_id);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"lun: %llu hwq: 0x%x mqtag: 0x%x Op: 0x%x flags: 0x%x\n",
sc->device->lun, hwq, mqtag,
sc->cmnd[0], fnic_priv(sc)->flags);
goto fnic_abort_cmd_end;
}
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Abort cmd called rport fcid: 0x%x lun: %llu hwq: 0x%x mqtag: 0x%x",
rport->port_id, sc->device->lun, hwq, mqtag);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Op: 0x%x flags: 0x%x\n",
sc->cmnd[0],
fnic_priv(sc)->flags);
if (iport->state != FNIC_IPORT_STATE_READY) {
atomic64_inc(&fnic_stats->misc_stats.iport_not_ready);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport NOT in READY state");
ret = FAILED;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
if ((tport->state != FDLS_TGT_STATE_READY) &&
(tport->state != FDLS_TGT_STATE_ADISC)) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"tport state: %d\n", tport->state);
ret = FAILED;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
else
atomic64_inc(&abts_stats->abort_issued_greater_than_60_sec);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"CDB Opcode: 0x%02x Abort issued time: %lu msec\n",
sc->cmnd[0], abt_issued_time);
/*
if (!(fnic_priv(sc)->flags & (FNIC_IO_ABORTED | FNIC_IO_DONE))) {
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Issuing host reset due to out of order IO\n");
ret = FAILED;
(u64)sc->cmnd[4] << 8 | sc->cmnd[5]),
fnic_flags_and_state(sc));
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Returning from abort cmd type %x %s\n", task_req,
(ret == SUCCESS) ?
"SUCCESS" : "FAILED");
free_wq_copy_descs(fnic, wq, hwq);
if (!vnic_wq_copy_desc_avail(wq)) {
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"queue_dr_io_req failure - no descriptors\n");
atomic64_inc(&misc_stats->devrst_cpwq_alloc_failures);
ret = -EAGAIN;
* Found IO that is still pending with firmware and
* belongs to the LUN that we are resetting
*/
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Found IO in %s on lun\n",
fnic_ioreq_state_to_str(fnic_priv(sc)->state));
}
if ((fnic_priv(sc)->flags & FNIC_DEVICE_RESET) &&
(!(fnic_priv(sc)->flags & FNIC_DEV_RST_ISSUED))) {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"dev rst not pending sc 0x%p\n", sc);
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
return true;
}
if (io_req->abts_done)
- shost_printk(KERN_ERR, fnic->lport->host,
+ shost_printk(KERN_ERR, fnic->host,
"%s: io_req->abts_done is set state is %s\n",
__func__, fnic_ioreq_state_to_str(fnic_priv(sc)->state));
old_ioreq_state = fnic_priv(sc)->state;
BUG_ON(io_req->abts_done);
if (fnic_priv(sc)->flags & FNIC_DEVICE_RESET) {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"dev rst sc 0x%p\n", sc);
}
fnic_priv(sc)->state = old_ioreq_state;
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
iter_data->ret = FAILED;
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"hwq: %d abt_tag: 0x%lx Abort could not be queued\n",
hwq, abt_tag);
return false;
iter_data.lr_sc = lr_sc;
- scsi_host_busy_iter(fnic->lport->host,
+ scsi_host_busy_iter(fnic->host,
fnic_pending_aborts_iter, &iter_data);
if (iter_data.ret == FAILED) {
ret = iter_data.ret;
ret = 1;
clean_pending_aborts_end:
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"exit status: %d\n", ret);
return ret;
}
rport = starget_to_rport(scsi_target(sc->device));
spin_lock_irqsave(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"fcid: 0x%x lun: %llu hwq: %d mqtag: 0x%x flags: 0x%x Device reset\n",
rport->port_id, sc->device->lun, hwq, mqtag,
fnic_priv(sc)->flags);
rdd_data = rport->dd_data;
tport = rdd_data->tport;
if (!tport) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Dev rst called after tport delete! rport fcid: 0x%x lun: %llu\n",
rport->port_id, sc->device->lun);
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
if (iport->state != FNIC_IPORT_STATE_READY) {
atomic64_inc(&fnic_stats->misc_stats.iport_not_ready);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"iport NOT in READY state");
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
goto fnic_device_reset_end;
if ((tport->state != FDLS_TGT_STATE_READY) &&
(tport->state != FDLS_TGT_STATE_ADISC)) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"tport state: %d\n", tport->state);
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
goto fnic_device_reset_end;
fnic_priv(sc)->lr_status = FCPIO_INVALID_CODE;
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num, "TAG %x\n", mqtag);
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num, "TAG %x\n", mqtag);
/*
* issue the device reset, if enqueue failed, clean up the ioreq
io_req = fnic_priv(sc)->io_req;
if (!io_req) {
spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"io_req is null mqtag 0x%x sc 0x%p\n", mqtag, sc);
goto fnic_device_reset_end;
}
if (exit_dr) {
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Host reset called for fnic. Exit device reset\n");
io_req->dr_done = NULL;
goto fnic_device_reset_clean;
*/
if (status == FCPIO_INVALID_CODE) {
atomic64_inc(&reset_stats->device_reset_timeouts);
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Device reset timed out\n");
fnic_priv(sc)->flags |= FNIC_DEV_RST_TIMED_OUT;
int_to_scsilun(sc->device->lun, &fc_lun);
if (status != FCPIO_SUCCESS) {
spin_lock_irqsave(&fnic->wq_copy_lock[hwq], flags);
FNIC_SCSI_DBG(KERN_DEBUG,
- fnic->lport->host, fnic->fnic_num,
+ fnic->host, fnic->fnic_num,
"Device reset completed - failed\n");
io_req = fnic_priv(sc)->io_req;
goto fnic_device_reset_clean;
if (fnic_clean_pending_aborts(fnic, sc, new_sc)) {
spin_lock_irqsave(&fnic->wq_copy_lock[hwq], flags);
io_req = fnic_priv(sc)->io_req;
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Device reset failed: Cannot abort all IOs\n");
goto fnic_device_reset_clean;
}
ret = FAILED;
break;
}
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"Cannot clean up all IOs for the LUN\n");
schedule_timeout(msecs_to_jiffies(1000));
count++;
}
- FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Returning from device reset %s\n",
(ret == SUCCESS) ?
"SUCCESS" : "FAILED");
fnic = *((struct fnic **) shost_priv(shost));
reset_stats = &fnic->fnic_stats.reset_stats;
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Issuing fnic reset\n");
atomic64_inc(&reset_stats->fnic_resets);
fnic_post_flogo_linkflap(fnic);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Returning from fnic reset");
atomic64_inc(&reset_stats->fnic_reset_completions);
int ret = 0;
struct fnic *fnic = *((struct fnic **) shost_priv(shost));
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FC host lip issued");
ret = fnic_host_reset(shost);
spin_lock_irqsave(&fnic->fnic_lock, flags);
if (fnic->reset_in_progress == IN_PROGRESS) {
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_WARNING, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_WARNING, fnic->host, fnic->fnic_num,
"Firmware reset in progress. Skipping another host reset\n");
return SUCCESS;
}
}
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"host reset return status: %d\n", ret);
return ret;
}
* Found IO that is still pending with firmware and
* belongs to the LUN that we are resetting
*/
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"hwq: %d tag: 0x%x Found IO in state: %s on lun\n",
hwq, tag,
fnic_ioreq_state_to_str(fnic_priv(sc)->state));
}
/* walk again to check, if IOs are still pending in fw */
- scsi_host_busy_iter(fnic->lport->host,
+ scsi_host_busy_iter(fnic->host,
fnic_abts_pending_iter, &iter_data);
return iter_data.ret;
struct Scsi_Host *shost = sc->device->host;
struct fnic *fnic = *((struct fnic **) shost_priv(shost));
- FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_ERR, fnic->host, fnic->fnic_num,
"SCSI error handling: fnic host reset");
ret = fnic_host_reset(shost);
if (unlikely(fnic->state == FNIC_IN_FC_TRANS_ETH_MODE)) {
/* fw reset is in progress, poll for its completion */
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"fnic is in unexpected state: %d for fw_reset\n",
fnic->state);
return;
fnic->fw_reset_done = &fw_reset_done;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Issuing fw reset\n");
if (fnic_fw_reset_handler(fnic)) {
spin_lock_irqsave(&fnic->fnic_lock, flags);
fnic->state = old_state;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
} else {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Waiting for fw completion\n");
time_remain = wait_for_completion_timeout(&fw_reset_done,
msecs_to_jiffies(FNIC_FW_RESET_TIMEOUT));
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Woken up after fw completion timeout\n");
if (time_remain == 0) {
- FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, fnic->fnic_num,
+ FNIC_SCSI_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"FW reset completion timed out after %d ms)\n",
FNIC_FW_RESET_TIMEOUT);
}