Subject: kern/4984: (scsi) cdrom refuses to open() if no medium is loaded
To: None <gnats-bugs@gnats.netbsd.org>
From: Ignatios Souvatzis <ignatios@cosinus.cs.uni-bonn.de>
List: netbsd-bugs
Date: 02/12/1998 18:02:38
>Number:         4984
>Category:       kern
>Synopsis:       [is] (scsi) cdrom refuses to open() if no medium is loaded
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 12 09:05:07 1998
>Last-Modified:
>Originator:     Ignatios Souvatzis
>Organization:
computer science department, university of Bonn, Germany
>Release:        1.3
>Environment:
	
System: NetBSD cosinus.cs.uni-bonn.de 1.3_ALPHA NetBSD 1.3_ALPHA (COSINUS) #1: Sat Jan 10 01:49:13 CET 1998 ignatios@cosinus.cs.uni-bonn.de:/usr/local/obj/kernel/COSINUS i386


>Description:
I tried to eject the cdrom tray without a medium inserted, and got
eject: /dev/cd0a: open: Input/output error

>How-To-Repeat:
# eject cdrom
[take medium out]
[press insert button]
# eject cdrom
eject: /dev/cd0a: open: Input/output error

Checking ktrace output, this is correct. (opening /dev/cd0d nstead of
/dev/cd0a, which "eject cdrom" uses, doesn't work, either.
>Fix:
I guess this is related to the open() call enforcing a recalculation of the
fake disklabel on medium change. Of course, this doesn't work without any
medium, but IMO, something should be done to allow access to an empty drive.
>Audit-Trail:
>Unformatted: