LKML Archive on
 help / color / Atom feed
From: Daisuke Yamane <>
To: Mark Brown <>
Subject: Re: [PATCH] spi: a3700: fix hang caused by a3700_spi_transfer_one_fifo()
Date: Wed, 1 Jul 2020 22:18:04 +0900
Message-ID: <> (raw)
In-Reply-To: <>

2020年6月30日(火) 20:11 Mark Brown <>:
> On Tue, Jun 30, 2020 at 02:44:21AM +0900, Daisuke Yamane wrote:
> > transfer_one() must call spi_finalize_current_transfer() before
> > returning to inform current transfer has finished. Otherwise spi driver
> > doesn't issue next transfer, and hang.
> To be clear it can also return a positive value and then finalize later,
> there's no need to finalize before returning (otherwise finalizing would
> be a bit redundant) and if the driver doesn't return a positive value
> there should be no need to finalize at all.
> > However a3700_spi_transfer_one_fifo() doesn't call it if waiting for
> > "wfifo empty" or "xfer ready" has timed out.
> > Thus, this patch corrects error handling of them.
> The core shouldn't be waiting at all if the driver returned an error, we
> only wait if the return value was positive.  Looking at the code it's
> not clear to me how we manage to end up waiting - it looks like the
> driver passes back the error correctly and the core looks like it does
> the right thing.  Have you seen hangs in operation?
Yes, and I could avoid hanging by this patch. But I also understand that
your point is correct. Probably I'm misunderstanding the cause of the hang.
I will investigate a little more.

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 17:44 Daisuke Yamane
2020-06-30 11:11 ` Mark Brown
2020-07-01 13:18   ` Daisuke Yamane [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone