From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752177AbcGRT33 (ORCPT ); Mon, 18 Jul 2016 15:29:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46706 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751931AbcGRT31 (ORCPT ); Mon, 18 Jul 2016 15:29:27 -0400 Date: Mon, 18 Jul 2016 12:29:25 -0700 From: Andrew Morton To: "H. Nikolaus Schaller" Cc: Evgeniy Polyakov , Vignesh R , Greg Kroah-Hartman , Andreas Kemnade , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Jonathan Corbet , Tony Lindgren , NeilBrown , Fabian Frederick , linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org Subject: Re: [PATCH] w1:omap_hdq: fix regression Message-Id: <20160718122925.80d840e96ef9ae0b3e09a655@linux-foundation.org> In-Reply-To: <9c4ed8a45c6c0f99c5fc41842c4781f37cf5d70a.1468858236.git.hns@goldelico.com> References: <9c4ed8a45c6c0f99c5fc41842c4781f37cf5d70a.1468858236.git.hns@goldelico.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jul 2016 18:10:37 +0200 "H. Nikolaus Schaller" wrote: > commit ("w1: masters: omap_hdq: add support for 1-wire mode") > did add 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. > > Signed-off-by: H. Nikolaus Schaller Needs a cc:stable. I'll assume Greg will be handling this patch.