From: Phil Wilshire <pwilshire-j9pdmedNgrk@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org,
uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: spi_mmc bus concurrency fix
Date: Thu, 28 Feb 2008 03:15:06 -0500 [thread overview]
Message-ID: <47C66D8A.3010904@cox.net> (raw)
In-Reply-To: <200802272155.29706.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
David Brownell wrote:
> On Wednesday 27 February 2008, Phil Wilshire wrote:
>> Thats why I wanted an optional callback after each single transfer.
>
> That would preclude using chained DMA requests in those cases, but
> presumably that'd be OK in this context.
>
>
>> So if you are waiting for a status byte in the spi data
>> then the callback would add the a small read transfer a few times while
>> checking the status.
>
> Just a few? If you're assuming it would add a new spi_transfer after
> the existing ones in that message ... that could add up to quite a lot
> of additional transfers, presumably ones that are dynamically allocated.
>
> I've seen some MMC/SD cards need quite a lot of polling there...
>
>
>> When it times out (IE reaches a max retry limit) then the transfer can
>> be halted returning some kind of failure state.
>>
>> If the correct status is found then the next transfer can be the data to
>> be written to the device.
>>
>> I thought about the single device queue based in chip select but that
>> looked a but more complex.
>
> That is, one queue per device. Yes, more complicated than one
> shared between devices. I was just pointing that out as an option
> that could be implemented transparently ... albeit not portably.
>
>
>> With the TRANSFER callback we have a good (IMHO) way to modify the
>> message flow based on the data contents.
>>
>> The complete function may need two arguments. One to hold the SPI
>> Transfer in progress and the other to hold user state
>> (like max read loops and final state).
>>
>> Let me know if this would fit in the "overall formal design" and I'll
>> stop hacking a custom solution.
>
> It doesn't seem like the right approach to me. In the specific use
> case of an MMC interface, three'd be a *LOT* of those callbacks, each
> adding another transfer to the current message.
>
> And that breaks assumptions like being able to validate entire
> messages before starting to process them, bounded memory use,
> and so on. I'd far rather see something that does less damage
> to the underlying models.
>
> - Dave
>
>
Hi Dave,
I agree, I did have some concerns about the callback issue.
It also looks like we have enough people + momentum on this problem to
get a fix in good time. So I'll wait to see what happens.
Thanks for the reply
Phil Wilshire
next prev parent reply other threads:[~2008-02-28 8:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <47C42D50.7020204@rubico.se>
[not found] ` <47C42D50.7020204-9ai+6vhHfRGzQB+pC5nmwQ@public.gmane.org>
2008-02-27 4:23 ` [Uclinux-dist-devel] spi_mmc bus concurrency fix Bryan Wu
[not found] ` <386072610802262023t6bd22875kfeb58c797be66024-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-27 4:46 ` David Brownell
[not found] ` <200802262046.29906.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-27 18:15 ` Mike Frysinger
2008-02-28 3:53 ` Bryan Wu
[not found] ` <200802271036.07909.david-b@pacbell.net>
[not found] ` <47C5B084.6050408@cox.net>
[not found] ` <47C5B084.6050408-j9pdmedNgrk@public.gmane.org>
2008-02-28 5:55 ` [Uclinux-dist-devel] " David Brownell
[not found] ` <200802272155.29706.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-28 8:15 ` Phil Wilshire [this message]
[not found] ` <47C66D8A.3010904-j9pdmedNgrk@public.gmane.org>
2008-03-12 22:01 ` David Brownell
[not found] ` <200803121501.19131.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-03-20 11:22 ` [spi-devel-general] " Hans Eklund
2008-03-25 10:25 ` Hans Eklund
[not found] ` <200802270159.33231.david-b@pacbell.net>
[not found] ` <386072610802272023o71b99c2bn4d28547bd8783c9c@mail.gmail.com>
[not found] ` <386072610802272023o71b99c2bn4d28547bd8783c9c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-28 6:04 ` [Uclinux-dist-devel] " David Brownell
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=47C66D8A.3010904@cox.net \
--to=pwilshire-j9pdmedngrk@public.gmane.org \
--cc=bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.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 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.