Commit Graph

2040 Commits

Author SHA1 Message Date
ad eb171eaaa7 It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:50:17 +00:00
mjf 05619021ad Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
2007-07-28 20:28:56 +00:00
xtraeme 7867660706 Fix typo that wasn't allowing to change the rfact. 2007-07-20 07:23:47 +00:00
tsutsui 12b13f1335 Fix more pesudo. 2007-07-10 12:15:00 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
xtraeme 9e341f559a Set the ENVSYS_FCHANGERFACT flag in it_setup_sensors rather than
in the refresh function.
2007-07-07 05:27:22 +00:00
xtraeme 9f0e4ef0f4 Some changes:
- Add support for the IT8716F chip, patch from FUKUMOTO Atsushi via
  PR port-i386/35796.
- Enable the flag ENVSYS_FCHANGERFACT in voltage sensors, to be able to
  increment the value returned by the driver via envstat(8).
- Update VBAT sensor reading every time we read it, otherwise it will
  always report the power on value.
- Enable all sensors that were missing before: 3 Temp + 3 Fan + 9 Voltage.
- Add new registers to set high/low limits in temperature/voltage sensors
  (still unused).
- Disable some sensors if they are reporting bogus data or simply they are
  not connected.

Tested by wiz.
2007-07-05 15:20:30 +00:00
xtraeme f50072a162 In the gtredata function, use the edata pointer rather than using
directly the edata array index in the softc.
2007-07-01 22:20:34 +00:00
xtraeme da3f163bd2 Imported envsys 2, a brief description of the new features:
(Part 2: drivers)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
  and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
  sysmon_power(9) and powerd(8), that means there is no 32 bytes event
  size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
2007-07-01 07:37:12 +00:00
dsl 716dbe1abc The cd ioctl definitions are not condusive to being called from within
the kernel (eg from withthe linux compat code).
Add CDIOCREADSUBCHANNEL_BUF and CDIOREADTOCENTRIES_BUF which are like the
  existing ioctls withoutthe _BUF, except that the data area immediately
  follows the control structure (and is fixed length).
Modify scsipi/cd.c so that it only ever has one 'struct cd_formatted_toc'
  allocated on the stack (maybe this info ought to be in the softc)
  structure since even one 800 byte on-stack buffer isn't overly friendly.
cdplay(1) still seems able to read the track-list of an ATAPI cd.
2007-06-30 22:16:38 +00:00
blymn eeece1c927 Add driver for the hardware monitoring portion of the SMSC LPC47B397 2007-06-01 14:11:59 +00:00
xtraeme ff1c414804 Split the ug(4) driver in three components:
* dev/ic/ug.c (main code shared by the attachments)
	* dev/isa/ug_isa.c (isa attachment)
	* dev/acpi/ug_acpi.c (acpi attachment)

That means that ug(4) can now be attached via ACPI.

Thanks to Mihai Chelaru for the good work.
2007-05-08 16:48:37 +00:00
xtraeme 6b5eadf8c1 Don't refresh all sensors in the gtredata function, just the sensor
that was requested. This is related to PR kern/36226.
2007-05-07 10:54:44 +00:00
xtraeme 7435f0af77 Don't refresh all sensors in the gtredata function, just the sensor
that was requested. This is related to PR kern/36226.

Patch from Mihai Chelaru in private email.
2007-05-07 07:48:28 +00:00
jnemeth f587e8e88c add support for devctl properties 2007-03-08 23:23:45 +00:00
xtraeme efdbf7cdc4 * Remove unneeded headers.
* KNF, u_intx_t -> uintx_t
* There's no need to use additional variables for iobase and iot, just
  use the members from ia.
2007-03-07 17:32:47 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
xtraeme 840604a1a8 Replace simple_locks with mutexes, reviewed by ad@. 2007-02-18 23:34:55 +00:00
ad d14a7576fc Fix spllowersoftclock() fallout. 2007-02-16 13:42:29 +00:00
reinoud 43061c75ae Rename the B_XXX flag to B_DEVPRIVATE flag since it was never used for
debugging and its main use is in device drivers. Its used there to signal
that the flagged buffer has a special meaning or should be handled
differently.

