From junichi@astec.co.jp  Sun Nov 30 17:59:59 1997
Received: from tokyonet-entrance.astec.co.jp (tokyonet-entrance.astec.co.jp [202.239.16.2])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA21670
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Nov 1997 17:59:50 -0800 (PST)
          (envelope-from junichi@astec.co.jp)
Received: from amont.astec.co.jp (amont.astec.co.jp [172.20.10.1])
	by tokyonet-entrance.astec.co.jp (8.8.8+2.7Wbeta7/3.6W-astecMX2.3) with ESMTP id KAA11095
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 1 Dec 1997 10:59:44 +0900 (JST)
Received: from mqh-note.astec.co.jp (dhcp-uws1.astec.co.jp [172.20.23.200])
	by amont.astec.co.jp (8.7.6/3.6Wbeta5-astecMX2.4) with ESMTP id KAA17566
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 1 Dec 1997 10:59:43 +0900 (JST)
Received: (from junichi@localhost) by mqh-note.astec.co.jp (8.8.5/3.4Wbeta6-MQH-1.0) id KAA00458; Mon, 1 Dec 1997 10:59:22 +0900 (JST)
Message-Id: <199712010159.KAA00458@mqh-note.astec.co.jp>
Date: Mon, 1 Dec 1997 10:59:22 +0900 (JST)
From: junichi@astec.co.jp
Reply-To: junichi@astec.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: ATAPI driver bug
X-Send-Pr-Version: 3.2

>Number:         5183
>Category:       i386
>Synopsis:       The ATAPI I/O is blocked.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 30 18:00:00 PST 1997
>Closed-Date:    Wed May 27 02:49:07 PDT 1998
>Last-Modified:  Wed May 27 02:49:20 PDT 1998
>Originator:     Junichi Satoh
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

FreeBSD 3.0-CURRENT i386
	and
FreeBSD 2.2.5-RELEASE i386

>Description:

The ATAPI I/O is blocked and the device does not work.

>How-To-Repeat:

On following situation:

	. Two ATAPI devices are connected to one IDE interface.
	. One is AT_DRQT_MPROC.
	. The other is AT_DRQT_INTR.

When the AT_DRQT_MPROC device is accessed, the I/O is blocked.


>Fix:

Because of the ATAPI driver, 'atapi.c',  works as AT_DRQT_INTR.
The ATAPI driver should work as AT_DRQT_MPROC.
	
Apply the following patch to /usr/src/sys/i386/isa/atapi.c


*** atapi.c.org	Sun Jul 20 23:09:50 1997
--- atapi.c	Sun Nov 30 16:49:29 1997
***************
*** 217,222 ****
--- 217,225 ----
  	case AT_DRQT_ACCEL: printf (", accel"); break;
  	default:            printf (", drq%d", ap->drqtype);
  	}
+ 	/* When 'slow' is set, 'intrcmd' is not acceptable. */
+ 	if (ata->slow && ata->intrcmd)
+ 		ata->intrcmd = 0;
  
  	/* overlap operation supported */
  	if (ap->ovlapflag)


>Release-Note:
>Audit-Trail:

From: "Jin Guojun [ITG staff]" <jin@george.lbl.gov>
To: FreeBSD-gnats-submit@FreeBSD.ORG, junichi@astec.co.jp
Cc:  Subject: Re: i386/5183: ATAPI driver bug
Date: Mon, 1 Dec 1997 10:56:03 -0800

 >>Fix:
 > 
 >Because of the ATAPI driver, 'atapi.c',  works as AT_DRQT_INTR.
 >The ATAPI driver should work as AT_DRQT_MPROC.
 >        
 >Apply the following patch to /usr/src/sys/i386/isa/atapi.c
 > 
 > 
 >*** atapi.c.org Sun Jul 20 23:09:50 1997
 >--- atapi.c     Sun Nov 30 16:49:29 1997
 >***************
 >*** 217,222 ****
 >--- 217,225 ----
 >        case AT_DRQT_ACCEL: printf (", accel"); break;
 >        default:            printf (", drq%d", ap->drqtype);
 >        }
 >+       /* When 'slow' is set, 'intrcmd' is not acceptable. */
 >+       if (ata->slow && ata->intrcmd)
 >+               ata->intrcmd = 0;
 >  
 >        /* overlap operation supported */
 >        if (ap->ovlapflag)
 
 Comment for syntax:
 
 No need to check ata->intrcmd if 'slow' is set. Simply clear it.
 
 +	if (ata->slow)	/* When 'slow' is set, 'intrcmd' is not acceptable. */
 +		ata->intrcmd = 0;
 
 	-Jin
Responsible-Changed-From-To: freebsd-bugs->	peter 
Responsible-Changed-By: phk 
Responsible-Changed-When: Sun Apr 26 23:56:03 PDT 1998 
Responsible-Changed-Why:  
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed May 27 02:49:07 PDT 1998 
State-Changed-Why:  
As part of our PR auditing campaign, this PR has been closed due to it's 
age and lack of activity on the PR. 

There is a good chance that the problem reported have been solved 
as part of other activities. 

If this is not the case, please reopen this PR with fresh information 
on the manifestation of the bug. 

Sorry about the late reaction to this PR. 
>Unformatted:
