Linux SPI subsystem development
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: linux-spi <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org
Subject: Re: [PATCH] spi: Add a timeout when waiting for transfers
Date: Fri, 31 Jan 2014 11:49:35 +0000	[thread overview]
Message-ID: <20140131114935.GA22609@sirena.org.uk> (raw)
In-Reply-To: <CAMuHMdUVmL5Zq8AYPVmUyWEBTzokSMV-Xg4uFzpxr7c2uSmU7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

On Fri, Jan 31, 2014 at 08:49:45AM +0100, Geert Uytterhoeven wrote:

> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -829,6 +829,9 @@ void spi_finalize_current_message(struct spi_master *master)
>           queue_kthread_work(&master->kworker, &master->pump_messages);
>           spin_unlock_irqrestore(&master->queue_lock, flags);
> 
> +         if (!mesg)
> +                 return NULL;
> +

Note that this is for transfers, not for messages, and we don't change
the completion path for the message here so I'm not sure why the message
would be affected?  That said there is definitely an issue here - we
should probably be adding some sort of error teardown callback to try to
stop the hardware if we do hit a timeout.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-01-31 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 22:38 [PATCH] spi: Add a timeout when waiting for transfers Mark Brown
     [not found] ` <1391121536-10937-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-01-31  7:49   ` Geert Uytterhoeven
     [not found]     ` <CAMuHMdUVmL5Zq8AYPVmUyWEBTzokSMV-Xg4uFzpxr7c2uSmU7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-31 11:49       ` Mark Brown [this message]
     [not found]         ` <20140131114935.GA22609-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-01-31 12:00           ` Geert Uytterhoeven
     [not found]             ` <CAMuHMdXLe+Ot5ntOtUC2Qynid4mv1h+UoitJuDW=Z-iyRKXCdg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-31 12:26               ` Mark Brown
     [not found]                 ` <20140131122617.GC22609-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-03  8:55                   ` Geert Uytterhoeven
     [not found]                     ` <CAMuHMdXgDAPy4aezxULQsjiRUfyE3F2_NSjuWhBiy119DSXR5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-04 17:45                       ` Mark Brown

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=20140131114935.GA22609@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox