[Home]

Summary:DAHLIN-00272: No PCM on a TDM410 FXS module since r10167
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2011-12-26 12:07:44.000-0600Date Closed:2012-01-03 18:33:08.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:wctdm24xxp
Versions:2.6.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Elastix 2.2 (Centos 5) Linux kemeny 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:23:01 EDT 2011 i686 i686 i386 GNU/Linux Attachments:( 0) 0001-wctdm24xxp-Fix-bug-if-hook-state-on-FXS-changes-befo.patch
Description:As of DAHDI-linux revision 10167, the FXS module in our card fails to work. At initialization it hits a BUG_ONCE() in the code (drivers/dahdi/wctdm24xxp/base.c line 2272, at fxs_hooksig() and stops working.

The trace (tail -f /var/log/message in the background)

# ./live_dahdi reload
Stopping safe_asterisk:                                    [  OK  ]
Shutting down asterisk:                                    [  OK  ]
FATAL: Module firmware_class not found.
Dec 26 18:06:16 kemeny kernel: wctdm24xxp 0000:04:06.0: Freed a Wildcard
Dec 26 18:06:16 kemeny kernel: ACPI: PCI interrupt for device 0000:04:06.0 disabled
Dec 26 18:06:16 kemeny kernel: dahdi: Telephony Interface Unloaded
Dec 26 18:06:16 kemeny kernel: dahdi: Telephony Interface Registered on major 196
Dec 26 18:06:16 kemeny kernel: dahdi: Version: SVN-trunk-r10167
Dec 26 18:06:16 kemeny kernel: dahdi_echocan_mg2: Registered echo canceler 'MG2'
Dec 26 18:06:16 kemeny kernel: PCI: Enabling device 0000:04:06.0 (0000 -> 0003)
Dec 26 18:06:16 kemeny kernel: ACPI: PCI Interrupt 0000:04:06.0[A] -> GSI 21 (level, low) -> IRQ 66
Dec 26 18:06:18 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 1: Not installed
Dec 26 18:06:18 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 2: Not installed
Dec 26 18:06:18 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 3: Installed -- AUTO FXO (FCC mode)
Dec 26 18:06:18 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 4: Installed -- AUTO FXS/DPO
SETTING FILE PERMISSIONS Asterisk
Permissions Asterisk OK
Starting asterisk:                                         [  OK  ]
[root@kemeny dahdi]# Dec 26 18:06:19 kemeny kernel: wctdm24xxp 0000:04:06.0: Found a Wildcard TDM: Wildcard TDM410P (0 BRI spans, 2 analog channels)
Dec 26 18:06:19 kemeny kernel: 0 is an invalid signaling state for an FXS module.
Dec 26 18:06:19 kemeny kernel: WARNING: at /home/tzafrir/Git/dahdi-linux/drivers/dahdi/wctdm24xxp/base.c:2154 wctdm_fxs_hooksig()
Dec 26 18:06:19 kemeny kernel:  [<f8ddf289>] wctdm_fxs_hooksig+0xea/0x203 [wctdm24xxp]
Dec 26 18:06:19 kemeny kernel:  [<f8de56ce>] handle_transmit+0x98e/0x191c [wctdm24xxp]
Dec 26 18:06:19 kemeny kernel:  [<f8a1f1f8>] vb_tasklet_normal+0x11c/0x431 [dahdi_voicebus]
Dec 26 18:06:19 kemeny kernel:  [<f8a1d1a1>] vb_schedule_deferred+0xe/0xf [dahdi_voicebus]
Dec 26 18:06:19 kemeny kernel:  [<f8a1eb74>] vb_isr+0x9e/0x14f [dahdi_voicebus]
Dec 26 18:06:19 kemeny kernel:  [<c044fed5>] handle_IRQ_event+0x45/0x8c
Dec 26 18:06:19 kemeny kernel:  [<c044ffa0>] __do_IRQ+0x84/0xd6
Dec 26 18:06:19 kemeny kernel:  [<c044ff1c>] __do_IRQ+0x0/0xd6
Dec 26 18:06:19 kemeny kernel:  [<c04074d6>] do_IRQ+0x99/0xc3
Dec 26 18:06:19 kemeny kernel:  [<c040597a>] common_interrupt+0x1a/0x20
Dec 26 18:06:19 kemeny kernel:  [<c04834d4>] generic_permission+0xa/0xc4
Dec 26 18:06:19 kemeny kernel:  [<c04aef6c>] sysfs_permission+0x0/0x20
Dec 26 18:06:19 kemeny kernel:  [<c0483606>] permission+0x78/0xb5
Dec 26 18:06:19 kemeny kernel:  [<c0484ac4>] __link_path_walk+0x141/0xdab
Dec 26 18:06:19 kemeny kernel:  [<c0464d31>] do_wp_page+0x581/0x5f1
Dec 26 18:06:19 kemeny kernel:  [<c0485766>] link_path_walk+0x38/0x95
Dec 26 18:06:19 kemeny kernel:  [<c0485b27>] do_path_lookup+0x219/0x27f
Dec 26 18:06:19 kemeny kernel:  [<c04863ea>] __path_lookup_intent_open+0x42/0x72
Dec 26 18:06:19 kemeny kernel:  [<c0486469>] path_lookup_open+0xf/0x13
Dec 26 18:06:19 kemeny kernel:  [<c048655f>] open_namei+0x6d/0x62b
Dec 26 18:06:19 kemeny kernel:  [<c0475aaa>] do_filp_open+0x1c/0x31
Dec 26 18:06:19 kemeny kernel:  [<c0475afd>] do_sys_open+0x3e/0xae
Dec 26 18:06:19 kemeny kernel:  [<c0475b9a>] sys_open+0x16/0x18
Dec 26 18:06:19 kemeny kernel:  [<c0404f4b>] syscall_call+0x7/0xb
Dec 26 18:06:19 kemeny kernel:  =======================
Dec 26 18:06:19 kemeny kernel: wctdm24xxp 0000:04:06.0: Missed interrupt. Increasing latency to 5 ms in order to compensate.


A trace from a good load (again, with tail -f /var/log/messages in the background)

# ./live_dahdi reload
Stopping safe_asterisk:                                    [  OK  ]
Shutting down asterisk:                                    [  OK  ]
FATAL: Module firmware_class not found.
Dec 26 17:57:47 kemeny kernel: wctdm24xxp 0000:04:06.0: Freed a Wildcard
Dec 26 17:57:47 kemeny kernel: ACPI: PCI interrupt for device 0000:04:06.0 disabled
Dec 26 17:57:47 kemeny kernel: dahdi: Telephony Interface Unloaded
Dec 26 17:57:47 kemeny kernel: dahdi: Telephony Interface Registered on major 196
Dec 26 17:57:47 kemeny kernel: dahdi: Version: SVN-trunk-r10166
Dec 26 17:57:47 kemeny kernel: dahdi_echocan_mg2: Registered echo canceler 'MG2'
Dec 26 17:57:47 kemeny kernel: PCI: Enabling device 0000:04:06.0 (0000 -> 0003)
Dec 26 17:57:47 kemeny kernel: ACPI: PCI Interrupt 0000:04:06.0[A] -> GSI 21 (level, low) -> IRQ 66
Dec 26 17:57:48 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 1: Not installed
Dec 26 17:57:48 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 2: Not installed
Dec 26 17:57:48 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 3: Installed -- AUTO FXO (FCC mode)
Dec 26 17:57:48 kemeny kernel: wctdm24xxp 0000:04:06.0: Port 4: Installed -- AUTO FXS/DPO
SETTING FILE PERMISSIONS Asterisk
Permissions Asterisk OK
Starting asterisk:                                         [  OK  ]
[root@kemeny dahdi]# Dec 26 17:57:50 kemeny kernel: wctdm24xxp 0000:04:06.0: Found a Wildcard TDM: Wildcard TDM410P (0 BRI spans, 2 analog channels)
Comments:By: Shaun Ruffell (sruffell) 2011-12-27 17:46:42.500-0600

Is there more information you can give me?  I just tested the current trunk of dahdi-linux with a TDM410 and didn't have any problems calling between two handsets, and originating calls from the cli and having the CLI hangup the call.

By: Tzafrir Cohen (tzafrir) 2011-12-28 08:47:19.882-0600

The card is a Rev. A TDM410P card. Serial number DM3788130128 (if I read the small prints correctly). Serial numbers for the FXS and FXO modules: 441894 and 472572, respectively.

I have a speaker connected on the line in parallel (in high impedance). In the "good" case I hear a low-volume tone as soon as the driver starts loading.

In the "bad" case, the tone ends right at the time this trace is emmited.

By: Russ Meyerriecks (rmeyerriecks) 2011-12-28 15:30:29.009-0600

Could there be something else on the system locking interrupts?

By: Shaun Ruffell (sruffell) 2012-01-02 20:00:41.734-0600

Attaching 0001-wctdm24xxp-Fix-bug-if-hook-state-on-FXS-changes-befo.patch which resolves one way that the WARN_ONCE can be triggered.

If I loaded the wctdm24xxp driver and then took a handset on the FXS port off and placed it back on before calling dahdi_cfg, the warning would be triggered.

Given your knowledge of your setup, is it possible this explains the condition?

But regardless, I think the attached patch will "fix" the issue for you...but I would still be curious to nail down why you see a difference at r10167 and I do not.

By: Tzafrir Cohen (tzafrir) 2012-01-03 08:48:58.737-0600

Applied an it works.

By: Shaun Ruffell (sruffell) 2012-01-03 18:33:08.329-0600

Fixed in [r10396|http://svnview.digium.com/svn/dahdi?view=revision&revision=10396].