Subject: Re: NetBSD master CVS tree commits
To: None <tech-kern@NetBSD.ORG>
From: Justin T. Gibbs <gibbs@plutotech.com>
List: tech-kern
Date: 04/19/1997 19:18:14
>thorpej
>Sat Apr 19 17:55:06 PDT 1997
>Update of /cvsroot/src/sys/scsi
>In directory netbsd1:/var/slash-tmp/cvs-serv14593
>
>Modified Files:
>	scsiconf.c 
>Log Message:
>Add Yet Another Broken IBM disk to the SDEV_AUTOSAVE list.  This one
>doesn't report a vendor string (yuck)!.  Problem reported by
>Hubert Feyrer <feyrer@grizu.fh-regensburg.de>.

It's not a broken drive, it's a broken driver.  Nowhere in the SCSI spec
does it mandate that you must save your data pointers prior to a disconnect
if you want the initiator to believe that the data that was transfered 
during the last data phase was valid.  In other words, the following,
very common practice during writes, is perfectly valid and should not
result in a residual:

reconnect
data phase completing transfer
disconnect
reconnect
command complete

further, the following is also valid:

reconnect
data phase (target encounters error)
disconnect
reconnect
data phase (retry)

What invalidates the previous data transfer is the act of going back into
a data phase after the reconnect.

By using the SDEV_AUTOSAVE hack, you make the second scenario impossible
for the target to achieve since you force the data pointers to be saved
irregardless of whether the target asked for it or not.

As I've said before, SDEV_AUTOSAVE should go away and the esp driver
should be fixed.

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