stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Subject: Re: mmc patches for v5.4.y, v5.5.y
Date: Tue, 18 Feb 2020 13:18:53 -0500	[thread overview]
Message-ID: <20200218181853.GU1734@sasha-vm> (raw)
In-Reply-To: <20200218171857.GA25822@roeck-us.net>

On Tue, Feb 18, 2020 at 09:18:57AM -0800, Guenter Roeck wrote:
>Hi Greg,
>
>please apply the following two patches to v5.4.y and v5.5.y to fix a
>problem when trying to boot various pxa machines from MMC.
>
>d3a5bcb4a17f gpio: add gpiod_toggle_active_low()
>9073d10b0989 mmc: core: Rework wp-gpio handling
>
>The second patch fixes the problem, the first patch is necessary for the
>second patch to compile.
>
>Background: Commit 9073d10b0989 claims "No functional changes intended".
>However, it does include the following functional code change.
>
>--- a/drivers/mmc/host/pxamci.c
>+++ b/drivers/mmc/host/pxamci.c
>@@ -740,16 +740,16 @@ static int pxamci_probe(struct platform_device *pdev)
>                        goto out;
>                }
>
>+               if (!host->pdata->gpio_card_ro_invert)
>+                       mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH;
>+
>                ret = mmc_gpiod_request_ro(mmc, "wp", 0, 0, NULL);
>                if (ret && ret != -ENOENT) {
>                        dev_err(dev, "Failed requesting gpio_ro\n");
>                        goto out;
>                }
>-               if (!ret) {
>+               if (!ret)
>                        host->use_ro_gpio = true;
>-                       mmc->caps2 |= host->pdata->gpio_card_ro_invert ?
>-                               0 : MMC_CAP2_RO_ACTIVE_HIGH;
>-               }
>
>This _is_ a functional change: Previously, if there was no "ro" gpio
>pin, caps2 was never updated to active-high. This can have the practical
>effect of making the the card read-only, thus preventing the system
>from booting if it was mounted (and expected to be mounted) read-write.
>This is seen when trying to boot "spitz" and similar qemu machines from
>mmc.
>
>I bisected the problem to commit c914a27c92f91 ("mmc: pxamci: Support
>getting GPIO descs for RO and WP), affecting v5.0 and later kernels.

I've queued both for 5.4 and 5.5, thank you.

-- 
Thanks,
Sasha

  reply	other threads:[~2020-02-18 18:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 17:18 mmc patches for v5.4.y, v5.5.y Guenter Roeck
2020-02-18 18:18 ` Sasha Levin [this message]
2020-02-18 18:23 ` Greg Kroah-Hartman

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=20200218181853.GU1734@sasha-vm \
    --to=sashal@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux@roeck-us.net \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=robert.jarzmik@free.fr \
    --cc=stable@vger.kernel.org \
    --cc=ulf.hansson@linaro.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).