On Mon, 23 Nov 2009, Patrick Boettcher wrote:
On Mon, 23 Nov 2009, grafgrimm77@xxxxxx wrote:
[..]
----- hello stupid I2C access ----
Pid: 255, comm: khubd Tainted: P A 2.6.31.6 #1
Call Trace:
[<ffffffffa0042292>] ? dibusb_i2c_xfer+0xe2/0x130 [dvb_usb_dibusb_common]
[<ffffffff81341dc1>] ? i2c_transfer+0x91/0xe0
[<ffffffffa0059081>] ? dib3000_write_reg+0x51/0x70 [dib3000mb]
[<ffffffffa00855c9>] ? dvb_pll_attach+0xa9/0x238 [dvb_pll]
[..]
Voila.
This is the access with makes the dvb-pll-driver not create the tuner driver.
This is (I forgot the correct name) read-without-write-i2caccess. It is bad
handled by the dibusb-driver and it can destroy the eeprom on the USB side.
Please try whether the attached patch fixes the whole situation for you.
If so, please send back a line like this:
Tested-by: Your name <email>
The patch attached.
--
Patrick Boettcher - Kernel Labs
http://www.kernellabs.com/
diff -r 52da57b5e800 linux/drivers/media/dvb/dvb-usb/dibusb-common.c
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c Thu Nov 19 17:15:37 2009 +0100
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c Mon Nov 23 13:20:10 2009 +0100
@@ -142,8 +142,13 @@
} else if ((msg[i].flags & I2C_M_RD) == 0) {
if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len,NULL,0) < 0)
break;
- } else
- break;
+ } else if (msg[i].addr != 0x50) {
+ /* 0x50 is the address of the eeprom - we need to protect it
+ * from dibusb's bad i2c implementation: reads without
+ * writing the offset before are forbidden */
+ if (dibusb_i2c_msg(d, msg[i].addr, NULL, 0, msg[i].buf, msg[i].len) < 0)
+ break;
+ }
}
mutex_unlock(&d->i2c_mutex);