Home
last modified time | relevance | path

Searched refs:cdb (Results 1 – 25 of 147) sorted by relevance

123456

/drivers/scsi/
Dscsi_trace.c23 #define SERVICE_ACTION16(cdb) (cdb[1] & 0x1f) argument
24 #define SERVICE_ACTION32(cdb) (get_unaligned_be16(&cdb[8])) argument
30 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw6() argument
35 lba |= ((cdb[1] & 0x1F) << 16); in scsi_trace_rw6()
36 lba |= (cdb[2] << 8); in scsi_trace_rw6()
37 lba |= cdb[3]; in scsi_trace_rw6()
42 txlen = cdb[4] ? cdb[4] : 256; in scsi_trace_rw6()
51 scsi_trace_rw10(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw10() argument
56 lba = get_unaligned_be32(&cdb[2]); in scsi_trace_rw10()
57 txlen = get_unaligned_be16(&cdb[7]); in scsi_trace_rw10()
[all …]
Dscsi_debugfs.c11 const u8 *const cdb = READ_ONCE(cmd->cmnd); in scsi_show_rq() local
14 if (cdb) in scsi_show_rq()
15 __scsi_format_command(buf, sizeof(buf), cdb, cmd->cmd_len); in scsi_show_rq()
Dpmcraid.c328 memset(&cmd->ioa_cb->ioarcb.cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_init_cmdblk()
714 cmd->ioa_cb->ioarcb.cdb[0]); in pmcraid_timeout_handler()
782 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_internal_done()
820 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reinit_cfgtable_done()
851 cmd->ioa_cb->ioarcb.cdb[0], ioasc); in pmcraid_erp_done()
968 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioa_shutdown()
978 cmd->ioa_cb->ioarcb.cdb[0] = PMCRAID_IOA_SHUTDOWN; in pmcraid_ioa_shutdown()
979 cmd->ioa_cb->ioarcb.cdb[1] = PMCRAID_SHUTDOWN_NORMAL; in pmcraid_ioa_shutdown()
1041 ioarcb->cdb[0] = INQUIRY; in pmcraid_get_fwversion()
1042 ioarcb->cdb[1] = 1; in pmcraid_get_fwversion()
[all …]
D3w-sas.c291 static int twl_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_… in twl_scsiop_execute_scsi() argument
317 if (!cdb) in twl_scsiop_execute_scsi()
318 memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); in twl_scsiop_execute_scsi()
320 memcpy(command_packet->cdb, cdb, TW_MAX_CDB_LEN); in twl_scsiop_execute_scsi()
376 char cdb[TW_MAX_CDB_LEN]; in twl_aen_read_queue() local
385 memset(&cdb, 0, TW_MAX_CDB_LEN); in twl_aen_read_queue()
386 cdb[0] = REQUEST_SENSE; /* opcode */ in twl_aen_read_queue()
387 cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ in twl_aen_read_queue()
398 if (twl_scsiop_execute_scsi(tw_dev, request_id, cdb, 1, sglist)) { in twl_aen_read_queue()
560 char cdb[TW_MAX_CDB_LEN]; in twl_aen_drain_queue() local
[all …]
Dhpsa.c314 struct CommandList *c, u32 ioaccel_handle, u8 *cdb, int cdb_len,
1107 static int is_firmware_flash_cmd(u8 *cdb) in is_firmware_flash_cmd() argument
1109 return cdb[0] == BMIC_WRITE && cdb[6] == BMIC_FLASH_FIRMWARE; in is_firmware_flash_cmd()
2827 const u8 *cdb = c->Request.CDB; in hpsa_print_cmd() local
2831 txt, lun, cdb); in hpsa_print_cmd()
4488 u8 *cdb, int cdb_len, in warn_zero_length_transfer() argument
4499 "%02hhx", cdb[i]); in warn_zero_length_transfer()
4505 static bool is_zero_length_transfer(u8 *cdb) in is_zero_length_transfer() argument
4510 switch (cdb[0]) { in is_zero_length_transfer()
4515 block_cnt = get_unaligned_be16(&cdb[7]); in is_zero_length_transfer()
[all …]
/drivers/isdn/capi/
Dcapiutil.c569 static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...) in bufprint() argument
574 if (!cdb) in bufprint()
577 r = cdb->size - cdb->pos; in bufprint()
578 n = vsnprintf(cdb->p, r, fmt, f); in bufprint()
582 size_t ns = 2 * cdb->size; in bufprint()
585 while ((ns - cdb->pos) <= n) in bufprint()
589 cdebbuf_free(cdb); in bufprint()
592 memcpy(nb, cdb->buf, cdb->pos); in bufprint()
593 kfree(cdb->buf); in bufprint()
594 nb[cdb->pos] = 0; in bufprint()
[all …]
Dkcapi.c349 _cdebbuf *cdb; in capi_ctr_handle_message() local
352 cdb = capi_message2str(skb->data); in capi_ctr_handle_message()
353 if (cdb) { in capi_ctr_handle_message()
355 ctr->cnr, cdb->buf); in capi_ctr_handle_message()
356 cdebbuf_free(cdb); in capi_ctr_handle_message()
382 cdb = capi_message2str(skb->data); in capi_ctr_handle_message()
383 if (cdb) { in capi_ctr_handle_message()
385 ctr->cnr, cdb->buf); in capi_ctr_handle_message()
386 cdebbuf_free(cdb); in capi_ctr_handle_message()
400 cdb = capi_message2str(skb->data); in capi_ctr_handle_message()
[all …]
/drivers/target/
Dtarget_core_sbc.c48 unsigned char *cdb = cmd->t_task_cdb; in sbc_emulate_readcapacity() local
66 if (!(cdb[8] & 1) && !!(cdb[2] | cdb[3] | cdb[4] | cdb[5])) in sbc_emulate_readcapacity()
153 unsigned char *cdb = cmd->t_task_cdb; in sbc_emulate_startstop() local
160 if (!(cdb[1] & 1) || cdb[2] || cdb[3]) in sbc_emulate_startstop()
167 if (cdb[4] >> 4 & 0xf) in sbc_emulate_startstop()
175 if (!(cdb[4] & 1) || (cdb[4] & 2) || (cdb[4] & 4)) in sbc_emulate_startstop()
234 static inline u32 transport_get_sectors_6(unsigned char *cdb) in transport_get_sectors_6() argument
244 return cdb[4] ? : 256; in transport_get_sectors_6()
247 static inline u32 transport_get_sectors_10(unsigned char *cdb) in transport_get_sectors_10() argument
249 return get_unaligned_be16(&cdb[7]); in transport_get_sectors_10()
[all …]
Dtarget_core_spc.c716 unsigned char *cdb = cmd->t_task_cdb; in spc_emulate_inquiry() local
733 if (!(cdb[1] & 0x1)) { in spc_emulate_inquiry()
734 if (cdb[2]) { in spc_emulate_inquiry()
736 cdb[2]); in spc_emulate_inquiry()
747 if (cdb[2] == evpd_handlers[p].page) { in spc_emulate_inquiry()
748 buf[1] = cdb[2]; in spc_emulate_inquiry()
755 pr_err("Unknown VPD Code: 0x%02x\n", cdb[2]); in spc_emulate_inquiry()
994 char *cdb = cmd->t_task_cdb; in spc_emulate_modesense() local
998 bool dbd = !!(cdb[1] & 0x08); in spc_emulate_modesense()
999 bool llba = ten ? !!(cdb[1] & 0x10) : false; in spc_emulate_modesense()
[all …]
Dtarget_core_pscsi.c152 unsigned char cdb[MAX_COMMAND_SIZE], *buf; in pscsi_tape_read_blocksize() local
159 memset(cdb, 0, MAX_COMMAND_SIZE); in pscsi_tape_read_blocksize()
160 cdb[0] = MODE_SENSE; in pscsi_tape_read_blocksize()
161 cdb[4] = 0x0c; /* 12 bytes */ in pscsi_tape_read_blocksize()
163 ret = scsi_execute_req(sdev, cdb, DMA_FROM_DEVICE, buf, 12, NULL, in pscsi_tape_read_blocksize()
201 unsigned char cdb[MAX_COMMAND_SIZE], *buf; in pscsi_get_inquiry_vpd_serial() local
208 memset(cdb, 0, MAX_COMMAND_SIZE); in pscsi_get_inquiry_vpd_serial()
209 cdb[0] = INQUIRY; in pscsi_get_inquiry_vpd_serial()
210 cdb[1] = 0x01; /* Query VPD */ in pscsi_get_inquiry_vpd_serial()
211 cdb[2] = 0x80; /* Unit Serial Number */ in pscsi_get_inquiry_vpd_serial()
[all …]
Dtarget_core_xcopy.c590 unsigned char *cdb, in target_xcopy_setup_pt_cmd() argument
607 sense_rc = target_setup_cmd_from_cdb(cmd, cdb); in target_xcopy_setup_pt_cmd()
680 unsigned char cdb[16]; in target_xcopy_read_source() local
691 memset(&cdb[0], 0, 16); in target_xcopy_read_source()
692 cdb[0] = READ_16; in target_xcopy_read_source()
693 put_unaligned_be64(src_lba, &cdb[2]); in target_xcopy_read_source()
694 put_unaligned_be32(src_sectors, &cdb[10]); in target_xcopy_read_source()
702 rc = target_xcopy_setup_pt_cmd(xpt_cmd, xop, src_dev, &cdb[0], in target_xcopy_read_source()
742 unsigned char cdb[16]; in target_xcopy_write_destination() local
753 memset(&cdb[0], 0, 16); in target_xcopy_write_destination()
[all …]
Dtarget_core_device.c1150 unsigned char *cdb = cmd->t_task_cdb; in passthrough_parse_cdb() local
1158 if (cdb[0] == REPORT_LUNS) { in passthrough_parse_cdb()
1170 if (cdb[0] == PERSISTENT_RESERVE_IN) { in passthrough_parse_cdb()
1172 size = get_unaligned_be16(&cdb[7]); in passthrough_parse_cdb()
1175 if (cdb[0] == PERSISTENT_RESERVE_OUT) { in passthrough_parse_cdb()
1177 size = get_unaligned_be32(&cdb[5]); in passthrough_parse_cdb()
1181 if (cdb[0] == RELEASE || cdb[0] == RELEASE_10) { in passthrough_parse_cdb()
1183 if (cdb[0] == RELEASE_10) in passthrough_parse_cdb()
1184 size = get_unaligned_be16(&cdb[7]); in passthrough_parse_cdb()
1189 if (cdb[0] == RESERVE || cdb[0] == RESERVE_10) { in passthrough_parse_cdb()
[all …]
Dtarget_core_alua.c462 unsigned char *cdb, in core_alua_state_nonoptimized() argument
550 unsigned char *cdb) in core_alua_state_standby() argument
556 switch (cdb[0]) { in core_alua_state_standby()
568 switch (cdb[1] & 0x1f) { in core_alua_state_standby()
576 switch (cdb[1] & 0x1f) { in core_alua_state_standby()
584 switch (cdb[1]) { in core_alua_state_standby()
607 unsigned char *cdb) in core_alua_state_unavailable() argument
613 switch (cdb[0]) { in core_alua_state_unavailable()
618 switch (cdb[1] & 0x1f) { in core_alua_state_unavailable()
626 switch (cdb[1]) { in core_alua_state_unavailable()
[all …]
/drivers/ata/
Dlibata-scsi.c1480 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat() local
1491 if (cdb[1] & 0x1) { in ata_scsi_start_stop_xlat()
1494 if (cdb[4] & 0x2) { in ata_scsi_start_stop_xlat()
1499 if (((cdb[4] >> 4) & 0xf) != 0) { in ata_scsi_start_stop_xlat()
1505 if (cdb[4] & 0x1) { in ata_scsi_start_stop_xlat()
1598 static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_6_lba_len() argument
1605 lba |= ((u64)(cdb[1] & 0x1f)) << 16; in scsi_6_lba_len()
1606 lba |= ((u64)cdb[2]) << 8; in scsi_6_lba_len()
1607 lba |= ((u64)cdb[3]); in scsi_6_lba_len()
1609 len = cdb[4]; in scsi_6_lba_len()
[all …]
Dlibata-zpodd.c38 static const char cdb[ATAPI_CDB_LEN] = { GPCMD_START_STOP_UNIT, in eject_tray() local
49 return ata_exec_internal(dev, &tf, cdb, DMA_NONE, NULL, 0, 0); in eject_tray()
59 static const char cdb[ATAPI_CDB_LEN] = { GPCMD_GET_CONFIGURATION, in zpodd_get_mech_type() local
78 ret = ata_exec_internal(dev, &tf, cdb, DMA_FROM_DEVICE, in zpodd_get_mech_type()
/drivers/dma/
Dfsl_raid.c325 u32 cdb; in fsl_re_prep_dma_genq() local
347 cdb = FSL_RE_XOR_OPCODE << FSL_RE_CDB_OPCODE_SHIFT; in fsl_re_prep_dma_genq()
348 cdb |= (src_cnt - 1) << FSL_RE_CDB_NRCS_SHIFT; in fsl_re_prep_dma_genq()
349 cdb |= FSL_RE_BLOCK_SIZE << FSL_RE_CDB_BLKSIZE_SHIFT; in fsl_re_prep_dma_genq()
350 cdb |= FSL_RE_INTR_ON_ERROR << FSL_RE_CDB_ERROR_SHIFT; in fsl_re_prep_dma_genq()
351 cdb |= FSL_RE_DATA_DEP << FSL_RE_CDB_DEPEND_SHIFT; in fsl_re_prep_dma_genq()
353 xor->cdb32 = cdb; in fsl_re_prep_dma_genq()
412 u32 cdb; in fsl_re_prep_dma_pq() local
466 cdb = FSL_RE_PQ_OPCODE << FSL_RE_CDB_OPCODE_SHIFT; in fsl_re_prep_dma_pq()
467 cdb |= (src_cnt - 1) << FSL_RE_CDB_NRCS_SHIFT; in fsl_re_prep_dma_pq()
[all …]
/drivers/scsi/esas2r/
Desas2r_io.c533 u8 *cdb = (u8 *)&rq->vrq->scsi.cdb[0]; in esas2r_build_sg_list_prd() local
545 switch (rq->vrq->scsi.cdb[0]) { in esas2r_build_sg_list_prd()
550 MAKEDWORD(MAKEWORD(cdb[9], in esas2r_build_sg_list_prd()
551 cdb[8]), in esas2r_build_sg_list_prd()
552 MAKEWORD(cdb[7], in esas2r_build_sg_list_prd()
553 cdb[6])); in esas2r_build_sg_list_prd()
564 MAKEDWORD(MAKEWORD(cdb[5], in esas2r_build_sg_list_prd()
565 cdb[4]), in esas2r_build_sg_list_prd()
566 MAKEWORD(cdb[3], in esas2r_build_sg_list_prd()
567 cdb[2])); in esas2r_build_sg_list_prd()
[all …]
/drivers/scsi/megaraid/
Dmegaraid_sas_fusion.c1901 u8 *cdb = io_request->CDB.CDB32; in megasas_set_pd_lba() local
1909 memset(cdb, 0, sizeof(io_request->CDB.CDB32)); in megasas_set_pd_lba()
1910 cdb[0] = MEGASAS_SCSI_VARIABLE_LENGTH_CMD; in megasas_set_pd_lba()
1911 cdb[7] = MEGASAS_SCSI_ADDL_CDB_LEN; in megasas_set_pd_lba()
1914 cdb[9] = MEGASAS_SCSI_SERVICE_ACTION_READ32; in megasas_set_pd_lba()
1916 cdb[9] = MEGASAS_SCSI_SERVICE_ACTION_WRITE32; in megasas_set_pd_lba()
1917 cdb[10] = MEGASAS_RD_WR_PROTECT_CHECK_ALL; in megasas_set_pd_lba()
1920 cdb[12] = (u8)((start_blk >> 56) & 0xff); in megasas_set_pd_lba()
1921 cdb[13] = (u8)((start_blk >> 48) & 0xff); in megasas_set_pd_lba()
1922 cdb[14] = (u8)((start_blk >> 40) & 0xff); in megasas_set_pd_lba()
[all …]
/drivers/scsi/device_handler/
Dscsi_dh_emc.c252 unsigned char cdb[COMMAND_SIZE(MODE_SELECT)]; in send_trespass_cmd() local
264 cdb[0] = MODE_SELECT; in send_trespass_cmd()
265 cdb[1] = 0x10; in send_trespass_cmd()
266 cdb[4] = len; in send_trespass_cmd()
273 cdb[0] = MODE_SELECT_10; in send_trespass_cmd()
274 cdb[8] = len; in send_trespass_cmd()
279 err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL, in send_trespass_cmd()
Dscsi_dh_rdac.c266 unsigned char *cdb) in rdac_failover_get() argument
306 cdb[0] = MODE_SELECT_10; in rdac_failover_get()
307 cdb[7] = data_size >> 8; in rdac_failover_get()
308 cdb[8] = data_size & 0xff; in rdac_failover_get()
310 cdb[0] = MODE_SELECT; in rdac_failover_get()
311 cdb[4] = data_size; in rdac_failover_get()
536 unsigned char cdb[COMMAND_SIZE(MODE_SELECT_10)]; in send_mode_select() local
549 memset(cdb, 0, sizeof(cdb)); in send_mode_select()
551 data_size = rdac_failover_get(ctlr, &list, cdb); in send_mode_select()
558 if (scsi_execute(sdev, cdb, DMA_TO_DEVICE, &h->ctlr->mode_select, in send_mode_select()
Dscsi_dh_alua.c140 u8 cdb[COMMAND_SIZE(MAINTENANCE_IN)]; in submit_rtpg() local
145 memset(cdb, 0x0, COMMAND_SIZE(MAINTENANCE_IN)); in submit_rtpg()
146 cdb[0] = MAINTENANCE_IN; in submit_rtpg()
148 cdb[1] = MI_REPORT_TARGET_PGS | MI_EXT_HDR_PARAM_FMT; in submit_rtpg()
150 cdb[1] = MI_REPORT_TARGET_PGS; in submit_rtpg()
151 put_unaligned_be32(bufflen, &cdb[6]); in submit_rtpg()
153 return scsi_execute(sdev, cdb, DMA_FROM_DEVICE, buff, bufflen, NULL, in submit_rtpg()
168 u8 cdb[COMMAND_SIZE(MAINTENANCE_OUT)]; in submit_stpg() local
180 memset(cdb, 0x0, COMMAND_SIZE(MAINTENANCE_OUT)); in submit_stpg()
181 cdb[0] = MAINTENANCE_OUT; in submit_stpg()
[all …]
/drivers/block/
Dskd_main.c408 scsi_req->cdb[0] = READ_10; in skd_prep_rw_cdb()
410 scsi_req->cdb[0] = WRITE_10; in skd_prep_rw_cdb()
412 scsi_req->cdb[1] = 0; in skd_prep_rw_cdb()
413 scsi_req->cdb[2] = (lba & 0xff000000) >> 24; in skd_prep_rw_cdb()
414 scsi_req->cdb[3] = (lba & 0xff0000) >> 16; in skd_prep_rw_cdb()
415 scsi_req->cdb[4] = (lba & 0xff00) >> 8; in skd_prep_rw_cdb()
416 scsi_req->cdb[5] = (lba & 0xff); in skd_prep_rw_cdb()
417 scsi_req->cdb[6] = 0; in skd_prep_rw_cdb()
418 scsi_req->cdb[7] = (count & 0xff00) >> 8; in skd_prep_rw_cdb()
419 scsi_req->cdb[8] = count & 0xff; in skd_prep_rw_cdb()
[all …]
/drivers/scsi/ibmvscsi_tgt/
Dibmvscsi_tgt.h346 #define READ_CMD(cdb) (((cdb)[0] & 0x1F) == 8) argument
347 #define WRITE_CMD(cdb) (((cdb)[0] & 0x1F) == 0xA) argument
/drivers/usb/storage/
Dene_ub6250.c691 unsigned char *cdb = srb->cmnd; in sd_scsi_read() local
695 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in sd_scsi_read()
696 ((cdb[4] << 8) & 0x0000ff00) | ((cdb[5] << 0) & 0x000000ff); in sd_scsi_read()
697 u16 blen = ((cdb[7] << 8) & 0xff00) | ((cdb[8] << 0) & 0x00ff); in sd_scsi_read()
731 unsigned char *cdb = srb->cmnd; in sd_scsi_write() local
735 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in sd_scsi_write()
736 ((cdb[4] << 8) & 0x0000ff00) | ((cdb[5] << 0) & 0x000000ff); in sd_scsi_write()
737 u16 blen = ((cdb[7] << 8) & 0xff00) | ((cdb[8] << 0) & 0x00ff); in sd_scsi_write()
1646 unsigned char *cdb = srb->cmnd; in ms_scsi_read() local
1650 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in ms_scsi_read()
[all …]
/drivers/scsi/smartpqi/
Dsmartpqi_init.c74 struct scsi_cmnd *scmd, u32 aio_handle, u8 *cdb,
392 u8 *cdb; in pqi_build_raid_path_request() local
406 cdb = request->cdb; in pqi_build_raid_path_request()
411 cdb[0] = INQUIRY; in pqi_build_raid_path_request()
413 cdb[1] = 0x1; in pqi_build_raid_path_request()
414 cdb[2] = (u8)vpd_page; in pqi_build_raid_path_request()
416 cdb[4] = (u8)buffer_length; in pqi_build_raid_path_request()
421 cdb[0] = cmd; in pqi_build_raid_path_request()
423 cdb[1] = CISS_REPORT_PHYS_EXTENDED; in pqi_build_raid_path_request()
425 cdb[1] = CISS_REPORT_LOG_EXTENDED; in pqi_build_raid_path_request()
[all …]

123456