All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yusuke Goda <yusuke.goda.sx@renesas.com>
To: ian@mnementh.co.uk, damm@opensource.se, sameo@linux.intel.com,
	Paul Mundt <lethal@linux-sh.org>,
	g.liakhovetski@gmx.de, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] tmio_mmc: Allow 2 byte requests in 4-bit mode
Date: Tue, 20 Jul 2010 16:52:58 +0900	[thread overview]
Message-ID: <4C4555DA.40203@renesas.com> (raw)

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 <yusuke.goda.sx@renesas.com>
---
 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




             reply	other threads:[~2010-07-20  7:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20  7:52 Yusuke Goda [this message]
2010-07-23 11:05 ` [PATCH] tmio_mmc: Allow 2 byte requests in 4-bit mode Magnus Damm
2010-07-27  7:57   ` Ian Molton
2010-07-27  8:05     ` Magnus Damm
2010-08-20 22:59       ` Magnus Damm
2010-08-20 15:06 ` Arnd Hannemann
2010-08-20 23:01   ` Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4555DA.40203@renesas.com \
    --to=yusuke.goda.sx@renesas.com \
    --cc=akpm@linux-foundation.org \
    --cc=damm@opensource.se \
    --cc=g.liakhovetski@gmx.de \
    --cc=ian@mnementh.co.uk \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.