[Solved] FreeBSD 9-Beta3 on X300 2 problems

Taku YAMAMOTO taku at tackymt.homeip.net
Wed Sep 28 10:58:00 UTC 2011


On Tue, 27 Sep 2011 13:06:21 +0100
Gavin Atkinson <gavin.atkinson at ury.york.ac.uk> wrote:

> On Tue, 2011-09-27 at 19:53 +0800, Adrian Chadd wrote:
> > Hans,
> > 
> > Why haven't those patches been committed?
> 
> This patch is an absolute hack, and shouldn't be committed as it is.
> 
> I would, however, appreciate some help in determining the correct
> solution.  The solution may well involve not suspending/resuming hpet(4)
> or the other timers on the normal DEVICE_SUSPEND()/DEVICE_RESUME() path
> but instead doing them as the last thing to be suspended, or it may

Like the attached patches do?

> instead involve reworking the USB code (and potentially other code) to
> not need to sleep during suspend/resume.  I don't know the right
> solution, but would really like to work with somebody who does.
> 
> Please also see the thread "Choosing between DELAY(useconds) and
> pause()" on -current.
> 
> Gavin
> 
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"


-- 
-|-__   YAMAMOTO, Taku
 | __ <     <taku at tackymt.homeip.net>

      - A chicken is an egg's way of producing more eggs. -
-------------- next part --------------
--- sys/kern/subr_bus.c.orig	2010-12-02 13:28:01.000000000 +0900
+++ sys/kern/subr_bus.c	2010-12-08 12:37:05.524727855 +0900
@@ -3385,15 +3385,13 @@ int
 bus_generic_suspend(device_t dev)
 {
 	int		error;
-	device_t	child, child2;
+	device_t	child;
 
-	TAILQ_FOREACH(child, &dev->children, link) {
+	TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) {
 		error = DEVICE_SUSPEND(child);
 		if (error) {
-			for (child2 = TAILQ_FIRST(&dev->children);
-			     child2 && child2 != child;
-			     child2 = TAILQ_NEXT(child2, link))
-				DEVICE_RESUME(child2);
+			while ((child = TAILQ_NEXT(child, link)) != NULL)
+				DEVICE_RESUME(child);
 			return (error);
 		}
 	}
-------------- next part --------------
--- sys/dev/acpica/acpi.c.orig	2010-07-16 08:24:06.000000000 +0900
+++ sys/dev/acpica/acpi.c	2010-07-21 20:10:59.056243391 +0900
@@ -1702,7 +1702,7 @@ acpi_probe_order(ACPI_HANDLE handle, int
 	*order = 1;
     else if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02"))
 	*order = 2;
-    else if (acpi_MatchHid(handle, "PNP0C09"))
+    else if (acpi_MatchHid(handle, "PNP0C09") || acpi_MatchHid(handle, "PNP0103"))
 	*order = 3;
     else if (acpi_MatchHid(handle, "PNP0C0F"))
 	*order = 4;


More information about the freebsd-current mailing list