Subject: kern/5172: Recognise 'worm' CD-R drives as CD
To: None <gnats-bugs@gnats.netbsd.org>
From: None <abs@mono.org>
List: netbsd-bugs
Date: 03/18/1998 00:01:40
>Number:         5172
>Category:       kern
>Synopsis:       Recognise 'worm' CD-R drives as CD
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 18 00:05:01 1998
>Last-Modified:
>Originator:     David Brownlee
>Organization:
<a href="http://www.mono.org/">Monochrome</a>
>Release:        1.3
>Environment:
System: NetBSD lapton.anim.dreamworks.com 1.3 NetBSD 1.3 (_LAPTON_) #0: Fri Jan 9 11:10:00 PST 1998 root@lapton.anim.dreamworks.com:/usr/src/sys/arch/i386/compile/_LAPTON_ i386


>Description:
	Some CD-R drives report themselves to be type 4 (WORM), and are not
	attached as CD drives. (They can only be used as uk ('unknown').

>How-To-Repeat:
	Try to play a CD in a SONY CDU920S CD-R player.
>Fix:
	If the inquiry string for a removable WORM device begins CD-R, its
	probably safe to asssume it can be treated as a CD player. The
	following patch does that.

--- cd_scsi.c.orig	Tue Mar 17 23:40:06 1998
+++ cd_scsi.c	Wed Mar  4 23:44:27 1998
@@ -88,7 +88,9 @@
 
 struct scsipi_inquiry_pattern cd_scsibus_patterns[] = {
 	{T_CDROM, T_REMOV,
-	 "",         "",                 ""},
+	 "",	"",			""},
+	{T_WORM, T_REMOV,
+	 "",	"CD-R",			""},
 #if 0
 	{T_CDROM, T_REMOV, /* more luns */
 	 "PIONEER ", "CD-ROM DRM-600  ", ""},
	
>Audit-Trail:
>Unformatted: