From owner-freebsd-mobile Tue Oct 28 10:07:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA08739 for mobile-outgoing; Tue, 28 Oct 1997 10:07:38 -0800 (PST) (envelope-from owner-freebsd-mobile) Received: from ns.mt.sri.com (SRI-56K-FR.mt.net [206.127.65.42]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA08724; Tue, 28 Oct 1997 10:07:26 -0800 (PST) (envelope-from nate@rocky.mt.sri.com) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.7/8.8.7) with ESMTP id LAA23644; Tue, 28 Oct 1997 11:07:22 -0700 (MST) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id LAA06518; Tue, 28 Oct 1997 11:07:21 -0700 (MST) Date: Tue, 28 Oct 1997 11:07:21 -0700 (MST) Message-Id: <199710281807.LAA06518@rocky.mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Nate Williams Cc: mobile@freebsd.org Subject: Announce: Working suspend/resume (was Re: cvs commit: src/usr.sbin/pccard/pccardd cardd.c) In-Reply-To: <199710281751.JAA20266@freefall.freebsd.org> References: <199710281751.JAA20266@freefall.freebsd.org> X-Mailer: VM 6.29 under 19.15 XEmacs Lucid Sender: owner-freebsd-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Modified files: > usr.sbin/pccard/pccardd cardd.c > Log: > - Disable cards when doing a suspend by emulating that they have been > removed. Add a new state 'suspend' so we 'fake' insertion events at > resume time for the cards that have been suspended. > > [ > The code still works if you remove the card during suspend, switch the > card during suspend, or combinations of both. > ] > > Reviewed by: frf@xocolatl.com Thanks to Robert for sending me a bug report, things are much better. It turns out there was a *HUGE* race condition in the code after I killed the 'suspend' function. How it ever worked I'll never know, but the new code is both better and more robust, and what I had initially intended to do a couple of years ago. I'd be suprised if suspend/resume didn't work for *all* laptops now, although it may require some setup of the PCIC controller for some machines. If it doesn't work out of the box, try setting "machdep.pccard.pcic_resume_reset" to 1. root # sysctl -w machdep.pccard.pcic_resume_reset=1 You *MUST* rebuild pccardc/pccardd before you boot into the new kernel. If you don't normal card insertion/removal events won't get recognized by the card daemon (the above change is necessary), but once you've rebuilt and re-installed it everything should work great. *Please* test this code. I think it should work, and if it proves to be good I'd like to bring it into 2.2 after a shakeout period. In any case, it's much more robust than the old code in the face of cards getting switched, etc... Nate