All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Simon Holm Thøgersen" <odie@cs.aau.dk>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, linux-ide@vger.kernel.org
Subject: Re: regression: 295f000 breaks suspend to disk
Date: Wed, 14 Jan 2009 18:44:25 +0100	[thread overview]
Message-ID: <1231955065.3246.0.camel@odie.local> (raw)
In-Reply-To: <200901141816.47422.bzolnier@gmail.com>

ons, 14 01 2009 kl. 18:16 +0100, skrev Bartlomiej Zolnierkiewicz:
> On Monday 12 January 2009, Simon Holm Thøgersen wrote:
> > commit 295f000 ("ide: don't execute the next queued command from the
> > hard-IRQ context (v2)") breaks suspend to disk for me. On
> > 'echo disk > /sys/power/state' the systems hangs, letting me switch
> > virtual consoles, but not responding to Alt+SysRq
> 
> Thanks, please try the patch below (it fixes the problem for me):

And for me as well. Thanks!


Simon

> 
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: fix suspend regression
> 
> On Monday 12 January 2009, Simon Holm Thøgersen wrote:
> > commit 295f000 ("ide: don't execute the next queued command from the
> > hard-IRQ context (v2)") breaks suspend to disk for me. On
> > 'echo disk > /sys/power/state' the systems hangs, letting me switch
> > virtual consoles, but not responding to Alt+SysRq
> 
> Restart the request queue early for REQ_TYPE_PM_RESUME requests
> (though there is only one resume request for the whole resume
> sequence it stays in the queue until is fully completed and now
> depends on kblockd for processing consequential resume states).
> 
> Reported-and-bisected-by: Simon Holm Thøgersen <odie@cs.aau.dk>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/ide-pm.c |   12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> Index: b/drivers/ide/ide-pm.c
> ===================================================================
> --- a/drivers/ide/ide-pm.c
> +++ b/drivers/ide/ide-pm.c
> @@ -186,12 +186,10 @@ void ide_complete_pm_request(ide_drive_t
>  	       blk_pm_suspend_request(rq) ? "suspend" : "resume");
>  #endif
>  	spin_lock_irqsave(q->queue_lock, flags);
> -	if (blk_pm_suspend_request(rq)) {
> +	if (blk_pm_suspend_request(rq))
>  		blk_stop_queue(q);
> -	} else {
> +	else
>  		drive->dev_flags &= ~IDE_DFLAG_BLOCKED;
> -		blk_start_queue(q);
> -	}
>  	spin_unlock_irqrestore(q->queue_lock, flags);
>  
>  	drive->hwif->rq = NULL;
> @@ -219,6 +217,8 @@ void ide_check_pm_state(ide_drive_t *dri
>  		 * point.
>  		 */
>  		ide_hwif_t *hwif = drive->hwif;
> +		struct request_queue *q = drive->queue;
> +		unsigned long flags;
>  		int rc;
>  #ifdef DEBUG_PM
>  		printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name);
> @@ -231,5 +231,9 @@ void ide_check_pm_state(ide_drive_t *dri
>  		rc = ide_wait_not_busy(hwif, 100000);
>  		if (rc)
>  			printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);
> +
> +		spin_lock_irqsave(q->queue_lock, flags);
> +		blk_start_queue(q);
> +		spin_unlock_irqrestore(q->queue_lock, flags);
>  	}
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2009-01-14 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 22:00 regression: 295f000 breaks suspend to disk Simon Holm Thøgersen
2009-01-14 17:16 ` Bartlomiej Zolnierkiewicz
2009-01-14 17:44   ` Simon Holm Thøgersen [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=1231955065.3246.0.camel@odie.local \
    --to=odie@cs.aau.dk \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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.