1 #ifndef SG_CMDS_MMC_H 2 #define SG_CMDS_MMC_H 3 4 /* 5 * Copyright (c) 2008-2017 Douglas Gilbert. 6 * All rights reserved. 7 * Use of this source code is governed by a BSD-style 8 * license that can be found in the BSD_LICENSE file. 9 * 10 * SPDX-License-Identifier: BSD-2-Clause 11 */ 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 18 /* Invokes a SCSI GET CONFIGURATION command (MMC-3...6). 19 * Returns 0 when successful, SG_LIB_CAT_INVALID_OP if command not 20 * supported, SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported, 21 * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_ABORTED_COMMAND, else -1 */ 22 int sg_ll_get_config(int sg_fd, int rt, int starting, void * resp, 23 int mx_resp_len, bool noisy, int verbose); 24 25 /* Invokes a SCSI GET PERFORMANCE command (MMC-3...6). 26 * Returns 0 when successful, SG_LIB_CAT_INVALID_OP if command not 27 * supported, SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported, 28 * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_ABORTED_COMMAND, else -1 */ 29 int sg_ll_get_performance(int sg_fd, int data_type, unsigned int starting_lba, 30 int max_num_desc, int type, void * resp, 31 int mx_resp_len, bool noisy, int verbose); 32 33 /* Invokes a SCSI SET CD SPEED command (MMC). 34 * Return of 0 -> success, SG_LIB_CAT_INVALID_OP -> command not supported, 35 * SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb, SG_LIB_CAT_UNIT_ATTENTION, 36 * SG_LIB_CAT_NOT_READY -> device not ready, SG_LIB_CAT_ABORTED_COMMAND, 37 * -1 -> other failure */ 38 int sg_ll_set_cd_speed(int sg_fd, int rot_control, int drv_read_speed, 39 int drv_write_speed, bool noisy, int verbose); 40 41 /* Invokes a SCSI SET STREAMING command (MMC). Return of 0 -> success, 42 * SG_LIB_CAT_INVALID_OP -> Set Streaming not supported, 43 * SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb, SG_LIB_CAT_ABORTED_COMMAND, 44 * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_NOT_READY -> device not ready, 45 * -1 -> other failure */ 46 int sg_ll_set_streaming(int sg_fd, int type, void * paramp, int param_len, 47 bool noisy, int verbose); 48 49 50 #ifdef __cplusplus 51 } 52 #endif 53 54 #endif 55