Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755878AbbEUIkm (ORCPT ); Thu, 21 May 2015 04:40:42 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33708 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753162AbbEUIjz (ORCPT ); Thu, 21 May 2015 04:39:55 -0400 MIME-Version: 1.0 In-Reply-To: <20150520233835.GX11598@ld-irv-0074> References: <50c40ef17ab6566f35ef5a4426bf23567f896db7.1430403750.git.hramrach@gmail.com> <20150520233835.GX11598@ld-irv-0074> From: Michal Suchanek Date: Thu, 21 May 2015 10:39:13 +0200 Message-ID: Subject: Re: [PATCH 2/3] MTD: spi-nor: check for short writes in spi_nor_write. To: Brian Norris Cc: linux-sunxi , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Woodhouse , Marek Vasut , Huang Shijie , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Ben Hutchings , Alison Chaiken , Mika Westerberg , =?UTF-8?B?QmVhbiBIdW8g6ZyN5paM5paMIChiZWFuaHVvKQ==?= , "grmoore@altera.com" , devicetree , Linux Kernel Mailing List , linux-mtd@lists.infradead.org, linux-spi , Mark Brown Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1211 Lines: 36 On 21 May 2015 at 01:38, Brian Norris wrote: > + linux-spi, Mark > > On Thu, Apr 30, 2015 at 03:38:50PM +0200, Michal Suchanek wrote: >> My SPI controller driver does not support DMA so writes are truncated to >> FIFO size. > > Which SPI master driver? I am using sunxi SPI driver. The dmaengine support for sunxi is not yet in mainline kernel so the SPI master functionality is limited. > >> Check the amount of data actually written by the driver. > > I'm not sure if we should just reactively use the retlen, or if we > should be communicating such a limitation via the SPI API. Thoughts? > Is there any driver that would break if the SPI master truncated writes when the message is too long rather than returning an error an refusing the transfer? m25p80 as is would because it assumes all data is always written. Some display driver I tried earlier has an option to limit transfer size actively in the driver. Thanks Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/