summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-09-23wct4xxp: Add debug option to log detected RBS bit changes.Shaun Ruffell
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
2010-09-21wcte12xp, wctdm24xxp: Do not rely on polling main memory.Shaun Ruffell
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
2010-09-21dahdi: Generate include/dahdi/version.h when building in a git repository.Shaun Ruffell
If building within a git repository search the last log message for a 'git-svn-id'. If found, the commit has a corresponding svn revision number and we will use the SVN-xxx-rxxx revision form. Otherwise use the output of 'git describe --long --always --tags --dirty=M' as the version. Signed-off-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@9396 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-21dahdi: Fix comment ZapRAS -> DAHDIRAS.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9394 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-21dahdi: Make CONFIG_DAHDI_PPP off by default.Shaun Ruffell
Before CONFIG_DAHDI_PPP can be on by default, some more work needs to be done to ensure that the ppp_generic module is not always loaded and that all channels do not carry around all the PPP members unnecessarily. (issue #17990) Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kevin P. Fleming <kpfleming@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9392 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-21wctdm24xxp: Add optional FXO digital loopback if DEBUG is defined.Shaun Ruffell
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
2010-09-20dahdi: Channels can have their own file_operations structure.Shaun Ruffell
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
2010-09-20dahdi: Remove redundant 'gainalloc' member from struct dahdi_chan.Shaun Ruffell
I want to add some new members to dahdi_chan, but I don't want to increase the overall size any more than necessary. 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@9385 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Change iteration through pseudo/real chans in process_masterspan.Shaun Ruffell
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
2010-09-20dahdi: Keep psuedo channels on pseudo_chan_list.Shaun Ruffell
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
2010-09-20dahdi: Define psuedo channels as being without a span.Shaun Ruffell
Therefore we can use the fact that the span pointer on the channel is NULL to identify them. 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@9382 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Reduce 'chans' references in dahdi_ctl_ioctl.Shaun Ruffell
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@9381 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: 'user_data' is extraneous in dahdi_ctl_ioctl.Shaun Ruffell
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@9380 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unused unit from dahdi_common_ioctl.Shaun Ruffell
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@9379 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move DAHDI_SPANSTAT ioctl handlers into separate functions.Shaun Ruffell
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@9378 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unit parameter from dahdi_chanandpsuedo_ioctl.Shaun Ruffell
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@9377 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unit parameter to dahdi_prechan_ioctlShaun Ruffell
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@9376 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unit parameter from dahdi_chan_poll.Shaun Ruffell
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@9375 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unit parameter from dahdi_ioctl_[get|set]gains.Shaun Ruffell
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@9374 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove unit parameter from dahdi_specchan_release.Shaun Ruffell
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
2010-09-20dahdi: dahdi_specchan_open also does not need the unit parameter.Shaun Ruffell
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@9372 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: 'unit' -> 'chan->channo' in a CONFIG_DAHDI_DEBUG block.Shaun Ruffell
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@9371 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Remove what appears to be stale debug code in dahdi_chan_read/write.Shaun Ruffell
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
2010-09-20dahdi: Remove the unit parameter from dahdi_chan_ioctl.Shaun Ruffell
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
2010-09-20dahdi: Reduce chans array indexing in dahdi_chan_unreg.Shaun Ruffell
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@9368 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Modify "is_monitor_mode" to be usable by dahdi_chan_unreg.Shaun Ruffell
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@9367 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Reduce 'chans' dereferencing in dahdi_check_confShaun Ruffell
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@9366 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Issue warning if DAHDI_INDIRECT ioctl is used.Shaun Ruffell
DAHDI_INDIRECT is only used when setting up pciradio channels. dahdi_cfg no longer should need DAHDI_INDIRECT since revision 9352. 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@9365 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Use 'chan' convenience pointer in dahdi_receive.Shaun Ruffell
Simplifies the function and may increase performance due to decreased dereferencing of the span and channel 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@9364 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Use 'chan' convenience pointer in process_masterspan.Shaun Ruffell
Reduces the amount of indexing into the global channel 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@9363 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Use 'chan' convenience pointer in dahdi_transmit.Shaun Ruffell
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
2010-09-20dahdi: chans[ms->confna] -> conf_chan.Shaun Ruffell
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
2010-09-20dahdi: Remove unused parameter in three ioctl handlers.Shaun Ruffell
The 'int cmd' parameter is unused and unneeded in dahdi_ioctl_getgains, dahdi_ioctl_setgains, and dahdi_ioctl_chandiag. 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@9360 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move handlers for DAHDI_[GET|SET]_PARAMS into separate functions.Shaun Ruffell
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@9359 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move the conferencing ioctls into their own functions.Shaun Ruffell
DAHDI_GETCONF, DAHDI_SETCONF, DAHDI_CONFLINK, and DAHDI_CONFDIAG are all now in their own functions. 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@9358 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move DAHDI_CHANCONFIG ioctl into separate function.Shaun Ruffell
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@9357 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Move DAHDI_CHANDIAG ioctl into separate function.Shaun Ruffell
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@9356 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Refactor some of the access to the 'spans' array.Shaun Ruffell
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
2010-09-20dahdi: Embed the proc entries in struct dahdi_span.Shaun Ruffell
Part of preparations for replacing the array of spans with a list of spans. 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@9354 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20dahdi: Be more tolerant of surprise removal of channels.Shaun Ruffell
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
2010-09-20dahdi: Remove '#if 1' in dahdi_transmit.Shaun Ruffell
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
2010-09-20dahdi: Updating copyright date on MakefileShaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9349 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-20wcte12xp: Remove unused 'dtmfactive', 'dtmfmask', and 'dtmfmutemask' members.Shaun Ruffell
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
2010-09-16vpmadt032: Remove potential endless waits when resetting.Shaun Ruffell
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
2010-09-14wcte12xp: Remove unused 'unchannelized' global.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9329 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14dahdi: Fix for when PPP support is compiled as a kernel module.Shaun Ruffell
When compiling dahdi-linux I expect ppp support to be compiled in even if the kernel config has PPP configured as a module. (closes issue #17990) Reported by: jkroon Patches: dahdi-config-ppp.diff uploaded by jkroon (license 714) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9328 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: '0x0c' -> PCI_CACHE_LINE_SIZE.Shaun Ruffell
Magic number removal. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9327 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: Add call to 'pci_set_mwi' on initialization.Shaun Ruffell
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
2010-09-14wcte12xp, wctdm24xxp: Remove redundant vb_enable_io_access.Shaun Ruffell
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
2010-09-14dahdi: 0 -> DAHDI_LAW_DEFAULTShaun Ruffell
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