From: Oleksij Rempel <linux@rempel-privat.de>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: add new au6601 driver
Date: Thu, 02 Oct 2014 13:49:57 +0200 [thread overview]
Message-ID: <542D3BE5.2050407@rempel-privat.de> (raw)
In-Reply-To: <CAPDyKFoAzeYjvuP=5W8r7NQjnL9OzWXP=+Y+b_1ZZgWRbUXsZg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2089 bytes --]
Am 30.09.2014 um 13:00 schrieb Ulf Hansson:
> On 30 September 2014 12:11, Oleksij Rempel <linux@rempel-privat.de> wrote:
>> Am 09.07.2014 um 14:52 schrieb Ulf Hansson:
>>> [snip]
>>>
>>>>>
>>>>> I am just a bit curious, does this controller support hardware busy
>>>>> detection on DAT1 line while waiting for command completion?
>>>>
>>>> Do you mean AU6601_REG_BUS_STATUS?
>>>> See at the beginning of patch.
>>>
>>> While reviewing the code, it seems like the controller are handling
>>> hardware busy detection on DAT1. On the other hand you don't enable
>>> MMC_CAP_WAIT_WHILE_BUSY, shouldn't you be doing that?
>>
>> Hi Ulf,
>>
>> what is better way to use sg with dma? This controller support only
>> 0x4000 alight addresses. It is possible to solve it per driver basis,
>> but i have seen already more then one driver which need it. Should it be
>> done in mmc block code? Any other suggestions?
>
> I don't quite follow. Does your DMA controller put constraints on
> buffer alignment/length or is it the mmc controller?
mmc controller. it can only accept addresses aligned to the PAGE_SIZE.
> I am aware of that drivers may have special treatments of buffer
> alignment/length to be able to handle some corner cases. And yes we
> don't have a common interface in the mmc core to handle that. I am not
> sure how that could be done? Do you have any suggestions?
hmm... theoretically SG allocation should always be page aligned.
Right now i found probable reason for this issue. Looks like i
misinterpreted max_segs parameter. If i use value bigger then 1, then
can get fragmented SG request. For example, by limit to blk_size=512,
block_count=8 and max_segs > 1 request will be 4K (=page size), but the
request can be spread to different pages with offsets != the page begin.
Which is not optimal for many reasons. On other side, if max_segs=1,
then all requests will be aligned.
I don't know if it is expected behavior. If yes, then looks like some
drivers can be simplified just by setting max_segs=1.
--
Regards,
Oleksij
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
next prev parent reply other threads:[~2014-10-02 11:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 9:58 [PATCH] mmc: add new au6601 driver Oleksij Rempel
2014-05-14 7:19 ` Oleksij Rempel
2014-05-26 7:50 ` Repost: " Oleksij Rempel
2014-06-16 10:02 ` Ulf Hansson
2014-07-02 9:48 ` Oleksij Rempel
2014-07-09 12:52 ` Ulf Hansson
2014-09-27 7:11 ` [PATCH v2] " Oleksij Rempel
2014-10-08 6:58 ` Oleksij Rempel
2014-10-08 7:46 ` Ulf Hansson
2014-10-17 12:37 ` Venkatraman S
2014-10-18 6:26 ` Oleksij Rempel
2014-11-04 10:37 ` Oleksij Rempel
2014-09-30 10:11 ` [PATCH] " Oleksij Rempel
2014-09-30 11:00 ` Ulf Hansson
2014-10-02 11:49 ` Oleksij Rempel [this message]
2014-07-03 13:54 ` Oleksij Rempel
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=542D3BE5.2050407@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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