Commit Graph

143444 Commits

Author SHA1 Message Date
Andrew Thompson
3d2e6ad8b6 Add entries for some Option, Sierra and Stelera 3G cards. 2008-12-11 21:08:14 +00:00
Ed Schouten
18eeb77563 Don't forget to add "npts" to rlimit_ident[] as well.
When I added RLIMIT_NPTS, I forgot to add it to rlimit_ident[]. Make
sure the rlimit_ident[] array is always RLIM_NLIMITS elements big. So if
we ever forget to add new rlimits to this list again. it will contain a
null pointer, instead of random data.

Spotted by:	rwatson
2008-12-11 18:32:05 +00:00
Paul Saab
5ee5aed0a3 Fix a leak introduced in r185902. We should free the devspec if
we've successfully found a zfs pool.
2008-12-11 16:48:35 +00:00
Bjoern A. Zeeb
86413abf5f Put a global variables, which were virtualized but formerly
missed under VIMAGE_GLOBAL.

Start putting the extern declarations of the  virtualized globals
under VIMAGE_GLOBAL as the globals themsevles are already.
This will help by the time when we are going to remove the globals
entirely.

While there garbage collect a few dead externs from ip6_var.h.

Sponsored by:	The FreeBSD Foundation
2008-12-11 16:26:38 +00:00
Bjoern A. Zeeb
a7286c4a43 Put the VIMAGE options together in one place.
Sponsored by:	The FreeBSD Foundation
2008-12-11 16:13:17 +00:00
Bjoern A. Zeeb
9ea9ef7e89 Order #includes - also to reduce diffs with vimage branches in p4.
Sponsored by:	The FreeBSD Foundation
2008-12-11 16:09:31 +00:00
Bjoern A. Zeeb
0750c2ed96 Use the correct INIT_VNET_INET() as the virtualized variable here
are in vinet.h not in vinet6.h

Sponsored by:	The FreeBSD Foundation
2008-12-11 16:05:07 +00:00
John Baldwin
660f08b291 Add constants for fields in the local APIC error status register and a
routine to read it.
2008-12-11 15:56:30 +00:00
Bjoern A. Zeeb
8210f38296 Error in case anyone tried to compile with both options VIMAGE and
the (temporary) option VIMAGE_GLOBALS.

Sponsored by:	The FreeBSD Foundation:
2008-12-11 15:44:53 +00:00
Bjoern A. Zeeb
40eb85e75e Whitespace changes only - tabs must have been converted to spaces
somehow, when moving the code from p4 to svn.

Sponsored by:	The FreeBSD Foundation
2008-12-11 15:42:59 +00:00
Robert Watson
3ae8e30a13 Add missing "goto set_head" for SO_IPX_CHECKSUM; otherwise we fall through
to the SO_HEADERS_ON_OUTPUT case and set that instead.

MFC after:	1 week
Found with:	Coverity Prevent(tm)
Coverity ID:	3988
2008-12-11 10:29:35 +00:00
Warner Losh
d9964624bd Push mips support into the tree. 2008-12-11 08:22:20 +00:00
Warner Losh
5abe265777 Push mips support into the tree. 2008-12-11 08:20:34 +00:00
Warner Losh
d7aeea2745 Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
Warner Losh
7932522f76 Push mips support for as into the tree. 2008-12-11 08:15:14 +00:00
Warner Losh
a87b76397e Remove redundant assignment. 2008-12-11 07:00:23 +00:00
Dag-Erling Smørgrav
2b8907e7e2 Apply the same defaults to https as to http.
Submitted by:	Mike Tancsa <mike@sentex.net>
MFC after:	1 week
2008-12-11 06:54:36 +00:00
Warner Losh
d0493c85a6 Update to the interrupt handling code:
o Try to be smarter about reading the ExCA CSC register.  Now, we only
  do it for 16-bit cards.  Add some experimental code to treat it like
  a power interrupt, but I'm not 100% sure that I like it.  It may be
  removed upon further testing.  It seemed to help in one test case, but
  the evidence may be inconclusive.  This may be beneficial for cleaning up
  exca_reset and exca_wait_ready.
