NetBSD Problem Report #7345

Received: (qmail 29144 invoked from network); 8 Apr 1999 13:01:09 -0000
Message-Id: <199904081300.PAA20106@vader.runit.sintef.no>
Date: Thu, 8 Apr 1999 15:00:33 +0200 (MEST)
From: Havard.Eidnes@runit.sintef.no
Reply-To: Havard.Eidnes@runit.sintef.no
To: gnats-bugs@gnats.netbsd.org
Subject: "eject -l" with empty tray produces confusing error message
X-Send-Pr-Version: 3.95

>Number:         7345
>Category:       port-i386
>Synopsis:       eject -l with empty tray causes confusing error message
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 08 06:05:00 +0000 1999
>Closed-Date:    Thu Apr 08 17:09:18 +0000 1999
>Last-Modified:  Thu Apr 08 17:09:48 +0000 1999
>Originator:     Havard Eidnes
>Release:        NetBSD-1.4ALPHA 19990407
>Organization:
	RUNIT AS
>Environment:
NetBSD vever.runit.sintef.no 1.4_ALPHA NetBSD 1.4_ALPHA (VEVER) #4: Thu Apr  8 14:34:24 MEST 1999     he@vever.runit.sintef.no:/usr/src/sys/arch/i386/compile/VEVER i386

>Description:
	doing "eject -l" with an empty CD-ROM drive (just to close the
tray) produces the following rather confusing error message:

vever# eject -l cdrom
eject: ioctl: CDIOCCLOSE: /dev/rcd0d: Operation not supported by device
vever# 

Of course the driver supported retracting the tray and closing the
door.  I don't think it should complain so bitterly and cryptically,
though, that there is no media in the tray.

At the same time this message is logged in the kernel log:

cd0(pciide0:1:1): not ready, data = 00 00 00 00 3a 00 00 00 00 00

>How-To-Repeat:
	See above.
>Fix:
	Sorry, don't know.
>Release-Note:
>Audit-Trail:

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Havard.Eidnes@runit.sintef.no
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/7345: "eject -l" with empty tray produces confusing error message
Date: Thu, 8 Apr 1999 16:28:49 +0200

 On Apr 8, Havard.Eidnes@runit.sintef.no wrote
 > >Description:
 > 	doing "eject -l" with an empty CD-ROM drive (just to close the
 > tray) produces the following rather confusing error message:
 > 
 > vever# eject -l cdrom
 > eject: ioctl: CDIOCCLOSE: /dev/rcd0d: Operation not supported by device
 > vever# 
 > 
 > Of course the driver supported retracting the tray and closing the
 > door.  I don't think it should complain so bitterly and cryptically,
 > though, that there is no media in the tray.

 Strange. What device is this ? Did it close the tray, and then print the error,
 or not at all ?
 Eventually I get 'media change' or 'no media' messages with eject -l on some
 devices (not all) but it always completed for me.

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --

From: Havard.Eidnes@runit.sintef.no
To: bouyer@antioche.lip6.fr
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/7345: "eject -l" with empty tray produces confusing error message
Date: Thu, 08 Apr 1999 16:38:39 +0200

 > On Apr 8, Havard.Eidnes@runit.sintef.no wrote
 > > >Description:
 > > 	doing "eject -l" with an empty CD-ROM drive (just to close the
 > > tray) produces the following rather confusing error message:
 > >
 > > vever# eject -l cdrom
 > > eject: ioctl: CDIOCCLOSE: /dev/rcd0d: Operation not supported by device
 > > vever# 
 > >
 > > Of course the driver supported retracting the tray and closing the
 > > door.  I don't think it should complain so bitterly and cryptically,
 > > though, that there is no media in the tray.
 >
 > Strange. What device is this?

 pcib0 at pci0 dev 7 function 0
 pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x01)
 pciide0 at pci0 dev 7 function 1: Intel 82371AB IDE controller (PIIX4)
 pciide0: bus-master DMA support present
 pciide0: primary channel wired to compatibility mode
 wd0 at pciide0 channel 0 drive 0: <Maxtor 84320D4>
 wd0: drive supports 16-sector pio transfers, lba addressing
 wd0: 4120MB, 8930 cyl, 15 head, 63 sec, 512 bytes/sect x 8439184 sectors
 wd0: 32-bits data port
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
 pciide0: primary channel interrupting at irq 14
 pciide0: secondary channel wired to compatibility mode
 atapibus0 at pciide0 channel 1
 cd0 at atapibus0 drive 1: <TOSHIBA CD-ROM XM-6102B, 6200503799, 1106> type 5 cdrom removable
 cd0: 32-bits data port
 cd0: drive supports PIO mode 3, DMA mode 2
 wd1 at pciide0 channel 1 drive 0: <IBM-DTTA-351010>
 wd1: drive supports 16-sector pio transfers, lba addressing
 wd1: 9671MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 19807200 sectors
 wd1: 32-bits data port
 wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
 pciide0: secondary channel interrupting at irq 15
 wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
 wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
 cd0(pciide0:1:1): using PIO mode 0, DMA mode 2 (using DMA data transfers)

 is the pciide-related messages on this host.

 > Did it close the tray, and then print the error, or not at all?

 It closed the tray, waited (hung) a while (a few seconds), and
 then printed the error.

 > Eventually I get 'media change' or 'no media' messages with
 > eject -l on some devices (not all) but it always completed for
 > me.

 It did what I asked it to do, but the error message is confusing.

 - Havard

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Havard.Eidnes@runit.sintef.no
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/7345: "eject -l" with empty tray produces confusing error message
Date: Thu, 8 Apr 1999 17:26:24 +0200

 --AP2g/MAC+5xKAEJP
 Content-Type: text/plain; charset=us-ascii

 On Apr 8, Havard.Eidnes@runit.sintef.no wrote
 > It did what I asked it to do, but the error message is confusing.
 > 

 I think I got it: could you try the attached patch and tell me how it goes ?

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --

 --AP2g/MAC+5xKAEJP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=cd_diff

 Index: cd.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/scsipi/cd.c,v
 retrieving revision 1.124
 diff -u -r1.124 cd.c
 --- cd.c	1999/02/28 17:14:57	1.124
 +++ cd.c	1999/04/08 15:25:40
 @@ -972,7 +972,7 @@
  		return (scsipi_start(cd->sc_link, SSS_STOP, 0));
  	case CDIOCCLOSE:
  		return (scsipi_start(cd->sc_link, SSS_START|SSS_LOEJ, 
 -		    SCSI_IGNORE_MEDIA_CHANGE));
 +		    SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE));
  	case DIOCEJECT:
  		if (*(int *)addr == 0) {
  			/*

 --AP2g/MAC+5xKAEJP--

From: Havard.Eidnes@runit.sintef.no
To: bouyer@antioche.lip6.fr
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/7345: "eject -l" with empty tray produces confusing error message
Date: Thu, 08 Apr 1999 18:04:33 +0200

 > I think I got it: could you try the attached patch and tell me
 > how it goes?

 Yes, looks fine now, thanks!

 - H=E5vard
State-Changed-From-To: open->closed 
State-Changed-By: bouyer 
State-Changed-When: Thu Apr 8 10:09:18 PDT 1999 
State-Changed-Why:  
I just commited the fix to the 1.4 branch. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.