diff options
author | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-08-13 19:00:50 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-08-13 19:00:50 +0200 |
commit | 7826455cf4c352465a569967ac73638058b8bd0e (patch) | |
tree | 24c5cd8d69005fdd4d8edf5bfb20db71e1f6d411 /xhfc/xhfc.h | |
parent | 8ed88c4d9d3840beaf4cc670e657a8d940c3ab93 (diff) |
change everything, add TODO
Diffstat (limited to 'xhfc/xhfc.h')
-rw-r--r-- | xhfc/xhfc.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/xhfc/xhfc.h b/xhfc/xhfc.h index 410fa73..9d777bf 100644 --- a/xhfc/xhfc.h +++ b/xhfc/xhfc.h @@ -22,7 +22,7 @@ #endif #define SPANS_PER_CHIP 4 -#define CHANS_PER_SPAN 4 +#define CHANS_PER_SPAN 3 #define XHFC_ZMIN 0x00 #define XHFC_ZMAX 0x3F /*for V_FIFO_MD = 00*/ @@ -96,16 +96,14 @@ struct xhfc_span { // Same as in DAHDI's for sameness reasons struct dahdi_span span; - int ts; /* PCM timeslot */ - atomic_t hdlc_pending; int port; /* (physical) S/T port number */ int nt; /* 1 if the port is nt, 0 if it's TE */ - int rcv; /* number of received frames */ - int crpt; /* number of corrupted reveived frames */ +// int rcv; /* number of received frames */ +// int crpt; /* number of corrupted reveived frames */ int shutdown; @@ -113,9 +111,10 @@ struct xhfc_span { int oldstate; int newalarm; unsigned long alarmtimer; - int hfc_timer_on[CHANS_PER_SPAN]; /* 1=timer active */ struct dahdi_chan* sigchan; 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 */ }; struct xhfc { @@ -123,21 +122,17 @@ struct xhfc { __u8 chipidx; /* index in pi->xhfcs[NUM_XHFCS] */ struct xhfc_pi *pi; /* backpointer to xhfc_pi */ - spinlock_t lock; - - int num_ports; /* number of S and U interfaces */ - int max_fifo; /* always 4 fifos per port */ - int max_z; - int irq_cnt; - - struct xhfc_test* testdata; struct xhfc_span spans[SPANS_PER_CHIP]; - struct semaphore fifosem; + //struct semaphore fifosem; - int running; - u8 r_pcm_md0; + + /* from DAHDI */ + int running; + unsigned long ticks; + int setsyncspan; /* Span reported from HFC for sync on this card */ + int reportedsyncspan; /* Span reported from HFC for sync on this card */ }; struct xhfc_pi { @@ -168,9 +163,14 @@ int xhfc_reset(struct xhfc * xhfc); int xhfc_chipid(struct xhfc * xhfc); int xhfc_cfg_pcm(struct xhfc * xhfc, __u8 pcm); +void hfc_handle_state(struct xhfc_span *s); +void hfc_update_st_timers(struct xhfc *x); + int __devinit xhfc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); void __devexit xhfc_remove_one(struct pci_dev *pdev); void xhfc_shutdown(struct pci_dev *pdev); +extern uint debug; +extern uint dbg_spanfilter; #endif // __XHFC_HWTD_H__ |