Commit Graph

4650 Commits

Author SHA1 Message Date
he a37504be16 Remove a now-unused local variable. 2007-09-06 08:52:36 +00:00
xtraeme 9622f8ee94 s/ENVSYS_FMONDRVSTATE/ENVSYS_FMONSTCHANGED/. Noticed by Manuel Bouyer@. 2007-09-04 20:46:00 +00:00
he 97bd63dbfb Rename function argument from command to cmd, to make the code
actually build after the previous change.
2007-09-03 11:32:07 +00:00
dyoung 5384cb3ee5 Use bpf_mtap2(). 2007-09-01 07:34:03 +00:00
dyoung dcd8923429 Change a bazillion occurrences of code resembling this,
error = (cmd == SIOCADDMULTI) ?
	    ether_addmulti(ifr, &sc->sc_ec) :
	    ether_delmulti(ifr, &sc->sc_ec);

	if (error == ENETRESET) {

to this,

	if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number.  This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
2007-09-01 07:32:22 +00:00
dyoung 2fc102750d Use ifreq_setaddr(), ifreq_getaddr(), sockaddr_in_init(), and
sockaddr_copy().  Constify.  Compare pointers with NULL, not 0.
Don't "test truth" of pointers, but compare with NULL.
2007-09-01 04:32:50 +00:00
dyoung f59a11881a Constify: LLADDR() -> CLLADDR(). 2007-08-29 22:33:42 +00:00
macallan c86f607779 fix typo 2007-08-28 00:21:04 +00:00
macallan 28ba522d98 add lots of register definitions from the IBM561 datasheet 2007-08-27 19:46:45 +00:00
dyoung c3db559a5f Constify: use CLLADDR() instead of LLADDR() wherever possible. 2007-08-27 14:48:54 +00:00
dyoung b4124ae5bd Constify. 2007-08-27 07:33:17 +00:00
xtraeme 079789d3c9 Add missing __KERNEL_RCSID(). 2007-08-27 06:18:55 +00:00
xtraeme 70c59631a7 Cosmetic: "device %d-bit timer" -> "device: %d-bit timer". 2007-08-27 06:17:28 +00:00
dyoung 71e77a61b4 Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).
2007-08-26 22:45:55 +00:00
dyoung f004b71d98 Constify. 2007-08-26 22:36:35 +00:00
xtraeme 268e268682 Move the ICH SMB defs to dev/ic/i82801lpcreg.h, it's where it belongs.
This is to avoid code duplication.
2007-08-26 18:39:43 +00:00
xtraeme 031bec6d2c Some changes for the ichlpcib driver:
- Moved to x86/pci, so that EM64T systems running NetBSD/amd64 can use it.
- Added support for the TCO on ICH6 or newer chipsets, adapted from
  FreeBSD.
- Added timecounter support for the power management timer, adapted from
  OpenBSD.
- Plus some misc/cosmetic changes.

Thanks to yukonbob on irc@freenode for testing the TCO part on ICH4-M.
Tested by me with ICH7 too.
2007-08-26 16:49:47 +00:00
macallan e44cd7ace2 add some comments 2007-08-26 07:24:58 +00:00
macallan 740e56f356 register definitions and some drawing routines for Number Nine Imagine 128
graphics controllers
2007-08-26 00:34:34 +00:00
kiyohara ae871a0c2d The variable slhci_usbdebug is defined in '#ifdef SLHCI_DEBUG' and
'#ifdef USB_DEBUG'.
  Reported by Bernd Ernesti <netbsd@lists.veego.de>
2007-08-24 01:49:08 +00:00
tsutsui 37e53f693f KNF, ANSIfy, TAB/space cosmetics. 2007-08-20 12:32:30 +00:00
tsutsui e416a3f87c FALSE -> false, TRUE -> true 2007-08-19 16:11:46 +00:00
kiyohara ae13675987 slhci(4) is MP safe and can use the CALLOUT_MPSAFE flag.
patch from Matthew Orgass <darkstar@city-net.com>
2007-08-19 07:42:04 +00:00
martin 9247850afb Remove all locking from com_enable_debugport() - it is either called at
attach time, where we don't need further locking, or from comopen(),
where the caller does proper locking already.
2007-08-16 08:56:49 +00:00
kiyohara 44c89c7646 Replace to Matthew Orgass's slhci(4).
http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
2007-08-15 03:53:08 +00:00
kiyohara fd0dddb4aa Must call callout_init(). 2007-08-14 15:04:44 +00:00
xtraeme bab89d201b w83627ehf_sensors: don't add sensors with duplicate descriptions.
These are voltage sensors and the VINX name is appropiate.

