Subject: pkg/32529: patch for pioneer dvd burners for dvd+rw-tools
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <murray@river-styx.org>
List: pkgsrc-bugs
Date: 01/15/2006 05:25:01
>Number:         32529
>Category:       pkg
>Synopsis:       patch for pioneer dvd burners for dvd+rw-tools
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 15 05:25:00 +0000 2006
>Originator:     Murray Armfield
>Release:        NetBSD-3.0 i386
>Organization:
N/A
>Environment:
NetBSD ra.river-styx.org 3.0 NetBSD 3.0 (GENERIC.MPACPI) #0: Mon Dec 19 01:23:45 UTC 2005  builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC.MPACPI i386
>Description:
Some pioneer dvd burners wont burn a dvd correctly if the data is more than a certain size. dvd+rw-tools fails when trying to close the disc. It is a well known problem and appears on many mailing lists.
>How-To-Repeat:
Use growisofs with a fairly large size of data to make a dvd.
>Fix:
There is the following patch floating around the internet which helps.

--- growisofs_mmc.cpp.orig      2004-07-16 22:48:57.000000000 +1000
+++ growisofs_mmc.cpp
@@ -1484,8 +1484,17 @@ void plus_r_finalize ()
        cmd[1] = 0x01;          // "IMMED"
        cmd[2] = mode;          // "Close session"
        cmd[9] = 0;
-       if ((err=cmd.transport()))
-           sperror ("CLOSE SESSION",err);
+
+       // it seems, that pioneer is a bit crappy
+       while (err=cmd.transport()) {
+               if (SK(err)==0x2 && ASC(err)==0x04 && ASCQ(err)==0x07) {
+                       sperror ("CLOSE SESSION (but try to continue)",err);
+                       usleep(10000);
+               } else {
+                       sperror ("CLOSE SESSION",err);
+                       break;
+               }
+       }

        if (wait_for_unit (cmd)) break;