161778 Commits

Author SHA1 Message Date
xtraeme
e83dd2301e - Fix a memleak in ENVSYS_SETDICTIONARY if there wasn't any error
(thanks god for KMEMSTATS).
- sysmon_envsys_register: add all objects in the dictionary without any
  lock, at this point the sme device hasn't been added into the list
  and it's safe.
- Add sysmon_envsys_destroy_plist(prop_array_t) that destroys all objects
  associated with a device and use it on sysmon_envsys_unregister() and
  sysmon_envsys_register() if there's any error.

Thanks to Mindaugas Rasiukevicius (rmind@) for the great comments/ideas.
2007-09-01 13:43:10 +00:00
xtraeme
9da1b0ba86 sme_event_register: don't forget to add the object in dictionary when
a critical value is added via ENVSYS_SETDICTIONARY.
2007-09-01 12:46:04 +00:00
yamt
b255678460 revert a part of the previous. (typo in a comment) 2007-09-01 10:53:02 +00:00
yamt
73969496b3 reduce cosmetic differences between i386 and amd64 pmaps.
(whitespace, ansify, etc.)
no functional changes are intended.
2007-09-01 10:47:43 +00:00
jnemeth
0e0996d809 Convert build.sh iso-dir=directory option to -C cddir as per jmmv@ on
source-changes.
2007-09-01 09:32:19 +00:00
yamt
901ed7aed2 remove a stale comment. 2007-09-01 09:15:09 +00:00
yamt
58fb7deca6 use UVM_OBJ_INIT. 2007-09-01 09:14:31 +00:00
yamt
f70c0fb34e remove arguments which is no longer necessary. 2007-09-01 09:12:29 +00:00
jnemeth
0f6d505a04 note new build.sh iso-dir=directory option 2007-09-01 08:17:13 +00:00
jnemeth
3afb399fc8 Add an iso-dir=directory option. When combined with iso-image or
iso-image-source, it will cause directory to be added to the CD-ROM image.
2007-09-01 08:15:27 +00:00
dyoung
c53c02b0c9 Once again, use ether_ioctl() instead of (cmd == SIOCADDMULTI) ?
ether_addmulti() : ether_delmulti().
2007-09-01 07:43:36 +00:00
dyoung
064ec1416f token_addmulti and token_delmulti are never used in the kernel, so
delete them.
2007-09-01 07:41:22 +00:00
dyoung
c66d2e7604 fddi_addmulti and fddi_delmulti are never used in the kernel, so
delete them.
2007-09-01 07:40:53 +00:00
dyoung
dcb45c7c0e Instead of IF_POLL()'ing and IF_DEQUEUE()'ing, just IF_DEQUEUE(). 2007-09-01 07:38:16 +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
9bee2cd7f1 Fix compilation if !defined(INET6). Thanks, Geoff Wing, for the
bug report & patch.
2007-09-01 07:03:32 +00:00
dyoung
b3870c371a In sockaddr_copy(), stop caring about the destination sockaddr's
family and length, it doesn't matter in the post-pool(9) sockaddr
regime.
2007-09-01 06:50:44 +00:00
pavel
ce71996a9e Put the declaration of cpu_softc and #include of sys/device.h inside
#ifdef _KERNEL to reduce the namespace pollution from proplib which
causes build failure in libexec/ld.elf_so.
2007-09-01 06:41:28 +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
macallan
f9794c16db add screen blanking support 2007-09-01 03:45:14 +00:00
dyoung
aade2db1a7 Use ifreq_getaddr(). Pass a sockaddr instead of ifreq where sockaddr
will suffice.
2007-09-01 03:07:24 +00:00
xtraeme
822a96ea64 sme_event_register: sme_sensor_upint32() was being called even when
adding events via sme_event_drvadd(), fix it.
2007-09-01 00:12:07 +00:00
dyoung
f06b9f6f72 Fix bug in last: add missing ampersand. 2007-08-31 23:40:08 +00:00
xtraeme
63f1decdb2 - sme_unregister_all: there's no need to use a struct sysmon_envsys as
argument, just pass sme->sme_name to it.
- sysmon_envsys_register: drop the array in all cases, not just when
  there's an error. The reference is stored in the dictionary anyway...
