mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org,
	 Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: Re: [PATCH] spi: Fix hang on spi_sync() when driver does not support transfer() call
Date: Fri, 10 Jan 2025 09:28:58 +0100	[thread overview]
Message-ID: <173649773804.351535.9628438933893487626.b4-ty@pengutronix.de> (raw)
In-Reply-To: <20250110075010.28030-1-eagle.alexander923@gmail.com>


On Fri, 10 Jan 2025 10:50:10 +0300, Alexander Shiyan wrote:
> When a driver does not support transfer() call, such as most QSPI drivers,
> calling spi_sync() (e.g. with the "spi" command) will cause the system
> to hang. Fix this by adding a function check.
> 
> barebox@Mega-Milas Informer SAMA5D2:/ spi -b 1 -c 0 0xaa
> prefetch abort
> pc : [<00000004>]    lr : [<27e266a4>]
> sp : 27ff7c78  ip : 27ff7ce8  fp : 27e87410
> r10: 27ff7d20  r9 : 00000000  r8 : 23f58128
> r7 : 23f33c30  r6 : 27ff7c90  r5 : 27ff7d20  r4 : 27ff7c7c
> r3 : 00000000  r2 : 27ff7cc4  r1 : 27ff7c90  r0 : 27ff7d20
> Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
> [<27e266a4>] (spi_sync+0xc8/0xdc) from [<27e2675c>] (spi_write_then_read+0xa4/0xac)
> [<27e2675c>] (spi_write_then_read+0xa4/0xac) from [<27e438e4>] (do_spi+0x288/0x3e8)
> [<27e438e4>] (do_spi+0x288/0x3e8) from [<27e05c38>] (execute_command+0x3c/0x80)
> [<27e05c38>] (execute_command+0x3c/0x80) from [<27e0ee48>] (run_list_real+0x9a8/0xad8)
> [<27e0ee48>] (run_list_real+0x9a8/0xad8) from [<27e0e2b4>] (parse_stream_outer+0x138/0x200)
> [<27e0e2b4>] (parse_stream_outer+0x138/0x200) from [<27e0f180>] (run_shell+0x5c/0x90)
> [<27e0f180>] (run_shell+0x5c/0x90) from [<27e018b4>] (run_init+0x108/0x288)
> [<27e018b4>] (run_init+0x108/0x288) from [<27e01a8c>] (start_barebox+0x58/0xb4)
> [<27e01a8c>] (start_barebox+0x58/0xb4) from [<27e5ee18>] (barebox_non_pbl_start+0xc8/0xe0)
> [<27e5ee18>] (barebox_non_pbl_start+0xc8/0xe0) from [<27e00004>] (__bare_init_start+0x0/0x10)
> 
> [...]

Applied, thanks!

[1/1] spi: Fix hang on spi_sync() when driver does not support transfer() call
      https://git.pengutronix.de/cgit/barebox/commit/?id=0b1be52382e9 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




      reply	other threads:[~2025-01-10  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  7:50 Alexander Shiyan
2025-01-10  8:28 ` Sascha Hauer [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=173649773804.351535.9628438933893487626.b4-ty@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@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