[linux-dvb] [PATCH 1/3] Fix a problem during the access to the IER and ISR registers of the SA7146

e9hack e9hack at googlemail.com
Sun Dec 17 16:31:53 CET 2006


Dominik Strasser wrote:
>>>>> +                       /* this is normal when probing the bus
>>>>> +                        * (no answer from nonexisistant device...)
>>>>> +                        */
>>>>> +                       DEB_I2C(("saa7146_i2c_writeout: timed out
>>>>> waiting for end of xfer\n"));
>>>>> +                       return -EIO;  
> I am getting swamped by this message. It occurs every second.
> My HW is an 1.3 FSC DVB-C + Cinergy T2 + Cinergy T-1200.
>
> Anything I can do to debug this ?

Hi,

can you please add the attached patch. To find out what is going on, I
need some more informations.

- Hartmut


-------------- next part --------------
diff -r 557f307c31de linux/drivers/media/common/saa7146_i2c.c
--- a/linux/drivers/media/common/saa7146_i2c.c	Sat Dec 16 18:38:44 2006 -0200
+++ b/linux/drivers/media/common/saa7146_i2c.c	Sun Dec 17 16:23:25 2006 +0100
@@ -203,7 +203,8 @@ static int saa7146_i2c_writeout(struct s
 				/* a signal arrived */
 				return -ERESTARTSYS;
 
-			printk(KERN_WARNING "saa7146_i2c_writeout: timed out waiting for end of xfer\n");
+			printk(KERN_WARNING "saa7146_i2c_writeout(%04x,%04x): timed out waiting for end of xfer\n", 
+				dev->pci->subsystem_vendor, dev->pci->subsystem_device);
 			return -EIO;
 		}
 		status = saa7146_read(dev, I2C_STATUS);
@@ -314,6 +315,10 @@ int saa7146_i2c_transfer(struct saa7146_
 		/* write out the u32s one after another */
 		for(i = 0; i < count; i++) {
 			err = saa7146_i2c_writeout(dev, &buffer[i], short_delay);
+			if (err == -EIO) {
+				printk("EIO after saa7146_i2c_writeout: count=%d(%d), data=0x%08x, addr=0x%02x, R/W=%c, buf[0]=0x%02x\n", 
+					i, count, buffer[i], msgs[0].addr , msgs[0].flags & I2C_M_RD ? 'R' : 'W', msgs[0].buf[0]);
+			}
 			if ( 0 != err) {
 				/* this one is unsatisfying: some i2c slaves on some
 				   dvb cards don't acknowledge correctly, so the saa7146


More information about the linux-dvb mailing list