summaryrefslogtreecommitdiff
path: root/xpp/xpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/xpd.h')
-rw-r--r--xpp/xpd.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/xpp/xpd.h b/xpp/xpd.h
index 6debd03..fcdbf8a 100644
--- a/xpp/xpd.h
+++ b/xpp/xpd.h
@@ -32,7 +32,15 @@
#include <asm/atomic.h>
#include <asm/semaphore.h>
#include <linux/moduleparam.h>
+#ifdef XPP_DEBUGFS
+#ifndef CONFIG_DEBUG_FS
+#warning kernel does not include CONFIG_DEBUG_FS, canceling XPP_DEBUGFS support
+#undef XPP_DEBUGFS
+#else
+#include <linux/debugfs.h>
+#endif
#endif
+#endif /* __KERNEL__ */
#include <zaptel.h>
@@ -92,9 +100,9 @@ typedef struct packet_queue {
} packet_queue_t;
struct xbus_ops {
- int (*packet_send)(xbus_t *xbus, xpacket_t *packet);
- xpacket_t *(*packet_new)(xbus_t *xbus, gfp_t flags);
- void (*packet_free)(xbus_t *xbus, xpacket_t *p);
+ int (*xframe_send)(xbus_t *xbus, xframe_t *xframe);
+ xframe_t *(*xframe_new)(xbus_t *xbus, gfp_t flags);
+ void (*xframe_free)(xbus_t *xbus, xframe_t *p);
};
/*
@@ -104,7 +112,7 @@ enum {
XBUS_N_DESC_REQ,
XBUS_N_DEV_DESC_FULL,
XBUS_N_DEV_DESC_EMPTY,
- XBUS_N_PCM_WRITE,
+ XBUS_N_SEND_PCM,
XBUS_N_PCM_READ,
XBUS_N_TX_BYTES,
XBUS_N_RX_BYTES,
@@ -121,7 +129,7 @@ static struct xbus_counters {
C_(DESC_REQ),
C_(DEV_DESC_FULL),
C_(DEV_DESC_EMPTY),
- C_(PCM_WRITE),
+ C_(SEND_PCM),
C_(PCM_READ),
C_(TX_BYTES),
C_(RX_BYTES),
@@ -142,6 +150,11 @@ struct card_desc_struct {
xpd_addr_t xpd_addr;
};
+#ifdef XPP_DEBUGFS
+/* definition in xbus-core.c */
+struct debugfs_data;
+#endif
+
/*
* An xbus is a transport layer for Xorcom Protocol commands
*/
@@ -183,6 +196,11 @@ struct xbus {
int num_xpds;
void *priv; /* Pointer to transport level data structures */
+#ifdef XPP_DEBUGFS
+ struct dentry *debugfs_dir;
+ struct dentry *debugfs_file;
+ struct debugfs_data *debugfs_data;
+#endif
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_xbus_dir;
struct proc_dir_entry *proc_xbus_summary;
@@ -281,11 +299,13 @@ struct xpd {
atomic_t open_counter; /* Number of open channels */
int flags;
+ bool blink_mode; /* for visual identification */
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_xpd_dir;
struct proc_dir_entry *proc_xpd_summary;
struct proc_dir_entry *proc_xpd_ztregister;
+ struct proc_dir_entry *proc_xpd_blink;
#endif
int counters[XPD_COUNTER_MAX];
@@ -302,7 +322,6 @@ struct xpd {
xpd_addr_t addr;
struct list_head xpd_list;
unsigned int timer_count;
- volatile u_char *writechunk; /* Double-word aligned write memory */
volatile u_char *readchunk; /* Double-word aligned read memory */
/* Echo cancelation */
u_char ec_chunk1[CHANNELS_PERXPD][ZT_CHUNKSIZE];