The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
	Lee Trager <lt73@cs.drexel.edu>
Subject: Re: 2.6.22-rc4-mm2: Resume from RAM on HPC nx6325 broken
Date: Tue, 12 Jun 2007 00:01:19 +0200	[thread overview]
Message-ID: <200706120001.20013.bzolnier@gmail.com> (raw)
In-Reply-To: <200706112203.30032.bzolnier@gmail.com>


On the second thought...

On Monday 11 June 2007, Bartlomiej Zolnierkiewicz wrote:

> I find it hard to accept that IDE patch is to blame for that. ;)

Arrgghhh :)  It looks more likely now...

> --- a/drivers/ide/ide.c
> +++ b/drivers/ide/ide.c
> @@ -1010,9 +1010,11 @@ static int generic_ide_resume(struct dev
>  {
>  	ide_drive_t *drive = dev->driver_data;
>  	ide_hwif_t *hwif = HWIF(drive);
> +	ide_driver_t *drv = to_ide_driver(dev->driver);
>  	struct request rq;
>  	struct request_pm_state rqpm;
>  	ide_task_t args;
> +	int err;
>  
>  	/* Call ACPI _STM only once */
>  	if (!(drive->dn % 2))
> @@ -1029,7 +1031,12 @@ static int generic_ide_resume(struct dev
>  	rqpm.pm_step = ide_pm_state_start_resume;
>  	rqpm.pm_state = PM_EVENT_ON;
>  
> -	return ide_do_drive_cmd(drive, &rq, ide_head_wait);
> +	err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
> +
> +	if (err == 0 && drv && drv->resume)

Could you try replacing this by

if (err == 0 && dev->driver && drv->resume)

and see if it fixes the problem?

If dev->driver is NULL drv won't be because to_ide_driver() is just
a wrapper for container_of().

Thanks,
Bart

  parent reply	other threads:[~2007-06-11 21:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 14:48 2.6.22-rc4-mm2: Resume from RAM on HPC nx6325 broken Rafael J. Wysocki
2007-06-11 20:03 ` Bartlomiej Zolnierkiewicz
2007-06-11 21:59   ` Rafael J. Wysocki
2007-06-11 22:20     ` Bartlomiej Zolnierkiewicz
2007-06-11 22:01   ` Bartlomiej Zolnierkiewicz [this message]
2007-06-11 22:01     ` Rafael J. Wysocki

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=200706120001.20013.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lt73@cs.drexel.edu \
    --cc=pavel@ucw.cz \
    --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