On Thu, Aug 10, 2006 at 11:55:09AM +0200, Sheer El-Showk wrote: > piix 9092 0 [permanent] > ide_core 115900 3 ide_cd,piix,ide_disk > > Your patch was at the more general level of the ide drivers so do you > have any idea why it didn't work on this particular driver?
Not offhand, no. But I'll tell what I did; maybe it'll help you narrow down your problem. I found that ide-io.c has some useful debug printks at strategic points. They were bitrotted and needed to be enabled by hand. the patch below fixes this: it puts the ide-layer suspend/resume printks under CONFIG_PM_DEBUG and gets them compiling again. Another thing that helped me was to compare the output of /proc/ide/amd74xx before suspend and at different points during resume. I hacked in a routine that would call the procfs read() function and then printk the buffer. That way I could see the state of the chipset at arbitary points. Unfortunately piix.c doesn't seem to implement a procfs file like that. Another thing to check is whether pci_restore_config() is producing any "PM: Writing back config space on X" messages for that device - if so, it means the pci config space was changed by the STR and so other things might need to be set up again. You could read the suspend/resume implementation for sc1200.c. It's the only driver in drivers/ide/pci that has one. I'm told that on x86 there can be ACPI hooks that are supposed to be called by the OS on suspend/resume and linux currently doesn't support these. There are patches floating around to do that. Check list archives and various distro/kernel bugzillas. Jason --- drivers/ide/ide-io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Index: linux-2.6.18-rc2-git6/drivers/ide/ide-io.c =================================================================== --- linux-2.6.18-rc2-git6.orig/drivers/ide/ide-io.c +++ linux-2.6.18-rc2-git6/drivers/ide/ide-io.c @@ -290,7 +290,7 @@ { unsigned long flags; -#ifdef DEBUG_PM +#ifdef CONFIG_PM_DEBUG printk("%s: completing PM request, %s\n", drive->name, blk_pm_suspend_request(rq) ? "suspend" : "resume"); #endif @@ -422,9 +422,9 @@ } } else if (blk_pm_request(rq)) { struct request_pm_state *pm = rq->end_io_data; -#ifdef DEBUG_PM - printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n", - drive->name, rq->pm->pm_step, stat, err); +#ifdef CONFIG_PM_DEBUG + printk("%s: complete_power_step(step: %d, stat: 0x%x, err: 0x%x)\n", + drive->name, pm->pm_step, stat, err); #endif ide_complete_power_step(drive, rq, stat, err); if (pm->pm_step == ide_pm_state_completed) @@ -950,7 +950,7 @@ * point. */ int rc; -#ifdef DEBUG_PM +#ifdef CONFIG_PM_DEBUG printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name); #endif rc = ide_wait_not_busy(HWIF(drive), 35000); @@ -1017,9 +1017,9 @@ return execute_drive_cmd(drive, rq); else if (blk_pm_request(rq)) { struct request_pm_state *pm = rq->end_io_data; -#ifdef DEBUG_PM +#ifdef CONFIG_PM_DEBUG printk("%s: start_power_step(step: %d)\n", - drive->name, rq->pm->pm_step); + drive->name, pm->pm_step); #endif startstop = ide_start_power_step(drive, rq); if (startstop == ide_stopped && ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel