Commit Graph

149033 Commits

Author SHA1 Message Date
Marcel Moolenaar
31d22003dd Rename option USBVERBOSE to USB_VERBOSE for 2 reasons:
1.  USB_VERBOSE is more consistent with USB_DEBUG,
2.  sys/dev/usb/usb_device.c uses option USB_VERBOSE and
    not USBVERBOSE.

POLA with the USBVERBOSE option as it's found in 7-STABLE
has been considered but found insignificant in the face
of the USB stack overhaul.

Approved by:	re (kensmith)
2009-07-12 04:48:47 +00:00
Nathan Whitehorn
f136543e41 Increase the size of the page table on 64-bit PowerPC machines as a
bandaid to prevent exhaustion of the primary and secondary hash groups
in the event of extreme stress on the PMAP layer (e.g. a forkbomb). This
wastes memory, and should be revised to properly handle PTEG spills instead.

Suggested by:	grehan
Approved by:	re (kensmith)
2009-07-12 04:07:52 +00:00
Marcel Moolenaar
b54b764c72 Revert rev 192323 (nfs_common.c only):
The D-cache flushing added here was to deal with I-cache
incoherency observed on ia64. However, the problem was
in the implementation of pmap_enter_object() for ia64:
it was missing I-cache coherency logic for prefaulted
pages. After this got added in rev 195625, testing showed
that no D-cache flushing was required.

The SIGILL that was observed on Book-E (see commit log
for rev 192323) ended up not being related to I-cache
incoherency, but was found to be caused by bad memory.
This discovery further undermined the need for D-cache
flushing in the NFS I/O code, triggering the reversal.

Approved by:	re (kensmith)
2009-07-12 03:53:52 +00:00
Sam Leffler
79bc145130 first cut at documenting ioctl api's for net80211
(replaces mostly incorrect information)

Approved by:	re (blanket)
2009-07-12 03:19:25 +00:00
Marcel Moolenaar
dd8a461e83 In nvpair_native_embedded_array(), meaningless pointers are zeroed.
The programmer was aware that alignment was not guaranteed in the
packed structure and used bzero() to NULL out the pointers.
However, on ia64, the compiler is quite agressive in finding ILP
and calls to bzero() are often replaced by simple assignments (i.e.
stores). Especially when the width or size in question corresponds
with a store instruction (i.e. st1, st2, st4 or st8).

The problem here is not a compiler bug. The address of the memory
to zero-out was given by '&packed->nvl_priv' and given the type of
the 'packed' pointer the compiler could assume proper alignment for
the replacement of bzero() with an 8-byte wide store to be valid.
The problem is with the programmer. The programmer knew that the
address did not have the alignment guarantees needed for a regular
assignment, but failed to inform the compiler of that fact. In
fact, the programmer told the compiler the opposite: alignment is
guaranteed.

The fix is to avoid using a pointer of type "nvlist_t *" and
instead use a "char *" pointer as the basis for calculating the
address. This tells the compiler that only 1-byte alignment can
be assumed and the compiler will either keep the bzero() call
or instead replace it with a sequence of byte-wise stores. Both
are valid.

