Commit Graph

154817 Commits

Author SHA1 Message Date
csjp
2173e9258f Mark the bsdextended rules sysctl as being mpsafe.
Discussed with:	rwatson
2009-03-09 17:42:18 +00:00
thompsa
08da06b62b Commit missed file in r189587, update directory name for libusb.
Spotted by:	rdivacky
2009-03-09 17:38:14 +00:00
jhb
6e59eb9097 - Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORT
in make.conf or src.conf.
- When GPT is enabled (which it is by default), use memory above 1 MB and
  leave the memory from the end of the bss to the end of the 640k window
  purely for the stack.  The loader has grown and now it is much more
  common for the heap and stack to grow into each other when both are
  located in the 640k window.

PR:		kern/129526
MFC after:	1 week
2009-03-09 17:16:29 +00:00
thompsa
b95f7329df libusb20 is now installed as libusb, remove the version number from the
directory name.
2009-03-09 17:09:46 +00:00
thompsa
4aa75fa98d Install libusb20.so.1 as libusb.so.1, there will be a followup commit to the
ports tree so that programs use libusb from the base by default. Thanks to
Stanislav Sedov for sorting out the ports build.

Bump __FreeBSD_version to 800069

Help and testing by:	stas
2009-03-09 17:05:31 +00:00
bms
e38dcf5eef Add igmp(4) man page, do not connect to build yet. 2009-03-09 16:51:40 +00:00
thompsa
7739f9f0ee MFp4 //depot/projects/usb@158916
USB mouse patch to address complicated data reporting descriptors.

Reported by:	Boris Kotzev
Submitted by:	Hans Petter Selasky
2009-03-09 15:25:46 +00:00
imp
0f54c73393 Prefer prototypes to k&r definitions. 2009-03-09 13:32:19 +00:00
imp
e71197fd79 Make generic_intr routines match prototype. 2009-03-09 13:30:00 +00:00
imp
fb6fbfb763 __LP64__ is what's defined, not _LP64_, according to the manual (and
also experience).
2009-03-09 13:29:13 +00:00
imp
49631913e0 Fix prototypes to be consistent. 2009-03-09 13:27:33 +00:00
imp
3a0c0e0dd4 o Add declarations for a few more nodes widely used.
o Minor formatting nit.
2009-03-09 13:26:55 +00:00
imp
7cf1a35509 remove now-redunant cardbus attachment lines. 2009-03-09 13:25:34 +00:00
imp
ed87bed6c0 remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
imp
ee8ea37871 Fix a long-standing bug in newbus. It was introduced when subclassing
was introduced.  If you have a bus, say cardbus, that is derived from
a base-bus (say PCI), then ordinarily all PCI drivers would attach to
cardbus devices.  However, there had been one exception: kldload
wouldn't work.

The problem is in devclass_add_driver.  In this routine, all we did
was call to the pci device's BUS_DRIVER_ADDED routine.  However, since
cardbus bus instances had a different devclass, none of them were
called.

The solution is to call all subclass devclasses, recursively down the
tree, of the class that was loaded.  Since we don't have a 'children
class' pointer, we search the whole list of devclasses for a class
whose parent matches.  Since just done a kldload time, this isn't as
bad as it sounds.  In addition, we short-circuit the whole process by
marking those classes with subclasses with a flag.  We'll likely have
to reevaluate this method the number of devclasses with subclasses
gets large.

This means we can remove the "cardbus" lines from all the PCI drivers
since we have no cardbus specific attach device attachments in the
tree.

# Also: minor tweak to an error message
2009-03-09 13:20:23 +00:00
rwatson
0e6c8b2a35 Use a u_int for p_lock instead of a char: this avoids a (somewhat
unlikely but not impossible given modern thread counts) wrap-around,
and the compiler was padding it out to an int (at least) anyway.

MFC after:	3 days (but confirm ABI impact)
2009-03-09 13:12:48 +00:00
rwatson
5277812531 Trim comments about the MP-safety of various bits of the amd64/i386
system call entry path and i386 IP checksum generation: we now assume
all code is MPSAFE unless explicitly marked otherwise.  Remove XXX
Giant comments along similar lines: the code by the comments either
doesn't need or doesn't want Giant (especially the NMI handler).

