marius [Tue, 26 Dec 2006 09:45:19 +0000 (09:45 +0000)]
MFC: 1.7
Fix a typo in __fpu_ftox() that caused long double to long (and long long)
conversion of negative numbers to always result in -1.
While at it, rearrange the nearby comment so it fits in 80 chars per line,
like the rest of this file does.
cperciva [Tue, 26 Dec 2006 05:27:49 +0000 (05:27 +0000)]
MFC revisions 1.68-1.71 of bsdtar.c, 1.25 of bsdtar.h:
* Remove nonexistant -F option from getopts string.
* Correct the names of some options.
* Check for -U and --strip-components options in inappropriate contexts.
scottl [Thu, 21 Dec 2006 21:53:54 +0000 (21:53 +0000)]
Partially back out revs 1.134 and 1.50 of if_bge.c and if_bgereg.h,
respectively. A lot more is needed to support these chips than just PCI
IDs, and the code added to 7-CURRENT isn't ready for FreeBSD 6 yet.
mbr [Thu, 21 Dec 2006 16:24:22 +0000 (16:24 +0000)]
MFC Rev. 1.267
Retest tp->t_session because Giant might have been temporarily dropped
while waiting for proctree_lock, allowing for an intervening tty_close()
that cleared tp->t_session.
yongari [Thu, 21 Dec 2006 12:57:06 +0000 (12:57 +0000)]
MFC if_rl.c, 1.166 to RELENG_6.
Don't assume IF_LLADDR returns aligned memory address.
Because accessing ID registers in rtl81x9 needs 32bit register access
and RL_IDR6/RL_IDR7 registers are reservered registers bzero() is
needed before copying ethernet address.
This fixes unaligned memory accesses panic in sparc64.
yar [Wed, 20 Dec 2006 12:29:40 +0000 (12:29 +0000)]
MFC rev. 1.18:
Improve cleartmp in a number of aspects:
+ Use rc.subr(8) features properly.
+ Do the whole job of obliterating /tmp contents in find(1).
+ Leave lost+found and quota.{user,group} in /tmp only if root-owned.
+ Make the overall structure clearer by first removing the X dirs
(perhaps along with the rest of /tmp) and then re-creating them.
+ Use "find -exec rm -rf {} +" for efficiency: each rm instance gets
a chance to kill as much files in /tmp as ARG_MAX permits.
imp [Fri, 15 Dec 2006 21:33:23 +0000 (21:33 +0000)]
Directly commit a compatibility shim for -current.
bus_get_dma_tag(dev) in stable is spelled NULL presently. Until such
time as we MFC this functionailty (which may be never), provide this
alternate spelling to aide in back-porting -current drivers. When the
functionality is merged, this can be retired.
luigi [Wed, 13 Dec 2006 10:19:37 +0000 (10:19 +0000)]
MFC: sync with the version in -current, in detail:
- put some common code in a function handle_remount();
- add better checks on non-existing directories to prevent error
messages at run time;
- introduce a function log() to help debugging diskless booting
when things don't work;
- modify the parsing of diskless_remount so you can add mount_nfs
options after the pathname. You could use 'remount' to do something
similar, but this way is more convenient because you don't have to
hardwire the server name in the command.
- document the above.
davidxu [Wed, 13 Dec 2006 09:26:02 +0000 (09:26 +0000)]
Avoid preempting in maybe_preempt_in_ksegrp() as code in maybe_preempt()
did, mainly, if a thread is in inhibited state, don't preempt it since
it will yield cpu, while here, synchoronize variable name with
maybe_preempt().
bde [Tue, 12 Dec 2006 04:42:36 +0000 (04:42 +0000)]
MFC (1.2: add missing ldexpf()).
Previous history of ldexpf()'s existence in FreeBSD:
2005/03/07 s_scalbnf.c 1.8: first implemented (for all arches)
i387 s_scalbnf.S 1.1: i386 MD implementation at same time
2005/04/16 amd64 s_scalbnf.S 1.1: missing here, and thus missing for amd64
2005/09/12 amd64 s_scalbnf.S 1.2: fixed in -current
2005/12/06 e_scalbnf.c 1.10: misimplemented for all arches (accidentally has
no effect except for amd64)
2006/07/05 e_scalbnf.c 1.11: backed out misimplementation
2006/07/05 e_scalbnf.c 1.12: attempt to fix log message in 1.11
The log message in e_scalbnf.c 1.12 still got the main detail wrong.
1.10 actually succeeded in misimplementing ldexpf() for amd64 only,
since for amd64 only there is no strong reference to hide the broken
weak reference. For most arches, there is a strong reference in
s_scalbnf.c; for i386, there is a strong reference in s_scalbnf.S; for
amd64 there is supposed to be a strong reference in s_scalbnf.S but
it was missing.
So the problem mainly affected all versions of RELENG_6 on amd64. -current
has ldexpf() and versions before 6.0 aren't supposed to have it.
kensmith [Sun, 10 Dec 2006 19:47:31 +0000 (19:47 +0000)]
MFC of v1.134:
> revision 1.134
> date: 2006/03/05 17:52:32; author: phk; state: Exp; lines: +4 -2
> When we get an unknown ATAPI comand, try it even if it is not listed,
> in all likelyhood just passing it through will work.
This fix allows for burning CDs/DVDs on USB drives which would be nice
for 6.2...
Original work by: phk
Requested by: phk
Reviewed by: iedowse
hrs [Fri, 8 Dec 2006 15:52:25 +0000 (15:52 +0000)]
MFC: Disable IPv6 configuration for interfaces in pccard_ether_start().
After a change of devd.conf, devd(8) handles NIC attach/detach event
by using /etc/pccard_ether with the interface name as the argument.
This model does not work properly with IPv6 configuration because the
implementation of IPv6 stateless auto-configuration in the FreeBSD
rc.d scripts depends on whether there are any explicit configurations
for interfaces or not. It works this way: if no manual configuration,
it will perform auto-configuration, but otherwise no
auto-configuration will be performed. So, this behavior can only be
determined by all of the interfaces on a system, not a single one.
For this reason, the network6_interface_setup() function called from
the pccard_ether_start() does not work with a single interface name.
And what is worse, this combination of devd.conf and
pccard_ether_start() caused a bad side-effect that when
ipv6_enable=YES, all of interfaces marked as DOWN would be UP
unconditionally (and router solicitation was sent) just after devd(8)
was invoked. This should be fixed in a more sophisticated way.
hrs [Fri, 8 Dec 2006 06:40:34 +0000 (06:40 +0000)]
MFC:
Add a link-local address to the lo0 even when ipv6_enable="NO".
A kernel with INET6 always has ::1 on lo0, so in the case of
ipv6_enable="NO" the lo0 can have ::1 with no link-local address.
This is a violation of the IPv6 specification. As a workaround
for this situation, fe80::1 is added in rc.d/auto_linklocal when
lo0 has no link-local address.
sobomax [Wed, 6 Dec 2006 20:12:13 +0000 (20:12 +0000)]
MFC all relevant changes since beginning of 2006:
- Correct spelling of 3DNow!;
- Add two new CPUID bits for AMD CPUs, i. e., SVM and extended APIC register;
- Add another Intel CPU feature flag, xTPR (Send Task Priority Messages);
- Remove bogus white-space diff to current.
mohans [Tue, 5 Dec 2006 18:41:35 +0000 (18:41 +0000)]
MFC :
Fix to readdir+ reply handling. When inserting an entry into the namecache,
initialize the nfsnode's ctime. Otherwise a subsequent lookup purges the
just entered namecache entry.
Approved by: re
- We know it is called rpclose() so call it directly.
- Fix -Wundef from compiling the amd64 LINT.
- Make rp(4) 64-bit- and endian-clean as well as work on strict alignment
archs.
- Instead of bus_space_{read,write}*(rman_get_bustag(), rman_get_bushandle())
use bus_{read,write}*(). Unlike in 7.0-CURRENT, this has no other benefit
than diff reduction with HEAD.
mlaier [Sun, 3 Dec 2006 18:32:51 +0000 (18:32 +0000)]
MFC: rev. 1.8 from OpenBSD, rev. 1.91:
fix servicecurve check; no point in checking the same sc three times, it
was obviously intended to check all three. has been wrong since the
beginning, 4 years... noticed by Earl Lapus <earl.lapus@gmail.com>, Vasil
Dimov <vd@FreeBSD.org> mailed me then, ok mcbride
emax [Fri, 1 Dec 2006 23:33:22 +0000 (23:33 +0000)]
MFC:
Do not mark Bluetooth HID device as "potential keyboard" if its descriptor
has items with CONSUMER page. For now only check for items with KEYBOARD page.
This should prevent bthidd(8) from allocating vkbd(4) keyboard for Microsoft
Bluetooth Explorer mouse.