On Thu, Apr 24, 2014 at 10:31:47AM +0200, Alessandro DE LAURENZIS wrote: > After further checks, I noticed that there still was a part of the patch > not correctly applied. I modified a bit the code and renamed the two > constants. Now there is no error after "ifconfig bge0 wol".
Ok, so far so good. > But the i/f is still powered off. Even removing the check on the ASF > presence, the result is identical. > > I'm wondering if it could be an ACPI side effect... Any way to force > it to not disable the Eth? Hmmm... I'm not sure. Usually if drivers leave the card powered up it stays powered up. The generic PCI code puts devices into the lowest possible power state in sys/dev/pci.c:pci_powerdown(). Is this function called after bge_stop()? Putting printfs into them should be enough to find out. Ah... I think I see the problem now. Is bge_wol_power() ever being called? It looks like the code only calls it when suspending, but not when shutting down. Can you please check for me if bge_activate() is called when you shut down the machine, and with what value? Just add a printf like this: int bge_activate(struct device *self, int act) { struct bge_softc *sc = (struct bge_softc *)self; struct ifnet *ifp = &sc->arpcom.ac_if; int rv = 0; printf("%s: %d\n", __func__, act);