diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-11-29 14:06:22 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-11-29 14:06:22 +0000 |
commit | 4a4b71da82bc52d8fa238138046c219d8d7d162e (patch) | |
tree | 346d9af61322abae2a4ce56ff1fe42eb0dfcd4db /sys/scsi | |
parent | 58bd8ad3bcb7cf94a7dea4f16ed2ec37e8176d9c (diff) |
Add defines for changer mode page codes. Move AUDIO_PAGE define to
nestle amoung its friends.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/cd.h | 4 | ||||
-rw-r--r-- | sys/scsi/ch.c | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_changer.h | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/scsi/cd.h b/sys/scsi/cd.h index 8e183ad8462..b9c7f67331e 100644 --- a/sys/scsi/cd.h +++ b/sys/scsi/cd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.h,v 1.27 2019/09/27 23:07:42 krw Exp $ */ +/* $OpenBSD: cd.h,v 1.28 2019/11/29 14:06:21 krw Exp $ */ /* $NetBSD: scsi_cd.h,v 1.6 1996/03/19 03:06:39 mycroft Exp $ */ /* @@ -209,12 +209,12 @@ struct scsi_set_cd_speed { #define ERR_RECOVERY_PAGE 0x01 #define WRITE_PARAM_PAGE 0x05 +#define AUDIO_PAGE 0x0e #define CDVD_CAPABILITIES_PAGE 0x2a struct cd_audio_page { u_int8_t page_code; #define CD_PAGE_CODE 0x3F -#define AUDIO_PAGE 0x0e #define CD_PAGE_PS 0x80 u_int8_t param_len; u_int8_t flags; diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index 8e8203a76a9..a43347a6c89 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ch.c,v 1.60 2019/11/28 16:27:35 krw Exp $ */ +/* $OpenBSD: ch.c,v 1.61 2019/11/29 14:06:21 krw Exp $ */ /* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */ /* @@ -672,7 +672,7 @@ ch_get_params(struct ch_softc *sc, int flags) /* * Grab info from the element address assignment page (0x1d). */ - error = scsi_do_mode_sense(sc->sc_link, 0x1d, data, + error = scsi_do_mode_sense(sc->sc_link, EA_PAGE, data, (void **)&ea, NULL, NULL, NULL, sizeof(*ea), flags, &big); if (error == 0 && ea == NULL) error = EIO; @@ -699,7 +699,7 @@ ch_get_params(struct ch_softc *sc, int flags) /* * Grab info from the capabilities page (0x1f). */ - error = scsi_do_mode_sense(sc->sc_link, 0x1f, data, + error = scsi_do_mode_sense(sc->sc_link, CAP_PAGE, data, (void **)&cap, NULL, NULL, NULL, sizeof(*cap), flags, &big); if (cap == NULL) error = EIO; diff --git a/sys/scsi/scsi_changer.h b/sys/scsi/scsi_changer.h index 9322ce3799b..7ad2f1c9fef 100644 --- a/sys/scsi/scsi_changer.h +++ b/sys/scsi/scsi_changer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_changer.h,v 1.7 2019/09/27 23:07:42 krw Exp $ */ +/* $OpenBSD: scsi_changer.h,v 1.8 2019/11/29 14:06:21 krw Exp $ */ /* $NetBSD: scsi_changer.h,v 1.7 1996/04/03 00:25:48 thorpej Exp $ */ /* @@ -283,6 +283,7 @@ struct read_element_status_descriptor { * IE Import/export element (portal) * DT Data transfer element (tape/disk drive) */ +#define CAP_PAGE 0x1f struct page_device_capabilities { u_int8_t pg_code; /* page code (0x1f) */ u_int8_t pg_length; /* page length (0x12) */ @@ -359,6 +360,7 @@ struct page_device_capabilities { * tape or disk drive in the changer. "Number of data transfer elements" * tells us how many drives exist in the changer. */ +#define EA_PAGE 0x1d struct page_element_address_assignment { u_int8_t pg_code; /* page code (0x1d) */ u_int8_t pg_length; /* page length (0x12) */ @@ -400,6 +402,7 @@ struct page_element_address_assignment { * medium transport element (other than the default transport element address * of 0). */ +#define TGP_PAGE 0x1e struct page_transport_geometry_parameters { u_int8_t pg_code; /* page code (0x1e) */ u_int8_t pg_length; /* page length; variable */ |