Re: [Qemu-devel] [PATCH 1/1] tmp105: Fix I2C protocol bug

2012-12-11 Thread Andreas Färber
Am 05.12.2012 20:48, schrieb Alex Horn: > The private buffer length field must only be incremented after the I2C > frame has been transmitted. > > To expose this bug, assume the temperature in the TMP105 hardware model > is +0.125 C (e.g. snow slush). Note that eleven bit precision is required > t

Re: [Qemu-devel] [PATCH 1/1] tmp105: Fix I2C protocol bug

2012-12-07 Thread Alex Horn
> [T]he change is entirely correct since the 'else' clause currently seems > to take the increment into account: > if (s->len <= 2) > s->buf[s->len - 1] = data; > tmp105_write(s); > > Shouldn't the '- 1' in the middle line be removed? Several clarifications follow. Th

Re: [Qemu-devel] [PATCH 1/1] tmp105: Fix I2C protocol bug

2012-12-06 Thread Blue Swirl
On Wed, Dec 5, 2012 at 7:48 PM, Alex Horn wrote: > The private buffer length field must only be incremented after the I2C > frame has been transmitted. > > To expose this bug, assume the temperature in the TMP105 hardware model > is +0.125 C (e.g. snow slush). Note that eleven bit precision is req

[Qemu-devel] [PATCH 1/1] tmp105: Fix I2C protocol bug

2012-12-05 Thread Alex Horn
The private buffer length field must only be incremented after the I2C frame has been transmitted. To expose this bug, assume the temperature in the TMP105 hardware model is +0.125 C (e.g. snow slush). Note that eleven bit precision is required to read this value; otherwise the reading is equal to