167491 Commits

Author SHA1 Message Date
xtraeme
3e450e962a arc_bio_disk_novol: don't forget to free diskinfo if arc_msgbuf
returns an error.
2008-02-29 12:37:43 +00:00
yamt
6c336cd753 don't bother to check curlwp==NULL. 2008-02-29 12:34:23 +00:00
yamt
a890fa326d update a comment. 2008-02-29 12:10:09 +00:00
yamt
569bb6b4dc update comment 2008-02-29 12:08:04 +00:00
yamt
cfc68c3385 fix a livelock with multiple readers by separating condvar. 2008-02-29 12:04:48 +00:00
jmmv
a0228be41f Discard invalid console parameters, which cause initialization failures
later on.  Reported by njoly@.
2008-02-29 10:45:50 +00:00
jmmv
4439ff5857 Drop trailing whitespace. 2008-02-29 10:23:53 +00:00
dogcow
15debf8a40 Add some of those pesky semicolons, and correct number of args. 2008-02-29 08:41:51 +00:00
matt
a34217b8de Rework tcp congctl selection code so that the congctl entries can be const.
Don't access tcp_congctl stuff outside of tcp_congctl.c, use routines to
update t_congctl.  This code is slightly now more complicated.
2008-02-29 07:39:17 +00:00
dyoung
e4f3892584 Use pmf_device_register1() instead of shutdownhook_establish() to
register com_cleanup() as the shutdown hook.

Add a generic suspend routine.  Suspend and resume com@isa.

Protect against dereferencing a NULL softc in comioctl().

Destroy both a mutex and a callout in com_detach().

Cosmetic: use aprint_*_dev().  Use PMF_FN_ARGS, PMF_FN_PROTO.
2008-02-29 07:02:04 +00:00
dyoung
f612df5fb6 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:38:28 +00:00
matt
766105a907 #include <stdbool.h> if !_KERNEL && !_STANDALONE 2008-02-29 06:37:57 +00:00
dyoung
61ad1dd43b Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:35:40 +00:00
dyoung
41d64046d4 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:25:08 +00:00
dyoung
f580a3a869 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:13:39 +00:00
lukem
cea4b7cdfd Simplify ypdb_open() API and just use it for opening the DB for reading.
Provide a separate ypdb_mktemp() API to open a temporary file read-write.
Use mkstemp() instead of mktemp().

NOTE: makedbm & mkalias tested ok.  I couldn't test ypxfer.
2008-02-29 03:00:47 +00:00
matt
e48401e466 Add support for CTLTYPE_BOOL 2008-02-29 02:28:35 +00:00
chris
fa96148b7b Misc updates to hopefully improve vidcvideo console usability:
* add virtual consoles by using wsdisplay_vcons
* make use of generic scrollback support for consoles
* enable colour support for vidcvideo consoles
* use the default NetBSD font, rather than picking a sony one
* make kernel output green, so it's obvious.

This was tested at 800x600 in 8bpp on an A7000+ and 2MB VRAM RiscPC.

To actually benefit from these changes wscons=YES needs to be added to
your rc.conf
2008-02-29 00:37:26 +00:00
xtraeme
9ec5a8145c If pmf_device_register1() fails for some reason, make it panic(9)
rather than printing an error. The shutdown handler is mandatory on
this driver to flush controller's cache or stopping background
rebuilds.
2008-02-28 21:08:45 +00:00
tnozaki
47d7f820fd bin/38047 fix bad prototype for function mbrlen
reported by cheusov AT tut DOT by, thanks!
2008-02-28 19:36:51 +00:00
drochner
69fd99f62d fix an unaligned PCI config space access for the P2 "BX" chipset 2008-02-28 18:51:18 +00:00
elad
cd05a6ee9b Introduce a new kauth action, KAUTH_NETWORK_NFS, and two requests,
KAUTH_REQ_NETWORK_NFS_EXPORT and KAUTH_REQ_NETWORK_NFS_SVC, and use them
to replace two KAUTH_GENERIC_ISSUSER calls in the NFS code.

Also replace two more with KAUTH_SYSTEM_MKNOD, where appropriate.

Documetnation and examples updated. More to come.
2008-02-28 17:07:49 +00:00
tsutsui
c98271f989 Add options COMPAT_40. 2008-02-28 17:01:51 +00:00
dyoung
9ab63bea7b Do not return EBUSY if this is the console. 2008-02-28 16:54:48 +00:00
xtraeme
43b696d498 Register a sensor per disk connected to a valid volume, so that we
can get more details if state on a disk or volume has changed,
previously only state about the volume was available.

You'll see something like this with envstat(8) now:

$ envstat -darcmsr0
RAID 5 volume0 (sd0):   building
 disk0 volume0 (sd0):     online
 disk1 volume0 (sd0):     online
 disk2 volume0 (sd0):     online
 disk3 volume0 (sd0):     online
$

Convert the driver to use pmf(9) and register a shutdown power handler
via pmf_device_register1() that was added recently.

