diff options
author | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-08-23 16:04:48 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-08-23 16:04:48 +0200 |
commit | 903500ec9e587eba454943719668bef0ea0660fd (patch) | |
tree | d200f84516efd0ce42b5a0ffa671b988e0f29d55 /xhfc/xhfc.h | |
parent | 5a56b078a7aa178dac2707a7d60d850e3ebed25b (diff) |
clean up, traces, fix hdlc_rx_frame, b chans...
Diffstat (limited to 'xhfc/xhfc.h')
-rw-r--r-- | xhfc/xhfc.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/xhfc/xhfc.h b/xhfc/xhfc.h index 9d777bf..6f5445d 100644 --- a/xhfc/xhfc.h +++ b/xhfc/xhfc.h @@ -48,13 +48,14 @@ #define DEBUG_FOPS (1 << 3) #define DEBUG_ECHOCAN (1 << 4) /* S/T state machine */ -#define DEBUG_ST_STATE (1 << 5) //XXX not used? +#define DEBUG_ST_STATE (1 << 5) /* HDLC controller */ #define DEBUG_HDLC (1 << 6) -/* alarm changes */ -#define DEBUG_ALARM (1 << 7) //XXX not used? +#define DEBUG_VERBOSE_HDLC (1 << 7) /* Timing related changes */ #define DEBUG_TIMING (1 << 8) //XXX not used? +/* alarm changes */ +#define DEBUG_ALARM (1 << 9) #define DBG (debug & DEBUG_GENERAL) #define DBG_DTMF (debug & DEBUG_DTMF) @@ -63,6 +64,7 @@ #define DBG_EC (debug & DEBUG_ECHOCAN) #define DBG_ST (debug & DEBUG_ST_STATE) #define DBG_HDLC (debug & DEBUG_HDLC) +#define DBG_VERBOSE_HDLC (debug & DEBUG_VERBOSE_HDLC) #define DBG_ALARM (debug & DEBUG_ALARM) #define DBG_TIMING (debug & DEBUG_TIMING) @@ -72,6 +74,13 @@ #define USE_FIFO_IRQ 0 #define HDLC_BUF_LEN 128 /* "arbitrary", or so say DAHDI's drivers */ + +#ifndef MAX +# define MAX(a, b) (((a) > (b))? (a) : (b)) +#endif +#ifndef MIN +# define MIN(a, b) (((a) < (b))? (a) : (b)) +#endif enum data_dir { TRANSMIT = 0, RECEIVE = 1 }; @@ -115,6 +124,8 @@ struct xhfc_span { int sigactive; unsigned long hfc_timers[CHANS_PER_SPAN+1]; /* T1, T2, T3 */ //XXX WTF with this length? int hfc_timer_on[CHANS_PER_SPAN+1]; /* 1=timer active */ + + unsigned long non_rx_cnt; }; struct xhfc { @@ -147,7 +158,7 @@ struct xhfc_pi { struct pci_dev *pci_dev; }; -#define dchan_fifo(span) (span->port * SPANS_PER_CHIP + 2) +#define dchan_fifo(span) (span->port * 4 + 2) void xhfc_config_d_chan_on_fifo(struct xhfc_span*); //void xhfc_hdlc_write_buf(struct xhfc* x, int fifo, u8* buf, int len); |