summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-30 08:01:21 -0500
committerAndy Walls <awalls@radix.net>2008-11-30 08:01:21 -0500
commit8bd850c491873395b5ec35921fca010bb2ae4f75 (patch)
tree14c0fd9f95155d4925fab8ade531a5f3ff85b51b /linux/drivers/media/video/cx18
parent96b9b00e9e8f7771c45723ec0c869db9f2260585 (diff)
downloadmediapointer-dvb-s2-8bd850c491873395b5ec35921fca010bb2ae4f75.tar.gz
mediapointer-dvb-s2-8bd850c491873395b5ec35921fca010bb2ae4f75.tar.bz2
cx18: cx18_writel_expect() should not declare success on a PCI read error
From: Andy Walls <awalls@radix.net> cx18: cx18_writel_expect() should not declare success on a PCI read error. This removes the potential for cx18_write*_expect() calls to not accomplish a PCI write successfully as expected. The CX18-AV core uses the *expect() calls often and this may be the source of intermittent audio problems and standands switching problems. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video/cx18')
-rw-r--r--linux/drivers/media/video/cx18/cx18-io.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-io.h b/linux/drivers/media/video/cx18/cx18-io.h
index e6716dcb1..2635b3a8c 100644
--- a/linux/drivers/media/video/cx18/cx18-io.h
+++ b/linux/drivers/media/video/cx18/cx18-io.h
@@ -83,10 +83,14 @@ void cx18_writel_expect(struct cx18 *cx, u32 val, void __iomem *addr,
u32 eval, u32 mask)
{
int i;
+ u32 r;
eval &= mask;
for (i = 0; i < CX18_MAX_MMIO_WR_RETRIES; i++) {
cx18_writel_noretry(cx, val, addr);
- if (eval == (cx18_readl(cx, addr) & mask))
+ r = cx18_readl(cx, addr);
+ if (r == 0xffffffff && eval != 0xffffffff)
+ continue;
+ if (eval == (r & mask))
break;
}
}