wctdm24xxp: Reset module specific type information on probe.

This fixes an issue that affects TDM410 modules when there is not a module
installed in the first port, but there is an FXO module installed in the third
port.

When scaning for QRV modules in the first port, the 3rd port will have the
'hook' struct.qrv set to 0xff. When a QRV module is  not detected, that value
will be left, which then maps to an invalid state for both fxo.ring_state and
fxo.battery_state.

The result would be that FXO ports would fail to run the ring detector state
machine since it did not know what the current state was.

Now we'll just reset all the values in struct fxo or struct fxs to the expected
init state.

Internal-Issue-ID: DAHLIN-332
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 3933ffd350)
This commit is contained in:
Shaun Ruffell 2013-12-20 13:54:19 -06:00
parent a1a02a2997
commit a30fc9d040

View File

@ -3100,6 +3100,8 @@ wctdm_init_voicedaa(struct wctdm *wc, struct wctdm_module *mod,
spin_unlock_irqrestore(&wc->reglock, flags);
msleep(20);
memset(&mod->mod.fxo, 0, sizeof(mod->mod.fxo));
if (!sane && wctdm_voicedaa_insane(wc, mod))
return -2;
@ -3244,8 +3246,7 @@ wctdm_init_proslic(struct wctdm *wc, struct wctdm_module *const mod,
return -2;
/* Initialize VMWI settings */
memset(&(fxs->vmwisetting), 0, sizeof(fxs->vmwisetting));
fxs->vmwi_linereverse = 0;
memset(fxs, 0, sizeof(*fxs));
/* By default, don't send on hook */
if (!reversepolarity != !fxs->reversepolarity)