Lines Matching refs:scsi
13 #include <scsi/fc/fc_els.h>
14 #include <scsi/fc/fc_fcp.h>
15 #include <scsi/fc/fc_ns.h>
16 #include <scsi/scsi_cmnd.h>
17 #include <scsi/scsi_tcq.h>
194 * @scsi: scsi_cmnd where to get LUN, task attributes/flags and CDB
197 void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi)
201 int_to_scsilun(scsi->device->lun, (struct scsi_lun *) &fcp->fc_lun);
203 if (scsi_populate_tag_msg(scsi, tag)) {
215 if (scsi->sc_data_direction == DMA_FROM_DEVICE)
217 if (scsi->sc_data_direction == DMA_TO_DEVICE)
220 memcpy(fcp->fc_cdb, scsi->cmnd, scsi->cmd_len);
222 fcp->fc_dl = scsi_bufflen(scsi);
224 if (scsi_get_prot_type(scsi) == SCSI_PROT_DIF_TYPE1)
225 fcp->fc_dl += fcp->fc_dl / scsi->device->sector_size * 8;
244 * @scsi: SCSI command where to update status and sense buffer
248 struct scsi_cmnd *scsi)
255 set_msg_byte(scsi, COMMAND_COMPLETE);
256 scsi->result |= fcp_rsp->resp.fr_status;
263 set_host_byte(scsi, DID_OK);
265 set_host_byte(scsi, DID_ERROR);
276 memcpy(scsi->sense_buffer, sense, sense_len);
281 scsi_set_resid(scsi, resid);
282 if (scsi_bufflen(scsi) - resid < scsi->underflow &&
285 set_host_byte(scsi, DID_ERROR);