Commit Graph

168231 Commits

Author SHA1 Message Date
Kevin Lo
f8d4925a39 Remove unused variable mii 2012-02-11 08:12:52 +00:00
Bjoern A. Zeeb
84c2fd2f94 Use the more common macro to set the if_baudrate to 10Gbit/s. Just use
UL not ULL, which should make 32bit archs more happy.
2012-02-11 07:47:06 +00:00
Bjoern A. Zeeb
c3ed30eb19 Make use of the read-only variant of the IF_ADDR_*LOCK() macros introduced
in r229614 rather than the compat one.
2012-02-11 07:43:33 +00:00
Doug Barton
f7451733fb In the days before r208307 addswap was running early in the second stage
of rcorder. Somehow in the intervening period addswap got moved to the
very end, which is almost certainly not what we want.

This change moves it to right after kld so that for users who need it,
they'll get it ASAP.
2012-02-11 06:21:16 +00:00
Bjoern A. Zeeb
ca1672da93 Switch getifaddrs(3) to the new API introduced in r231505. Also remove
conditional code parts not used by or applicable to FreeBSD.

The new implementation is supposed to be able to cope with changes to
the 'l' versions of the msghdr structs now used as well as to if_data
allowing future changes without breaking things.

This restores carp(4) config support in HEAD after r231504.

Reviewed by:	glebius, brooks
MFC After:	3 months
2012-02-11 06:05:40 +00:00
Bjoern A. Zeeb
6d076ae8f7 Introduce a new NET_RT_IFLISTL API to query the address list. It works
on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
will allow us to extend both the msghdrl structs and eventually if_data
in the future without breaking the ABI.

Bump __FreeBSD_version to allow ports to more easily detect the new API.

Reviewed by:	glebius, brooks
MFC after:	3 days
2012-02-11 06:02:16 +00:00
Bjoern A. Zeeb
e82cf13bfb Backout changes from r228571. Remove if_data from struct ifa_msghdr again.
While this breaks carp on HEAD temporary, it restores the upgrade path from
stable, and head before 20111215.

Reviewed by:	glebius, brooks
2012-02-11 05:59:54 +00:00
David Xu
4c91ddd690 Make code more stable by checking NULL pointers. 2012-02-11 04:12:12 +00:00
Oleksandr Tymoshenko
b098345b9e Add handlers for TLS-related relocation entries 2012-02-11 00:54:57 +00:00
Kenneth D. Merry
bab893586b Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
probe routine.

This will allow LSI to ship drivers that return BUS_PROBE_VENDOR to
override the in-tree version of the driver.

MFC after:	3 days
2012-02-11 00:28:30 +00:00
Jung-uk Kim
731634f7fe De-obfuscate acpi_acquire_global_lock(). It seems the function was directly
translated from i386 assembly version.
2012-02-10 23:30:29 +00:00
Oleksandr Tymoshenko
4c322abc56 - Reverse logic so base tls is fixed up with correct number 2012-02-10 23:24:33 +00:00
Martin Cracauer
2477c8ab78 Fix bin/164947: tee looses data when writing to non-blocking file descriptors
tee was not handling EAGAIN

patch submitted by Diomidis Spinellis <dds@aueb.gr>. Thanks so much

reproduced and re-tested locally
2012-02-10 22:16:17 +00:00
Konstantin Belousov
e1976efd69 Add a test program for recently added ptrace(2) interfaces.
MFC after:	1 week
2012-02-10 21:33:12 +00:00
Konstantin Belousov
7bc72c360a In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
both 64bit and 32bit binaries, not for 64bit only.

The set of the flag is not neccessary there, because the only current
user of the cpu_set_user_tls() is create_thread(), which calls
cpu_set_upcall() before and cpu_set_upcall() itself sets PCB_FULL_IRET.
Change the function for consistency and preserve existing KPI for now.

MFC after:	1 week
2012-02-10 21:26:25 +00:00
Luigi Rizzo
2f345d8ed5 Add a driver for Emulex OneConnect ethernet cards (10 Gbit PCIe)
A manpage will come in a future commit.

Submitted by:   Naresh Raju Gottumukkala (emulex)
2012-02-10 21:03:04 +00:00
Oleksandr Tymoshenko
9b4f251484 Remove debug output 2012-02-10 19:58:04 +00:00
Oleksandr Tymoshenko
bdbf2b0837 - Fix spelling of R_MIPS_RELGOT
- Add R_MIPS_JALR relocation
- Add TLS relocation types

