diff options
author | Andy Walls <awalls@radix.net> | 2008-11-30 10:01:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 09:38:20 -0200 |
commit | daa1c164db63540fe7a52c658ce14ae6a8d1ae53 (patch) | |
tree | 36d3c583c44fa832333829315fe0f577d09109a0 | |
parent | 572bfea71b0fb2efb36407b4e284c1e7962d4779 (diff) |
V4L/DVB (9778): cx18: cx18_writel_expect() should not declare success on a PCI read error
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.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/cx18/cx18-io.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-io.h b/drivers/media/video/cx18/cx18-io.h index e6716dcb1e8b..2635b3a8cc96 100644 --- a/drivers/media/video/cx18/cx18-io.h +++ b/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; } } |