Misc cosmetics tweaks while I'm here.
2008-02-28 16:47:53 +00:00
xtraeme
51e43163c8 Add three new values for ENVSYS_DRIVE units:
* ENVSYS_DRIVE_OFFLINE, ENVSYS_DRIVE_CHECK and ENVSYS_DRIVE_BUILD
2008-02-28 16:21:34 +00:00
christos
908cf676a4 mention RANDOM_MAX 2008-02-28 16:16:35 +00:00
christos
c75e135b85 add RANDOM_MAX define from anon ymous 2008-02-28 16:13:35 +00:00
elad
67470a76a1 Factor out the guts of get/setparam so it can be used from the compat code.
Make the FreeBSD and Linux compat code convert the parameters to their
native representation and call the native routines.

Remove KAUTH_PROCESS_SCHEDULER_GET/SET.

Update documentation and examples.

XXX: For now, only the Linux compat code does the priority conversion
XXX: right.

Linux priority conversion code from yamt@, thanks!

Okay yamt@.
2008-02-28 16:09:18 +00:00
drochner
c0adcb9cf8 use pmf again to register the shutdown handler, instead of
shutdownhook_establish()
2008-02-28 14:40:17 +00:00
drochner
0e748e633e Extend the pmf suspend/resume hooks by a shutdown method, so drivers
can register a shutdown handler explicitely.
Install a pci bus shutdown handler which disables bus master accesses
for all childs, so the drivers don't need to care.
This will hopefully be sufficient to replace the shutdownhooks
(together with the powerhooks). (It has been suggested to use some
general event notification framework for shutdown handlers, but there
might be cases where shutdown handlers must be run in an order following
the device hierarchy, which wouldn't be easy with event handlers
not tied to drivers.)
approved by David Young
2008-02-28 14:25:12 +00:00
martin
a9e7d15afd Make TSBs and MMU contexts per-cpu. 2008-02-28 11:50:40 +00:00
tls
baa02d2a35 From Darran Hunt: you can't just specify the "wrong" underlying algorithm
with the "right" output size in the xform declaration and have the _96
HMAC variants work -- the actual algorithm machinery (hardware or software)
ignores the output-size parameter, it's just there to inform the interface
consumer.

This should fix FAST_IPSEC.
2008-02-28 09:29:10 +00:00
matt
49cf9ad72a constify dkdriver 2008-02-28 04:55:47 +00:00
macallan
d15719537b switch to PCI_MAGIC_IO_RANGE 2008-02-28 00:21:38 +00:00
dyoung
82d7506fef Use device_t and accessors. 2008-02-28 00:20:04 +00:00
macallan
12dbe7fb57 move PCI_MAGIC_IO_RANGE to a header that's actually exported to userland 2008-02-28 00:18:08 +00:00
macallan
ee03e6b4fb get rid of the last #ifdef macppc and use PCI_MAGIC_IO_RANGE to select
at which offset we mmap PCI IO space
2008-02-27 23:59:37 +00:00
macallan
3195ef8f6f add a #define to select at which offset display drivers' mmap() methods
return the resp. IO range so X can access stuff lie VGA registers
2008-02-27 23:56:58 +00:00
matt
1a5c171d25 Add the bus devclass to tc 2008-02-27 23:49:11 +00:00
dsl
f127a329db Sprinkle 'static' and 'EXIT_FAILURE'. Use getopt().
Simplify getprec() using libc functions.
Code from me partially inspired by a diff sent by xtos.
2008-02-27 22:47:32 +00:00
matt
0c07a5e990 Emit ANSI protype: fn (void) and not fn () 2008-02-27 22:38:57 +00:00
hubertf
5a67df07cd Fix comment: SA_RESTART only restarts the system call, not the whole system.
Noted by Jukka Salmi <j+nbsd@2008.salmi.ch> on tech-userlevel.
2008-02-27 22:18:41 +00:00
elad
8597bf513b Default defer, not deny.
Idea okay wrstuden@, no objections on tech-kern@ and tech-security@.
2008-02-27 21:59:26 +00:00
dsl
01709217fc Generate ANSI functions.
Just indent the code by a single tab - no need to compare against the
C program generated version any more.
2008-02-27 21:56:14 +00:00
dsl
b63023e666 Change spaces to tabs for consistency with adjacent lines. 2008-02-27 21:55:07 +00:00
xtraeme
4ac581c0f9 Add back the CPU_TMLR_* definitions for binary sysctl compatibility
with NetBSD pre-2.0, and use them in the longrun driver again.

Requested by cube@.
2008-02-27 20:18:56 +00:00
matt
9a1bbaab37 Convert to ansi definitions from old-style definitons. 2008-02-27 19:59:48 +00:00
matt
c8f6e9fb17 Allow PRIV_ALLOC devices to have no private data. 2008-02-27 19:59:05 +00:00
matt
5baf734b61 Convert to ansi definitions from old-style definitons.
Remember that func() is not ansi, func(void) is.
2008-02-27 19:57:32 +00:00