1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Only pull 16 bits of residual information from completing queues. This

is a work-around from an LRAM access bug on the 940UA.  In a future
microcode revision, the high 16bits of residual information will be moved
to a safe location and we'll return to 32bit residuals.  Since we only
allow 64KB I/O, 16bits is enough.
This commit is contained in:
Justin T. Gibbs 1998-10-09 21:40:50 +00:00
parent 9574f7968d
commit f8c5944d43
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40133

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: advlib.c,v 1.6 1998/09/20 05:04:05 gibbs Exp $
* $Id: advlib.c,v 1.7 1998/10/07 03:32:57 gibbs Exp $
*/
/*
* Ported from:
@ -817,8 +817,16 @@ adv_copy_lram_doneq(struct adv_softc *adv, u_int16_t q_addr,
scsiq->sense_len = val & 0xFF;
scsiq->extra_bytes = (val >> 8) & 0xFF;
/*
* XXX
* Due to a bug in accessing LRAM on the 940UA, we only pull
* the low 16bits of residual information. In the future, we'll
* want to allow transfers larger than 64K, but hopefully we'll
* get a new firmware revision from AdvanSys that address this
* problem before we up the transfer size.
*/
scsiq->remain_bytes =
adv_read_lram_32(adv, q_addr + ADV_SCSIQ_DW_REMAIN_XFER_CNT);
adv_read_lram_16(adv, q_addr + ADV_SCSIQ_DW_REMAIN_XFER_CNT);
/*
* XXX Is this just a safeguard or will the counter really
* have bogus upper bits?