Message ID | alpine.LRH.2.00.0911231418350.14263@pub1.ifh.de (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Douglas Landgraf |
Headers | show |
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);