Normally you can see RBS bit states in dahdi_tool, but you might also
want them logged to dmesg for troubleshooting.
(issue #18025)
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9399 a0bf4364-ded3-4de4-8d8a-66a801d63aff
The voicebus library by default configures the PCI interface to poll the
descriptor ring for available buffers. There are some platforms like
the Intel SG3420P motherboard where this does not appear to be
sufficient. Writing to the transmit demand poll register resolves this
problem on these troublesome platforms. DAHDI-700 DAHDI-702.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9397 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This module parameter will allow patgen/pattest to be used only on FXO
ports. *ALL* FXO ports will be placed in digital loopback mode when
set.
The current intent is for this to be removed as an optional module
parameter when there is a channel by channel representation in sysfs.
Otherwise, a new IOCTL would have to be defined and a tool written in
order to support this. DAHDI-696.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9391 a0bf4364-ded3-4de4-8d8a-66a801d63aff
If we know that an open file is associated with a channel (pseudo or
real) we can just update the file->f_ops pointer so that we can short
circuit some of the checks in read/write/poll. Trades sizeof(file_operations)
bytes for less function call overhead in the "hot" path.
On a 2.4 GHz Xeon, saves around 150 ns on each read / write.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9386 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Since we have the pseudo channels on their own list, we don't need to
step through the chans array when we just want to find the pseudo
channels. Likewise, all the real channels will have be on a span. Also
removes references to the global chans array in process_masterspan.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9384 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Since pseudo channels are without spans and we would like to use the
span list to enumerate through all the channels, keeping the psuedo
channels on their own list is required. I believe this is a more
natural choice than making a dummy spans for pseudos since pseudo
channels should *really* just be an implementation detail that the user
shouldn't care about.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9383 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This change also involves setting the DAHDI_FLAGBIT_CLOSE bit on the
channel before calling the 'close' callback in span ops. It appears
that only the dynamic spans may delete the channels on close, but that
code path doesn't check the DAHDI_FLAGBIT_CLOSE bit anyway.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9373 a0bf4364-ded3-4de4-8d8a-66a801d63aff
If someone was still using this...feel free to add it back in with a
comment about why it needs to be in the mainline. It looked better to
remove it than edit it to make sure it worked.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9370 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This ioctl is called either via the "/dev/dahdi/channel" file or via a
/dev/dahdi/channo file. In either case, either the minor number of the
device file will match up with a channel, or the "private_data" member
on the channel will be set, so the unit is redundant.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9369 a0bf4364-ded3-4de4-8d8a-66a801d63aff
I believe this makes it a little more clear what is happening. Also could
provide a potential speedup if the span doesn't need to be constantly
dereferenced (although an optimizer might make this moot). Regardless, this
change doesn't hurt.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9362 a0bf4364-ded3-4de4-8d8a-66a801d63aff
In __dahdi_process_getaudio_chunk and __dahdi_process_putaudio_chunk we
can streamline the operation slightly by saving a constant pointer to
the conference channel instead of constantly dereferencing the master
channel and indexing into the chan array.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9361 a0bf4364-ded3-4de4-8d8a-66a801d63aff
It is still used at span registration / unregistration to assign the span
number, and when iterating through all spans. Otherwise, moves the code base a
step closer to removal of the 'spans' array.
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9355 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Enable DAHDI to detect if an operation on a file handle refers to a
channel that may have been unregistered. This can occur, for example,
when a board driver is hot-swapped out in a live system.
This patch ensures that file->private_data is always properly set for
any open channel, and it's set back to NULL when a channel is
unregistered. This way file->private_data can be used to check whether
it's valid to perform an operation on the channel. (NOTE: There is
still a race condition here if the driver was unbound on one processor
during the window of time between when file->private_data was checked
and the system call finishes).
Also, since DAHDI should only return -ENODEV on read or write when there
was a surprise device removal on a running system this sleep can prevent
the system from becoming unresponsive if the userspace application does
not check for the -ENODEV error and constantly tries to call read with
elevated privileges.
(issue #17669)
Reported by: tzafrir
Tested by: sruffell
Review: https://reviewboard.asterisk.org/r/905/
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9353 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Most likely some stale debugging code that slipped in and is now gone.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9350 a0bf4364-ded3-4de4-8d8a-66a801d63aff
These members are no longer used in the driver and are now gone.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9348 a0bf4364-ded3-4de4-8d8a-66a801d63aff
It is possible to softlock if the board stops delivering interrupts in
the middle of a reset.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9332 a0bf4364-ded3-4de4-8d8a-66a801d63aff
I have yet to personally come across a system where this actually
changes the observable behavior, but it certainly seems like the sane
thing to do and I would rather not let this float around as a patch when
I can just merge it in.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9326 a0bf4364-ded3-4de4-8d8a-66a801d63aff
These three bits are already set by 'pci_enable_device' and
'pci_set_master' calls.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9325 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Makes it a little more clear what the '0' parameter represents.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9324 a0bf4364-ded3-4de4-8d8a-66a801d63aff
These functions were only defined if BUF_MUNGE was defined, but even if
that symbol is defined there is not anyplace in the driver where these
functions were then called. This has been in the code since rev 87 so
this is most likely stale debugging code.
Feel free to revert if this is actually used somewhere that is not
apparent.
Here is where the functions were originally added to the drivers:
http://svnview.digium.com/svn/zaptel?view=revision&revision=87
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9322 a0bf4364-ded3-4de4-8d8a-66a801d63aff
These label parameters were not used in the functions. They are most
likely some debug code that was left over.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9321 a0bf4364-ded3-4de4-8d8a-66a801d63aff
'open' and 'close' were already empty. 't1xxp_shutdown' only cleared
DAHDI_FLAGBIT_RUNNING which is already done in dahdi-base.c after calling
shutdown.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9318 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Upon shutdown, both drivers would attempt to power down external
interfaces, but never attempted to bring them back up when the span was
restarted. Removing that code allows the driver to work properly until
a better solution can be found.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9316 a0bf4364-ded3-4de4-8d8a-66a801d63aff
dahdi_tool was incorrectly reporting all spans to be in local timing
mode. This is because the driver tracks which span it's timing syncs to,
within the card local struct "wc". We have to manually go through and
copy timing updates to the span local structs because this is what
dahdi_tool actually reads.
dahdi-526
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9312 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Put the "Master changed to xxx/x/x" message behind a debug flag. It's an
implementation specific detail and has caused confusion with customers.
DAHDI-692
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9299 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Kernel interface for network devices changed. This is the patch from issue
plus a few trivial checkpatch.pl formatting changes (minus the >80 column
warnings).
(closes issue #17857)
Reported by: msink
Patches:
dahdi_net-v2.patch uploaded by msink (license 1103)
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9247 a0bf4364-ded3-4de4-8d8a-66a801d63aff
There are not any existing users of the interface (and it would always
return -ENOSYS to the caller anyway).
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9246 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Primarily to add a space between 'use' and 'the' in the alawoverride
description.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9245 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