From nobody  Wed Dec 18 23:49:51 1996
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.4/8.8.4) id XAA06473;
          Wed, 18 Dec 1996 23:49:51 -0800 (PST)
Message-Id: <199612190749.XAA06473@freefall.freebsd.org>
Date: Wed, 18 Dec 1996 23:49:51 -0800 (PST)
From: chad@dcfinc.com
To: freebsd-gnats-submit@freebsd.org
Subject: Mitsumi CD-ROM driver has "timeout" problems
X-Send-Pr-Version: www-1.0

>Number:         2248
>Category:       kern
>Synopsis:       Mitsumi CD-ROM driver has "timeout" problems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 18 23:50:00 PST 1996
>Closed-Date:    Tue May 19 23:35:05 PDT 1998
>Last-Modified:  Tue May 19 23:35:27 PDT 1998
>Originator:     Chad R. Larson
>Release:        2.1.6R
>Organization:
DCF, Inc.
>Environment:
FreeBSD freebie.dcfinc.com 2.1.6-RELEASE FreeBSD 2.1.6-RELEASE #0: Tue Dec 17 23
:24:04 MST 1996     toor@freebie.dcfinc.com:/usr/src/sys/compile/FREEBIE  i386

>Description:
This machine is a 133MHz AMD 5x86 (identifies itself as a 486 during
the probe).  The Mitsumi CD-ROM drive is an early one--single speed
with the lid that opens.  It identifies itself as an "M 2" during the
probe.

During all phases of operation the kernel logs messages such as:
  timeout getting status
  retrying
  timeout reading data
  retrying

If I try to use the CD-ROM to do an install, I get an effective rate of
about 10 kbytes per second.  It was faster to go over the net to your
FTP site.

Methinks the ThumbTwiddle routines in "mcd.c" probably have counter
values too small for a machine with this clock rate.
>How-To-Repeat:
Any use of the Mitsumi drive generates errors.  They all eventually
recover, but fill log space and make the drive =very= slow.
>Fix:
Unknown.  I'm going to edit "/sys/i386/isa/mcd.c" to increase some of
the spin timers counter values.  I'll let you know what happens.
>Release-Note:
>Audit-Trail:

From: "Chad R. Larson" <chad@anasazi.com>
To: freebsd-gnats-submit@freebsd.org, chad@anasazi.com
Cc:  Subject: Re: kern/2248: Mitsumi CD-ROM driver has
Date: Sat, 21 Dec 1996 06:57:23 -0800

 I turned on debugging for the driver.  It reported that it was
 finding data with a delay of between 10 and 40.  I believe that
 is the count of the number of times mcd_doread() scheduled itself
 via timeout() before the controller reported status.  If so, the
 read delay value of 800 is more than enough.  However, every dozen
 or so reads do not ever get data.  Those ones are the ones that
 generate the timeout messages.  The retrys always work.  It is
 almost as though the controller doesn't see the read data command
 every so often.
 
 I'm going to reduce the delay value from 800 to maybe 200.  It won't
 solve the read fails, but will get around to the retry much sooner
 which should increase the effective throughput on the drive.
 
 Other tidbits:  Each completed read generates a "stray interrupt",
 which tells me that the strategy of mcd_doread() repeatedly scheduling
 itself wouldn't be necessary.  Let the interrupt cause data to be
 collected.  Also, putting the computer into and out of "turbo" mode
 (changing CPU clock rate from 133 MHz to 33MHz and back) doesn't seem
 to impact the behavior, so I don't think it's directly related to
 timing.
 
 I suppose it's possible that the controller itself is defective, but
 it was working perfectly in another machine.
 
 Any other ideas to try?
 
    -crl
 -- 
 
 Chad R. Larson (CRL22)              Brother, can you paradigm?
 602-953-1392  CRL22@aol.com  chad@dcfinc.com  chad@anasazi.com
 DCF, Inc. - 14623 North 49th Place, Scottsdale, Az  85254-2207
State-Changed-From-To: open->feedback 
State-Changed-By: phk 
State-Changed-When: Sun Apr 26 10:21:49 PDT 1998 
State-Changed-Why:  
what is the status under -current or 2.2.6 ? 
State-Changed-From-To: feedback->closed 
State-Changed-By: phk 
State-Changed-When: Tue May 19 23:35:05 PDT 1998 
State-Changed-Why:  
originator doesn't have the drive anymore 
>Unformatted:
