Can't burn DVD under 2.5.59 with ide-cd

Can't burn DVD under 2.5.59 with ide-cd

Post by Joerg Schillin » Thu, 23 Jan 2003 10:30:12




>> >BURN-Free is ON.
>> >Starting new track at sector: 0
>> >Track 01:    4 of 4001 MB written (fifo  96%)  16.1x.cdrecord-prodvd: Success. write_g1: scsi sendcmd: no error
>> >CDB:  2A 00 00 00 08 B8 00 00 1F 00
>> >status: 0x1 (GOOD STATUS)
>> >resid: 63488
>> >cmd finished after 0.008s timeout 100s

>> I can't tell you what happened because the kernel is broken :-(

>> If you fix the kernel, you will get a readble error message,
>How helpful. How about saying what's broken instead and I'd be happy to
>fix it.

I thought it's obvious: It is most likely a problem caused by the broken
bit #defines in the Linux kernel for the SCSI status byte. I assume that
status should be 0x02 instead of 0x01. In addition, I would guess that
for the same reason, a kernel instance did not fetch the sense data as
libscg should try to work around these Linux bugs if at least the first
sense byte is != 0.

J?rg




 URL:  http://www.fokus.fhg.de/usr/schilling   ftp://ftp.berlios.de/pub/schily
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Jens Axbo » Thu, 23 Jan 2003 10:40:08




> >> >BURN-Free is ON.
> >> >Starting new track at sector: 0
> >> >Track 01:    4 of 4001 MB written (fifo  96%)  16.1x.cdrecord-prodvd: Success. write_g1: scsi sendcmd: no error
> >> >CDB:  2A 00 00 00 08 B8 00 00 1F 00
> >> >status: 0x1 (GOOD STATUS)
> >> >resid: 63488
> >> >cmd finished after 0.008s timeout 100s

> >> I can't tell you what happened because the kernel is broken :-(

> >> If you fix the kernel, you will get a readble error message,

> >How helpful. How about saying what's broken instead and I'd be happy to
> >fix it.

> I thought it's obvious: It is most likely a problem caused by the broken
> bit #defines in the Linux kernel for the SCSI status byte. I assume that
> status should be 0x02 instead of 0x01. In addition, I would guess that

Sounds plausible. Patch attached. Anyone care to expand on _why_ these
status bytes are shifted one bit?

===== drivers/ide/ide-cd.c 1.35 vs edited =====
--- 1.35/drivers/ide/ide-cd.c   Thu Nov 21 22:56:59 2002

                 * scsi status byte
                 */
                if ((rq->flags & REQ_BLOCK_PC) && !rq->errors)
