• Home
  • Raw
  • Download

Lines Matching full:fcp

105 	struct fcp_resp_with_ext *fcp;  in ft_queue_status()  local
116 len = sizeof(*fcp) + se_cmd->scsi_sense_length; in ft_queue_status()
123 fcp = fc_frame_payload_get(fp, len); in ft_queue_status()
124 memset(fcp, 0, len); in ft_queue_status()
125 fcp->resp.fr_status = se_cmd->scsi_status; in ft_queue_status()
129 fcp->resp.fr_flags |= FCP_SNS_LEN_VAL; in ft_queue_status()
130 fcp->ext.fr_sns_len = htonl(len); in ft_queue_status()
131 memcpy((fcp + 1), se_cmd->sense_buffer, len); in ft_queue_status()
140 fcp->resp.fr_flags |= FCP_RESID_OVER; in ft_queue_status()
142 fcp->resp.fr_flags |= FCP_RESID_UNDER; in ft_queue_status()
143 fcp->ext.fr_resid = cpu_to_be32(se_cmd->residual_count); in ft_queue_status()
267 * Send a FCP response including SCSI status and optional FCP rsp_code.
279 struct fcp_resp_with_ext *fcp; in ft_send_resp_status() local
283 pr_debug("FCP error response: did %x oxid %x status %x code %x\n", in ft_send_resp_status()
285 len = sizeof(*fcp); in ft_send_resp_status()
291 fcp = fc_frame_payload_get(fp, len); in ft_send_resp_status()
292 memset(fcp, 0, len); in ft_send_resp_status()
293 fcp->resp.fr_status = status; in ft_send_resp_status()
295 fcp->ext.fr_rsp_len = htonl(sizeof(*info)); in ft_send_resp_status()
296 fcp->resp.fr_flags |= FCP_RSP_LEN_VAL; in ft_send_resp_status()
297 info = (struct fcp_resp_rsp_info *)(fcp + 1); in ft_send_resp_status()
338 struct fcp_cmnd *fcp; in ft_send_tm() local
342 fcp = fc_frame_payload_get(cmd->req_frame, sizeof(*fcp)); in ft_send_tm()
344 switch (fcp->fc_tm_flags) { in ft_send_tm()
365 pr_debug("invalid FCP tm_flags %x\n", fcp->fc_tm_flags); in ft_send_tm()
372 &cmd->ft_sense_buffer[0], scsilun_to_int(&fcp->fc_lun), in ft_send_tm()
405 pr_debug("tmr fn %d resp %d fcp code %d\n", in ft_queue_tm_resp()
424 * Handle incoming FCP command.
463 * Handle incoming FCP frame.
464 * Caller has verified that the frame is type FCP.
495 struct fcp_cmnd *fcp; in ft_send_work() local
499 fcp = fc_frame_payload_get(cmd->req_frame, sizeof(*fcp)); in ft_send_work()
500 if (!fcp) in ft_send_work()
503 if (fcp->fc_flags & FCP_CFL_LEN_MASK) in ft_send_work()
507 * Check for FCP task management flags in ft_send_work()
509 if (fcp->fc_tm_flags) { in ft_send_work()
514 switch (fcp->fc_flags & (FCP_CFL_RDDATA | FCP_CFL_WRDATA)) { in ft_send_work()
530 switch (fcp->fc_pri_ta & FCP_PTA_MASK) { in ft_send_work()
551 if (target_submit_cmd(&cmd->se_cmd, cmd->sess->se_sess, fcp->fc_cdb, in ft_send_work()
552 &cmd->ft_sense_buffer[0], scsilun_to_int(&fcp->fc_lun), in ft_send_work()
553 ntohl(fcp->fc_dl), task_attr, data_dir, in ft_send_work()