Commit Graph

163556 Commits

Author SHA1 Message Date
Nathan Whitehorn
cbfd4d0cbc Don't put negative values into the averages. 2011-05-29 19:53:11 +00:00
Michael Tuexen
14cfa970bf Get rid of unused functions.
MFC after: 1 week.
2011-05-29 18:41:06 +00:00
Nathan Whitehorn
815d7d92c1 Update the I2C-based temperature/fan drivers to connect to the Powermac
thermal control module. This provides automatic fan management on all G5
PowerMacs and Xserves.
2011-05-29 18:35:57 +00:00
Mikolaj Golub
3204c8e596 In soreceive_generic(), if MSG_WAITALL is set but the request is
larger than the receive buffer, we have to receive in sections.
When notifying the protocol that some data has been drained the
lock is released for a moment. Returning we block waiting for the
rest of data. There is a race, when data could arrive while the
lock was released and then the connection stalls in sbwait.

Fix this by checking for data before blocking and skip blocking
if there are some.

PR:		kern/154504
Reported by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Tested by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Reviewed by:	rwatson
Approved by:	kib (co-mentor)
MFC after:	2 weeks
2011-05-29 18:00:50 +00:00
Jilles Tjoelker
562c9f003e sh: Add test for 'set +o'. 2011-05-29 15:02:10 +00:00
Andreas Tobler
c931ccf1b0 Add some missing files. Without we hang in the OF prompt asking for screen.4th.
Approved by:	nwhitehorn (mentor)
2011-05-29 14:27:11 +00:00
Andreas Tobler
d188174a4f Add a new driver, the ad7417, to read temperatures and voltages on some
PowerMac's.

Approved by:	nwhitehorn (mentor)
2011-05-29 14:25:42 +00:00
Benedict Reuschling
e6b71fcb16 Mention that jumbo frame support is disabled on PCIe VT6130/VT6132
controllers because of TX MAC hangs when trying to send a frame
that is larger than 4K (see r200759).

PR:		docs/156742
Submitted by:	Michael Moll (kvedulv at kvedulv dot de)
Reviewed by:	yongari@
MFC after:	6 days
2011-05-29 11:10:56 +00:00
Bjoern A. Zeeb
541ab6a6c5 The argument to setsockopt for IP_MULTICAST_LOOP depends on operating
system and is decided upon by configure and could be an u_int or a
u_char.  For FreeBSD it is a u_char.

For IPv6 however RFC 3493, 5.2 defines the argument to
IPV6_MULTICAST_LOOP to be an unsigned integer so make sure we always
use that using a second variable for the IPV6 case.
This is to get rid of these error messages every 5 minutes on some
systems:
ntpd[1530]: setsockopt IPV6_MULTICAST_LOOP failure: Invalid argument
  on socket 22, addr fe80::... for multicast address ff02::101

While here also fix the copy&paste error in the log message for
IPV6_MULTICAST_LOOP.

Reviewed by:	roberto
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	10 days
Filed as:	Bug 1936 on ntp.org
2011-05-29 07:40:48 +00:00
Qing Li
92322284cd Supply the LLE_STATIC flag bit to in_ifscurb() when scrubbing interface
address so that proper clean up will take place in the routing code.
This patch fixes the bootp panic on startup problem. Also, added more
error handling and logging code in function in_scrubprefix().

MFC after:	5 days
2011-05-29 02:21:35 +00:00
Marcel Moolenaar
5f94931e7d The P4080 has 8 cores. Bump MAXCPU to 8 to match. 2011-05-29 00:40:59 +00:00
Marcel Moolenaar
ebfbeb83f6 o Add system versions for the P4040(E) and P4080(E).
o   In bare_probe(), change the logic that determines the maximum
    number of processors/cores into a switch statement and take
    advantage of the fact that bit 3 of the SVR value indicates
    whether we're running on a security enabled version. Since we
    don't care about that here, mask the bit. All -E versions
    are taken care of automatically.
2011-05-29 00:27:42 +00:00
Adrian Chadd
76355edba5 Teach if_ath about devices which have short-GI in 20MHz channel modes.
This has been disabled until now because there hasn't been any supported
device which has this feature. Since the AR9287 is the first device to
support it, and since now the HAL has functional AR9287+11n support,
flip this on.
2011-05-29 00:17:13 +00:00
Nathan Whitehorn
66e2bfe830 Adapt smusat(4) to use powermac_thermal. This provides automatic fan
management on dual- and quad-core Powermac G5s, and the last G5 iMacs.
2011-05-28 22:11:22 +00:00
Nathan Whitehorn
ad84e440a6 Require an error instead of a timeout to decide the new-style fan
commands won't work. This prevents a busy system from making smu(4)
suddenly decide its fans use the old-style command set.

MFC after:	3 days
2011-05-28 21:54:18 +00:00
Nathan Whitehorn
84d7767618 Factor out the SMU fan management code into a new module (powermac_thermal)
that will connect all of the various sensors and fan control modules on
Apple hardware with software-controlled fans (e.g. all G5 systems).