-                       rq->errors = CHECK_CONDITION;
+                       rq->errors = CHECK_CONDITION << 1;

                /* Check for tray open. */
                if (sense_key == NOT_READY) {

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Gregoire Favr » Thu, 23 Jan 2003 11:50:15



> Sounds plausible. Patch attached. Anyone care to expand on _why_ these
> status bytes are shifted one bit?

> ===== drivers/ide/ide-cd.c 1.35 vs edited =====
> --- 1.35/drivers/ide/ide-cd.c      Thu Nov 21 22:56:59 2002
> +++ edited/drivers/ide/ide-cd.c    Wed Jan 22 09:34:28 2003

>             * scsi status byte
>             */
>            if ((rq->flags & REQ_BLOCK_PC) && !rq->errors)
> -                  rq->errors = CHECK_CONDITION;
> +                  rq->errors = CHECK_CONDITION << 1;

>            /* Check for tray open. */
>            if (sense_key == NOT_READY) {

Great ;-)

I'll test this tonight, thank you very much!!!

        Grgoire
________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Andre Hedric » Thu, 23 Jan 2003 14:10:21


Joerg,

Then you are aware of the push/pull by one bit as linux does not set a
reserved place holder for bit0 in the status byte.  I have to agree with
you that it stinks and make decoding status codes messy when supporting
N-interfaces of the protocol.

Cheers,

Andre Hedrick
LAD Storage Consulting Group



> >> >BURN-Free is ON.
> >> >Starting new track at sector: 0
> >> >Track 01:    4 of 4001 MB written (fifo  96%)  16.1x.cdrecord-prodvd: Success. write_g1: scsi sendcmd: no error
> >> >CDB:  2A 00 00 00 08 B8 00 00 1F 00
> >> >status: 0x1 (GOOD STATUS)
> >> >resid: 63488
> >> >cmd finished after 0.008s timeout 100s

> >> I can't tell you what happened because the kernel is broken :-(

> >> If you fix the kernel, you will get a readble error message,

> >How helpful. How about saying what's broken instead and I'd be happy to
> >fix it.

> I thought it's obvious: It is most likely a problem caused by the broken
> bit #defines in the Linux kernel for the SCSI status byte. I assume that
> status should be 0x02 instead of 0x01. In addition, I would guess that
> for the same reason, a kernel instance did not fetch the sense data as
> libscg should try to work around these Linux bugs if at least the first
> sense byte is != 0.

> J?rg




>  URL:  http://www.fokus.fhg.de/usr/schilling   ftp://ftp.berlios.de/pub/schily
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Bob_Tracy(00 » Thu, 23 Jan 2003 15:00:20




> > I thought it's obvious: It is most likely a problem caused by the broken
> > bit #defines in the Linux kernel for the SCSI status byte. I assume that
> > status should be 0x02 instead of 0x01. In addition, I would guess that

> Sounds plausible. Patch attached. Anyone care to expand on _why_ these
> status bytes are shifted one bit?

Possibly related...  I was using SCSI tape to back up my 2.5.59 system
the other day.  A media error was encountered, but the application (cpio
in this case) never saw the error and kept on trying to write to the bad
tape.  Fortunately, I caught it after only 40 MB of associated syslog
entries had been made.

Thanks for the patch.  I can now go back to "unattended" backup mode
(except for having to change tapes periodically) :-).

--
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org

-----------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Joerg Schillin » Thu, 23 Jan 2003 17:50:11



>> >How helpful. How about saying what's broken instead and I'd be happy to
>> >fix it.

>> I thought it's obvious: It is most likely a problem caused by the broken
>> bit #defines in the Linux kernel for the SCSI status byte. I assume that
>> status should be 0x02 instead of 0x01. In addition, I would guess that
>Sounds plausible. Patch attached. Anyone care to expand on _why_ these
>status bytes are shifted one bit?

I have no idea... About 3-4 years ago, I tried to convice some of the kernel
people to change this but as you see, it did not happen.

>===== drivers/ide/ide-cd.c 1.35 vs edited =====
>--- 1.35/drivers/ide/ide-cd.c       Thu Nov 21 22:56:59 2002
>+++ edited/drivers/ide/ide-cd.c     Wed Jan 22 09:34:28 2003

>             * scsi status byte
>             */
>            if ((rq->flags & REQ_BLOCK_PC) && !rq->errors)
>-                   rq->errors = CHECK_CONDITION;
>+                   rq->errors = CHECK_CONDITION << 1;

>            /* Check for tray open. */
>            if (sense_key == NOT_READY) {

J?rg




 URL:  http://www.fokus.fhg.de/usr/schilling   ftp://ftp.berlios.de/pub/schily
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by William Lee Irwin II » Thu, 23 Jan 2003 20:20:22



> I thought it's obvious: It is most likely a problem caused by the broken
> bit #defines in the Linux kernel for the SCSI status byte. I assume that
> status should be 0x02 instead of 0x01. In addition, I would guess that
> for the same reason, a kernel instance did not fetch the sense data as
> libscg should try to work around these Linux bugs if at least the first
> sense byte is != 0.

I should try to cut SCSI CD's with the fixes for this stuff; sounds like
it'd affect generic SCSI I/O.

Thanks.

-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Gregoire Favr » Fri, 24 Jan 2003 20:00:09



> Sounds plausible. Patch attached. Anyone care to expand on _why_ these
> status bytes are shifted one bit?

> ===== drivers/ide/ide-cd.c 1.35 vs edited =====
> --- 1.35/drivers/ide/ide-cd.c      Thu Nov 21 22:56:59 2002
> +++ edited/drivers/ide/ide-cd.c    Wed Jan 22 09:34:28 2003

>             * scsi status byte
>             */
>            if ((rq->flags & REQ_BLOCK_PC) && !rq->errors)
> -                  rq->errors = CHECK_CONDITION;
> +                  rq->errors = CHECK_CONDITION << 1;

>            /* Check for tray open. */
>            if (sense_key == NOT_READY) {

Well, it's changed, but not solved the problem:

Cdrecord-ProDVD-Clone 2.0 (i586-pc-linux-gnu) Copyright (C) 1995-2002 J?rg Schilling
Unlocked features: ProDVD Clone
Limited  features: speed
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.7'
Driveropts: 'burnfree'
atapi: 1
Device type    : Removable CD-ROM
Version        : 2
Response Format: 2
Capabilities   :
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-500A '
Revision       : '1.0f'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc-2 DVD-R/DVD-RW driver (mmc_dvd).
Driver flags   : DVD SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 8126464 = 7936 KB
FIFO size      : 67108864 = 65536 KB
Track 01: data  4001 MB        
Total size:     4001 MB = 2048512 sectors
Current Secsize: 2048
Blocks total: 2298496 Blocks current: 2298496 Blocks remaining: 249984
  0.24% done, estimate finish Thu Jan 23 18:47:41 2003
Starting to write CD/DVD at speed 1 in dummy TAO mode for single session.
Last chance to quit, starting dummy write in 9 seconds.  0.49% done, estimate finish Thu Jan 23 18:51:05 2003
   8 seconds.  0.73% done, estimate finish Thu Jan 23 18:52:13 2003
   7 seconds.  0.98% done, estimate finish Thu Jan 23 18:51:05 2003
   6 seconds.  1.22% done, estimate finish Thu Jan 23 18:51:46 2003
   5 seconds.  1.46% done, estimate finish Thu Jan 23 18:52:14 2003
   0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
BURN-Free is ON.
Starting new track at sector: 0
Track 01:    4 of 4001 MB written (fifo  96%)  16.1x.cdrecord-prodvd: Success. write_g1: scsi sendcmd: no error
CDB:  2A 00 00 00 08 B8 00 00 1F 00
status: 0x2 (CHECK CONDITION)
Sense Bytes:
Sense Key: 0xFFFFFFFF [], Segment 0
Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
Sense flags: Blk 0 (not valid)
resid: 63488
cmd finished after 0.007s timeout 100s

write track data: error after 4571136 bytes
Sense Bytes: 70 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00 00 00
Writing  time:    5.334s
Average write speed 571.3x.
Fixating...
Fixating time:   77.465s
cdrecord-prodvd: fifo had 1095 puts and 73 gets.
cdrecord-prodvd: fifo was 0 times empty and 2 times full, min fill was 96%.

Thank you very much,

        Grgoire
________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Joerg Schillin » Fri, 24 Jan 2003 20:00:18



>   7 seconds.  0.98% done, estimate finish Thu Jan 23 18:51:05 2003
>   6 seconds.  1.22% done, estimate finish Thu Jan 23 18:51:46 2003
>   5 seconds.  1.46% done, estimate finish Thu Jan 23 18:52:14 2003
>   0 seconds. Operation starts.
>Waiting for reader process to fill input buffer ... input buffer ready.
>BURN-Free is ON.
>Starting new track at sector: 0
>Track 01:    4 of 4001 MB written (fifo  96%)  16.1x.cdrecord-prodvd: Success. write_g1: scsi sendcmd: no error
>CDB:  2A 00 00 00 08 B8 00 00 1F 00
>status: 0x2 (CHECK CONDITION)
>Sense Bytes:
>Sense Key: 0xFFFFFFFF [], Segment 0
>Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
>Sense flags: Blk 0 (not valid)
>resid: 63488
>cmd finished after 0.007s timeout 100s

In one of my mails, I decribed why there are 2 bugs in the kernel.
Only one of them so far has been fixed. The sense data is still missing.

J?rg




 URL:  http://www.fokus.fhg.de/usr/schilling   ftp://ftp.berlios.de/pub/schily
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Gregoire Favr » Fri, 24 Jan 2003 20:10:06



> In one of my mails, I decribed why there are 2 bugs in the kernel.
> Only one of them so far has been fixed. The sense data is still missing.

Oups, sorry I didn't read enough carefully!!!

Does someone know how to fix the sense data bug?

Thank you very much,

        Grgoire
________________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Jens Axbo » Fri, 24 Jan 2003 20:10:10




> >   7 seconds.  0.98% done, estimate finish Thu Jan 23 18:51:05 2003
> >   6 seconds.  1.22% done, estimate finish Thu Jan 23 18:51:46 2003
> >   5 seconds.  1.46% done, estimate finish Thu Jan 23 18:52:14 2003
> >   0 seconds. Operation starts.
> >Waiting for reader process to fill input buffer ... input buffer ready.
> >BURN-Free is ON.
> >Starting new track at sector: 0
> >Track 01:    4 of 4001 MB written (fifo  96%)  16.1x.cdrecord-prodvd: Success. write_g1: scsi sendcmd: no error
> >CDB:  2A 00 00 00 08 B8 00 00 1F 00
> >status: 0x2 (CHECK CONDITION)
> >Sense Bytes:
> >Sense Key: 0xFFFFFFFF [], Segment 0
> >Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
> >Sense flags: Blk 0 (not valid)
> >resid: 63488
> >cmd finished after 0.007s timeout 100s

> In one of my mails, I decribed why there are 2 bugs in the kernel.
> Only one of them so far has been fixed. The sense data is still missing.

That is correct, I'll fix the 2nd bug tomorrow. The new SG_IO transport
is still so new that there are places where I know ide-cd will not do
the right thing wrt sense. In fact I don't think it will every copy
sense back.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Can't burn DVD under 2.5.59 with ide-cd

Post by Jens Axbo » Fri, 24 Jan 2003 20:10:19




> > In one of my mails, I decribed why there are 2 bugs in the kernel.
> > Only one of them so far has been fixed. The sense data is still missing.

> Oups, sorry I didn't read enough carefully!!!

> Does someone know how to fix the sense data bug?

In drivers/ide/ide-cd.c:cdrom_end_request(), try to insert something
ala:

        if ((rq->flags & REQ_SENSE) && uptodate) {
                struct request *failed = (struct request *) rq->buffer;
                struct cdrom_info *info = drive->driver_data;
                void *sense = &info->sense_data;

+               if (failed && block_pc_request(failed))
+                       printk("%s: failed %p\n", __FUNCTION__, failed->sense);

                if (failed && failed->sense)
                        sense = failed->sense;

                cdrom_analyze_sense_data(drive, failed, sense);
        }

in pseudo-patch form.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/