hmp [Sat, 10 Nov 2007 06:04:46 +0000 (06:04 +0000)]
Clean up the rmlock(9) manual page:
* Correct spelling and grammar
* Re-structure sentences in BUGS section for legibility
* Break long lines appropriately
* Break lines at full stops
* Add mdoc(9) commands where applicable
* Remove superfluous .Ft in the SYNOPSIS section
* Various other mdoc(9) fixes
ariff [Sat, 10 Nov 2007 04:32:50 +0000 (04:32 +0000)]
Limit total playback channels to just 1, for ALi M5451.
The reliability of it's multi DAC / playback channels is
not that good. Enabling vchans make the bug more visible
since playback allocation will look for possible free
hardware channels first (i.e: the next DAC, the very first
has been consumed by vchan mixer) which in this case has
been proven faulty.
Reported / Tested by: Sascha Klauder
MFC after: 3 days
- Fix documentation to match code. Specifically, -c doesn't have
to be specified together with either -u or -t to have an effect,
and exit status of 2 is not possible after a Perl->C conversion.
ups [Thu, 8 Nov 2007 19:35:36 +0000 (19:35 +0000)]
Use VM_FAULT_DIRTY to fault in pages for write access in
proc_rwmen.
Otherwise copy on write may create an anonymous page that is
not marked as dirty. Since writing data to these pages
in this function also does not dirty these pages they may be
later discarded by the pagedaemon.
jhb [Thu, 8 Nov 2007 15:51:52 +0000 (15:51 +0000)]
Make it easier to add more ptys to the pty(4) driver:
- Use unit2minor() and minor2unit() to generate minor numbers to support
unit numbers higher than 255.
- Use simple string operations on the 'names' array rather than hard-coded
constants and switch statements so that more ptys can be added by simply
expanding the 'names' array.
cperciva [Thu, 8 Nov 2007 13:06:38 +0000 (13:06 +0000)]
Two minor improvements uncovered by work on upgrading between releases:
* When installing updates, make sure that securelevel <= 0. Otherwise
we can't remove the schg flag from files.
* When preparing to download updates, check to see if we already have
them sitting in the /files/ directory. This saves bandwidth if users
run "freebsd-update fetch" more than once without installing updates
in between.
ariff [Thu, 8 Nov 2007 08:25:58 +0000 (08:25 +0000)]
- Remove magic number and fit max rx buffer size accurately.
- Patch registers CR47 and CR157 on devices that require it.
- Fix power calibration setting on ZD1211B.
Obtained from: OpenBSD
- Fix multicast transfer by properly reprogram multicast global
hash table, which in turns fix promiscuous mode and IPv6
autoconfiguration / local networking.
sobomax [Wed, 7 Nov 2007 22:47:41 +0000 (22:47 +0000)]
Put back devstat support that was lost during GEOM transition. Initially,
I've tried to move md(4) to use geom_disk class, like real disks do, but
this requires major rework of some of the existing features such as
configuration dumping for example. Therefore just putting devstat support
directly into md(4) seems to be optimal solution.
Now you can see md(4) stats in `systat -vm' again.
rpaulo [Wed, 7 Nov 2007 20:05:13 +0000 (20:05 +0000)]
Driver for the Apple System Management Console (SMC). This hardware is
present on the MacBook, MacBook Pro, and Intel MacMini.
This driver exports information via sysctl in its private sysctl tree
dev.asmc.*. You can get information about temperatures, fan speeds, the
keyboard light sensor and the Sudden Motion Sensor (SMS).
The SMS is very useful to park the disk heads when the laptop is
moved. Basically, the SMS is setup so that, under movement, we get an
interrupt on irq 6 and a devd notification is sent.
Sponsored by: Google Summer of Code 2007
Approved by: njl (mentor)
Reviewed by: attilio (previous version, but very similar), jhb (interrupt
specific review)
pjd [Wed, 7 Nov 2007 14:44:31 +0000 (14:44 +0000)]
Warn if kmem_map size is set to less than 512MB. Previous warning was a bit
pointless, because default is set to something around 300MB and also
insufficient.
edwin [Wed, 7 Nov 2007 01:14:28 +0000 (01:14 +0000)]
After discussions with grog@ (mentor):
- When none of the directories in FORTUNE_PATH exist, abort instead
of using the default FORTDIR.
- Little stylify changes.
- Add documentation about the FORTUNE_PATH variable.
oleg [Tue, 6 Nov 2007 23:01:42 +0000 (23:01 +0000)]
1) dummynet_io() declaration has changed.
2) Alter packet flow inside dummynet: allow certain packets to bypass
dummynet scheduler. Benefits are:
- lower latency: if packet flow does not exceed pipe bandwidth, packets
will not be (up to tick) delayed (due to dummynet's scheduler granularity).
- lower overhead: if packet avoids dummynet scheduler it shouldn't reenter ip
stack later. Such packets can be fastforwarded.
- recursion (which can lead to kernel stack exhaution) eliminated. This fix
long existed panic, which can be triggered this way:
kldload dummynet
sysctl net.inet.ip.fw.one_pass=0
ipfw pipe 1 config bw 0
for i in `jot 30`; do ipfw add 1 pipe 1 icmp from any to any; done
ping -c 1 localhost
3) Three new sysctl nodes are added:
net.inet.ip.dummynet.io_pkt - packets passed to dummynet
net.inet.ip.dummynet.io_pkt_fast - packets avoided dummynet scheduler
net.inet.ip.dummynet.io_pkt_drop - packets dropped by dummynet
P.S. Above comments are true only for layer 3 packets. Layer 2 packet flow
is not changed yet.
edwin [Tue, 6 Nov 2007 22:40:16 +0000 (22:40 +0000)]
Another typo in the previous commited fix. That makes four typos
in one fortune of only 32 words. Based on that single ratio, there
are 50453 more typos in the rest of the fortunes file....
marius [Tue, 6 Nov 2007 21:50:43 +0000 (21:50 +0000)]
In _pthread_key_create() ensure that libthr is initialized. This
fixes a NULL-dereference of curthread when libstdc+ initializes
the exception handling globals on archs we can't use GNU TLS due
to lack of support in binutils 2.15 (i.e. arm and sparc64), yet,
thus making threaded C++ programs compiled with GCC 4.2.1 work
again on these archs.
yongari [Tue, 6 Nov 2007 01:01:38 +0000 (01:01 +0000)]
Apparently some NVIDIA NICs store ethernet address in reverse order
while other variants have inorder ethernet address for the same
chipset. Override ethernet address ordering if we already know how
it was stored. This fixes the use of inversed ethernet address on
MCP67.
lulf [Mon, 5 Nov 2007 23:15:03 +0000 (23:15 +0000)]
- Add ZFS-support to fstat(1). This allows ZFS-filsystems to be including in
the open file-listing. It is added as a separate source file, so it can
respect WITH_/WITHOUT_CDDL as compile-flags.
- The warnlevel of the Makefile was decreased to quell solaris #pragma
warnings.
- Expect that fstat(1) doesn't work with kernel compiled with
DEBUG_VFS_LOCKS/DEBUG_LOCKS for now.
pjd [Mon, 5 Nov 2007 21:30:48 +0000 (21:30 +0000)]
If setting a state to anything but open state, close access to vdev.
This fixes replacing drive in place, eg. zpool replace tank da1 da1.
Before it complained that device is already open.
kan [Mon, 5 Nov 2007 19:51:12 +0000 (19:51 +0000)]
Do not pass an address to local stack variable to usbd_set_report_async.
Allocate space in keyboard state structure instead to prevent random byte
from possibly overwritten stack location frombeing shoved into USB device
when transfer actually takes place.
This fixes at least one instance of LEDs not working with USB keyboards.
pjd [Mon, 5 Nov 2007 18:40:55 +0000 (18:40 +0000)]
Remove "zfs:" prefix from lock and condvar names and also skip non-letter
characters (mostly "&"). Because top(1) shows only first six characters of
wait channel, without this change we saw only one meaningful character.
alc [Mon, 5 Nov 2007 18:13:34 +0000 (18:13 +0000)]
Add comments explaining why all stores updating a non-kernel page table
must be globally performed before calling any of the TLB invalidation
functions.
With one exception, on amd64, this requirement was already met. Fix this
one case. Also, as a clarification, change an existing atomic op into a
release. (Suggested by: jhb)
sam [Mon, 5 Nov 2007 17:24:28 +0000 (17:24 +0000)]
Correct handling of off-channel frames:
o do not override the home channel recorded for the sta when the frame is
received off-channel; this fixes a problem where we might think the sta
was operating on the channel the frame was received on causing association
requests to be ignored/rejected (likely cause of kern/99036)
o don't include rssi of off-channel frames in the avg rssi used to select
a bss; this gives us a better estimate of the signal we will see for the
station when on-channel
PR: kern/99036
Found by: Yubin Gong
Reviewed by: sephe
MFC after: 1 week
benjsc [Mon, 5 Nov 2007 11:47:19 +0000 (11:47 +0000)]
Initial Import of wpi driver based on p4 changeset 128641.
This import includes:
o wpi Wireless driver for the Intel 3945 Wireless Lan Controller (802.11abg) (sys/dev/wpi)
o Intel firmware revision 2.14.4 & associated LICENSE (sys/dev/contrib/wpi, sys/contrib/dev/wpi/LICENSE)
o wpifw Firmware driver (sys/modules/wpifw)
kib [Mon, 5 Nov 2007 11:36:16 +0000 (11:36 +0000)]
Fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
As consequence, vmspace_exec() and vmspace_unshare() returns the errno
int. struct vmspace arg was added to vm_forkproc() to avoid dealing
with failed allocation when most of the fork1() job is already done.
The kernel stack for the thread is now set up in the thread_alloc(),
that itself may return NULL. Also, allocation of the first process
thread is performed in the fork1() to properly deal with stack
allocation failure. proc_linkup() is separated into proc_linkup()
called from fork1(), and proc_linkup0(), that is used to set up the
kernel process (was known as swapper).
In collaboration with: Peter Holm
Reviewed by: jhb
kib [Mon, 5 Nov 2007 10:25:12 +0000 (10:25 +0000)]
The intent of the freeing the (zeroed) page in vm_page_cache() for
default object rather than cache it was to have
vm_pager_has_page(object, pindex, ...) == FALSE to imply that there is
no cached page in object at pindex. This allows to avoid explicit
checks for cached pages in vm_object_backing_scan().
For now, we need the same bandaid for the swap object, otherwise both
the vm_page_lookup() and the pager can report that there is no page at
offset, while page is stored in the cache. Also, this fixes another
instance of the KASSERT("object type is incompatible") failure in the
vm_page_cache_transfer().
Reported and tested by: Peter Holm
Reviewed by: alc
MFC after: 3 days
thompsa [Mon, 5 Nov 2007 06:13:07 +0000 (06:13 +0000)]
Change wpa_supplicant to down the interface at the start of the init routine.
wpa_supplicant expects that it has exclusive access to the net80211 state so
when its starts poking in the WEP/WPA settings and the card is already
scanning it can cause net80211 to try and associate incorrectly with a
protected AP.
This is an inconvenience for firmware based cards such as iwi where it can be
sent an auth instruction with incomplete security info and cause a firmware
error.
Remove the 'ifconfig up' from network.subr since wpa_supplicant will
immediately down the interface again.
Reported by: Guy Helmer (and others)
Reviewed by: sam, brooks, avatar
MFC after: 3 days
rwatson [Sun, 4 Nov 2007 19:20:33 +0000 (19:20 +0000)]
Garbage collect now-unused nfsrv_setcred() -- it's not only unused, but
also a purveyor of unfortunate (and now unsupported) direct frobbing of
struct ucred.
thompsa [Sun, 4 Nov 2007 08:32:27 +0000 (08:32 +0000)]
Add an option to limit the number of source MACs that can be behind a bridge
interface. Once the limit is reached packets with unknown source addresses are
dropped until an existing host cache entry expires or is removed. Useful to
use with the STICKY cache option.