Obtained from:	NetBSD
2012-02-10 19:17:14 +00:00
Yoshihiro Takahashi
d56a003132 Reduce diffs against i386.
MFC after:	1 week
2012-02-10 15:34:36 +00:00
Ed Schouten
852b05c5b5 Remove unneeded newline. It fits in 80 columns now.
Pointed out by:	jh
2012-02-10 14:55:47 +00:00
Ed Schouten
65f171c657 Correct date. It seems to be 2012. 2012-02-10 13:51:02 +00:00
Ed Schouten
c34b382869 Unbreak build.
libprocstat still uses __si_namebuf.
2012-02-10 13:47:40 +00:00
Ed Schouten
e6ad3d22f4 Detect file modification properly by using tv_nsec.
POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond
precision to detect file modification.

MFC after:	2 weeks
2012-02-10 13:40:32 +00:00
Ed Schouten
8fac9b7b7d Merge si_name and __si_namebuf.
The si_name pointer always points to the __si_namebuf member inside the
same object. Remove it and rename __si_namebuf to si_name.
2012-02-10 12:40:50 +00:00
Ed Schouten
7870adb640 Remove direct access to si_name.
Code should just use the devtoname() function to obtain the name of a
character device. Also add const keywords to pieces of code that need it
to build properly.

MFC after:	2 weeks
2012-02-10 12:35:57 +00:00
Edward Tomasz Napierala
92858a92e0 Be more helpful about alternate superblocks. 2012-02-10 12:01:19 +00:00
Ed Schouten
b5d1ccb470 Remove outdated piece of information.
devtoname() always returns a pathname to the device. It will never
return a #major/minor string.

MFC after:	2 weeks
2012-02-10 11:20:13 +00:00
Adrian Chadd
2af3b95bf2 Enforce the hardware chainmask when allowing the user to override the
chainmask.

This way a disabled radio chain can't be enabled by a user.
2012-02-10 10:10:41 +00:00
Adrian Chadd
dc8552d525 .. oops, use the right chainmask. 2012-02-10 10:09:16 +00:00
Adrian Chadd
a865860d09 Add in a new driver feature to allow the TX and RX chainmask to be
overridden at attach time.

Some 802.11n NICs may only have one physical antenna connected.
The radios will be very upset if you try enabling radios which aren't
connected to antennas.

This allows hints to override the TX and RX chainmask.

These hints are:

hint.ath.X.rx_chainmask
hint.ath.X.tx_chainmask

They can be set at either boot time or in kenv before the module is loaded.

This and the previous HAL commit were sponsored in late 2011 by Hobnob, Inc.

Sponsored by:	Hobnob, Inc.
2012-02-10 10:01:09 +00:00
Adrian Chadd
40ffb20de6 Extend the HAL code to allow the RX and TX chainmask to be overridden
by capabilities.

Add an ar5416SetCapability() function, which contains logic to override
the chainmask and update the relevant stream.

This is designed to be called after the attach function, which presets
the TX/RX chainmask and stream.

TODO: check the chainmask against the hardware chainmask so non-existing
chains aren't enabled.
2012-02-10 09:58:20 +00:00
Andrey V. Elsukov
48ef46e55a Add alias for the partition with type 0x42 to the MBR scheme.
MFC after:	1 week
2012-02-10 09:55:18 +00:00
Oleksandr Tymoshenko
d328a1b2f3 Fix-up value passed by thr_new syscall to make it compatible
with MIPS_TLS_GET/MIPS_TLS_SET sysarch API.
2012-02-10 07:03:45 +00:00
Oleksandr Tymoshenko
dda3ee8770 Switch MIPS TLS implementation to Variant I:
Save pointer to the TLS structure taking into account TP_OFFSET
and TCB structure size.
2012-02-10 06:53:25 +00:00
Andrey V. Elsukov
f44d97bd0c Let's be more realistic and limit maximum number of partition to 4k.
MFC after:	1 week
2012-02-10 06:44:30 +00:00
Oleksandr Tymoshenko
20c390af63 Switch MIPS TLS implementation to Variant I 2012-02-10 06:42:50 +00:00
Kevin Lo
de02885a7b Add a missing break. This bug was introduced in r228856. 2012-02-10 06:30:52 +00:00
Tim Kientzle
acf8ebb0e9 Implement -print-file-name=include (which is undocumented
but used by some Linux boot loaders).  This option prints
out the directory holding the include files needed by
a freestanding program.  The default implementation of
this doesn't work on FreeBSD because of the different
include file layout.  But it's easy to implement:
just return /usr/include (or the cross-compiling equivalent).

