From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Ulf Hansson <ulf.hansson@stericsson.com>
Cc: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>,
linux-arm-kernel@lists.infradead.org,
Linus Walleij <linus.walleij@linaro.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Per Forlin <per.forlin@stericsson.com>
Subject: Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant
Date: Wed, 21 Nov 2012 15:38:11 +0000 [thread overview]
Message-ID: <20121121153811.GN3290@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1350050522-8852-1-git-send-email-ulf.hansson@stericsson.com>
On Fri, Oct 12, 2012 at 04:02:02PM +0200, Ulf Hansson wrote:
> /*
> + * Validate mmc prerequisites
> + */
> +static int mmci_validate_data(struct mmci_host *host,
> + struct mmc_data *data)
> +{
> + if (!data)
> + return 0;
> +
> + if (!host->variant->non_power_of_2_blksize &&
> + !is_power_of_2(data->blksz)) {
> + dev_err(mmc_dev(host->mmc),
> + "unsupported block size (%d bytes)\n", data->blksz);
> + return -EINVAL;
> + }
> +
> + if (data->sg->offset & 3) {
> + dev_err(mmc_dev(host->mmc),
> + "unsupported alginment (0x%x)\n", data->sg->offset);
> + return -EINVAL;
> + }
Why? What's the reasoning behind this suddenly introduced restriction?
readsl()/writesl() copes just fine with non-aligned pointers. It may be
that your DMA engine can not, but that's no business interfering with
non-DMA transfers, and no reason to fail such transfers.
If your DMA engine can't do that then its your DMA engine code which
should refuse to prepare the transfer.
Yes, that means problems with the way things are ordered - or it needs a
proper API where DMA engine can export these kinds of properties.
next prev parent reply other threads:[~2012-11-21 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 14:02 [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant Ulf Hansson
2012-10-12 21:22 ` Linus Walleij
2012-10-15 10:24 ` Johan Rudholm
2012-11-21 15:38 ` Russell King - ARM Linux [this message]
2012-11-21 16:13 ` Per Forlin
2012-11-21 16:50 ` Russell King - ARM Linux
2012-11-22 13:43 ` Ulf Hansson
2012-11-22 14:50 ` Russell King - ARM Linux
2012-11-22 17:28 ` Per Forlin
2012-11-22 17:37 ` Russell King - ARM Linux
2012-11-26 10:20 ` Per Förlin
2012-11-26 10:27 ` Russell King - ARM Linux
2012-11-26 10:52 ` Per Förlin
2012-11-28 16:55 ` Per Forlin
2012-11-28 17:12 ` Russell King - ARM Linux
2012-11-29 11:38 ` Ulf Hansson
2012-12-21 10:36 ` Ulf Hansson
2012-12-21 10:39 ` Russell King - ARM Linux
2012-12-21 10:43 ` Ulf Hansson
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=20121121153811.GN3290@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=cjb@laptop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=per.forlin@stericsson.com \
--cc=ulf.hansson@linaro.org \
--cc=ulf.hansson@stericsson.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox