wctdm24xxp, wcte12xp: Allow VPMADT032 commands more time to complete.

Since "wctdm24xxp: Probe for and configure modules in parallel." the
check for the VPMADT032 module was moved closer to after when the
interface was initialized. The 200ms timeout did not provide enough
time for the system to settle out after initial start. The result
was that sometimes after a cold boot the driver would fail to detect
any VPMADT032 modules.

This fixes a race condition that is not in any released branches.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10296 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell 2011-11-01 20:35:20 +00:00
parent a054cddc09
commit ce261cd03a

View File

@ -126,8 +126,8 @@ static int vpmadt032_getreg_full_return(struct vpmadt032 *vpm, int pagechange,
unsigned long ret; unsigned long ret;
BUG_ON(!cmd); BUG_ON(!cmd);
/* We'll wait for 200ms */ /* We'll wait for 2s */
ret = wait_for_completion_timeout(&cmd->complete, HZ/5); ret = wait_for_completion_timeout(&cmd->complete, HZ*2);
if (unlikely(!ret)) { if (unlikely(!ret)) {
spin_lock_irqsave(&vpm->list_lock, flags); spin_lock_irqsave(&vpm->list_lock, flags);
list_del(&cmd->node); list_del(&cmd->node);