![]() |
APMD-List: |
to APMD Home
|
Index:
[thread]
[date]
[subject]
[author]
From: Richard Guy Briggs <rgb@conscoop.ottawa.on.ca> To : Scott Pack <scott.pack@pictureiq.com> Date: Tue, 25 Jul 2000 19:42:02 -0400 Re: Problems with apm/apmd and RH6.2On Thu, Jul 20, 2000 at 05:43:24PM -0700, Scott Pack wrote: > Can someone illuminate what happened with apm and apmd between RedHat > 6.1 and 6.2? Talk about pulling the rug out from underneath me! > > Here's my problem. I have a DEC Ultra2000 laptop. Under RH6.1 apmd > appeared to handle all power management issues, and I created a > apmd proxy file to handle the special cases of my hardware - like doing > a 'cardctl -eject' before suspend so the built-in ethernet works > properly upon resume. Worked great. > > Then I upgraded to RH6.2 and all of a sudden nothing worked! In looking > about, it seems major changes occured and now apm is the central power > management daemon. It certainly works better in some respects such as > the clock updating accurately. > > But the big problem I am having now is that I get 'hda lost interrupt' > messages upon resumes. This is catastrophic, I must powerdown without > unmounting my filesystems! Very very bad. This is not a hardware > problem as the machine dual-boots and the other OS does not exhibit any > problems when suspending/resuming. I have started having this exact problem. I was running RH6.0 on my old laptop drive and just installed RH6.2 on my new one a week ago. I assumed it was my new hard disk behaving differently since it was using the same customized kernel. This explanation that you give seems plausible... It hit one time at OLS when I happenned to be in the presence of Stephen Rothwell, the Linux APM author/maintainer and Andrew Tridgell (SAMBA) and with some suggestions from them, I set about hacking the ide driver... Here is a very crude patch that fixes my 'hda: lost interrupt' problem. It would be better if the ide lost counter was reset after about 60 seconds so that spurious single lost interrupts didn't trigger it. Feel free to pass this on to the ide maintainer who has not, in the past, answered my emails. $ diff -u linux{-orig,}/drivers/block/ide.c --- linux-orig/drivers/block/ide.c Wed May 3 20:16:33 2000 +++ linux/drivers/block/ide.c Sat Jul 22 13:14:37 2000 @@ -144,6 +144,8 @@ */ static int ide lock = 0; +static int ide lost = 0; + /* * ide modules keeps track of the available IDE chipset/probe/driver * modules. */ @@ -1323,6 +1325,7 @@ cli(); /* local CPU only, as if we were handling an interrupt */ if (hwgroup->poll timeout != 0 || drive is ready(drive)) { if (hwgroup->poll timeout == 0) { + ide lost += 1; printk("%s: lost interrupt\n", drive->name); (void)ide ack intr(hwif->io ports[IDE STATUS OFFSET], hwif->io ports[IDE IRQ OFFSET]); } @@ -1341,6 +1344,10 @@ if (startstop == ide stopped) hwgroup->busy = 0; } + if (ide lost > 3) { + ide lost = 0; + ide do reset(drive); + } } ide do request(hwgroup, 0); spin unlock irqrestore(&io request lock, flags); > I've looked at the apm-scripts and I can't figure out what I need to > do. As a last resort I tried to skip apm and use apmd, but that doesn't > appear to be working either. Please help! > > -Scott slainte mhath, RGB -- Richard Guy Briggs -- PGP key available Auto-Free Ottawa! Canada <www.conscoop.ottawa.on.ca/rgb/> <www.flora.org/afo/> Prevent Internet Wiretapping! -- FreeS/WAN:<www.freeswan.org> Thanks for voting Green! -- <green.ca> Marillion:<www.marillion.co.uk> -----BEGIN PGP SIGNATURE----- Version: 2.6.3i iQCVAwUBOX4lx9+sBuIhFagtAQGiAAP/RwfE1phf+fVCgbEmGrLjBTBCusCO18hd ziag+03DjVh+M/OUsDbe8R80KAHhhj0rFNAoBzcXH8FDdZ32cGRvaDizQri3y2ht yxj0wMoPBZi4fFJqM8rmUSVvD7foIQhx0+aZXFPUyz05Mi3u4u6zSSQ66NSzb/X0 Thvb75cPjxM= =SmGQ -----END PGP SIGNATURE----- Index: [thread] [date] [subject] [author] |