)]}'
{
  "commit": "94327d009e3aa20214e9dfa486a1fd14445fe736",
  "tree": "bb34db58161a22f60c73bcea08fefbde1db6b5a9",
  "parents": [
    "57a8f32eafa6f36ea3a128e8b13f353c5a3ca9b2"
  ],
  "author": {
    "name": "Frank Shew",
    "email": "fshew@geometrics.com",
    "time": "Tue May 19 07:23:49 2009 -0400"
  },
  "committer": {
    "name": "Ben Dooks",
    "email": "ben-linux@fluff.org",
    "time": "Sat Jun 13 10:39:25 2009 +0100"
  },
  "message": "i2c: Blackfin TWI: fix transfer errors with repeat start\n\nWe have a custom BF537 board with an I2C RTC (MAX DS3231) running\nuclinux 2007R1 for some time. Recently during migration to 2008R1.5-RC3\nwe losted access to the RTC. The RTC driver calls \u0027i2c_transfer()\u0027 which\nin turns calls \u0027bfin_twi_master_xfer()\u0027 in i2c-bfin-twi.c.\n\nCompared with 2007R1, it looks like the 2008R1.5 version of i2c-bin-twi.c\nhas a new mode \u0027TWI_I2C-MODE_REPEAT\u0027 which corresponds to the Repeat Start\nCondition described in the HRM. However, according to the HRM, at XMIT or\nRECV interrupt and when the data count is 0, not only is the RESTART bit\nsupposed to be set, but MDIR must also be set if the next operation is a\nreceive sequence, and cleared if not. Currently there is no code that looks\nat the I2C_M_RD bit in the flag from the next cur_msg and set/clear the MDIR\nflag accordingly at the same time that the RSTART bit is set. Instead, MDIR\nis set or cleared (by OR\u0027ing with 0?) after the RESTART bit has been cleared\nduring handling of MCOMP interrupt.\n\nIt appears that this is causing our failure with reading the RTC, as a\nquick patch to set/clear MDIR when RESTART is set seem to solve our problem.\n\nSigned-off-by: Frank Shew \u003cfshew@geometrics.com\u003e\nSigned-off-by: Sonic Zhang \u003csonic.zhang@analog.com\u003e\nSigned-off-by: Mike Frysinger \u003cvapier@gentoo.org\u003e\nSigned-off-by: Bryan Wu \u003ccooloney@kernel.org\u003e\n[ben-linux@fluff.org: shorted subject]\nSigned-off-by: Ben Dooks \u003cben-linux@fluff.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4d73ad7b5703901e0032ce5d562566f736a5b0d3",
      "old_mode": 33188,
      "old_path": "drivers/i2c/busses/i2c-bfin-twi.c",
      "new_id": "40136ea7a46fb1afc7c6268506bfbd3e470f8dd8",
      "new_mode": 33188,
      "new_path": "drivers/i2c/busses/i2c-bfin-twi.c"
    }
  ]
}
