Lines Matching refs:cdb
1212 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat() local
1223 if (cdb[1] & 0x1) { in ata_scsi_start_stop_xlat()
1226 if (cdb[4] & 0x2) { in ata_scsi_start_stop_xlat()
1231 if (((cdb[4] >> 4) & 0xf) != 0) { in ata_scsi_start_stop_xlat()
1237 if (cdb[4] & 0x1) { in ata_scsi_start_stop_xlat()
1330 static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_6_lba_len() argument
1335 lba |= ((u64)(cdb[1] & 0x1f)) << 16; in scsi_6_lba_len()
1336 lba |= ((u64)cdb[2]) << 8; in scsi_6_lba_len()
1337 lba |= ((u64)cdb[3]); in scsi_6_lba_len()
1339 len = cdb[4]; in scsi_6_lba_len()
1355 static inline void scsi_10_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_10_lba_len() argument
1357 *plba = get_unaligned_be32(&cdb[2]); in scsi_10_lba_len()
1358 *plen = get_unaligned_be16(&cdb[7]); in scsi_10_lba_len()
1371 static inline void scsi_16_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_16_lba_len() argument
1373 *plba = get_unaligned_be64(&cdb[2]); in scsi_16_lba_len()
1374 *plen = get_unaligned_be32(&cdb[10]); in scsi_16_lba_len()
1384 static inline int scsi_dld(const u8 *cdb) in scsi_dld() argument
1386 return ((cdb[1] & 0x01) << 2) | ((cdb[14] >> 6) & 0x03); in scsi_dld()
1407 const u8 *cdb = scmd->cmnd; in ata_scsi_verify_xlat() local
1415 switch (cdb[0]) { in ata_scsi_verify_xlat()
1421 scsi_10_lba_len(cdb, &block, &n_block); in ata_scsi_verify_xlat()
1428 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_verify_xlat()
1553 const u8 *cdb = scmd->cmnd; in ata_scsi_rw_xlat() local
1563 switch (cdb[0]) { in ata_scsi_rw_xlat()
1572 switch (cdb[0]) { in ata_scsi_rw_xlat()
1579 scsi_10_lba_len(cdb, &block, &n_block); in ata_scsi_rw_xlat()
1580 if (cdb[1] & (1 << 3)) in ata_scsi_rw_xlat()
1591 scsi_6_lba_len(cdb, &block, &n_block); in ata_scsi_rw_xlat()
1607 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_rw_xlat()
1608 dld = scsi_dld(cdb); in ata_scsi_rw_xlat()
1609 if (cdb[1] & (1 << 3)) in ata_scsi_rw_xlat()
1666 u8 *cdb = cmd->cmnd; in ata_scsi_qc_complete() local
1679 if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) && in ata_scsi_qc_complete()
1680 ((cdb[2] & 0x20) || need_sense)) in ata_scsi_qc_complete()
2647 if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL && qc->dev->sdev) in atapi_qc_complete()
2680 memset(qc->cdb, 0, dev->cdb_len); in atapi_xlat()
2681 memcpy(qc->cdb, scmd->cmnd, scmd->cmd_len); in atapi_xlat()
2887 const u8 *cdb = scmd->cmnd; in ata_scsi_pass_thru() local
2892 if (cdb[0] == VARIABLE_LENGTH_CMD) in ata_scsi_pass_thru()
2895 tf->protocol = ata_scsi_map_proto(cdb[1 + cdb_offset]); in ata_scsi_pass_thru()
2901 if ((cdb[2 + cdb_offset] & 0x3) == 0) { in ata_scsi_pass_thru()
2922 switch (cdb[0]) { in ata_scsi_pass_thru()
2929 if (cdb[1] & 0x01) { in ata_scsi_pass_thru()
2930 tf->hob_feature = cdb[3]; in ata_scsi_pass_thru()
2931 tf->hob_nsect = cdb[5]; in ata_scsi_pass_thru()
2932 tf->hob_lbal = cdb[7]; in ata_scsi_pass_thru()
2933 tf->hob_lbam = cdb[9]; in ata_scsi_pass_thru()
2934 tf->hob_lbah = cdb[11]; in ata_scsi_pass_thru()
2942 tf->feature = cdb[4]; in ata_scsi_pass_thru()
2943 tf->nsect = cdb[6]; in ata_scsi_pass_thru()
2944 tf->lbal = cdb[8]; in ata_scsi_pass_thru()
2945 tf->lbam = cdb[10]; in ata_scsi_pass_thru()
2946 tf->lbah = cdb[12]; in ata_scsi_pass_thru()
2947 tf->device = cdb[13]; in ata_scsi_pass_thru()
2948 tf->command = cdb[14]; in ata_scsi_pass_thru()
2956 tf->feature = cdb[3]; in ata_scsi_pass_thru()
2957 tf->nsect = cdb[4]; in ata_scsi_pass_thru()
2958 tf->lbal = cdb[5]; in ata_scsi_pass_thru()
2959 tf->lbam = cdb[6]; in ata_scsi_pass_thru()
2960 tf->lbah = cdb[7]; in ata_scsi_pass_thru()
2961 tf->device = cdb[8]; in ata_scsi_pass_thru()
2962 tf->command = cdb[9]; in ata_scsi_pass_thru()
2970 if (cdb[10] & 0x01) { in ata_scsi_pass_thru()
2971 tf->hob_feature = cdb[20]; in ata_scsi_pass_thru()
2972 tf->hob_nsect = cdb[22]; in ata_scsi_pass_thru()
2973 tf->hob_lbal = cdb[16]; in ata_scsi_pass_thru()
2974 tf->hob_lbam = cdb[15]; in ata_scsi_pass_thru()
2975 tf->hob_lbah = cdb[14]; in ata_scsi_pass_thru()
2980 tf->feature = cdb[21]; in ata_scsi_pass_thru()
2981 tf->nsect = cdb[23]; in ata_scsi_pass_thru()
2982 tf->lbal = cdb[19]; in ata_scsi_pass_thru()
2983 tf->lbam = cdb[18]; in ata_scsi_pass_thru()
2984 tf->lbah = cdb[17]; in ata_scsi_pass_thru()
2985 tf->device = cdb[24]; in ata_scsi_pass_thru()
2986 tf->command = cdb[25]; in ata_scsi_pass_thru()
2987 tf->auxiliary = get_unaligned_be32(&cdb[28]); in ata_scsi_pass_thru()
3083 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3089 unsigned int multi_count = 1 << (cdb[1] >> 5); in ata_scsi_pass_thru()
3108 fp = (cdb[0] == ATA_16) ? 4 : 3; in ata_scsi_pass_thru()
3128 fp = (cdb[0] == ATA_16) ? 14 : 9; in ata_scsi_pass_thru()
3211 const u8 *cdb = scmd->cmnd; in ata_scsi_write_same_xlat() local
3218 u8 unmap = cdb[1] & 0x8; in ata_scsi_write_same_xlat()
3236 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_write_same_xlat()
3320 u8 *cdb = args->cmd->cmnd; in ata_scsiop_maint_in() local
3324 if (cdb[2] != 1 && cdb[2] != 3) { in ata_scsiop_maint_in()
3325 ata_dev_warn(dev, "invalid command format %d\n", cdb[2]); in ata_scsiop_maint_in()
3330 switch (cdb[3]) { in ata_scsiop_maint_in()
3477 const u8 *cdb = scmd->cmnd; in ata_scsi_zbc_in_xlat() local
3489 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_zbc_in_xlat()
3495 sa = cdb[1] & 0x1f; in ata_scsi_zbc_in_xlat()
3510 options = cdb[14] & 0xbf; in ata_scsi_zbc_in_xlat()
3561 const u8 *cdb = scmd->cmnd; in ata_scsi_zbc_out_xlat() local
3572 sa = cdb[1] & 0x1f; in ata_scsi_zbc_out_xlat()
3579 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_zbc_out_xlat()
3587 all = cdb[14] & 0x1; in ata_scsi_zbc_out_xlat()
3822 const u8 *cdb = scmd->cmnd; in ata_scsi_mode_select_xlat() local
3831 six_byte = (cdb[0] == MODE_SELECT); in ata_scsi_mode_select_xlat()
3838 len = cdb[4]; in ata_scsi_mode_select_xlat()
3846 len = get_unaligned_be16(&cdb[7]); in ata_scsi_mode_select_xlat()
3851 if ((cdb[1] & 0x11) != 0x10) { in ata_scsi_mode_select_xlat()
3853 bp = (cdb[1] & 0x01) ? 1 : 5; in ata_scsi_mode_select_xlat()
3999 const u8 *cdb = scmd->cmnd; in ata_scsi_security_inout_xlat() local
4001 u8 secp = cdb[1]; in ata_scsi_security_inout_xlat()
4002 bool send = (cdb[0] == SECURITY_PROTOCOL_OUT); in ata_scsi_security_inout_xlat()
4003 u16 spsp = get_unaligned_be16(&cdb[2]); in ata_scsi_security_inout_xlat()
4004 u32 len = get_unaligned_be32(&cdb[6]); in ata_scsi_security_inout_xlat()
4015 if (cdb[4] & 7) { /* INC_512 */ in ata_scsi_security_inout_xlat()
4065 const u8 *cdb = scmd->cmnd; in ata_scsi_var_len_cdb_xlat() local
4066 const u16 sa = get_unaligned_be16(&cdb[8]); in ata_scsi_var_len_cdb_xlat()