169922 Commits

Author SHA1 Message Date
dyoung
42acbb2b0d Fix syntax error in last. 2008-05-06 18:16:34 +00:00
dyoung
990c1a7873 Cosmetic: use return rc ? 0 : -1;
Make sure to release a prop_object_t that I am no longer using.
2008-05-06 18:09:50 +00:00
dyoung
a2e4fb3562 Use prop_dictionary_util(3) some more.
When we read interface flags and capabilities from the kernel, take
care not to record them in our current environment (env), but record
them in the output environment (oenv), instead.  This helps us get
interface capabilities and flags right.
2008-05-06 17:29:04 +00:00
xtraeme
d69a8a8939 Xref prop_dictionary_util(3). 2008-05-06 17:23:38 +00:00
xtraeme
eab7dadfb7 Xref mount_tmpfs(8). 2008-05-06 17:21:56 +00:00
ad
81194e34f1 Allow rw_tryenter(&lock, RW_READER) to recurse, for vfs_busy(). 2008-05-06 17:11:45 +00:00
dyoung
32cf2beed0 Rename in_addr_commit() to commit_address(), and refactor slightly
to support IPv6 as well as IPv4 (a work in progress).

Make the second argument of af_status() a bool instead of an int.

Exit early with an error if the operator specifies an unsupported
address family on the command line.  The change should help rc
scripts to detect that IPv6 support is missing from the kernel,
with 'ifconfig lo0 inet6'.

Start using prop_dictionary_util(3).
2008-05-06 16:15:17 +00:00
dyoung
e51773dc79 Add a license. 2008-05-06 16:09:18 +00:00
dyoung
40b61e5050 Add WARNS=4 and a dependency on ${LIBPROP}. 2008-05-06 16:07:00 +00:00
dyoung
fdf6250eac Add -lprop to the LIBS line so that ifconfig will link. 2008-05-06 15:32:06 +00:00
skrll
2932f766a1 Deal with ifconfig lossage.
Looks like I picked the wrong week to quit netbsd.
2008-05-06 15:09:45 +00:00
ad
d63f54a366 lookup: Do a vfs_trybusy(). If the file system is being unmounted, then
just fail the operation.
2008-05-06 15:04:00 +00:00
dyoung
8db3a2f0ba If the address family is not set, assume AF_APPLETALK. Exit
at_status() quietly if the address family is set, and it is not
set to AF_APPLETALK.
2008-05-06 15:02:49 +00:00
xtraeme
771a05b730 Do not acquire the rwlock recursively in prop_{array,dictionary}_iterator_reset()
when prop_{array,dictionary}_copyout_ioctl() is called.

Introduce _PROP_RWLOCK_OWNED() which is a KASSERT(rw_lock_held(lock))
and use it in those two functions, also acquire the rwlock in other
places where it is required now.

This fixes a LOCKDEBUG panic "locking against myself", as reported by
Geoff C. Wing in current-users@.
2008-05-06 13:52:51 +00:00
xtraeme
f5b5967c0e Make this build again. 2008-05-06 13:31:02 +00:00
ad
39d40db63f PR kern/38141 lookup/vfs_busy acquire rwlock recursively
- sys_sync: acquire a write lock on the mount since the operation modifies
  the mount structure.
- sys_fchdir: use vfs_trybusy(). If an unmount is in progress, just fail it.
2008-05-06 12:54:25 +00:00
lukem
dab1996c70 Add a missing semicolon.
(mmm, compile before commit :)
2008-05-06 12:52:34 +00:00
ad
8384d709ae Fix a couple of problems with checkdirs():
- vnode and cwd locks were being taken with proc_lock held, which is bad
  because proc_lock can only be held for a short period of time.

- Processes could have continually forked and escaped notice, keeping
  a reference to the old directory on top of which a new mount exists.
2008-05-06 12:51:22 +00:00
ad
bdaf7ef5fc PR kern/38141 lookup/vfs_busy acquire rwlock recursively
vfs_busy: don't deadlock if curlwp is unmounting.
2008-05-06 12:39:32 +00:00
ad
f4d5a72c7b PR kern/38141 lookup/vfs_busy acquire rwlock recursively
getvnode: Use vfs_trybusy, not vfs_busy. If unmount is in progress we
could deadlock, because vnode locks can be held during getnewvnode().
dounmount() locks in the reverse order (vfs_busy -> vnode).
2008-05-06 12:37:04 +00:00
ad
ed8a08bae0 PR kern/37950 Unmounting psshfs immediately panics the machine
puffs_getvnode() was inserting vnodes into mnt_vnodelist without taking
a reference to the mount for each. When vnodes are scrubbed, refs to the
vnodes mount structure are dropped => boom.
2008-05-06 12:33:16 +00:00
apb
76807ad91e Add a note about the stupid behaviour of "%c" format. 2008-05-06 12:01:35 +00:00
tsutsui
2925cedf26 - use RTK_IDR[0-5] registers to get MAC address on RTL8168C
- change sc_rev numbers to match quirk numbers used in Realtek's driver
- tweak some register definitions
Taken from Realtek's FreeBSD driver.

Untested yet on 8168C, but no bad sideeffect on older chips.
2008-05-06 11:45:00 +00:00
tsutsui
b127908947 Rename some softc variables for readability. 2008-05-06 11:35:38 +00:00
yamt
73fd77741c obsolete getiobuf_nowait mlink. 2008-05-06 11:34:18 +00:00
yamt
9cbf394e66 update to match with the recent reality. 2008-05-06 11:32:46 +00:00
yamt
c331e3e5e9 getiobuf(false, NULL) -> getiobuf(NULL, false) 2008-05-06 11:08:19 +00:00
yamt
bb127cf870 ata_raid_config_block_rw: getiobuf(vp, NULL) -> getiobuf(vp, false) 2008-05-06 11:07:24 +00:00
yamt
fc066b20a9 update after the following change.
subr_hash.c
	revision 1.3
	date: 2008/05/05 17:11:17;  author: ad;  state: Exp;  lines: +26 -12
	- Convert hashinit() to use kmem_alloc(). The hash tables can be large
	  and it's better to not have them in kmem_map.
	- Convert a couple of minor items along the way to kmem_alloc().
	- Fix some memory leaks.
2008-05-06 10:13:55 +00:00
apb
1eeed263ba Change the wording of a message, to make it clear that pressing SPACE
will stop the countdown timer.  The message now reads "Choose an option;
RETURN for default; SPACE to stop countdown."  It no longer says what
the default choice actually is, because the message printed on the
following line will do that.
2008-05-06 09:48:00 +00:00
skrll
65d8db46d0 Make this compile. 2008-05-06 09:10:25 +00:00
yamt
34e3535d80 document kpreempt_disable, kpreempt_enable, and kpreempt_disabled. 2008-05-06 08:40:47 +00:00
yamt
7c200b21f1 sort. 2008-05-06 08:38:43 +00:00
yamt
508d265a44 document kpreempt_disable, kpreempt_enable, and kpreempt_disabled. 2008-05-06 08:34:35 +00:00
yamt
82ae7f3c2b add a missing .El 2008-05-06 08:32:27 +00:00
skrll
77ecd4421a Restore RCSId lost in 1.11 2008-05-06 08:16:12 +00:00
dyoung
c62cf792b0 Take out my CFLAGS settings for debugging. 2008-05-06 04:40:45 +00:00
dyoung
7b01455a0e Overhaul ifconfig. Use fewer global variables. Take a leap toward
improved modularity and extensibility.

In the new architecture, a directed graph of argument-matching
objects (match objects) expresses the set of feasible ifconfig
statements.  Match objects are labelled by subroutines that provide
the statement semantics.

Many IPv4, IPv6, 802.11, tunnel, and media configurations have been
tested.

