From zach@gaffaneys.com  Sat Nov 14 04:16:37 1998
Received: from k6n1.znh.org (dialup2.gaffaneys.com [208.155.161.52])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA11159
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Nov 1998 04:16:35 -0800 (PST)
          (envelope-from zach@gaffaneys.com)
Received: (from zach@localhost)
	by k6n1.znh.org (8.9.1/8.9.1) id MAA00900;
	Sat, 14 Nov 1998 12:15:47 GMT
	(envelope-from zach)
Message-Id: <199811141215.MAA00900@k6n1.znh.org>
Date: Sat, 14 Nov 1998 12:15:47 GMT
From: Zach Heilig <zach@gaffaneys.com>
Reply-To: zach@gaffaneys.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Problems with Atapi in 3.0...
X-Send-Pr-Version: 3.2

>Number:         8683
>Category:       kern
>Synopsis:       Problems with Atapi in 3.0...
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 14 04:20:00 PST 1998
>Closed-Date:    Mon Feb 28 11:27:10 PST 2000
>Last-Modified:  Mon Feb 28 11:27:48 PST 2000
>Originator:     Zach Heilig
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

FreeBSD 3.0-CURRENT #6: Sun Nov  8 16:51:26 CST 1998
[ kernel built right after cvsup/make world ]

The device in question [4 disk cd changer] is the only IDE type device in
the system.

wdc1 at 0x170-0x177 irq 15 on isa
wdc1: unit 0 (atapi): <NEC                 CD-ROM DRIVE:252/3.18>, removable, dma, iordy
wcd0: 1031KB/sec, 128KB cache, audio play, 255 volume levels, ejectable changer, unlocked
wcd0: changer slot 0 disk present
wcd1: changer slot 1 disk present
wcd2: changer slot 2 no disk
wcd3: changer slot 3 disk present

>Description:

After reading a few [1000-2000] files from one of the disks  (and being very
careful to not touch any other disk to avoid making the changer change):
    'find . -type f -print0 | xargs -0 md5' ,
this pops up on the console, and the machine locks up tight for about 10
seconds, then comes back to "normal" except any access to any of the atapi
devices locks the machine for another 10 seconds.

atapi1.0: invalid command phase, ireason=0xd0, status=d0<busy,ready,opdone>, error=d0
atapi1.0: invalid command phase, ireason=0xd8, status=d8<busy,ready,opdone,drq>, error=d8<mchg>
atapi1.0: controller not ready for cmd
atapi1.0: controller not ready for cmd
atapi1.0: controller not ready for cmd
[... repeated a couple times for each access to the changer ]

shutting down and manually unmounting the disks (or remounting read-only --
otherwise they are all dirty after rebooting), and rebooting is enough to
unwedge the device.  Turning power off for a minute or so does not change how
long it takes to wedge.

>How-To-Repeat:

	

>Fix:
	
	

>Release-Note:
>Audit-Trail:

Hmm, this worked up until I got my machine with such a drive stolen, after
that I can no longer verify if it works :(
The only thing I can come up with is if you load the atapi code as an LKM,
since those are not rebuild as default anymore.

Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: sos 
Responsible-Changed-When: Sat Nov 14 08:44:14 PST 1998 
Responsible-Changed-Why:  

Atapi is my table :) 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Feb 28 11:27:10 PST 2000 
State-Changed-Why:  
This is belived to be fixed in 4.0. 
>Unformatted:
