can't write CD-Rs with or without new DAO mode

2001-09-12 Thread Brian Fundakowski Feldman

After updating my system I can't burn CD-Rs successfully.  Can anyone else?  
What happens is pretty simple:

{"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | trackclassify >
burncd: ioctl(CDRIOCINITWRITER): Input/output error
acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00

The specific hardware is:

atapci0:  port 0xa000-0xa00f at device 7.1 on pci0
acd0: CD-RW  at ata0-master WDMA2

I'd provide more info if I had it.  Using atacontrol to stick the CD-ROM 
drive in PIO mode doesn't help, nor does the "reinit" command.

-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-12 Thread Jim Bryant

Brian Fundakowski Feldman wrote:

> After updating my system I can't burn CD-Rs successfully.  Can anyone else?  
> What happens is pretty simple:
> 
> {"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | trackclassify >
> burncd: ioctl(CDRIOCINITWRITER): Input/output error
> acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00
> 
> The specific hardware is:
> 
> atapci0:  port 0xa000-0xa00f at device 7.1 on pci0
> acd0: CD-RW  at ata0-master WDMA2
> 
> I'd provide more info if I had it.  Using atacontrol to stick the CD-ROM 
> drive in PIO mode doesn't help, nor does the "reinit" command.


Although until I restore from tape, I am running -CURRENT world, but not-current 
kernel...  based on -CURRENT breakage for me, I 
will have to regress world...

Looks like the problem may be with the burncd program itself...

  10:01:24pm  wahoo(106): burncd -s 12 -f /dev/acd0c data 
pink-floyd-studio-albums-complete.iso fixate
burncd: ioctl(CDRIOCINITWRITER): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
[ad nausium, spits 'em out fast]

jim
-- 
 ET has one helluva sense of humor!
He's always anal-probing right-wing schizos!

   POWER TO THE PEOPLE!


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-12 Thread Jim Bryant

Jim Bryant wrote:

> Brian Fundakowski Feldman wrote:
> 
>> After updating my system I can't burn CD-Rs successfully.  Can anyone 
>> else?  What happens is pretty simple:
>>
>> {"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | 
>> trackclassify >
>> burncd: ioctl(CDRIOCINITWRITER): Input/output error
>> acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00
>>
>> The specific hardware is:
>>
>> atapci0:  port 0xa000-0xa00f at device 
>> 7.1 on pci0
>> acd0: CD-RW  at ata0-master WDMA2
>>
>> I'd provide more info if I had it.  Using atacontrol to stick the 
>> CD-ROM drive in PIO mode doesn't help, nor does the "reinit" command.
> 
> 
> 
> Although until I restore from tape, I am running -CURRENT world, but 
> not-current kernel...  based on -CURRENT breakage for me, I will have to 
> regress world...
> 
> Looks like the problem may be with the burncd program itself...
> 
>  10:01:24pm  wahoo(106): burncd -s 12 -f /dev/acd0c data 
> pink-floyd-studio-albums-complete.iso fixate
> burncd: ioctl(CDRIOCINITWRITER): Inappropriate ioctl for device
> burncd: ioctl(CDRIOCSETBLOCKSIZE): Inappropriate ioctl for device
> [ad nausium, spits 'em out fast]


using the world i'm about to regress to, and the kernel I did the above in, burncd 
does work.


jim
-- 
 ET has one helluva sense of humor!
He's always anal-probing right-wing schizos!

   POWER TO THE PEOPLE!


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-12 Thread Søren Schmidt

It seems Brian Fundakowski Feldman wrote:
> After updating my system I can't burn CD-Rs successfully.  Can anyone else?  
> What happens is pretty simple:
> 
> {"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | trackclassify >
> burncd: ioctl(CDRIOCINITWRITER): Input/output error
> acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00

Are you absolutely sure your kernel & userland are in sync ?

-Søren

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-15 Thread Brian F. Feldman

Søren Schmidt <[EMAIL PROTECTED]> wrote:
> It seems Brian F. Feldman wrote:
> > Søren Schmidt <[EMAIL PROTECTED]> wrote:
> > > It seems Brian Fundakowski Feldman wrote:
> > > > After updating my system I can't burn CD-Rs successfully.  Can anyone else?  
> > > > What happens is pretty simple:
> > > > 
> > > > {"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | trackclassify >
> > > > burncd: ioctl(CDRIOCINITWRITER): Input/output error
> > > > acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00
> > > 
> > > Are you absolutely sure your kernel & userland are in sync ?
> > recompiling burncd to the exact same effect.
> 
> OK, try this patch (kernel & burncd need both to be remade)

I don't know... I got a page fault during an attempt to burncd and it seems 
there are no messages in dmesg but acd0's softc was freed.  I can't test any 
more because my CD-RW doesn't probe on boot (or let me eject, etc...)

-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-15 Thread Søren Schmidt

It seems Brian F. Feldman wrote:
> > OK, try this patch (kernel & burncd need both to be remade)
> 
> I don't know... I got a page fault during an attempt to burncd and it seems 
> there are no messages in dmesg but acd0's softc was freed.  I can't test any 
> more because my CD-RW doesn't probe on boot (or let me eject, etc...)

Hmm, was that with the patch ?
There is no reason why the device shouldn't probe anymore, but it could
be in a state where are powercycle is needed to bring it back to
sanity..

-Søren

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-15 Thread Brian F. Feldman

Søren Schmidt <[EMAIL PROTECTED]> wrote:
> It seems Brian F. Feldman wrote:
> > > OK, try this patch (kernel & burncd need both to be remade)
> > 
> > I don't know... I got a page fault during an attempt to burncd and it seems 
> > there are no messages in dmesg but acd0's softc was freed.  I can't test any 
> > more because my CD-RW doesn't probe on boot (or let me eject, etc...)
> 
> Hmm, was that with the patch ?
> There is no reason why the device shouldn't probe anymore, but it could
> be in a state where are powercycle is needed to bring it back to
> sanity..

Yeah, that was with the patch.  Since it didn't actually change any logic 
related to freeing the softc, I don't know why it happened...

It's most likely not the drivers fault I'm certain.  Power cycles, reboots, 
leaving the machine off for a few minutes, etc. do not help.  My CD-RW seems 
to randomly go catatonic nowadays.

-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-13 Thread Brian F. Feldman

Søren Schmidt <[EMAIL PROTECTED]> wrote:
> It seems Brian Fundakowski Feldman wrote:
> > After updating my system I can't burn CD-Rs successfully.  Can anyone else?  
> > What happens is pretty simple:
> > 
> > {"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | trackclassify >
> > burncd: ioctl(CDRIOCINITWRITER): Input/output error
> > acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00
> 
> Are you absolutely sure your kernel & userland are in sync ?

Yes, I am.  I just built a new kernel, did a make includes, and tried 
recompiling burncd to the exact same effect.

-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: can't write CD-Rs with or without new DAO mode

2001-09-15 Thread Søren Schmidt

It seems Brian F. Feldman wrote:
> Søren Schmidt <[EMAIL PROTECTED]> wrote:
> > It seems Brian Fundakowski Feldman wrote:
> > > After updating my system I can't burn CD-Rs successfully.  Can anyone else?  
> > > What happens is pretty simple:
> > > 
> > > {"/home/green/toxicity"}$ burncd -s 8 -d audio /dev/null $(ls | trackclassify >
> > > burncd: ioctl(CDRIOCINITWRITER): Input/output error
> > > acd0: MODE_SELECT_BIG - ILLEGAL REQUEST asc=0x26 ascq=0x00 error=0x00
> > 
> > Are you absolutely sure your kernel & userland are in sync ?
> recompiling burncd to the exact same effect.

OK, try this patch (kernel & burncd need both to be remade)


Index: sys/dev/ata/atapi-cd.c
===
RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v
retrieving revision 1.100
diff -u -r1.100 atapi-cd.c
--- sys/dev/ata/atapi-cd.c  10 Sep 2001 11:43:20 -  1.100
+++ sys/dev/ata/atapi-cd.c  15 Sep 2001 08:25:55 -
@@ -1407,9 +1407,7 @@
 static int
 acd_init_writer(struct acd_softc *cdp, int test_write)
 {
-struct write_param param;
 int8_t ccb[16];
-int error;
 
 bzero(ccb, sizeof(ccb));
 ccb[0] = ATAPI_REZERO;
@@ -1417,23 +1415,7 @@
 ccb[0] = ATAPI_SEND_OPC_INFO;
 ccb[1] = 0x01;
 atapi_queue_cmd(cdp->atp, ccb, NULL, 0, ATPR_F_QUIET, 30, NULL, NULL);
-
-if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
-   (caddr_t)¶m, sizeof(param
-   return error;
-param.data_length = 0;
-param.page_code = ATAPI_CDROM_WRITE_PARAMETERS_PAGE;
-param.page_length = 0x32;
-param.test_write = test_write ? 1 : 0;
-param.write_type = CDR_WTYPE_SESSION;
-param.session_type = CDR_SESS_NONE;
-param.fp = 0;
-param.packet_size = 0;
-param.track_mode = CDR_TMODE_AUDIO;
-param.datablock_type = CDR_DB_RAW;
-param.session_format = CDR_SESS_CDROM;
-
-return acd_mode_select(cdp, (caddr_t)¶m, param.page_length + 10);
+return 0;
 }
 
 static int
@@ -1613,6 +1595,7 @@
 static int
 acd_send_cue(struct acd_softc *cdp, struct cdr_cuesheet *cuesheet)
 {
+struct write_param param;
 int8_t ccb[16] = { ATAPI_SEND_CUE_SHEET, 0, 0, 0, 0, 0, 
   cuesheet->len>>16, cuesheet->len>>8, cuesheet->len,
   0, 0, 0, 0, 0, 0, 0 };
@@ -1621,6 +1604,24 @@
 #ifdef ACD_DEBUG
 int i;
 #endif
+
+if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
+   (caddr_t)¶m, sizeof(param
+   return error;
+param.data_length = 0;
+param.page_code = ATAPI_CDROM_WRITE_PARAMETERS_PAGE;
+param.page_length = 0x32;
+param.test_write = cuesheet->test_write ? 1 : 0;
+param.write_type = CDR_WTYPE_SESSION;
+param.session_type = CDR_SESS_NONE;
+param.fp = 0;
+param.packet_size = 0;
+param.track_mode = CDR_TMODE_AUDIO;
+param.datablock_type = CDR_DB_RAW;
+param.session_format = CDR_SESS_CDROM;
+if ((error = acd_mode_select(cdp, (caddr_t)¶m, param.page_length + 10)))
+   return error;
+
 buffer = malloc(cuesheet->len, M_ACD, M_NOWAIT);
 if (!buffer)
return ENOMEM;
Index: sys/sys/cdrio.h
===
RCS file: /home/ncvs/src/sys/sys/cdrio.h,v
retrieving revision 1.4
diff -u -r1.4 cdrio.h
--- sys/sys/cdrio.h 10 Sep 2001 11:42:27 -  1.4
+++ sys/sys/cdrio.h 15 Sep 2001 08:19:38 -
@@ -71,6 +71,7 @@
 struct cdr_cuesheet {
int32_t len;
struct cdr_cue_entry *entries;
+   int test_write;
 };
 
 #define CDRIOCBLANK_IOW('c', 100, int)
Index: usr.sbin/burncd/burncd.c
===
RCS file: /home/ncvs/src/usr.sbin/burncd/burncd.c,v
retrieving revision 1.16
diff -u -r1.16 burncd.c
--- usr.sbin/burncd/burncd.c11 Sep 2001 12:14:20 -  1.16
+++ usr.sbin/burncd/burncd.c15 Sep 2001 08:19:07 -
@@ -58,7 +58,7 @@
 static int fd, quiet, verbose, saved_block_size, notracks;
 
 void add_track(char *, int, int);
-void do_DAO(void);
+void do_DAO(int);
 void do_TAO(int, int);
 int write_file(struct track_info *);
 int roundup_blocks(struct track_info *);
@@ -245,7 +245,7 @@
cdopen = 1;
}
if (dao) 
-   do_DAO();
+   do_DAO(test_write);
else
do_TAO(test_write, preemp);
}
@@ -308,7 +308,7 @@
 }
 
 void
-do_DAO(void)
+do_DAO(int test_write)
 {
struct cdr_cuesheet sheet;
struct cdr_cue_entry cue[100];
@@ -390,6 +390,7 @@
 
sheet.len = j * 8;
sheet.entries = cue;
+   sheet.test_write = test_write;
if (verbose) {
u_int8_t *ptr = (u_int8_t *)sheet.entries;

@@ -404,9 +405,10 @@

if (ioctl(fd, CDRIOCSENDCUE, &sheet) < 0)
err(EX_IOERR, "ioct