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>
(cherry picked from commit 99de304d84
)
This commit is contained in:
parent
e6b16eace1
commit
80968230ef
@ -401,16 +401,22 @@ static irqreturn_t _wcxb_isr(int irq, void *dev_id)
|
|||||||
spin_lock(&xb->lock);
|
spin_lock(&xb->lock);
|
||||||
|
|
||||||
if (!xb->flags.latency_locked) {
|
if (!xb->flags.latency_locked) {
|
||||||
xb->latency++;
|
xb->latency = min(xb->latency + 1,
|
||||||
|
xb->max_latency);
|
||||||
#ifdef HAVE_RATELIMIT
|
#ifdef HAVE_RATELIMIT
|
||||||
if (__ratelimit(&_underrun_rl)) {
|
if (__ratelimit(&_underrun_rl)) {
|
||||||
#else
|
#else
|
||||||
if (printk_ratelimit()) {
|
if (printk_ratelimit()) {
|
||||||
#endif
|
#endif
|
||||||
|
if (xb->latency != xb->max_latency) {
|
||||||
dev_info(&xb->pdev->dev,
|
dev_info(&xb->pdev->dev,
|
||||||
"Underrun detected by hardware. Latency bumped to: %dms\n",
|
"Underrun detected by hardware. Latency bumped to: %dms\n",
|
||||||
xb->latency);
|
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;
|
return -EINVAL;
|
||||||
|
|
||||||
xb->latency = WCXB_DEFAULT_LATENCY;
|
xb->latency = WCXB_DEFAULT_LATENCY;
|
||||||
|
xb->max_latency = WCXB_DEFAULT_MAXLATENCY;
|
||||||
|
|
||||||
spin_lock_init(&xb->lock);
|
spin_lock_init(&xb->lock);
|
||||||
|
|
||||||
xb->membase = pci_iomap(pdev, 0, 0);
|
xb->membase = pci_iomap(pdev, 0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user