MFC after:	3 days
2009-03-09 13:11:16 +00:00
rwatson
fc16172586 Remove two now-defunct KSE fields from struct thread: td_uuticks and
td_usticks.
2009-03-09 11:18:41 +00:00
rwatson
e0bfbf5350 Add a new thread-private flag, TDP_AUDITREC, to indicate whether or
not there is an audit record hung off of td_ar on the current thread.
Test this flag instead of td_ar when auditing syscall arguments or
checking for an audit record to commit on syscall return.  Under
these circumstances, td_pflags is much more likely to be in the cache
(especially if there is no auditing of the current system call), so
this should help reduce cache misses in the system call return path.

MFC after:      1 week
Reported by:    kris
Obtained from:  TrustedBSD Project
2009-03-09 10:45:58 +00:00
yongari
4e908eaace For IP1001 PHYs, read auto-negotiation advertisement register to
get default next page configuration. While I'm here explicitly set
IP1000PHY_ANAR_CSMA bit. This bit is read-only and always set
by hardware so setting it has no effect but it would clear the
intention. With this change controllers that couldn't establish
1000baseT link should work.

PR:	kern/130846
2009-03-09 08:17:46 +00:00
yongari
d3c51f44fd Use mii_phy_add_media() and remove setting each media type.
While I'm here, don't set mii_anegticks as it's set by
mii_phy_add_media().
2009-03-09 08:09:06 +00:00
yongari
a994e6e0ad For unknown speed, explicitly set IFM_NONE. 2009-03-09 08:01:40 +00:00
yongari
bbcecb3767 Report current link state while auto-negotiation is in progress. 2009-03-09 07:56:40 +00:00
rnoland
084103fa7c Consistently use kdev for the kernel device.
Submitted by:	vehemens <vehemens@verizon.net>
MFC after:	3 days
2009-03-09 07:55:18 +00:00
rnoland
7d9d797109 Clean up the printing on amd64. Should also be consistent on i386.
MFC after:	3 days
2009-03-09 07:50:27 +00:00
rnoland
684aefd788 There is no need to sync these buffers to swap.
MFC after:	3 days
2009-03-09 07:49:13 +00:00
rnoland
10f014e6a9 Change the flags to bus_dmamem around to allow it to sleep waiting for
resources during allocation, but not during map load.  Also, zero the
buffers here.

MFC after:	3 days
2009-03-09 07:47:03 +00:00
rnoland
e227ee6ba8 Fix the flags to bus_dmamem_* to allow the allocation to sleep while
waiting for resources.  It is really the load that we can't defer.
BUS_DMA_NOCACHE belongs on bus_dmamap_load() as well.

MFC after:	3 days
2009-03-09 07:38:22 +00:00
rnoland
d19cf7a6d0 -Make the PCI(E)/AGP calculations consistent
-Calculate the scratch address correctly

MFC after:	10 days
2009-03-09 07:33:35 +00:00
rnoland
a7840d9936 Call the right function for the right chipset.
MFC after:	10 days
2009-03-09 07:24:32 +00:00
yongari
4f064c4d72 Add a new tunable hw.re.prefer_iomap which disables memory register
mapping. The tunable is OFF for all controllers except RTL8169SC
family. RTL8169SC seems to require more magic to use memory
register mapping. r187483 added a fix for RTL8169SCe controller but
it does not looke like fix other variants of RTL8169SC.

Tested by:	Gavin Stone-Tolcher g.stone-tolcher <> its dot uq dot edu dot au
2009-03-09 06:02:55 +00:00
davidxu
0d25ff31c6 Don't ignore other fcntl functions, directly call __sys_fcntl if
WITHOUT_SYSCALL_COMPAT is not defined.

Reviewed by:	deischen
2009-03-09 05:54:43 +00:00
delphij
f9380aeb62 A system with plenty of memory would not require so much swap for generic
usage.

Discussed with:	dillon
2009-03-09 05:41:04 +00:00
alc
0f22084447 Change pmap_enter_quick_locked() so that it uses the kernel's direct map
instead of the pmap's recursive mapping to access the lowest level of the
page table when it maps a user-space virtual address.
2009-03-09 03:35:25 +00:00
sam
5671c50f21 Fix TXPMGT handling:
o correct dBm<->mW conversion logic
o set net80211 TXPMGT capability only if driver reports it is capable

PR:		kern/132342
Submitted by:	"Paul B. Mahol" <onemda@gmail.com>
2009-03-09 02:37:52 +00:00
davidxu
2adf4999ea Don't reference non-existent __fcntl_compat if WITHOUT_SYSCALL_COMPAT is defined.
Submitted by:	Pawel Worach "pawel dot worach at gmail dot com"
2009-03-09 02:34:02 +00:00
sam
094f090e7f o mark unexpected callbacks more clearly
o unwrap some lines
2009-03-08 23:45:56 +00:00
thompsa
ab90b6083a MFp4 //depot/projects/usb@158868
Fix bugs and improve HID parsing.
- fix possible memory leak found
- fix possible NULL pointer access
- fix possible invalid memory read
- parsing improvements
- reset item data position when a new report ID is detected.

