Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/ic Pull up revision 1.13 (requested by bouyer):
details: https://anonhg.NetBSD.org/src/rev/116d247275c9
branches: netbsd-1-5
changeset: 492628:116d247275c9
user: he <he%NetBSD.org@localhost>
date: Tue Jan 29 22:41:17 2002 +0000
description:
Pull up revision 1.13 (requested by bouyer):
Add support for the 53c1010-33, and bring documentation up to
date.
diffstat:
sys/dev/ic/siop_common.c | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diffs (52 lines):
diff -r 9369bd7b6b8f -r 116d247275c9 sys/dev/ic/siop_common.c
--- a/sys/dev/ic/siop_common.c Tue Jan 29 22:40:50 2002 +0000
+++ b/sys/dev/ic/siop_common.c Tue Jan 29 22:41:17 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siop_common.c,v 1.3.2.3 2001/02/26 17:47:30 he Exp $ */
+/* $NetBSD: siop_common.c,v 1.3.2.4 2002/01/29 22:41:17 he Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -505,26 +505,33 @@
#endif
dbc = bus_space_read_4(sc->sc_rt, sc->sc_rh, SIOP_DBC) & 0x00ffffff;
if (siop_cmd->xs->xs_control & XS_CTL_DATA_OUT) {
- /* need to account stale data in FIFO */
- int dfifo = bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_DFIFO);
- if (sc->features & SF_CHIP_FIFO) {
- dfifo |= (bus_space_read_1(sc->sc_rt, sc->sc_rh,
- SIOP_CTEST5) & CTEST5_BOMASK) << 8;
- dbc += (dfifo - (dbc & 0x3ff)) & 0x3ff;
+ if (sc->features & SF_CHIP_DFBC) {
+ dbc +=
+ bus_space_read_2(sc->sc_rt, sc->sc_rh, SIOP_DFBC);
} else {
- dbc += (dfifo - (dbc & 0x7f)) & 0x7f;
+ /* need to account stale data in FIFO */
+ int dfifo =
+ bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_DFIFO);
+ if (sc->features & SF_CHIP_FIFO) {
+ dfifo |= (bus_space_read_1(sc->sc_rt, sc->sc_rh,
+ SIOP_CTEST5) & CTEST5_BOMASK) << 8;
+ dbc += (dfifo - (dbc & 0x3ff)) & 0x3ff;
+ } else {
+ dbc += (dfifo - (dbc & 0x7f)) & 0x7f;
+ }
}
sstat = bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_SSTAT0);
if (sstat & SSTAT0_OLF)
dbc++;
- if (sstat & SSTAT0_ORF)
+ if ((sstat & SSTAT0_ORF) && (sc->features & SF_CHIP_DFBC) == 0)
dbc++;
if (siop_cmd->siop_target->flags & TARF_ISWIDE) {
sstat = bus_space_read_1(sc->sc_rt, sc->sc_rh,
SIOP_SSTAT2);
if (sstat & SSTAT2_OLF1)
dbc++;
- if (sstat & SSTAT2_ORF1)
+ if ((sstat & SSTAT2_ORF1) &&
+ (sc->features & SF_CHIP_DFBC) == 0)
dbc++;
}
/* clear the FIFO */
Home |
Main Index |
Thread Index |
Old Index