]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/intel_i2c: always wait for IDLE before clearing NAK
authorDaniel Kurtz <djkurtz@chromium.org>
Fri, 30 Mar 2012 11:46:38 +0000 (19:46 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 12 Apr 2012 19:14:07 +0000 (21:14 +0200)
commitec8c269191f0a972e08fc186839fac8d36dc0168
tree62faf9f29abac026e1250b9ba6b75e24dcd7056f
parent4047c5e3646458e9b395e16e08e46fdcd1dc71f1
drm/i915/intel_i2c: always wait for IDLE before clearing NAK

The GMBUS controller can report a NAK condition while a transaction is
still active. If the driver is fast enough, and the bus is slow enough,
the driver may clear the NAK condition while the controller is still
busy, resulting in a confused GMBUS controller.  This will leave the
controller in a bad state such that the next transaction may fail.

Also, return -ENXIO if a device NAKs a transaction.

Note: this patch also refactors gmbus_xfer to remove the "done" label.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_i2c.c