linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sasha Levin <alexander.levin@microsoft.com>,
	linux-tegra <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 4.14 156/173] gpiolib: Respect error code of ->get_direction()
Date: Tue, 25 Sep 2018 16:42:52 +0200	[thread overview]
Message-ID: <20180925144252.GA28362@kroah.com> (raw)
In-Reply-To: <dfdf04ac-2413-ccf3-a8ea-407674cc6b08@nvidia.com>

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 <andriy.shevchenko@linux.intel.com>
> > 
> > [ 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 <andriy.shevchenko@linux.intel.com>
> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  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

      reply	other threads:[~2018-09-25 14:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180924113114.334025954@linuxfoundation.org>
     [not found] ` <20180924113126.730832814@linuxfoundation.org>
2018-09-25 14:12   ` [PATCH 4.14 156/173] gpiolib: Respect error code of ->get_direction() Jon Hunter
2018-09-25 14:42     ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180925144252.GA28362@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.levin@microsoft.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).