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:
parent
a1a02a2997
commit
a30fc9d040
@ -3100,6 +3100,8 @@ wctdm_init_voicedaa(struct wctdm *wc, struct wctdm_module *mod,
|
|||||||
spin_unlock_irqrestore(&wc->reglock, flags);
|
spin_unlock_irqrestore(&wc->reglock, flags);
|
||||||
msleep(20);
|
msleep(20);
|
||||||
|
|
||||||
|
memset(&mod->mod.fxo, 0, sizeof(mod->mod.fxo));
|
||||||
|
|
||||||
if (!sane && wctdm_voicedaa_insane(wc, mod))
|
if (!sane && wctdm_voicedaa_insane(wc, mod))
|
||||||
return -2;
|
return -2;
|
||||||
|
|
||||||
@ -3244,8 +3246,7 @@ wctdm_init_proslic(struct wctdm *wc, struct wctdm_module *const mod,
|
|||||||
return -2;
|
return -2;
|
||||||
|
|
||||||
/* Initialize VMWI settings */
|
/* Initialize VMWI settings */
|
||||||
memset(&(fxs->vmwisetting), 0, sizeof(fxs->vmwisetting));
|
memset(fxs, 0, sizeof(*fxs));
|
||||||
fxs->vmwi_linereverse = 0;
|
|
||||||
|
|
||||||
/* By default, don't send on hook */
|
/* By default, don't send on hook */
|
||||||
if (!reversepolarity != !fxs->reversepolarity)
|
if (!reversepolarity != !fxs->reversepolarity)
|
||||||
|
Loading…
Reference in New Issue
Block a user