Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758182Ab0GTHzK (ORCPT ); Tue, 20 Jul 2010 03:55:10 -0400 Received: from mail.renesas.com ([202.234.163.13]:35784 "EHLO mail01.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754681Ab0GTHzH (ORCPT ); Tue, 20 Jul 2010 03:55:07 -0400 X-AuditID: ac140384-0000000b000004f6-71-4c4555dc6f58 Date: Tue, 20 Jul 2010 16:52:58 +0900 From: Yusuke Goda Subject: [PATCH] tmio_mmc: Allow 2 byte requests in 4-bit mode To: ian@mnementh.co.uk, damm@opensource.se, sameo@linux.intel.com, Paul Mundt , g.liakhovetski@gmx.de, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andrew Morton Message-id: <4C4555DA.40203@renesas.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-2022-JP Content-transfer-encoding: 7bit User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1293 Lines: 33 Adjust the tmio_mmc block size check to accept 2-byte requests in 4-bit mode. Tested with the SDHI hardware block included in sh7724. Signed-off-by: Yusuke Goda --- drivers/mmc/host/tmio_mmc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index ee7d0a5..f49d945 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -660,8 +660,8 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host, pr_debug("setup data transfer: blocksize %08x nr_blocks %d\n", data->blksz, data->blocks); - /* Hardware cannot perform 1 and 2 byte requests in 4 bit mode */ - if (data->blksz < 4 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) { + /* Hardware cannot perform 1 byte requests in 4 bit mode */ + if (data->blksz < 2 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) { pr_err("%s: %d byte block unsupported in 4 bit mode\n", mmc_hostname(host->mmc), data->blksz); return -EINVAL; -- 1.7.0 -- 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/