Commit Graph

65372 Commits

Author SHA1 Message Date
Julian Elischer
c67ddc21e7 This time REALLY copy the name from the proc to the thread as a default. 2007-11-15 06:35:26 +00:00
Julian Elischer
4b9322aee8 When forking, the new thread deserves a name too. Don't just use the
td_startcopy section as it is not the right thing to do
in other cases (e.g. if starting a new thread from one that is already named).
2007-11-15 02:13:44 +00:00
Sam Leffler
12c1df4bc0 correct MIMO power save action frame format;
this one really is from the D2.04 spec

MFC after:	3 days
2007-11-14 21:28:48 +00:00
Attilio Rao
6f5c319c12 Remove a bogus KASSERT which will prevent rwlock to be acquired
recursively in exclusive mode with debugging kernels.

Submitted by: kmacy
Approved by: jeff
2007-11-14 21:21:48 +00:00
Marcel Moolenaar
0c3967e7fe o Rename cpu_thread_setup() to cpu_thread_alloc() to better
communicate that it relates to (is called by) thread_alloc()
o  Add cpu_thread_free() which is called from thread_free()
   to counter-act cpu_thread_alloc().

i386:	Have cpu_thread_free() call cpu_thread_clean() to
	preserve behaviour.
ia64:	Have cpu_thread_free() call mtx_destroy() for the
	mutex initialized in cpu_thread_alloc().

PR: ia64/118024
2007-11-14 20:21:54 +00:00
Yoshihiro Takahashi
e8f87893f6 MFi386: revision 1.661
Drastically simplify the i386 pcpu backend by merging parts of the
  amd64 mechanism over.
2007-11-14 12:29:09 +00:00
Gleb Smirnoff
b332b91f74 - Merge all the ng_send_fn2* functions into one - ng_send_fn2(),
removing some copy&pasted code.
- Reduce copy and paste in ng_apply_item().
- Resurrect ng_send_fn() as a valid symbol, not a define.

Reviewed by:	mav, julian
2007-11-14 11:25:58 +00:00
Julian Elischer
e01eafef2a A bunch more files that should probably print out a thread name
instead of a process name.
2007-11-14 06:51:33 +00:00
Julian Elischer
431f890614 generally we are interested in what thread did something as
opposed to what process. Since threads by default have teh name of the
process unless over-written with more useful information, just print the
thread name instead.
2007-11-14 06:21:24 +00:00
Julian Elischer
ca081fdbc5 Make sure there is a good default thread name for all threads. 2007-11-14 06:04:57 +00:00
Julian Elischer
502e39a873 Apply the same sort of locking done in
sys/dev/acpica/acpi.c rev 1.196 a while ago:

Grab Giant around calls to DEVICE_SUSPEND/RESUME in
acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems.  It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE).  Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.

Submitted by: Marko Zec
2007-11-14 05:43:55 +00:00
Joseph Koshy
8a850b11bc Reserve a bit for use when capturing callchains. 2007-11-14 04:48:58 +00:00
Peter Wemm
6dd3a6c06e Drastically simplify the i386 pcpu backend by merging parts of the
amd64 mechanism over.  Instead of page table hackery that isn't
actually needed, just use 'struct pcpu __pcpu[MAXCPU]' for backing like
all the other platforms do.  Get rid of 'struct privatespace' and a
while mess of #ifdef SMP garbage that set it up.  As a bonus, this
returns the 4MB of KVA that we stole to implement it the old way.
This also allows you to read the pcpu data for each cpu when reading a
minidump.

