Home
last modified time | relevance | path

Searched refs:scmd (Results 1 – 25 of 62) sorted by relevance

123

/Linux-v5.4/drivers/scsi/
Dscsi_error.c53 static void scsi_eh_done(struct scsi_cmnd *scmd);
62 static int scsi_eh_try_stu(struct scsi_cmnd *scmd);
132 struct scsi_cmnd *scmd = in scmd_eh_abort_handler() local
134 struct scsi_device *sdev = scmd->device; in scmd_eh_abort_handler()
139 scmd_printk(KERN_INFO, scmd, in scmd_eh_abort_handler()
143 scmd_printk(KERN_INFO, scmd, in scmd_eh_abort_handler()
145 rtn = scsi_try_to_abort_cmd(sdev->host->hostt, scmd); in scmd_eh_abort_handler()
147 set_host_byte(scmd, DID_TIME_OUT); in scmd_eh_abort_handler()
150 scmd_printk(KERN_INFO, scmd, in scmd_eh_abort_handler()
153 } else if (!scsi_noretry_cmd(scmd) && in scmd_eh_abort_handler()
[all …]
Dmyrb.c1256 static int myrb_host_reset(struct scsi_cmnd *scmd) in myrb_host_reset() argument
1258 struct Scsi_Host *shost = scmd->device->host; in myrb_host_reset()
1266 struct scsi_cmnd *scmd) in myrb_pthru_queuecommand() argument
1269 struct myrb_cmdblk *cmd_blk = scsi_cmd_priv(scmd); in myrb_pthru_queuecommand()
1273 struct scsi_device *sdev = scmd->device; in myrb_pthru_queuecommand()
1282 nsge = scsi_dma_map(scmd); in myrb_pthru_queuecommand()
1285 scmd->result = (DID_ERROR << 16); in myrb_pthru_queuecommand()
1286 scmd->scsi_done(scmd); in myrb_pthru_queuecommand()
1291 mbox->type3.id = scmd->request->tag + 3; in myrb_pthru_queuecommand()
1295 switch (scmd->sc_data_direction) { in myrb_pthru_queuecommand()
[all …]
Dmvumi.c189 static int mvumi_make_sgl(struct mvumi_hba *mhba, struct scsi_cmnd *scmd, in mvumi_make_sgl() argument
195 unsigned int sgnum = scsi_sg_count(scmd); in mvumi_make_sgl()
198 *sg_count = dma_map_sg(&mhba->pdev->dev, scsi_sglist(scmd), sgnum, in mvumi_make_sgl()
199 scmd->sc_data_direction); in mvumi_make_sgl()
204 dma_unmap_sg(&mhba->pdev->dev, scsi_sglist(scmd), sgnum, in mvumi_make_sgl()
205 scmd->sc_data_direction); in mvumi_make_sgl()
208 scsi_for_each_sg(scmd, sg, *sg_count, i) { in mvumi_make_sgl()
338 cmd->scmd = NULL; in mvumi_return_cmd()
698 static int mvumi_host_reset(struct scsi_cmnd *scmd) in mvumi_host_reset() argument
702 mhba = (struct mvumi_hba *) scmd->device->host->hostdata; in mvumi_host_reset()
[all …]
Dmyrs.c1532 int myrs_host_reset(struct scsi_cmnd *scmd) in myrs_host_reset() argument
1534 struct Scsi_Host *shost = scmd->device->host; in myrs_host_reset()
1541 static void myrs_mode_sense(struct myrs_hba *cs, struct scsi_cmnd *scmd, in myrs_mode_sense() argument
1548 dbd = (scmd->cmnd[1] & 0x08) == 0x08; in myrs_mode_sense()
1581 scsi_sg_copy_from_buffer(scmd, modes, mode_len); in myrs_mode_sense()
1585 struct scsi_cmnd *scmd) in myrs_queuecommand() argument
1588 struct myrs_cmdblk *cmd_blk = scsi_cmd_priv(scmd); in myrs_queuecommand()
1590 struct scsi_device *sdev = scmd->device; in myrs_queuecommand()
1597 if (!scmd->device->hostdata) { in myrs_queuecommand()
1598 scmd->result = (DID_NO_CONNECT << 16); in myrs_queuecommand()
[all …]
Dscsi_logging.c29 static inline const char *scmd_name(const struct scsi_cmnd *scmd) in scmd_name() argument
31 return scmd->request->rq_disk ? in scmd_name()
32 scmd->request->rq_disk->disk_name : NULL; in scmd_name()
80 void scmd_printk(const char *level, const struct scsi_cmnd *scmd, in scmd_printk() argument
87 if (!scmd || !scmd->cmnd) in scmd_printk()
93 off = sdev_format_header(logbuf, logbuf_len, scmd_name(scmd), in scmd_printk()
94 scmd->request->tag); in scmd_printk()
100 dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf); in scmd_printk()
Dscsi_priv.h24 #define SCSI_SENSE_VALID(scmd) \ argument
25 (((scmd)->sense_buffer[0] & 0x70) == 0x70)
84 int scsi_noretry_cmd(struct scsi_cmnd *scmd);
Dsd.h139 static inline int scsi_medium_access_command(struct scsi_cmnd *scmd) in scsi_medium_access_command() argument
141 switch (scmd->cmnd[0]) { in scsi_medium_access_command()
159 switch (scmd->cmnd[9]) { in scsi_medium_access_command()
Dsd.c732 static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd, in sd_setup_protect_cmnd() argument
735 struct bio *bio = scmd->request->bio; in sd_setup_protect_cmnd()
736 unsigned int prot_op = sd_prot_op(rq_data_dir(scmd->request), dix, dif); in sd_setup_protect_cmnd()
741 scmd->prot_flags |= SCSI_PROT_IP_CHECKSUM; in sd_setup_protect_cmnd()
744 scmd->prot_flags |= SCSI_PROT_GUARD_CHECK; in sd_setup_protect_cmnd()
748 scmd->prot_flags |= SCSI_PROT_REF_INCREMENT; in sd_setup_protect_cmnd()
751 scmd->prot_flags |= SCSI_PROT_REF_CHECK; in sd_setup_protect_cmnd()
755 scmd->prot_flags |= SCSI_PROT_TRANSFER_PI; in sd_setup_protect_cmnd()
763 scsi_set_prot_op(scmd, prot_op); in sd_setup_protect_cmnd()
764 scsi_set_prot_type(scmd, dif); in sd_setup_protect_cmnd()
[all …]
D53c700.h28 #define CDEBUG(prefix, scmd, fmt, a...) \ argument
29 scmd_printk(prefix, scmd, fmt, ##a)
32 #define DDEBUG(prefix, scmd, fmt, a...) do {} while (0) argument
33 #define CDEBUG(prefix, scmd, fmt, a...) do {} while (0) argument
Dst.c3108 unsigned char scmd[MAX_COMMAND_SIZE]; in get_location() local
3114 memset(scmd, 0, MAX_COMMAND_SIZE); in get_location()
3116 scmd[0] = QFA_REQUEST_BLOCK; in get_location()
3117 scmd[4] = 3; in get_location()
3119 scmd[0] = READ_POSITION; in get_location()
3121 scmd[1] = 1; in get_location()
3123 SRpnt = st_do_scsi(NULL, STp, scmd, 20, DMA_FROM_DEVICE, in get_location()
3171 unsigned char scmd[MAX_COMMAND_SIZE]; in set_location() local
3200 memset(scmd, 0, MAX_COMMAND_SIZE); in set_location()
3202 scmd[0] = QFA_SEEK_BLOCK; in set_location()
[all …]
/Linux-v5.4/include/scsi/
Dscsi_cmnd.h241 static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) in scsi_set_prot_op() argument
243 scmd->prot_op = op; in scsi_set_prot_op()
246 static inline unsigned char scsi_get_prot_op(struct scsi_cmnd *scmd) in scsi_get_prot_op() argument
248 return scmd->prot_op; in scsi_get_prot_op()
272 static inline void scsi_set_prot_type(struct scsi_cmnd *scmd, unsigned char type) in scsi_set_prot_type() argument
274 scmd->prot_type = type; in scsi_set_prot_type()
277 static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd) in scsi_get_prot_type() argument
279 return scmd->prot_type; in scsi_get_prot_type()
282 static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) in scsi_get_lba() argument
284 return blk_rq_pos(scmd->request); in scsi_get_lba()
[all …]
Dscsi_eh.h12 extern void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
48 extern void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
52 extern void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
Dscsi_device.h257 #define scmd_dbg(scmd, fmt, a...) \ argument
259 if ((scmd)->request->rq_disk) \
260 sdev_dbg((scmd)->device, "[%s] " fmt, \
261 (scmd)->request->rq_disk->disk_name, ##a);\
263 sdev_dbg((scmd)->device, fmt, ##a); \
482 #define scmd_id(scmd) sdev_id((scmd)->device) argument
483 #define scmd_channel(scmd) sdev_channel((scmd)->device) argument
Dscsi_transport_srp.h121 enum blk_eh_timer_return srp_timed_out(struct scsi_cmnd *scmd);
/Linux-v5.4/Documentation/scsi/
Dscsi_eh.txt13 [1-2] How do scmd's get completed?
14 [1-2-1] Completing a scmd w/ scsi_done
15 [1-2-2] Completing a scmd w/ timeout
32 Each SCSI command is represented with struct scsi_cmnd (== scmd). A
33 scmd has two list_head's to link itself into lists. The two are
34 scmd->list and scmd->eh_entry. The former is used for free list or
35 per-device allocated scmd list and not of much interest to this EH
37 otherwise stated scmds are always linked using scmd->eh_entry in this
41 [1-2] How do scmd's get completed?
43 Once LLDD gets hold of a scmd, either the LLDD will complete the
[all …]
/Linux-v5.4/drivers/s390/scsi/
Dzfcp_dbf.h363 void _zfcp_dbf_scsi(char *tag, int level, struct scsi_cmnd *scmd, in _zfcp_dbf_scsi() argument
367 scmd->device->host->hostdata[0]; in _zfcp_dbf_scsi()
370 zfcp_dbf_scsi_common(tag, level, scmd->device, scmd, req); in _zfcp_dbf_scsi()
379 void zfcp_dbf_scsi_result(struct scsi_cmnd *scmd, struct zfcp_fsf_req *req) in zfcp_dbf_scsi_result() argument
381 if (scmd->result != 0) in zfcp_dbf_scsi_result()
382 _zfcp_dbf_scsi("rsl_err", 3, scmd, req); in zfcp_dbf_scsi_result()
383 else if (scmd->retries > 0) in zfcp_dbf_scsi_result()
384 _zfcp_dbf_scsi("rsl_ret", 4, scmd, req); in zfcp_dbf_scsi_result()
386 _zfcp_dbf_scsi("rsl_nor", 6, scmd, req); in zfcp_dbf_scsi_result()
394 void zfcp_dbf_scsi_fail_send(struct scsi_cmnd *scmd) in zfcp_dbf_scsi_fail_send() argument
[all …]
/Linux-v5.4/drivers/ata/
Dlibata-scsi.c868 struct scsi_cmnd *scmd = qc->scsicmd; in ata_qc_set_pc_nbytes() local
870 qc->extrabytes = scmd->request->extra_len; in ata_qc_set_pc_nbytes()
871 qc->nbytes = scsi_bufflen(scmd) + qc->extrabytes; in ata_qc_set_pc_nbytes()
1460 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_start_stop_xlat() local
1462 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat()
1466 if (scmd->cmd_len < 5) { in ata_scsi_start_stop_xlat()
1531 ata_scsi_set_invalid_field(qc->dev, scmd, fp, bp); in ata_scsi_start_stop_xlat()
1534 scmd->result = SAM_STAT_GOOD; in ata_scsi_start_stop_xlat()
1675 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_verify_xlat() local
1679 const u8 *cdb = scmd->cmnd; in ata_scsi_verify_xlat()
[all …]
/Linux-v5.4/drivers/macintosh/
Dsmu.c289 int smu_queue_simple(struct smu_simple_cmd *scmd, u8 command, in smu_queue_simple() argument
294 struct smu_cmd *cmd = &scmd->cmd; in smu_queue_simple()
298 if (data_len > sizeof(scmd->buffer)) in smu_queue_simple()
301 memset(scmd, 0, sizeof(*scmd)); in smu_queue_simple()
304 cmd->data_buf = scmd->buffer; in smu_queue_simple()
305 cmd->reply_len = sizeof(scmd->buffer); in smu_queue_simple()
306 cmd->reply_buf = scmd->buffer; in smu_queue_simple()
312 scmd->buffer[i] = (u8)va_arg(list, int); in smu_queue_simple()
744 list_add_tail(&cmd->scmd.link, &smu->cmd_list); in smu_i2c_complete_command()
765 cmd->scmd.reply_len = sizeof(cmd->pdata); in smu_i2c_retry()
[all …]
/Linux-v5.4/drivers/scsi/mpt3sas/
Dmpt3sas_scsih.c1476 struct scsi_cmnd *scmd = NULL; in mpt3sas_scsih_scsi_lookup_get() local
1493 return scmd; in mpt3sas_scsih_scsi_lookup_get()
1495 scmd = scsi_host_find_tag(ioc->shost, unique_tag); in mpt3sas_scsih_scsi_lookup_get()
1496 if (scmd) { in mpt3sas_scsih_scsi_lookup_get()
1497 st = scsi_cmd_priv(scmd); in mpt3sas_scsih_scsi_lookup_get()
1499 scmd = NULL; in mpt3sas_scsih_scsi_lookup_get()
1502 return scmd; in mpt3sas_scsih_scsi_lookup_get()
2787 _scsih_tm_display_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd) in _scsih_tm_display_info() argument
2789 struct scsi_target *starget = scmd->device->sdev_target; in _scsih_tm_display_info()
2803 scsi_print_command(scmd); in _scsih_tm_display_info()
[all …]
Dmpt3sas_warpdrive.c256 mpt3sas_setup_direct_io(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, in mpt3sas_setup_direct_io() argument
261 u8 num_pds, cmd = scmd->cmnd[0]; in mpt3sas_setup_direct_io()
262 struct scsiio_tracker *st = scsi_cmd_priv(scmd); in mpt3sas_setup_direct_io()
273 io_size = scsi_bufflen(scmd) >> raid_device->block_exponent; in mpt3sas_setup_direct_io()
Dmpt3sas_base.c419 struct scsi_cmnd *scmd; in _clone_sg_entries() local
444 scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); in _clone_sg_entries()
445 if (scmd == NULL) { in _clone_sg_entries()
451 sg_scmd = scsi_sglist(scmd); in _clone_sg_entries()
1832 struct scsi_cmnd *scmd) in _base_get_chain_buffer_tracker() argument
1835 struct scsiio_tracker *st = scsi_cmd_priv(scmd); in _base_get_chain_buffer_tracker()
2130 struct scsi_cmnd *scmd, in base_make_prp_nvme() argument
2141 int data_len = scsi_bufflen(scmd); in base_make_prp_nvme()
2194 sg_scmd = scsi_sglist(scmd); in base_make_prp_nvme()
2222 scmd, "page boundary curr_buff: 0x%p\n", in base_make_prp_nvme()
[all …]
/Linux-v5.4/drivers/scsi/megaraid/
Dmegaraid_sas_fusion.c261 cmd->scmd = NULL; in megasas_return_cmd_fusion()
960 cmd->scmd = NULL; in megasas_alloc_cmds_fusion()
1965 struct scsi_cmnd *scmd, u8 status, u8 ext_status, in map_cmd_status() argument
1971 cmd_type = megasas_cmd_type(scmd); in map_cmd_status()
1975 scmd->result = DID_OK << 16; in map_cmd_status()
1980 scmd->result = (DID_ERROR << 16) | ext_status; in map_cmd_status()
1985 scmd->result = (DID_OK << 16) | ext_status; in map_cmd_status()
1987 memset(scmd->sense_buffer, 0, in map_cmd_status()
1989 memcpy(scmd->sense_buffer, sense, in map_cmd_status()
1991 scmd->result |= DRIVER_SENSE << 24; in map_cmd_status()
[all …]
Dmegaraid_sas_base.c223 struct scsi_cmnd *scmd);
351 cmd->scmd = NULL; in megasas_return_cmd()
1666 if (!cmd->scmd) in megasas_dump_pending_frames()
1669 if (megasas_cmd_type(cmd->scmd) == READ_WRITE_LDIO) { in megasas_dump_pending_frames()
1714 struct scsi_cmnd *scmd) in megasas_build_and_issue_cmd() argument
1726 if (megasas_cmd_type(scmd) == READ_WRITE_LDIO) in megasas_build_and_issue_cmd()
1727 frame_count = megasas_build_ldio(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1729 frame_count = megasas_build_dcdb(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1734 cmd->scmd = scmd; in megasas_build_and_issue_cmd()
1735 scmd->SCp.ptr = (char *)cmd; in megasas_build_and_issue_cmd()
[all …]
/Linux-v5.4/drivers/scsi/smartpqi/
Dsmartpqi_init.c67 struct scsi_cmnd *scmd, u32 aio_handle, u8 *cdb,
188 static inline void pqi_scsi_done(struct scsi_cmnd *scmd) in pqi_scsi_done() argument
190 pqi_prep_for_scsi_done(scmd); in pqi_scsi_done()
191 scmd->scsi_done(scmd); in pqi_scsi_done()
536 io_request->scmd = NULL; in pqi_reinit_io_request()
2326 struct pqi_scsi_dev *device, struct scsi_cmnd *scmd, in pqi_raid_bypass_submit_scsi_cmd() argument
2373 switch (scmd->cmnd[0]) { in pqi_raid_bypass_submit_scsi_cmd()
2378 first_block = (u64)(((scmd->cmnd[1] & 0x1f) << 16) | in pqi_raid_bypass_submit_scsi_cmd()
2379 (scmd->cmnd[2] << 8) | scmd->cmnd[3]); in pqi_raid_bypass_submit_scsi_cmd()
2380 block_cnt = (u32)scmd->cmnd[4]; in pqi_raid_bypass_submit_scsi_cmd()
[all …]
/Linux-v5.4/arch/powerpc/include/asm/
Dsmu.h427 extern int smu_queue_simple(struct smu_simple_cmd *scmd, u8 command,
445 static inline void smu_spinwait_simple(struct smu_simple_cmd *scmd) in smu_spinwait_simple() argument
447 smu_spinwait_cmd(&scmd->cmd); in smu_spinwait_simple()
503 struct smu_cmd scmd; member

123