summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp
AgeCommit message (Collapse)Author
2011-05-23add to dahdi_device a "hardware_id" attribute as an alternative to "location"Oron Peled
- The "hardware_id" does not change with device location (e.g: when a PCI card is moved from one slot to another). - Not all devices have this attribute. It is legal for it to be NULL (that is the default for all low-level drivers that do not set it explicitly). - When "hardware_id" is NULL, the sysfs attribute value is "\n"
2011-05-23xpp: Now each Astribank (xbus) is a dahdi device and each xpd is a span:Oron Peled
- This is a minimal patch - More work should be done (e.g: auto_registration etc.)
2011-05-23xpp: Remove obsolete XPP_DEBUGFS codeTzafrir Cohen
XPP_DEBUGFS code was some code used to send BRI D-Channel data through debugfs for, well, debugging. Unused in recent years. Time to remove. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9917 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-23xpp: Remove obsolete and unused OLD_PROC codeTzafrir Cohen
OLD_PROC marked old and unused code that was used for writing to procfs. It has long ago been replaced with different sysfs interfaces. Time to remove it. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9916 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-23Revert "remove OLD_PROC code (leave only informative proc files)"Oron Peled
This reverts commit bab264ce3cb81098ff5b450f7c94a44a10f95dec.
2011-05-08remove OLD_PROC code (leave only informative proc files)Oron Peled
2011-04-15dahdi: Move irq/irqmisses from dahdi_span into dahdi_device.Shaun Ruffell
These fields do not have anything to do with the span. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15dahdi: register/unregister devices as opposed to individual spans.Shaun Ruffell
Increasingly, spans are implemented by devices that support more than a single span. Introduce a 'struct dahdi_device' object which explicitly contains multiple spans. This will also allow a cleaner representation of spans and devices in sysfs since order of arrival will not determine the layout of the devices. This also gives the core of dahdi a way to know the relationship between spans. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-01-31xpp: Missing lock release in xpp_dahdi_unregisterTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9727 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpd_pri: Explicit initialization of span.alarmsOron Peled
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9718 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpd_pri: Reduce indentationOron Peled
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9717 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpd_pri: reorder debug messagesOron Peled
Move priv->layer1_up debug message after priv->is_cas debug message. Otherwise, we get extra meaningless debug message. Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9716 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: remove unused XPD_STATE() "protocol method"Oron Peled
Folded XPD_STATE() "protocol method" into the card_state() method. It was only called from these (otherwise empty) methods. Also it is not a "protocol method" for a very very very long time. Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9715 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: Remove few extra leading spacesOron Peled
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9713 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: Use our KZALLOC/KZFREEOron Peled
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9712 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: use phonedev_cleanup() instead of inline codeOron Peled
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9711 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: Add fixed runtime checks for the PHONEDEV codeOron Peled
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9710 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: init_card_4_30: add commentTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9709 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: Kbuild: always update version stringOron Peled
* Keep the xpp version number up-to-date * Non-verbose build output. Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9708 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: phonedev: Cleanup method macrosOron Peled
* Caller to CALL_XMETHOD() no longer need to explicitly pass xbus (calculate xpd->xbus) * Create CALL_PHONE_METHOD() similar to CALL_XMETHOD() -- inlining the extra parameters (more readable) * Reverse parameter order in PHONE_METHOD() and CALL_PHONE_METHOD() to be consistent with XMETHOD() and CALL_XMETHOD() * Rename XPD_STATE phonedev method to card_state: - Consistency with other phonedev methods. - These calls now Wrap internal calls to XPD_STATE protocol HOSTCMD in PRI, BRI, FXS, FXO Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9706 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: More adaptations for non-PHONEDEV XPDsOron Peled
* Add IS_PHONEDEV(xpd) macro * Reject dahdi_register_xpd()/dahdi_unregister_xpd() for non-PHONEDEV * Make sysfs 'offhook' attribute contain '\n' if empty (no channels) * Skip PHONEDEV related xbus_tick() parts -- we still want to process the end of it for the card_tick() calls. * Remove BUG_ON() for missing phoneops (also remove old duplicate test for XBUS_IS...) * Call XPD_STATE method only for PHONEDEV XPD's Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9705 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: prepare for phonedev refactorOron Peled
* Allow having XPDs that represent a device that is not a span. * Refactor all span related data from 'struct xpd' to 'struct phonedev' * Refactor span related methods into 'phonedev->phoneops' * Refactor phone related initialization into phonedev_init()/phonedev_cleanup() Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9704 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03dahdi, xpp: dahdi_span_ops.sync_tick should return void.Shaun Ruffell
Since the return value is not defined/used just return void. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9587 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03Trivial removal of duplicate #includesShaun Ruffell
Mostly linux/errno.h was included more than once. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9557 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-08dahdi: Removing loopstop maint functionRuss Meyerriecks
DAHDI_MAINT_LOOPSTOP is being removed due to the redundancy with DAHDI_MAINT_NONE. Also removing some timing logic, as amount of time a loopup or loopdown signal is held on the line, is now defined in userspace with dahdi_maint. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9515 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-08dahdi: Clean up an unused waitqueueRuss Meyerriecks
The dahdi_span->maintq wait queue was very old and not being used so it has been removed. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-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@9514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-07xpd_pri: Remove pointless hooksig span opTzafrir Cohen
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> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9506 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-07xpd_pri: ignore DAHDI_VMWI and DAHDIVMWI_CONFIGTzafrir Cohen
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> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9505 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-10-18xpp: Fixes init error for PRI devices with < 4 portsTzafrir Cohen
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. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9430 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-24Move 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/ git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9411 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
* Astribanks no longer live directly under the USB devices in the device tree. * The 'transport' link does point there as before, however. * 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