Subject: Re: NetBSD master CVS tree commits
To: Scott Reynolds <scottr@Plexus.COM>
From: Justin T. Gibbs <gibbs@plutotech.com>
List: tech-kern
Date: 04/20/1997 10:17:14
>On Sat, 19 Apr 1997, Justin T. Gibbs wrote:
>
>> It's not a broken drive, it's a broken driver.
>
>As true as this may be, there are probably more tactful ways to say
>it.  Anyway...

Well, I've brought this up, perhaps more tactfully, in the past with no
success.  It just hurts to see something so broken perpetuate for so long
especially when the fix has been mentioned in the past and is so easy to
implement.

>SDEV_AUTOSAVE _is_ a hack, and _should_ go away, but we really need a
>better solution than what we already have to this problem.  In the mean
>time, the evil hack will have to do.

Sure.

>I am interested to know what, exactly, you are proposing as a replacement,
>though.  Please don't criticize without offering a constructive
>alternative.

I'm sure it's somewhere in the list archives, but basically what I proposed
is the same method that is used in the aic7xxx driver; the residual is 
updated at the end of each dataphase based on the current position of the
data pointers.  This nicely removes any connection between how the target
manipulates the pointers before disconnecting and means the residual is
correctly calculated as per the SCSI spec.  If you do this, SDEV_AUTOSAVE
goes away.  It's also very easy to implement.

>Thanks,
>
>--scott

--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================