o Check for CSTS events on the socket event register.  We ask for it when
  we're powering up a card, but I don't think we're otherwise using
  it.  Just ACK the interrupt for now.  In theory, we can use it
  instead of the busy wait we do in cbb_cardbus_reset.  More research
  is necessary to see if we can optimize things there when we're
  waiting for the DEVVENDOR register to become valid.
o Rework the comments a bit.  Minor tidying up.  Etc.
2008-12-11 06:27:18 +00:00
Sam Leffler
13f209a354 add missing break
Coverity ID:	4159
2008-12-11 04:03:50 +00:00
Sam Leffler
eef5acf25e add missing break
Coverity ID:	4151
2008-12-11 04:03:13 +00:00
David Schultz
e18701f4ac Consolidate some variable initializations. No substantive change. 2008-12-11 02:39:27 +00:00
Pyun YongHyeon
886ff602f2 Make WOL work on RTL8168B. This controller seems to require
explicit command to enable Rx MAC prior to entering D3.

Tested by:	Cyrus Rahman <crahman <> gmail DOT com>
2008-12-11 02:24:11 +00:00
Paul Saab
390edcc5b9 Avoid a double free in devopen by not freeing the device structure
in zfs_dev_open.  This stops a panic in the loader when trying to
read from a zfs device and no zfs devices exist.
2008-12-11 02:23:49 +00:00
Pyun YongHyeon
0596d7e65d Don't access undocumented register 0x82 on controllers that
have no such register. While here clear undocumented PHY
register 0x0B for RTL8110S.

Obtained from:	RealTek FreeBSD driver
2008-12-11 01:41:38 +00:00
Pyun YongHyeon
ead8fc669e Newer RealTek controllers requires setting stop request bit to
terminate active Tx/Rx operation.
2008-12-11 01:26:18 +00:00
Bjoern A. Zeeb
0f1fe22db5 Correctly check the number of prison states to not access anything
outside the prison_states array.
When checking if there is a name configured for the prison, check the
first character to not be '\0' instead of checking if the char array
is present, which it always is. Note, that this is different for the
*jailname in the syscall.

Found with:	Coverity Prevent(tm)
CID:		4156, 4155
MFC after:	4 weeks (just that I get the mail)
2008-12-11 01:04:25 +00:00
Bjoern A. Zeeb
b2dbdae9f3 Add 32-bit compat support for AIO.
jhb probably forgot to commit this file with r185878 and will want to
review this. It unbreaks the build here.

Obtained from:	p4 //depot/user/jhb/lock/compat/freebsd32/freebsd32_signal.h#2
2008-12-11 00:58:05 +00:00
Pyun YongHyeon
b659f1f0fe Always put controller into known state before device intialization.
While here remove re_reset calls invoked in system error case as
controller reset is always done in device initialization.
2008-12-11 00:46:07 +00:00
Pyun YongHyeon
f68bc089f9 Partly revert r185756. RTL8169SC doesn't like reduced delays in
GMII access while Tx/Rx is in progress.

Reported by:	Jaakko Heinonen <jh <> saunalahti DOT fi>,
		Anton Yuzhaninov <citrin <> citrin DOT ru>
Tested by:	Jaakko Heinonen <jh <> saunalahti DOT fi>
2008-12-11 00:30:26 +00:00
Marko Zec
385195c062 Conditionally compile out V_ globals while instantiating the appropriate
container structures, depending on VIMAGE_GLOBALS compile time option.

