diff options
author | gibbs <gibbs@FreeBSD.org> | 1998-10-09 21:40:50 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1998-10-09 21:40:50 +0000 |
commit | 1b69a2490496d0ccbdcc83503b98381afb1a3991 (patch) | |
tree | 4735fa2739845aac0e470f0067267802f9146cc7 /sys/dev/advansys/advlib.c | |
parent | ed4de15d445d20c7aaeecab3961b69dc84d5c95e (diff) | |
download | FreeBSD-src-1b69a2490496d0ccbdcc83503b98381afb1a3991.zip FreeBSD-src-1b69a2490496d0ccbdcc83503b98381afb1a3991.tar.gz |
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.
Diffstat (limited to 'sys/dev/advansys/advlib.c')
-rw-r--r-- | sys/dev/advansys/advlib.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/advansys/advlib.c b/sys/dev/advansys/advlib.c index 3a7f611..617266a 100644 --- a/sys/dev/advansys/advlib.c +++ b/sys/dev/advansys/advlib.c @@ -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? |