#
11e9b8ba |
| 04-Aug-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- MFC @196061
|
#
444b9186 |
| 02-Aug-2009 |
Attilio Rao <attilio@FreeBSD.org> |
Make the newbus subsystem Giant free by adding the new newbus sxlock. The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to h
Make the newbus subsystem Giant free by adding the new newbus sxlock. The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races.
Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped.
For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens.
Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing.
Bump __FreeBSD_version in order to reflect the newbus lock introduction.
Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
show more ...
|
#
7e857dd1 |
| 12-Jun-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
129d3046 |
| 05-Jun-2009 |
Jung-uk Kim <jkim@FreeBSD.org> |
Import ACPICA 20090521.
|
#
aaac7452 |
| 03-Jun-2009 |
Jung-uk Kim <jkim@FreeBSD.org> |
Chase ACPICA API changes (for kernel and boot loader).
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
bad3b688 |
| 18-Jan-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
Sync with head
|
#
0f9e2596 |
| 17-Jan-2009 |
Alexander Motin <mav@FreeBSD.org> |
Convert battery capacity/rate from mA to mW only when summary is requested. Unconditional conversion causes incorrect rate units reported by acpiconf.
MFC after: 2 weeks
|
Revision tags: release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
1de9b7e4 |
| 20-Nov-2007 |
Jung-uk Kim <jkim@FreeBSD.org> |
Check battery presence first before trying to get battery information.
PR: kern/117591 Tested by: Jessica Mahoney (root at varusonline dot com)
|
#
4306354d |
| 09-Oct-2007 |
Nate Lawson <njl@FreeBSD.org> |
When the EC times out (common with Compaqs), it may report a design voltage of 0. This can result in a divide by zero trap. Add a guard for this case. The value of lfcap is checked in acpi_battery
When the EC times out (common with Compaqs), it may report a design voltage of 0. This can result in a divide by zero trap. Add a guard for this case. The value of lfcap is checked in acpi_battery_bif_valid() just before this, so it is safe.
Reportd by: sam Approved by: re MFC after: 3 days
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
ee939186 |
| 22-Dec-2006 |
Warner Losh <imp@FreeBSD.org> |
ACPIIO_BATT_GET_UNITS would always return ENXIO. However, it should never return an error since it returns a count of battery devices in the system. Set it to 0 explicitly, since it is the only swit
ACPIIO_BATT_GET_UNITS would always return ENXIO. However, it should never return an error since it returns a count of battery devices in the system. Set it to 0 explicitly, since it is the only switch branch that doesn't set it.
# I guess no one uses it.
show more ...
|
#
197b4dcc |
| 10-Jun-2006 |
Nate Lawson <njl@FreeBSD.org> |
Minor sysctl cleanup. The RW flag means read|write and so it is redundant to add the RD flag. Also, the debug node does not need to be writable.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
f08e63dc |
| 23-Nov-2005 |
Nate Lawson <njl@FreeBSD.org> |
Simplify checks for valid battery info via DeMorgan's Rule. No functional change.
|
Revision tags: release/6.0.0_cvs, release/6.0.0 |
|
#
49ab8241 |
| 23-Oct-2005 |
Nate Lawson <njl@FreeBSD.org> |
Add prototype to be consistent.
|
#
9aa72f74 |
| 23-Oct-2005 |
Nate Lawson <njl@FreeBSD.org> |
Cleanups and support code for importing smart battery support.
* Use ACPI_BATT_UNKNOWN instead of constants * Use maxunit instead of a count of devices since we may have sparse battery devices in
Cleanups and support code for importing smart battery support.
* Use ACPI_BATT_UNKNOWN instead of constants * Use maxunit instead of a count of devices since we may have sparse battery devices in the future. Only userland should be using unit numbers anyway, so provide a translation function. (Kernel use of batteries should be restricted to looking up a device_t and calling methods directly. * Don't check acpi_BatteryIsPresent() in acpi_battery. Leave it up to the hardware-specific driver (i.e. cmbat) since smart batteries seem to not report the "battery present" flag. * Convert mA to mW if the battery uses those units. CM-batteries only used mW so this deficiency went unnoticed. * Clean strings reported in the battery info from any control chars. * Only dereference the unit from ioctl_arg if the full struct is present. Unit wouldn't have been used later if it wasn't present but this is cleaner. Translate the unit if it's not ACPI_BATTERY_ALL_UNITS. * bzero structs before returning them to usermode for future compat.
Most of this work was submitted by Hans Petter Selasky and then majorly reworked by myself.
Submitted by: Hans Petter Selasky <hselasky / c2i.net>
show more ...
|
#
2a191126 |
| 11-Sep-2005 |
David E. O'Brien <obrien@FreeBSD.org> |
Canonize the include of acpi.h.
|
#
84cdcfb3 |
| 11-Aug-2005 |
Nate Lawson <njl@FreeBSD.org> |
Modify the fix in rev 1.16 slightly. Instead of setting the cap to zero, just skip summing it if it's unknown.
MFC after: 1 day
|
#
9396c1b2 |
| 05-Aug-2005 |
Nate Lawson <njl@FreeBSD.org> |
When summing capacities, skip info from batteries that weren't present. Previously, we used all info (including -1 or "not present") which would keep the system from reaching 100% when charging.
Rep
When summing capacities, skip info from batteries that weren't present. Previously, we used all info (including -1 or "not present") which would keep the system from reaching 100% when charging.
Reported by: Eric Anderson MFC after: 2 days
show more ...
|
#
e4515dd5 |
| 28-Jul-2005 |
Nate Lawson <njl@FreeBSD.org> |
Add descriptions for the sysctls.
MFC after: 1 day
|
#
50d0e47a |
| 28-Jul-2005 |
Nate Lawson <njl@FreeBSD.org> |
Zero the _BST, _BIF, and battinfo allocations. This is needed since we later sum capacities for all batteries, even those that weren't actually present. We only need to do this for _BST but do it f
Zero the _BST, _BIF, and battinfo allocations. This is needed since we later sum capacities for all batteries, even those that weren't actually present. We only need to do this for _BST but do it for all of them.
Reported by: Eric Anderson MFC after: 1 day
show more ...
|
#
f4e31e2e |
| 25-Jul-2005 |
Nate Lawson <njl@FreeBSD.org> |
Correct minor output bug. When the battery being queried is charging or the overall discharge rate is 0, mark the battery remaining time as "unknown", not 0.
Reported by: Eric Kjeldergaard MFC afte
Correct minor output bug. When the battery being queried is charging or the overall discharge rate is 0, mark the battery remaining time as "unknown", not 0.
Reported by: Eric Kjeldergaard MFC after: 4 days
show more ...
|
#
76f6fe4f |
| 23-Jul-2005 |
Nate Lawson <njl@FreeBSD.org> |
Rewrite the acpi_battery interface to allow for other battery types (i.e., smart battery) and fix various bugs found during the cleanup.
API changes: * kernel access: Access to individual batteries
Rewrite the acpi_battery interface to allow for other battery types (i.e., smart battery) and fix various bugs found during the cleanup.
API changes: * kernel access: Access to individual batteries is now via devclass_find("battery"). Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and ACPI_BATT_GET_INFO (for _BIF-formatted data). The helper function acpi_battery_get_battinfo() now takes a device_t instead of a unit # argument. If dev is NULL, this signifies all batteries.
* ioctl access: The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been removed. Since there is now no need for a mapping between "virtual" unit and physical unit, usermode programs can just specify the unit directly and skip the old translation steps. In fact, acpiconf(8) was actually already doing this and virtual unit was the same as physical unit in all cases since there was previously only one battery type (acpi_cmbat). Additionally, we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all batteries, if they provide the associated methods.
* apm compatibility device/ioctls: no change * sysctl: no change
Since most third-party applications use the apm(4) compat interface, there should be very few affected applications (if any).
Reviewed by: bruno MFC after: 5 days
show more ...
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
8f764959 |
| 17-Mar-2005 |
Nate Lawson <njl@FreeBSD.org> |
Introduce a general name for the previously cmbat-only ioctls. It has the same value as the previous ioctls so no binary change. Also, make a few style changes to reduce diffs to my tree.
Loosely
Introduce a general name for the previously cmbat-only ioctls. It has the same value as the previous ioctls so no binary change. Also, make a few style changes to reduce diffs to my tree.
Loosely based on code from: Hans Petter Selasky
show more ...
|
#
dad97fee |
| 02-Mar-2005 |
David E. O'Brien <obrien@FreeBSD.org> |
Fix SCM ID's.
|
Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
07d4077e |
| 13-Aug-2004 |
Nate Lawson <njl@FreeBSD.org> |
MPSAFE locking
* Serialize acpi_battery_get_battdesc(), acpi_battery_register(), and acpi_battery_remove(). * Assert that the sx lock is held in acpi_batteries_init(). * Remove check for device_ge
MPSAFE locking
* Serialize acpi_battery_get_battdesc(), acpi_battery_register(), and acpi_battery_remove(). * Assert that the sx lock is held in acpi_batteries_init(). * Remove check for device_get_softc() returning NULL.
show more ...
|
#
7a5230b8 |
| 12-Jul-2004 |
Nate Lawson <njl@FreeBSD.org> |
Add the ability to detach a battery. Now batteries that are detached are also removed from the battery list.
|