diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2007-11-07 13:29:15 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2007-11-07 13:29:15 +0000 |
commit | 7599d6ee7e196151d33dc3ed5e70408f7c4501f0 (patch) | |
tree | fbd0aa0e710d149c131c3d96385b76f5bfd9656e /include/sg_cmds_extra.h | |
parent | ce3fcfc9a3ec5594d2344f28d4ec4fc1d419b3a0 (diff) | |
download | sg3_utils-7599d6ee7e196151d33dc3ed5e70408f7c4501f0.tar.gz |
add sg_ll_get_performance() and sg_ll_set_cd_speed() for 'sdparm -C speed'
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@117 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'include/sg_cmds_extra.h')
-rw-r--r-- | include/sg_cmds_extra.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/sg_cmds_extra.h b/include/sg_cmds_extra.h index 7c300892..ef4b5afe 100644 --- a/include/sg_cmds_extra.h +++ b/include/sg_cmds_extra.h @@ -69,13 +69,22 @@ extern int sg_ll_format_unit(int sg_fd, int fmtpinfo, int rto_req, void * paramp, int param_len, int noisy, int verbose); -/* Invokes a SCSI GET CONFIGURATION command (MMC-3,4,5). +/* Invokes a SCSI GET CONFIGURATION command (MMC-3...6). * Returns 0 when successful, SG_LIB_CAT_INVALID_OP if command not * supported, SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported, * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_ABORTED_COMMAND, else -1 */ extern int sg_ll_get_config(int sg_fd, int rt, int starting, void * resp, int mx_resp_len, int noisy, int verbose); +/* Invokes a SCSI GET PERFORMANCE command (MMC-3...6). + * Returns 0 when successful, SG_LIB_CAT_INVALID_OP if command not + * supported, SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported, + * SG_LIB_CAT_UNIT_ATTENTION, SG_LIB_CAT_ABORTED_COMMAND, else -1 */ +extern int sg_ll_get_performance(int sg_fd, int data_type, + unsigned long starting_lba, int max_num_desc, + int type, void * resp, int mx_resp_len, + int noisy, int verbose); + /* Invokes a SCSI PERSISTENT RESERVE IN command (SPC). Returns 0 * when successful, SG_LIB_CAT_INVALID_OP if command not supported, * SG_LIB_CAT_ILLEGAL_REQ if field in cdb not supported, @@ -195,6 +204,14 @@ extern int sg_ll_send_diag(int sg_fd, int sf_code, int pf_bit, int sf_bit, void * paramp, int param_len, int noisy, int verbose); +/* Invokes a SCSI SET CD SPEED command (MMC). + * Return of 0 -> success, SG_LIB_CAT_INVALID_OP -> command not supported, + * SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb, SG_LIB_CAT_UNIT_ATTENTION, + * SG_LIB_CAT_NOT_READY -> device not ready, SG_LIB_CAT_ABORTED_COMMAND, + * -1 -> other failure */ +extern int sg_ll_set_cd_speed(int sg_fd, int rot_control, int drv_read_speed, + int drv_write_speed, int noisy, int verbose); + /* Invokes a SCSI SET IDENTIFYING INFORMATION command. This command was * called SET DEVICE IDENTIFIER prior to spc4r07. Return of 0 -> success, * SG_LIB_CAT_INVALID_OP -> Set identifying information not supported, |