Date: Mon, 24 Jan 2000 13:30:54 +0000 (GMT) From: Nick Hibma <n_hibma@webweaving.org> To: FreeBSD CURRENT Mailing List <current@FreeBSD.ORG> Subject: APM still ignoring DEVICE_SUSPEND errors Message-ID: <Pine.BSF.4.20.0001231408180.4623-200000@localhost>
next in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-591026313-948636885=:4635 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: <Pine.BSF.4.20.0001241328331.24554@localhost> The following patch fixes two things: First, DEVICE_SUSPEND errors are no longer ignored. Since we have defaults for methods we should no longer ignore these errors. Also, DEVICE_RESUME wasn't done when the apm_suspend_system event failed. Second, in the ordering of DEVICE_* and apm_hook_* is not symmetric for suspend and resume. The patch reverses the resume case as well to be apm_hook_resume(...) DEVICE_RESUME(root) Send me some feedback on this. I've mailed the people mentioned in the head of the file, but so far got no response. I would like to make sure we get this right when USB devices are used. Some of them don't suspend and the suspend should be refused in that case. Nick -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ --0-591026313-948636885=:4635 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="apm.c.patch" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.BSF.4.20.0001231414450.4635@localhost> Content-Description: Content-Disposition: ATTACHMENT; FILENAME="apm.c.patch" LS0tIC91c3Ivc3JjL3N5cy9pMzg2L2FwbS9hcG0uYwlUaHUgRGVjICAyIDAz OjEzOjAwIDE5OTkNCisrKyAvaGVpZGkvdXNyL2N1cnJlbnQvc3JjL3N5cy9p Mzg2L2FwbS9hcG0uYwlTdW4gSmFuIDIzIDE0OjA3OjQ5IDIwMDANCkBAIC00 NzMsMTkgKzQ3MywxOSBAQA0KIA0KIAlpZiAoc2MtPmluaXRpYWxpemVkKSB7 DQogCQllcnJvciA9IERFVklDRV9TVVNQRU5EKHJvb3RfYnVzK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tBUE1fSE9PS19SRVNVTUVdKTsNCisJ CQkJREVWSUNFX1JFU1VNRShyb290X2J1cyk7DQorCQkJfQ0KKwkJfQ0KIAl9 DQogfQ0KIA0KQEAgLTU5Myw4ICs1OTMsOCBAQA0KIAkJcmV0dXJuOw0KIA0K IAlpZiAoc2MtPmluaXRpYWxpemVkKSB7DQotCQlERVZJQ0VfUkVTVU1FKHJv b3RfYnVzKTsNCiAJCWFwbV9leGVjdXRlX2hvb2soaG9va1tBUE1fSE9PS19S RVNVTUVdKTsNCisJCURFVklDRV9SRVNVTUUocm9vdF9idXMpOw0KIAl9DQog fQ0KIA0K --0-591026313-948636885=:4635-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0001231408180.4623-200000>