Home
last modified time | relevance | path

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

12

/linux-2.6.39/drivers/scsi/
Dscsi_error.c94 int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag) in scsi_eh_scmd_add() argument
96 struct Scsi_Host *shost = scmd->device->host; in scsi_eh_scmd_add()
109 scmd->eh_eflags |= eh_flag; in scsi_eh_scmd_add()
110 list_add_tail(&scmd->eh_entry, &shost->eh_cmd_q); in scsi_eh_scmd_add()
130 struct scsi_cmnd *scmd = req->special; in scsi_times_out() local
132 struct Scsi_Host *host = scmd->device->host; in scsi_times_out()
134 trace_scsi_dispatch_cmd_timeout(scmd); in scsi_times_out()
135 scsi_log_completion(scmd, TIMEOUT_ERROR); in scsi_times_out()
138 rtn = host->transportt->eh_timed_out(scmd); in scsi_times_out()
140 rtn = host->hostt->eh_timed_out(scmd); in scsi_times_out()
[all …]
Dscsi_priv.h21 #define SCSI_SENSE_VALID(scmd) \ argument
22 (((scmd)->sense_buffer[0] & 0x70) == 0x70)
78 int scsi_noretry_cmd(struct scsi_cmnd *scmd);
Dsd_dif.c429 void sd_dif_complete(struct scsi_cmnd *scmd, unsigned int good_bytes) in sd_dif_complete() argument
438 sdkp = scsi_disk(scmd->request->rq_disk); in sd_dif_complete()
443 sector_sz = scmd->device->sector_size; in sd_dif_complete()
446 phys = blk_rq_pos(scmd->request) & 0xffffffff; in sd_dif_complete()
450 __rq_for_each_bio(bio, scmd->request) { in sd_dif_complete()
Dsd.c461 static void sd_prot_op(struct scsi_cmnd *scmd, unsigned int dif) in sd_prot_op() argument
464 unsigned int dix = scsi_prot_sg_count(scmd); in sd_prot_op()
466 if (scmd->sc_data_direction == DMA_FROM_DEVICE) { in sd_prot_op()
482 scsi_set_prot_op(scmd, prot_op); in sd_prot_op()
483 scsi_set_prot_type(scmd, dif); in sd_prot_op()
1306 static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd) in sd_completed_bytes() argument
1308 u64 start_lba = blk_rq_pos(scmd->request); in sd_completed_bytes()
1309 u64 end_lba = blk_rq_pos(scmd->request) + (scsi_bufflen(scmd) / 512); in sd_completed_bytes()
1316 unsigned int transferred = scsi_bufflen(scmd) - scsi_get_resid(scmd); in sd_completed_bytes()
1319 if (scmd->request->cmd_type != REQ_TYPE_FS) in sd_completed_bytes()
[all …]
D53c700.h27 #define CDEBUG(prefix, scmd, fmt, a...) \ argument
28 scmd_printk(prefix, scmd, fmt, ##a)
31 #define DDEBUG(prefix, scmd, fmt, a...) do {} while (0) argument
32 #define CDEBUG(prefix, scmd, fmt, a...) do {} while (0) argument
Dmegaraid.c369 megaraid_queue_lck(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *)) in megaraid_queue_lck() argument
376 adapter = (adapter_t *)scmd->device->host->hostdata; in megaraid_queue_lck()
378 scmd->scsi_done = done; in megaraid_queue_lck()
391 scb = mega_build_cmd(adapter, scmd, &busy); in megaraid_queue_lck()
4418 Scsi_Cmnd *scmd; in mega_internal_command() local
4423 scmd = scsi_allocate_command(GFP_KERNEL); in mega_internal_command()
4424 if (!scmd) in mega_internal_command()
4438 scmd->device = sdev; in mega_internal_command()
4441 scmd->cmnd = adapter->int_cdb; in mega_internal_command()
4442 scmd->device->host = adapter->host; in mega_internal_command()
[all …]
Dtmscsim.c508 struct scsi_cmnd *scmd = pSRB->pcmd; in dc390_StartSCSI() local
509 struct scsi_device *sdev = scmd->device; in dc390_StartSCSI()
540 scmd->cmnd[0], pDCB->SyncMode)); in dc390_StartSCSI()
553 (((scmd->cmnd[0] == REQUEST_SENSE || (pSRB->SRBFlag & AUTO_REQSENSE)) && in dc390_StartSCSI()
554 !(pDCB->SyncMode & SYNC_NEGO_DONE)) || scmd->cmnd[0] == INQUIRY)) in dc390_StartSCSI()
563 if ((pDCB->SyncMode & EN_TAG_QUEUEING) && disc_allowed && scsi_populate_tag_msg(scmd, tag)) { in dc390_StartSCSI()
568 …DEBUG1(printk(KERN_INFO "DC390: Select w/DisCn for Cmd %li (SRB %p), block tag %02x\n", scmd->seri… in dc390_StartSCSI()
573 …lect w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", disc_allowed ? "" : "o", scmd->serial_number, pSR… in dc390_StartSCSI()
610 ptr = (u8 *)scmd->cmnd; in dc390_StartSCSI()
611 for (i = 0; i < scmd->cmd_len; i++) in dc390_StartSCSI()
[all …]
Dconstants.c1293 scsi_cmd_print_sense_hdr(struct scsi_cmnd *scmd, const char *desc, in scsi_cmd_print_sense_hdr() argument
1296 scmd_printk(KERN_INFO, scmd, "%s: ", desc); in scsi_cmd_print_sense_hdr()
1298 scmd_printk(KERN_INFO, scmd, "%s: ", desc); in scsi_cmd_print_sense_hdr()
Dst.c2997 unsigned char scmd[MAX_COMMAND_SIZE]; in get_location() local
3004 memset(scmd, 0, MAX_COMMAND_SIZE); in get_location()
3006 scmd[0] = QFA_REQUEST_BLOCK; in get_location()
3007 scmd[4] = 3; in get_location()
3009 scmd[0] = READ_POSITION; in get_location()
3011 scmd[1] = 1; in get_location()
3013 SRpnt = st_do_scsi(NULL, STp, scmd, 20, DMA_FROM_DEVICE, in get_location()
3061 unsigned char scmd[MAX_COMMAND_SIZE]; in set_location() local
3091 memset(scmd, 0, MAX_COMMAND_SIZE); in set_location()
3093 scmd[0] = QFA_SEEK_BLOCK; in set_location()
[all …]
Dscsi_debug.c1686 static int do_device_access(struct scsi_cmnd *scmd, in do_device_access() argument
1700 ret = func(scmd, fake_storep + (block * scsi_debug_sector_size), in do_device_access()
1703 ret = func(scmd, fake_storep, rest * scsi_debug_sector_size); in do_device_access()
2092 static int resp_write_same(struct scsi_cmnd *scmd, unsigned long long lba, in resp_write_same() argument
2118 ret = fetch_to_dev_buffer(scmd, in resp_write_same()
2150 static int resp_unmap(struct scsi_cmnd * scmd, struct sdebug_dev_info * devip) in resp_unmap() argument
2157 ret = check_readiness(scmd, 1, devip); in resp_unmap()
2161 payload_len = get_unaligned_be16(&scmd->cmnd[7]); in resp_unmap()
2162 BUG_ON(scsi_bufflen(scmd) != payload_len); in resp_unmap()
2166 buf = kmalloc(scsi_bufflen(scmd), GFP_ATOMIC); in resp_unmap()
[all …]
/linux-2.6.39/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-2.6.39/drivers/s390/scsi/
Dzfcp_dbf.h313 void _zfcp_dbf_scsi(char *tag, int level, struct scsi_cmnd *scmd, in _zfcp_dbf_scsi() argument
317 scmd->device->host->hostdata[0]; in _zfcp_dbf_scsi()
320 zfcp_dbf_scsi(tag, scmd, req); in _zfcp_dbf_scsi()
329 void zfcp_dbf_scsi_result(struct scsi_cmnd *scmd, struct zfcp_fsf_req *req) in zfcp_dbf_scsi_result() argument
331 if (scmd->result != 0) in zfcp_dbf_scsi_result()
332 _zfcp_dbf_scsi("rsl_err", 3, scmd, req); in zfcp_dbf_scsi_result()
333 else if (scmd->retries > 0) in zfcp_dbf_scsi_result()
334 _zfcp_dbf_scsi("rsl_ret", 4, scmd, req); in zfcp_dbf_scsi_result()
336 _zfcp_dbf_scsi("rsl_nor", 6, scmd, req); in zfcp_dbf_scsi_result()
344 void zfcp_dbf_scsi_fail_send(struct scsi_cmnd *scmd) in zfcp_dbf_scsi_fail_send() argument
[all …]
Dzfcp_scsi.c687 void zfcp_scsi_dif_sense_error(struct scsi_cmnd *scmd, int ascq) in zfcp_scsi_dif_sense_error() argument
689 scsi_build_sense_buffer(1, scmd->sense_buffer, in zfcp_scsi_dif_sense_error()
691 set_driver_byte(scmd, DRIVER_SENSE); in zfcp_scsi_dif_sense_error()
692 scmd->result |= SAM_STAT_CHECK_CONDITION; in zfcp_scsi_dif_sense_error()
693 set_host_byte(scmd, DID_SOFT_ERROR); in zfcp_scsi_dif_sense_error()
/linux-2.6.39/drivers/scsi/mpt2sas/
Dmpt2sas_scsih.c831 return ioc->scsi_lookup[smid - 1].scmd; in _scsih_scsi_lookup_get()
846 struct scsi_cmnd *scmd; in _scsih_scsi_lookup_get_clear() local
849 scmd = ioc->scsi_lookup[smid - 1].scmd; in _scsih_scsi_lookup_get_clear()
850 ioc->scsi_lookup[smid - 1].scmd = NULL; in _scsih_scsi_lookup_get_clear()
853 return scmd; in _scsih_scsi_lookup_get_clear()
868 *scmd) in _scsih_scsi_lookup_find_by_scmd()
877 if (ioc->scsi_lookup[i].scmd == scmd) { in _scsih_scsi_lookup_find_by_scmd()
908 if (ioc->scsi_lookup[i].scmd && in _scsih_scsi_lookup_find_by_target()
909 (ioc->scsi_lookup[i].scmd->device->id == id && in _scsih_scsi_lookup_find_by_target()
910 ioc->scsi_lookup[i].scmd->device->channel == channel)) { in _scsih_scsi_lookup_find_by_target()
[all …]
Dmpt2sas_base.h478 struct scsi_cmnd *scmd; member
862 struct scsi_cmnd *scmd);
897 ulong timeout, struct scsi_cmnd *scmd);
/linux-2.6.39/include/scsi/
Dscsi_cmnd.h234 static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) in scsi_set_prot_op() argument
236 scmd->prot_op = op; in scsi_set_prot_op()
239 static inline unsigned char scsi_get_prot_op(struct scsi_cmnd *scmd) in scsi_get_prot_op() argument
241 return scmd->prot_op; in scsi_get_prot_op()
257 static inline void scsi_set_prot_type(struct scsi_cmnd *scmd, unsigned char type) in scsi_set_prot_type() argument
259 scmd->prot_type = type; in scsi_set_prot_type()
262 static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd) in scsi_get_prot_type() argument
264 return scmd->prot_type; in scsi_get_prot_type()
267 static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) in scsi_get_lba() argument
269 return blk_rq_pos(scmd->request); in scsi_get_lba()
Dscsi_device.h219 #define scmd_printk(prefix, scmd, fmt, a...) \ argument
220 (scmd)->request->rq_disk ? \
221 sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \
222 (scmd)->request->rq_disk->disk_name, ##a) : \
223 sdev_printk(prefix, (scmd)->device, fmt, ##a)
411 #define scmd_id(scmd) sdev_id((scmd)->device) argument
412 #define scmd_channel(scmd) sdev_channel((scmd)->device) argument
Dscsi_eh.h39 extern void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
88 extern void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
92 extern void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
/linux-2.6.39/drivers/macintosh/
Dsmu.c293 int smu_queue_simple(struct smu_simple_cmd *scmd, u8 command, in smu_queue_simple() argument
298 struct smu_cmd *cmd = &scmd->cmd; in smu_queue_simple()
302 if (data_len > sizeof(scmd->buffer)) in smu_queue_simple()
305 memset(scmd, 0, sizeof(*scmd)); in smu_queue_simple()
308 cmd->data_buf = scmd->buffer; in smu_queue_simple()
309 cmd->reply_len = sizeof(scmd->buffer); in smu_queue_simple()
310 cmd->reply_buf = scmd->buffer; in smu_queue_simple()
316 scmd->buffer[i] = (u8)va_arg(list, int); in smu_queue_simple()
747 list_add_tail(&cmd->scmd.link, &smu->cmd_list); in smu_i2c_complete_command()
768 cmd->scmd.reply_len = sizeof(cmd->pdata); in smu_i2c_retry()
[all …]
/linux-2.6.39/drivers/ata/
Dlibata-scsi.c758 struct scsi_cmnd *scmd = qc->scsicmd; in ata_qc_set_pc_nbytes() local
760 qc->extrabytes = scmd->request->extra_len; in ata_qc_set_pc_nbytes()
761 qc->nbytes = scsi_bufflen(scmd) + qc->extrabytes; in ata_qc_set_pc_nbytes()
1288 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_start_stop_xlat() local
1290 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat()
1292 if (scmd->cmd_len < 5) in ata_scsi_start_stop_xlat()
1349 ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0); in ata_scsi_start_stop_xlat()
1353 scmd->result = SAM_STAT_GOOD; in ata_scsi_start_stop_xlat()
1494 struct scsi_cmnd *scmd = qc->scsicmd; in ata_scsi_verify_xlat() local
1498 const u8 *cdb = scmd->cmnd; in ata_scsi_verify_xlat()
[all …]
Dlibata-eh.c645 struct scsi_cmnd *scmd, *tmp; in ata_scsi_cmd_error_handler() local
662 list_for_each_entry_safe(scmd, tmp, eh_work_q, eh_entry) { in ata_scsi_cmd_error_handler()
668 qc->scsicmd == scmd) in ata_scsi_cmd_error_handler()
685 scmd->retries = scmd->allowed; in ata_scsi_cmd_error_handler()
686 scsi_eh_finish_cmd(scmd, &ap->eh_done_q); in ata_scsi_cmd_error_handler()
1245 static void ata_eh_scsidone(struct scsi_cmnd *scmd) in ata_eh_scsidone() argument
1253 struct scsi_cmnd *scmd = qc->scsicmd; in __ata_eh_qc_complete() local
1262 scsi_eh_finish_cmd(scmd, &ap->eh_done_q); in __ata_eh_qc_complete()
1274 struct scsi_cmnd *scmd = qc->scsicmd; in ata_eh_qc_complete() local
1275 scmd->retries = scmd->allowed; in ata_eh_qc_complete()
[all …]
/linux-2.6.39/drivers/scsi/megaraid/
Dmegaraid_sas_base.c148 struct scsi_cmnd *scmd);
213 cmd->scmd = NULL; in megasas_return_cmd()
1366 if(!cmd->scmd) in megasas_dump_pending_frames()
1369 if (megasas_is_ldio(cmd->scmd)){ in megasas_dump_pending_frames()
1405 struct scsi_cmnd *scmd) in megasas_build_and_issue_cmd() argument
1417 if (megasas_is_ldio(scmd)) in megasas_build_and_issue_cmd()
1418 frame_count = megasas_build_ldio(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1420 frame_count = megasas_build_dcdb(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1425 cmd->scmd = scmd; in megasas_build_and_issue_cmd()
1426 scmd->SCp.ptr = (char *)cmd; in megasas_build_and_issue_cmd()
[all …]
Dmegaraid_sas_fusion.c193 cmd->scmd = NULL; in megasas_return_cmd_fusion()
507 cmd->scmd = NULL; in megasas_alloc_cmds_fusion()
1038 cmd->scmd->result = DID_OK << 16; in map_cmd_status()
1043 cmd->scmd->result = (DID_ERROR << 16) | ext_status; in map_cmd_status()
1048 cmd->scmd->result = (DID_OK << 16) | ext_status; in map_cmd_status()
1050 memset(cmd->scmd->sense_buffer, 0, in map_cmd_status()
1052 memcpy(cmd->scmd->sense_buffer, cmd->sense, in map_cmd_status()
1054 cmd->scmd->result |= DRIVER_SENSE << 24; in map_cmd_status()
1060 cmd->scmd->result = DID_BAD_TARGET << 16; in map_cmd_status()
1065 cmd->scmd->result = DID_ERROR << 16; in map_cmd_status()
[all …]
/linux-2.6.39/arch/powerpc/include/asm/
Dsmu.h426 extern int smu_queue_simple(struct smu_simple_cmd *scmd, u8 command,
444 static inline void smu_spinwait_simple(struct smu_simple_cmd *scmd) in smu_spinwait_simple() argument
446 smu_spinwait_cmd(&scmd->cmd); in smu_spinwait_simple()
509 struct smu_cmd scmd; member
/linux-2.6.39/drivers/block/
Dub.c382 static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd);
1428 struct ub_scsi_cmd *scmd; in ub_state_sense() local
1437 scmd = &sc->top_rqs_cmd; in ub_state_sense()
1438 memset(scmd, 0, sizeof(struct ub_scsi_cmd)); in ub_state_sense()
1439 scmd->cdb[0] = REQUEST_SENSE; in ub_state_sense()
1440 scmd->cdb[4] = UB_SENSE_SIZE; in ub_state_sense()
1441 scmd->cdb_len = 6; in ub_state_sense()
1442 scmd->dir = UB_DIR_READ; in ub_state_sense()
1443 scmd->state = UB_CMDST_INIT; in ub_state_sense()
1444 scmd->nsg = 1; in ub_state_sense()
[all …]

12