[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaXE7Me8Q0Rrcooo_v_2oBJN1RSGUNHYudtTGQY7x8kqg@mail.gmail.com>
Date: Wed, 26 Sep 2018 09:50:18 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Janusz Krzysztofik <jmkrzyszt@...il.com>,
Ulf Hansson <ulf.hansson@...aro.org>
Cc: linux-mmc <linux-mmc@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH] mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap
On Tue, Sep 25, 2018 at 9:23 PM Janusz Krzysztofik <jmkrzyszt@...il.com> wrote:
> Commit b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to
> get/set array") changed the way GPIO values are passed to
> gpiod_get/set_array_value() and friends. The updated code of
> mmc_pwrseq_simple_set_gpios_value() incorrectly uses the 'value'
> argument as a bitmap of GPIO values and assigns it directly to the
> 'values' bitmap variable passed to gpiod_set_array_value_cansleep()
> instead of filling that bitmap with bits equal to the 'value' argument.
> As a result, boot hanging caused by incorrectly handled MMC device
> has been observed.
>
> As a side effect of that incorrect interpreation of the 'value'
> argument, wrong assumption is taken about the 'values' bitmap size
> never exceding the number of bits of the 'value' argument type.
>
> Fix it.
>
> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Signed-off-by: Janusz Krzysztofik <jmkrzyszt@...il.com>
Nice!
Provided this works, Ulf can I have your ACK so I can queue this
with the rest of the gpio array rework in the GPIO tree?
Yours,
Linus Walleij
Powered by blists - more mailing lists