/linux/drivers/scsi/ |
H A 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 …]
|
H A D | pmcraid.c | 316 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() 1012 ioarcb->cdb[0] = INQUIRY; in pmcraid_get_fwversion() 1013 ioarcb->cdb[1] = 1; in pmcraid_get_fwversion() [all …]
|
H A D | 3w-sas.c | 293 unsigned char *cdb, int use_sg, 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 unsigned 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() 558 unsigned char cdb[TW_MAX_CDB_LEN]; in twl_aen_drain_queue() local [all …]
|
H A D | hpsa.c | 320 struct CommandList *c, u32 ioaccel_handle, u8 *cdb, int cdb_len, 1122 static int is_firmware_flash_cmd(u8 *cdb) in is_firmware_flash_cmd() argument 1124 return cdb[0] == BMIC_WRITE && cdb[6] == BMIC_FLASH_FIRMWARE; in is_firmware_flash_cmd() 2921 const u8 *cdb = c->Request.CDB; in hpsa_print_cmd() local 2925 txt, lun, cdb); in hpsa_print_cmd() 4646 u8 *cdb, int cdb_len, in warn_zero_length_transfer() argument 4651 func, cdb_len, cdb); in warn_zero_length_transfer() 4656 static bool is_zero_length_transfer(u8 *cdb) in is_zero_length_transfer() argument 4661 switch (cdb[0]) { in is_zero_length_transfer() 4666 block_cnt = get_unaligned_be16(&cdb[7]); in is_zero_length_transfer() [all …]
|
/linux/drivers/isdn/capi/ |
H A 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 …]
|
H A 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 …]
|
/linux/drivers/target/ |
H A 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 …]
|
H A D | target_core_spc.c | 737 unsigned char *cdb = cmd->t_task_cdb; in spc_emulate_inquiry() local 751 if (!(cdb[1] & 0x1)) { in spc_emulate_inquiry() 752 if (cdb[2]) { in spc_emulate_inquiry() 754 cdb[2]); in spc_emulate_inquiry() 765 if (cdb[2] == evpd_handlers[p].page) { in spc_emulate_inquiry() 766 buf[1] = cdb[2]; in spc_emulate_inquiry() 773 pr_debug("Unknown VPD Code: 0x%02x\n", cdb[2]); in spc_emulate_inquiry() 1021 char *cdb = cmd->t_task_cdb; in spc_emulate_modesense() local 1025 bool dbd = !!(cdb[1] & 0x08); in spc_emulate_modesense() 1026 bool llba = ten ? !!(cdb[1] & 0x10) : false; in spc_emulate_modesense() [all …]
|
H A D | target_core_device.c | 1061 unsigned char *cdb = cmd->t_task_cdb; in passthrough_parse_cdb() local 1069 if (cdb[0] == REPORT_LUNS) { in passthrough_parse_cdb() 1079 ((cdb[0] == PERSISTENT_RESERVE_IN) || in passthrough_parse_cdb() 1080 (cdb[0] == PERSISTENT_RESERVE_OUT) || in passthrough_parse_cdb() 1081 (cdb[0] == RELEASE || cdb[0] == RELEASE_10) || in passthrough_parse_cdb() 1082 (cdb[0] == RESERVE || cdb[0] == RESERVE_10))) { in passthrough_parse_cdb() 1093 if (cdb[0] == PERSISTENT_RESERVE_IN) { in passthrough_parse_cdb() 1095 size = get_unaligned_be16(&cdb[7]); in passthrough_parse_cdb() 1098 if (cdb[0] == PERSISTENT_RESERVE_OUT) { in passthrough_parse_cdb() 1100 size = get_unaligned_be32(&cdb[5]); in passthrough_parse_cdb() [all …]
|
H A D | target_core_xcopy.c | 515 unsigned char *cdb, in target_xcopy_setup_pt_cmd() argument 533 if (target_cmd_init_cdb(cmd, cdb, GFP_KERNEL)) in target_xcopy_setup_pt_cmd() 581 unsigned char cdb[16]; in target_xcopy_read_source() local 587 memset(&cdb[0], 0, 16); in target_xcopy_read_source() 588 cdb[0] = READ_16; in target_xcopy_read_source() 589 put_unaligned_be64(src_lba, &cdb[2]); in target_xcopy_read_source() 590 put_unaligned_be32(transfer_length_block, &cdb[10]); in target_xcopy_read_source() 597 rc = target_xcopy_setup_pt_cmd(&xpt_cmd, xop, src_dev, &cdb[0], in target_xcopy_read_source() 626 unsigned char cdb[16]; in target_xcopy_write_destination() local 632 memset(&cdb[0], 0, 16); in target_xcopy_write_destination() [all …]
|
H A D | target_core_alua.c | 436 unsigned char *cdb, in core_alua_state_nonoptimized() argument 520 unsigned char *cdb) in core_alua_state_standby() argument 526 switch (cdb[0]) { in core_alua_state_standby() 538 switch (cdb[1] & 0x1f) { in core_alua_state_standby() 545 switch (cdb[1] & 0x1f) { in core_alua_state_standby() 552 switch (cdb[1]) { in core_alua_state_standby() 573 unsigned char *cdb) in core_alua_state_unavailable() argument 579 switch (cdb[0]) { in core_alua_state_unavailable() 584 switch (cdb[1] & 0x1f) { in core_alua_state_unavailable() 591 switch (cdb[1]) { in core_alua_state_unavailable() [all …]
|
/linux/net/ethtool/ |
H A D | cmis_fw_update.c | 47 cmis_fw_update_fw_mng_features_get(struct ethtool_cmis_cdb *cdb, in cmis_fw_update_fw_mng_features_get() argument 57 ethtool_cmis_cdb_check_completion_flag(cdb->cmis_rev, &flags); in cmis_fw_update_fw_mng_features_get() 61 cdb->max_completion_time, in cmis_fw_update_fw_mng_features_get() 62 cdb->read_write_len_ext, 1000, in cmis_fw_update_fw_mng_features_get() 86 cdb->read_write_len_ext = rpl->read_write_len_ext; in cmis_fw_update_fw_mng_features_get() 114 cmis_fw_update_start_download(struct ethtool_cmis_cdb *cdb, in cmis_fw_update_start_download() argument 134 cdb->read_write_len_ext, 1000, 0, in cmis_fw_update_start_download() 158 cmis_fw_update_write_image_lpl(struct ethtool_cmis_cdb *cdb, in cmis_fw_update_write_image_lpl() argument 168 ethtool_cmis_get_max_lpl_size(cdb->read_write_len_ext), in cmis_fw_update_write_image_lpl() 195 cdb->read_write_len_ext, 1, 0, in cmis_fw_update_write_image_lpl() [all …]
|
H A D | cmis_cdb.c | 118 static int cmis_cdb_advertisement_get(struct ethtool_cmis_cdb *cdb, in cmis_cdb_advertisement_get() argument 146 cdb->read_write_len_ext = rpl.read_write_len_ext; in cmis_cdb_advertisement_get() 174 cmis_cdb_validate_password(struct ethtool_cmis_cdb *cdb, in cmis_cdb_validate_password() argument 203 cdb->read_write_len_ext, 1000, in cmis_cdb_validate_password() 252 static int cmis_cdb_module_features_get(struct ethtool_cmis_cdb *cdb, in cmis_cdb_module_features_get() argument 261 ethtool_cmis_cdb_check_completion_flag(cdb->cmis_rev, &flags); in cmis_cdb_module_features_get() 265 cdb->read_write_len_ext, 1000, in cmis_cdb_module_features_get() 277 cdb->max_completion_time = in cmis_cdb_module_features_get() 288 struct ethtool_cmis_cdb *cdb; in ethtool_cmis_cdb_init() local 291 cdb = kzalloc(sizeof(*cdb), GFP_KERNEL); in ethtool_cmis_cdb_init() [all …]
|
/linux/drivers/ata/ |
H A D | libata-scsi.c | 1251 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat() local 1261 if (cdb[4] & 0x2) { in ata_scsi_start_stop_xlat() 1268 if (((cdb[4] >> 4) & 0xf) != 0) { in ata_scsi_start_stop_xlat() 1275 if (!ata_dev_power_init_tf(qc->dev, &qc->tf, cdb[4] & 0x1)) { in ata_scsi_start_stop_xlat() 1335 static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_6_lba_len() argument 1337 *plba = get_unaligned_be24(&cdb[1]) & 0x1fffff; in scsi_6_lba_len() 1338 *plen = cdb[4]; in scsi_6_lba_len() 1351 static inline void scsi_10_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_10_lba_len() argument 1353 *plba = get_unaligned_be32(&cdb[2]); in scsi_10_lba_len() 1354 *plen = get_unaligned_be16(&cdb[7]); in scsi_10_lba_len() [all …]
|
H A 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()
|
/linux/drivers/scsi/esas2r/ |
H A 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 …]
|
/linux/include/trace/events/ |
H A D | target.h | 145 __array( unsigned char, cdb, TCM_MAX_COMMAND_SIZE ) 156 memcpy(__entry->cdb, cmd->t_task_cdb, TCM_MAX_COMMAND_SIZE); 163 __entry->data_length, __print_hex(__entry->cdb, 16), 184 __array( unsigned char, cdb, TCM_MAX_COMMAND_SIZE ) 199 memcpy(__entry->cdb, cmd->t_task_cdb, TCM_MAX_COMMAND_SIZE); 211 __entry->data_length, __print_hex(__entry->cdb, 16),
|
/linux/drivers/scsi/megaraid/ |
H A D | megaraid_sas_fusion.c | 2392 u8 *cdb = io_request->CDB.CDB32; in megasas_set_pd_lba() local 2400 memset(cdb, 0, sizeof(io_request->CDB.CDB32)); in megasas_set_pd_lba() 2401 cdb[0] = MEGASAS_SCSI_VARIABLE_LENGTH_CMD; in megasas_set_pd_lba() 2402 cdb[7] = MEGASAS_SCSI_ADDL_CDB_LEN; in megasas_set_pd_lba() 2405 cdb[9] = MEGASAS_SCSI_SERVICE_ACTION_READ32; in megasas_set_pd_lba() 2407 cdb[9] = MEGASAS_SCSI_SERVICE_ACTION_WRITE32; in megasas_set_pd_lba() 2408 cdb[10] = MEGASAS_RD_WR_PROTECT_CHECK_ALL; in megasas_set_pd_lba() 2411 cdb[12] = (u8)((start_blk >> 56) & 0xff); in megasas_set_pd_lba() 2412 cdb[13] = (u8)((start_blk >> 48) & 0xff); in megasas_set_pd_lba() 2413 cdb[14] = (u8)((start_blk >> 40) & 0xff); in megasas_set_pd_lba() [all …]
|
/linux/drivers/scsi/device_handler/ |
H A D | scsi_dh_emc.c | 239 unsigned char cdb[MAX_COMMAND_SIZE]; in send_trespass_cmd() local 254 cdb[0] = MODE_SELECT; in send_trespass_cmd() 255 cdb[1] = 0x10; in send_trespass_cmd() 256 cdb[4] = len; in send_trespass_cmd() 263 cdb[0] = MODE_SELECT_10; in send_trespass_cmd() 264 cdb[8] = len; in send_trespass_cmd() 269 err = scsi_execute_cmd(sdev, cdb, opf, csdev->buffer, len, in send_trespass_cmd()
|
H A 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() 510 unsigned char cdb[MAX_COMMAND_SIZE]; in send_mode_select() local 566 memset(cdb, 0, sizeof(cdb)); in send_mode_select() 568 data_size = rdac_failover_get(ctlr, &list, cdb); in send_mode_select() 573 rc = scsi_execute_cmd(sdev, cdb, opf, &h->ctlr->mode_select, data_size, in send_mode_select()
|
H A D | scsi_dh_alua.c | 129 u8 cdb[MAX_COMMAND_SIZE]; in submit_rtpg() local 137 memset(cdb, 0x0, MAX_COMMAND_SIZE); in submit_rtpg() 138 cdb[0] = MAINTENANCE_IN; in submit_rtpg() 140 cdb[1] = MI_REPORT_TARGET_PGS | MI_EXT_HDR_PARAM_FMT; in submit_rtpg() 142 cdb[1] = MI_REPORT_TARGET_PGS; in submit_rtpg() 143 put_unaligned_be32(bufflen, &cdb[6]); in submit_rtpg() 145 return scsi_execute_cmd(sdev, cdb, opf, buff, bufflen, in submit_rtpg() 160 u8 cdb[MAX_COMMAND_SIZE]; in submit_stpg() local 175 memset(cdb, 0x0, MAX_COMMAND_SIZE); in submit_stpg() 176 cdb[0] = MAINTENANCE_OUT; in submit_stpg() [all …]
|
/linux/drivers/scsi/ibmvscsi_tgt/ |
H A D | ibmvscsi_tgt.h | 337 #define READ_CMD(cdb) (((cdb)[0] & 0x1F) == 8) argument 338 #define WRITE_CMD(cdb) (((cdb)[0] & 0x1F) == 0xA) argument
|
/linux/drivers/usb/storage/ |
H A 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() 1638 unsigned char *cdb = srb->cmnd; in ms_scsi_read() local 1642 u32 bn = ((cdb[2] << 24) & 0xff000000) | ((cdb[3] << 16) & 0x00ff0000) | in ms_scsi_read() [all …]
|
/linux/drivers/net/wireless/intel/iwlwifi/tests/ |
H A D | devinfo.c | 18 di->rf_type, di->cdb, di->jacket, di->rf_id, di->no_160, in iwl_pci_print_dev_info() 32 di->rf_type, di->cdb, in devinfo_table_order()
|
/linux/include/uapi/linux/ |
H A D | virtio_scsi.h | 50 __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; member 62 __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; member
|