growisofs: patch - Device Busy status handling

Petr Sumbera <[email protected]>
Newsgroups gmane.comp.audio.cd-record
Message-ID <[email protected]>
Hi,

We have found that growisofs hangs with new TEAC DVD drive (DV-W28SS-R).

Problem is with handling Device Busy/Timeout occurred event where 
event[5]=0 (which is NoEvent). growisofs doesn't handle this particular 
case and instead it requests device for the event again and will get the 
same response (and thus it loops forever).

Please see attached patch for this issue.

Any comment is welcomed!

Thanks,

Petr
TEAC-DV-W28SS-R.diff (text/plain, 644 B)
--- dvd+rw-tools-7.1/transport.hxx.orig	st říj  6 04:28:06 2010
+++ dvd+rw-tools-7.1/transport.hxx	st říj  6 04:58:25 2010
@@ -1794,9 +1794,12 @@
 		break;
 	    case 5: ret |= 1<<5; break;		// Multiple Initiators
 	    case 6:				// Device Busy
-		if ((event[4]&0xF)==1 &&	// Timeout occured
-		    (event[5]&0x3)!=0)
-		{   poll(NULL,0,(descr&0xFFFF)*100+100);
+		if ((event[4]&0xF)==1)		// Timeout occured
+		{
+		    if ((event[5]&0x3)==0)	// No Event
+			return 0;		// Ready to accept any command
+
+		    poll(NULL,0,(descr&0xFFFF)*100+100);
 		    cmd[0] = 0;		// TEST UNIT READY
 		    cmd[5] = 0;
 		    if ((err=cmd.transport()))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.