}
reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK;
- reply->reply_payload_rcv_len = blk_rq_bytes(job->req->next_rq);
+ reply->reply_payload_rcv_len = job->reply_payload.payload_len;
out:
job->state_flags = FC_RQST_STATE_DONE;
read_lock_irq(&zfcp_data.config_lock);
port = rport->dd_data;
if (port)
- zfcp_port_get(port);
+ els_fc_job->els.d_id = port->d_id;
read_unlock_irq(&zfcp_data.config_lock);
if (!port) {
kfree(els_fc_job);
return -EINVAL;
}
- els_fc_job->els.port = port;
- els_fc_job->els.d_id = port->d_id;
- zfcp_port_put(port);
} else {
port_did = job->request->rqst_data.h_els.port_id;
els_fc_job->els.d_id = (port_did[0] << 16) +
job->reply->reply_data.ctels_reply.status = ct_fc_job->ct.status ?
FC_CTELS_STATUS_REJECT : FC_CTELS_STATUS_OK;
+ job->reply->reply_payload_rcv_len = job->reply_payload.payload_len;
job->state_flags = FC_RQST_STATE_DONE;
- job->reply->reply_payload_rcv_len = blk_rq_bytes(job->req->next_rq);
job->job_done(job);
zfcp_wka_port_put(ct_fc_job->ct.wka_port);
case FSF_RESPONSE_SIZE_TOO_LARGE:
break;
case FSF_ACCESS_DENIED:
- zfcp_fsf_access_denied_port(req, port);
+ if (port)
+ zfcp_fsf_access_denied_port(req, port);
break;
case FSF_SBAL_MISMATCH:
/* should never occure, avoided in zfcp_fsf_send_els */