NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-i386/44581: MacBook1,1 won't resume after suspend

The following reply was made to PR port-i386/44581; it has been noted by GNATS.

From: Taylor R Campbell <>
Subject: Re: port-i386/44581: MacBook1,1 won't resume after suspend
Date: Wed, 16 Feb 2011 20:27:58 +0000

 Also, in order to test rescanning pci3 and reattaching fwohci0, I had
 to apply the following patch to fix a config panic induced by a
 trivial race condition in firewire.c.  (fw_bus_probe_thread may call
 config_pending_decr before control has reached firewireattach's call
 to config_pending_incr, causing a panic.)
 Index: firewire.c
 RCS file: /cvsroot/src/sys/dev/ieee1394/firewire.c,v
 retrieving revision 1.38
 diff -c -r1.38 firewire.c
 --- firewire.c 7 Sep 2010 07:26:54 -0000       1.38
 +++ firewire.c 16 Feb 2011 20:26:36 -0000
 @@ -257,10 +257,10 @@
        callout_schedule(&fc->timeout_callout, hz);
        /* create thread */
 +      config_pending_incr();
        if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, fw_bus_probe_thread,
            fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev)))
                aprint_error_dev(self, "kthread_create failed\n");
 -      config_pending_incr();
        devlist = malloc(sizeof(struct firewire_dev_list), M_DEVBUF, M_NOWAIT);
        if (devlist == NULL) {

Home | Main Index | Thread Index | Old Index