All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Ricardo Ribalda Delgado
	<ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Subject: Re: [PATCH 1/3] spi: xilinx: Detect stall with Unknown commands
Date: Wed, 22 Nov 2017 11:12:15 +0000	[thread overview]
Message-ID: <20171122111215.2isnpg3nfry3g3ll@sirena.org.uk> (raw)
In-Reply-To: <20171121090904.6901-1-ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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

On Tue, Nov 21, 2017 at 10:09:02AM +0100, Ricardo Ribalda Delgado wrote:

> +		stalled = 10;
>  		while (rx_words) {
> +			if (rx_words == n_words && !(stalled--) &&
> +			    !(sr & XSPI_SR_TX_EMPTY_MASK) &&
> +			    (sr & XSPI_SR_RX_EMPTY_MASK)) {

10 seems like a small number for what is essentially just a busy spin -
are we sure that we won't reasonably hit a case where the CPU is
sufficiently fast and the bus sufficiently slow we falsely detect a
stall?  Where did this number come from?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2017-11-22 11:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21  9:09 [PATCH 1/3] spi: xilinx: Detect stall with Unknown commands Ricardo Ribalda Delgado
     [not found] ` <20171121090904.6901-1-ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-21  9:09   ` [PATCH 2/3] spi: xilinx: Add support for xlnx,axi-quad-spi-1.00.a Ricardo Ribalda Delgado
     [not found]     ` <20171121090904.6901-2-ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-21 18:38       ` Rob Herring
2017-11-27 18:54       ` Applied "spi: xilinx: Add support for xlnx,axi-quad-spi-1.00.a" to the spi tree Mark Brown
2017-11-27 18:54         ` Mark Brown
2017-11-21  9:09   ` [PATCH 3/3] MAINTAINERS: Add Ricardo Ribalda for spi-xilinx Ricardo Ribalda Delgado
2017-11-22 11:12   ` Mark Brown [this message]
     [not found]     ` <20171122111215.2isnpg3nfry3g3ll-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-11-22 19:25       ` [PATCH 1/3] spi: xilinx: Detect stall with Unknown commands Ricardo Ribalda Delgado
     [not found]         ` <CAPybu_2MBMFOy+RDSSai1pGf_+A4AD6=gbyWbZSLEPQetjfBxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-22 19:27           ` Ricardo Ribalda Delgado
2017-11-24 13:04   ` Applied "spi: xilinx: Detect stall with Unknown commands" to the spi tree 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=20171122111215.2isnpg3nfry3g3ll@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@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.