Commit Graph

585 Commits

Author SHA1 Message Date
jmcneill 10f75496ad MI implementation of AcpiAcquireGlobalLock and AcpiReleaseGlobalLock. 2008-05-24 22:16:20 +00:00
cegger 256cdaf669 correct wrong comment: envsys(4) wants uK 2008-05-20 14:46:31 +00:00
cegger 33e33b567c acpidalb(4): Driver for PNP0C32 Hotkeys aka "Direct Application Launch Buttons".
"awesome" jmcneill
2008-05-18 22:05:59 +00:00
jmcneill 86acf021ce For device nodes that we handle internally, do not bother calling
config_found_ia on the node to save a bunch of useless 'device NNN
not configured' messages at startup. While here, condense ACPI printfs
at attach time.
2008-05-17 15:42:25 +00:00
jmcneill 05f909b7fa Fix memory leak on attach/resume. 2008-05-14 12:15:47 +00:00
ad bf21e0a741 Noisy printf. 2008-05-11 22:16:45 +00:00
jmcneill 729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
jmcneill 35033371fe Use M_ZERO instead of malloc+memset 2008-05-03 16:14:40 +00:00
simonb 96093a0d4f Sprinkle a teeny bit of KNF goodness.. 2008-05-02 01:53:33 +00:00
cegger d9b775927c hpqlb(4): driver for HP Quick Launch buttons - found on HP Pavilion Notebooks 2008-05-01 20:18:18 +00:00
simonb c3325defad Be consistent with #define<space-or-tab>. 2008-05-01 16:06:41 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
jmcneill da01aef3c1 Use isareg constants in thinkpad_brightness_read where possible 2008-04-26 01:19:15 +00:00
jmcneill dd8d5fe840 Define ACPI_THREAD_ID as uintptr_t, and return curlwp instead of
curlwp->l_lid from AcpiOsGetThreadId(), as suggested by ad@
2008-04-24 21:42:05 +00:00
jmcneill 50629393a5 s/struct cfdata */cfdata_t/ 2008-04-23 11:19:09 +00:00
jmcneill fd495c5ce3 AcpiOsGetThreadId should return lwpid, not pid -- otherwise we always return
the same value! Fixes the AE_AML_MUTEX_NOT_ACQUIRED issue when evaluating
_BST on ASUS Eee PC. Who knows what other mysterious bugs this has caused
over the years...
2008-04-22 02:02:50 +00:00
xtraeme a7315e0fc1 Misc cleanups from Geoff Wing. 2008-04-21 14:25:48 +00:00
jmcneill 865860bc30 Improve error reporting when we fail to enter a sleep state, eg:
acpi0: entering state 1
  acpi0: ACPI S1 not available on this platform
2008-04-20 16:26:36 +00:00
xtraeme 2930df439c Make this work again, now that ACPI_TYPE_ANY returns NULL objects
after recent ACPICA update.

Applied patch from Geoff Wing on current-users@.
2008-04-17 19:57:27 +00:00
cegger 376411d2dd device_t / softc split. From Hans Rosenfeld. 2008-04-16 09:39:01 +00:00
cegger b849cd90e5 device_t / softc split. From Hans Rosenfeld 2008-04-15 15:02:28 +00:00
jmcneill 76fcb78d00 Compatibility with ACPICA 20080321; from the release notes:
All Reference Objects returned via the AcpiEvaluateObject interface are now
marked as type "REFERENCE" instead of "ANY". The type ANY is now reserved for
NULL objects - either NULL package elements or unresolved named references.
2008-04-14 00:30:30 +00:00
jmcneill 75aae009fe Cosmetic aprintification fix, as noted by Thomas Klausner on current-users 2008-04-07 10:16:59 +00:00
cegger 335ec2beb5 use aprint_*_dev and device_xname 2008-04-05 21:44:50 +00:00
xtraeme bc77ebea72 Remove useless returns at the end of void functions. 2008-03-31 15:28:47 +00:00
jmcneill 4fab67daa7 Add ASUS ACPI hotkey driver, as found in the Eee PC. 2008-03-31 15:17:21 +00:00
jmcneill 2529ffb3cf Fix printf in ACPI_DEBUG case, pointed out by mlelstv@ 2008-03-29 13:33:12 +00:00
xtraeme 0ab2da71ce Split device_t/softc for mpu(4) and its attachments, plus other
related cosmetic changes.

Reviewed by cube@.
2008-03-27 10:22:00 +00:00
jmcneill fcb7a4511a Split device_t and softc 2008-03-27 02:51:26 +00:00
xtraeme 71c3052b91 Split device_t/softc and related cosmetic changes. 2008-03-26 18:35:17 +00:00
xtraeme 701c2ae0a3 Split device_t/softc for joy(4) and all its attachments. Also
use device_lookup_private() and related cosmetic changes.

Reviewed by cube@.
2008-03-26 18:27:07 +00:00
xtraeme 678337ef71 acpitz_get_zone expects now a device_t not a softc. 2008-03-26 16:48:53 +00:00
xtraeme 8bea7f6b6e Split device_t/softc for ug(4) and other related cosmetic changes. 2008-03-26 16:09:37 +00:00
xtraeme 2be2546b16 Split device_t/softc and related cosmetic changes. 2008-03-26 15:31:59 +00:00
xtraeme 6405ed23e5 acpiacad_get_status: move sc_notifysent to the correct place, otherwise
the notify might not be sent.
2008-03-23 18:38:57 +00:00
xtraeme a7e669727a Register a resume pmf(9) handler that clears the status. It is needed
to always fetch new status after resuming, otherwise if AACAD_F_AVAILABLE
is set, acpiacad_get_status() won't be called.

Also use the SME_INIT_REFRESH flag to fetch sensor data once in the
autoconf(9) process.

Ok'ed by <jmcneill>.
2008-03-23 16:22:00 +00:00
xtraeme 6e9673dcb2 Use the SME_INIT_REFRESH flag to fetch sensor data once in the
autoconf(9) process.
2008-03-23 16:12:45 +00:00
xtraeme 5a14ef4138 Add missing acpilid_wake_event() proto. 2008-03-23 14:20:15 +00:00
xtraeme c280868dfa Split device_t/softc for all hpet consumers. 2008-03-21 13:28:14 +00:00
cube fa7e4a28ef Don't assume a struct device is embedded in the softc. 2008-03-16 15:22:05 +00:00
yamt d28c692afa fix compilation 2008-03-16 13:58:22 +00:00
cube bb192d4cfd Split device_t and softc for the ... wait for it ... [air quotes] MI
variant of fdc(4)/fd(4).  Other cosmetic changes as appropriate.
2008-03-16 00:58:56 +00:00
cube a22d8d4abb Split device_t and softc for pckbc(4) and its attachments. 2008-03-15 13:23:24 +00:00
cube 607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
dyoung 3df2b2feb5 Use device_t and its accessors throughout. Use aprint_*_dev().
Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.
2008-03-12 18:02:21 +00:00
dyoung 73e95caf73 Use device_t and accessors. Use aprint_*_dev().
Add a method for detaching children.  XXX acpi(4) may leak some
resources for each child detached.  Needs attention from someone
who understands acpi(4).
2008-03-10 20:58:38 +00:00
jmcneill 80e26751e9 shutdownhook_establish is deprecated, but instead of converting to pmf,
just delete it as acpi_shutdown was empty.
2008-03-09 19:09:00 +00:00
cube 3c5e53b4e2 Split device_t/softc for i386's apm(4), and other related cosmetic changes. 2008-03-07 21:45:07 +00:00
cube 8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00