summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-06-19 18:13:11 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-06-19 18:13:11 +0000
commit74856ecf5237acc6f5ca08ce0cefb354316084be (patch)
treeec81fa4dc155bf0aac74e631d51d558f8e0b74f7
parent9d886a8e34490fabc3a1e3a0ebba5f8a43a6fd49 (diff)
Yet another zaptel->dahdi rename. XPP file names this time.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4418 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/Kbuild2
-rw-r--r--drivers/dahdi/xpp/README.Astribank206
-rw-r--r--drivers/dahdi/xpp/card_bri.c36
-rw-r--r--drivers/dahdi/xpp/card_fxo.c36
-rw-r--r--drivers/dahdi/xpp/card_fxs.c24
-rw-r--r--drivers/dahdi/xpp/card_global.c6
-rw-r--r--drivers/dahdi/xpp/card_pri.c42
-rw-r--r--drivers/dahdi/xpp/dahdi_debug.c (renamed from drivers/dahdi/xpp/zap_debug.c)2
-rw-r--r--drivers/dahdi/xpp/dahdi_debug.h (renamed from drivers/dahdi/xpp/zap_debug.h)10
-rw-r--r--drivers/dahdi/xpp/mmapdrv.c4
-rw-r--r--drivers/dahdi/xpp/xbus-core.c4
-rw-r--r--drivers/dahdi/xpp/xbus-pcm.c96
-rw-r--r--drivers/dahdi/xpp/xbus-pcm.h10
-rw-r--r--drivers/dahdi/xpp/xbus-sysfs.c4
-rw-r--r--drivers/dahdi/xpp/xframe_queue.c2
-rw-r--r--drivers/dahdi/xpp/xpd.h4
-rw-r--r--drivers/dahdi/xpp/xpp.conf2
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c (renamed from drivers/dahdi/xpp/xpp_zap.c)84
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.h (renamed from drivers/dahdi/xpp/xpp_zap.h)6
-rw-r--r--drivers/dahdi/xpp/xpp_usb.c4
-rw-r--r--drivers/dahdi/xpp/xproto.c8
-rw-r--r--drivers/dahdi/xpp/xproto.h4
22 files changed, 288 insertions, 308 deletions
diff --git a/drivers/dahdi/xpp/Kbuild b/drivers/dahdi/xpp/Kbuild
index 6d4db4c..52c095b 100644
--- a/drivers/dahdi/xpp/Kbuild
+++ b/drivers/dahdi/xpp/Kbuild
@@ -25,7 +25,7 @@ ifneq (,$(filter y m,$(CONFIG_BF537)))
obj-$(DAHDI_BUILD_ALL)$(CONFIG_XPP_MMAP) += xpp_mmap.o
endif
-xpp-objs += xbus-core.o xbus-sysfs.o xbus-pcm.o xframe_queue.o xpp_zap.o xproto.o card_global.o zap_debug.o
+xpp-objs += xbus-core.o xbus-sysfs.o xbus-pcm.o xframe_queue.o xpp_dahdi.o xproto.o card_global.o dahdi_debug.o
xpd_fxs-objs += card_fxs.o
xpd_fxo-objs += card_fxo.o
xpd_bri-objs += card_bri.o
diff --git a/drivers/dahdi/xpp/README.Astribank b/drivers/dahdi/xpp/README.Astribank
index af43eb1..0104dea 100644
--- a/drivers/dahdi/xpp/README.Astribank
+++ b/drivers/dahdi/xpp/README.Astribank
@@ -3,7 +3,7 @@ Xorcom Astribank Documentation
Xorcom Team <support@xorcom.com>
$Revision$, $Date$
-This file documents the Zaptel drivers for the Xorcom Channel Bank.
+This file documents the Dahdi drivers for the Xorcom Channel Bank.
The drivers reside in a separate subdirectory, kernel/xpp/ .
It is generally a more technical document than the
@@ -15,34 +15,26 @@ http://zaptel.tzafrir.org.il/README.Astribank.html[]
Building and Installation
-------------------------
Building and installation is basically like the normal procedure of
-installing Zaptel with some additions.
+installing Dahdi with some additions.
Building drivers
~~~~~~~~~~~~~~~~
-Apart from the standard Zaptel build requirements, you also need libusb
+Apart from the standard Dahdi build requirements, you also need libusb
development headers to build the fpga_load firmware loader. This is
typically the package libusb-dev on Debian (and derivatives like Ubuntu)
or libusb-devel on RedHat (and derivatives like CentOS/Trixbox).
-On Zaptel 1.2 you will need to run the following extra step to build the
-user space utilities, apart from the standard 'make; make install':
-
- make -C xpp/utils install
-
-Though this should be done automatically on Zaptel >= 1.4.1 .
-
-
Sample Configurations
---------------------
We generally recommend to generate the configuration by using utility
-genzaptelconf or zapconf which are included with Zaptel. Nevertheless,
+genzaptelconf or zapconf which are included with Dahdi. Nevertheless,
the following can serve as reference configurations for a system where
Astribank devices are used.
-Zaptel Init Configuration File
+Dahdi Init Configuration File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The zaptel init.d script, genzaptelconf and the XPD init scripts uses the
+The dahdi init.d script, genzaptelconf and the XPD init scripts uses the
parameters located in file /etc/default/zaptel (on Debian) or
/etc/sysconfig/zaptel (on RedHats). There is a number of useful parameters
that may be defined there:
@@ -60,14 +52,14 @@ that may be defined there:
# Equivalent to the parameter opermode to the module wctdm: country-specific
# settings to the FXO lines. For a complete list of possible values, see
-# /usr/share/zaptel/init_fxo_mode .
+# /usr/share/dahdi/init_fxo_mode .
#opermode=FRANCE
# xpp_sync runs with the value of 'XPP_SYNC' as its parameter to set the
# synchronization source. The default is 'auto' that selects the best
-# Astribank. 'ZAPTEL' gets synchronization from the Zaptel sync master
+# Astribank. 'DAHDI' gets synchronization from the Dahdi sync master
# span. Or a specific XBUS number.
-#XPP_SYNC=ZAPTEL
+#XPP_SYNC=DAHDI
# Disables hot-plug firmware loading
#XPP_HOTPLUG_DISABLED=yes
@@ -87,7 +79,7 @@ that may be defined there:
# '
-----------------------------------------------------------
-/etc/zaptel.conf
+/etc/dahdi.conf
~~~~~~~~~~~~~~~~
Astribank 8
@@ -307,7 +299,7 @@ Sample dialplan (extensions.conf) for all the above:
-----------------------------------------------------------
[phones-zap]
-; 6001 will dial to channel 1, 6020, to Zaptel channel 20, etc.
+; 6001 will dial to channel 1, 6020, to Dahdi channel 20, etc.
exten => _6XXX,1,Dial(ZAP/${EXTEN:1})
; Useful for debugging trunks. Will potentially allow users to
; bypass context limitations.
@@ -335,7 +327,7 @@ include => astbank-test
[from-pstn]
; Calls from the PSTN enter here. Redirect calls to an IVR
; or a default extension in the s context here. In this case we
-; redirect calls to Zaptel channel 1:
+; redirect calls to Dahdi channel 1:
exten => s,1,Dial(Zap/1)
; Alternatively, the following will redirect you to the demo IVR
@@ -364,7 +356,7 @@ exten => s,n,Set(ZAP_CHAN=${CUT(ZAP_CHAN,/,2)})
; configuration below.
;exten => s,n,Set(INPUT_NUM=$[${ZAP_CHAN}-11)])
; The sample below just logs the signal.
-exten => s,n,NoOp(Got signal from Zaptel Channel ${ZAP_CHAN})
+exten => s,n,NoOp(Got signal from Dahdi Channel ${ZAP_CHAN})
; Alternatively:
;exten => s,n,System(run something)
@@ -385,14 +377,14 @@ lsusb Test
~~~~~~~~~~
Check USB level status. You can use one of the following utilities for it:
- zaptel_hardware -v
+ dahdi_hardware -v
or
lsusb | grep e4e4
- Look for the USB Product ID (the second number after e4e4).
- If you see *11x2* (e.g: 1152)- the FPGA firmware has been loaded.
Move on.
- zaptel_hardware will also show you some more details if the driver
+ dahdi_hardware will also show you some more details if the driver
is loaded while the lsusb will just list the device.
- If it shows something as product ID *11x0* - the USB firmware is not
loaded. Maybe you need to run fxload. Or maybe just unplug and plug again
@@ -401,46 +393,46 @@ Check USB level status. You can use one of the following utilities for it:
and not the FPGA firmware is loaded. If this is still the case after
a while - either the firmware loading has failed or you don't have
fpga_load. Make sure you have libusb-dev(el) installed when
- building Zaptel. After you have installed it, you may need to re-run
+ building Dahdi. After you have installed it, you may need to re-run
./configure .
- It should list all of your Astribank devices. If it doesn't (for
more than period of time needed for the initial firmware
loading) - Check that the Astribank is connected indeed.
-Zaptel Registration
+Dahdi Registration
~~~~~~~~~~~~~~~~~~~
-Check if the Astribank spans are registered in Zaptel
+Check if the Astribank spans are registered in Dahdi
- zt_registration
+ dahdi_registration
- This should give useful results after the drivers have identified
and your devices are initialized.
- It should list all Astribank XPDs. For each of them it should write
"on" or "off". If the registration status is "off", then it means that
- the span has not been registered in Zaptel and therefore can not be used
+ the span has not been registered in Dahdi and therefore can not be used
yet.
-- Registration is normally done as part of `/etc/init.d/zaptel start`.
+- Registration is normally done as part of `/etc/init.d/dahdi start`.
If you want to register the spans manually, then run command:
- `zt_registration on` .
+ `dahdi_registration on` .
- Disabling of the automatic Astribank spans registration give you full
- control on the order of Zaptel spans. See the module parameter
+ control on the order of Dahdi spans. See the module parameter
**zap_autoreg** for the further details.
-Zaptel Level Information
+Dahdi Level Information
~~~~~~~~~~~~~~~~~~~~~~~~
-You can get some information regarding Zaptel channels by running one of the
+You can get some information regarding Dahdi channels by running one of the
following commands:
- lszaptel
+ lsdahdi
or
- cat /proc/zaptel/*
+ cat /proc/dahdi/*
-- Those two are almost the same. The lszaptel produced more correctly sorted
+- Those two are almost the same. The lsdahdi produced more correctly sorted
output if you have more than 10 spans, and also make the output listing
looks a little bit nicer.
-- You can see if your Zaptel spans and channels were loaded, if
+- You can see if your Dahdi spans and channels were loaded, if
they were configured by ztcfg and if they are in use (typically by
Asterisk).
For example:
@@ -449,7 +441,7 @@ following commands:
42 FXS
- When a channel has been configured with *ztcfg* (that applies
- /etc/zaptel.conf), you will see an extra column for the signalling
+ /etc/dahdi.conf), you will see an extra column for the signalling
type of the channel. The same channel after it has been configured:
42 FXS FXOKS
@@ -511,7 +503,7 @@ it:
.Fix:
Move that process from that directory, or close the file it uses from
-under /proc/xpp and reload the zaptel / xpp drivers.
+under /proc/xpp and reload the dahdi / xpp drivers.
Bad Firmware Version
@@ -529,14 +521,14 @@ to a
The protocol version supported by the firmware will typically be the same
one as in the device initialization scripts installed to
-/usr/share/zaptel . Hence if this version installed
-`/usr/share/zaptel/init_card_3_29` it will probably include firmware of
+/usr/share/dahdi . Hence if this version installed
+`/usr/share/dahdi/init_card_3_29` it will probably include firmware of
protocol version 29.
.Fix:
Reset the firmware:
- /usr/share/zaptel/xpp_fxloader reset
+ /usr/share/dahdi/xpp_fxloader reset
Or disconnect the Astribank from the power and reocnnect. On some older
versions of the USB firmware resetting the firmware (or any operation of
@@ -565,7 +557,7 @@ BRI Layer 1 Down
With the BRI module only, and not in the middle of an active call, you
notice that suddenly the line goes down. The LED of the port stops
blinking, layer1 not listed as "active" in the bri_info file in
-/proc/xpp, and the span is in RED alarm in Zaptel.
+/proc/xpp, and the span is in RED alarm in Dahdi.
You may also see an error message such as:
@@ -609,7 +601,7 @@ many of our programs read configuration from there: either from
The problem is what to do if both of those exist. Selecting an arbitrary
one can lead to unexpected results. Likewise sourcing both of them.
Therefore we prefer to fail in a noisy and expected way. In the future
-we will probably me to reading configuration from a file under /etc/zaptel .
+we will probably me to reading configuration from a file under /etc/dahdi .
.Fix:
Remove one of those two. There should be no reason to have both on the
@@ -639,7 +631,7 @@ initilization to end.
.Fix:
Reset the firmware of the Astribank by either:
- /usr/share/zaptel/xpp_fxloader reset
+ /usr/share/dahdi/xpp_fxloader reset
or disconnecting it from the power and reconnecting it.
@@ -697,17 +689,17 @@ For each port there are two optional parameters that define its
behavior:
Each port in the PRI module can be configured either as E1 or T1. The
-port type defaults to E1 and can be changed to T1 in the Zaptel Init
+port type defaults to E1 and can be changed to T1 in the Dahdi Init
Configuration File.
The Astribank xpp driver uses that information for correct hardware
-initialization that is performed before the Zaptel span registration
+initialization that is performed before the Dahdi span registration
process takes place. Because of that, xpp driver can't use the
-information from file zaptel.conf.
+information from file dahdi.conf.
-Another parameter that also can be defined in the Zaptel Init
+Another parameter that also can be defined in the Dahdi Init
Configuration File is the function group TE (CPE) or NT (Network). This
-parameter is used for (a) building correct Zaptel & Asterisk
+parameter is used for (a) building correct Dahdi & Asterisk
configuration by genzaptelconf and (b) control RJ-45 sockets LEDs for
better visual port control:
@@ -724,7 +716,7 @@ NT::
To set them to a non-default value, you should use the variable
XPP_PRI_SETUP in the
-xref:_zaptel_init_configuration_file[Zaptel Init Configuration File]
+xref:dahdi_init_configuration_file[Dahdi Init Configuration File]
(/etc/sysconfig/zaptel on Redhats, /etc/default/zaptel on Debians).
This value is a whitespace-separated list of conditions. When a port is
initialized it checks those conditions and uses the first one that
@@ -790,18 +782,18 @@ Device Startup
~~~~~~~~~~~~~~
This section describes in great depth the initialization of the Xorcom
Astribank. Normally it would not be really needed, as the standard
-installation of Zaptel should put everything in place.
+installation of Dahdi should put everything in place.
Terminology
^^^^^^^^^^^
There are some technical terms that are used in this document and in the
-driver / zaptel.
+driver / dahdi.
span:
-Zaptel breaks the channels it knows about to logical units called
+Dahdi breaks the channels it knows about to logical units called
"spans". A port in a E1/T1/ISDN card is usually a span. An whole
analog card is also a "span". You can see the list of spans as the list
-of files under /proc/zaptel directory or in output of the zttool
+of files under /proc/dahdi directory or in output of the zttool
utility.
XBUS:
@@ -809,13 +801,13 @@ A funny way to call an Astribank device.
XPD:
Basically this is a logical unit of the Astribank. It will be registered in
-Zaptel as a single span. This can be either an analog (FXS or FXO)
+Dahdi as a single span. This can be either an analog (FXS or FXO)
module or a single port in case of a BRI module.
Loading Firmware
^^^^^^^^^^^^^^^^
-Normally this is done using the script /usr/share/zaptel/xpp_fxloader.
+Normally this is done using the script /usr/share/dahdi/xpp_fxloader.
If it works fine, you don't need to bother reading this section.
Once the firmware is loaded the USB Vendor ID and Product ID of the Astribank
became to be e4e4 11x2, and now the driver can pick it up.
@@ -825,8 +817,8 @@ is lsusb. The output of lsusb should show you if the device is connected
if its firmware is loaded.
The firmware files are named *.hex. They are presented in the text
-hexadecimal format The files are copied from xpp/utils to /usr/share/zaptel
-folder during the Zaptel installation.
+hexadecimal format The files are copied from xpp/utils to /usr/share/dahdi
+folder during the Dahdi installation.
The Astribank needs a firmware loaded into it. Without the firmware,
the device will appear in lsusb with Vendor ID e4e4 and Product ID 1130.
@@ -837,7 +829,7 @@ completed the Vendor ID is e4e4 and the Product ID is 1131.
You can use the following command in order to load the "USB" firmware
manually:
- fxload -t fx2 -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/USB_FW.hex
+ fxload -t fx2 -D /proc/bus/usb/MMM/NNN -I /usr/share/dahdi/USB_FW.hex
where,
@@ -858,12 +850,12 @@ disconnects and then connects again itself with USB Product ID 1131
In the second stage, the "FPGA" firmware is loaded.
The second-stage firmware loading is performed by using program fpga_load,
which is built in the directory xpp/utils and then copied to folder
-/usr/sbin during Zaptel installation.
+/usr/sbin during Dahdi installation.
The command syntax is similar to the syntax of fxload. You can use the
following command in order to load the FPGA firmware manually:
- fpga_load -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/FPGA_1151.hex
+ fpga_load -D /proc/bus/usb/MMM/NNN -I /usr/share/dahdi/FPGA_1151.hex
Please note, that NNN value differs from that that was used for the
fxload command due to the fact that device has "reconnected" itself
@@ -911,7 +903,7 @@ then the firmware should be loaded automatically.
In order to get udev to automatically load the firmware into the Astribank,
the configuration file xpp.rules should be copied into folder /etc/udev/rules.d
and the script xpp_fxloader should be copied into folder /etc/hotplug/usb/ .
-This is done by 'make -C xpp/utils install' during Zaptel installation.
+This is done by 'make -C xpp/utils install' during Dahdi installation.
File xpp.rules instructs the udevd daemon to run xpp_fxloader script with
the option "udev" and with the Astribank USB ID obtained from the
@@ -927,11 +919,11 @@ Newer versions of the USB firmware can now be reset using 'fpga_load -r'.
Also you can try the following:
- /usr/share/zaptel/xpp_fxloader reset
+ /usr/share/dahdi/xpp_fxloader reset
# if asterisk was running: you may need to stop/restart it now.
# if there are some "disconnected" spans in /proc/xpp/xbuses
# wait a while, until you see the 1152 IDs again, and then:
- /etc/init.d/zaptel start
+ /etc/init.d/dahdi start
# and start/restart asterisk.
@@ -953,7 +945,7 @@ Now to the ugly details:
The driver of the Astribank is composed of several modules:
-* xpp - the basic module, that communicates with Zaptel and provides
+* xpp - the basic module, that communicates with Dahdi and provides
some common services to other modules.
* xpd_fxs - the module for controlling FXS modules.
* xpd_fxo - the module for controlling FXO modules.
@@ -971,7 +963,7 @@ Vendor-ID/Product-ID of the device will be e4e4/1132 . The handler for that
combination is listed as the kernel module xpp_usb. Therefore, the system
runs 'modprobe xpp_usb' if that module is not already loaded.
-The module xpp_usb depends on the zaptel and xpp modules. Both of them
+The module xpp_usb depends on the dahdi and xpp modules. Both of them
are loaded before xpp_usb. As usual, parameters and rules form
/etc/modprobe.conf and/or from /etc/modprobe.d/* will be applied to
the module.
@@ -990,8 +982,8 @@ Device Initializations Scripts
The chips in the device need to be initialized. This requires sending a
bunch of values to certain registers in those chips. We decided that
hardwiring those values in the driver code is not a good idea.
-Before registering a XPD as a span in Zaptel, we run an initialization
-script: /usr/share/zaptel/init_card_N_MM (
+Before registering a XPD as a span in Dahdi, we run an initialization
+script: /usr/share/dahdi/init_card_N_MM (
where,
* N - is 3 for an FXS span and 4 for an FXO span, and 6 or 7 for BRI.
@@ -1004,75 +996,75 @@ If because of some reasons this fails (the script is not in the place, or the
file doesn't have the executable permissions), then you will get an error
message in the logs and the XPD will then be removed (you won't see directory
for that XPD under the corresponding /proc/xpp/XBUS-* directory) and will not
-be registered in Zaptel.
+be registered in Dahdi.
As the XPD is initialized, you'll see the green LEDs of the ports steadily
turn on and later off ("a train of lights"). This is a bit slower than the
-faster "blinking" when the XPDs register as Zaptel spans. The initialization
+faster "blinking" when the XPDs register as Dahdi spans. The initialization
of an FXS XPD may take a few seconds.
-Registering in Zaptel
+Registering in Dahdi
^^^^^^^^^^^^^^^^^^^^^
-The XPDs will not automatically register as Zaptel spans. This is
+The XPDs will not automatically register as Dahdi spans. This is
intended to allow you to set the registration order (and hence the order
-of Zaptel spans and channels) among multiple Astribank devices,
-or between an Astribank and a different Zaptel device.
+of Dahdi spans and channels) among multiple Astribank devices,
+or between an Astribank and a different Dahdi device.
-When the XPD registers to Zaptel, all the green LEDs will be lit for a
+When the XPD registers to Dahdi, all the green LEDs will be lit for a
short while.
-Spans are normally registered with the utility zt_registration. Simply
-running 'zt_registration' shows the available XPDs and whether or not
+Spans are normally registered with the utility dahdi_registration. Simply
+running 'dahdi_registration' shows the available XPDs and whether or not
they are registered. To register:
- zt_registration on
+ dahdi_registration on
For a system with several spans you'll see a "fast train of lights".
-If you have multiple Astribank devices, zt_registration will register
+If you have multiple Astribank devices, dahdi_registration will register
them by the order of the "connector" field. This means that as long as
the same Astribank is connected to the same port, the order of plugging
is not important..
-zt_registration checks if a span is registered or tries to register a
-span using the file /proc/xpp/XBUS-nn/XPD-mm/zt_registration . Reading
+dahdi_registration checks if a span is registered or tries to register a
+span using the file /proc/xpp/XBUS-nn/XPD-mm/dahdi_registration . Reading
from that file returns 0 if the span is unregisters or 1 if it is
registered. You can register a span or ask to unregister it by writing 1
(register) or 0 (unregister) to that file. Registration should
generally always succeed. Unregistration may fail if a span is in use.
-You may choose to register the XPDs in Zaptel automatically. This may
+You may choose to register the XPDs in Dahdi automatically. This may
make the startup sequence a bit simpler, but is generally not
recommended on a system with more than one Astribank or an Astribank and
-a different Zaptel device. This behavior may be defined by setting
+a different Dahdi device. This behavior may be defined by setting
parameter zap_autoreg in the modprobe configuration file (A file under
/etc/modprobe.d or /etc/modprobe.conf):
options xpp zap_autoreg=1
-Zaptel And Above
+Dahdi And Above
^^^^^^^^^^^^^^^^
-From here you get a standard Zaptel span. It still needs to be
+From here you get a standard Dahdi span. It still needs to be
configured by ztcfg and used by a program such as Asterisk like any
-other Zaptel device. In order for you to get a dial-tone in a phone
+other Dahdi device. In order for you to get a dial-tone in a phone
connected to the FXS port or a fully synchronized BRI port (layer 2
activated, as signalled by a more steady blink) you will actually need
-both the span configured by Zaptel and the channels configured in
+both the span configured by Dahdi and the channels configured in
Asterisk.
-You should generally refer to the general Zaptel documentation on how to
+You should generally refer to the general Dahdi documentation on how to
configure those levels. e.g, the README file in the top-level directory,
and
http://voip-info.org/wiki/view/Asterisk+config+zapata.conf[]
-Zaptel now includes a utility called genzaptelconf (written as a big
-ugly shell script) to configure Zaptel automatically as good as
+Dahdi now includes a utility called genzaptelconf (written as a big
+ugly shell script) to configure Dahdi automatically as good as
possible. For analog channels it works quite well (because, IMHO, the
-"configuration" level on Zaptel should be optional there - there are
+"configuration" level on Dahdi should be optional there - there are
already sane defaults). For digital spans - BRI and PRI , it may take
some tuning.
@@ -1088,7 +1080,7 @@ are many other debugging details that are exposed through the procfs
interface.
Also note that those details are subject to changes. Generally the
-recommended stable interface are the Zaptel-perl utilities from the
+recommended stable interface are the Dahdi-perl utilities from the
xpp/utils directory.
@@ -1114,15 +1106,15 @@ Possible values are:
<number>::
Make the Astribank XBUS-<number> the sync source for other Astribanks.
-ZAPTEL::
- Make the Astribanks synchronize with the Zaptel timing master span.
+DAHDI::
+ Make the Astribanks synchronize with the Dahdi timing master span.
You probably need this to get faxes from a non-Astribank adapter to an
Astribank.
Though you'll normally use xpp_sync(8) for that.
For each Astribank device there is folder /proc/xpp/XBUS-nn and for each device
-module (span in the terms of Zaptel) there is folder /proc/XBUS-nn/XPD-mm.
+module (span in the terms of Dahdi) there is folder /proc/XBUS-nn/XPD-mm.
/proc/xpp/XBUS-nn/waitfor_xpds
@@ -1136,23 +1128,23 @@ reading from this file returns immediately:
XPDS_READY: XBUS-00: 3/3
-/proc/xpp/XBUS-nn/XPD-mm/zt_registration
+/proc/xpp/XBUS-nn/XPD-mm/dahdi_registration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
is a read/write file. Reading from it gives 0 if the span is
unregistered, or the span number if it is registered.
-Writing to it allows manual registration / unregistration from Zaptel:
+Writing to it allows manual registration / unregistration from Dahdi:
writing 1 registers a span (if it wasn't already registered) and writing
0 attempts to unregister it (if it is registered. Span unregistration
will fail if some channels from the span are used (e.g: by Asterisk).
-A more convenient interface to this is the command zt_registration that
+A more convenient interface to this is the command dahdi_registration that
registers or unregisters all the spans at once with a predefined order,
and this is what you should normally use.
Alternatively you can use the parameter zap_autoreg to register spans
automatically. But this is only recommended on a system with a single
-Astribank and no other Zaptel device.
+Astribank and no other Dahdi device.
/proc/xpp/XBUS-nn/XPD-mm/summary
@@ -1216,7 +1208,7 @@ the contents of the channel that is supposed to be the D channel.
Writing to this file can be used to change the type of the device. The
device type can only be changed when the XPD is not registered as a
-Zaptel span. The value is a whitespace-separated list of values that can
+Dahdi span. The value is a whitespace-separated list of values that can
be of:
E1::
@@ -1248,7 +1240,7 @@ NOLOCALLOOP::
Normally those are set by the PRI initialization script . See the
definition of XPP_PRI_SETUP in
-xref:_zaptel_init_configuration_file[the sample Zaptel init
+xref:dahdi_init_configuration_file[the sample Dahdi init
configuration file] .
@@ -1264,7 +1256,7 @@ for each Astribank (such as its connector string).
On each time an Astribank is initialized or destroyed a udev event is
generated. The rules from our sample udev rules file (xpp/utils/xpp.rules)
-make that event run the script /usr/share/zaptel/astribank_hook with the
+make that event run the script /usr/share/dahdi/astribank_hook with the
parameter 'add' or 'remove', if such script exists. An example script
that just adjusts the Astribank sync settings is included in xpp/utils.
@@ -1296,13 +1288,13 @@ description line for the parameter in the "modinfo" command output.
zap_autoreg (xpp)::
Register spans automatically (1) or not (0). Default: 0.
Setting it simplifies operations with a single Astribank and no other
- Zaptel hardware. However if you have such systems, automatic
+ Dahdi hardware. However if you have such systems, automatic
registration can cause the order of spans to be unpredictable.
- The standard startup scripts use 'zt_registration on' instead of this.
+ The standard startup scripts use 'dahdi_registration on' instead of this.
initdir (xpp)::
This is the directory containing the initialization scripts.
- The default is /usr/share/zaptel .
+ The default is /usr/share/dahdi .
Setting this value could be useful if that location is inconvenient for you.
rx_tasklet (xpp)::
@@ -1322,7 +1314,7 @@ debug (all modules)::
* 4 - LEDS - Anything related to the LEDs status control. The driver
produces a lot of messages when the option is enabled.
* 8 - SYNC - Synchronization related messages.
- * 16 - SIGNAL - Zaptel signalling related messages.
+ * 16 - SIGNAL - Dahdi signalling related messages.
* 32 - PROC - Messages related to the procfs interface.
* 64 - REGS - Reading and writing to chip registers. Tends to flood
logs.
diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c
index b737b7b..150e754 100644
--- a/drivers/dahdi/xpp/card_bri.c
+++ b/drivers/dahdi/xpp/card_bri.c
@@ -28,9 +28,9 @@
#include <linux/delay.h>
#include "xpd.h"
#include "xproto.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "card_bri.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xbus-core.h"
static const char rcsid[] = "$Id$";
@@ -39,7 +39,7 @@ static const char rcsid[] = "$Id$";
#error CONFIG_ZAPATA_BRI_DCHANS is not defined
#endif
-static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before zap_debug.h */
+static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before dahdi_debug.h */
static DEF_PARM(uint, poll_interval, 500, 0644, "Poll channel state interval in milliseconds (0 - disable)");
static DEF_PARM_BOOL(nt_keepalive, 1, 0644, "Force BRI_NT to keep trying connection");
@@ -505,7 +505,7 @@ static int rx_dchan(xpd_t *xpd, reg_cmd_t *regcmd)
if(debug)
dump_dchan_packet(xpd, 0, dchan_buf, idx /* - 3 */); /* Print checksum? */
/*
- * Tell Zaptel that we received idx-1 bytes. They include the data and a 2-byte checksum.
+ * Tell Dahdi that we received idx-1 bytes. They include the data and a 2-byte checksum.
* The last byte (that we don't pass on) is 0 if the checksum is correct. If it were wrong,
* we would drop the packet in the "if(dchan_buf[idx-1])" above.
*/
@@ -655,7 +655,7 @@ static int BRI_card_remove(xbus_t *xbus, xpd_t *xpd)
return 0;
}
-static int BRI_card_zaptel_preregistration(xpd_t *xpd, bool on)
+static int BRI_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct BRI_priv_data *priv;
@@ -737,7 +737,7 @@ static int BRI_card_zaptel_preregistration(xpd_t *xpd, bool on)
return 0;
}
-static int BRI_card_zaptel_postregistration(xpd_t *xpd, bool on)
+static int BRI_card_dahdi_postregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct BRI_priv_data *priv;
@@ -956,7 +956,7 @@ static int BRI_card_close(xpd_t *xpd, lineno_t pos)
}
/*
- * Called only for 'span' keyword in /etc/zaptel.conf
+ * Called only for 'span' keyword in /etc/dahdi.conf
*/
static int bri_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
{
@@ -999,8 +999,8 @@ static int bri_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
/*
* Set signalling type (if appropriate)
- * Called from zaptel with spinlock held on chan. Must not call back
- * zaptel functions.
+ * Called from dahdi with spinlock held on chan. Must not call back
+ * dahdi functions.
*/
static int bri_chanconfig(struct dahdi_chan *chan, int sigtype)
{
@@ -1012,7 +1012,7 @@ static int bri_chanconfig(struct dahdi_chan *chan, int sigtype)
}
/*
- * Called only for 'span' keyword in /etc/zaptel.conf
+ * Called only for 'span' keyword in /etc/dahdi.conf
*/
static int bri_startup(struct dahdi_span *span)
{
@@ -1024,7 +1024,7 @@ static int bri_startup(struct dahdi_span *span)
priv = xpd->priv;
BUG_ON(!priv);
if(!TRANSPORT_RUNNING(xpd->xbus)) {
- XPD_DBG(GENERAL, xpd, "Startup called by zaptel. No Hardware. Ignored\n");
+ XPD_DBG(GENERAL, xpd, "Startup called by dahdi. No Hardware. Ignored\n");
return -ENODEV;
}
XPD_DBG(GENERAL, xpd, "STARTUP\n");
@@ -1034,10 +1034,10 @@ static int bri_startup(struct dahdi_span *span)
dchan = &span->chans[2];
span->flags |= DAHDI_FLAG_RUNNING;
/*
- * Zaptel (wrongly) assume that D-Channel need HDLC decoding
- * and during zaptel registration override our flags.
+ * Dahdi (wrongly) assume that D-Channel need HDLC decoding
+ * and during dahdi registration override our flags.
*
- * Don't Get Mad, Get Even: Now we override zaptel :-)
+ * Don't Get Mad, Get Even: Now we override dahdi :-)
*/
dchan->flags |= DAHDI_FLAG_BRIDCHAN;
dchan->flags &= ~DAHDI_FLAG_HDLC;
@@ -1046,7 +1046,7 @@ static int bri_startup(struct dahdi_span *span)
}
/*
- * Called only for 'span' keyword in /etc/zaptel.conf
+ * Called only for 'span' keyword in /etc/dahdi.conf
*/
static int bri_shutdown(struct dahdi_span *span)
{
@@ -1057,7 +1057,7 @@ static int bri_shutdown(struct dahdi_span *span)
priv = xpd->priv;
BUG_ON(!priv);
if(!TRANSPORT_RUNNING(xpd->xbus)) {
- XPD_DBG(GENERAL, xpd, "Shutdown called by zaptel. No Hardware. Ignored\n");
+ XPD_DBG(GENERAL, xpd, "Shutdown called by dahdi. No Hardware. Ignored\n");
return -ENODEV;
}
XPD_DBG(GENERAL, xpd, "SHUTDOWN\n");
@@ -1391,8 +1391,8 @@ static xproto_table_t PROTO_TABLE(BRI) = {
.card_new = BRI_card_new,
.card_init = BRI_card_init,
.card_remove = BRI_card_remove,
- .card_zaptel_preregistration = BRI_card_zaptel_preregistration,
- .card_zaptel_postregistration = BRI_card_zaptel_postregistration,
+ .card_dahdi_preregistration = BRI_card_dahdi_preregistration,
+ .card_dahdi_postregistration = BRI_card_dahdi_postregistration,
.card_hooksig = BRI_card_hooksig,
.card_tick = BRI_card_tick,
.card_pcm_fromspan = BRI_card_pcm_fromspan,
diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c
index 9ab2bbe..d7e1510 100644
--- a/drivers/dahdi/xpp/card_fxo.c
+++ b/drivers/dahdi/xpp/card_fxo.c
@@ -26,9 +26,9 @@
#include <linux/delay.h>
#include "xpd.h"
#include "xproto.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "card_fxo.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xbus-core.h"
static const char rcsid[] = "$Id$";
@@ -97,7 +97,7 @@ static int proc_fxo_info_read(char *page, char **start, off_t off, int count, in
#ifdef WITH_METERING
static int proc_xpd_metering_read(char *page, char **start, off_t off, int count, int *eof, void *data);
#endif
-static void zap_report_battery(xpd_t *xpd, lineno_t chan);
+static void dahdi_report_battery(xpd_t *xpd, lineno_t chan);
#define PROC_REGISTER_FNAME "slics"
#define PROC_FXO_INFO_FNAME "fxo_info"
@@ -261,7 +261,7 @@ static void handle_fxo_leds(xpd_t *xpd)
spin_unlock_irqrestore(&xpd->lock, flags);
}
-static void update_zap_ring(xpd_t *xpd, int pos, bool on)
+static void update_dahdi_ring(xpd_t *xpd, int pos, bool on)
{
dahdi_rxsig_t rxsig;
@@ -289,7 +289,7 @@ static void update_zap_ring(xpd_t *xpd, int pos, bool on)
dahdi_hooksig(&xpd->chans[pos], rxsig);
}
-static void mark_ring(xpd_t *xpd, lineno_t pos, bool on, bool update_zap)
+static void mark_ring(xpd_t *xpd, lineno_t pos, bool on, bool update_dahdi)
{
struct FXO_priv_data *priv;
@@ -305,15 +305,15 @@ static void mark_ring(xpd_t *xpd, lineno_t pos, bool on, bool update_zap)
LINE_DBG(SIGNAL, xpd, pos, "START\n");
xpd->ringing[pos] = 1;
MARK_BLINK(priv, pos, LED_GREEN, LED_BLINK_RING);
- if(update_zap)
- update_zap_ring(xpd, pos, on);
+ if(update_dahdi)
+ update_dahdi_ring(xpd, pos, on);
} else if(!on && xpd->ringing[pos]) {
LINE_DBG(SIGNAL, xpd, pos, "STOP\n");
xpd->ringing[pos] = 0;
if(IS_BLINKING(priv, pos, LED_GREEN))
MARK_BLINK(priv, pos, LED_GREEN, 0);
- if(update_zap)
- update_zap_ring(xpd, pos, on);
+ if(update_dahdi)
+ update_dahdi_ring(xpd, pos, on);
}
}
@@ -494,7 +494,7 @@ static int FXO_card_remove(xbus_t *xbus, xpd_t *xpd)
return 0;
}
-static int FXO_card_zaptel_preregistration(xpd_t *xpd, bool on)
+static int FXO_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct FXO_priv_data *priv;
@@ -527,7 +527,7 @@ static int FXO_card_zaptel_preregistration(xpd_t *xpd, bool on)
return 0;
}
-static int FXO_card_zaptel_postregistration(xpd_t *xpd, bool on)
+static int FXO_card_dahdi_postregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct FXO_priv_data *priv;
@@ -540,7 +540,7 @@ static int FXO_card_zaptel_postregistration(xpd_t *xpd, bool on)
BUG_ON(!priv);
XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF");
for_each_line(xpd, i) {
- zap_report_battery(xpd, i);
+ dahdi_report_battery(xpd, i);
MARK_OFF(priv, i, LED_GREEN);
msleep(2);
MARK_OFF(priv, i, LED_RED);
@@ -577,7 +577,7 @@ static int FXO_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, dahdi_txsig_t txs
return ret;
}
-static void zap_report_battery(xpd_t *xpd, lineno_t chan)
+static void dahdi_report_battery(xpd_t *xpd, lineno_t chan)
{
struct FXO_priv_data *priv;
@@ -856,7 +856,7 @@ static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno)
LINE_DBG(SIGNAL, xpd, portno, "BATTERY OFF voltage=%d\n", data_low);
priv->battery[portno] = BATTERY_OFF;
if(SPAN_REGISTERED(xpd))
- zap_report_battery(xpd, portno);
+ dahdi_report_battery(xpd, portno);
priv->polarity[portno] = POL_UNKNOWN; /* What's the polarity ? */
priv->power[portno] = POWER_UNKNOWN; /* What's the current ? */
/*
@@ -872,7 +872,7 @@ static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno)
LINE_DBG(SIGNAL, xpd, portno, "BATTERY ON voltage=%d\n", data_low);
priv->battery[portno] = BATTERY_ON;
if(SPAN_REGISTERED(xpd))
- zap_report_battery(xpd, portno);
+ dahdi_report_battery(xpd, portno);
}
}
#if 0
@@ -923,7 +923,7 @@ static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno)
LINE_DBG(SIGNAL, xpd, portno,
"Polarity changed to %s\n", polname);
/*
- * Inform zaptel/Asterisk:
+ * Inform dahdi/Asterisk:
* 1. Maybe used for hangup detection during offhook
* 2. In some countries used to report caller-id during onhook
* but before first ring.
@@ -1066,8 +1066,8 @@ static xproto_table_t PROTO_TABLE(FXO) = {
.card_new = FXO_card_new,
.card_init = FXO_card_init,
.card_remove = FXO_card_remove,
- .card_zaptel_preregistration = FXO_card_zaptel_preregistration,
- .card_zaptel_postregistration = FXO_card_zaptel_postregistration,
+ .card_dahdi_preregistration = FXO_card_dahdi_preregistration,
+ .card_dahdi_postregistration = FXO_card_dahdi_postregistration,
.card_hooksig = FXO_card_hooksig,
.card_tick = FXO_card_tick,
.card_pcm_fromspan = generic_card_pcm_fromspan,
diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c
index 055f89e..d17571b 100644
--- a/drivers/dahdi/xpp/card_fxs.c
+++ b/drivers/dahdi/xpp/card_fxs.c
@@ -26,14 +26,14 @@
#include <linux/delay.h>
#include "xpd.h"
#include "xproto.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "card_fxo.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xbus-core.h"
static const char rcsid[] = "$Id$";
-static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before zap_debug.h */
+static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before dahdi_debug.h */
static DEF_PARM_BOOL(reversepolarity, 0, 0644, "Reverse Line Polarity");
static DEF_PARM_BOOL(vmwineon, 0, 0644, "Indicate voicemail to a neon lamp");
static DEF_PARM_BOOL(dtmf_detection, 1, 0644, "Do DTMF detection in hardware");
@@ -130,8 +130,8 @@ struct FXS_priv_data {
xpp_line_t search_fsk_pattern;
xpp_line_t found_fsk_pattern;
xpp_line_t update_offhook_state;
- xpp_line_t want_dtmf_events; /* what zaptel want */
- xpp_line_t want_dtmf_mute; /* what zaptel want */
+ xpp_line_t want_dtmf_events; /* what dahdi want */
+ xpp_line_t want_dtmf_mute; /* what dahdi want */
int led_counter[NUM_LEDS][CHANNELS_PERXPD];
int ohttimer[CHANNELS_PERXPD];
#define OHT_TIMER 6000 /* How long after RING to retain OHT */
@@ -465,7 +465,7 @@ static int FXS_card_remove(xbus_t *xbus, xpd_t *xpd)
return 0;
}
-static int FXS_card_zaptel_preregistration(xpd_t *xpd, bool on)
+static int FXS_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct FXS_priv_data *priv;
@@ -506,7 +506,7 @@ static int FXS_card_zaptel_preregistration(xpd_t *xpd, bool on)
return 0;
}
-static int FXS_card_zaptel_postregistration(xpd_t *xpd, bool on)
+static int FXS_card_dahdi_postregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct FXS_priv_data *priv;
@@ -894,9 +894,9 @@ static int FXS_card_open(xpd_t *xpd, lineno_t chan)
else
LINE_DBG(SIGNAL, xpd, chan, "is onhook\n");
/*
- * Delegate updating zaptel to FXS_card_tick():
+ * Delegate updating dahdi to FXS_card_tick():
* The problem is that dahdi_hooksig() is spinlocking the channel and
- * we are called by zaptel with the spinlock already held on the
+ * we are called by dahdi with the spinlock already held on the
* same channel.
*/
BIT_SET(priv->update_offhook_state, chan);
@@ -1065,7 +1065,7 @@ static int FXS_card_tick(xbus_t *xbus, xpd_t *xpd)
if(!IS_SET(priv->update_offhook_state, i))
continue;
/*
- * Update zaptel with current state of line.
+ * Update dahdi with current state of line.
*/
if(IS_SET(xpd->offhook, i)) {
update_line_status(xpd, i, 1);
@@ -1312,8 +1312,8 @@ static xproto_table_t PROTO_TABLE(FXS) = {
.card_new = FXS_card_new,
.card_init = FXS_card_init,
.card_remove = FXS_card_remove,
- .card_zaptel_preregistration = FXS_card_zaptel_preregistration,
- .card_zaptel_postregistration = FXS_card_zaptel_postregistration,
+ .card_dahdi_preregistration = FXS_card_dahdi_preregistration,
+ .card_dahdi_postregistration = FXS_card_dahdi_postregistration,
.card_hooksig = FXS_card_hooksig,
.card_tick = FXS_card_tick,
.card_pcm_fromspan = generic_card_pcm_fromspan,
diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c
index 7a3d101..4bc577f 100644
--- a/drivers/dahdi/xpp/card_global.c
+++ b/drivers/dahdi/xpp/card_global.c
@@ -24,15 +24,15 @@
#include <linux/delay.h>
#include "xdefs.h"
#include "xpd.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "xproto.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xbus-core.h"
#include "parport_debug.h"
static const char rcsid[] = "$Id$";
-DEF_PARM(charp,initdir, "/usr/share/zaptel", 0644, "The directory of card initialization scripts");
+DEF_PARM(charp,initdir, "/usr/share/dahdi", 0644, "The directory of card initialization scripts");
#define CHIP_REGISTERS "chipregs"
diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c
index 8b920bf..e1670a0 100644
--- a/drivers/dahdi/xpp/card_pri.c
+++ b/drivers/dahdi/xpp/card_pri.c
@@ -28,15 +28,15 @@
#include <linux/delay.h>
#include "xpd.h"
#include "xproto.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "card_pri.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xpd.h"
#include "xbus-core.h"
static const char rcsid[] = "$Id$";
-static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before zap_debug.h */
+static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before dahdi_debug.h */
static DEF_PARM(uint, poll_interval, 500, 0644, "Poll channel state interval in milliseconds (0 - disable)");
#define PRI_LINES_BITMASK BITMASK(31)
@@ -474,7 +474,7 @@ static int set_pri_proto(xpd_t *xpd, enum pri_protocol set_proto)
return 0;
}
-static void zap_update_syncsrc(xpd_t *xpd)
+static void dahdi_update_syncsrc(xpd_t *xpd)
{
struct PRI_priv_data *priv;
xpd_t *subxpd;
@@ -562,18 +562,18 @@ static void set_clocking(xpd_t *xpd)
priv->clock_source = 0;
}
}
- zap_update_syncsrc(xpd);
+ dahdi_update_syncsrc(xpd);
put_xbus(xbus);
}
/*
- * Normally set by the timing parameter in zaptel.conf
+ * Normally set by the timing parameter in dahdi.conf
* If this is called by ztcfg, than it's too late to change
- * zaptel sync priority (we are already registered)
+ * dahdi sync priority (we are already registered)
* There are two workarounds to mitigate this problem:
* 1. So we set *our* sync master at least.
* 2. And we try to call it with a sane default from set_nt()
- * which is called before zaptel registration.
+ * which is called before dahdi registration.
*/
static int set_master_mode(const char *msg, xpd_t *xpd)
{
@@ -779,7 +779,7 @@ bad_lineconfig:
}
/*
- * Called only for 'span' keyword in /etc/zaptel.conf
+ * Called only for 'span' keyword in /etc/dahdi.conf
*/
static int pri_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
@@ -796,7 +796,7 @@ static int pri_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
return -EINVAL;
}
/*
- * FIXME: lc->name is unused by ztcfg and zaptel...
+ * FIXME: lc->name is unused by ztcfg and dahdi...
* We currently ignore it also.
*/
XPD_DBG(GENERAL, xpd, "[%s] lbo=%d lineconfig=0x%X sync=%d\n",
@@ -813,8 +813,8 @@ static int pri_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
/*
* Set signalling type (if appropriate)
- * Called from zaptel with spinlock held on chan. Must not call back
- * zaptel functions.
+ * Called from dahdi with spinlock held on chan. Must not call back
+ * dahdi functions.
*/
static int pri_chanconfig(struct dahdi_chan *chan, int sigtype)
{
@@ -898,7 +898,7 @@ static int PRI_card_remove(xbus_t *xbus, xpd_t *xpd)
return 0;
}
-static int PRI_card_zaptel_preregistration(xpd_t *xpd, bool on)
+static int PRI_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct PRI_priv_data *priv;
@@ -947,7 +947,7 @@ static int PRI_card_zaptel_preregistration(xpd_t *xpd, bool on)
return 0;
}
-static int PRI_card_zaptel_postregistration(xpd_t *xpd, bool on)
+static int PRI_card_dahdi_postregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct PRI_priv_data *priv;
@@ -957,7 +957,7 @@ static int PRI_card_zaptel_postregistration(xpd_t *xpd, bool on)
priv = xpd->priv;
BUG_ON(!xbus);
XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off");
- zap_update_syncsrc(xpd);
+ dahdi_update_syncsrc(xpd);
return(0);
}
@@ -1124,7 +1124,7 @@ static int PRI_card_close(xpd_t *xpd, lineno_t pos)
}
/*
- * Called only for 'span' keyword in /etc/zaptel.conf
+ * Called only for 'span' keyword in /etc/dahdi.conf
*/
static int pri_startup(struct dahdi_span *span)
{
@@ -1135,7 +1135,7 @@ static int pri_startup(struct dahdi_span *span)
priv = xpd->priv;
BUG_ON(!priv);
if(!TRANSPORT_RUNNING(xpd->xbus)) {
- XPD_DBG(GENERAL, xpd, "Startup called by zaptel. No Hardware. Ignored\n");
+ XPD_DBG(GENERAL, xpd, "Startup called by dahdi. No Hardware. Ignored\n");
return -ENODEV;
}
XPD_DBG(GENERAL, xpd, "STARTUP\n");
@@ -1145,7 +1145,7 @@ static int pri_startup(struct dahdi_span *span)
}
/*
- * Called only for 'span' keyword in /etc/zaptel.conf
+ * Called only for 'span' keyword in /etc/dahdi.conf
*/
static int pri_shutdown(struct dahdi_span *span)
{
@@ -1156,7 +1156,7 @@ static int pri_shutdown(struct dahdi_span *span)
priv = xpd->priv;
BUG_ON(!priv);
if(!TRANSPORT_RUNNING(xpd->xbus)) {
- XPD_DBG(GENERAL, xpd, "Shutdown called by zaptel. No Hardware. Ignored\n");
+ XPD_DBG(GENERAL, xpd, "Shutdown called by dahdi. No Hardware. Ignored\n");
return -ENODEV;
}
XPD_DBG(GENERAL, xpd, "SHUTDOWN\n");
@@ -1437,8 +1437,8 @@ static xproto_table_t PROTO_TABLE(PRI) = {
.card_new = PRI_card_new,
.card_init = PRI_card_init,
.card_remove = PRI_card_remove,
- .card_zaptel_preregistration = PRI_card_zaptel_preregistration,
- .card_zaptel_postregistration = PRI_card_zaptel_postregistration,
+ .card_dahdi_preregistration = PRI_card_dahdi_preregistration,
+ .card_dahdi_postregistration = PRI_card_dahdi_postregistration,
.card_hooksig = PRI_card_hooksig,
.card_tick = PRI_card_tick,
.card_pcm_fromspan = PRI_card_pcm_fromspan,
diff --git a/drivers/dahdi/xpp/zap_debug.c b/drivers/dahdi/xpp/dahdi_debug.c
index 08f684e..0e0261d 100644
--- a/drivers/dahdi/xpp/zap_debug.c
+++ b/drivers/dahdi/xpp/dahdi_debug.c
@@ -29,7 +29,7 @@
#include <linux/errno.h>
#include <linux/module.h>
#include <dahdi/kernel.h>
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xdefs.h"
static const char rcsid[] = "$Id$";
diff --git a/drivers/dahdi/xpp/zap_debug.h b/drivers/dahdi/xpp/dahdi_debug.h
index 2911828..753fa1a 100644
--- a/drivers/dahdi/xpp/zap_debug.h
+++ b/drivers/dahdi/xpp/dahdi_debug.h
@@ -1,5 +1,5 @@
-#ifndef ZAP_DEBUG_H
-#define ZAP_DEBUG_H
+#ifndef DAHDI_DEBUG_H
+#define DAHDI_DEBUG_H
/*
* Written by Oron Peled <oron@actcom.co.il>
* Copyright (C) 2004-2006, Xorcom
@@ -22,7 +22,7 @@
*
*/
-#include <dahdi/kernel.h> /* for zt_* defs */
+#include <dahdi/kernel.h> /* for dahdi_* defs */
/* Debugging Macros */
@@ -154,7 +154,7 @@ static inline char *hookstate2str(int hookstate)
return "Unknown hookstate";
}
-/* From zaptel.c */
+/* From dahdi-base.c */
static inline char *sig2str(int sig)
{
switch (sig) {
@@ -198,4 +198,4 @@ static inline char *alarmbit2str(int alarmbit)
void alarm2str(int alarm, char *buf, int buflen);
-#endif /* ZAP_DEBUG_H */
+#endif /* DAHDI_DEBUG_H */
diff --git a/drivers/dahdi/xpp/mmapdrv.c b/drivers/dahdi/xpp/mmapdrv.c
index d63ca12..c3ce708 100644
--- a/drivers/dahdi/xpp/mmapdrv.c
+++ b/drivers/dahdi/xpp/mmapdrv.c
@@ -13,7 +13,7 @@
#include <dahdi.h>
#include "mmapbus.h"
#include "xbus-core.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include "xdefs.h"
#include "xproto.h"
#include "xframe_queue.h"
@@ -526,7 +526,7 @@ static int __init xpp_mmap_init(void)
ret = -ENOMEM;
goto fail_cache;
}
- /* interface with Zaptel */
+ /* interface with Dahdi */
global_xbus = xbus_new(&xmmap_ops, XFRAME_DATASIZE, NULL);
if (!global_xbus) {
ret = -ENOMEM;
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index 26c31f5..21f9c45 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -36,13 +36,13 @@
#include <linux/device.h>
#include <linux/delay.h> /* for msleep() to debug */
#include "xpd.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "xbus-core.h"
#include "card_global.h"
#ifdef XPP_DEBUGFS
#include "xpp_log.h"
#endif
-#include "zap_debug.h"
+#include "dahdi_debug.h"
static const char rcsid[] = "$Id$";
diff --git a/drivers/dahdi/xpp/xbus-pcm.c b/drivers/dahdi/xpp/xbus-pcm.c
index 8f1b294..5f6ed8d 100644
--- a/drivers/dahdi/xpp/xbus-pcm.c
+++ b/drivers/dahdi/xpp/xbus-pcm.c
@@ -29,8 +29,8 @@
#include <linux/module.h>
#include "xbus-pcm.h"
#include "xbus-core.h"
-#include "xpp_zap.h"
-#include "zap_debug.h"
+#include "xpp_dahdi.h"
+#include "dahdi_debug.h"
#include "parport_debug.h"
static const char rcsid[] = "$Id$";
@@ -38,7 +38,7 @@ static const char rcsid[] = "$Id$";
extern int debug;
#ifdef XPP_EC_CHUNK
#include "supress/ec_xpp.h"
-DEF_PARM_BOOL(xpp_ec, 0, 0444, "Do we use our own (1) or Zaptel's (0) echo canceller");
+DEF_PARM_BOOL(xpp_ec, 0, 0444, "Do we use our own (1) or Dahdi's (0) echo canceller");
#endif
#ifdef OPTIMIZE_CHANMUTE
static DEF_PARM_BOOL(optimize_chanmute, 1, 0644, "Optimize by muting inactive channels");
@@ -53,14 +53,14 @@ static DEF_PARM_BOOL(disable_pll_sync, 0, 0644, "Disable automatic adjustment of
static xbus_t *syncer; /* current syncer */
static atomic_t xpp_tick_counter = ATOMIC_INIT(0);
-static struct xpp_ticker zaptel_ticker;
+static struct xpp_ticker dahdi_ticker;
/*
* The ref_ticker points to the current referece tick source.
- * I.e: one of our AB or zaptel_ticker
+ * I.e: one of our AB or dahdi_ticker
*/
static struct xpp_ticker *ref_ticker = NULL;
static spinlock_t ref_ticker_lock = SPIN_LOCK_UNLOCKED;
-static bool force_zaptel_sync = 0; /* from "/proc/xpp/sync" */
+static bool force_dahdi_sync = 0; /* from "/proc/xpp/sync" */
static xbus_t *global_ticker;
static struct xpp_ticker global_ticks_series;
@@ -76,8 +76,8 @@ static struct xpp_ticker global_ticks_series;
#define SYNC_ADJ_QUICK 1000
#define SYNC_ADJ_SLOW 10000
-#ifdef ZAPTEL_SYNC_TICK
-static unsigned int zaptel_tick_count = 0;
+#ifdef DAHDI_SYNC_TICK
+static unsigned int dahdi_tick_count = 0;
#endif
/*------------------------- SYNC Handling --------------------------*/
@@ -431,40 +431,40 @@ static void global_tick(void)
xpp_ticker_step(&global_ticks_series, &now);
}
-#ifdef ZAPTEL_SYNC_TICK
-int zaptel_sync_tick(struct dahdi_span *span, int is_master)
+#ifdef DAHDI_SYNC_TICK
+int dahdi_sync_tick(struct dahdi_span *span, int is_master)
{
xpd_t *xpd = span->pvt;
static int redundant_ticks; /* for extra spans */
struct timeval now;
- if(!force_zaptel_sync)
+ if(!force_dahdi_sync)
goto noop;
do_gettimeofday(&now);
BUG_ON(!xpd);
/*
- * Detect if any of our spans is zaptel sync master
+ * Detect if any of our spans is dahdi sync master
*/
if(is_master) {
static int rate_limit;
if(xpd->xbus != syncer && ((rate_limit % 1003) == 0)) {
XPD_ERR(xpd,
- "Zaptel master, but syncer=%s\n",
+ "Dahdi master, but syncer=%s\n",
xpd->xbus->busname);
}
if((rate_limit % 5003) == 0)
- XPD_NOTICE(xpd, "Zaptel master: ignore ZAPTEL sync\n");
+ XPD_NOTICE(xpd, "Dahdi master: ignore DAHDI sync\n");
rate_limit++;
goto noop;
}
- /* Now we know for sure someone else is zaptel sync master */
+ /* Now we know for sure someone else is dahdi sync master */
if(syncer) {
static int rate_limit;
if((rate_limit++ % 5003) == 0)
XBUS_DBG(SYNC, syncer,
- "Already a syncer, ignore ZAPTEL sync\n");
+ "Already a syncer, ignore DAHDI sync\n");
goto noop;
}
/* ignore duplicate calls from all our registered spans */
@@ -473,27 +473,27 @@ int zaptel_sync_tick(struct dahdi_span *span, int is_master)
static int rate_limit;
if((rate_limit++ % 1003) < 16)
- XPD_NOTICE(xpd, "boop (%d)\n", zaptel_tick_count);
+ XPD_NOTICE(xpd, "boop (%d)\n", dahdi_tick_count);
#endif
goto noop;
}
- xpp_ticker_step(&zaptel_ticker, &now);
- zaptel_tick_count++;
+ xpp_ticker_step(&dahdi_ticker, &now);
+ dahdi_tick_count++;
//flip_parport_bit(1);
return 0;
noop:
- return 0; /* No auto sync from zaptel */
+ return 0; /* No auto sync from dahdi */
}
#endif
/*
* called from elect_syncer()
* if new_syncer is NULL, than we move all to SYNC_MODE_PLL
- * for ZAPTEL sync.
+ * for DAHDI sync.
*/
static void update_sync_master(xbus_t *new_syncer)
{
- const char *msg = (force_zaptel_sync) ? "ZAPTEL" : "NO-SYNC";
+ const char *msg = (force_dahdi_sync) ? "DAHDI" : "NO-SYNC";
int i;
unsigned long flags;
@@ -511,12 +511,12 @@ static void update_sync_master(xbus_t *new_syncer)
if(new_syncer) {
XBUS_DBG(SYNC, new_syncer, "pcm_rx_counter=%d\n",
atomic_read(&new_syncer->pcm_rx_counter));
- force_zaptel_sync = 0;
+ force_dahdi_sync = 0;
ref_ticker = &new_syncer->ticker;
xbus_drift_clear(new_syncer); /* Clean new data */
xbus_request_sync(new_syncer, SYNC_MODE_AB);
- } else if(force_zaptel_sync) {
- ref_ticker = &zaptel_ticker;
+ } else if(force_dahdi_sync) {
+ ref_ticker = &dahdi_ticker;
} else {
ref_ticker = NULL;
}
@@ -652,7 +652,7 @@ void fill_beep(u_char *buf, int num, int duration)
#ifdef XPP_EC_CHUNK
/*
- * Taken from zaptel.c
+ * Taken from dahdi.c
*/
static inline void xpp_ec_chunk(struct dahdi_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk)
{
@@ -724,7 +724,7 @@ int xpp_echocan(struct dahdi_chan *chan, int len)
{
#ifdef XPP_EC_CHUNK
if(len == 0) { /* shut down */
- /* zaptel calls this also during channel initialization */
+ /* dahdi calls this also during channel initialization */
if(chan->ec) {
xpp_echo_can_free(chan->ec);
}
@@ -969,7 +969,7 @@ static void xbus_tick(xbus_t *xbus)
bool sent_sync_bit = 0;
/*
- * Update zaptel
+ * Update dahdi
*/
for(i = 0; i < MAX_XPDS; i++) {
xpd = xpd_of(xbus, i);
@@ -1089,7 +1089,7 @@ static void do_tick(xbus_t *xbus, const struct timeval *tv_received)
xbus_command_queue_tick(xbus);
if(global_ticker == xbus)
- global_tick(); /* called from here or zaptel_sync_tick() */
+ global_tick(); /* called from here or dahdi_sync_tick() */
spin_lock_irqsave(&ref_ticker_lock, flags);
xpp_drift_step(xbus, tv_received);
spin_unlock_irqrestore(&ref_ticker_lock, flags);
@@ -1131,27 +1131,27 @@ static int proc_sync_read(char *page, char **start, off_t off, int count, int *e
do_gettimeofday(&now);
len += sprintf(page + len, "# To modify sync source write into this file:\n");
- len += sprintf(page + len, "# ZAPTEL - Another zaptel device provide sync\n");
+ len += sprintf(page + len, "# DAHDI - Another dahdi device provide sync\n");
len += sprintf(page + len, "# SYNC=nn - XBUS-nn provide sync\n");
len += sprintf(page + len, "# QUERY=nn - Query XBUS-nn for sync information (DEBUG)\n");
if(!syncer) {
- if(force_zaptel_sync)
- len += sprintf(page + len, "ZAPTEL\n");
+ if(force_dahdi_sync)
+ len += sprintf(page + len, "DAHDI\n");
else
len += sprintf(page + len, "NO-SYNC\n");
} else
len += sprintf(page + len, "SYNC=%02d\n", syncer->num);
-#ifdef ZAPTEL_SYNC_TICK
- if(force_zaptel_sync) {
+#ifdef DAHDI_SYNC_TICK
+ if(force_dahdi_sync) {
len += sprintf(page + len,
- "Zaptel Reference Sync (%d registered spans):\n",
+ "Dahdi Reference Sync (%d registered spans):\n",
total_registered_spans());
- len += sprintf(page + len, "\tzaptel_tick: #%d\n", zaptel_tick_count);
- len += sprintf(page + len, "\ttick - zaptel_tick = %d\n",
- counter - zaptel_tick_count);
+ len += sprintf(page + len, "\tdahdi_tick: #%d\n", dahdi_tick_count);
+ len += sprintf(page + len, "\ttick - dahdi_tick = %d\n",
+ counter - dahdi_tick_count);
} else {
len += sprintf(page + len,
- "Zaptel Reference Sync Not activated\n");
+ "Dahdi Reference Sync Not activated\n");
}
#endif
usec = usec_diff(&now, &global_ticks_series.last_sample.tv);
@@ -1185,9 +1185,9 @@ static int proc_sync_write(struct file *file, const char __user *buffer, unsigne
if(copy_from_user(buf, buffer, count))
return -EFAULT;
buf[count] = '\0';
- if(strncmp("ZAPTEL", buf, 6) == 0) {
- DBG(SYNC, "ZAPTEL\n");
- force_zaptel_sync=1;
+ if(strncmp("DAHDI", buf, 6) == 0) {
+ DBG(SYNC, "DAHDI\n");
+ force_dahdi_sync=1;
update_sync_master(NULL);
} else if(sscanf(buf, "SYNC=%d", &xbus_num) == 1) {
DBG(SYNC, "SYNC=%d\n", xbus_num);
@@ -1254,13 +1254,13 @@ int xbus_pcm_init(struct proc_dir_entry *toplevel)
INFO("FEATURE: with XPP_EC_CHUNK\n");
else
INFO("FEATURE: without XPP_EC_CHUNK\n");
-#ifdef ZAPTEL_SYNC_TICK
- INFO("FEATURE: with sync_tick() from ZAPTEL\n");
+#ifdef DAHDI_SYNC_TICK
+ INFO("FEATURE: with sync_tick() from DAHDI\n");
#else
- INFO("FEATURE: without sync_tick() from ZAPTEL\n");
+ INFO("FEATURE: without sync_tick() from DAHDI\n");
#endif
xpp_ticker_init(&global_ticks_series);
- xpp_ticker_init(&zaptel_ticker);
+ xpp_ticker_init(&dahdi_ticker);
#ifdef CONFIG_PROC_FS
top = toplevel;
ent = create_proc_entry(PROC_SYNC, 0644, top);
@@ -1289,8 +1289,8 @@ EXPORT_SYMBOL(xbus_request_sync);
EXPORT_SYMBOL(got_new_syncer);
EXPORT_SYMBOL(elect_syncer);
EXPORT_SYMBOL(xpp_echocan);
-#ifdef ZAPTEL_SYNC_TICK
-EXPORT_SYMBOL(zaptel_sync_tick);
+#ifdef DAHDI_SYNC_TICK
+EXPORT_SYMBOL(dahdi_sync_tick);
#endif
EXPORT_SYMBOL(__pcm_recompute);
EXPORT_SYMBOL(pcm_recompute);
diff --git a/drivers/dahdi/xpp/xbus-pcm.h b/drivers/dahdi/xpp/xbus-pcm.h
index 9d4e771..3995bdc 100644
--- a/drivers/dahdi/xpp/xbus-pcm.h
+++ b/drivers/dahdi/xpp/xbus-pcm.h
@@ -53,9 +53,9 @@ struct xpp_timestamp {
* A ticker encapsulates the timing information of some
* abstract tick source. The following tickers are used:
* - Each xbus has an embedded ticker.
- * - There is one global zaptel_ticker to represent ticks
- * of external zaptel card (in case we want to sync
- * from other zaptel devices).
+ * - There is one global dahdi_ticker to represent ticks
+ * of external dahdi card (in case we want to sync
+ * from other dahdi devices).
*/
struct xpp_ticker { /* for rate calculation */
int count;
@@ -113,8 +113,8 @@ int xbus_command_queue_tick(xbus_t *xbus);
void xbus_reset_counters(xbus_t *xbus);
void elect_syncer(const char *msg);
int xpp_echocan(struct dahdi_chan *chan, int len);
-#ifdef ZAPTEL_SYNC_TICK
-int zaptel_sync_tick(struct dahdi_span *span, int is_master);
+#ifdef DAHDI_SYNC_TICK
+int dahdi_sync_tick(struct dahdi_span *span, int is_master);
#endif
#ifdef XPP_EC_CHUNK
diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c
index 87a58f1..c00ee64 100644
--- a/drivers/dahdi/xpp/xbus-sysfs.c
+++ b/drivers/dahdi/xpp/xbus-sysfs.c
@@ -36,12 +36,12 @@
#include <linux/device.h>
#include <linux/delay.h> /* for msleep() to debug */
#include "xpd.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "xbus-core.h"
#ifdef XPP_DEBUGFS
#include "xpp_log.h"
#endif
-#include "zap_debug.h"
+#include "dahdi_debug.h"
static const char rcsid[] = "$Id$";
diff --git a/drivers/dahdi/xpp/xframe_queue.c b/drivers/dahdi/xpp/xframe_queue.c
index 7d9c098..261740e 100644
--- a/drivers/dahdi/xpp/xframe_queue.c
+++ b/drivers/dahdi/xpp/xframe_queue.c
@@ -1,6 +1,6 @@
#include "xframe_queue.h"
#include "xbus-core.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
extern int debug;
diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h
index 506a935..e800e43 100644
--- a/drivers/dahdi/xpp/xpd.h
+++ b/drivers/dahdi/xpp/xpd.h
@@ -154,7 +154,7 @@ struct xpd {
xpp_line_t digital_outputs; /* 0 - no, 1 - yes */
xpp_line_t digital_inputs; /* 0 - no, 1 - yes */
xpp_line_t digital_signalling; /* BRI signalling channels */
- uint timing_priority; /* from 'span' directives in zapata.conf */
+ uint timing_priority; /* from 'span' directives in chan_dahdi.conf */
/* maintained by card drivers */
uint pcm_len; /* allocation length of PCM packet (dynamic) */
@@ -167,7 +167,7 @@ struct xpd {
xbus_t *xbus; /* The XBUS we are connected to */
spinlock_t lock;
- atomic_t dahdi_registered; /* Am I fully registered with zaptel */
+ atomic_t dahdi_registered; /* Am I fully registered with dahdi */
atomic_t open_counter; /* Number of open channels */
int flags;
diff --git a/drivers/dahdi/xpp/xpp.conf b/drivers/dahdi/xpp/xpp.conf
index 2629a3c..0bb3097 100644
--- a/drivers/dahdi/xpp/xpp.conf
+++ b/drivers/dahdi/xpp/xpp.conf
@@ -1,4 +1,4 @@
-# A local replacement for /etc/default/zaptel
+# A local replacement for /etc/dahdi/defaults
#INIT_FXS_SKIP_CALIB=1
DEBUG_INIT_FXS=0
diff --git a/drivers/dahdi/xpp/xpp_zap.c b/drivers/dahdi/xpp/xpp_dahdi.c
index 12ffeb8..8ee23f7 100644
--- a/drivers/dahdi/xpp/xpp_zap.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -41,7 +41,7 @@
#include <dahdi/kernel.h>
#include "xbus-core.h"
#include "xproto.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "parport_debug.h"
static const char rcsid[] = "$Id$";
@@ -58,11 +58,11 @@ struct proc_dir_entry *xpp_proc_toplevel = NULL;
#define DELAY_UNTIL_DIALTONE 3000
DEF_PARM(int, debug, 0, 0644, "Print DBG statements");
-static DEF_PARM_BOOL(zap_autoreg, 0, 0644, "Register spans automatically (1) or not (0)");
-static DEF_PARM_BOOL(prefmaster, 0, 0644, "Do we want to be zaptel preferred sync master");
+static DEF_PARM_BOOL(dahdi_autoreg, 0, 0644, "Register spans automatically (1) or not (0)");
+static DEF_PARM_BOOL(prefmaster, 0, 0644, "Do we want to be dahdi preferred sync master");
// DEF_ARRAY(int, pcmtx, 4, 0, "Forced PCM values to transmit");
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#ifdef DEBUG_SYNC_PARPORT
/*
@@ -107,8 +107,8 @@ int total_registered_spans(void)
return atomic_read(&num_registered_spans);
}
-static int zaptel_register_xpd(xpd_t *xpd);
-static int zaptel_unregister_xpd(xpd_t *xpd);
+static int dahdi_register_xpd(xpd_t *xpd);
+static int dahdi_unregister_xpd(xpd_t *xpd);
static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data);
static int proc_xpd_ztregister_read(char *page, char **start, off_t off, int count, int *eof, void *data);
static int proc_xpd_ztregister_write(struct file *file, const char __user *buffer, unsigned long count, void *data);
@@ -275,8 +275,8 @@ err:
void xpd_post_init(xpd_t *xpd)
{
XPD_DBG(DEVICES, xpd, "\n");
- if(zap_autoreg)
- zaptel_register_xpd(xpd);
+ if(dahdi_autoreg)
+ dahdi_register_xpd(xpd);
}
#ifdef CONFIG_PROC_FS
@@ -469,8 +469,8 @@ err:
return NULL;
}
-/* FIXME: this should be removed once digium patch their zaptel.h
- * I simply wish to avoid changing zaptel.h in the xpp patches.
+/* FIXME: this should be removed once digium patch their dahdi.h
+ * I simply wish to avoid changing dahdi.h in the xpp patches.
*/
#ifndef DAHDI_EVENT_REMOVED
#define DAHDI_EVENT_REMOVED (20)
@@ -507,7 +507,7 @@ void xpd_remove(xpd_t *xpd)
BUG_ON(!xpd);
xbus = xpd->xbus;
XPD_INFO(xpd, "Remove\n");
- zaptel_unregister_xpd(xpd);
+ dahdi_unregister_xpd(xpd);
CALL_XMETHOD(card_remove, xbus, xpd);
xpd_free(xpd);
}
@@ -607,9 +607,9 @@ static int proc_xpd_ztregister_write(struct file *file, const char __user *buffe
return -EINVAL;
XPD_DBG(GENERAL, xpd, "%s\n", (dahdi_reg) ? "register" : "unregister");
if(dahdi_reg)
- ret = zaptel_register_xpd(xpd);
+ ret = dahdi_register_xpd(xpd);
else
- ret = zaptel_unregister_xpd(xpd);
+ ret = dahdi_unregister_xpd(xpd);
return (ret < 0) ? ret : count;
}
@@ -664,12 +664,12 @@ static int proc_xpd_blink_write(struct file *file, const char __user *buffer, un
#define XPP_MAX_LEN 512
-/*------------------------- Zaptel Interfaces ----------------------*/
+/*------------------------- Dahdi Interfaces -----------------------*/
/*
- * Called from zaptel with spinlock held on chan. Must not call back
- * zaptel functions.
+ * Called from dahdi with spinlock held on chan. Must not call back
+ * dahdi functions.
*/
int xpp_open(struct dahdi_chan *chan)
{
@@ -828,7 +828,7 @@ int xpp_maint(struct dahdi_span *span, int cmd)
return ret;
}
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
/*
* If the watchdog detects no received data, it will call the
* watchdog routine
@@ -844,7 +844,7 @@ static int xpp_watchdog(struct dahdi_span *span, int cause)
#endif
/**
- * Unregister an xpd from zaptel and release related resources
+ * Unregister an xpd from dahdi and release related resources
* @xpd The xpd to be unregistered
* @returns 0 on success, errno otherwise
*
@@ -854,7 +854,7 @@ static int xpp_watchdog(struct dahdi_span *span, int cause)
* - User action through /proc
* - During xpd_remove()
*/
-static int zaptel_unregister_xpd(xpd_t *xpd)
+static int dahdi_unregister_xpd(xpd_t *xpd)
{
unsigned long flags;
@@ -875,16 +875,16 @@ static int zaptel_unregister_xpd(xpd_t *xpd)
mdelay(2); // FIXME: This is to give chance for transmit/receiveprep to finish.
spin_unlock_irqrestore(&xpd->lock, flags);
if(xpd->card_present)
- xpd->xops->card_zaptel_preregistration(xpd, 0);
+ xpd->xops->card_dahdi_preregistration(xpd, 0);
atomic_dec(&xpd->dahdi_registered);
atomic_dec(&num_registered_spans);
dahdi_unregister(&xpd->span);
if(xpd->card_present)
- xpd->xops->card_zaptel_postregistration(xpd, 0);
+ xpd->xops->card_dahdi_postregistration(xpd, 0);
return 0;
}
-static int zaptel_register_xpd(xpd_t *xpd)
+static int dahdi_register_xpd(xpd_t *xpd)
{
struct dahdi_span *span;
xbus_t *xbus;
@@ -925,7 +925,7 @@ static int zaptel_register_xpd(xpd_t *xpd)
* What a bummer...
*/
span->manufacturer = "Xorcom Inc."; /* OK, that's obvious */
- /* span->spantype = "...."; set in card_zaptel_preregistration() */
+ /* span->spantype = "...."; set in card_dahdi_preregistration() */
/*
* Yes, this basically duplicates information available
* from the description field. If some more is needed
@@ -952,34 +952,34 @@ static int zaptel_register_xpd(xpd_t *xpd)
*/
span->irq = 0;
#endif
-#ifdef ZAPTEL_SYNC_TICK
- span->sync_tick = zaptel_sync_tick;
+#ifdef DAHDI_SYNC_TICK
+ span->sync_tick = dahdi_sync_tick;
#endif
if (xpp_ec)
span->echocan = xpp_echocan;
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
span->watchdog = xpp_watchdog;
#endif
snprintf(xpd->span.desc, MAX_SPANDESC, "Xorcom XPD #%02d/%1d%1d: %s",
xbus->num, xpd->addr.unit, xpd->addr.subunit, xpd->type_name);
XPD_DBG(GENERAL, xpd, "Registering span '%s'\n", xpd->span.desc);
- xpd->xops->card_zaptel_preregistration(xpd, 1);
+ xpd->xops->card_dahdi_preregistration(xpd, 1);
if(dahdi_register(&xpd->span, prefmaster)) {
XPD_ERR(xpd, "Failed to dahdi_register span\n");
return -ENODEV;
}
atomic_inc(&num_registered_spans);
atomic_inc(&xpd->dahdi_registered);
- xpd->xops->card_zaptel_postregistration(xpd, 1);
+ xpd->xops->card_dahdi_postregistration(xpd, 1);
/*
- * Update zaptel about our state
+ * Update dahdi about our state
*/
#if 0
/*
* FIXME: since asterisk didn't open the channel yet, the report
* is discarded anyway. OTOH, we cannot report in xpp_open or
- * xpp_chanconfig since zaptel call them with a spinlock on the channel
+ * xpp_chanconfig since dahdi call them with a spinlock on the channel
* and dahdi_hooksig tries to acquire the same spinlock, resulting in
* double spinlock deadlock (we are lucky that RH/Fedora kernel are
* compiled with spinlock debugging).... tough.
@@ -988,7 +988,7 @@ static int zaptel_register_xpd(xpd_t *xpd)
struct dahdi_chan *chans = xpd->span.chans;
if(IS_SET(xpd->offhook, cn)) {
- LINE_NOTICE(xpd, cn, "Report OFFHOOK to zaptel\n");
+ LINE_NOTICE(xpd, cn, "Report OFFHOOK to dahdi\n");
dahdi_hooksig(&chans[cn], DAHDI_RXSIG_OFFHOOK);
}
}
@@ -996,18 +996,6 @@ static int zaptel_register_xpd(xpd_t *xpd)
return 0;
}
-/*------------------------- Proc debugging interface ---------------*/
-
-#ifdef CONFIG_PROC_FS
-
-#if 0
-static int xpp_zap_write_proc(struct file *file, const char __user *buffer, unsigned long count, void *data)
-{
-}
-#endif
-
-#endif
-
/*------------------------- Initialization -------------------------*/
static void do_cleanup(void)
@@ -1021,7 +1009,7 @@ static void do_cleanup(void)
#endif
}
-static int __init xpp_zap_init(void)
+static int __init xpp_dahdi_init(void)
{
int ret = 0;
@@ -1056,7 +1044,7 @@ err:
return ret;
}
-static void __exit xpp_zap_cleanup(void)
+static void __exit xpp_dahdi_cleanup(void)
{
xbus_pcm_shutdown();
xbus_core_shutdown();
@@ -1078,10 +1066,10 @@ EXPORT_SYMBOL(xpp_ioctl);
EXPORT_SYMBOL(xpp_maint);
EXPORT_SYMBOL(report_bad_ioctl);
-MODULE_DESCRIPTION("XPP Zaptel Driver");
+MODULE_DESCRIPTION("XPP Dahdi Driver");
MODULE_AUTHOR("Oron Peled <oron@actcom.co.il>");
MODULE_LICENSE("GPL");
MODULE_VERSION(XPP_VERSION);
-module_init(xpp_zap_init);
-module_exit(xpp_zap_cleanup);
+module_init(xpp_dahdi_init);
+module_exit(xpp_dahdi_cleanup);
diff --git a/drivers/dahdi/xpp/xpp_zap.h b/drivers/dahdi/xpp/xpp_dahdi.h
index c6585af..74a12c8 100644
--- a/drivers/dahdi/xpp/xpp_zap.h
+++ b/drivers/dahdi/xpp/xpp_dahdi.h
@@ -1,5 +1,5 @@
-#ifndef XPP_ZAP_H
-#define XPP_ZAP_H
+#ifndef XPP_DAHDI_H
+#define XPP_DAHDI_H
/*
* Written by Oron Peled <oron@actcom.co.il>
* Copyright (C) 2004-2006, Xorcom
@@ -50,4 +50,4 @@ extern struct proc_dir_entry *xpp_proc_toplevel;
#define SPAN_REGISTERED(xpd) atomic_read(&(xpd)->dahdi_registered)
-#endif /* XPP_ZAP_H */
+#endif /* XPP_DAHDI_H */
diff --git a/drivers/dahdi/xpp/xpp_usb.c b/drivers/dahdi/xpp/xpp_usb.c
index 2b633c6..a64a50c 100644
--- a/drivers/dahdi/xpp/xpp_usb.c
+++ b/drivers/dahdi/xpp/xpp_usb.c
@@ -45,12 +45,12 @@
static const char rcsid[] = "$Id$";
-static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before zap_debug.h */
+static DEF_PARM(int, debug, 0, 0644, "Print DBG statements"); /* must be before dahdi_debug.h */
static DEF_PARM(int, usb1, 0, 0644, "Allow using USB 1.1 interfaces");
static DEF_PARM(uint, tx_sluggish, 2000, 0644, "A sluggish transmit (usec)");
static DEF_PARM(uint, drop_pcm_after, 6, 0644, "Number of consecutive tx_sluggish to drop a PCM frame");
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#define XUSB_PRINTK(level, xusb, fmt, ...) \
diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c
index c3aa34e..72686e3 100644
--- a/drivers/dahdi/xpp/xproto.c
+++ b/drivers/dahdi/xpp/xproto.c
@@ -22,9 +22,9 @@
#include "xpd.h"
#include "xproto.h"
-#include "xpp_zap.h"
+#include "xpp_dahdi.h"
#include "xbus-core.h"
-#include "zap_debug.h"
+#include "dahdi_debug.h"
#include <linux/module.h>
#include <linux/delay.h>
@@ -437,8 +437,8 @@ int xproto_register(const xproto_table_t *proto_table)
CHECK_XOP(card_tick);
CHECK_XOP(card_pcm_fromspan);
CHECK_XOP(card_pcm_tospan);
- CHECK_XOP(card_zaptel_preregistration);
- CHECK_XOP(card_zaptel_postregistration);
+ CHECK_XOP(card_dahdi_preregistration);
+ CHECK_XOP(card_dahdi_postregistration);
CHECK_XOP(card_hooksig);
// CHECK_XOP(card_ioctl); // optional method -- call after testing
CHECK_XOP(card_register_reply);
diff --git a/drivers/dahdi/xpp/xproto.h b/drivers/dahdi/xpp/xproto.h
index 760b0a3..9a0726e 100644
--- a/drivers/dahdi/xpp/xproto.h
+++ b/drivers/dahdi/xpp/xproto.h
@@ -223,8 +223,8 @@ struct xops {
int (*card_tick)(xbus_t *xbus, xpd_t *xpd);
void (*card_pcm_fromspan)(xbus_t *xbus, xpd_t *xpd, xpp_line_t lines, xpacket_t *pack);
void (*card_pcm_tospan)(xbus_t *xbus, xpd_t *xpd, xpacket_t *pack);
- int (*card_zaptel_preregistration)(xpd_t *xpd, bool on);
- int (*card_zaptel_postregistration)(xpd_t *xpd, bool on);
+ int (*card_dahdi_preregistration)(xpd_t *xpd, bool on);
+ int (*card_dahdi_postregistration)(xpd_t *xpd, bool on);
int (*card_hooksig)(xbus_t *xbus, xpd_t *xpd, int pos, dahdi_txsig_t txsig);
int (*card_ioctl)(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg);
int (*card_open)(xpd_t *xpd, lineno_t pos);