• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 
16 /* Invokes a SCSI GET CONFIGURATION command (MMC-3...6).
17  * Returns 0 when successful, SG_LIB_CAT_INVALID_OP if command not
18  * supported, SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported,
19  * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_ABORTED_COMMAND, else -1 */
20 int sg_ll_get_config(int sg_fd, int rt, int starting, void * resp,
21                      int mx_resp_len, bool noisy, int verbose);
22 
23 /* Invokes a SCSI GET PERFORMANCE command (MMC-3...6).
24  * Returns 0 when successful, SG_LIB_CAT_INVALID_OP if command not
25  * supported, SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported,
26  * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_ABORTED_COMMAND, else -1 */
27 int sg_ll_get_performance(int sg_fd, int data_type, unsigned int starting_lba,
28                           int max_num_desc, int type, void * resp,
29                           int mx_resp_len, bool noisy, int verbose);
30 
31 /* Invokes a SCSI SET CD SPEED command (MMC).
32  * Return of 0 -> success, SG_LIB_CAT_INVALID_OP -> command not supported,
33  * SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb, SG_LIB_CAT_UNIT_ATTENTION,
34  * SG_LIB_CAT_NOT_READY -> device not ready, SG_LIB_CAT_ABORTED_COMMAND,
35  * -1 -> other failure */
36 int sg_ll_set_cd_speed(int sg_fd, int rot_control, int drv_read_speed,
37                        int drv_write_speed, bool noisy, int verbose);
38 
39 /* Invokes a SCSI SET STREAMING command (MMC). Return of 0 -> success,
40  * SG_LIB_CAT_INVALID_OP -> Set Streaming not supported,
41  * SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb, SG_LIB_CAT_ABORTED_COMMAND,
42  * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_NOT_READY -> device not ready,
43  * -1 -> other failure */
44 int sg_ll_set_streaming(int sg_fd, int type, void * paramp, int param_len,
45                         bool noisy, int verbose);
46 
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif
53