Found by Heron Gallegos.
2007-08-08 10:09:43 +00:00
tron 2a7b5e659f Fix some KNF glitches pointed out by Garrett D'Amore. 2007-08-04 22:01:06 +00:00
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
tron 8760b54b72 Use the appropriate number of maximum devices for Fibre Channel.
Problem Jarle Greipsland on "current-users" mailing list.
2007-07-27 18:38:13 +00:00
tron 14ce5c0a98 Add support for newer SAS and similar devices to mpt(4). Tested with
the LSI SAS1064 in a Sun x4200 server.

These enhancements were developed by Garrett D'Amore and contributed
to NetBSD by the TELES AG.
2007-07-27 13:06:51 +00:00
dsl 1b3b0fe4f7 include sys/cdefs.h before opt_xxx.h 2007-07-19 22:18:54 +00:00
dyoung 1f1797c9c0 Suppress spurious timeouts and avoid wedging in OACTIVE state:
1 Set or clear OACTIVE as transmit buffers are depleted or
        replenished, respectively.  Do not use 802.11 acknowledgements
        as a criteria for clearing OACTIVE.

        2 Let each transmit queue count down to timeout independently,
        and get rid of the shared countdown (sc_tx_timer).  When
        we add a packet to a transmit queue, restart the queue's
        countdown.  Stop a transmit queue's countdown when the
        queue empties.
2007-07-17 01:26:17 +00:00
ad bba99c25aa Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
martin 70b0dadb9c Do not stop a callout before it is initialized. 2007-07-12 17:42:17 +00:00
he 6b95c79e89 Adapt to the new signature for callout_init(). 2007-07-11 19:15:02 +00:00
ad 7a863e51a0 Adjust to match callout_init signature change. 2007-07-10 22:53:29 +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
mjacob cbd714c116 Oh, dear, I didn't have an i386 or amd64 up and running and
missed a LITTLE ENDIAN version of a define.
2007-07-08 05:22:33 +00:00
mjacob 3ee1a2adaa Do a number of 24XX related fixes: fix the actual getting of initiator
status correctly (which we never were doing before). Add an underrun
checker for 24XX. The process of sorting this out led to a whole bunch
of endian surprises that had to be dealt with. Fix NVRAM endian issues
for the 24XX as well.

Do a little 2200 related cleanup- in particular, turn off complaints about
not finding a fast posting handle when running with RIO enabled- we are
somehow getting duplicate completions in this case. If we ignore them and
don't complain, all is well, and we actually start averaging > 2 commands
completed per interrupt.
2007-07-07 00:49:48 +00:00
xtraeme edbf497407 mfi_sensor_gtredata:
- There's no need to set edata->units again, it was set already before.
- Remove the last ENVSYS_SVALID assignment that overrides previous
  assignments (found by mhitch@).
2007-07-04 17:07:04 +00:00
xtraeme 50094295cc ug_gtredata: add another break in the default case. Just for consistency
with other code.
2007-07-03 09:40:28 +00:00
xtraeme 93edd2a3c9 ug2_gtredata: add missing break in default case. 2007-07-03 09:32:05 +00:00
xtraeme f77ec0c18c Winbond W83627EHF-A support, from OpenBSD. 2007-07-02 17:49:47 +00:00
xtraeme a5d1788b65 ug*_gtredata: use the edata pointer rather than using the edata array
index.
2007-07-01 21:28:34 +00:00
xtraeme 4a7e371eab There's no need to use another envsys_data_t pointer that points to
the sensor specified in the softc, use edata passed in by the gtredata
function. Also remove a line of code that is not needed anymore with
envsys2.
2007-07-01 11:46:54 +00:00
xtraeme 4510a124e4 There's no need to set ENVSYS_FMONNOTSUPP in sensor's flags anymore,
userland limits for this type of sensor is disabled by sysmon_envsys(9).
2007-07-01 11:35:31 +00:00
xtraeme bb8e671373 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 08:29:48 +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