linux_old1/drivers/w1/masters
H. Nikolaus Schaller ecfaf0c42f w1:omap_hdq: fix regression
Commit e93762bbf6 ("w1: masters: omap_hdq: add support for 1-wire
mode") added a statement to clear the hdq_irqstatus flags in
hdq_read_byte().

If the hdq reading process is scheduled slowly or interrupts are
disabled for a while the hardware read activity might already be
finished on entry of hdq_read_byte().  And hdq_isr() already has set the
hdq_irqstatus to 0x6 (can be seen in debug mode) denoting that both, the
TXCOMPLETE and RXCOMPLETE interrupts occurred in parallel.

This means there is no need to wait and the hdq_read_byte() can just
read the byte from the hdq controller.

By resetting hdq_irqstatus to 0 the read process is forced to be always
waiting again (because the if statement always succeeds) but the
hardware will not issue another RXCOMPLETE interrupt.  This results in a
false timeout.

After such a situation the hdq bus hangs.

Link: http://lkml.kernel.org/r/b724765f87ad276a69625bc19806c8c8844c4590.1469513669.git.hns@goldelico.com
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-08-02 19:35:40 -04:00
..
Kconfig w1: mxc_w1: Enable driver compilation with COMPILE_TEST 2014-02-28 15:27:09 -08:00
Makefile w1: add 1-wire master driver for i.MX27 / i.MX31 2009-01-08 08:31:13 -08:00
ds1wm.c w1/masters: use pr_* instead of printk 2014-06-19 17:46:51 -07:00
ds2482.c w1: enable active pullup for DS2482 by default 2016-05-01 14:04:19 -07:00
ds2490.c W1: ds2490: Increase timeout when waiting for status 2014-11-07 11:24:01 -08:00
matrox_w1.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-09-01 18:46:42 -07:00
mxc_w1.c w1: constify of_device_id array 2015-03-25 12:25:29 +01:00
omap_hdq.c w1:omap_hdq: fix regression 2016-08-02 19:35:40 -04:00
w1-gpio.c W1: w1-gpio - switch to using dev_pm_ops 2015-10-17 21:45:05 -07:00