Commit Graph

19 Commits

Author SHA1 Message Date
Shaun Ruffell
ffcd08205c xpp: Convert struct timeval -> ktime_t.
`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>
2019-05-08 11:33:05 -05:00
Keith Morgan
40f4f86ffa Revert "Remove support for xpp drivers."
add them back.
This reverts commit a36d266254.
2018-10-04 17:51:54 +00:00
Keith Morgan
a36d266254 Remove support for xpp drivers. 2018-10-03 15:31:08 +00:00
Tzafrir Cohen
5b9f520e78 xpp: re-add setting xpd->subunits
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>
2017-04-19 15:51:34 +03:00
Oron Peled
fc1824fd3c Remove support for kernels < 2.6.18
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
2012-03-13 20:09:12 +00:00
Oron Peled
dbf3f017d9 xpp: style - clean many long lines (manually)
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@10430 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-11 19:56:35 +00:00
Oron Peled
a2a695c742 xpp: style - Run Lindent
* Here it is:
  KERNEL_STYLE="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
  TYPEDEFS='
	-T gfp_t
	-T __user
	-T u_char
	-T __u8
	-T byte
	-T bool
	-T charp
	-T xusb_t
	-T xbus_t
	-T xpd_t
	-T xproto_table_t
	-T xproto_entry_t
	-T xframe_t
	-T xpacket_t
	-T reg_cmd_t
	'

  indent $TYPEDEFS $KERNEL_STYLE \
	--ignore-newlines	\
	--indent-label0	\
	--no-space-after-function-call-names	\
	"$@"

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@10428 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-11 15:22:46 +00:00
Oron Peled
97ad9f8d03 xpp: style - convert typedef of byte to __u8
* Applied via:
  perl -pi \
	-e '/"/ and next;' \
	-e '/^\s*\*/ and next;' \
	-e '/\/\*.*byte/ and next;' \
	-e '/typedef.*byte/ and next;' \
	-e 's/\bbyte\b/__u8/g' "$@"

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@10427 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-11 15:21:54 +00:00
Oron Peled
f84d579847 xpp: style - add space after comma
* Applied via:
  sed -i -e '/"/!s/,\([^ \t]\)/, \1/g' "$@"

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@10426 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-11 15:21:13 +00:00
Tzafrir Cohen
b6f3466607 xpp: Allow up to 128 Astribanks on a system
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-12-21 18:10:44 +00:00
Oron Peled
1a79cb4fdc xpp: restore backward compat dahdi_registration
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-10 16:56:29 +00:00
Tzafrir Cohen
c7228589a9 xpp: Adaptations for E-Main-3
* 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-11-02 14:08:12 +00:00
Shaun Ruffell
935c9ba50a dahdi: Register devices instead of individual spans.
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-10-26 18:58:14 +00:00
Tzafrir Cohen
6c2233c894 xpp: make quirk bit flags unsigned
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-20 16:49:31 +00:00
Oron Peled
d7e723ae8a xpp: add FXO HWEC quirks handling
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-07-04 14:04:33 +00:00
Oron Peled
15c12a08f8 xpd_echo: XPP Octasic echo canceler module
* 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-06-28 18:23:00 +00:00
Tzafrir Cohen
155cb5a0b1 xpp: Remove obsolete XPP_DEBUGFS code
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-23 13:38:16 +00:00
Tzafrir Cohen
bbb34d7f29 xpp: Remove obsolete and unused OLD_PROC code
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-23 13:37:40 +00:00
Shaun Ruffell
bf3fe05dfb wct4xxp: Moving the transmit short detection behind debug module param.
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
2010-08-27 21:59:27 +00:00