From 7599d6ee7e196151d33dc3ed5e70408f7c4501f0 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Wed, 7 Nov 2007 13:29:15 +0000 Subject: 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 --- include/sg_cmds_extra.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include/sg_cmds_extra.h') 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, -- cgit v1.2.3