wcaxx, wcte13xp, wcte43x: Honor max_latency module parameter.

The wcxb library did not do actually use the max_latency member to limit the
maximum latency of the DMA engine.

Now it does.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
remotes/origin/2.9.y
Shaun Ruffell 11 years ago committed by Russ Meyerriecks
parent c49a56c954
commit 99de304d84

@ -401,16 +401,22 @@ static irqreturn_t _wcxb_isr(int irq, void *dev_id)
spin_lock(&xb->lock);
if (!xb->flags.latency_locked) {
xb->latency++;
xb->latency = min(xb->latency + 1,
xb->max_latency);
#ifdef HAVE_RATELIMIT
if (__ratelimit(&_underrun_rl)) {
#else
if (printk_ratelimit()) {
#endif
dev_info(&xb->pdev->dev,
"Underrun detected by hardware. Latency bumped to: %dms\n",
xb->latency);
if (xb->latency != xb->max_latency) {
dev_info(&xb->pdev->dev,
"Underrun detected by hardware. Latency bumped to: %dms\n",
xb->latency);
} else {
dev_info(&xb->pdev->dev,
"Underrun detected by hardware. Latency at max of %dms.\n",
xb->latency);
}
}
}
@ -602,6 +608,8 @@ int wcxb_init(struct wcxb *xb, const char *board_name, u32 int_mode)
return -EINVAL;
xb->latency = WCXB_DEFAULT_LATENCY;
xb->max_latency = WCXB_DEFAULT_MAXLATENCY;
spin_lock_init(&xb->lock);
xb->membase = pci_iomap(pdev, 0, 0);

Loading…
Cancel
Save