From b4de9f62a4b33db0a561f8ac1c2967a8794f3322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Thu, 4 Jan 2001 12:43:39 +0000 Subject: [PATCH] Add support for using BurnProff(tm) on drives that support it. This is experimental as I dont have such a drive, reports welcome!! --- sys/dev/ata/atapi-cd.c | 2 ++ sys/dev/ata/atapi-cd.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 33e8cf926f78..2b96ce273a95 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -1396,6 +1396,8 @@ acd_open_track(struct acd_softc *cdp, struct cdr_track *track) param.page_length = 0x32; param.test_write = track->test_write ? 1 : 0; param.write_type = CDR_WTYPE_TRACK; + if (cdp->cap.burnproof) + param.burnproof = 1; switch (track->track_type) { diff --git a/sys/dev/ata/atapi-cd.h b/sys/dev/ata/atapi-cd.h index 478305a5cee3..23f5ba463df4 100644 --- a/sys/dev/ata/atapi-cd.h +++ b/sys/dev/ata/atapi-cd.h @@ -124,7 +124,7 @@ struct cappage { u_int8_t mode2_form1 :1; /* mode 2 form 1 (XA) read */ u_int8_t mode2_form2 :1; /* mode 2 form 2 format */ u_int8_t multisession :1; /* multi-session photo-CD */ - u_int8_t :1; + u_int8_t burnproof :1; /* supports burnproof */ u_int8_t cd_da :1; /* audio-CD read supported */ u_int8_t cd_da_stream :1; /* CD-DA streaming */ u_int8_t rw :1; /* combined R-W subchannels */ @@ -221,7 +221,9 @@ struct write_param { #define CDR_WTYPE_RAW 0x03 u_int8_t test_write :1; /* test write enable */ - u_int8_t reserved2_567 :3; + u_int8_t reserved2_5 :1; + u_int8_t burnproof :1; /* BurnProof enable */ + u_int8_t reserved2_7 :1; u_int8_t track_mode :4; /* track mode */ #define CDR_TMODE_AUDIO 0x00 #define CDR_TMODE_AUDIO_PREEMP 0x01