tech-net archive

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


From: David Young <>
Subject: Re: IFCAP_WOL
Date: Mon, 8 Mar 2010 13:43:41 -0600

> On Sun, Mar 07, 2010 at 06:29:20PM +0900, SAITOH Masanobu wrote:
>>  Hello.
>>  As I wrote in the commit message for if_wm.c rev. 1.203. I've succeeded
>> waking up from suspend(S3) by the Magic Packet. I tested on my ThinkPad X61.
> How will this interact with pmf(9)?

   pmf_device_register(self, wm_suspend, wm_resume);


static bool
wm_suspend(device_t self, const pmf_qual_t *qual)
        struct wm_softc *sc = device_private(self);

        wm_release_manageability(sc); /*
                                       * Tell the firmware to take over
                                       * the manageability from the OS.
        wm_release_hw_control(sc);    /*
                                       * Tell the firmware that the driver
                                       * is unloaded.
        wm_enable_wakeup(sc);         /*
                                       * 1) Tell the wakeup capability to the
                                       * system, 2) set the APM wakeup, 3) set
                                       * the power management function in the
                                       * Ethernet controller, it will keep
                                       * the power of the PHY on, 4) set PME
                                       * function in PCI spec.
        return true;

static bool
wm_resume(device_t self, const pmf_qual_t *qual)
        struct wm_softc *sc = device_private(self);

        wm_init_manageability(sc);      /* get back the control */

        return true;

> How will this work on a machine without an ACPI BIOS?
>>  The function is disabled by default because it may wastes a battery's
>> capacity in a notebook. So I think it's a good solution to introduce 
>> FreeBSD's
> It will only waste battery capacity on a notebook if the operator
> activated wake-on-LAN, correct?

Yes, it will. But some systems (e.g. my own Intel DQ45CB (though it's not
a notebook)) don't obey my code, so it keeps the power of the PHY on when
the WOL is disabled and it's suspended. Perhaps, the behavior is depend on
the BIOS.

 For wm(4), if The Intel AMT is enabled, it seems that the power of the PHY
may be on regardless of the WOL setting of the OS. The behavior is depend
on the setting of the Intel AMT, too.

> Dave
> -- 
> David Young             OJC Technologies
>      Urbana, IL * (217) 278-3933

                SAITOH Masanobu (

Home | Main Index | Thread Index | Old Index