On Sunday 04 March 2007 13:27, Bruce Evans wrote: > On Fri, 2 Mar 2007, Stefan Ehmann wrote: > > On Thursday 01 March 2007 16:12, Stefan Ehmann wrote: > >> My few days old -current freezes if I press Fn-F6 (this is the > >> combination to adjust display brightness) if I've done a suspend/resume > >> before. Directly after boot it works fine. > > > > ... > > So I did a binary search. > > > > src/sys/i386/isa/clock.c r1.231 causes my notebook to freeze. > > > > Reverting this change in a CURRENT from today fixes the problem. > > > > The notebook is still pingable in this state. I experienced some other > > random hangs recently but don't know yet if those are related. > > Oops. If suspend/resume clobbers the RTC state (which we already have code > to restore), then it can clobber the RTC index (which even the restoral > code assumes is unclobbered). Try this fix. > > %%% > Index: clock.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v > retrieving revision 1.234 > diff -u -2 -r1.234 clock.c > --- clock.c 4 Mar 2007 04:55:19 -0000 1.234 > +++ clock.c 4 Mar 2007 11:58:00 -0000 > _at__at_ -580,4 +582,5 _at__at_ > /* Restore all of the RTC's "status" (actually, control) registers. */ > /* XXX locking is needed for RTC access. */ > + rtc_reg = -1; > writertc(RTC_STATUSB, RTCSB_24HR); > writertc(RTC_STATUSA, rtc_statusa); > %%% > > A similar fix might be needed for amd64, but amd64 doesn't have a resume > hook for putting it in. The RTC index might get clobbered even if the > data registers aren't. > > I don't know how any of this works with ACPI. AFAIK (not far), the resume > hook is only called for APM. Yes, rtc_restore() doesn't get called. So the patch changes nothing for me. StefanReceived on Sun Mar 04 2007 - 11:59:56 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:06 UTC