Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/macppc/dev Pull up revision 1.3 (via patch, re...
details: https://anonhg.NetBSD.org/src/rev/e0d46deb3f04
branches: netbsd-1-4
changeset: 470410:e0d46deb3f04
user: he <he%NetBSD.org@localhost>
date: Wed Feb 23 22:36:43 2000 +0000
description:
Pull up revision 1.3 (via patch, requested by tsubai):
Fix the ``panic: mesh: FIFO != 0'' on some models.
diffstat:
sys/arch/macppc/dev/mesh.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 3acbc27fd91d -r e0d46deb3f04 sys/arch/macppc/dev/mesh.c
--- a/sys/arch/macppc/dev/mesh.c Wed Feb 23 22:31:31 2000 +0000
+++ b/sys/arch/macppc/dev/mesh.c Wed Feb 23 22:36:43 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mesh.c,v 1.1.2.2 2000/02/23 01:22:27 he Exp $ */
+/* $NetBSD: mesh.c,v 1.1.2.3 2000/02/23 22:36:43 he Exp $ */
/*-
* Copyright (C) 1999 Internet Research Institute, Inc.
@@ -303,6 +303,7 @@
{
struct mesh_softc *sc = arg;
struct mesh_scb *scb;
+ int fifocnt;
u_char intr, exception, error, status0, status1;
int i;
@@ -337,8 +338,16 @@
sc->sc_flags &= ~MESH_DMA_ACTIVE;
scb->resid = MESH_GET_XFER(sc);
- if (mesh_read_reg(sc, MESH_FIFO_COUNT) != 0)
- panic("mesh: FIFO != 0"); /* XXX */
+ fifocnt = mesh_read_reg(sc, MESH_FIFO_COUNT);
+ if (fifocnt != 0 && (scb->flags & MESH_READ)) {
+ char *cp = (char *)scb->daddr + scb->dlen - fifocnt;
+
+ while (fifocnt > 0) {
+ *cp++ = mesh_read_reg(sc, MESH_FIFO);
+ fifocnt--;
+ }
+ } else
+ mesh_set_reg(sc, MESH_SEQUENCE, MESH_CMD_FLUSH_FIFO);
}
if (intr & MESH_INTR_ERROR) {
Home |
Main Index |
Thread Index |
Old Index