All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] fix SW PEC for write byte data
@ 2005-09-24 10:19 Hideki IWAMOTO
  2005-09-24 19:14 ` Jean Delvare
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hideki IWAMOTO @ 2005-09-24 10:19 UTC (permalink / raw)
  To: lm-sensors

Index: kernel/i2c-core.c
=================================RCS file: /home/cvs/i2c/kernel/i2c-core.c,v
retrieving revision 1.110
diff -u -r1.110 i2c-core.c
--- kernel/i2c-core.c	12 Aug 2005 20:39:21 -0000	1.110
+++ kernel/i2c-core.c	24 Sep 2005 08:20:35 -0000
@@ -979,7 +979,7 @@
 			break;
 		case I2C_SMBUS_BYTE_DATA:
 			buf[2] = data->byte;
-			data->word = buf[2] ||
+			data->word = buf[2] |
 			            (i2c_smbus_pec(3, buf, NULL) << 8);
 			size = I2C_SMBUS_WORD_DATA;
 			break;

----
Hideki IWAMOTO  h-iwamoto@kit.hi-ho.ne.jp

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

* [lm-sensors] [PATCH] fix SW PEC for write byte data
  2005-09-24 10:19 [lm-sensors] [PATCH] fix SW PEC for write byte data Hideki IWAMOTO
@ 2005-09-24 19:14 ` Jean Delvare
  2005-09-26 23:27 ` Mark Studebaker
  2005-09-27  9:46 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-09-24 19:14 UTC (permalink / raw)
  To: lm-sensors

Konbanwa Hideki,

> @@ -979,7 +979,7 @@
>  			break;
>  		case I2C_SMBUS_BYTE_DATA:
>  			buf[2] = data->byte;
> -			data->word = buf[2] ||
> +			data->word = buf[2] |
>  			            (i2c_smbus_pec(3, buf, NULL) << 8);
>  			size = I2C_SMBUS_WORD_DATA;
>  			break;

Eek, this one was weird :( Looks like nobody ever used this code.
Thanks a lot for reporting all these errors in our code. I've committed
your fix to i2c CVS already and will port it to Linux 2.6 as well.

Arigato,
-- 
Jean Delvare

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

* [lm-sensors] [PATCH] fix SW PEC for write byte data
  2005-09-24 10:19 [lm-sensors] [PATCH] fix SW PEC for write byte data Hideki IWAMOTO
  2005-09-24 19:14 ` Jean Delvare
@ 2005-09-26 23:27 ` Mark Studebaker
  2005-09-27  9:46 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Studebaker @ 2005-09-26 23:27 UTC (permalink / raw)
  To: lm-sensors

Jean Delvare wrote:
> Konbanwa Hideki,
> 
> 
>>@@ -979,7 +979,7 @@
>> 			break;
>> 		case I2C_SMBUS_BYTE_DATA:
>> 			buf[2] = data->byte;
>>-			data->word = buf[2] ||
>>+			data->word = buf[2] |
>> 			            (i2c_smbus_pec(3, buf, NULL) << 8);
>> 			size = I2C_SMBUS_WORD_DATA;
>> 			break;
> 
> 
> Eek, this one was weird :( Looks like nobody ever used this code.
> Thanks a lot for reporting all these errors in our code. I've committed
> your fix to i2c CVS already and will port it to Linux 2.6 as well.
> 
> Arigato,

ha
of course I take blame and credit for PEC bugs.
PEC really used for block transfers (including ARP and the IPMI-over-I2C_, not familiar with any chip using it
for single bytes.


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

* [lm-sensors] [PATCH] fix SW PEC for write byte data
  2005-09-24 10:19 [lm-sensors] [PATCH] fix SW PEC for write byte data Hideki IWAMOTO
  2005-09-24 19:14 ` Jean Delvare
  2005-09-26 23:27 ` Mark Studebaker
@ 2005-09-27  9:46 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-09-27  9:46 UTC (permalink / raw)
  To: lm-sensors


Hi Mark, all,

On 2005-09-26, Mark Studebaker wrote:
> PEC really used for block transfers (including ARP and the IPMI-over-I2C),
> not familiar with any chip using it for single bytes.

Maybe the overhead in the case of short transactions frightened
designers. Nevertheless, I have an ADM1032 evaluation board, and the
ADM1032 is supposed to support PEC. I tried i2cdump in "bp" mode and
it failed, but I guess this isn't surprising with Hideki reporting
read_byte and read_byte_data w/PEC being broken. At least this should
help me test any fix (or rewrite) I may do on software PEC support.

--
Jean Delvare

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

end of thread, other threads:[~2005-09-27  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-24 10:19 [lm-sensors] [PATCH] fix SW PEC for write byte data Hideki IWAMOTO
2005-09-24 19:14 ` Jean Delvare
2005-09-26 23:27 ` Mark Studebaker
2005-09-27  9:46 ` Jean Delvare

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.