From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Linus Walleij <linus.walleij@linaro.org>,
Olof Johansson <olof@lixom.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bryan Freed <bfreed@chromium.org>,
spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [REPOST PATCH] spi: Unlock a spinlock before calling into the controller driver.
Date: Mon, 1 Apr 2013 14:24:08 +0100 [thread overview]
Message-ID: <20130401132407.GL18636@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1363198660-21656-1-git-send-email-dianders@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
On Wed, Mar 13, 2013 at 11:17:40AM -0700, Doug Anderson wrote:
> From: Bryan Freed <bfreed@chromium.org>
>
> spi_pump_messages() calls into a controller driver with
> unprepare_transfer_hardware() which is documented as "This may sleep".
> As in the prepare_transfer_hardware() call below, we should release the
> queue_lock spinlock before making the call.
> Rework the logic a bit to hold queue_lock to protect the 'busy' flag,
> then release it to call unprepare_transfer_hardware().
Applied, thanks. However...
> spin_unlock_irqrestore(&master->queue_lock, flags);
> + if (master->unprepare_transfer_hardware &&
> + master->unprepare_transfer_hardware(master))
> + dev_err(&master->dev,
> + "failed to unprepare transfer hardware\n");
...it'd be nicer to pay attention to and log the error code if we fail
to unprepare.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-04-01 13:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 23:53 [PATCH] spi: Unlock a spinlock before calling into the controller driver Bryan Freed
2012-06-24 23:54 ` Olof Johansson
[not found] ` <CAOesGMgq5HRz+pDFQtED5GPN0RUrON=_k_y4YHHzKrMkHnVk4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-25 17:07 ` Doug Anderson
[not found] ` <CAD=FV=UpBG8gmPjWDF0M9EMSvs4pg7icocMXJ1r3Lmi8frZsrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-25 18:56 ` Linus Walleij
[not found] ` <1340409205-23606-1-git-send-email-bfreed-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-06-25 19:01 ` Linus Walleij
2013-03-13 18:17 ` [REPOST PATCH] " Doug Anderson
2013-04-01 13:24 ` Mark Brown [this message]
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=20130401132407.GL18636@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=bfreed@chromium.org \
--cc=dianders@chromium.org \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=spi-devel-general@lists.sourceforge.net \
/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).