`struct timeval` has been removed from the kernel interface in 5.0 as
part of fixing the 2038 problem. ktime_t is the preferred kernel time
interface now.
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
The number of subunits per XPD (which is not trivial in BRI) has been
accidentally left out in a previous commit.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This patch removes support for kernel versions < 2.6.18, as those are
not actively supported in any major Linux distribution (except RHEL4,
which is in the "extended" support level of the product life cycle).
This removes much of the more #ifdef-rich parts of the code.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: 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@10472 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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
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
* 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
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
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
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
* 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
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
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
This needs some more testing before it's on by default. If the card is
otherwise functioning, these messages may be confusing to the user. If
the card is not functioning, the driver can be reloaded with debug to
check for this condition.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9205 a0bf4364-ded3-4de4-8d8a-66a801d63aff