Lines Matching refs:cmnd
592 struct scsi_cmnd *cmnd)
631 struct scsi_cmnd *cmnd)
644 if (cmnd && phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_HDWQ) {
645 tag = blk_mq_unique_tag(cmnd->request);
743 struct scsi_cmnd *cmnd)
745 return phba->lpfc_get_scsi_buf(phba, ndlp, cmnd);
825 * This routine does the pci dma mapping for scatter-gather list of scsi cmnd
2913 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0],
2925 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0],
2943 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0],
2960 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0],
2977 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0],
3021 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0],
3037 * This routine does the pci dma mapping for scatter-gather list of scsi cmnd
3490 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd;
3503 if ((cmnd->result == SAM_STAT_TASK_SET_FULL) ||
3504 (cmnd->result == SAM_STAT_BUSY)) {
3511 (cmnd->result == SAM_STAT_TASK_SET_FULL) ?
3513 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun;
3519 ((cmnd->cmnd[0] == READ_10) || (cmnd->cmnd[0] == WRITE_10))) {
3528 cmnd->device->lun;
3534 cmnd->sense_buffer[2] & 0xf;
3535 fast_path_evt->un.check_cond_evt.asc = cmnd->sense_buffer[12];
3536 fast_path_evt->un.check_cond_evt.ascq = cmnd->sense_buffer[13];
3537 } else if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) &&
3557 fast_path_evt->un.read_check_error.lun = cmnd->device->lun;
3558 fast_path_evt->un.read_check_error.opcode = cmnd->cmnd[0];
3612 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd;
3640 "tgt x%x lun x%llx cmnd x%x rsplen "
3641 "x%x\n", cmnd->device->id,
3642 cmnd->device->lun, cmnd->cmnd[0],
3651 "tgt x%x lun x%llx cmnd x%x rspInfo3 x%x\n",
3652 cmnd->device->id,
3653 cmnd->device->lun, cmnd->cmnd[0],
3667 memcpy(cmnd->sense_buffer, &fcprsp->rspInfo0 + rsplen, snslen);
3669 lp = (uint32_t *)cmnd->sense_buffer;
3684 cmnd->cmnd[0], scsi_status,
3691 scsi_set_resid(cmnd, 0);
3694 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId));
3700 scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0],
3701 cmnd->underflow);
3708 if (fcpi_parm && (scsi_get_resid(cmnd) != fcpi_parm)) {
3714 scsi_get_resid(cmnd), fcpi_parm,
3715 cmnd->cmnd[0]);
3716 scsi_set_resid(cmnd, scsi_bufflen(cmnd));
3720 * The cmnd->underflow is the minimum number of bytes that must
3727 (scsi_bufflen(cmnd) - scsi_get_resid(cmnd)
3728 < cmnd->underflow)) {
3733 cmnd->cmnd[0], scsi_bufflen(cmnd),
3734 scsi_get_resid(cmnd), cmnd->underflow);
3740 "Data: x%x x%x\n", cmnd->cmnd[0],
3741 scsi_bufflen(cmnd), scsi_get_resid(cmnd));
3752 ((cmnd->sc_data_direction == DMA_FROM_DEVICE) ?
3758 fcpi_parm, cmnd->cmnd[0], scsi_status);
3778 scsi_set_resid(cmnd, scsi_bufflen(cmnd));
3782 cmnd->result = host_status << 16 | scsi_status;
3787 * lpfc_scsi_cmd_iocb_cmpl - Scsi cmnd IOCB completion routine
3789 * @pIocbIn: The command IOCBQ for the scsi cmnd.
3790 * @pIocbOut: The response IOCBQ for the scsi cmnd.
3892 cmd->cmnd[0],
4017 ((cmd->cmnd[0] == READ_10) ||
4018 (cmd->cmnd[0] == WRITE_10)))
4074 * lpfc_scsi_prep_cmnd - Wrapper func for convert scsi cmnd to FCP info unit
4109 memcpy(ptr, scsi_cmnd->cmnd, scsi_cmnd->cmd_len);
4490 * @cmnd: Pointer to scsi_cmnd data structure.
4502 lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
4509 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
4518 rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
4526 cmnd->result = err;
4531 if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) &&
4538 cmnd->cmnd[0], scsi_get_prot_op(cmnd),
4539 dif_op_str[scsi_get_prot_op(cmnd)]);
4580 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp, cmnd);
4594 lpfc_cmd->pCmd = cmnd;
4597 cmnd->host_scribble = (unsigned char *)lpfc_cmd;
4599 if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) {
4605 dif_op_str[scsi_get_prot_op(cmnd)],
4606 cmnd->cmnd[0],
4607 (unsigned long long)scsi_get_lba(cmnd),
4608 blk_rq_sectors(cmnd->request),
4609 (cmnd->cmnd[1]>>5));
4618 cmnd->cmnd[0],
4619 (unsigned long long)scsi_get_lba(cmnd),
4620 blk_rq_sectors(cmnd->request),
4621 (cmnd->cmnd[1]>>5));
4628 cmnd->result = DID_ERROR << 16;
4657 err, cmnd->cmnd[0],
4658 cmnd->device ? cmnd->device->id : 0xffff,
4659 cmnd->device ? cmnd->device->lun : (u64) -1,
4667 (cmnd->request->timeout / 1000));
4710 cmnd->scsi_done(cmnd);
4717 * @cmnd: Pointer to scsi_cmnd data structure.
4719 * This routine aborts @cmnd pending in base driver.
4726 lpfc_abort_handler(struct scsi_cmnd *cmnd)
4728 struct Scsi_Host *shost = cmnd->device->host;
4741 status = fc_block_scsi_eh(cmnd);
4745 lpfc_cmd = (struct lpfc_io_buf *)cmnd->host_scribble;
4766 SUCCESS, cmnd->device->id, cmnd->device->lun);
4793 if (lpfc_cmd->pCmd != cmnd) {
4886 (lpfc_cmd->pCmd != cmnd),
4891 if (lpfc_cmd->pCmd == cmnd) {
4898 cmnd->device->id, cmnd->device->lun);
4916 "LUN %llu\n", ret, cmnd->device->id,
4917 cmnd->device->lun);
5032 lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd,
5045 rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
5055 lpfc_cmd->pCmd = cmnd;
5121 * @cmnd: Pointer to scsi_cmnd data structure.
5131 lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd)
5137 rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
5155 rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
5214 * @cmnd: Pointer to scsi_cmnd data structure.
5224 lpfc_device_reset_handler(struct scsi_cmnd *cmnd)
5226 struct Scsi_Host *shost = cmnd->device->host;
5230 unsigned tgt_id = cmnd->device->id;
5231 uint64_t lun_id = cmnd->device->lun;
5235 rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
5243 status = fc_block_scsi_eh(cmnd);
5247 status = lpfc_chk_tgt_mapped(vport, cmnd);
5263 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id,
5285 * @cmnd: Pointer to scsi_cmnd data structure.
5295 lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
5297 struct Scsi_Host *shost = cmnd->device->host;
5301 unsigned tgt_id = cmnd->device->id;
5302 uint64_t lun_id = cmnd->device->lun;
5306 rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
5314 status = fc_block_scsi_eh(cmnd);
5318 status = lpfc_chk_tgt_mapped(vport, cmnd);
5342 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id,
5363 * @cmnd: Pointer to scsi_cmnd data structure.
5365 * This routine does target reset to all targets on @cmnd->device->host.
5373 lpfc_bus_reset_handler(struct scsi_cmnd *cmnd)
5375 struct Scsi_Host *shost = cmnd->device->host;
5391 status = fc_block_scsi_eh(cmnd);
5422 status = lpfc_send_taskmgmt(vport, cmnd,
5450 * @cmnd: Pointer to scsi_cmnd data structure.
5465 lpfc_host_reset_handler(struct scsi_cmnd *cmnd)
5467 struct Scsi_Host *shost = cmnd->device->host;
5997 lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
6003 lpfc_no_handler(struct scsi_cmnd *cmnd)