summaryrefslogtreecommitdiff
path: root/drivers/dahdi
AgeCommit message (Collapse)Author
2010-07-28tor2: Do not directly dereference I/O memory.Shaun Ruffell
Mainly to quiet a sparse warning, but this could be a real problem on some non x86 platforms. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9045 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctdm: Fix signed one-bit fields.Shaun Ruffell
Thanks sparse. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9044 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wcte12xp: Add __user annotation in copy_to_user call.Shaun Ruffell
Quiets sparse. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9043 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wct4xxp: Several minor changes to make sparse/checkpatch.pl happy.Shaun Ruffell
Make setup_chunks static, eliminate a dynamic array in the interrupt handler, don't cast away a memory region specifier, and don't initialize statics to 0. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9042 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wcb4xxp: Trivial removal of some whitespace at the end of a line.Shaun Ruffell
Fixing formatting errors that have snuck in since the 2.3.0 release. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9041 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wcte12xp: Trival formatting changes.Shaun Ruffell
Fixing up some of the formatting errors that crept in since the 2.3.0 release. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9040 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28dahdi: Unlock the dahdi_span.lock when passed an invalid DAHDI_MAINT command.Shaun Ruffell
Fixes the following sparse warning "warning: context imbalance in 'dahdi_ctl_ioctl' - different lock contexts for basic block". Thank you sparse! git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9038 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Add compile-time option to always poll the interface.Shaun Ruffell
Added as a workaround for a system which was not routing interrupts properly and therefore is off by default. Candidate for reversion in a couple of years. DAHDI-627. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9037 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Move from I/O space to memory-mapped registers.Shaun Ruffell
Certain platforms have trouble with the registers mapped from I/O space. DAHDI-627. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9036 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Do not ACK response packets without a corresponding request.Shaun Ruffell
Closes a small window of opportunity where system conditions prevent the driver from servicing it's receive ring within the timeout period of a request, and then in the middle of retrying the request (after the request was already removed from the "waiting_for_response" list) the driver process the response, it's possible for the driver to ACK the response without ever pairing it up with the original request. The result being that the DTE will then ignore our attempts to retry the original request. DAHDI-430. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9035 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctc4xxp: Allow read to return more than one packet of data.Shaun Ruffell
As of this writing codec_dahdi (Asterisk module) will not call 'read' on a transcoder channel more often than it calls 'write'. When a translation path is setup that will transcode from g723 to g729, write is called every 30ms and each 'read' returns only 20ms of data. The end result is audio that slowly becomes increasing delayed. Since codec_dahdi calls the system read function with a buffer large enough to hold more than one packet this can prevents packets from backing up on the channel. DAHDI-582 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9034 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28Ignore Reg. 0x70 messages at E1.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9028 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28demote a notice that will happen at registrationTzafrir Cohen
We might as well ignore this, as we will get this at span registration time anyway. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9025 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-27wct4xxp: Enabled network facing looping for E1Russ Meyerriecks
Added the abililty to loop the line back towards the network for E1 modes. This supports both network loop and network payload loop. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9019 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-27wct4xxp: Fixed error injection bugRuss Meyerriecks
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9016 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wct4xxp: Error counter injection for E1 modeRuss Meyerriecks
Added support for error counter injection for E1 mode git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9013 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wct4xxp: Removed card level event handlerRuss Meyerriecks
Upon review the event introduced in r8998 seemed to be redundant, as the same information was already available. Performance issues were also a concern. This reverts r8998. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9010 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26Added hardware transformer checkRuss Meyerriecks
QuadFalc has the ability to test if the transformer is performing correctly. If the components between the framer and the physical span interface are shorted out or opened for any reason we can now detect it. Possible causes for tripping this error could be a broken transformer from an electrical spike or a board manufacturing error. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8999 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26Added card level event handlerRuss Meyerriecks
When a loss of syncronization signal occurs on one of the spans, it affects all spans on that card. Since we do not have a span or card level event system, we have to queue up a global event on all channels for that card The new event is DAHDI_EVENT_SYNC git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8998 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26Added the ability to trigger alarm simulation states in theRuss Meyerriecks
qfalc framer. Added some more verbose red alarm states in the upper byte of the alarm member of the dahdi_span structure Removed some unnecessary instrumentation regarding the enabling of the errored second and 1 second counters for performance collecting. Also added a couple comments. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8997 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the 'owner' field from dahdi_span to dahdi_span_ops.Shaun Ruffell
One more thing that can be moved out of the per-span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8986 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the callbacks in dahdi_span into its own structure.Shaun Ruffell
Part of preparation for adding additional callbacks to allow board drivers to advertise and support gathering pre-echocan data from hardware echocans. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8985 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-07-26wcte12xp, wctdm24xxp: Updating VPMADT032 firmware to version to 1.25Shaun Ruffell
The echo canceler will now monitor if the receive signal goes over a certain threshold, and if so, freezes its adaptation to prevent loss of convergence. I.e. Fixes conditions where blowing into your handset could result in echo. Additionally, 1.25 includes improvements for handling when line conditions change from echo free to containing echo. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8983 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: Return buffer processing to interrupt handler.Shaun Ruffell
In revision 8095, I had moved most of the buffer processing out of the interrupt handler and into a tasklet. The intended result was to enable multiple cards to interleave with one another. But once again I was bitten by the fact that there are some systems that for one reason or another do not process their tasklets in a timely enough manner for the real-time nature of TDM processing. This commit moves this processing back into the interrupt handler by default. It also limits the number of frames that the interrupt handler will process at any given time which appears to achieve the same intended result. (closes issue #17289) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8982 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: spin_lock_bh -> spin_lock_irqsaveShaun Ruffell
Will add an option to allow calling the deferred processing callback directly in the interrupt handler. It appears there are some systems which still are unable to process their tasklets in a timely fashion, especially if they get pushed out to the ksoftirqd daemon. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8981 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp: Do not call destory_workqueue if the workqueue was not yet created.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8980 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: Add shutdown handlers.Shaun Ruffell
Make the drivers a little more kexec friendly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8979 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-25No need to worry about accidental "changes" in reg. 0x70 in E1Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8975 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-22Make sure we also change the deflaw of the span to ulaw if alawoverride is ↵Matthew Fredrickson
disabled. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8969 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-22Make sure we check max_latency to see if it's greater than the minimum ↵Matthew Fredrickson
required latency for the board in question. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8968 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-19FXS - fix VMWI compatibility mode:Tzafrir Cohen
* If we have vmwi_ioctl=N, we should initialize the vmwi_type of all channels. We initialize it to HVAC * Fix a regression, where curly braces around empty if()'s were removed. * Also fix the VMWI_TYPE() macro, so it actually uses the 3'rd parameter. (this didn't cause damage yet, as we only used HVAC so far) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8943 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-16Add alawoverride parameter to the wcb4xxp module to allow for ulaw and alaw ↵Matthew Fredrickson
mode. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8939 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14Make noburst parameter override burst flag.Matthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8935 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14PIC 4 rev. 7381: fix T1 returning signaling register in non-CASTzafrir Cohen
This is the second part of the partial fix in r8872, though each of the two should work independently. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8931 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14Allow reading caps when twinstar watchdog setTzafrir Cohen
Fixes reading capabilities when the watchdog is set. In that case most of the data, as seen, e.g. in output of 'astribank_allow', was 0xFF. Xorcom rev: 7809 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8930 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14Set Astribank PRI before initializationTzafrir Cohen
This avoids most cases of sending garbage at startup by setting each port to tristate mode at init time (in the init script) and enable it back at DAHDI_STARTUO (end of dahdi_cfg). Upgrade note: if you have upgraded the files (including init script) but old module is still loaded, you may end up with the port not getting ever enabled and the line practically dead. In such a case, reload the new module. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8922 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13start migrating from xbus_num() to get_xbus()/put_xbus()Tzafrir Cohen
* Now get_xbus() receive and xbus number (not poiner) and uses xbus_num() internally to map it to an xbus pointer + refcount increment. (this is atomic) * Migrate all obvious places that used xbus_num() to map bus number into a pointer, so now they use get_xbus() + put_xbus() to aquire and release an xbus. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8913 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13PRI Astribanks always sync AB (and independent)Tzafrir Cohen
* PRI devices always get SYNC-AB (never PLL, not even for NT) * Fix Timing priority calculation accordingly. * On PRI layer1 changes, elect_syncer() is called, so we have re-election. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8909 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13prevent handling of duplicate AstribanksTzafrir Cohen
Don't let AB which are unplugged/replugged create duplicate XBUS's (if asterisk don't close the original channels). git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8905 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Create /sys/devices/astribanks:Tzafrir Cohen
* Astribank devices now reside under their own top-level device. * The USB device is still used as the 'transport'. * This means the astribanks parents are NOT the USB devices. * As a result, even after a USB disconnect, we have valid sysfs representation. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8904 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Keep SYSFS objects after disconnectTzafrir Cohen
When the USB device disconnects, we keep references to them to make sure they don't disappear. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8900 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Don't reset span flag RBS on pri moduleTzafrir Cohen
Don't attempt to reset the span flag DAHDI_FLAG_RBS. At pre-registration we don't yet know if we're CAS or not. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8896 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13don't send "duplicates" in E1 as in D4Tzafrir Cohen
Make sure we only consider T1-s to be potentially D4 (which requires sending the bits twice). This fixes occasional command-queue floods in E1 CAS. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8892 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Put a space where it belongsTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8888 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Basic support for DAHDI_VMWI_CONFIGTzafrir Cohen
* Supports only our current NEON notification. * No more global 'vmwineon' parameter: - We expect asterisk to tell us by channel. - If 'vmwi_ioctl' is not set (it is by default), that we revert to FSK searching (expensive) and call directly our NEON code (as before). git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8887 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Solve race xbus_populateTzafrir Cohen
Fixes a crash resulting from a race between disconnecting and connecting Astribanks (on multi-core systems) * Use get_xbus()/put_xbus() arround xbus_populate(), so a disconnect in the middle won't release the xbus too early. * Aquire all XPDs before starting initialization and release them after it finishes (so we don't have up/down races among XPDs) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8886 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13put xbus->worker in xbus; wake_up_interruptible_all()Tzafrir Cohen
* The worker member of 'struct xbus' is now an embedded struct xbus_workqueue. * Replace wake_up() to wake_up_interruptible_all(). git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8882 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Cleanup: refcount_xpd()Tzafrir Cohen
* Change refcount_xpd(): instead of returning a pointer to the atomic counter, return directly its value (just like refcount_xbus()) * Add a refcount_xbus and refcount_xpd attributes to sysfs (for debugging) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8878 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Fix building without CONFIG_PROC_FS definedTzafrir Cohen
This changeset should have no functional changes. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8877 a0bf4364-ded3-4de4-8d8a-66a801d63aff