On Monday, 11 June 2007 22:03, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> On Monday 11 June 2007, Rafael J. Wysocki wrote:
> > Hi,
> >
> > Here's the result of the search for the second patch that breaks resuming
> > from RAM on HPC nx6325 (x86_64):
> >
> > ide-ide-hpa-detect-from-resume.patch
> >
> > The symptom is that after the resume there's no backlight and the screen
> > apparently doesn't work, 100% of the time, although apart from this the system
> > seems to be functional.
>
> I find it hard to accept that IDE patch is to blame for that. ;)
But still (actually, I only don't know why it appeared to be functional :-)).
> > The box doesn't even have an IDE HDD, but the DVD is handled by the atiixp
> > driver.
>
> If there are no IDE disks in the system there should be absolutely no
> change in the functionality.
Sorry, but the patch is buggy. Fix appended, details in the changelog.
Greetings,
Rafael
---
From: Rafael J. Wysocki <[email protected]>
generic_ide_resume() should check if dev->driver is not NULL before applying
to_ide_driver() to it. Fix that.
Signed-off-by: Rafael J. Wysocki <[email protected]>
---
drivers/ide/ide.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: linux-2.6.22-rc4/drivers/ide/ide.c
===================================================================
--- linux-2.6.22-rc4.orig/drivers/ide/ide.c
+++ linux-2.6.22-rc4/drivers/ide/ide.c
@@ -1010,7 +1010,6 @@ 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;
@@ -1033,8 +1032,12 @@ static int generic_ide_resume(struct dev
err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
- if (err == 0 && drv && drv->resume)
- drv->resume(drive);
+ if (err == 0 && dev->driver) {
+ ide_driver_t *drv = to_ide_driver(dev->driver);
+
+ if (drv->resume)
+ drv->resume(drive);
+ }
return err;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]