i2c: i801: recover from hardware PEC errors
authorEllen Wang <ellen@cumulusnetworks.com>
Fri, 1 Jul 2016 20:42:15 +0000 (22:42 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 1 Jul 2016 20:42:15 +0000 (22:42 +0200)
commit97d34ec136a9ff10259ea636a45d3a41beda0e4f
treea53a6cf01cdc1c2e7003e51fd4e8111b93f59260
parente0f6431c1ef00e6160c9c36a9ca3b7405518db3d
i2c: i801: recover from hardware PEC errors

On a CRC error while using hardware-supported PEC, an additional
error bit is set in the auxiliary status register.  If this bit
isn't cleared, all subsequent operations will fail, essentially
hanging the controller.

The fix is simple: check, report, and clear the bit in
i801_check_post().  Also, in case the driver starts with the
hardware in that state, clear it in i801_check_pre() as well.

Signed-off-by: Ellen Wang <ellen@cumulusnetworks.com>
Tested-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-i801.c