OK'd by Bill Sudenmund on tech-kern.
2007-02-15 18:33:26 +00:00
hubertf eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
xtraeme af41d0fea7 Merge defs from ugvar2.h into ugvar.h, suggested by tsutsui. 2007-01-20 18:32:41 +00:00
xtraeme 7a516bb827 PR kern/35438: uGuru 2005 support from Mihai Chelaru.
Also replace bcopy with memcpy.
2007-01-20 18:18:51 +00:00
cube 1ff20ac39c Make COM_HAYESP compile again. It assumes no register mapping is needed. 2007-01-10 20:59:10 +00:00
cube 16cd257563 Complete initialiser. 2007-01-10 20:38:32 +00:00
cube 747e90f203 Remove traces of scd(4), which apparently never actually had a driver in
the tree.
2007-01-09 21:59:08 +00:00
cube ecacf90d2f Remove stale config(5) entries for unexistent wl(4).
Ok'd by matt@.
2007-01-09 19:19:09 +00:00
cube ea085d876a Disable daic(4). The driver is not finished.
Ok'd by martin@.
2007-01-09 15:34:59 +00:00
xtraeme 8d4275e58d * Remove unused sensors, anyway we are showing just the sensors of what
the BIOS is reporting (and speedfan for windows).
* Simplify the code.
* Remove unused functions and unnecessary variables.
* Provide more rfact values for the voltage sensors (from OpenBSD).
* Remove the limit of 1.5 seconds for refreshing the sensors, it's
  unnecessary... we can read it every time we want.

Now I'm happy with the driver (code and envstat output):

[juan@nocturno][~]> envstat -r
   CPU Temp:     38.000 degC
System Temp:     36.000 degC
    VCORE_A:      1.664 V
      +3.3V:      3.312 V
        +5V:      4.919 V
       +12V:     12.480 V
       VBAT:      3.248 V
    CPU Fan:       3096 RPM
 System Fan:          0 RPM
[juan@nocturno][~]>
2007-01-07 01:39:24 +00:00
xtraeme 55694ceabd Driver for the Abit uGuru Hardware system monitor, contributed by
Mihai Chelaru. Minor changes (simplification and KNF) by me.

Thanks.
2007-01-06 21:27:54 +00:00
isaki 2410b4468e Correct indent. 2007-01-02 02:23:51 +00:00
cube 4cb6e56c76 Remove an error message about having FSTAR'd instances attaching at pcppi.
It's actually fine to have them.  Somehow I wish there was a way to express
that there can be only one device of that kind attaching on a given pcppi.

All of this is generic for all indirectly configured bus (i.e., specified
by kernel configuration).

Reported by uwe@.
2006-12-10 22:10:57 +00:00
uwe dbbb1cca5e When comlaining about child* attachment print "WARNING" and the child
name.  Makes it more obvious what the problem is, and easier to spot
in the dmesg output after quiet boot warns about "errors" while
detecting hardware.
2006-12-10 03:24:29 +00:00
uwe ba06ad7411 Add missing aprint_naive to the attach routine. 2006-12-10 00:40:10 +00:00
wiz 6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
wiz fa34b615d2 Correct spelling of "immediate(ly)". From Zafer. 2006-11-24 21:23:07 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
cube c3fe38a0cd config_found() is for direct configuration, not indirect.
Change the code to use config_search/config_attach, and print a warning
when the user has device* at pcppi? in the kernel configuration file.
2006-11-05 21:06:26 +00:00
reinoud f64c33e88b Define DPRINTF(x) as an empty block to prevent gcc from complaining about
empty statements. This is still an empty statement but it will be filtered
out still.
2006-10-20 18:14:59 +00:00
pooka 1810947bb4 make compile by using __unused & other necessary tricks
and remove <0 comparisons for bus_size_t.  if a port wants signed
bus_size_t, it just might have to accept it can't use this driver.  *snif*
2006-10-16 12:58:54 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos 82e1169df4 fix empty if 2006-10-04 15:49:59 +00:00
christos 12288ce635 Fix empty if 2006-10-04 15:48:47 +00:00
jmcneill f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
matt b9525730ee deal with 'bool' definitions 2006-09-11 03:37:12 +00:00
dogcow f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
christos e82a0f88ae add missing initializer. 2006-09-03 21:45:28 +00:00
christos 77c903b90a add missing initializer 2006-09-03 21:42:55 +00:00
christos 0c58aff5f5 add missing initializers 2006-09-03 06:46:22 +00:00
christos c11c8c78df add missing initializers 2006-09-03 05:29:46 +00:00