diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index bbb4340cae1..ece0af029d1 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -1388,7 +1388,7 @@ acd_close_disk(struct acd_softc *cdp, int multisession) else param.session_type = CDR_SESS_NONE; - if ((error = acd_mode_select(cdp, (caddr_t)¶m, sizeof(param)))) + if ((error = acd_mode_select(cdp, (caddr_t)¶m, param.page_length + 10))) return error; error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 30, NULL, NULL); @@ -1486,7 +1486,7 @@ acd_open_track(struct acd_softc *cdp, struct cdr_track *track) break; } - return acd_mode_select(cdp, (caddr_t)¶m, sizeof(param)); + return acd_mode_select(cdp, (caddr_t)¶m, param.page_length + 10); } static int diff --git a/sys/dev/ata/atapi-cd.h b/sys/dev/ata/atapi-cd.h index 32f537712f8..0c4b008c700 100644 --- a/sys/dev/ata/atapi-cd.h +++ b/sys/dev/ata/atapi-cd.h @@ -261,12 +261,10 @@ struct write_param { u_int8_t sub_hdr_byte1; u_int8_t sub_hdr_byte2; u_int8_t sub_hdr_byte3; -/* u_int8_t vendor_specific_byte0; u_int8_t vendor_specific_byte1; u_int8_t vendor_specific_byte2; u_int8_t vendor_specific_byte3; -*/ } __attribute__((packed)); /* CDROM Read Track Information structure */