From nobody  Thu Apr  9 04:08:59 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id EAA12289;
          Thu, 9 Apr 1998 04:08:59 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199804091108.EAA12289@hub.freebsd.org>
Date: Thu, 9 Apr 1998 04:08:59 -0700 (PDT)
From: deischen@iworks.InterWorks.org
To: freebsd-gnats-submit@freebsd.org
Subject: Atapi wait for command phase too short.
X-Send-Pr-Version: www-1.0

>Number:         6253
>Category:       kern
>Synopsis:       Atapi wait for command phase too short.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr  9 04:10:01 PDT 1998
>Closed-Date:    Fri Aug 11 13:23:43 PDT 2000
>Last-Modified:  Fri Aug 11 13:24:28 PDT 2000
>Originator:     Daniel Eischen
>Release:        3.0-current
>Organization:
>Environment:
FreeBSD rigel 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Sun Apr  5 18:33:42 EDT 1998
     deischen@rigel:/opt/b/src/src/sys/compile/rigel1  i386

>Description:
I am unable to use the CD-ROM drive on my ChemUSA Chembook laptop
without changing the atapi.c to allow for a longer wait for DRQ
(see atapi_wait_cmd in atapi.c).  After attempting to access the
CD-ROM drive (with mount), the process hangs and has to be killed.
Attempting to access the CD-ROM drive again will hang the system
forcing a hard reset.

Without having access to a CD-ROM drive, it is very difficult to install
FreeBSD, especially on a laptop where trying to get a network card
configured for the installation is almost impossible.
>How-To-Repeat:
Try to mount the CD-ROM drive.
>Fix:
I include a patch that raises the wait time from 50 to 75 usecs.
This should have no ill effects on devices that take less time
to change phase to PHASE_CMDOUT.  For that matter, raising the
time to higher than 75 usecs might be warranted, especially in
FAILSAFE mode.

cvs diff: Diffing .
Index: atapi.c
===================================================================
RCS file: /opt/b/CVS/src/sys/i386/isa/atapi.c,v
retrieving revision 1.24
diff -c -r1.24 atapi.c
*** atapi.c     1998/03/01 18:57:27     1.24
--- atapi.c     1998/04/08 22:57:56
***************
*** 632,638 ****
  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;
        int ireason = 0, phase = 0;
  
        /* Wait for command phase. */
--- 632,638 ----
  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 : 75;
        int ireason = 0, phase = 0;
  
        /* Wait for command phase. */

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: johan 
State-Changed-When: Fri Aug 11 05:32:48 PDT 2000 
State-Changed-Why:  
Daniel do you have this problem in more recent releases 
of FreeBSD. 



Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: johan 
Responsible-Changed-When: Fri Aug 11 05:32:48 PDT 2000 
Responsible-Changed-Why:  
Sren is our ATA maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=6253 
State-Changed-From-To: feedback->closed 
State-Changed-By: johan 
State-Changed-When: Fri Aug 11 13:23:43 PDT 2000 
State-Changed-Why:  
Fixed according to submitter. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=6253 
>Unformatted:
