[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADhT+wcNFxD6Zv9w8W0sontVWa6zOkHjyK42Tw=Y_1X2XCTZfQ@mail.gmail.com>
Date: Fri, 11 Dec 2015 10:50:21 -0600
From: Dinh Nguyen <dinh.linux@...il.com>
To: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
linux-mtd@...ts.infradead.org, Andrew Lunn <andrew@...n.ch>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
Tony Lindgren <tony@...mide.com>,
Nicolas Ferre <nicolas.ferre@...el.com>,
Stefan Agner <stefan@...er.ch>, linux-sunxi@...glegroups.com,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Alexander Clouter <alex@...riz.org.uk>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Jesper Nilsson <jesper.nilsson@...s.com>,
linux-samsung-soc@...r.kernel.org,
Maxim Levitsky <maximlevitsky@...il.com>,
Jonathan Corbet <corbet@....net>,
Marek Vasut <marek.vasut@...il.com>,
Chen-Yu Tsai <wens@...e.org>, Kukjin Kim <kgene@...nel.org>,
Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Dinh Nguyen <dinguyen@...era.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Jason Cooper <jason@...edaemon.net>,
Wan ZongShun <mcuos.com@...il.com>,
Steven Miao <realmz6@...il.com>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Mikael Starvik <starvik@...s.com>,
Krzysztof Halasa <khalasa@...p.pl>,
Gregory CLEMENT <gregory.clement@...e-electrons.com>,
linux-omap@...r.kernel.org,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Ryan Mallon <rmallon@...il.com>, linux-cris-kernel@...s.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux List <linux-kernel@...r.kernel.org>,
Hartley Sweeten <hsweeten@...ionengravers.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Sascha Hauer <kernel@...gutronix.de>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Imre Kaloz <kaloz@...nwrt.org>,
Shawn Guo <shawnguo@...nel.org>,
Daniel Mack <daniel@...que.org>
Subject: Re: [PATCH v5 01/58] mtd: nand: denali: add missing nand_release()
call in denali_remove()
Hi Boris,
On Fri, Dec 11, 2015 at 9:10 AM, Boris Brezillon
<boris.brezillon@...e-electrons.com> wrote:
> + Dinh (who made commit 2a0a288ec258)
>
> Also added back the Fixes tag.
>
> On Fri, 11 Dec 2015 15:02:34 +0100
> Boris Brezillon <boris.brezillon@...e-electrons.com> wrote:
>
>> Unregister the NAND device from the NAND subsystem when removing a denali
>> NAND controller, otherwise the MTD attached to the NAND device is still
>> exposed by the MTD layer, and accesses to this device will likely crash
>> the system.
>>
>> Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
>
> Fixes: 2a0a288ec258 ("mtd: denali: split the generic driver and PCI layer")
>
>> ---
>> Changes since v4:
>> - remove Cc stable and fixes tags
>> - calculate the dma buffer size before calling nand_release()
>>
>> drivers/mtd/nand/denali.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
>> index 67eb2be..fdfea05 100644
>> --- a/drivers/mtd/nand/denali.c
>> +++ b/drivers/mtd/nand/denali.c
>> @@ -1622,9 +1622,11 @@ EXPORT_SYMBOL(denali_init);
>> /* driver exit point */
>> void denali_remove(struct denali_nand_info *denali)
>> {
>> + int bufsize = denali->mtd.writesize + denali->mtd.oobsize;
>> +
>> + nand_release(&denali->mtd);
>> denali_irq_cleanup(denali->irq, denali);
>> - dma_unmap_single(denali->dev, denali->buf.dma_buf,
>> - denali->mtd.writesize + denali->mtd.oobsize,
>> + dma_unmap_single(denali->dev, denali->buf.dma_buf, bufsize,
>> DMA_BIDIRECTIONAL);
Not sure what is the need to add bufsize here, but the commit message
doesn't reflect the change.
Dinh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists