Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/arch/sgimips/hpc Pull up revisions 1.6-1.7 (request...
details: https://anonhg.NetBSD.org/src/rev/dd22e33598cb
branches: netbsd-2-0
changeset: 564755:dd22e33598cb
user: he <he%NetBSD.org@localhost>
date: Wed Apr 06 17:13:41 2005 +0000
description:
Pull up revisions 1.6-1.7 (requested by rumble in ticket #1054):
Fix the HPC1 transmit logic, which was previously very broken.
diffstat:
sys/arch/sgimips/hpc/sqvar.h | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diffs (69 lines):
diff -r 2ebd43e04667 -r dd22e33598cb sys/arch/sgimips/hpc/sqvar.h
--- a/sys/arch/sgimips/hpc/sqvar.h Wed Apr 06 17:12:07 2005 +0000
+++ b/sys/arch/sgimips/hpc/sqvar.h Wed Apr 06 17:13:41 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sqvar.h,v 1.5 2003/12/30 23:48:07 sekiya Exp $ */
+/* $NetBSD: sqvar.h,v 1.5.2.1 2005/04/06 17:13:41 he Exp $ */
/*
* Copyright (c) 2001 Rafal K. Boni
@@ -43,8 +43,8 @@
#include <sgimips/hpc/hpcreg.h>
/* Note, these must be powers of two for the magic NEXT/PREV macros to work */
-#define SQ_NRXDESC 32
-#define SQ_NTXDESC 16
+#define SQ_NRXDESC 64
+#define SQ_NTXDESC 64
#define SQ_NRXDESC_MASK (SQ_NRXDESC - 1)
#define SQ_NEXTRX(x) ((x + 1) & SQ_NRXDESC_MASK)
@@ -75,6 +75,38 @@
#define SQ_TYPE_8003 0
#define SQ_TYPE_80C03 1
+/* Trace Actions */
+#define SQ_RESET 1
+#define SQ_ADD_TO_DMA 2
+#define SQ_START_DMA 3
+#define SQ_DONE_DMA 4
+#define SQ_RESTART_DMA 5
+#define SQ_TXINTR_ENTER 6
+#define SQ_TXINTR_EXIT 7
+#define SQ_TXINTR_BUSY 8
+#define SQ_IOCTL 9
+#define SQ_ENQUEUE 10
+
+struct sq_action_trace {
+ int action;
+ int line;
+ int bufno;
+ int status;
+ int freebuf;
+};
+
+#define SQ_TRACEBUF_SIZE 100
+
+#define SQ_TRACE(act, sc, buf, stat) do { \
+ (sc)->sq_trace[(sc)->sq_trace_idx].action = (act); \
+ (sc)->sq_trace[(sc)->sq_trace_idx].line = __LINE__; \
+ (sc)->sq_trace[(sc)->sq_trace_idx].bufno = (buf); \
+ (sc)->sq_trace[(sc)->sq_trace_idx].status = (stat); \
+ (sc)->sq_trace[(sc)->sq_trace_idx].freebuf = (sc)->sc_nfreetx; \
+ if (++(sc)->sq_trace_idx == SQ_TRACEBUF_SIZE) \
+ (sc)->sq_trace_idx = 0; \
+} while (0)
+
struct sq_softc {
struct device sc_dev;
@@ -128,6 +160,9 @@
rndsource_element_t rnd_source; /* random source */
#endif
struct hpc_values *hpc_regs; /* HPC register definitions */
+
+ int sq_trace_idx;
+ struct sq_action_trace sq_trace[SQ_TRACEBUF_SIZE];
};
#define SQ_CDTXADDR(sc, x) ((sc)->sc_cddma + SQ_CDTXOFF((x)))
Home |
Main Index |
Thread Index |
Old Index