Lines Matching refs:cdb

75 #define PASSTHROUGH_ISOLATE_BITS(cdb, index, mask, shift) (((sati_get_cdb_byte(cdb, index) & mask) …  argument
77 #define PASSTHROUGH_CDB_PROTOCOL(cdb) PASSTHROUGH_ISOLATE_BITS(cdb, 1, PASSTHROUGH_CDB_PROTOCO… argument
78 #define PASSTHROUGH_CDB_EXTEND(cdb) PASSTHROUGH_ISOLATE_BITS(cdb, 1, PASSTHROUGH_CDB_EXTEND_… argument
79 #define PASSTHROUGH_CDB_CK_COND(cdb) PASSTHROUGH_ISOLATE_BITS(cdb, 2, PASSTHROUGH_CDB_CK_COND… argument
80 #define PASSTHROUGH_CDB_T_DIR(cdb) PASSTHROUGH_ISOLATE_BITS(cdb, 2, PASSTHROUGH_CDB_T_DIR_M… argument
82 #define PASSTHROUGH_CDB_MULTIPLE_COUNT(cdb) (sati_get_cdb_byte(cdb, 1) >> 5) argument
83 #define PASSTHROUGH_CDB_COMMAND(cdb, index) sati_get_cdb_byte(cdb, index) argument
107 U8 * cdb in sati_passthrough_multiple_count_error() argument
112 if(PASSTHROUGH_CDB_MULTIPLE_COUNT(cdb) > 0) in sati_passthrough_multiple_count_error()
114 if(sati_get_cdb_byte(cdb, 0 ) == SCSI_ATA_PASSTHRU_12) in sati_passthrough_multiple_count_error()
116 ata_command_code = PASSTHROUGH_CDB_COMMAND(cdb, 9); in sati_passthrough_multiple_count_error()
120 ata_command_code = PASSTHROUGH_CDB_COMMAND(cdb, 14); in sati_passthrough_multiple_count_error()
178 U8 * cdb; in sati_passthrough_construct_sense() local
209 cdb = sati_cb_get_cdb_address(scsi_io); in sati_passthrough_construct_sense()
232 …sati_set_sense_data_byte(sense_data, sense_len, 8, (PASSTHROUGH_CDB_EXTEND(cdb) << 7) | (sector_c… in sati_passthrough_construct_sense()
253 U8 * cdb in sati_passthrough_check_direction() argument
259 if (PASSTHROUGH_CDB_T_DIR(cdb) == 0x0) in sati_passthrough_check_direction()
271 if (PASSTHROUGH_CDB_T_DIR(cdb) == 0x1) in sati_passthrough_check_direction()
310 U8 * cdb; in sati_passthrough_12_translate_command() local
318 cdb = sati_cb_get_cdb_address(scsi_io); in sati_passthrough_12_translate_command()
319 sequence->protocol = PASSTHROUGH_CDB_PROTOCOL (cdb); in sati_passthrough_12_translate_command()
332 if (PASSTHROUGH_CDB_T_DIR(cdb) == 0x1) in sati_passthrough_12_translate_command()
342 if (sati_passthrough_check_direction(sequence, cdb) != SATI_COMPLETE in sati_passthrough_12_translate_command()
343 || sati_passthrough_multiple_count_error(cdb) in sati_passthrough_12_translate_command()
358 sati_set_ata_features(register_fis, sati_get_cdb_byte(cdb, 3)); in sati_passthrough_12_translate_command()
359 sati_set_ata_sector_count(register_fis, sati_get_cdb_byte(cdb, 4)); in sati_passthrough_12_translate_command()
360 sati_set_ata_lba_low(register_fis, sati_get_cdb_byte(cdb, 5)); in sati_passthrough_12_translate_command()
361 sati_set_ata_lba_mid(register_fis, sati_get_cdb_byte(cdb, 6)); in sati_passthrough_12_translate_command()
362 sati_set_ata_lba_high(register_fis, sati_get_cdb_byte(cdb, 7)); in sati_passthrough_12_translate_command()
363 sati_set_ata_device_head(register_fis, sati_get_cdb_byte(cdb, 8)); in sati_passthrough_12_translate_command()
364 sati_set_ata_command(register_fis, sati_get_cdb_byte(cdb, 9)); in sati_passthrough_12_translate_command()
388 U8 * cdb; in sati_passthrough_16_translate_command() local
396 cdb = sati_cb_get_cdb_address(scsi_io); in sati_passthrough_16_translate_command()
397 sequence->protocol = PASSTHROUGH_CDB_PROTOCOL(cdb); in sati_passthrough_16_translate_command()
410 if (PASSTHROUGH_CDB_T_DIR(cdb) == 0x1) in sati_passthrough_16_translate_command()
420 if (sati_passthrough_check_direction(sequence, cdb) != SATI_COMPLETE in sati_passthrough_16_translate_command()
421 || sati_passthrough_multiple_count_error(cdb) in sati_passthrough_16_translate_command()
436 if (PASSTHROUGH_CDB_EXTEND(cdb) == 1) in sati_passthrough_16_translate_command()
438 sati_set_ata_features_exp(register_fis, sati_get_cdb_byte(cdb, 3)); in sati_passthrough_16_translate_command()
439 sati_set_ata_sector_count_exp(register_fis, sati_get_cdb_byte(cdb, 5)); in sati_passthrough_16_translate_command()
440 sati_set_ata_lba_low_exp(register_fis, sati_get_cdb_byte(cdb, 7)); in sati_passthrough_16_translate_command()
441 sati_set_ata_lba_mid_exp(register_fis, sati_get_cdb_byte(cdb, 9)); in sati_passthrough_16_translate_command()
442 sati_set_ata_lba_high_exp(register_fis, sati_get_cdb_byte(cdb, 11)); in sati_passthrough_16_translate_command()
445 if (PASSTHROUGH_CDB_CK_COND(cdb) || in sati_passthrough_16_translate_command()
446 PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE) in sati_passthrough_16_translate_command()
451 sati_set_ata_features(register_fis, sati_get_cdb_byte(cdb, 4)); in sati_passthrough_16_translate_command()
452 sati_set_ata_sector_count(register_fis, sati_get_cdb_byte(cdb, 6)); in sati_passthrough_16_translate_command()
453 sati_set_ata_lba_low(register_fis, sati_get_cdb_byte(cdb, 8)); in sati_passthrough_16_translate_command()
454 sati_set_ata_lba_mid(register_fis, sati_get_cdb_byte(cdb, 10)); in sati_passthrough_16_translate_command()
455 sati_set_ata_lba_high(register_fis, sati_get_cdb_byte(cdb, 12)); in sati_passthrough_16_translate_command()
456 sati_set_ata_device_head(register_fis, sati_get_cdb_byte(cdb, 13)); in sati_passthrough_16_translate_command()
457 sati_set_ata_command(register_fis, sati_get_cdb_byte(cdb, 14)); in sati_passthrough_16_translate_command()
480 U8 * cdb; in sati_passthrough_translate_response() local
483 cdb = sati_cb_get_cdb_address(scsi_io); in sati_passthrough_translate_response()
496 if (PASSTHROUGH_CDB_CK_COND(cdb) || in sati_passthrough_translate_response()
497 PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE) in sati_passthrough_translate_response()