Commit Graph

166291 Commits

Author SHA1 Message Date
ed
7430b7d710 Small style(9) fix: use tabs instead of spaces. 2010-08-08 08:19:23 +00:00
delphij
12ac3fbc61 Address an edge condition that we found at work, where the carp(4)
interface goes to issue LINK_UP, then LINK_DOWN, then LINK_UP at
cold boot.  This behavior is not observed when carp(4) interface
is created slightly later, when the underlying interface is fully
up.

Before this change what happen at boot is roughly:

 - ifconfig creates em0 interface;
 - ifconfig clones a carp device using em0;
   (em0's link state is DOWN at this point)
 - carp state: INIT -> BACKUP [*]
 - carp state: BACKUP -> MASTER
 - [Some negotiate between em0 and switch]
 - em0 kicks up link state change event
   (em0's link state is now up DOWN at this point)
 - do_link_state_change() -> carp_carpdev_state()
 - carp state: MASTER -> INIT (via carp_set_state(sc, INIT)) [+]
 - carp state: INIT -> BACKUP
 - carp state: BACKUP -> MASTER

At the [*] stage, em0 did not received any broadcast message from other
node, and assume our node is the master, thus carp(4) sets the link
state to "UP" after becoming a master.  At [+], the master status
is forcely set to "INIT", then an election is casted, after which our
node would actually become a master.

We believe that at the [*] stage, the master status should remain as
"INIT" since the underlying parent interface's link state is not up.

Obtained from:	iXsystems, Inc.
Reported by:	jpaetzel
MFC after:	2 months
2010-08-08 07:04:27 +00:00
jkim
4ef889a3dc Do not build real mode emulator for i386. We use VM86 again since r210877. 2010-08-08 06:18:05 +00:00
ed
8c6bb486b8 Don't use struct timezone.
The timezone structure acquired by gettimeofday() is not used at all.
Just remove it.
2010-08-08 02:51:32 +00:00
ed
0c25417d53 Remove unneeded use of struct timezone.
We can safely call gettimeofday() without passing a struct timezone.
We're not using it at all.
2010-08-08 02:45:48 +00:00
imp
083b718d7b This isn't WARNS=6 safe. It fails to build on mips. Retore old
WARNS?=3 until that's resolved.
2010-08-08 02:45:14 +00:00
kientzle
53521b5150 Fix -R when used with -p. Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again.  Clearing the uname
and gname prevents this.

Reported by: swell.k
MFC after: 7 days
2010-08-08 01:25:33 +00:00
yongari
08ccc1c1b2 Cache PCIY_PMG and PCIY_EXPRESS capability pointer to softc and use
it instead of calling pci_find_extcap().
2010-08-08 00:43:41 +00:00
yongari
ae142ea6e9 Remove unnecessary assignment. 2010-08-08 00:23:36 +00:00
yongari
0eb991b7bb Always disable ASPM L0s and enable L1 before entering into WOL
suspend state.  Also disable master clock after PHY power down,
this is supposed to save more power. The master clock should be
enabled if WOL is active.
2010-08-08 00:12:31 +00:00
marius
68af74e7b3 - Introduce a cpu_ipi_single() function pointer in order to send IPIs
to single CPUs more efficiently with Cheetah(-class) and Jalapeno CPUs.
  Besides being used to implement the ipi_cpu() introduced in r210939,
  cpu_ipi_single() will also be used internally by the sparc64 MD code.
- Factor out the Jalapeno support from the Cheetah IPI send functions
  in order to be able to more easily and efficiently implement support
  for more than 32 target CPUs as well as a workaround for Cheetah+
  erratum 25 for the latter.
2010-08-08 00:09:22 +00:00
marius
8a9a5f2db2 For CPUs which ignore TD_CV and support hardware unaliasing don't
bother doing page coloring. This results in a small but measurable
performance improvement in buildworld times.
2010-08-08 00:01:08 +00:00
yongari
b67da7a96f Do not touch CMB TX threshold register when CMB is not used.
Note, alc(4) does not use CMB at all due to silicon bug.
2010-08-07 23:41:46 +00:00
yongari
b1b42e7623 Controller does not seem to support more than 1024 bytes DMA burst.
Limit DMA burst size to be less than or equal to 1024 bytes.
2010-08-07 23:33:06 +00:00
yongari
9533954d59 Marvell model number 0x06 is 88E1101 PHY. 2010-08-07 23:16:21 +00:00
olli
bdb9df6d85 jh pointed out that src/usr.sbin already has a global
WARNS=6 setting in HEAD (unlike stable/8), so it's best
to remove the line entirely.

Pointed out by:	jh
Approved by:	des (mentor)
2010-08-07 20:46:30 +00:00
ivoras
252207bbfb To help with sequential read UFS performance on modern systems, increase
the vfs.read_max default. For most systems this means going from 128 KiB
to 256 KiB, which is still very conservative and lower than what most
other operating systems use, but as a sane default should not
interfere much with existing systems.

For systems with RAID volumes and/or virtualization envirnments, where
read performance is very important, increasing this sysctl tunable to 32
or even more will demonstratively yield additional performance benefits.

If MAXPHYS ever gets bumped up, it will probably be a good idea to slave
read_max to it.
2010-08-07 18:30:10 +00:00
tuexen
542f657a7f Fix a bug where MSG_TRUNC was not returned in all necessary cases for
SOCK_DGRAM socket. MSG_TRUNC was only returned when some mbufs could
not be copied to the application. If some data was left in the last
mbuf, it was correctly discarded, but MSG_TRUNC was not set.

Reviewed by: bz
MFC after: 3 weeks
2010-08-07 17:57:58 +00:00
gavin
6962657fca Add a keymap for the Swiss-German Macbook keyboard.
PR:		conf/139997
Submitted by:	Andreas Tobler <andreast fgznet.ch>
MFC after:	2 weeks
Committed from:	Bugathon #7
2010-08-07 17:02:36 +00:00
olli
df9856d691 syslogd(8) already supports *sending* log messages to non-
standard ports, but it can't *receive* them (port 514 is
hardcoded).  This commit adds that missing feature.

(NB:  I actually needed this feature for a server farm where
multiple jails run with shared IP addresses, and every jail
should have its own syslogd process.)

As a side effect, syslogd now compiles with WARNS=6.

Approved by:	des (mentor)
MFC after:	3 weeks
2010-08-07 16:20:12 +00:00
gavin
14181a6158 Sync the list of devices supported by uslcom(4) with NetBSD, Linux, OpenBSD
and BeOS.  The devices supported by uslcom(4) are now in sync with:

NetBSD  src/sys/dev/usb/uslsa.c 1.11
OpenBSD src/sys/dev/usb/uslcom.c 1.20
Linux   source/drivers/usb/serial/cp210x.c from kernel 2.6.35
BeOS    usb_serial/driver.c 1.32

Two vendor/product IDs from Linux have not been added to uslcom(4):
  SILABS SAEL - This device has special code in u3g to support it
  SILABS GSM2228 - I suspect this should also be covered by u3g(4).

MFC after:	1 week
2010-08-07 16:14:40 +00:00
gavin
ca78f6e790 Sort this file a little better: the vendors are supposed to be sorted by
vendor ID in the vendor section, and by symbolic name in the product
section.  Products are sorted by product ID.  While here, get rid of a
duplicate Microsoft Mouse entry, revealed by sorting.

MFC after:	1 week
2010-08-07 16:08:37 +00:00
des
fba9d4fdfa Document the MEXTADD macro.
MFC after:	2 weeks
2010-08-07 13:26:08 +00:00
kib
8e1e89f01b Prefer struct sysentvec sv_psstrings to hardcoding FREEBSD32_PS_STRINGS
in the compat32 code. Use sv_usrstack instead of FREEBSD32_USRSTACK as well.

MFC after:	1 week
2010-08-07 11:57:13 +00:00
kib
8043767b92 Add compat32 definition for (old) struct ostat.
MFC after:	1 week
2010-08-07 11:53:38 +00:00
yar
4f9ce0e3a7 Clean up the style and markup of the paragraph on fractional wait intervals.
MFC after:	3 days
2010-08-07 11:48:31 +00:00
yar
afc5ef29db Properly spell and mark up the name of kern.hz.
MFC after:	3 days
2010-08-07 11:32:17 +00:00
yar
0b9e6a5c97 Move the sentences telling the defaults for -c and -w
to where they belong.  Previously they were misplaced,
i.e., swapped.

MFC after:	3 days
2010-08-07 11:13:50 +00:00
pjd
481dcd416a In FreeBSD we use 'jailed' property.
MFC after:	2 weeks
2010-08-07 10:23:54 +00:00
joel
38858fc544 Fix typo in comment. 2010-08-07 08:31:32 +00:00
rwatson
0c4bafa8fe Properly bounds check ioctl/pioctl data arguments for Coda:
1. Use unsigned rather than signed lengths
2. Bound messages to/from Venus to VC_MAXMSGSIZE
3. Bound messages to/from general user processes to VC_MAXDATASIZE
4. Update comment regarding data limits for pioctl

Without (1) and (3), it may be possible for unprivileged user processes to
read sensitive portions of kernel memory.  This issue is only present if
the Coda kernel module is loaded and venus (the userspace Coda daemon) is
running and has /coda mounted.

As Coda is considered experimental and production use is warned against in
the coda(4) man page, and because Coda must be explicitly configured for a
configuration to be vulnerable, we won't be issuing a security advisory.
However, if you are using Coda, then you are advised to apply these fixes.

Reported by:	Dan J. Rosenberg <drosenberg at vsecurity.com>
Obtained from:	NetBSD (Christos Zoulas)
Security:	Kernel memory disclosure; no advisory as feature experimental
MFC after:	3 days
2010-08-07 08:08:14 +00:00
jkim
c750c1a108 Protect shared palette and state buffer with a mutex. Remove defunct
spltty() calls while I am here.
2010-08-07 05:46:04 +00:00
jkim
77b28d0e95 Do not block any I/O port on amd64. 2010-08-07 04:05:58 +00:00
jkim
012f478c81 Optimize interrupt vector lookup. There is no need to check the page table. 2010-08-07 03:45:45 +00:00
neel
e5604e6bc0 - Consolidate the the cache coherence attribute definitions in a single place.
Adapted from Juli's changes to pte.h in the octeon branch:
  http://svn.freebsd.org/viewvc/base/user/jmallett/octeon/sys/mips/include/pte.h

- Set the KX and UX bits in the status register for n64 kernels.

Reviewed by:	jmallett
2010-08-07 01:49:44 +00:00
pjd
fb4dcd8fd5 Various cleanups, mostly to make the test work on FreeBSD/ZFS. 2010-08-06 23:58:54 +00:00
jkim
2c643eaad8 When EC burst mode is activated and multiple bytes are accessed, do not
disable and enable repeatedly, just do it once per call.  It also reduces
code duplication.  Check all parameters early and fail immediately.
2010-08-06 23:35:33 +00:00
jkim
68285361e2 Merge ACPICA 20100806. 2010-08-06 23:11:19 +00:00
jamie
94aa0856b2 Note that a jail without a command parameter will be persistent,
instead of explicitly requiring one of "command" or "persist".

MFC after:	3 days
2010-08-06 22:06:12 +00:00
jamie
37e8c8fb79 Implicitly make a new jail persistent if it's set not to attach.
MFC after:	3 days
2010-08-06 22:04:18 +00:00
pjd
e7da3338b6 ${GREP} can only be used after loading 'conf'. 2010-08-06 21:58:53 +00:00
pjd
f87a4aad92 Don't use egrep directly - use ${GREP}. 2010-08-06 21:57:11 +00:00
pjd
970b3134a2 Check first todo() argument against operating system name and operating system
name plus file system name.
2010-08-06 21:56:32 +00:00
pjd
cf25be5f47 For FreeBSD and Linux use awk's toupper() function.
Suggested by:	ed
2010-08-06 21:53:50 +00:00
pjd
71f17c1253 Convert file system type to upper case. 2010-08-06 21:02:53 +00:00
jfv
6012099d55 Put the early setting of the MAC type back, its
removal resulted in broken code in MSIX setup.
2010-08-06 20:55:49 +00:00
pjd
0d945e4c12 Add tests for mknod(2).
Submitted by:	Jan Senolt <senoltj@centrum.cz>
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
Polished by:	pjd
2010-08-06 20:51:39 +00:00
pjd
3898aedc01 Add mknod(2) support.
Submitted by:	Jan Senolt <senoltj@centrum.cz>
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
2010-08-06 20:48:10 +00:00
pjd
9fed776db8 Sort includes. 2010-08-06 20:46:26 +00:00
bschmidt
7a1d9ddf48 Obviously the option is known as COMPAT_LINUX32 on amd64.
PR:		docs/149182
Pointed out by:	Fernando <fernando.apesteguia at gmail.com>
MFC after:	3 days
2010-08-06 20:18:16 +00:00