/drivers/scsi/ |
D | scsi_trace.c | 11 #define SERVICE_ACTION16(cdb) (cdb[1] & 0x1f) argument 12 #define SERVICE_ACTION32(cdb) (get_unaligned_be16(&cdb[8])) argument 18 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw6() argument 23 lba = get_unaligned_be24(&cdb[1]) & 0x1fffff; in scsi_trace_rw6() 28 txlen = cdb[4] ? cdb[4] : 256; in scsi_trace_rw6() 37 scsi_trace_rw10(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw10() argument 42 lba = get_unaligned_be32(&cdb[2]); in scsi_trace_rw10() 43 txlen = get_unaligned_be16(&cdb[7]); in scsi_trace_rw10() 46 cdb[1] >> 5); in scsi_trace_rw10() 48 if (cdb[0] == WRITE_SAME) in scsi_trace_rw10() [all …]
|
D | scsi_debugfs.c | 40 const u8 *const cdb = READ_ONCE(cmd->cmnd); in scsi_show_rq() local 43 if (cdb) in scsi_show_rq() 44 __scsi_format_command(buf, sizeof(buf), cdb, cmd->cmd_len); in scsi_show_rq()
|
D | pmcraid.c | 313 memset(&cmd->ioa_cb->ioarcb.cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_init_cmdblk() 694 cmd->ioa_cb->ioarcb.cdb[0]); in pmcraid_timeout_handler() 762 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_internal_done() 800 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reinit_cfgtable_done() 831 cmd->ioa_cb->ioarcb.cdb[0], ioasc); in pmcraid_erp_done() 940 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioa_shutdown() 950 cmd->ioa_cb->ioarcb.cdb[0] = PMCRAID_IOA_SHUTDOWN; in pmcraid_ioa_shutdown() 951 cmd->ioa_cb->ioarcb.cdb[1] = PMCRAID_SHUTDOWN_NORMAL; in pmcraid_ioa_shutdown() 1013 ioarcb->cdb[0] = INQUIRY; in pmcraid_get_fwversion() 1014 ioarcb->cdb[1] = 1; in pmcraid_get_fwversion() [all …]
|
D | 3w-sas.c | 291 unsigned char *cdb, int use_sg, in twl_scsiop_execute_scsi() argument 318 if (!cdb) in twl_scsiop_execute_scsi() 319 memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); in twl_scsiop_execute_scsi() 321 memcpy(command_packet->cdb, cdb, TW_MAX_CDB_LEN); in twl_scsiop_execute_scsi() 377 unsigned char cdb[TW_MAX_CDB_LEN]; in twl_aen_read_queue() local 386 memset(&cdb, 0, TW_MAX_CDB_LEN); in twl_aen_read_queue() 387 cdb[0] = REQUEST_SENSE; /* opcode */ in twl_aen_read_queue() 388 cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ in twl_aen_read_queue() 399 if (twl_scsiop_execute_scsi(tw_dev, request_id, cdb, 1, sglist)) { in twl_aen_read_queue() 559 unsigned char cdb[TW_MAX_CDB_LEN]; in twl_aen_drain_queue() local [all …]
|
D | hpsa.c | 321 struct CommandList *c, u32 ioaccel_handle, u8 *cdb, int cdb_len, 1119 static int is_firmware_flash_cmd(u8 *cdb) in is_firmware_flash_cmd() argument 1121 return cdb[0] == BMIC_WRITE && cdb[6] == BMIC_FLASH_FIRMWARE; in is_firmware_flash_cmd() 2917 const u8 *cdb = c->Request.CDB; in hpsa_print_cmd() local 2921 txt, lun, cdb); in hpsa_print_cmd() 4650 u8 *cdb, int cdb_len, in warn_zero_length_transfer() argument 4655 func, cdb_len, cdb); in warn_zero_length_transfer() 4660 static bool is_zero_length_transfer(u8 *cdb) in is_zero_length_transfer() argument 4665 switch (cdb[0]) { in is_zero_length_transfer() 4670 block_cnt = get_unaligned_be16(&cdb[7]); in is_zero_length_transfer() [all …]
|
/drivers/isdn/capi/ |
D | capiutil.c | 385 static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...) in bufprint() argument 390 if (!cdb) in bufprint() 393 r = cdb->size - cdb->pos; in bufprint() 394 n = vsnprintf(cdb->p, r, fmt, f); in bufprint() 398 size_t ns = 2 * cdb->size; in bufprint() 401 while ((ns - cdb->pos) <= n) in bufprint() 405 cdebbuf_free(cdb); in bufprint() 408 memcpy(nb, cdb->buf, cdb->pos); in bufprint() 409 kfree(cdb->buf); in bufprint() 410 nb[cdb->pos] = 0; in bufprint() [all …]
|
D | kcapi.c | 307 _cdebbuf *cdb; in capi_ctr_handle_message() local 310 cdb = capi_message2str(skb->data); in capi_ctr_handle_message() 311 if (cdb) { in capi_ctr_handle_message() 313 ctr->cnr, cdb->buf); in capi_ctr_handle_message() 314 cdebbuf_free(cdb); in capi_ctr_handle_message() 340 cdb = capi_message2str(skb->data); in capi_ctr_handle_message() 341 if (cdb) { in capi_ctr_handle_message() 343 ctr->cnr, cdb->buf); in capi_ctr_handle_message() 344 cdebbuf_free(cdb); in capi_ctr_handle_message() 358 cdb = capi_message2str(skb->data); in capi_ctr_handle_message() [all …]
|
/drivers/target/ |
D | target_core_sbc.c | 35 unsigned char *cdb = cmd->t_task_cdb; in sbc_emulate_readcapacity() local 53 if (!(cdb[8] & 1) && !!(cdb[2] | cdb[3] | cdb[4] | cdb[5])) in sbc_emulate_readcapacity() 140 unsigned char *cdb = cmd->t_task_cdb; in sbc_emulate_startstop() local 147 if (!(cdb[1] & 1) || cdb[2] || cdb[3]) in sbc_emulate_startstop() 154 if (cdb[4] >> 4 & 0xf) in sbc_emulate_startstop() 162 if (!(cdb[4] & 1) || (cdb[4] & 2) || (cdb[4] & 4)) in sbc_emulate_startstop() 221 static inline u32 transport_get_sectors_6(unsigned char *cdb) in transport_get_sectors_6() argument 231 return cdb[4] ? : 256; in transport_get_sectors_6() 234 static inline u32 transport_get_sectors_10(unsigned char *cdb) in transport_get_sectors_10() argument 236 return get_unaligned_be16(&cdb[7]); in transport_get_sectors_10() [all …]
|
D | target_core_spc.c | 706 unsigned char *cdb = cmd->t_task_cdb; in spc_emulate_inquiry() local 723 if (!(cdb[1] & 0x1)) { in spc_emulate_inquiry() 724 if (cdb[2]) { in spc_emulate_inquiry() 726 cdb[2]); in spc_emulate_inquiry() 737 if (cdb[2] == evpd_handlers[p].page) { in spc_emulate_inquiry() 738 buf[1] = cdb[2]; in spc_emulate_inquiry() 745 pr_err("Unknown VPD Code: 0x%02x\n", cdb[2]); in spc_emulate_inquiry() 993 char *cdb = cmd->t_task_cdb; in spc_emulate_modesense() local 997 bool dbd = !!(cdb[1] & 0x08); in spc_emulate_modesense() 998 bool llba = ten ? !!(cdb[1] & 0x10) : false; in spc_emulate_modesense() [all …]
|
D | target_core_pscsi.c | 139 unsigned char cdb[MAX_COMMAND_SIZE], *buf; in pscsi_tape_read_blocksize() local 146 memset(cdb, 0, MAX_COMMAND_SIZE); in pscsi_tape_read_blocksize() 147 cdb[0] = MODE_SENSE; in pscsi_tape_read_blocksize() 148 cdb[4] = 0x0c; /* 12 bytes */ in pscsi_tape_read_blocksize() 150 ret = scsi_execute_req(sdev, cdb, DMA_FROM_DEVICE, buf, 12, NULL, in pscsi_tape_read_blocksize() 188 unsigned char cdb[MAX_COMMAND_SIZE], *buf; in pscsi_get_inquiry_vpd_serial() local 195 memset(cdb, 0, MAX_COMMAND_SIZE); in pscsi_get_inquiry_vpd_serial() 196 cdb[0] = INQUIRY; in pscsi_get_inquiry_vpd_serial() 197 cdb[1] = 0x01; /* Query VPD */ in pscsi_get_inquiry_vpd_serial() 198 cdb[2] = 0x80; /* Unit Serial Number */ in pscsi_get_inquiry_vpd_serial() [all …]
|
D | target_core_device.c | 1079 unsigned char *cdb = cmd->t_task_cdb; in passthrough_parse_cdb() local 1087 if (cdb[0] == REPORT_LUNS) { in passthrough_parse_cdb() 1097 ((cdb[0] == PERSISTENT_RESERVE_IN) || in passthrough_parse_cdb() 1098 (cdb[0] == PERSISTENT_RESERVE_OUT) || in passthrough_parse_cdb() 1099 (cdb[0] == RELEASE || cdb[0] == RELEASE_10) || in passthrough_parse_cdb() 1100 (cdb[0] == RESERVE || cdb[0] == RESERVE_10))) { in passthrough_parse_cdb() 1111 if (cdb[0] == PERSISTENT_RESERVE_IN) { in passthrough_parse_cdb() 1113 size = get_unaligned_be16(&cdb[7]); in passthrough_parse_cdb() 1116 if (cdb[0] == PERSISTENT_RESERVE_OUT) { in passthrough_parse_cdb() 1118 size = get_unaligned_be32(&cdb[5]); in passthrough_parse_cdb() [all …]
|
D | target_core_xcopy.c | 539 unsigned char *cdb, in target_xcopy_setup_pt_cmd() argument 557 if (target_cmd_init_cdb(cmd, cdb)) in target_xcopy_setup_pt_cmd() 605 unsigned char cdb[16]; in target_xcopy_read_source() local 611 memset(&cdb[0], 0, 16); in target_xcopy_read_source() 612 cdb[0] = READ_16; in target_xcopy_read_source() 613 put_unaligned_be64(src_lba, &cdb[2]); in target_xcopy_read_source() 614 put_unaligned_be32(src_sectors, &cdb[10]); in target_xcopy_read_source() 621 rc = target_xcopy_setup_pt_cmd(&xpt_cmd, xop, src_dev, &cdb[0], in target_xcopy_read_source() 650 unsigned char cdb[16]; in target_xcopy_write_destination() local 656 memset(&cdb[0], 0, 16); in target_xcopy_write_destination() [all …]
|
D | target_core_alua.c | 449 unsigned char *cdb, in core_alua_state_nonoptimized() argument 537 unsigned char *cdb) in core_alua_state_standby() argument 543 switch (cdb[0]) { in core_alua_state_standby() 555 switch (cdb[1] & 0x1f) { in core_alua_state_standby() 563 switch (cdb[1] & 0x1f) { in core_alua_state_standby() 571 switch (cdb[1]) { in core_alua_state_standby() 594 unsigned char *cdb) in core_alua_state_unavailable() argument 600 switch (cdb[0]) { in core_alua_state_unavailable() 605 switch (cdb[1] & 0x1f) { in core_alua_state_unavailable() 613 switch (cdb[1]) { in core_alua_state_unavailable() [all …]
|
/drivers/ata/ |
D | libata-scsi.c | 1172 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat() local 1183 if (cdb[1] & 0x1) { in ata_scsi_start_stop_xlat() 1186 if (cdb[4] & 0x2) { in ata_scsi_start_stop_xlat() 1191 if (((cdb[4] >> 4) & 0xf) != 0) { in ata_scsi_start_stop_xlat() 1197 if (cdb[4] & 0x1) { in ata_scsi_start_stop_xlat() 1290 static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_6_lba_len() argument 1297 lba |= ((u64)(cdb[1] & 0x1f)) << 16; in scsi_6_lba_len() 1298 lba |= ((u64)cdb[2]) << 8; in scsi_6_lba_len() 1299 lba |= ((u64)cdb[3]); in scsi_6_lba_len() 1301 len = cdb[4]; in scsi_6_lba_len() [all …]
|
D | libata-zpodd.c | 38 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/ |
D | fsl_raid.c | 323 u32 cdb; in fsl_re_prep_dma_genq() local 345 cdb = FSL_RE_XOR_OPCODE << FSL_RE_CDB_OPCODE_SHIFT; in fsl_re_prep_dma_genq() 346 cdb |= (src_cnt - 1) << FSL_RE_CDB_NRCS_SHIFT; in fsl_re_prep_dma_genq() 347 cdb |= FSL_RE_BLOCK_SIZE << FSL_RE_CDB_BLKSIZE_SHIFT; in fsl_re_prep_dma_genq() 348 cdb |= FSL_RE_INTR_ON_ERROR << FSL_RE_CDB_ERROR_SHIFT; in fsl_re_prep_dma_genq() 349 cdb |= FSL_RE_DATA_DEP << FSL_RE_CDB_DEPEND_SHIFT; in fsl_re_prep_dma_genq() 351 xor->cdb32 = cdb; in fsl_re_prep_dma_genq() 410 u32 cdb; in fsl_re_prep_dma_pq() local 464 cdb = FSL_RE_PQ_OPCODE << FSL_RE_CDB_OPCODE_SHIFT; in fsl_re_prep_dma_pq() 465 cdb |= (src_cnt - 1) << FSL_RE_CDB_NRCS_SHIFT; in fsl_re_prep_dma_pq() [all …]
|
/drivers/scsi/esas2r/ |
D | esas2r_io.c | 533 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/ |
D | megaraid_sas_fusion.c | 2353 u8 *cdb = io_request->CDB.CDB32; in megasas_set_pd_lba() local 2361 memset(cdb, 0, sizeof(io_request->CDB.CDB32)); in megasas_set_pd_lba() 2362 cdb[0] = MEGASAS_SCSI_VARIABLE_LENGTH_CMD; in megasas_set_pd_lba() 2363 cdb[7] = MEGASAS_SCSI_ADDL_CDB_LEN; in megasas_set_pd_lba() 2366 cdb[9] = MEGASAS_SCSI_SERVICE_ACTION_READ32; in megasas_set_pd_lba() 2368 cdb[9] = MEGASAS_SCSI_SERVICE_ACTION_WRITE32; in megasas_set_pd_lba() 2369 cdb[10] = MEGASAS_RD_WR_PROTECT_CHECK_ALL; in megasas_set_pd_lba() 2372 cdb[12] = (u8)((start_blk >> 56) & 0xff); in megasas_set_pd_lba() 2373 cdb[13] = (u8)((start_blk >> 48) & 0xff); in megasas_set_pd_lba() 2374 cdb[14] = (u8)((start_blk >> 40) & 0xff); in megasas_set_pd_lba() [all …]
|
/drivers/scsi/device_handler/ |
D | scsi_dh_emc.c | 239 unsigned char cdb[MAX_COMMAND_SIZE]; in send_trespass_cmd() local 251 cdb[0] = MODE_SELECT; in send_trespass_cmd() 252 cdb[1] = 0x10; in send_trespass_cmd() 253 cdb[4] = len; in send_trespass_cmd() 260 cdb[0] = MODE_SELECT_10; in send_trespass_cmd() 261 cdb[8] = len; in send_trespass_cmd() 266 err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL, in send_trespass_cmd()
|
D | scsi_dh_rdac.c | 266 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[MAX_COMMAND_SIZE]; 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()
|
D | scsi_dh_alua.c | 128 u8 cdb[MAX_COMMAND_SIZE]; in submit_rtpg() local 133 memset(cdb, 0x0, MAX_COMMAND_SIZE); in submit_rtpg() 134 cdb[0] = MAINTENANCE_IN; in submit_rtpg() 136 cdb[1] = MI_REPORT_TARGET_PGS | MI_EXT_HDR_PARAM_FMT; in submit_rtpg() 138 cdb[1] = MI_REPORT_TARGET_PGS; in submit_rtpg() 139 put_unaligned_be32(bufflen, &cdb[6]); in submit_rtpg() 141 return scsi_execute(sdev, cdb, DMA_FROM_DEVICE, buff, bufflen, NULL, in submit_rtpg() 156 u8 cdb[MAX_COMMAND_SIZE]; in submit_stpg() local 168 memset(cdb, 0x0, MAX_COMMAND_SIZE); in submit_stpg() 169 cdb[0] = MAINTENANCE_OUT; in submit_stpg() [all …]
|
/drivers/block/ |
D | skd_main.c | 406 scsi_req->cdb[0] = READ_10; in skd_prep_rw_cdb() 408 scsi_req->cdb[0] = WRITE_10; in skd_prep_rw_cdb() 410 scsi_req->cdb[1] = 0; in skd_prep_rw_cdb() 411 scsi_req->cdb[2] = (lba & 0xff000000) >> 24; in skd_prep_rw_cdb() 412 scsi_req->cdb[3] = (lba & 0xff0000) >> 16; in skd_prep_rw_cdb() 413 scsi_req->cdb[4] = (lba & 0xff00) >> 8; in skd_prep_rw_cdb() 414 scsi_req->cdb[5] = (lba & 0xff); in skd_prep_rw_cdb() 415 scsi_req->cdb[6] = 0; in skd_prep_rw_cdb() 416 scsi_req->cdb[7] = (count & 0xff00) >> 8; in skd_prep_rw_cdb() 417 scsi_req->cdb[8] = count & 0xff; in skd_prep_rw_cdb() [all …]
|
/drivers/scsi/ibmvscsi_tgt/ |
D | ibmvscsi_tgt.h | 337 #define READ_CMD(cdb) (((cdb)[0] & 0x1F) == 8) argument 338 #define WRITE_CMD(cdb) (((cdb)[0] & 0x1F) == 0xA) argument
|
/drivers/usb/storage/ |
D | ene_ub6250.c | 674 unsigned char *cdb = srb->cmnd; in sd_scsi_read() local 678 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in sd_scsi_read() 679 ((cdb[4] << 8) & 0x0000ff00) | ((cdb[5] << 0) & 0x000000ff); in sd_scsi_read() 680 u16 blen = ((cdb[7] << 8) & 0xff00) | ((cdb[8] << 0) & 0x00ff); in sd_scsi_read() 714 unsigned char *cdb = srb->cmnd; in sd_scsi_write() local 718 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in sd_scsi_write() 719 ((cdb[4] << 8) & 0x0000ff00) | ((cdb[5] << 0) & 0x000000ff); in sd_scsi_write() 720 u16 blen = ((cdb[7] << 8) & 0xff00) | ((cdb[8] << 0) & 0x00ff); in sd_scsi_write() 1637 unsigned char *cdb = srb->cmnd; in ms_scsi_read() local 1641 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in ms_scsi_read() [all …]
|
/drivers/scsi/ufs/ |
D | ufshpb.c | 346 unsigned char *cdb = lrbp->cmd->cmnd; in ufshpb_set_hpb_read_to_upiu() local 348 cdb[0] = UFSHPB_READ; in ufshpb_set_hpb_read_to_upiu() 354 memcpy(&cdb[6], &ppn_tmp, sizeof(__be64)); in ufshpb_set_hpb_read_to_upiu() 355 cdb[14] = transfer_len; in ufshpb_set_hpb_read_to_upiu() 356 cdb[15] = read_id; in ufshpb_set_hpb_read_to_upiu() 361 static inline void ufshpb_set_write_buf_cmd(unsigned char *cdb, in ufshpb_set_write_buf_cmd() argument 365 cdb[0] = UFSHPB_WRITE_BUFFER; in ufshpb_set_write_buf_cmd() 366 cdb[1] = UFSHPB_WRITE_BUFFER_PREFETCH_ID; in ufshpb_set_write_buf_cmd() 368 put_unaligned_be32(lpn, &cdb[2]); in ufshpb_set_write_buf_cmd() 369 cdb[6] = read_id; in ufshpb_set_write_buf_cmd() [all …]
|