MFC after:	1 month
2011-05-28 21:13:22 +00:00
Marcel Moolenaar
8a4b7c64b3 o Determine the number of LAWs in a way the is future proof. Only the
MPC8555(E) has 8 LAWs, so don't make that the default case. Current
    processors have 12 LAWs so use that as the default instead.
o   Determine the target ID of the PCI/PCI-X and PCI-E controllers in
    a way that's more future proof. There's almost a perfect mapping
    from HC register offset to target ID, so use that as the default.
    Handle the MPC8548(E) specially, since it has a non-standard target
    ID for the PCI-E controller. Don't worry about whether the processor
    implements the target ID here, because we should not get called for
    PCI/PCI-X or PCI-E host controllers that don't exist.
2011-05-28 19:14:16 +00:00
Marcel Moolenaar
7591d5a373 Remove unused defines. They're distracting... 2011-05-28 16:30:24 +00:00
Nathan Whitehorn
809685bcfc Fix shell-based partitioning. 2011-05-28 16:15:46 +00:00
Adrian Chadd
133cf74b7e Fix AR9287 operation when >1 TX chain is enabled.
I didn't pick this up with the initial commit because I was only testing
with 11bg.
2011-05-28 15:43:56 +00:00
Kirk McKusick
3fa3e267de Update the manual page to reflect the new 32K/4K defaults.
Reminded by: Ivan Voras
2011-05-28 15:14:50 +00:00
Kirk McKusick
1508294bb6 Due to a lag in updating the fs_pendinginodes count, we cannot depend
on it to decide whether we should try to reclaim inodes when we run
short.

Discovered by: Peter Holm
2011-05-28 15:07:29 +00:00
Jilles Tjoelker
27a43b2e51 printf(1): Document that %c and precision for %b/%s use bytes, not chars.
This means these features do not work as expected with multibyte characters.

This perhaps less than ideal behaviour matches printf(3) and is specified by
POSIX.
2011-05-28 14:32:47 +00:00
Jilles Tjoelker
98102dabd3 printf: Allow multibyte characters for '<char> form, avoid negative codes.
Examples:
  LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
  LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.
2011-05-28 11:37:47 +00:00
Julian Elischer
802e09ac9e New boot loader menus from Devin Teske.
Discussed on hackers and recommended for inclusion into 9.0 at the devsummit.
All support email to devin   dteske at vicor dot ignoreme dot com .

Submitted by:	dteske at vicor dot ignoreme dot com
Reviewed by:	me and many others
2011-05-28 08:50:38 +00:00
Marcel Moolenaar
ebf84ceca7 Better support different kernel hand-offs. When loaded directly
from U-Boot, the kernel is passed a standard argc/argv pair.
The Juniper loader passes the metadata pointer as the second
argument and passes 0 in the first. The FreeBSD loader passes
the metadata pointer in the first argument.

As such, have locore preserve the first 2 arguments in registers
r30 & r31. Change e500_init() to accept these arguments. Don't
pass global offsets (i.e. kernel_text and _end) as arguments to
e500_init(). We can reference those directly.

Rename e500_init() to booke_init() now that we're changing the
prototype.

In booke_init(), "decode" arg1 and arg2 to obtain the metadata
pointer correctly. For the U-Boot case, clear SBSS and BSS and
bank on having a static FDT for now. This allows loading the
ELF kernel and jumping to the entry point without trampoline.
2011-05-28 04:10:44 +00:00
Doug Barton
37bb75f740 Upgrade to 9.6-ESV-R4-P1, which address the following issues:
1. Very large RRSIG RRsets included in a negative cache can trigger
an assertion failure that will crash named (BIND 9 DNS) due to an
off-by-one error in a buffer size check.

This bug affects all resolving name servers, whether DNSSEC validation
is enabled or not, on all BIND versions prior to today. There is a
possibility of malicious exploitation of this bug by remote users.

2. Named could fail to validate zones listed in a DLV that validated
insecure without using DLV and had DS records in the parent zone.

Add a patch provided by ru@ and confirmed by ISC to fix a crash at
shutdown time when a SIG(0) key is being used.
2011-05-28 00:21:28 +00:00
Doug Barton
dcdfcb5422 Vendor import of BIND 9.6-ESV-R4-P1 2011-05-27 23:50:10 +00:00
Marcel Moolenaar
7faf44ba96 o The P1020(E) & P2020(E) also have two cores. This conditional has
a tendency to grow unwieldy so we may want to revisit this in due
    time.
o   Simplify the CPU reset function by writing to the reset control
    register irrespective of whether the CPU has one and automatically
    falling back to the debug control register if we didn't reset the
    CPU. The side-effect is that we now properly reset future processors
    without first having to add the system version to the list.
2011-05-27 23:18:41 +00:00
Marcel Moolenaar
6a76463e30 Wire the kernel using TLB1 entry 0 rather than entry 1. A more recent
U-Boot as found on the P1020RDB doesn't like it when we use entry 1
(for some reason) whereas an older U-Boot doesn't mind if we use entry
0. If anything else, this simplifies the code a bit.
2011-05-27 23:09:12 +00:00
Jilles Tjoelker
702b4f04ea find: If a part of an expression is unknown, do not call it an option.
Although most of the primaries and operators start with "-", they are not
options.

