Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp1055622oof; Tue, 25 Sep 2018 07:45:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV61vg2DnZ2nWHgILTKvd1O2JFZhor/vhqQu3HRAFjsLPrs5epRu3M2v8VzQ9/QLIXxgHg5ze X-Received: by 2002:a17:902:d808:: with SMTP id a8-v6mr1606348plz.306.1537886708354; Tue, 25 Sep 2018 07:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537886708; cv=none; d=google.com; s=arc-20160816; b=e9LvSJpr4AsVnQE4xm4MAK1ZKzpqCuZ3hwKVhIPaWu5YW+lNlq0f2uvM5JbT8+z3lJ dDgpVnDCSgInZf+iBzkqmTuleXMESE3FNwgEDpvtLDwGpPEfF1IrlljxVekfEE4kS9NZ Gcoku74+atU7yCdmU2qcwL72eQIDOaGpALgAulNCX92cAYI1GTmae7bYQyXuBV+l6TLW mHX3Z68mL/Q1QjhTMVt7laPohtZqlH7Ln/vPGpgXfK/KDTdR29dsfTYGWMf6CLYiL+et AcyqldJjOwzPu76dqknVCjHjxKmsKLigo2L9SfYdHXpeYoCGQ8G4w+Ioltr3E6tRsr56 Bc7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WvEZ5KcOd/x+vIwlvYVUAyegMfHDjmHUVUQJ+Wa2gvc=; b=GzxJdYUY/Iq/a63ifypcGtJKo1tX9Yb97SGe1eWdL6p1z5pS8lG6+pEuAx/kuxtnij 7AW2PCNQv1raJKNxE2TmPetDaMJilxa5gUfGkqbIueiOj6JgyLq2qSq28U4jkGW3BQ/O 1TQespKpZzHDpyKvI/gVo9uS6BKhLmocs/JP0Tb/TvqjItDFsierj8f+CyqOKcxD976b OrlMLzqqgujB3nrEc2sxHxWgonbGs31MDO2oAs4qFMRSxSbnWlSzNZipPtrkJlMXn1Bs 8Jc5KtQmTVgrhPHgebEjNuzYkQb8PBaCNfLT5YYPuegBqGFgyCrLSmoOBCrPdXsZR0Kd 5cvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n32-v6si2567495pgm.469.2018.09.25.07.44.51; Tue, 25 Sep 2018 07:45:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729409AbeIYUup (ORCPT + 99 others); Tue, 25 Sep 2018 16:50:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54082 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729224AbeIYUup (ORCPT ); Tue, 25 Sep 2018 16:50:45 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 31F8FE22; Tue, 25 Sep 2018 14:42:55 +0000 (UTC) Date: Tue, 25 Sep 2018 16:42:52 +0200 From: Greg Kroah-Hartman To: Jon Hunter Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Andy Shevchenko , Mika Westerberg , Linus Walleij , Sasha Levin , linux-tegra Subject: Re: [PATCH 4.14 156/173] gpiolib: Respect error code of ->get_direction() Message-ID: <20180925144252.GA28362@kroah.com> References: <20180924113114.334025954@linuxfoundation.org> <20180924113126.730832814@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 25, 2018 at 03:12:13PM +0100, Jon Hunter wrote: > Hi Greg, > > On 24/09/18 12:53, Greg Kroah-Hartman wrote: > > 4.14-stable review patch. If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Andy Shevchenko > > > > [ Upstream commit 36b312792b97933dc07abe074f50941199bd357c ] > > > > In case we try to lock GPIO pin as IRQ when something going wrong > > we print a misleading message. > > > > Correct this by checking an error code from ->get_direction() in > > gpiochip_lock_as_irq() and printing a corresponding message. > > > > Signed-off-by: Andy Shevchenko > > Cc: Mika Westerberg > > Signed-off-by: Linus Walleij > > Signed-off-by: Sasha Levin > > Signed-off-by: Greg Kroah-Hartman > > --- > > drivers/gpio/gpiolib.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > --- a/drivers/gpio/gpiolib.c > > +++ b/drivers/gpio/gpiolib.c > > @@ -2811,6 +2811,12 @@ int gpiochip_lock_as_irq(struct gpio_chi > > if (!chip->can_sleep && chip->get_direction) { > > int dir = chip->get_direction(chip, offset); > > > > + if (dir < 0) { > > + chip_err(chip, "%s: cannot get GPIO direction\n", > > + __func__); > > + return dir; > > + } > > + > > if (dir) > > clear_bit(FLAG_IS_OUT, &desc->flags); > > else > > This change is causing a boot regression on Tegra20 and Tegra30. After > this change was merged in mainline there was a fix for Tegra [0] that > was also needed. > > On Tegra the above change causes the allocation of GPIOs to fail and > looks like this then exposes another bug somewhere else that finally > leads to a system crash. > > If this is needed for stable, then we will need the fix for Tegra as well. Thanks, I've just dropped this from all of the queues, no need to cause more problems. greg k-h