Make VIMAGE_GLOBALS a new compile-time option, which by default will not
be defined, resulting in instatiations of global variables selected for
V_irtualization (enclosed in #ifdef VIMAGE_GLOBALS blocks) to be
effectively compiled out.  Instantiate new global container structures
to hold V_irtualized variables: vnet_net_0, vnet_inet_0, vnet_inet6_0,
vnet_ipsec_0, vnet_netgraph_0, and vnet_gif_0.

Update the VSYM() macro so that depending on VIMAGE_GLOBALS the V_
macros resolve either to the original globals, or to fields inside
container structures, i.e. effectively

#ifdef VIMAGE_GLOBALS
#define V_rt_tables rt_tables
#else
#define V_rt_tables vnet_net_0._rt_tables
#endif

Update SYSCTL_V_*() macros to operate either on globals or on fields
inside container structs.

Extend the internal kldsym() lookups with the ability to resolve
selected fields inside the virtualization container structs.  This
applies only to the fields which are explicitly registered for kldsym()
visibility via VNET_MOD_DECLARE() and vnet_mod_register(), currently
this is done only in sys/net/if.c.

Fix a few broken instances of MODULE_GLOBAL() macro use in SCTP code,
and modify the MODULE_GLOBAL() macro to resolve to V_ macros, which in
turn result in proper code being generated depending on VIMAGE_GLOBALS.

De-virtualize local static variables in sys/contrib/pf/net/pf_subr.c
which were prematurely V_irtualized by automated V_ prepending scripts
during earlier merging steps.  PF virtualization will be done
separately, most probably after next PF import.

Convert a few variable initializations at instantiation to
initialization in init functions, most notably in ipfw.  Also convert
TUNABLE_INT() initializers for V_ variables to TUNABLE_FETCH_INT() in
initializer functions.

Discussed at:	devsummit Strassburg
Reviewed by:	bz, julian
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
2008-12-10 23:12:39 +00:00
Bjoern A. Zeeb
629386598e Make sure nmbclusters are initialized before maxsockets
by running the tunable_mbinit() SYSINIT at SI_ORDER_MIDDLE
before the init_maxsockets() SYSINT at SI_ORDER_ANY.

Reviewed by:		rwatson, zec
Sponsored by:		The FreeBSD Foundation
MFC after:		4 weeks
2008-12-10 22:17:09 +00:00
Bjoern A. Zeeb
36b5ba0c49 Style changes only. Put the return type on an extra line[1] and
add an empty line at the beginning as we do not have any local
variables.

Submitted by:	rwatson [1]
Reviewed by:	rwatson
MFC after:	4 weeks
2008-12-10 22:10:37 +00:00
Ed Schouten
d16ebcd4fe Remove added newlines from logged messages written to /dev/console.
The /dev/console device node logs all strings that are written to it.
When the string does not contain a trailing newline, it appends one. I
can imagine this was useful a long time ago, but with our current
rc-scripts, it generates a whole bunch of messages that look like:

| Configuring syscons:
|  blanktime
| .

By not appending the newlines, the output of `dmesg -a' is now (almost?)
exactly the same as what the user will see on the console device
(syscons, uart).
2008-12-10 21:48:05 +00:00
John Baldwin
5d8d23c71b Regen. 2008-12-10 20:57:16 +00:00
John Baldwin
3858a1f4f5 - Add 32-bit compat system calls for VFS_AIO. The system calls live in the
aio code and are registered via the recently added SYSCALL32_*() helpers.
- Since the aio code likes to invoke fuword and suword a lot down in the
  "bowels" of system calls, add a structure holding a set of operations for
  things like storing errors, copying in the aiocb structure, storing
  status, etc.  The 32-bit system calls use a separate operations vector to
  handle fuword32 vs fuword, etc.  Also, the oldsigevent handling is now
  done by having seperate operation vectors with different aiocb copyin
  routines.
- Split out kern_foo() functions for the various AIO system calls so the
  32-bit front ends can manage things like copying in and converting
  timespec structures, etc.
- For both the native and 32-bit aio_suspend() and lio_listio() calls,
  just use copyin() to read the array of aiocb pointers instead of using
  a for loop that iterated over fuword/fuword32.  The error handling in
  the old case was incomplete (lio_listio() just ignored any aiocb's that
  it got an EFAULT trying to read rather than reporting an error), and
  possibly slower.

MFC after:	1 month
2008-12-10 20:56:19 +00:00
John Baldwin
c4592cbca3 Rather than using a char array with explicit assumptions about the layout
of 'struct osigevent' in 'struct aiocb', use int and void pointer spare
members that are identical to 'struct osigevent'.

MFC after:	1 month
2008-12-10 19:45:58 +00:00
Konstantin Belousov
c96f374195 Relock user map earlier, to have the lock held when break leaves the
loop earlier due to sbuf error.

Pointy hat to:	me
Submitted by:	dchagin
2008-12-10 16:11:09 +00:00
Doug Rabson
a097f2cc06 We need to pass a structure with enough space for an NFSv2 filehandle to
nfs_srvmtofh_xx otherwise bad things happen when an NFSv2 client tries to
make a request.
2008-12-10 14:49:54 +00:00
Robert Watson
cd416355a8 Remove inconsistent white space from in_pcballoc().
MFC after:	pretty soon
2008-12-10 13:24:38 +00:00
Robert Watson
5d04565101 Move syncache flag definitions below data structure, compress some vertical
whitespace.

MFC after:	pretty soon
2008-12-10 11:11:43 +00:00
Robert Watson
c3ce7a790c Move flag definitions for t_flags and t_oobflags below the definition of
struct tcpcb so that the structure definition is a bit more vertically
compact.  Can't yet fit it on one printed page, though.

MFC after:	pretty soon
2008-12-10 11:03:16 +00:00
Doug Rabson
937a012e5d Don't get confused if we encounter a device which is part of a raidz or raidz2
pool while probing for vdevs.

PR:		129539
Submitted by:	Paul Wootton (paul at fletchermoorland dot co dot uk)
2008-12-10 10:46:34 +00:00
Kip Macy
9b20205d85 fix a reported panic when adding a route and one hit here when deleting a route
- pass RTF_RNH_LOCKED to rtalloc1_fib in 2 cases where the lock is held
- make sure the rnh lock is held across rt_setgate and rt_getifa_fib
2008-12-10 09:21:52 +00:00
Kip Macy
65954fda79 unlock when done 2008-12-10 08:23:47 +00:00
Kip Macy
e08ab8576d don't reference if_addr_mtx directly 2008-12-10 08:22:51 +00:00
David Schultz
33bff5d3e4 Move the xprintf hook to where it belongs; it shouldn't be in the
middle of vfprintf's variable declarations.
2008-12-10 02:32:06 +00:00
Robert Watson
0ca989b376 Update comment on INP_TIMEWAIT to say what it's about, as we caution
regarding the misplacement of flags in inp_vflag in an earlier comment.

MFC after:	pretty soon
2008-12-09 23:57:09 +00:00
Marius Strobl
90447aad0a - Limit BCM5701 B5 to 32-bit mode as a workaround for a bug which
causes data corruption in combination with certain bridges.
  Information about this problem was kindly provided by davidch. [1]
- As BGE_FLAG_PCIX is meant to indicate that the controller is in
  PCI-X mode, revert to the pre __FreeBSD_version 602101 method of
  reading the bus mode register rather than checking the mere
  existence of a PCI-X capability, which is also there when the
  NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X
  mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC
  to be tuned incorrectly.

PR:		128833 [1]
Reviewed by:	jhb
MFC after:	3 days
2008-12-09 21:34:22 +00:00
Bjoern A. Zeeb
21b14a75f6 It does not make much sense to include net/route.h twice.
Remove one #include.
2008-12-09 21:09:05 +00:00
Bjoern A. Zeeb
653735c44c Add rwlock.h (and lock.h for that) to keep no-INET kernels compiling
after RADIX_NODE_HEAD_{,UN}LOCK() were added.  Must have been "learned"
by pollution before (most likely: route.h -> radix.h -> rwlock.h)
2008-12-09 20:05:58 +00:00