All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6] Incomplete AT24RF08 corruption prevention in i2c eeprom
@ 2005-05-19  6:24 Jean Delvare
  2005-05-19  6:24 ` [PATCH 2.6] Incomplete AT24RF08 corruption prevention in i2c Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Hi Greg,

The AT24RF08 corruption prevention trick that is found in the i2c eeprom
driver is not correct. The prevention is activated only conditionally,
while it should be done all the time.

Please apply,
thanks.

--- linux-2.6.6-bk2/drivers/i2c/chips/eeprom.c.orig	Sat May 15 07:52:14 2004
+++ linux-2.6.6-bk2/drivers/i2c/chips/eeprom.c	Sun May 16 19:11:11 2004
@@ -203,11 +203,12 @@
 	new_client->driver = &eeprom_driver;
 	new_client->flags = 0;
 
+	/* prevent 24RF08 corruption */
+	i2c_smbus_write_quick(new_client, 0);
+
 	/* Now, we do the remaining detection. It is not there, unless you force
 	   the checksum to work out. */
 	if (checksum) {
-		/* prevent 24RF08 corruption */
-		i2c_smbus_write_quick(new_client, 0);
 		cs = 0;
 		for (i = 0; i <= 0x3e; i++)
 			cs += i2c_smbus_read_byte_data(new_client, i);


-- 
Jean Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-19  6:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:24 [PATCH 2.6] Incomplete AT24RF08 corruption prevention in i2c eeprom Jean Delvare
2005-05-19  6:24 ` [PATCH 2.6] Incomplete AT24RF08 corruption prevention in i2c Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.