Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 1998 04:08:59 -0700 (PDT)
From:      deischen@iworks.InterWorks.org
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   kern/6253: Atapi wait for command phase too short.
Message-ID:  <199804091108.EAA12289@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         6253
>Category:       kern
>Synopsis:       Atapi wait for command phase too short.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr  9 04:10:01 PDT 1998
>Last-Modified:
>Originator:     Daniel Eischen
>Organization:
>Release:        3.0-current
>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. */

>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804091108.EAA12289>