summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp
AgeCommit message (Collapse)Author
2012-03-16xpp: '%d' -> '%lu' when displaying module_refcount on kernel versions >= 3.3svn_2.4Shaun Ruffell
Upstream commit bd77c047 "module: struct module_ref should contains long fields" changed the return of module_refcount from int to unsigned long. This change eliminates a warning from the string format specifier. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10485 Conflicts: drivers/dahdi/xpp/xproto.c git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10533 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16xpp: Use 'bool' type for boolean module parameters on kernel versions >= 2.6.31.Shaun Ruffell
Eliminates warnings that are a result of upstream commit 72db395ffa "module_param: check that bool parameters really are bool." Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10484 Conflicts: drivers/dahdi/xpp/xpd.h git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10532 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-28xpp: FXS: new 2+6 module has no digital I/O portsTzafrir Cohen
This module is recognized via subtype==4 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10156 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-31xpp: empty labels are not duplicateTzafrir Cohen
Some older Asttribanks had an empty label string. They should be ignored when testing for a duplicate label at device probe time. While we're at it, reduce panic level in the notice. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9926 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-27Move test for DEFINE_SPINLOCK into include/dahdi/kernel.hShaun Ruffell
The check for DEFINE_SPINLOCK was spread throughout the source tree. If not defined we can just define it in inlucde/dahdi/kernel.h. Now include/dahdi/kernel.h is the only place that references SPIN_LOCK_UNLOCKED (which breaks lockdep checking if DEFINE_SPINLOCK is otherwise defined in the kernel). Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Review: https://reviewboard.asterisk.org/r/940/ Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9411 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9924 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21xpd_pri: Remove pointless hooksig span opShaun Ruffell
If the span reports that it supports hooksig, DAHDI may fail to use RBS. So remove a call to that stub function. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9506 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9680 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21xpd_pri: ignore DAHDI_VMWI and DAHDIVMWI_CONFIGShaun Ruffell
This fixes an annoying, though harmless issue: if Asterisk decides to send voicemail messages to a channel (CAS, configured as FXS), We can't do anything useful with them. So ignore them to avoid scary-looking messages (from report_bad_ioctl()). Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9505 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9679 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21Remove 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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9464 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9676 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-21xpp: Fixes init error for PRI devices with < 4 portsShaun Ruffell
Fixes a regression singce r8873: if pri_protocol is not explicitly set (in /etc/dahdi/xpp.conf) and the device has (licences for) less than 4 "PRI" (E1/T1) ports, the initialization script will attempt to read from a non-existing SysFS file, and bail out, resulting in a the device failing to initialize. For those non-existing ports we can just skip that part of the initialization. So we just skip it. Work around: explicitly set pri_protocol to E1 or T1, as needed. Xorcom Rev: 8047. Ticket: 1334. Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9430 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9666 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-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-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-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-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
2010-07-13Don't assume hardwired pri_protocol is E1Tzafrir Cohen
When initializing registers for the "PRI" (E1/T1) module, in the case the user has not explicitly asked for E1/T1 settings in xpp.conf (pri_protocol) fall back to the current value, which is the build-time fall-back. The value is read from sysfs. Previously we implicitly assumed this value is E1. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8873 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13partial fix of T1 returning signaling register in non-CAS modeTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8872 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-08Use usb_{alloc,free}_coherent instead of usb_buffer_{alloc,free}.Tzafrir Cohen
usb_buffer_alloc has been replaced with usb_alloc_coherent , and likewise usb_buffer_free has been replaced with usb_free_coherent. in kernels 2.6.34 the older names are proxies for the new ones, and in 2.6.35 the older names are gone. This patch defines the new names for the old ones, for older kernel versions. (closes issue #17383) Reported by: Chainsaw git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8762 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-19typos, mostly unkownTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8539 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26Revert "dahdi: Move the definition of bool from xdefs.h into ↵Shaun Ruffell
include/dahdi/kernel.h" Reverts r8117. The wctdm24xxp driver can include <stdbool.h> directly. Reported by: seanbright git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8134 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26dahdi: Move the definition of bool from xdefs.h into include/dahdi/kernel.hShaun Ruffell
I intend to use the bool definition in the wctdm24xxp driver and don't want to duplicate the definition. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8117 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-26xpp_debug: a helper script to use debugging parameters with names.Tzafrir Cohen
(not intended to be installed) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7964 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-12xpp: xpd_fxo: two extra parameters regarding batteryTzafrir Cohen
Make module parameters out of two constants to allow further tweaking in the detection of battery. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7883 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-11xpp: demote a message that generates some false alarms.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7843 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-10xpp: USB_FW rev 7578Tzafrir Cohen
Fixes various minor twinstar-related bugs. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7815 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-10xpp: fixes for drift calculation.Tzafrir Cohen
Should help for the case of multiple quad-PRI Astribanks on a single system. xpp rev: 7666. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7807 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-04Fix udev rules to work with more recent kernels.Tzafrir Cohen
Note that this change will not work on most older systems (e.g.: Centos5, with its udev 0.95) if the matching change of xpp_fxloader in tools (r7752) is not applied. * Replace deprecated 'BUS' with 'SUBSYSTEM' * Sysfs{} should be replaced with ATTR{}. Sadly the former is not supported in recent udev, and the latter is not supported in udev 0.95. Workaround: use PRODUCT from the environment. * Use a single rule. * While we're at it, add the missing comma to the astribank_hook line (which surprisingly worked without it). git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7753 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-12-28xpp: Fix a typo in card_fxo.Tzafrir Cohen
xpp rev: 7595 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7731 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-12-14DAHDI_AUDIO_NOTIFY: Also pass DAHDI_AUDIOMODE to channel driverTzafrir Cohen
Adds a new compile-time option DAHDI_AUDIO_NOTIFY. With it there's a new span hook, audio_notify, that gets called (if not NULL) whenever the ioctl DAHDI_AUDIOMODE is called for a channel. This can be useful to tell (in most cases) if an ISDN channel is active or not and thus allow the low-level driver to optimize traffic when channels are not active. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7691 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-12-14xpp: replace i with j to avoid overridingTzafrir Cohen
Fix a place where an inner declaration of a local 'i' shadows the declaration of an outer one. Just rename the inner one to 'j'. Reported by sparse. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7690 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-22xpp: Improved inter-Astribank drift calculation.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7625 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-22xpp: statify and line length in card_bri.cTzafrir Cohen
* checkpatch.pl nudged about line lengthes. * sparse nudged about non-static functions. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7622 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-22xpp firmware: USB firmware with support of MPP 1.4Tzafrir Cohen
xpp rev: 7419 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7615 a0bf4364-ded3-4de4-8d8a-66a801d63aff