Background information:  Originally, pcpu stuff was implemented as having
per-cpu page tables and magic to make different data structures appear
at the same actual address.  In order to share page tables, we switched
to using the GDT and %fs/%gs to access it.  But we still did the evil
magic to set it up for the old way.  The "idle stacks" are not used
for the idle process anymore and are just used for a few functions during
bootup, then ignored.  (excercise for reader: free these afterwards).
2007-11-13 23:00:24 +00:00
Maxim Konovalov
6b0659fc0f o Do not leak inodes hash table at module unload.
PR:		kern/118017
Submitted by:	Ighighi
MFC after:	1 week
2007-11-13 19:34:06 +00:00
Rink Springer
c7fca64fe1 Remove the IEEE80211_C_WEP capability flag - setting it makes net80211 expect
that the driver will handle WEP encryption. However, this does not seem to be
implemented by this driver (or maybe the chipset doesn't support it?)

Removing the flag makes my wpi card work using wpa_supplicant(8) on a
network with 802.1x security (without this change it authenticated fine, but
tcpdump only saw garbage packets)

Reviewed by:	benjsc, imp (mentor)
Approved by:	imp (mentor), sam
2007-11-13 16:12:59 +00:00
Peter Grehan
2058844493 Split decr_init() into two, with the section that reads the timebase
frequency from OpenFirmware moved out and into a routine that is called
from cpu_startup().

This allows correct reporting of the CPU clockspeed when printing out
CPU information at boot time.

Reported by:	numerous
Reviewed by:	marcel
MFC after:	1 day
2007-11-13 15:47:55 +00:00
Bjoern A. Zeeb
fc89eb3a4c Though we are currently not interested in the EDD3 flag,
Enhanced Disk Drive Specification Ver 3.0 defines that the version
of extension in AH would be 30h.
Correct the check for that to be >=30h instead of >3h.
MFC after:	2 months
2007-11-12 23:53:43 +00:00
Bjoern A. Zeeb
190320e237 Add a missing priv check in key_attach to prevent non-su users
from messing with the spdb and sadb.

Problem sneaked in with the fast_ipsec+v6->ipsec merger by no
longer going via raw_usrreqs.pr_attach.

Reported by:	Pawel Worach
Identified by:	rwatson
Reviewed by:	rwatson
MFC after:	3 days
2007-11-12 23:47:48 +00:00
John Baldwin
dbac8ff400 Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was
bumped to 800004 to note the change though userland apps should not be
affected since they use <sys/agpio.h> rather than the headers in
sys/dev/agp.

Discussed with:	anholt
Repocopy by:	simon
2007-11-12 21:51:38 +00:00
Xin LI
eed4ee29e5 Correct a stack overflow which will trigger panics when
mode= is specified, caused by incorrect format string
specified to vfs_scanopt() and subsequently vsscanf().

Pointed out by:	kib
Submitted by:	des
2007-11-12 18:57:33 +00:00
Remko Lodder
3b9982e59c Add support for D-Link DGE-528(T) Rev.B1
PR:		112774
Submitted by:	Denis Fortin <fortin at acm dot org>
Approved by:	imp (mentor), yongari
MFC After:	3 days
2007-11-12 15:44:00 +00:00
Henrik Brix Andersen
419f6676c3 Update quirks for the MetaGeek Wi-Spy 1A, 1B and 2.4x.
PR:		usb/116057
Approved by:	imp, erwin (mentor)
2007-11-11 20:57:08 +00:00
Scott Long
bbb28fad82 The ESP driver isn't really MPSAFE, so don't mark it that it is. 2007-11-11 14:45:35 +00:00
Marius Strobl
5077aaca20 Adjust the padding of struct pcpu to src/sys/sys/pcpu.h rev 1.23. 2007-11-11 12:30:56 +00:00
Alan Cox
5564276676 Eliminate a stale comment concerning contigmalloc(9). 2007-11-10 19:11:51 +00:00
Remko Lodder
b227c33921 Add SMB support for the MCP61 chipset.
PR:		108830
Submitted by:	Edwin Mons <freebsd at edwinm dot ik dot nu>
Approbed by:	imp (mentor)
2007-11-10 17:12:08 +00:00
Sam Leffler
b0db4c9328 Add private tx/rx buffer management to support large frame sizes
and update the rx code to handle multiple frames in a single usb
transfer.  AX772 parts (at least) exhibit many input errors when
operated with a 2K rx buffer and no errors w/ a 4K rx buffer (it's
unclear what the cause of the errors is for 2K so this may just be
covering up the real issue).  Larger rx buffer sizes show no
significant performance improvement for AX772.  Bypassing the common
buffer management routines also eliminates an extra context switch
on every packet which noticeably improves performance (TCP netperf
rx goes from 45 Mb/s to 85 MB/s).

Submitted by:	"J.R. Oldroyd" <fbsd@opal.com>
Reviewed by:	imp
Obtained from:	openbsd (partly)
MFC after:	3 weeks
2007-11-10 16:23:38 +00:00
Robert Watson
433ea89af4 Add rm_wowned(9) function to test whether the current thread owns an
exclusive lock on the passed rmlock.

Reviewed by:	ups
2007-11-10 15:06:30 +00:00
Ariff Abdullah
8b18769048 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
2007-11-10 04:32:50 +00:00
Randall Stewart
81aca91ab6 - Fix a bug in sctp_calc_rwnd() which resulted in wrong rwnd predictions.
- Fix a signedness problem that shows up in some 64 bit platforms (macos).

MFC after:	1 week
2007-11-10 00:47:14 +00:00
Ruslan Ermilov
5b4ab4a032 Fix build without INVARIANTS and update a comment to match
a change made in previous revision.
2007-11-09 11:04:36 +00:00
Benjamin Close
037347714a Link wpi(4) into the build.
This includes:
    o mtree (for legal/intel_wpi)
    o manpage for i386/amd64 archs
    o module for i386/amd64 archs
    o NOTES for i386/amd64 archs

Approved by: mlaier (comentor)
2007-11-08 22:09:37 +00:00
Benjamin Close
8ffeaa536b Remove an unneeded CFLAGS line
Approved by: mlaier (comentor)
2007-11-08 22:02:38 +00:00
Benjamin Close
607b0aec7c Turn off debug output, its been confusing users.
Approved by: mlaier (comentor)
2007-11-08 21:57:08 +00:00
John Baldwin
87a194514b A couple of optimizations to the last commit.
Submitted by:	Christoph Mallon christoph mallon of gmx de
2007-11-08 21:45:56 +00:00
Nate Lawson
69d3f89624 Whitespace only. 2007-11-08 21:20:34 +00:00
Stephan Uphoff
dda7aec745 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.
2007-11-08 19:35:36 +00:00
David E. O'Brien
1102b89baa Turn most ffs 'DIAGNOSTIC's into INVARIANTS. 2007-11-08 17:21:51 +00:00
Sam Leffler
0c99c16b0f correct termination check doing amsdu de-aggregation
MFC after:	3 days
2007-11-08 17:11:40 +00:00
John Baldwin
db27a9dac7 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.

MFC after:	1 week
2007-11-08 15:51:52 +00:00
Stephan Uphoff
f53d15fe1b Initial checkin for rmlock (read mostly lock) a multi reader single writer
lock optimized for almost exclusive reader access. (see also rmlock.9)

TODO:
    Convert to per cpu variables linkerset as soon as it is available.
    Optimize UP (single processor)  case.
2007-11-08 14:47:55 +00:00
Olivier Houchard
0559b904bc Add entries for the L2 cache-related functions for armv5.
Spotted out by: Rafal Jaworowski
2007-11-08 13:19:08 +00:00
Ruslan Ermilov
a10b45505a Document the per-arch default value of kern.maxbcache. 2007-11-08 11:59:38 +00:00
Ariff Abdullah
20005f72d1 - 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.

Reviewed by:	sam, Weongyo Jeong
Tested using:	Aztech WL230 , Belkin F5D7050, Unicorn WL-54G,
             	3COM 3CRUSB10075
MFC after:	1 week
2007-11-08 08:25:58 +00:00
Maxim Sobolev
a03be42da6 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.

MFC after:	2 weeks
2007-11-07 22:47:41 +00:00
Pawel Jakub Dawidek
8ce2d00a04 Change unused 'user_wait' argument to 'timo' argument, which will be
used to specify timeout for msleep(9).

Discussed with:	alc
Reviewed by:	alc
2007-11-07 21:56:58 +00:00
Rui Paulo
7124217701 asmc build infrastructure.
Approved by:	njl (mentor)
Reviewed by:	njl (mentor)
2007-11-07 20:12:21 +00:00
Rui Paulo
e702bc741c Connect asmc to the build infrastructure.
Approved by: 	njl (mentor)
Reviewed by:	njl (mentor)
2007-11-07 20:08:15 +00:00
Rui Paulo
32a8088fef 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)
2007-11-07 20:05:13 +00:00
Konstantin Belousov
d60f0a3d6a Implement LINUX_SIOCGIFCOUNT and LINUX_SIOCGIFINDEX/LINUX_SIOGIFINDEX.
LINUX_SIOCGIFCOUNT just returns 0 since it is not implemented in the
Linux 2.6.16.

LINUX_SIOCGIFINDEX/LINUX_SIOGIFINDEX are mapped to the FreeBSD native
SIOCGIFINDEX.

Tested by:	Peter Kostouros <kpeter@melbpc.org.au>
Reviewed by:	brooks, rpaulo (on net@)
Submitted by:	rdivacky
MFC after:	1 week
2007-11-07 16:42:52 +00:00