Reviewed by:	kan
MFC after:	1 week
2012-02-10 05:05:42 +00:00
Glen Barber
d63559341c Fix date from r231111.
Pointy-hat to:	gjb (myself, approver of r231111)
2012-02-10 03:34:32 +00:00
Oleksandr Tymoshenko
cf9c1f8158 Fix debug output for MIPS part of rtld 2012-02-10 03:30:57 +00:00
Eitan Adler
2eb318b31d Fix r231300: Use correct test so we only bail out on error instead of on non-error.
Also, fix a style bug.

Submitted by:	ache
Approved by:	cperciva
MFC after:	1 month
2012-02-10 00:53:39 +00:00
Konstantin Belousov
db3273398b Mark the automatically attached child with PL_FLAG_CHILD in struct
lwpinfo flags, for PT_FOLLOWFORK auto-attachment.

In collaboration with:	Dmitry Mikulin <dmitrym juniper net>
MFC after:	 1 week
2012-02-10 00:02:13 +00:00
Navdeep Parhar
3e7cc3cab3 Add IPv6 TSO (including TSO+VLAN) support to cxgb(4).
If an IPv6 packet has extension headers the kernel needs to deal with it
itself.  For the rest it can set various CSUM_XXX flags and the driver
will act on them.
2012-02-09 23:19:09 +00:00
Oleksandr Tymoshenko
8d26fe2af5 Fix n32 build breakage 2012-02-09 22:48:35 +00:00
Kirk McKusick
5ecba76999 Historically when an application wrote an entire block of a file,
the kernel allocated a buffer but did not zero it as it was about
to be completely filled by a uiomove() from the user's buffer.
However, if the uiomove() failed, the old contents of the buffer
could be exposed especially if the file was being mmap'ed. The
fix was to always zero the buffer when it was allocated.

This change first attempts the uiomove() to the newly allocated
(and dirty) buffer and only zeros it if the uiomove() fails. The
effect is to eliminate the gratuitous zeroing of the buffer in
the usual case where the uiomove() successfully fills it.

Reviewed by:    kib
Tested by:      scottl
MFC after:      2 weeks (to 9 only)
2012-02-09 22:34:16 +00:00
Oleksandr Tymoshenko
2675d18f77 - Emulate RDHWR instruction for TLS support
Reading register $29 with RDHWR is becoming the de-facto standard to
implement TLS.  According to linux-mips wiki, MIPS Technologies has
reserved hardware register $29 for ABI use.  Furthermore current GCC
makes the following assumptions:
- RDHWR is natively available or otherwise emulated by the kernel
- Register $29 holds the TLS pointer

Submitted by:	Robert Millan <rmh@debian.org>
2012-02-09 22:17:13 +00:00
Eitan Adler
0bdc3ecf11 Fix NULL ptr dereference in setusercontext if pwd is null,
LOGIN_SETPRIORITY is set, and setting the priority (rtprio or
setpriority) fails.

PR:		kern/164238
Submitted by:	Alexander Wittig <alexander@wittig.name>
Reviewed by:	des
Approved by:	cperciva
MFC after:	1 month
2012-02-09 21:06:47 +00:00
Eitan Adler
839a18b056 Permit the use of relative paths for the prefix argument.
Remove an unnecessary cwd from created plists when -p is specified

PR:		bin/145000
Submitted by:	gcooper
Approved by:	portmgr (flo)
MFC after:	1 month
2012-02-09 20:51:03 +00:00
Eitan Adler
7c88c0d0e1 More accurately document what happens on error.
PR:		docs/127908
Submitted by:	Matthew D. Fuller <fullermd@over-yonder.net>
Approved by:	cperciva
MFC after:	1 week
2012-02-09 20:49:03 +00:00
Eitan Adler
b169a33235 Make etc/Makefile more conflict resistant
PR:		conf/163789
Submitted by:	gcooper (iXsystems)
Approved by:	cperciva
MFC after:	3 days
2012-02-09 20:44:20 +00:00