summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-05-23add "span_id" dahdi_span attribute. Calculated during device registration.sysfsOron Peled
2011-05-23add to dahdi_device a "hardware_id" attribute as an alternative to "location"Oron Peled
- The "hardware_id" does not change with device location (e.g: when a PCI card is moved from one slot to another). - Not all devices have this attribute. It is legal for it to be NULL (that is the default for all low-level drivers that do not set it explicitly). - When "hardware_id" is NULL, the sysfs attribute value is "\n"
2011-05-23add the "location" attribute to dahdi_device sysfs representationOron Peled
2011-05-23xpp: Now each Astribank (xbus) is a dahdi device and each xpd is a span:Oron Peled
- This is a minimal patch - More work should be done (e.g: auto_registration etc.)
2011-05-23Shorten sysfs parent device name:Oron Peled
Too long names are truncated by sysfs (e.g: "dahdi:astribanks:xbus-00" is truncated to "dahdi:astribanks:xb"). So the "dahdi:" prefix was removed.
2011-05-23Allow low-level drivers to unregister a single span at a time:Oron Peled
- Rename the static dahdi_unregister_span() to _dahdi_unregister_span() - Export a new dahdi_unregister_span() [protected by registration_mutex]
2011-05-23xpp: Remove obsolete XPP_DEBUGFS codeTzafrir Cohen
XPP_DEBUGFS code was some code used to send BRI D-Channel data through debugfs for, well, debugging. Unused in recent years. Time to remove. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9917 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-23xpp: Remove obsolete and unused OLD_PROC codeTzafrir Cohen
OLD_PROC marked old and unused code that was used for writing to procfs. It has long ago been replaced with different sysfs interfaces. Time to remove it. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9916 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-23Revert "remove OLD_PROC code (leave only informative proc files)"Oron Peled
This reverts commit bab264ce3cb81098ff5b450f7c94a44a10f95dec.
2011-05-08remove OLD_PROC code (leave only informative proc files)Oron Peled
2011-04-15dahdi: Do not save the irq information.Shaun Ruffell
If the user needs this information, there are better ways to get it than having it embedded in the device / span structures. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15dahdi: Move irq/irqmisses from dahdi_span into dahdi_device.Shaun Ruffell
These fields do not have anything to do with the span. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15dahdi: Expose dahdi devices in sysfs.Shaun Ruffell
This exposes dahdi devices in sysfs and also exposes attributes that will allow user space to control the registration order in spans. This facilitates loading drivers out of order yet keeping consistent span/channel numbering, which in turn will eventually allow the blacklist for DAHDI drivers to be removed. The default behavior, controlled with the auto_register module parameter on dahdi is to number the spans / channels in order like is currently done. So this change does not introduce any new behavior by default. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15dahdi: Expose spans in sysfs.Oron Peled
This change will facilitate creating rules that will allow spans and channels to be accessed by named device files instead of by numbers. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15dahdi: register/unregister devices as opposed to individual spans.Shaun Ruffell
Increasingly, spans are implemented by devices that support more than a single span. Introduce a 'struct dahdi_device' object which explicitly contains multiple spans. This will also allow a cleaner representation of spans and devices in sysfs since order of arrival will not determine the layout of the devices. This also gives the core of dahdi a way to know the relationship between spans. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15delete: adding dahdi_helper to inspect the uvents we want.Shaun Ruffell
2011-04-15wctdm24xxp: Remove fwringdetect module parameter.Shaun Ruffell
The driver / FXO modules now always operate in a fwringdetect mode and the module parameter was never checked anywhere. It is now gone. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use time range for debouncing polarity.Shaun Ruffell
Eliminate the assumption that the check function is going to be called for every frame. Also, use a state machine to make polarity debouncing similar to the other debouncing code. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use interval for debouncing FXO battery.Shaun Ruffell
Allows the driver the option of not calling the misc function for every frame. Preparation for moving this processing out of the interrupt handler. This also introduces a state machine for the various battery states to (I hope) make the code easier to read. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use time interval for debouncing ring detect.Shaun Ruffell
We do not necessarily want to assume that the ring dection function is called for every frame. Also, use a state machine for ring detection. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use state machine to debounce fxs hook state.Shaun Ruffell
Also do not assume that check_hook is called every millisecond. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: No need to debounce the remote hook state on FXS port.Shaun Ruffell
The 3215 already has a 12.5ms default debounce circuit for the loop closure detect already. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use interval for checking on hook transfer timer.Shaun Ruffell
Part of moving more of the module specific processing out of the interrupt handler. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: oppending_ms shouldn't assume being checked at 1ms intervals.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Name the shadow registers for each modules.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use time interval for checking fxs modules.Shaun Ruffell
Part of preparations for not needing to call the misc_isr function for each frame. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Check current time is after expected time.Shaun Ruffell
The modulo operator expects that the check function is called each and every time the condition variable changes. If we switch to using "time_after" macros and friends, we can still catch our condition even if we're not called for every tick. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Change intcount to framecount.Shaun Ruffell
The variable does not necessarily have anything to do with the frequency of interrupts but is instead a count of sframes received. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use fact that handle_transmit/receive are called in hard-irqShaun Ruffell
We can save on saving and restoring the local interrupt state. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Make sure the interrupt handler isn't using the vpm instance.Shaun Ruffell
2011-04-15wctdm24xxp: Load the onboard modules in parallel as much as possible.Shaun Ruffell
This provides a dramatic improvement in driver load time. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Introduce bg_create/bg_join.Shaun Ruffell
Since there are several operations on the wctdm24xxp driver during initialization that can take a significant amount of time, but which can run in parallel with other operations, this adds a generic facility for creating those tasks and waiting for the results. This will be used to identify and configure the modules in parallel. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Calculate the SPI offsets ahead of time.Shaun Ruffell
Updates the CMD_BYTE macro to use precalculated offsets. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Shorten up some of the sleeps/waits.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Allow more than one outstanding read at a time.Shaun Ruffell
Since every read needs to go through the complete voicebus pipeline, if we know we're going to read multiple bytes we can queue them all up. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use lists for SPI commands to the modules.Shaun Ruffell
Saves time in the interrupt handler by eliminating the need to scan through all of the slots in the cmd arrays. Also allows the reads from ISR context to automatically grow as the latency grows. This ensures that battery and hook state is actually checked every frame like originally intended. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Cleanup in wctdm_identify_modules.Shaun Ruffell
Trivial reformatting that preps it for some parallelizing the module loads. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Remove 'pos' member from 'struct wctdm'.Shaun Ruffell
The card position is only used during startup so we don't need to carry it around in the strucuture. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Drop 'flags' from 'struct wctdm_module'.Shaun Ruffell
The voicebus cards only support the S110M FXS modules which are based on the 3215. The module flags member was only used to hold whether we were dealing with a 3210 or 3215 SLIC, so we can drop it since we always know we'll have a 3215 based SLIC. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Hold the reglock longer in the interrupt handler.Shaun Ruffell
Cuts down on the overhead of constantly saving and restoring the interrupt registers. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Pass the pointer to struct wctdm_module directly instead of index.Shaun Ruffell
This change gets all the easy places and saves on array dereferences when we already have the address of the module that we are interested in. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Trivial. Reduce the indentation level in wctdm_proslic_oppending.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Use enumeration for module types.Shaun Ruffell
This change is to primarily to clarify that the types are always mutually exclusive. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Group the QRV members together.Shaun Ruffell
This also allows us to add them to the union with the other module types so they do not add to the memory usage if there aren't any QRV modules installed. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Group the per-module information togetherShaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Dynamically allocate the board_name.Shaun Ruffell
Move the data backing the mostly unused string away from the active members of 'struct wctdm'. The location where some of the other members of 'struct wctdm' are initialized were moved so that wctdm_back_out_gracefully always has a fully formed structure to work on. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15wctdm24xxp: Remove modmap member from 'struct wctdm'.Shaun Ruffell
We can already use the module type to determine presence of a module to check. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
2011-04-15dahdi: Bug fix for enabling buffer eventsKinsey Moore
Introduced in rev 9905, this bug could cause buffer events to become disabled if the kernel was unable to access userland data. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9907 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-15dahdi: Add capability to generate events on buffer underruns and overrunsKinsey Moore
Add BUFFEVENTS and individual buffer event channel flags so that DAHDI can notify userspace processes when it is dropping data. This can be useful when trouble shooting fax problems since DAHDI currently silently discards data becasuse of scheduling latency. With this change, Asterisk could log an event as opposed to just leaving it up to the tone detectors to figure out there was some unexpected phase shift. Acked-by: Shaun Ruffell <sruffell@digium.com> (original patch by Matt Fredrickson) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9905 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-14wcte12xp: If we cannot read the mode selection pins fail the module load.Shaun Ruffell
Alexandre reported that on a particular server he would get a server crash when loading the wcte12xp driver after receiving a line about a timeout when trying to read the mode selection jumpers. If the driver times out when trying to read the mode selection bits there is a serious problem and it should not try to continue on with configuration / registration. Reported-and-Tested-by: Alexandre Abreu <alexandre.abreu@redt.com.br> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9902 a0bf4364-ded3-4de4-8d8a-66a801d63aff