summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xbus-core.h
AgeCommit message (Collapse)Author
2011-12-21xpp: Allow up to 128 Astribanks on a systemTzafrir Cohen
This is also a work around the bug fixed in the previous commit. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10384 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-10xpp: restore backward compat dahdi_registrationTzafrir Cohen
This restores a somewhat limited functionality of the "span" write interface in the SysFS node of the span, broken by the pinned-spans code. * PROBLEM: dahdi-linux pinned-spans should work with existing dahdi-tools specifically the dahdi_registration tool. * As a result, we should still be able to control dahdi registration order. However, registration is now in complete devices and not spans * Restored dahdi_autoreg=[0/1] xpp module parameter: - It now refers to complete astribanks and not individual spans * The xpp module sysfs "span" attribute: - Implemented write method (for dahdi_registration tool) - The first write of [1/0] to this attribute, registers/unregisters the complete astribank - Further writes are ignored (with DBG messages) * Also, implemented new xbus_is_registered() function * Once the new dahdi-tools are merged, we should turn deprecation messages from DBG() to NOTICE() Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10334 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-02xpp: Adaptations for E-Main-3Tzafrir Cohen
* An xbus transport now have a "model_string" member * The xpp_usb driver fills this with "usb:<idVendor>/<idProduct>/<bcdDevice>" * It is passed via environment to the "init_card_<type>_<protocol>" scripts * The FXS script uses this to condition two registers according to the power supply model. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10300 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26dahdi: Register devices instead of individual spans.Tzafrir Cohen
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 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. This generalizes similar concepts that were previously xpp specific. The conversion of the xpp code was almost entirely done by Oron and Tzafrir. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10273 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20xpp: make quirk bit flags unsignedTzafrir Cohen
This avoids a nag about a meaningless single-bit signed int. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10054 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-04xpp: add FXO HWEC quirks handlingTzafrir Cohen
In some cases the hardware echo canceller cannot be used. Mostly related to an FXO module. * FXO module if the first module is BRI or PRI * FXS module if the Astribank has another FXO, no PRI/BRI, and is a sync slave. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10019 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28xpd_echo: XPP Octasic echo canceler moduleTzafrir Cohen
* xpd_echo (card_echo.c) - a module to handle an Astribank hardware echo canceller module. * All other XPDs are now of type 'telephony_device'. Only a telephony device XPD provides a span to register. * The EC module will typically show up as XPD-40 and will always show up as Unregistered in 'dahdi_hardware -v' Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9993 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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
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-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-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-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
2009-05-19xpp: fix the Astribank state machineTzafrir Cohen
This generally is a case that would not happen in the wild, though. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6641 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-03-01New XPP code: xpp rev 6795:Tzafrir Cohen
* Fix cases where the command_queue overflowed during initialization. - Also add a 'command_queue_length' parameter to xpp.ko * More migrations to sysfs: - Add a 'transport' attribute to our astribank devices which points to the usb device we use. E.g: /sys/bus/astribanks/devices/xbus-00/transport is symlinked to ../../../../../../devices/pci0000:00/0000:00:10.4/usb5/5-4 - Move /proc/xpp/XBUS-??/XPD-??/span to /sys/bus/xpds/devices/??:?:?/span - Migrate from /proc/xpp/sync to: /sys/bus/astribanks/drivers/xppdrv/sync - New 'offhook' attribute in: /sys/bus/xpds/devices/??:?:?/offhook * PRI: change the "timing" priority to match the convention used by other PRI cards -- I.e: lower numbers (not 0) have higher priority. * FXO: - Power denial: create two module parameters instead of hard-coded constants (power_denial_safezone, power_denial_minlen). For sites that get non-standard power-denial signals from central office on offhook. - Don't hangup on power-denial, just notify Dahdi and wait for - Fix caller-id detection for the case central office sends it before first ring without any indication before. Asterisk's desicion. * USB_FW.hex: - Fixes cases where firmware loading would fail. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6046 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-18xpp.r6616: More sysfs migration, FXO enhancements, BRI fixesTzafrir Cohen
* Fix cases where the command_queue overflowed during initialization. * More migrations to sysfs: - Add a 'transport' attribute to our astribank devices which points to the usb device we use. E.g: /sys/bus/astribanks/devices/xbus-00/transport is symlinked to ../../../../../../devices/pci0000:00/0000:00:10.4/usb5/5-4 - Move /proc/xpp/XBUS-??/XPD-??/span to /sys/bus/xpds/devices/??:?:?/span - Migrate from /proc/xpp/sync to: /sys/bus/astribanks/drivers/xppdrv/sync * PRI: change the "timing" priority to match the convention used by other PRI cards -- I.e: lower numbers (not 0) have higher priority. * FXO: - Power denial: create two module parameters instead of hard-coded constants (power_denial_safezone, power_denial_minlen). For sites that get non-standard power-denial signals from central office on offhook. - Don't hangup on power-denial, just notify Dahdi and wait for - Fix caller-id detection for the case central office sends it before first ring without any indication before. Asterisk's desicion. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5663 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-12-11Add a separate case for hotplug of kernels <= 2.6.9 .Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5498 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-12-11A bit less maigc with OLD_HOTPLUG_SUPPORTTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5483 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-27xpp: remove an unused manual reference count field.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5132 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-27Fix xpp compile problems on kernel < 2.6.16Tzafrir Cohen
Support for kernels that use the older hotplug support rather than the newer uevent. Fixes the xpp issue from #13427. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5130 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-16xpp: start migration from procfs to sysfs.Tzafrir Cohen
* Sysfs representation for XPDs: /sys/bus/xpds/devices/<bus>:<unit>:<subunit> * Astribanks sysfs directories now include the XPDs as subdirectories: e.g. /sys/bus/astribanks/devices/xbus-00/00:3:0 * procfs control interface deprecated: conditioned by OLD_PROC (defaults to off). Control functionality moved to sysfs: * xbus attributes: cls connector label status timing waitfor_xpds xbus_state * XPDs can have driver-specific attributes. Common attriubtes: blink chipregs span * PRI-specific attributes: pri_clocking pri_dchan pri_cas pri_alarms pri_layer1 pri_localloop pri_protocol * The Astribank attribute "xbus_state" is read/write. Reading it shows the current state of the Astribank. Writing "start" or "stop" allows a software equivalent of connect or disconnect respectively. * When an Astribank is ready it sends an "online" event. Whenever its not ready (e.g. at the time of disconnect) it sends an "offline" event. Use astribank_hook.sample to handle those. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5097 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21start copying kernel bitsKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4315 a0bf4364-ded3-4de4-8d8a-66a801d63aff