From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>,
Etienne Basset <etienne.basset@numericable.fr>,
David Miller <davem@davemloft.net>,
rjw@sisk.pl, linux-kernel@vger.kernel.org,
kernel-testers@vger.kernel.org,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, linux-ide@vger.kernel.org
Subject: Re: [Bug #13663] suspend to ram regression (IDE related)
Date: Fri, 03 Jul 2009 23:31:36 +0800 [thread overview]
Message-ID: <1246635096.16890.6.camel@falcon> (raw)
In-Reply-To: <200907031508.47891.bzolnier@gmail.com>
Hi,
> OK, I see another gotcha added by recent changes, we need to explicitly
> initialize rq_in_flight variables now. Revised patch below..
>
Sorry, STD also not work. if apply this patch, the same problem as not
apply it, it stopped at:
...
PM: Crete hibernation image:
PM: Need to copy ... pages
PM: Hibernation image created ...
I think it's better to revert this commit:
a1317f714af7aed60ddc182d0122477cbe36ee9b ("ide: improve handling of
Power Management requests")
Regards,
Wu Zhangjin
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: make resume work again (for real)
>
> It turns out that commit a1317f714af7aed60ddc182d0122477cbe36ee9b
> ("ide: improve handling of Power Management requests") needs to take
> into the account a new code added by the recent block layer changes
> in commit 8f6205cd572fece673da0255d74843680f67f879 ("ide: dequeue
> in-flight request") and prevent clearing of hwif->rq if the device
> is blocked.
>
> Thanks to Etienne, Wu and Jeff for help in fixing the issue.
>
> Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
> Reported-and-tested-by: Etienne Basset <etienne.basset@numericable.fr>
> Reported-by: Wu Zhangjin <wuzhangjin@gmail.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> Added patch description, no other changes.
>
> drivers/ide/ide-io.c | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> Index: b/drivers/ide/ide-io.c
> ===================================================================
> --- a/drivers/ide/ide-io.c
> +++ b/drivers/ide/ide-io.c
> @@ -532,7 +532,8 @@ repeat:
>
> if (startstop == ide_stopped) {
> rq = hwif->rq;
> - hwif->rq = NULL;
> + if ((drive->dev_flags & IDE_DFLAG_BLOCKED) == 0)
> + hwif->rq = NULL;
> goto repeat;
> }
> } else
> @@ -616,7 +617,7 @@ void ide_timer_expiry (unsigned long dat
> unsigned long flags;
> int wait = -1;
> int plug_device = 0;
> - struct request *uninitialized_var(rq_in_flight);
> + struct request *rq_in_flight = NULL;
>
> spin_lock_irqsave(&hwif->lock, flags);
>
> @@ -679,8 +680,10 @@ void ide_timer_expiry (unsigned long dat
> spin_lock_irq(&hwif->lock);
> enable_irq(hwif->irq);
> if (startstop == ide_stopped && hwif->polling == 0) {
> - rq_in_flight = hwif->rq;
> - hwif->rq = NULL;
> + if ((drive->dev_flags & IDE_DFLAG_BLOCKED) == 0) {
> + rq_in_flight = hwif->rq;
> + hwif->rq = NULL;
> + }
> ide_unlock_port(hwif);
> plug_device = 1;
> }
> @@ -775,7 +778,7 @@ irqreturn_t ide_intr (int irq, void *dev
> ide_startstop_t startstop;
> irqreturn_t irq_ret = IRQ_NONE;
> int plug_device = 0;
> - struct request *uninitialized_var(rq_in_flight);
> + struct request *rq_in_flight = NULL;
>
> if (host->host_flags & IDE_HFLAG_SERIALIZE) {
> if (hwif != host->cur_port)
> @@ -856,8 +859,10 @@ irqreturn_t ide_intr (int irq, void *dev
> */
> if (startstop == ide_stopped && hwif->polling == 0) {
> BUG_ON(hwif->handler);
> - rq_in_flight = hwif->rq;
> - hwif->rq = NULL;
> + if ((drive->dev_flags & IDE_DFLAG_BLOCKED) == 0) {
> + rq_in_flight = hwif->rq;
> + hwif->rq = NULL;
> + }
> ide_unlock_port(hwif);
> plug_device = 1;
> }
next prev parent reply other threads:[~2009-07-03 15:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <etTXaRqGgAC.A.SaE.6iASKB@chimera>
[not found] ` <5Hhc7UkUKEO.A.RvE.BjASKB@chimera>
[not found] ` <4A489775.6020102@numericable.fr>
[not found] ` <20090629.033730.193709457.davem@davemloft.net>
[not found] ` <4A48E307.2010208@numericable.fr>
[not found] ` <b6a2187b0906290921w15afd443qccb943ccfd48688b@mail.gmail.com>
[not found] ` <b6a2187b0907010731k510150b5u1c7fce8cbed7c33b@mail.gmail.com>
[not found] ` <b6a2187b0907010731k510150b5u1c7fce8cbed7c33b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-01 14:47 ` [Bug #13663] suspend to ram regression (IDE related) Wu Zhangjin
2009-07-01 16:21 ` Bartlomiej Zolnierkiewicz
[not found] ` <200907011821.26091.bzolnier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-07-01 16:29 ` Bartlomiej Zolnierkiewicz
[not found] ` <200907011829.16850.bzolnier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-07-01 17:28 ` Jeff Chua
[not found] ` <b6a2187b0907011028r27d35be4xc62c7ed4496dfb2f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-01 21:30 ` Etienne Basset
2009-07-02 1:46 ` Wu Zhangjin
2009-07-02 2:09 ` Jeff Chua
2009-07-02 10:46 ` Ralf Baechle
2009-07-02 16:13 ` Bartlomiej Zolnierkiewicz
[not found] ` <200907021813.57322.bzolnier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-07-03 3:58 ` Wu Zhangjin
2009-07-03 4:06 ` Wu Zhangjin
2009-07-03 13:08 ` Bartlomiej Zolnierkiewicz
2009-07-03 15:31 ` Wu Zhangjin [this message]
2009-07-06 14:57 ` Bartlomiej Zolnierkiewicz
2009-07-06 19:22 ` David Miller
2009-06-28 22:57 [Bug 13663] New: " bugzilla-daemon
2009-06-28 22:57 ` [Bug 13663] " bugzilla-daemon
2009-06-29 23:25 ` bugzilla-daemon
2009-07-07 20:32 ` bugzilla-daemon
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=1246635096.16890.6.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=bzolnier@gmail.com \
--cc=davem@davemloft.net \
--cc=etienne.basset@numericable.fr \
--cc=jeff.chua.linux@gmail.com \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rjw@sisk.pl \
/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;
as well as URLs for NNTP newsgroup(s).