From: Linus Walleij <linus.walleij@linaro.org>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
spi-devel-general@lists.sourceforge.net,
Lee Jones <lee.jones@linaro.org>,
linux-arm-kernel@lists.infradead.org,
Magnus Templing <magnus.templing@stericsson.com>
Subject: Re: [PATCH 1/2] spi/pl022: timeout on polled transfer v2
Date: Thu, 19 May 2011 19:36:23 +0200 [thread overview]
Message-ID: <BANLkTi=mQbPt9rcqEVyMLy3rkF2D7FMh=g@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=s4nzi=5f+Vvh3ABuspnKXQVUfLw@mail.gmail.com>
2011/5/19 Vitaly Wool <vitalywool@gmail.com>:
>> +
>> + timeout = jiffies + msecs_to_jiffies(SPI_POLLING_TIMEOUT);
>> + while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end) {
>> + time = jiffies;
>> readwriter(pl022);
>> + if (time_after(time, timeout)) {
>> + dev_warn(&pl022->adev->dev,
>> + "%s: timeout!\n", __func__);
>> + message->state = STATE_ERROR;
>> + goto out;
>> + }
>> + }
>
> just out of curiosity: is it a busy wait? Looks like it is...
Yep that's the polling mode part. IRQ and DMA mode should
be the norm I guess.
Magnus: do you have a specific use case for this thing?
Yours,
Linus Walleij
next prev parent reply other threads:[~2011-05-19 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 16:05 [PATCH 1/2] spi/pl022: timeout on polled transfer v2 Linus Walleij
2011-05-19 16:55 ` Grant Likely
[not found] ` <1305821134-26147-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2011-05-19 17:04 ` Vitaly Wool
2011-05-19 17:36 ` Linus Walleij [this message]
2011-05-19 17:40 ` Vitaly Wool
2011-05-19 18:06 ` Linus Walleij
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='BANLkTi=mQbPt9rcqEVyMLy3rkF2D7FMh=g@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=grant.likely@secretlab.ca \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=magnus.templing@stericsson.com \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=vitalywool@gmail.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;
as well as URLs for NNTP newsgroup(s).