On Sat, 2008-07-19 at 12:33 -0400, Gerhard R. Wittreich wrote:
> Andy,
> 
> Attached is the file with the debug=321 data.  Let me know what else I  
> can do.  I am very willing to provide you any data you need to get  
> this driver  working for everyone.

Something is really wrong with your PCI(e) bus or your CX23418 chip's
behavior.  Here's what debug=321 looks like on my machine:


Jul 18 20:43:39 morgan kernel: cx18-0: Initializing card #0
Jul 18 20:43:39 morgan kernel: cx18-0: Autodetected Hauppauge card
Jul 18 20:43:39 morgan kernel: ACPI: PCI Interrupt 0000:03:03.0[A] -> GSI 21 
(level, low) -> IRQ 21
Jul 18 20:43:39 morgan kernel: cx18-0: cx23418 revision 01010000 (B)
Jul 18 20:43:39 morgan kernel: cx18-0 i2c: i2c init
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setscl: On entry 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setscl: Wrote    
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setscl: Readback 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setsda: On entry 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setsda: Wrote    
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setsda: Readback 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setscl: On entry 
CX18_REG_I2C_2_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setscl: Wrote    
CX18_REG_I2C_2_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setscl: Readback 
CX18_REG_I2C_2_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setsda: On entry 
CX18_REG_I2C_2_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setsda: Wrote    
CX18_REG_I2C_2_WR = 0x21c0b
Jul 18 20:43:39 morgan kernel: cx180 i2c: cx18_setsda: Readback 
CX18_REG_I2C_2_WR = 0x21c0b
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: On entry 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: Wrote    
CX18_REG_I2C_1_WR = 0x21c09
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: Readback 
CX18_REG_I2C_1_WR = 0x21c09
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: On entry 
CX18_REG_I2C_1_WR = 0x21c09
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: Wrote    
CX18_REG_I2C_1_WR = 0x21c08
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: Readback 
CX18_REG_I2C_1_WR = 0x21c08
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: On entry 
CX18_REG_I2C_1_WR = 0x21c08
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: Wrote    
CX18_REG_I2C_1_WR = 0x21c0a
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: Readback 
CX18_REG_I2C_1_WR = 0x21c0a
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: On entry 
CX18_REG_I2C_1_WR = 0x21c0a
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: Wrote    
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: Readback 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_getscl: read CX18_REG_I2C_1_RD = 
0xc
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: On entry 
CX18_REG_I2C_1_WR = 0x21c0b
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: Wrote    
CX18_REG_I2C_1_WR = 0x21c0a
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setscl: Readback 
CX18_REG_I2C_1_WR = 0x21c0a
Jul 18 20:43:40 morgan kernel: cx180 i2c: cx18_setsda: On entry 
CX18_REG_I2C_1_WR = 0x21c0a

You get the picture hopefully. Whatever was written to the CX23418's I2C
control register over the PCI bus is what we should immediately read
back.  On the next entry to the function, the upper 3 bytes should be
the same.

Here's what your log shows:

Jul 19 12:23:01 wittregr-pvr kernel: [12569.016045] cx18:  Start 
initialization, version 1.0.0
Jul 19 12:23:01 wittregr-pvr kernel: [12569.016905] cx18-0: Initializing card #0
Jul 19 12:23:01 wittregr-pvr kernel: [12569.016923] cx18-0: Autodetected 
Hauppauge card
Jul 19 12:23:01 wittregr-pvr kernel: [12569.019858] cx18-0: cx23418 revision 
01010000 (B)
Jul 19 12:23:02 wittregr-pvr kernel: [12569.092391] cx18-0 i2c: i2c init
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839087] cx180 i2c: cx18_setscl: On 
entry CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839093] cx18-0 warning: 
cx18_setscl: On entry read value (0x7) and previously written value (0x21c0b) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839100] cx180 i2c: cx18_setscl: 
Wrote    CX18_REG_I2C_1_WR = 0x21c0b
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839265] cx180 i2c: cx18_setscl: 
Readback CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839270] cx18-0 warning: 
cx18_setscl: On exit readback value (0x7) and written value (0x21c0b) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839276] cx180 i2c: cx18_setsda: On 
entry CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839281] cx18-0 warning: 
cx18_setsda: On entry read value (0x7) and previously written value (0x21c0b) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839287] cx180 i2c: cx18_setsda: 
Wrote    CX18_REG_I2C_1_WR = 0x21c0b
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839452] cx180 i2c: cx18_setsda: 
Readback CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839457] cx18-0 warning: 
cx18_setsda: On exit readback value (0x7) and written value (0x21c0b) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839956] cx180 i2c: cx18_setscl: On 
entry CX18_REG_I2C_2_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839961] cx18-0 warning: 
cx18_setscl: On entry read value (0x7) and previously written value (0x21c0b) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12569.839967] cx180 i2c: cx18_setscl: 
Wrote    CX18_REG_I2C_2_WR = 0x21c0b
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840307] cx180 i2c: cx18_setscl: 
Readback CX18_REG_I2C_2_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840312] cx18-0 warning: 
cx18_setscl: On exit readback value (0x7) and written value (0x21c0b) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840482] cx180 i2c: cx18_setsda: On 
entry CX18_REG_I2C_2_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840488] cx18-0 warning: 
cx18_setsda: On entry read value (0x7) and previously written value (0x21c0b) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840493] cx180 i2c: cx18_setsda: 
Wrote    CX18_REG_I2C_2_WR = 0x21c0b
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840822] cx180 i2c: cx18_setsda: 
Readback CX18_REG_I2C_2_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12569.840827] cx18-0 warning: 
cx18_setsda: On exit readback value (0x7) and written value (0x21c0b) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12570.360124] i2c-adapter i2c-0: adapter 
[cx18 i2c driver #0-0] registered
Jul 19 12:23:02 wittregr-pvr kernel: [12570.361792] i2c-adapter i2c-1: adapter 
[cx18 i2c driver #0-1] registered
Jul 19 12:23:02 wittregr-pvr kernel: [12570.361820] i2c-adapter i2c-0: 
master_xfer[0] W, addr=0x50, len=1
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362724] cx180 i2c: cx18_setsda: On 
entry CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362737] cx18-0 warning: 
cx18_setsda: On entry read value (0x7) and previously written value (0x21c0b) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362744] cx180 i2c: cx18_setsda: 
Wrote    CX18_REG_I2C_1_WR = 0x21c09
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362909] cx180 i2c: cx18_setsda: 
Readback CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362914] cx18-0 warning: 
cx18_setsda: On exit readback value (0x7) and written value (0x21c09) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362919] cx18-0 warning: setsda 
failed to write to CX18_REG_I2C_1_WR register to drive bus 1 SDA line to 0
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362930] cx180 i2c: cx18_setscl: On 
entry CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362934] cx18-0 warning: 
cx18_setscl: On entry read value (0x7) and previously written value (0x21c09) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12570.362940] cx180 i2c: cx18_setscl: 
Wrote    CX18_REG_I2C_1_WR = 0x21c08
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363106] cx180 i2c: cx18_setscl: 
Readback CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363111] cx18-0 warning: 
cx18_setscl: On exit readback value (0x7) and written value (0x21c08) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363115] cx18-0 warning: setscl 
failed to write to CX18_REG_I2C_1_WR register to drive bus 1 SCL line to 0
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363124] cx180 i2c: cx18_setsda: On 
entry CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363128] cx18-0 warning: 
cx18_setsda: On entry read value (0x7) and previously written value (0x21c08) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363134] cx180 i2c: cx18_setsda: 
Wrote    CX18_REG_I2C_1_WR = 0x21c0a
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363299] cx180 i2c: cx18_setsda: 
Readback CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363304] cx18-0 warning: 
cx18_setsda: On exit readback value (0x7) and written value (0x21c0a) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363313] cx180 i2c: cx18_setscl: On 
entry CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363317] cx18-0 warning: 
cx18_setscl: On entry read value (0x7) and previously written value (0x21c0a) 
upper bytes differ. Using previous value as it should be correct.
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363323] cx180 i2c: cx18_setscl: 
Wrote    CX18_REG_I2C_1_WR = 0x21c0b
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363489] cx180 i2c: cx18_setscl: 
Readback CX18_REG_I2C_1_WR = 0x7
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363493] cx18-0 warning: 
cx18_setscl: On exit readback value (0x7) and written value (0x21c0b) upper 
bytes differ
Jul 19 12:23:02 wittregr-pvr kernel: [12570.363499] cx180 i2c: cx18_getscl: 
read CX18_REG_I2C_1_RD = 0xf


All the values being read back are wrong.  In fact, the values read back
are always either 0xf or 0x7 depending on which CX23418 I2C control
register, RD or WR, is being read.

You have a PCI bus problem, a problem with your CX23418 chip, or the
driver just isn't initializing the CX23418 properly.

My immediate suggestions are related to finding possible PCI bus
problems:

1. Try a different PCI slot

2. Try the card in a different motherboard if you can, to rule out the
possibility of a bad card

3. In the output of lspci -vv look for error conditions in the "Status:"
(>TAbort+ <TAbort+ <MAbort+ >SERR+ <PERR+) on the CX23418, the CPU host
bridge, or any bridge in between them (or on any device).

4. Make sure the latency timers for all the PCI devices have reasonable
values.

Maybe others on the list have other ideas.

I'll have to ask Hans about how to verify the CX23418's I2C hardware
block is getting set up properly.

Regards,
Andy


_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users

Reply via email to