Submitted by:	Hans Petter Selasky
2009-03-08 22:58:19 +00:00
thompsa
4340033049 MFp4 //depot/projects/usb@158869
Fix sael init code.

Reported by:	Alberto Mijares
Submitted by:	Hans Petter Selasky
2009-03-08 22:55:17 +00:00
rwatson
417d444e25 By default, don't compile in counters of calls to various time
query functions in the kernel, as these effectively serialize
parallel calls to the gettimeofday(2) system call, as well as
other kernel services that use timestamps.

Use the NetBSD version of the fix (kern_tc.c:1.32 by ad@) as
they have picked up our timecounter code and also ran into the
same problem.

Reported by:	kris
Obtained from:	NetBSD
MFC after:	3 days
2009-03-08 22:19:28 +00:00
rwatson
4aae6c65e1 Decompose the global UNIX domain sockets rwlock into two different
locks: a global list/counter/generation counter protected by a new
mutex unp_list_lock, and a global linkage rwlock, unp_global_rwlock,
which protects the connections between UNIX domain sockets.

This eliminates conditional lock acquisition that was previously a
property of the global lock being held over sonewconn() leading to a
call to uipc_attach(), which also required the global lock, but
couldn't rely on it as other paths existed to uipc_attach() that
didn't hold it: now uipc_attach() uses only the list lock, which
follows the linkage lock in the lock order.  It may also reduce
contention on the global lock for some workloads.

Add global UNIX domain socket locks to hard-coded witness lock
order.

MFC after:	1 week
Discussed with:	kris
2009-03-08 21:48:29 +00:00
rwatson
ea13322a87 In UNIX domain socket GC regression test, after setting a socket
non-blocking, EINPROGRESS is an acceptable result from connect().
2009-03-08 21:06:02 +00:00
ed
0f248d82f6 Don't disable CR-to-NL translation when waiting for data to arrive.
A difference between the old and the new TTY layer is that the new
implementation does not perform any post-processing before returning
data back to userspace when calling read().

sh(1)'s read turns the TTY into a raw mode before calling select(). This
means that the first character will not receive any ICRNL processing.
Inherit this flag from the original terminal attributes.

Even though this issue is not present on RELENG_*, I'm MFCing it to make
sh(1) in jails behave better.

PR:		bin/129566
MFC after:	2 weeks
2009-03-08 19:09:55 +00:00
marcus
92da1fbd23 Document the new default implementation of VOP_VPTOCNP(9).
Approved by:	kib
2009-03-08 19:07:44 +00:00
marcus
7b4bc21087 Add a prototype for the new vop_stdvptocnp function.
Reviewed by:	kib
Approved by:	kib
Tested by:	pho
2009-03-08 19:06:26 +00:00
marcus
399996bc30 Add a default implementation for VOP_VPTOCNP(9) which scans the parent
directory of a vnode to find a dirent with a matching file number.  The
name from that dirent is then used to provide the component name.

Note: if the initial vnode argument is not a directory itself, then
the default VOP_VPTOCNP(9) implementation still returns ENOENT.

Reviewed by:	kib
Approved by:	kib
Tested by:	pho
2009-03-08 19:05:53 +00:00
maxim
5dd0791944 o Spell. Sort .Xrs. 2009-03-08 18:02:30 +00:00
kib
ecebbcfa4c Document several notifications, among them are DEVFS, update to ifneti,
coretemp and kern.

The asmc(4) and zfs(5) are still not documented.

Based on the patch by Roland Smith <rsmith xs4all nl>.
MFC after:	1 week
2009-03-08 14:28:40 +00:00
rwatson
ae492d67e0 Remove 'uio' argument from MAC Framework and MAC policy entry points for
extended attribute get/set; in the case of get an uninitialized user
buffer was passed before the EA was retrieved, making it of relatively
little use; the latter was simply unused by any policies.

Obtained from:	TrustedBSD Project
Sponsored by:	Google, Inc.
2009-03-08 12:32:06 +00:00
rwatson
b6bad80651 Rename 'ucred' argument to mac_socket_check_bind() to 'cred' to match
other use of the same variable type.

Obtained from:	TrustedBSD Project
Sponsored by:	Google, Inc.
2009-03-08 12:22:00 +00:00