Date: Wed, 25 Nov 1998 00:00:01 -0800 (PST) From: Søren Schmidt <sos@freebsd.dk> To: freebsd-bugs@FreeBSD.ORG Subject: Re: i386/8855: can't mount CD in ATAPI drive after eject/reload Message-ID: <199811250800.AAA29806@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR i386/8855; it has been noted by GNATS.
From: Søren Schmidt <sos@freebsd.dk>
To: hohmuth@inf.tu-dresden.de
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: i386/8855: can't mount CD in ATAPI drive after eject/reload
Date: Wed, 25 Nov 1998 08:53:53 +0100 (CET)
It seems hohmuth@inf.tu-dresden.de wrote:
Try this patch see if it helps:
Index: atapi.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/atapi.c,v
retrieving revision 1.27
diff -u -r1.27 atapi.c
--- atapi.c 1998/09/24 10:41:13 1.27
+++ atapi.c 1998/11/25 07:53:12
@@ -664,8 +664,8 @@
*/
int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac)
{
- /* Wait for DRQ from 50 usec to 3 msec for slow devices */
- int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 50;
+ /* Wait for DRQ from 100 usec to 3 msec for slow devices */
+ int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 100;
int ireason = 0, phase = 0;
/* Wait for command phase. */
>
> >Number: 8855
> >Category: i386
> >Synopsis: can't mount CD in ATAPI drive after eject/reload
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: freebsd-bugs
> >State: open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class: sw-bug
> >Submitter-Id: current-users
> >Arrival-Date: Tue Nov 24 19:50:01 PST 1998
> >Last-Modified:
> >Originator: Michael Hohmuth
> >Organization:
> none
> >Release: FreeBSD 2.2.7-STABLE i386
> >Environment:
>
> "uname -a" says:
>
> FreeBSD olymp.sax.de 2.2.7-STABLE FreeBSD 2.2.7-STABLE #1:
> Wed Nov 25 03:45:12 CET 1998
> root@olymp.sax.de:/usr/src/sys/compile/OLYMPISDN i386
>
> I've updated the atapi.c driver with some changes from
> FreeBSD-current. This doesn't change the behaviour, though.
>
> /var/log/dmesg.today contains:
>
> wdc0 at 0x1f0-0x1f7 irq 14 on isa
> wdc0: unit 0 (atapi): <IDE-1 REV.1.05 9-20-94/DOLPHIN>, removable
> atapi0.0: unknown phase
>
> /etc/fstab contains:
> /dev/wcd0c /cdrom cd9660 ro,noauto 0 0
>
>
> >Description:
>
> I can't mount a CD-ROM inserted after the system has been booted:
>
> # mount /cdrom
> cd9660: /dev/cdrom: Input/output error
>
> A CD-ROM which has been loaded before booting FreeBSD can be mounted
> just fine.
>
> Below I include some kernel output which shows a first "mount /cdrom"
> which succeeds, an "umount", an eject/reload, and another "mount /cdrom"
> which fails with an I/O error.
>
> The "error=20" messages at the end of the output or the "atapi0.0:
> unknown phase" message which appears at boot time maybe are connected
> to the problem in some way?
>
>
> # cdcontrol -f /dev/cdrom debug on
>
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
>
> # mount /cdrom
>
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0 len=12
> atapi0.0: start
> atapi0.0: send cmd READ_TOC 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=12, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0 len=12
> atapi0.0: start
> atapi0.0: send cmd READ_TOC 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=12, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 25-0-0-0-0-0-0-0-8-0-0-0-0-0-0-0 len=8
> atapi0.0: start
> atapi0.0: send cmd READ_CAPACITY 25-0-0-0-0-0-0-0-8-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=8, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0 len=12
> atapi0.0: start
> atapi0.0: send cmd READ_TOC 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=12, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0 len=12
> atapi0.0: start
> atapi0.0: send cmd READ_TOC 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=12, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 25-0-0-0-0-0-0-0-8-0-0-0-0-0-0-0 len=8
> atapi0.0: start
> atapi0.0: send cmd READ_CAPACITY 25-0-0-0-0-0-0-0-8-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=8, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req cb 28-0-0-0-0-10-0-0-1-0-0-0-0-0-0-0 len=2048
> atapi0.0: start
> atapi0.0: send cmd READ_BIG 28-0-0-0-0-10-0-0-1-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=2048, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req cb 28-0-0-0-0-26-0-0-1-0-0-0-0-0-0-0 len=2048
> atapi0.0: start
> atapi0.0: send cmd READ_BIG 28-0-0-0-0-26-0-0-1-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=2048, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
>
> # umount /cdrom
>
> atapi0.0: req cb 28-0-0-0-0-26-0-0-1-0-0-0-0-0-0-0 len=2048
> atapi0.0: start
> atapi0.0: send cmd READ_BIG 28-0-0-0-0-26-0-0-1-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=2048, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
>
> # cdcontrol -f /dev/cdrom eject
>
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0 len=12
> atapi0.0: start
> atapi0.0: send cmd READ_TOC 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=12, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0 len=12
> atapi0.0: start
> atapi0.0: send cmd READ_TOC 43-0-0-0-0-0-0-0-c-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=12, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 25-0-0-0-0-0-0-0-8-0-0-0-0-0-0-0 len=8
> atapi0.0: start
> atapi0.0: send cmd READ_CAPACITY 25-0-0-0-0-0-0-0-8-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x2, len=8, status=58<ready,opdone,drq>, error=0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1b-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd START_STOP 1b-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1b-0-0-0-2-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd START_STOP 1b-0-0-0-2-0-0-0-0-0-0-0-0-0-0-0
>
> # cdcontrol -f /dev/cdrom close
>
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=50<ready,opdone>, error=0
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1b-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd START_STOP 1b-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0
>
> # mount /cdrom
> cd9660: /dev/cdrom: Input/output error
>
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd TEST_UNIT_READY 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
> atapi0.0: req w 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 len=0
> atapi0.0: start
> atapi0.0: send cmd PREVENT_ALLOW 1e-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0
> atapi0.0: intr ireason=0x3, len=0, status=51<ready,opdone,check>, error=20
>
>
> >How-To-Repeat:
>
> The "mount" commands shown below assume that /etc/fstab contains
> something like:
>
> /dev/wcd0c /cdrom cd9660 ro,noauto 0 0
>
> # cdcontrol -f /dev/cdrom debug on
> # mount /cdrom
> # umount /cdrom
> # cdcontrol -f /dev/cdrom eject
> # cdcontrol -f /dev/cdrom close
> # mount /cdrom
> cd9660: /dev/cdrom: Input/output error
>
> >Fix:
>
> Fix not known
>
> Workaround: Reboot every time you want to mount a new CD-ROM :-(
> >Audit-Trail:
> >Unformatted:
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-bugs" in the body of the message
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt (sos@freebsd.org) FreeBSD Core Team member
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811250800.AAA29806>
