Lines Matching refs:cdb
1207 const u8 *cdb = scmd->cmnd; in ata_scsi_start_stop_xlat() local
1218 if (cdb[1] & 0x1) { in ata_scsi_start_stop_xlat()
1221 if (cdb[4] & 0x2) { in ata_scsi_start_stop_xlat()
1226 if (((cdb[4] >> 4) & 0xf) != 0) { in ata_scsi_start_stop_xlat()
1232 if (cdb[4] & 0x1) { in ata_scsi_start_stop_xlat()
1325 static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_6_lba_len() argument
1330 lba |= ((u64)(cdb[1] & 0x1f)) << 16; in scsi_6_lba_len()
1331 lba |= ((u64)cdb[2]) << 8; in scsi_6_lba_len()
1332 lba |= ((u64)cdb[3]); in scsi_6_lba_len()
1334 len = cdb[4]; in scsi_6_lba_len()
1350 static inline void scsi_10_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_10_lba_len() argument
1352 *plba = get_unaligned_be32(&cdb[2]); in scsi_10_lba_len()
1353 *plen = get_unaligned_be16(&cdb[7]); in scsi_10_lba_len()
1366 static inline void scsi_16_lba_len(const u8 *cdb, u64 *plba, u32 *plen) in scsi_16_lba_len() argument
1368 *plba = get_unaligned_be64(&cdb[2]); in scsi_16_lba_len()
1369 *plen = get_unaligned_be32(&cdb[10]); in scsi_16_lba_len()
1379 static inline int scsi_dld(const u8 *cdb) in scsi_dld() argument
1381 return ((cdb[1] & 0x01) << 2) | ((cdb[14] >> 6) & 0x03); in scsi_dld()
1402 const u8 *cdb = scmd->cmnd; in ata_scsi_verify_xlat() local
1410 switch (cdb[0]) { in ata_scsi_verify_xlat()
1416 scsi_10_lba_len(cdb, &block, &n_block); in ata_scsi_verify_xlat()
1423 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_verify_xlat()
1548 const u8 *cdb = scmd->cmnd; in ata_scsi_rw_xlat() local
1558 switch (cdb[0]) { in ata_scsi_rw_xlat()
1567 switch (cdb[0]) { in ata_scsi_rw_xlat()
1574 scsi_10_lba_len(cdb, &block, &n_block); in ata_scsi_rw_xlat()
1575 if (cdb[1] & (1 << 3)) in ata_scsi_rw_xlat()
1586 scsi_6_lba_len(cdb, &block, &n_block); in ata_scsi_rw_xlat()
1602 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_rw_xlat()
1603 dld = scsi_dld(cdb); in ata_scsi_rw_xlat()
1604 if (cdb[1] & (1 << 3)) in ata_scsi_rw_xlat()
1661 u8 *cdb = cmd->cmnd; in ata_scsi_qc_complete() local
1674 if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) && in ata_scsi_qc_complete()
1675 ((cdb[2] & 0x20) || need_sense)) in ata_scsi_qc_complete()
2642 if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL && qc->dev->sdev) in atapi_qc_complete()
2675 memset(qc->cdb, 0, dev->cdb_len); in atapi_xlat()
2676 memcpy(qc->cdb, scmd->cmnd, scmd->cmd_len); in atapi_xlat()
2882 const u8 *cdb = scmd->cmnd; in ata_scsi_pass_thru() local
2887 if (cdb[0] == VARIABLE_LENGTH_CMD) in ata_scsi_pass_thru()
2890 tf->protocol = ata_scsi_map_proto(cdb[1 + cdb_offset]); in ata_scsi_pass_thru()
2896 if ((cdb[2 + cdb_offset] & 0x3) == 0) { in ata_scsi_pass_thru()
2917 switch (cdb[0]) { in ata_scsi_pass_thru()
2924 if (cdb[1] & 0x01) { in ata_scsi_pass_thru()
2925 tf->hob_feature = cdb[3]; in ata_scsi_pass_thru()
2926 tf->hob_nsect = cdb[5]; in ata_scsi_pass_thru()
2927 tf->hob_lbal = cdb[7]; in ata_scsi_pass_thru()
2928 tf->hob_lbam = cdb[9]; in ata_scsi_pass_thru()
2929 tf->hob_lbah = cdb[11]; in ata_scsi_pass_thru()
2937 tf->feature = cdb[4]; in ata_scsi_pass_thru()
2938 tf->nsect = cdb[6]; in ata_scsi_pass_thru()
2939 tf->lbal = cdb[8]; in ata_scsi_pass_thru()
2940 tf->lbam = cdb[10]; in ata_scsi_pass_thru()
2941 tf->lbah = cdb[12]; in ata_scsi_pass_thru()
2942 tf->device = cdb[13]; in ata_scsi_pass_thru()
2943 tf->command = cdb[14]; in ata_scsi_pass_thru()
2951 tf->feature = cdb[3]; in ata_scsi_pass_thru()
2952 tf->nsect = cdb[4]; in ata_scsi_pass_thru()
2953 tf->lbal = cdb[5]; in ata_scsi_pass_thru()
2954 tf->lbam = cdb[6]; in ata_scsi_pass_thru()
2955 tf->lbah = cdb[7]; in ata_scsi_pass_thru()
2956 tf->device = cdb[8]; in ata_scsi_pass_thru()
2957 tf->command = cdb[9]; in ata_scsi_pass_thru()
2965 if (cdb[10] & 0x01) { in ata_scsi_pass_thru()
2966 tf->hob_feature = cdb[20]; in ata_scsi_pass_thru()
2967 tf->hob_nsect = cdb[22]; in ata_scsi_pass_thru()
2968 tf->hob_lbal = cdb[16]; in ata_scsi_pass_thru()
2969 tf->hob_lbam = cdb[15]; in ata_scsi_pass_thru()
2970 tf->hob_lbah = cdb[14]; in ata_scsi_pass_thru()
2975 tf->feature = cdb[21]; in ata_scsi_pass_thru()
2976 tf->nsect = cdb[23]; in ata_scsi_pass_thru()
2977 tf->lbal = cdb[19]; in ata_scsi_pass_thru()
2978 tf->lbam = cdb[18]; in ata_scsi_pass_thru()
2979 tf->lbah = cdb[17]; in ata_scsi_pass_thru()
2980 tf->device = cdb[24]; in ata_scsi_pass_thru()
2981 tf->command = cdb[25]; in ata_scsi_pass_thru()
2982 tf->auxiliary = get_unaligned_be32(&cdb[28]); in ata_scsi_pass_thru()
3078 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) { in ata_scsi_pass_thru()
3084 unsigned int multi_count = 1 << (cdb[1] >> 5); in ata_scsi_pass_thru()
3103 fp = (cdb[0] == ATA_16) ? 4 : 3; in ata_scsi_pass_thru()
3123 fp = (cdb[0] == ATA_16) ? 14 : 9; in ata_scsi_pass_thru()
3206 const u8 *cdb = scmd->cmnd; in ata_scsi_write_same_xlat() local
3213 u8 unmap = cdb[1] & 0x8; in ata_scsi_write_same_xlat()
3231 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_write_same_xlat()
3315 u8 *cdb = args->cmd->cmnd; in ata_scsiop_maint_in() local
3319 if (cdb[2] != 1 && cdb[2] != 3) { in ata_scsiop_maint_in()
3320 ata_dev_warn(dev, "invalid command format %d\n", cdb[2]); in ata_scsiop_maint_in()
3325 switch (cdb[3]) { in ata_scsiop_maint_in()
3472 const u8 *cdb = scmd->cmnd; in ata_scsi_zbc_in_xlat() local
3484 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_zbc_in_xlat()
3490 sa = cdb[1] & 0x1f; in ata_scsi_zbc_in_xlat()
3505 options = cdb[14] & 0xbf; in ata_scsi_zbc_in_xlat()
3556 const u8 *cdb = scmd->cmnd; in ata_scsi_zbc_out_xlat() local
3567 sa = cdb[1] & 0x1f; in ata_scsi_zbc_out_xlat()
3574 scsi_16_lba_len(cdb, &block, &n_block); in ata_scsi_zbc_out_xlat()
3582 all = cdb[14] & 0x1; in ata_scsi_zbc_out_xlat()
3817 const u8 *cdb = scmd->cmnd; in ata_scsi_mode_select_xlat() local
3826 six_byte = (cdb[0] == MODE_SELECT); in ata_scsi_mode_select_xlat()
3833 len = cdb[4]; in ata_scsi_mode_select_xlat()
3841 len = get_unaligned_be16(&cdb[7]); in ata_scsi_mode_select_xlat()
3846 if ((cdb[1] & 0x11) != 0x10) { in ata_scsi_mode_select_xlat()
3848 bp = (cdb[1] & 0x01) ? 1 : 5; in ata_scsi_mode_select_xlat()
3994 const u8 *cdb = scmd->cmnd; in ata_scsi_security_inout_xlat() local
3996 u8 secp = cdb[1]; in ata_scsi_security_inout_xlat()
3997 bool send = (cdb[0] == SECURITY_PROTOCOL_OUT); in ata_scsi_security_inout_xlat()
3998 u16 spsp = get_unaligned_be16(&cdb[2]); in ata_scsi_security_inout_xlat()
3999 u32 len = get_unaligned_be32(&cdb[6]); in ata_scsi_security_inout_xlat()
4010 if (cdb[4] & 7) { /* INC_512 */ in ata_scsi_security_inout_xlat()
4060 const u8 *cdb = scmd->cmnd; in ata_scsi_var_len_cdb_xlat() local
4061 const u16 sa = get_unaligned_be16(&cdb[8]); in ata_scsi_var_len_cdb_xlat()