The hardware does not support any multi-block transfers
with an block-size that is not aligned. Also the driver
itself does not support single block non-32bit transfers
either.
Ensure that the s3cmci_setup_data() returns the appropriate
error if we encounter this.
Signed-off-by: Ben Dooks <[email protected]>
Index: linux-2.6.26-rc8-next20080627/drivers/mmc/host/s3cmci.c
===================================================================
--- linux-2.6.26-rc8-next20080627.orig/drivers/mmc/host/s3cmci.c 2008-06-30 12:38:22.000000000 +0100
+++ linux-2.6.26-rc8-next20080627/drivers/mmc/host/s3cmci.c 2008-06-30 12:38:46.000000000 +0100
@@ -808,6 +808,17 @@ static int s3cmci_setup_data(struct s3cm
return 0;
}
+ if ((data->blksz & 3) != 0) {
+ /* We cannot deal with unaligned blocks with more than
+ * one block being transfered. */
+
+ if (data->blocks > 1)
+ return -EINVAL;
+
+ /* No support yet for non-word block transfers. */
+ return -EINVAL;
+ }
+
while (readl(host->base + S3C2410_SDIDSTA) &
(S3C2410_SDIDSTA_TXDATAON | S3C2410_SDIDSTA_RXDATAON)) {
--
Ben ([email protected], http://www.fluff.org/)
'a smiley only costs 4 bytes'
On Mon, Jun 30, 2008 at 04:26:04PM +0100, Ben Dooks wrote:
Should I resend this one, or the entire series with the
subject line of this patch corrected?
--
Ben ([email protected], http://www.fluff.org/)
'a smiley only costs 4 bytes'
On Mon, 30 Jun 2008 16:36:11 +0100
Ben Dooks <[email protected]> wrote:
> On Mon, Jun 30, 2008 at 04:26:04PM +0100, Ben Dooks wrote:
>
> Should I resend this one, or the entire series with the
> subject line of this patch corrected?
>
That's ok. I can fix it up manually.
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.