Examples:
  find . -xyz
  find . -name xyz -or bad

MFC after:	1 week
2011-05-27 22:14:49 +00:00
Rick Macklem
ff29f3b241 Fix the new NFS client so that it handles NFSv4 state
correctly during a forced dismount. This required that
the exclusive and shared (refcnt) sleep lock functions check
for MNTK_UMOUNTF before sleeping, so that they won't block
while nfscl_umount() is getting rid of the state. As
such, a "struct mount *" argument was added to the locking
functions. I believe the only remaining case where a forced
dismount can get hung in the kernel is when a thread is
already attempting to do a TCP connect to a dead server
when the krpc client structure called nr_client is NULL.
This will only happen just after a "mount -u" with options
that force a new TCP connection is done, so it shouldn't
be a problem in practice.

MFC after:	2 weeks
2011-05-27 22:05:10 +00:00
Jilles Tjoelker
8d5a14301f sh: Remove the "exp" builtin.
The "exp" builtin is undocumented, non-standard and not very useful.

If exp's return value is not used, something like
VAR=$(exp EXPRESSION)
is equivalent to
VAR=$((EXPRESSION))
except that errors in the expression are fatal and quoting special
characters is not needed in the latter case.

If exp's return value is used, something like
if exp EXPRESSION >/dev/null
can be replaced by
if [ $((EXPRESSION)) -ne 0 ]
with similar differences.

The exp-run showed that "let" is close enough to bash's and ksh's builtin
that removing it would break a few ports. Therefore, "let" remains in 9.x.

PR:		bin/104432
Exp-run done by: pav (with some other sh(1) changes)
2011-05-27 20:53:07 +00:00
Jilles Tjoelker
64fa41f3e1 sh: Correct criterion for using CDPATH in cd.
CDPATH should be ignored not only for pathnames starting with '/' but also
for pathnames whose first component is '.' or '..'.

The man page already describes this behaviour.
2011-05-27 20:01:46 +00:00
Edward Tomasz Napierala
7e2548ae0a Remove definitions for RACCT_FSIZE and RACCT_SBSIZE - these two are rather
performance-sensitive and not that useful, so I won't be merging them
before 9.0.
2011-05-27 19:57:58 +00:00
Jilles Tjoelker
4daae0cde6 sh: Add simple CDPATH test. 2011-05-27 19:36:07 +00:00
Kevin Lo
fbb3427a1b Whitespace fixes
Reviewed by:	jpaetzel
2011-05-27 16:17:35 +00:00
Jilles Tjoelker
241f15dfaf sh: Various updates to the TOUR document. 2011-05-27 16:00:37 +00:00
Jilles Tjoelker
715a0dd556 sh: Fix unquoted $@/$* if IFS=''.
If IFS is null, unquoted $@/$* should still expand to separate words.
This differs from quoted $@ (which does not depend on IFS) in that pathname
generation is performed and empty words are removed.
2011-05-27 15:56:13 +00:00
Andrey V. Elsukov
ca203c4faa Add example how to create MBR and BSD schemes and install boot code. 2011-05-27 15:29:39 +00:00
Andrey V. Elsukov
cbcc2a4fd6 Synchronize manpage's synopsis with program's usage. Since -l and -r
keys are mutually exclusive for the `gpart show` command, then mark
them so.

Requested by:	ru
2011-05-27 14:30:13 +00:00
Gabor Kovesdan
15a4dfe2a5 - Move some internal functions to the private namespace
Submitted by:	kan
Approved by:	delphij (mentor)
2011-05-27 10:40:34 +00:00
Pawel Jakub Dawidek
43cadeaa27 Silence warnings about unsupoorted value types.
MFC after:	2 weeks
2011-05-27 08:34:31 +00:00
Andrey V. Elsukov
9854b4eeee Some partitioning tools may have a different opinion about disk
geometry and partitions may start from withing the first track.
If we found such partitions, then do not reserve space of the
first track, only first sector.
2011-05-27 06:37:42 +00:00
Marcel Moolenaar
df697aa015 o Swap the SVR numbers for MPC8533 & MPC8533E
o   Add SVR defines for P1011(E), P1020(E), P2010(E) & P2020(E)
2011-05-27 05:58:10 +00:00
Alexander Motin
34fca5da3c Change new constant names to ones used by OpenSolaris. 2011-05-27 03:44:47 +00:00
Alexander Motin
afceed6aef Oops, fix typo in r222336. 2011-05-27 03:30:23 +00:00
Alexander Motin
f4e4182ea3 Add ses/srcs/eltsub.h to the list of files to be installed.
It is required for user-level SES example tools build.
2011-05-27 03:27:28 +00:00
Alexander Motin
e13ca5c0a1 Add names for few more SES element types according SES-2 specification. 2011-05-27 03:23:39 +00:00
Kirk McKusick
99f6ac66ad The check for whether a block is going to be claimed by a snapshot
needs to happen before we notify the underlying layer that it is
being freed.
2011-05-26 23:56:58 +00:00