From: Ned Forrester <nforrester-/d+BM93fTQY@public.gmane.org>
To: Zik Saleeba <zik-fsgeVU6Z5FysTnJN9+BGXg@public.gmane.org>
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Stephen Street
<stephen-nl6u4wocdmy51APUEpUfAkEOCMrvLtNR@public.gmane.org>
Subject: Re: Problems with suspend/resume of pxa2xx_spi
Date: Wed, 20 Feb 2008 23:31:32 -0500 [thread overview]
Message-ID: <47BCFEA4.1090105@whoi.edu> (raw)
In-Reply-To: <33e9dd1c0802201932v6873415bm9202ad478f192b7f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Zik Saleeba wrote:
> I've been having some more problems with my SPI application on the
> PXA270. When I suspend the system it all goes into suspend mode
> correctly but when it comes back on resume any call to the pxa2xx_spi
> code just hangs.
>
> Has anyone experienced this? Has anyone used suspend/resume
> successfully with pxa2xx_spi?
I think it is more likely that no one has tried it. What version of
the driver/kernel are you using? I think David recently removed some
obsolete stuff related to suspend/resume, but I don't know if there is
any reason why it would or wouldn't work in any particular version of
the kernel.
I'm not sure what you mean by "it all goes into suspend mode correctly".
If it does not resume, it seems possible that the errors could be
related to either the suspend or the resume process, if the proper
state is not remembered or restored.
Does the whole system hang (deadlock in kernel) or is it only the spi
that is stuck?
I presume you have CONFIG_PM set in the kernel config? It is not set in
my kernel, by default. If not set, the suspend/resume functions are NULL.
The suspend/resume support in the driver is pretty simple. It stops the
message queue, and waits for the message queue to drain (timeout if 5sec
if it fails to drain), then it stops the SSP hardware and clock. On
resume, it restarts the clock and queue, and then any initial message
will cause the SSP to be restarted (at the bottom of pump_transfers) in
due course.
There may be a bug in the suspend routine. If stop_queue() fails (queue
does not drain), pxa2xx_spi_suspend() returns with an error code, but no
message. I don't know if the calling routine is responding to the error
code, but I bet not; what's it going to do, anyway. If this happens,
the SSP will not be shut down, and the clock not stopped. It seems like
these actions should occur, with or without a successful queue stop.
You could add a printk in suspend to see if it is completing properly.
David:
Should there be a message if there is an error on suspend, or are
suspending devices supposed to be silent and do the best they can?
--
Ned Forrester nforrester-/d+BM93fTQY@public.gmane.org
Oceanographic Systems Lab 508-289-2226
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA
http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212
http://www.whoi.edu/hpb/Site.do?id=1532
http://www.whoi.edu/page.do?pid=10079
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-02-21 4:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 3:32 Problems with suspend/resume of pxa2xx_spi Zik Saleeba
[not found] ` <33e9dd1c0802201932v6873415bm9202ad478f192b7f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-21 4:31 ` Ned Forrester [this message]
[not found] ` <47BCFEA4.1090105-/d+BM93fTQY@public.gmane.org>
2008-02-21 19:38 ` David Brownell
2008-02-28 23:02 ` Zik Saleeba
[not found] ` <33e9dd1c0802281502x3d045a03pcb6282a781ac4e56-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-29 0:35 ` Zik Saleeba
[not found] ` <33e9dd1c0802281635v18bcdd49te38d49e7a24abacf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-29 0:56 ` David Brownell
[not found] ` <200802281656.45757.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-29 1:02 ` Zik Saleeba
2008-02-29 1:31 ` Ned Forrester
[not found] ` <47C76057.30705-/d+BM93fTQY@public.gmane.org>
2008-02-29 1:44 ` Zik Saleeba
[not found] ` <33e9dd1c0802281744g48c74670v6b71ced41edf1300-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-29 2:11 ` Ned Forrester
2008-02-29 4:31 ` Ned Forrester
[not found] ` <47C78A98.6010808-/d+BM93fTQY@public.gmane.org>
2008-02-29 23:50 ` Zik Saleeba
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=47BCFEA4.1090105@whoi.edu \
--to=nforrester-/d+bm93ftqy@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=stephen-nl6u4wocdmy51APUEpUfAkEOCMrvLtNR@public.gmane.org \
--cc=zik-fsgeVU6Z5FysTnJN9+BGXg@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.