summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/xhfc.c
AgeCommit message (Collapse)Author
2012-05-23convert span->spantype to enumerated typeTzafrir Cohen
* This is a minimal convertion -- everything compiles and looks OK. * We print a warning for spans registering without a spantype. * Low-level drivers may later want (but not required) to fold their internal representations to this canonical representation -- it will save code and make it more readable. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10683 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28wcte12xp, wctdm24xxp: Load VPMOCT032 firmware in background.Russ Meyerriecks
The firmware load has been moved into a workqueue to prevent the module load from blocking for the duration of the firmware upload. This could be up to 40 seconds. Driver prevents configuration until firmware load is finished and is_initialized() returns true. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9998 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Pass the pointer to struct wctdm_module directly instead of index.Shaun Ruffell
This change gets all the easy places and saves on array dereferences when we already have the address of the module that we are interested in. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9961 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Use enumeration for module types.Shaun Ruffell
This change is to primarily to clarify that the types are always mutually exclusive. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9958 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Group the per-module information togetherShaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9956 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Block chanconfig and spanconfig until board is ready.Shaun Ruffell
Currently the board will always be ready if the module initialization function is complete but this change will facilitate allowing some of the more time consuming configuration steps to happen in parallel on system start. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9944 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02dahdi: Allow dahdi_span_ops.[chan|span]config and startup to block.Shaun Ruffell
This change ensures that the dahdi_span_ops callbacks are not called with any spinlocks held, and that the module is pinned in memory, and also passes the struct file * pointer to the callbacks. Passing the file pointer to the callbacks allows the board drivers to check any flags on the file descriptor used to configure the span/channel. The intent here is to allow dahdi_config to open the /dev/dahdi/ctl file in a non-blocking mode in case there is a lengthy processes that needs to happen as part of configuration. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9940 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02Remove unused variables.Shaun Ruffell
gcc-4.6 now warns about variables that are set but never used. Clean up unused variables everywhere except the oct612x subdirectory. The oct612x should go in a separate patch in case that needs to be pulled out into a separate project again. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-01wctdm24xxp: Replace interruptible_sleep_on() with msleep when delaying.Shaun Ruffell
There were several cases where interruptible_sleep_on() was being used as a ms timer, since the assumption is that the board will interrupt at even 1ms intervals. We can replace these cases with msleep directly to clarify that we're just waiting. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9501 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04wctdm24xxp: 'wait_just_a_bit()' -> 'msleep()'Shaun Ruffell
If we're waiting for tens or hundreds of milliseconds we will just go to sleep instead of spinning. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9471 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04wctdm24xxp: Replace 'schluffen()' with 'interruptible_sleep_on()'Shaun Ruffell
'schluffen()' essentially duplicates the functionality of the standard Linux 'interruptible_sleep_on()' function. There may still be some race conditions that can be closed here, but most of the command queue processing is sloted for conversion to something more like in the single span driver in order to reduce the time in interrupt context spent scanning for commands to the modules. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9469 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04Remove mutex emulationShaun Ruffell
Using semaphores as mutexes was removed from the kernel in 4882720b267b. Just use straight semaphores now. 'DECLARE_MUTEX()' -> 'DEFINE_SEMAPHORE()' and 'init_MUTEX()' -> 'sema_init()'. Signed-off-by: Shaun Ruffell <sruffell@digium.com> LKML-Reference: <20100907125057.562399240@linutronix.de> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9464 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-13wctdm24xxp: Set the 'spantype' for the digital spans.Shaun Ruffell
Defaults to "TE" but can be set by software to "NT" by dahdi_cfg. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9132 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-04wctdm24xxp: 'struct dahdi_span' is already embedded in the 'struct wctdm_span'.Shaun Ruffell
We cannot also embed it in struct b400m_span structure and expect container_of to work. This fixes a regression introduced in r8984. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9087 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Remove the 'pvt' member from dahdi_span.Shaun Ruffell
The vast majority of board drivers already keep the dahdi_span structure in a driver specific structure. The others were easily converted. This way board drivers can use the container_of macro to find what was previously pointed to by the "pvt" member of the span. One less thing to think about in the span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8984 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26wctdm24xxp: Add support for Hx8 series cards.Shaun Ruffell
The Hx8 series cards support BRI modules in addition to analog modules. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8123 a0bf4364-ded3-4de4-8d8a-66a801d63aff