summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-04-25 12:52:23 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-04-25 12:52:23 +0000
commit1ffb2a05a572a92f9c6b693fa1a55d447680e350 (patch)
treeebda2edbeeb7853f8a91dbb1f4c1c8aeff2a840e /sys/dev/pci
parent971d2f812518e2b1eedbc85a6ea76ce8be01d9fc (diff)
add some dprintfs to the fifo handlers.
enabling these makes tx completions occur. i wish i could figure out why.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_tht.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index 3d74322d6c5..6c5dd702c51 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.75 2007/04/25 12:50:29 dlg Exp $ */
+/* $OpenBSD: if_tht.c,v 1.76 2007/04/25 12:52:22 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1361,6 +1361,9 @@ tht_fifo_readable(struct tht_softc *sc, struct tht_fifo *tf)
if (tf->tf_ready < 0)
tf->tf_ready += tf->tf_len;
+ DPRINTF(THT_D_FIFO, "%s: fifo rdable wptr: %d rptr: %d ready: %d\n",
+ DEVNAME(sc), tf->tf_wptr, tf->tf_rptr, tf->tf_ready);
+
return (tf->tf_ready);
}
@@ -1373,6 +1376,9 @@ tht_fifo_writable(struct tht_softc *sc, struct tht_fifo *tf)
if (tf->tf_ready <= 0)
tf->tf_ready += tf->tf_len;
+ DPRINTF(THT_D_FIFO, "%s: fifo wrable wptr: %d rptr: %d ready: %d\n",
+ DEVNAME(sc), tf->tf_wptr, tf->tf_rptr, tf->tf_ready);
+
return (tf->tf_ready);
}
@@ -1406,6 +1412,9 @@ tht_fifo_read(struct tht_softc *sc, struct tht_fifo *tf,
bcopy(fifo + tf->tf_rptr, desc, buflen);
tf->tf_rptr += buflen;
+
+ DPRINTF(THT_D_FIFO, "%s: fifo rd wptr: %d rptr: %d ready: %d\n",
+ DEVNAME(sc), tf->tf_wptr, tf->tf_rptr, tf->tf_ready);
}
void
@@ -1431,6 +1440,9 @@ tht_fifo_write(struct tht_softc *sc, struct tht_fifo *tf,
bcopy(desc, fifo + tf->tf_wptr, buflen);
tf->tf_wptr += buflen;
+
+ DPRINTF(THT_D_FIFO, "%s: fifo wr wptr: %d rptr: %d ready: %d\n",
+ DEVNAME(sc), tf->tf_wptr, tf->tf_rptr, tf->tf_ready);
}
void
@@ -1471,6 +1483,9 @@ tht_fifo_post(struct tht_softc *sc, struct tht_fifo *tf)
tht_write(sc, tf->tf_desc->tfd_wptr, tf->tf_wptr);
else
tht_write(sc, tf->tf_desc->tfd_rptr, tf->tf_rptr);
+
+ DPRINTF(THT_D_FIFO, "%s: fifo post wptr: %d rptr: %d\n", DEVNAME(sc),
+ tf->tf_wptr, tf->tf_rptr);
}
void