From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dec59.ruk.cuni.cz ([2001:718:1e03:4::11]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZQBD3-0007B2-Hd for linux-mtd@lists.infradead.org; Fri, 14 Aug 2015 09:23:35 +0000 Date: 14 Aug 2015 09:23:06 -0000 Message-Id: From: Michal Suchanek Subject: [PATCH v4 0/7] Add spi-nor SPI transfer error handling To: Hou Zhiqiang , shijie.huang@intel.com, David Woodhouse , Brian Norris , Han Xu , "Rafał Miłecki" , Michal Suchanek , Huang Shijie , Ben Hutchings , Marek Vasut , Gabor Juhos , "Bean Huo 霍斌斌, " , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hello, with these patches SPI transfer errors are not silently ignored but rather reported to spi-nor users. This should prevent silently dropping data to the floor in cases when the SPI transfer fails and the failure is detected. It has been pointed out that MTD users do not handle the case when data is read only partially so this version adds the last patch which handles this in spi-nor. Thanks Michal Michal Suchanek (7): mtd: spi-nor: change return value of read/write mtd: m25p80: return amount of data transferred or error in read/write mtd: fsl-quadspi: return amount of data read/written or error mtd: spi-nor: check return value from read/write mtd: spi-nor: stop passing around retlen mtd: spi-nor: simplify write loop mtd: spi-nor: add read loop drivers/mtd/devices/m25p80.c | 33 +++++++++------ drivers/mtd/spi-nor/fsl-quadspi.c | 29 ++++++------- drivers/mtd/spi-nor/spi-nor.c | 85 +++++++++++++++++++++++---------------- include/linux/mtd/spi-nor.h | 8 ++-- 4 files changed, 91 insertions(+), 64 deletions(-) -- 2.1.4