- Update some comments.
2007-08-31 22:44:39 +00:00
dyoung
bb04fc71fb Use sockaddr_in_init() and ifreq_setaddr() to initialize a sockaddr_in
and an ifreq.ifr_addr, respectively.  Get rid of an extraneous
cast---down the elevator shaft!  Change 'ireq' to 'ifr', which is
what the kernel calls a temporary struct ifreq virtually everywhere
else.
2007-08-31 22:02:58 +00:00
dyoung
353d6b2744 Stop sharing a sockaddr_in template among multicast routines,
because that's just going to cause problems down the road.  (Suppose
we can have two CPUs in the network stack someday?)  Instead, use
sockaddr_in_init() to initialize a sockaddr_in on the stack.

Use ifreq_setaddr() to initialize ifreq.ifr_addr.
2007-08-31 21:56:43 +00:00
dyoung
c2a1a6621f Use sockaddr_in6_init(). 2007-08-31 21:40:41 +00:00
dyoung
7e6b3f4292 Per discussion in 30 May 2007 on tech-net, add accessors for
ifreq->ifr_addr, ifreq_getaddr() and ifreq_setaddr().
2007-08-31 21:02:15 +00:00
drochner
0e0fe2c353 Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
2007-08-31 16:24:21 +00:00
drochner
77ba1afdf0 Add a check for correct definition of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Addresses PR lib/31306 by Neil Booth.
2007-08-31 16:20:50 +00:00
yamt
5ea51f80da pull the following change from vmlocking branch.
revision 1.7.2.10
	date: 2007/08/27 12:51:13;  author: yamt;  state: Exp;  lines: +6 -7
	sleepq_block: don't call lwp_unsleep twice.
	(fix an assertion failure in lwp_unsleep.)
2007-08-31 15:27:18 +00:00
jnemeth
28af2a6c6b add CDEXTRA for specifying a directory of extra stuff to put on a CD 2007-08-31 14:20:29 +00:00
xtraeme
e71bfccc23 Merge sme_event_add() into sme_event_register()... there's no need
to have two different functions for this.
2007-08-31 10:13:27 +00:00
xtraeme
ab98913282 Simplify sme_event_add() and fix a problem when updating critical
values.
2007-08-31 09:12:55 +00:00
xtraeme
097c13a522 Use a different case for the CX700 IDE Controller to print the
attach message and when setting the UDMA mode.
2007-08-31 01:42:48 +00:00
xtraeme
71185618cd Mention support for VIA CX700 IDE and NVIDIA MCP67 IDE/SATA Controllers. 2007-08-31 01:39:46 +00:00
xtraeme
ee2b8027ff - Proper VIA CX700 IDE Controller support (missed in previous).
- Attach to the NVIDIA MCP67 IDE and SATA controllers.
2007-08-31 01:37:46 +00:00
xtraeme
930907a507 Proper ICH8M IDE Controller support (missed in previous). 2007-08-31 01:35:07 +00:00
xtraeme
5f6ecf6711 Attach to the VIA CX700 IDE Controller. 2007-08-31 01:22:12 +00:00
xtraeme
6fe677c273 regen 2007-08-31 01:17:39 +00:00
xtraeme
116488dd92 + VIA CX700 IDE Controller 2007-08-31 01:17:20 +00:00
xtraeme
d67fa603fc Add a few KASSERT(mutex_owned(&foo_lock)) as suggested by Andrew Doran. 2007-08-31 00:35:08 +00:00
xtraeme
3301f9a5e5 Improve NAME description. 2007-08-31 00:19:21 +00:00
xtraeme
ae19b58541 Sync with reality, this driver supports up to ICH9 including IDE
and SATA controllers.

Bump date.
2007-08-31 00:05:44 +00:00
xtraeme
8de967d769 Attach to the ICH8M IDE Controller. 2007-08-31 00:01:17 +00:00
xtraeme
fde22f7617 regen 2007-08-30 23:59:21 +00:00
xtraeme
a1032767cf + Intel 82801HBM IDE Controller 2007-08-30 23:59:01 +00:00
xtraeme
a7e0991f20 Attach to the ICH9 SATA devices. 2007-08-30 23:55:03 +00:00
xtraeme
885829cb69 More misc changes for sysmon_envsys(9):
- Add the SLIST for sensor descriptions and sme_uniqsensors into the
  struct sysmon_envsys (it's per device now).
- Use only one common struct with three members for the static tables
  (there's no need to have different structs just for them).
- While initializing/destroying the events framework, use the
  strategy specified by Andrew Doran in:
  http://mail-index.netbsd.org/tech-kern/2007/06/21/0025.html).

(forgot in previous)
2007-08-30 23:46:29 +00:00