Re: [PATCH 12/13] sdhci: Add quirk for controllers with max. blocksize up to 4096 bytes

From: Pierre Ossman
Date: Sat Feb 21 2009 - 10:59:32 EST


On Fri, 13 Feb 2009 17:47:39 +0300
Anton Vorontsov <avorontsov@xxxxxxxxxxxxx> wrote:

> @@ -831,7 +832,12 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
> sdhci_set_transfer_irqs(host);
>
> /* We do not handle DMA boundaries, so set it to max (512 KiB) */
> - sdhci_writew(host, SDHCI_MAKE_BLKSZ(7, data->blksz), SDHCI_BLOCK_SIZE);
> + if (host->quirks & SDHCI_QUIRK_MAX_BLK_SZ_4096)
> + blksz = data->blksz;
> + else
> + blksz = SDHCI_MAKE_BLKSZ(7, data->blksz);
> +
> + sdhci_writew(host, blksz, SDHCI_BLOCK_SIZE);
> sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
> }
>

Hmm.. I seem to have overlooked this part previously. I guess they've
basically stripped out the DMA boundary stuff and used the bits for
other things?

At this point I'm leaning more towards simply not supporting their
extended block size. After all, is it ever used?

Rgds
--
-- Pierre Ossman

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.

Attachment: signature.asc
Description: PGP signature