AppleTalk, ISO, carp(4), agr(4), and vlan(4) configuration need
testing.
2008-05-06 04:33:42 +00:00
uwe
39fcc155cc Default COPTS to "-Os -freorder-blocks" which is ~= -O2 but without
-falign-* that is too zealous for low-memory sh3 machines.  I've been
using this for my hpcsh and landisk kernels for a very long time.
(besides, it's not 2001 anymore and pkgsrc/cross/sh is long since gone).
2008-05-06 02:25:19 +00:00
uwe
d7e68261ea Avoid uninitialized variable warning at -O. 2008-05-06 02:12:19 +00:00
bjs
e28a3e014b Revert all the changes this time. 2008-05-06 01:51:00 +00:00
bjs
829081eaa7 Revert last commit -- breaks i915. 2008-05-06 01:45:47 +00:00
uwe
3b59dc3936 Enable re(4) now that bus_dma is fixed to deal with TLB-mapped data in mbufs. 2008-05-06 01:30:22 +00:00
uwe
a0a69502b3 Deal with TLB-mapped data in mbufs. Makes nfs writes work with re(4). 2008-05-06 01:29:00 +00:00
bjs
a65a4adb77 A few steps down the yellow brick road toward bus_dma-ification:
- Add drm_dmamem_alloc/drm_dmamem_free to drm_memory.c to nicely wrap up
   the bus_dma API.

 - Start using the above in drm_pci.c.

 - Add DRM_NETBSD_DMA_ADDR/DRM_NETBSD_DMA_VADDR macros.

 Locking:

 - Use IPL_NONE for all locks except the IRQ lock, which runs at IPL_VM.

 - Use IPL_VM instead of IPL_TTY with pci_intr_establish() for consistency's
   sake. These two changes seem to eliminate the presistent lockups I was
   having (NetBSD-current/amd64 r300).

 - Start getting rid of DRM_SPININIT/DRM_SPINUNINIT and DRM_SPINLOCK/
   DRM_SPINUNLOCK ... these annoy me to no end--not to mention that they
   locks may or may not be spinlocks!  It's a linux frob, really.
   We're way beyond merging any useful bsd-core code on a large scale, which
   was the only good reason to keep them around.

 Memory allocation:

  - Change drm_memory.c so that it contains generally useful, memory
    allocation functions using kmem(9) (mostly used by the drivers
    themselves).  However, I expect to use this more in the future
    in the "bsd core".  These functions always use KM_NOSLEEP.
    The new drm_dmamem_alloc function has a wait argument which
    takes DRM_DMA_WAIT/DRM_DMA_NOWAIT (defined as their bus_dma
    counterparts), and honors this hint in its calls to kmem(9)
    and bus_dma(9) functions.

  - Got rid of these functions' "area" argument--it's been deprecated for
    ages.  Provide macros in drmP.h to deal with the os-independent code.

  - Declare these functions inline -- I believe they're used enough
    by the i915 and radeon drivers to justify it.  Please let me know
    if I am mistaken.

    NOTE: With these changes, a glxgears score which was previously
    ~3900fps is now ~4400fps (same setup as mentioned above).  I realize
    that using kmem(9) could cause problems, but I can't seem to run into
    any with my test setup.  If anyone smells regression, please let me
    know.
2008-05-06 01:26:14 +00:00
lukem
c63ddfd726 Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.
Fixes PR bin/38589
2008-05-05 22:54:11 +00:00
dyoung
5e40785deb Make PCI power re-activation DTRT: pass pci_activate_null instead
of NULL to pci_activate()

Call the variable where we store the PCI Command & Status Register
'csr' instead of 'pmreg'.

In sipcom_intr(), get out if the device is inactive.  Otherwise
sip(4) may inadvertently try to handle a shared interrupt before
the driver state is completely set up.
2008-05-05 20:19:09 +00:00
dyoung
f05735da97 Restore PCI devices to a state that is closer to the state that
NetBSD finds them in: save and restore power management state
(D0..D3) and PCI Configuration Registers 0x0 through 0x40 during
device attachment and detachment, respectively.  Among other things,
this will fix sip(4) detachment and re-attachment.
2008-05-05 20:14:30 +00:00
martin
7e90218496 Stephan Meisinger kindly contributed this man pages to TNF, so use the
standard TNF 2 clause license.
2008-05-05 19:51:23 +00:00
jmmv
940585f3ea Fix MKMODULAR=yes builds by resolving installation problems of the k_helper
test module after the introduction of bsd.kmodule.mk.  The files list was
inconsistent with the new module structure and the Makefile did not use the
correct variable to specify the installation of the module.  Hi ad@!
2008-05-05 19:33:09 +00:00