Approved by:	re (kib)
2009-07-11 22:43:20 +00:00
Colin Percival
7d845dde8d Remove build timestamps from the following files:
/boot/kernel/hptrr.ko
/etc/mail/*.cf
/lib/libcrypto.so.5
/usr/bin/ntpq
/usr/sbin/amd
/usr/sbin/iasl
/usr/sbin/ntpd
/usr/sbin/ntpdate
/usr/sbin/ntpdc

There does not appear to be any purpose to having these timestamps, and
they have the irritating consequence that the aforementioned files will
be different every time they are rebuilt.

After this commit, the only remaining build timestamps are in the kernel,
the boot loaders, /usr/include/osreldate.h (the year in the copyright
notice), and lib*.a (the timestamps on all of the included .o files).

Reviewed by:	scottl (hptrr), gshapiro (sendmail), simon (openssl),
		roberto (ntp), jkim (acpica)
Approved by:	re (kib)
2009-07-11 22:30:37 +00:00
Marcel Moolenaar
1ed01448fb On exec(2), when loading the ELF image, pmap_enter_object() is
called to prefault pages. This is an obvious place for making
sure the I-cache is coherent. It was missing though. As such,
execution over NFS and ZFS file systems was failing. NFS was
fixed the wrong way (by flushing the D-cache as part of the
NFS code) in a previous commit. ZFS problems were encountered
after that and indicated that something else was wrong...

Approved by:	re (kib)
2009-07-11 22:27:20 +00:00
Kip Macy
6a7bff2c31 Re-factoring for adding weighted routes introduced a
fairly irritating bug where the system will panic
when RADIX_MPATH is enabled. This change fixes this.

Approved by:	re@
2009-07-11 21:56:23 +00:00
Colin Percival
383334b383 Fix typo: kproc_resume,.9 -> kproc_resume.9.
Approved by:	re (kib)
2009-07-11 17:36:59 +00:00
Colin Percival
f15e71c26a Fix .Dd value -- our mdoc macros don't know how to parse the $Mdocdate$
tag, so the file was being treated as having no date (i.e., the current
date was being inserted).

Approved by:	re (kib)
2009-07-11 17:35:55 +00:00
Rui Paulo
7d26189145 Fix something bogus deletion that got it during mesh commit.
Approved by:	re (implicit)
2009-07-11 16:02:06 +00:00
Joel Dahl
9781237869 Document the new multichannel support.
Reviewed by:	ariff
Approved by:	re (blanket)
2009-07-11 15:25:13 +00:00
Rui Paulo
59aa14a91d Implementation of the upcoming Wireless Mesh standard, 802.11s, on the
net80211 wireless stack. This work is based on the March 2009 D3.0 draft
standard. This standard is expected to become final next year.
This includes two main net80211 modules, ieee80211_mesh.c
which deals with peer link management, link metric calculation,
routing table control and mesh configuration and ieee80211_hwmp.c
which deals with the actually routing process on the mesh network.
HWMP is the mandatory routing protocol on by the mesh standard, but
others, such as RA-OLSR, can be implemented.

Authentication and encryption are not implemented.

There are several scripts under tools/tools/net80211/scripts that can be
used to test different mesh network topologies and they also teach you
how to setup a mesh vap (for the impatient: ifconfig wlan0 create
wlandev ... wlanmode mesh).

A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled
by default on GENERIC kernels for i386, amd64, sparc64 and pc98.

Drivers that support mesh networks right now are: ath, ral and mwl.

More information at: http://wiki.freebsd.org/WifiMesh

Please note that this work is experimental. Also, please note that
bridging a mesh vap with another network interface is not yet supported.

Many thanks to the FreeBSD Foundation for sponsoring this project and to
Sam Leffler for his support.
Also, I would like to thank Gateworks Corporation for sending me a
Cambria board which was used during the development of this project.

Reviewed by:	sam
Approved by:	re (kensmith)
Obtained from:	projects/mesh11s
2009-07-11 15:02:45 +00:00
Jung-uk Kim
35ea6959ac Get correct maxio from the controller and drop the tunable.
The default (64K) is too pessimistic for "new comm" hardware.
Also, this is bad because multiple controllers get limited by
the global tunable.

Reviewed by:	scottl
Approved by:	re (kensmith)
2009-07-11 08:10:18 +00:00
Mark Peek
a15e6f9a9a Update to tcsh 6.17.00.
Approved by:	re (kensmith)
2009-07-11 05:35:08 +00:00
Mark Peek
0019e4ce59 Import of tcsh-6.17.00 2009-07-10 21:47:20 +00:00
Mark Peek
bc49518e16 Flatten vendor/tcsh/dist. 2009-07-10 21:00:38 +00:00
Scott Long
e69811df21 Fix alignment issue with ATA IDENTIFY structure.
Approved by:	re
2009-07-10 17:42:53 +00:00
Rui Paulo
820e6a1f38 For ic_opmode switch cases, provide a default label with a printf saying
this opmode is not supported.

Approved by:	re (kib)
2009-07-10 15:28:33 +00:00
Sam Leffler
8b10ecb67c mark struct ieee80211req_maclist packed so sizeof works as intended on arm;
fixes "list mac"

Approved by:	re (kensmith)
2009-07-10 15:26:33 +00:00
Andrew Thompson
c500e4dd03 Sync the libusb 1.0 exported api to the latest GSoC code.
- Fix possible uninitialised variables and null derefs
 - Support big transfers
 - Various bug fixes and style changes

Submitted by:	Sylvestre Gallon
Sponsored by:	Google Summer of Code 2009
Approved by:	re (kib)
2009-07-10 14:15:53 +00:00
Konstantin Belousov
d77e2734a1 When amd64 CPU cannot load segment descriptor during trap return to
usermode, it generates GPF, that is mirrored to user mode as SIGSEGV.
The offending register in mcontext should contain the value loading of
which generated the GPF, and it is so on i386. On amd64, we currently
report segment descriptor in tf_err, while segment register contains the
corrected value loaded by trap handler.

Fix the issue by behaving like i386, reloading segment register in trap
frame after signal frame is pushed onto user stack.

Noted and tested by:	pho
Approved by:	re (kensmith)
2009-07-10 10:29:16 +00:00
Scott Long
52c9ce25d8 Separate the parallel scsi knowledge out of the core of the XPT, and
modularize it so that new transports can be created.

Add a transport for SATA

Add a periph+protocol layer for ATA

Add a driver for AHCI-compliant hardware.

Add a maxio field to CAM so that drivers can advertise their max
I/O capability.  Modify various drivers so that they are insulated
from the value of MAXPHYS.

The new ATA/SATA code supports AHCI-compliant hardware, and will override
the classic ATA driver if it is loaded as a module at boot time or compiled
into the kernel.  The stack now support NCQ (tagged queueing) for increased
performance on modern SATA drives.  It also supports port multipliers.

ATA drives are accessed via 'ada' device nodes.  ATAPI drives are
accessed via 'cd' device nodes.  They can all be enumerated and manipulated
via camcontrol, just like SCSI drives.  SCSI commands are not translated to
their ATA equivalents; ATA native commands are used throughout the entire
stack, including camcontrol.  See the camcontrol manpage for further
details.  Testing this code may require that you update your fstab, and
possibly modify your BIOS to enable AHCI functionality, if available.

This code is very experimental at the moment.  The userland ABI/API has
changed, so applications will need to be recompiled.  It may change
further in the near future.  The 'ada' device name may also change as
more infrastructure is completed in this project.  The goal is to
eventually put all CAM busses and devices until newbus, allowing for
interesting topology and management options.

Few functional changes will be seen with existing SCSI/SAS/FC drivers,
though the userland ABI has still changed.  In the future, transports
specific modules for SAS and FC may appear in order to better support
the topologies and capabilities of these technologies.

The modularization of CAM and the addition of the ATA/SATA modules is
meant to break CAM out of the mold of being specific to SCSI, letting it
grow to be a framework for arbitrary transports and protocols.  It also
allows drivers to be written to support discrete hardware without
jeopardizing the stability of non-related hardware.  While only an AHCI
driver is provided now, a Silicon Image driver is also in the works.
Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware
is possible and encouraged.  Help with new transports is also encouraged.

Submitted by:	scottl, mav
Approved by:	re
2009-07-10 08:18:08 +00:00
Sam Leffler
f6c09dd6a8 correctly set the tailq ptr when removing the last item in the q
Approved by:	re (kensmith)
2009-07-10 02:19:57 +00:00
Ariff Abdullah
5c663ce9cf Rearrange shift operation to increase interpolation accuracy,
further reducing conversion artifacts and better worst case SNR.

Approved by:	re (kib)
2009-07-09 22:21:18 +00:00
Pawel Jakub Dawidek
075ec356df The mutex_owned() macro should operate on kmutex_t and not on mutex_t.
This fixes 'zdb <poolname>' crash.

Reported by:	avg
Approved by:	re (kib)
2009-07-09 20:22:05 +00:00
Navdeep Parhar
adb1423aa6 Fix cxgb(4) panic with jumbo frames.
Reviewed by:	kmacy
Approved by:	re (kib), gnn (mentor)
2009-07-09 19:27:58 +00:00
Rick Macklem
9ca27b565b Since the nfscl_getclose() function both decremented open counts and,
optionally, created a separate list of NFSv4 opens to be closed, it
was possible for the associated OpenOwner to be free'd before the Open
was closed. The problem was that the Open was taken off the OpenOwner
list before the Close RPC was done and OpenOwners can be free'd once the
list is empty. This patch separates out the case of doing the Close RPC
into a separate function called nfscl_doclose() and simplifies nfsrpc_doclose()
so that it closes a single open instead of a list of them. This avoids
removing the Open from the OpenOwner list before doing the Close RPC.

Approved by:	re (kensmith), kib (mentor)
2009-07-09 19:00:29 +00:00
Konstantin Belousov
7c6d401c75 The control terminal revocation at the session leader exit does not
correctly checks for reclaimed vnode, possibly calling VOP_REVOKE for
such vnode. If the terminal is already revoked, or devfs mount was
forcibly unmounted, the revocation of doomed ctty vnode causes panic.

Reported and tested by:	lstewart
Approved by:	re (kensmith)
MFC after:	2 weeks
2009-07-09 18:54:38 +00:00
Konstantin Belousov
1d587edb3a Extend the cn_flags field of the struct componentname to 64 bits to have
more space for the flags, that is too close to be exhausted. While changing
the KBI for name(9), use unsigned int for symlinks count.

Suggested by:	rwatson
Approved by:	re (kensmith)
2009-07-09 18:49:26 +00:00
Joel Dahl
2cc80ae557 Adjust the description of hw.snd.feeder_rate_polyphase_max and
hw.snd.compat_linux_mmap a bit.

Submitted by:	ariff
Approved by:	re (blanket)
2009-07-09 16:59:29 +00:00
Edward Tomasz Napierala
e50022797f Add manual page links to advertise procstat(1) a little better.
Approved by:	re (kib)
2009-07-09 16:40:00 +00:00
Robert Noland
87c73f89a9 Add support for Radeon HD 4770 (RV740) chips.
Approved by:	re@ (kib)
MFC after:	3 days
2009-07-09 16:39:28 +00:00
Konstantin Belousov
a2622e5dc2 Restore the segment registers and segment base MSRs for amd64 syscall
return path only when neither thread was context switched while
executing syscall code nor syscall explicitely modified LDT or MSRs.

Save segment registers in trap handlers before interrupts are enabled,
to not allow context switches to happen before registers are saved.
Use separated byte in pcb for indication of fast/full return, since
pcb_flags are not synchronized with context switches.

The change puts back syscall microbenchmark numbers that were slowed
down after commit of the support for LDT on amd64.

Reviewed by:	jeff
Tested (and tested, and tested ...) by:	pho
Approved by:	re (kensmith)
2009-07-09 09:34:11 +00:00
Pyun YongHyeon
8e95322a35 Make xl(4) build with Tx checksum offload.
PR:		kern/136409
Approved by:	re (kib)
2009-07-09 01:58:59 +00:00
Jamie Gritton
9dce97d788 Remove crcopy call from seteuid now that it calls crcopysafe.
Reviewed by:	brooks
Approved by:	re (kib), bz (mentor)
2009-07-08 21:45:48 +00:00
Edward Tomasz Napierala
51334c8257 Regen the freebsd32 parts.
Approved by:	re (kib)
2009-07-08 16:30:34 +00:00
Edward Tomasz Napierala
92f76afe3a Fix freebsd32 version of lpathconf(2).
Approved by:	re (kib)
2009-07-08 16:26:43 +00:00
Jamie Gritton
4d4d887907 Give a more expected behavior to -[hns] options, defaulting to all
parameters instead of ignoring the options and giving the old-style
default output.

Approved by:	re (kib), bz (mentor)
2009-07-08 15:57:22 +00:00
Jamie Gritton
f9bc4dcb56 Fix a typo in the examples.
Approved by:	re (kib), bz (mentor)
2009-07-08 15:46:29 +00:00
Edward Tomasz Napierala
e2b881bf03 Regenerate after lpathconf(2) addition.
Approved by:	re (kib)
2009-07-08 15:25:27 +00:00
Edward Tomasz Napierala
c38898116a There is an optimization in chmod(1), that makes it not to call chmod(2)
if the new file mode is the same as it was before; however, this
optimization must be disabled for filesystems that support NFSv4 ACLs.
Chmod uses pathconf(2) to determine whether this is the case - however,
pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't.

This change adds lpathconf(3) to make it possible to solve that problem
in a clean way.

Reviewed by:	rwatson (earlier version)
Approved by:	re (kib)
2009-07-08 15:23:18 +00:00
Ed Schouten
6b53d5c0e7 Fix regressions in return events of poll() on TTYs.
As pointed out, POLLHUP should be generated, even if it hasn't been
specified on input. It is also not allowed to return both POLLOUT and
POLLHUP at the same time.

Reported by:	jilles
Approved by:	re (kib)
2009-07-08 10:21:52 +00:00
Brian Somers
58a654f664 Fix some uninitialise variables.
PR:		136383
Submitted by:	Ulrich Spoerlein - uqs at spoerlein dot net
Approved by:	re (kib)
MFC after:	3 weeks
2009-07-08 10:16:16 +00:00
Colin Percival
71b38b3c12 Add support for using a livefs from a USB disk.
Submitted by:	randi
Approved by:	re (kensmith)
2009-07-08 06:07:51 +00:00
Colin Percival
e24256e54e Refactor code from installFixitCDROM into a new function, fixit_livefs_common.
While doing so, improve style and reword some comments.

This should not result in any functional changes, but the fixit_livefs_common
function will be used by future code.

Submitted by:	randi
Approved by:	re (kensmith)
2009-07-08 06:07:23 +00:00
Alexander Motin
d498a2e62b Fix kernel panic, when ataahci driver is used on system with increased
MAXPHYS. Current ataahci driver memory allocation scheme includes only
64 items in DMA S/G table, and so not guarantied to support transactions
with more then 252K data.

Approved by:    re (kensmith)
MFC after:      2 weeks
2009-07-08 06:00:21 +00:00
Marcel Moolenaar
f43b57e32a Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.c
is invalid because the ioctl happens without prior open. The ioctl
got introduced to provide backward compatibility for extended
partitions, but it ended up not being used because it didn't work
as expected. Since there are no consumers of the ioctl and the
implementation is broken, the best fix is to remove the code
entirely.

Spotted by:	phk
Approved by:	re (kensmith)
2009-07-08 05:56:14 +00:00
Mike Silbersack
347e22a68b Increase HZ_VM from 10 to 100. While 10 hz saves cpu time
under VM environments, it's too slow for FreeBSD to work
properly.  For example, ping at 10hz pings about every 600ms
instead of about every second.

Approved by:	re (kib)
2009-07-08 01:09:12 +00:00
Sam Leffler
6552698302 Fix ar5416 and later parts on big-endian platforms: setup the h/w byte
swizzler using the same technique used everywhere else.

Approved by:	re (kib)
2009-07-07 18:11:05 +00:00