Bug 5866
Summary: | Harddrive doesn't wake up from S3 sleep when using the amd74xx driver | ||
---|---|---|---|
Product: | Power Management | Reporter: | Hette Visser (H.J.Visser) |
Component: | Hibernation/Suspend | Assignee: | Rafael J. Wysocki (rjwysocki) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi_power-sleep-wake, belyshev, bunk |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.15 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 7216 |
Description
Hette Visser
2006-01-11 05:20:23 UTC
This is the same problem I'm having with my amd64 laptop with nforce3 chipset -- any ide I/O after resume crash system with funny 'machine check' message. Workaround 1: do "hdparm -X udma2 /dev/hdc" for cdrom or "hdparm -X udma5 /dev/hda" for hdd just after resume before any I/O and it will work. If hdparm was not cached system will crash. Workaround 2: for hdd, one may use this ugly^H^H^H^H bruteforce hack which just works (TM): drivers/ide/ide.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux/drivers/ide/ide.c =================================================================== --- linux.orig/drivers/ide/ide.c +++ linux/drivers/ide/ide.c @@ -1250,7 +1250,8 @@ 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); + (void) ide_do_drive_cmd(drive, &rq, ide_head_wait); + return set_xfer_rate(drive, XFER_UDMA_5); } int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev, Last note: it looks like after resume from S3 memory contents is corrupted, so system becomes very unstable and oopsing here and there: Mar 3 14:44:05 foo kernel: [ 2.156532] invalid opcode: 0000 [1] PREEMPT ... Mar 3 14:44:05 foo kernel: [ 2.156667] Pid: 2672, comm: modprobe Not tainted 2.6.16-rc4-ck1-ssb1 #14 Mar 3 14:44:05 foo kernel: [ 2.156675] RIP: 0010:[_end+129462400/2131570688] <ffffffff880a4080>{:ohci_hcd:ohci_run+224} or: Feb 18 18:01:48 foo kernel: [ 59.367074] Eeek! page_mapcount(page) went negative! (-1) Feb 18 18:01:48 foo kernel: [ 59.367078] page->flags = 414 Feb 18 18:01:48 foo kernel: [ 59.367080] page->count = 1 Feb 18 18:01:48 foo kernel: [ 59.367081] page->mapping = 0000000000000000 Feb 18 18:01:48 foo kernel: [ 59.367099] ----------- [cut here ] --------- [please bite here ] --------- Feb 18 18:01:48 foo kernel: [ 59.367102] Kernel BUG at mm/rmap.c:555 Feb 18 18:01:48 foo kernel: [ 59.367104] invalid opcode: 0000 [1] PREEMPT ... Feb 18 18:01:48 foo kernel: [ 59.367131] Pid: 2243, comm: pdksh Not tainted 2.6.16-rc3-ck1-ssb2 #13 Feb 18 18:01:48 foo kernel: [ 59.367134] RIP: 0010:[page_remove_rmap+120/160] <ffffffff80163bf8>{page_remove_rmap+120} and more in this spirit. workaround for this is to drop caches just before suspend (on 2.6.16-* kernels): echo 3 > /proc/sys/vm/drop_caches Is the bug still present in 2.6.22-rc4? Some suspend-related IDE fixes have gone in since the problem was reported. Have you tried the newest kernels (2.6.22.x, 2.6.23-rc2)? I just tried amd74xx driver on 22.2 and it worked. the device is: 00:08.0 0101: 10de:00d5 (rev a5) (same as original reporter's), so I think this bugreport can be closed now. OK, closing. |