Commit Graph

167250 Commits

Author SHA1 Message Date
Xin LI
81966bce06 Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
driver.  This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after:	2 weeks
2011-12-28 23:26:58 +00:00
Alexander Motin
a0b435f856 Set maximum I/O size for mps(4) to MAXPHYS. Looking into the code, I see
no reason why it should be limited to 64K of DFLTPHYS. DMA data tag is any
way set to allow MAXPHYS, S/G lists (chain elements) are sufficient and
overflows are also handled. On my tests even 1MB I/Os are working fine.

Reviewed by:	ken@
2011-12-28 22:49:28 +00:00
Doug Barton
0ef7f263a7 1. Correct capitalization of the nobility particle for
Francois de La Rochefoucauld introduced in r228909 [1],[2]

2. Change c-cedilla introduced in the same commit to ASCII c since
   non-UTF-8 terminals will choke on the non-ASCII text. [2],[3]

Pointed out by:	bf [1]
Reviewed by:	French-speakers on #bsdcode [2]
Requested by:	uqs [3]
2011-12-28 22:18:53 +00:00
Jilles Tjoelker
a82f5687bf sh: Do not force special builtins non-special in optimized command subst.
This is not necessary: errors are already caught in evalbackcmd() and
forcelocal handles changes to variables.

Note that this depends on r223024.

MFC after:	4 weeks
2011-12-28 22:10:12 +00:00
Alan Cox
b5f359b7c3 Optimize vm_object_split()'s handling of reservations. 2011-12-28 20:27:18 +00:00
Alan Cox
fe8b9971a8 Fix a bug in the Xen pmap's implementation of pmap_extract_and_hold():
If the page lock acquisition is retried, then the underlying thread is
not unpinned.

Wrap nearby lines that exceed 80 columns.
2011-12-28 19:59:54 +00:00
Ulrich Spörlein
8064fedced Prefer ASCII apostrophes over Unicode ones like the rest of the file. 2011-12-28 19:37:03 +00:00
Baptiste Daroussin
254c268d1f Add myself as a src committer
Approved by:	des (mentor)
2011-12-28 17:45:26 +00:00
Olivier Houchard
0044d1b553 Oops, if we want to check from 0 to nsock, the test condition should be
< nsock, not >.

Pointy hat to:	cognet
Submitted by:	Olivier Cochard-Labbe <olivier AT cochard doT me>
2011-12-28 13:01:12 +00:00
Kevin Lo
5610c31cb2 Fix incorrect uses of sizeof().
The details of the fix can be found in the tcpdump git repository:
commit 684955d58611ee94eccdc34e82b32e676337188c
2011-12-28 05:58:31 +00:00
Oleksandr Tymoshenko
6b194c7ade - Add generic GPIO driver for Cavium Octeon. At the moment pin definition is
hardcoded but will be changed later with more flexible way to define them.
2011-12-28 05:57:03 +00:00
Xin LI
c8fb747dc1 In POSIX.1-2008:
P_tmpdir [OB XSI]  Default directory prefix for tempnam().

This macro is used in a lot of places in legacy applications,
and is why we see a lot of programs written for e.g. Linux
store volatile temporary files in /var/tmp and not /tmp.

MFC after:	2 months
2011-12-28 05:35:33 +00:00
Alan Cox
9800a50f2d Eliminate many of the unnecessary differences between the native and
paravirtualized pmap implementations for i386.  This includes some
style fixes to the native pmap and several bug fixes that were not
previously applied to the paravirtualized pmap.

Tested by:	sbruno
MFC after:	3 weeks
2011-12-27 23:53:00 +00:00
Jilles Tjoelker
5b7aa0fc6e libc: Eliminate some relative relocations in getusershell(). 2011-12-27 23:35:10 +00:00
Jilles Tjoelker
571eea83bb libc: Eliminate some relative relocations in setlocale(). 2011-12-27 23:28:01 +00:00
Ed Schouten
669ab20feb Document restriction on 32-bits and 64-bits datatypes. 2011-12-27 22:14:35 +00:00
Ed Schouten
6d57c75097 Add locally implemented atomic intrinsics to libcompiler_rt.
The built-in atomic operations are not implemented in our version of GCC
4.2 for the ARM and MIPS architectures. Instead of emitting locked
instructions, they generate calls to functions that can be implemented
in the C runtime.

Only implement the atomic operations that are used by <stdatomic.h> for
datatype sizes that are supported by atomic(9). This means that on these
architectures, we can only use atomic operations on 32-bits and 64-bits
variables, which is typically sufficient.

This makes <stdatomic.h> work on all architectures except MIPS, since
MIPS and SPARC64 still use libgcc. Converting these architectures to
libcompiler_rt is on my todo list.
2011-12-27 22:13:51 +00:00
David Chisnall
3033610f5d Define NULL to nullptr in C++11 mode (not strictly required, but it makes
migrating code to C++11 easier).

Approved by:	dim (mentor)
2011-12-27 21:36:31 +00:00
Xin LI
981dfb0965 - Fail when the utility is not invoked as rtprio nor idprio.
- use warnx() to tell the user whether a process is running in normal,
   idle or realtime priority. with the old code it would have been possible
   for another process to send data to stdout between
	printf("%s: ", p);
   and
	printf("* priority\n");
   and thus break the formatting.
 - 'rtprio 10 -0' triggeres non-intuitive behavior.  It would first set the
   priority of itself to 10 *and* would then try to execute '-0'. Of course,
   setting the priority of [id|rt]prio itself doesn't make a lot of sense,
   but it is intuitive compared to the previous behavior.
 - 'rtprio -t --1' will actually pass over the '-1' to rtprio().  Now
   invoking rtprio like this will catch the wrong usage before passing
   over the invalid argument to rtprio().
 - Garrett Cooper suggested to add further diagnostics where the failure
   occures, if execvp fails.

PR:		bin/154042
Submitted by:	arundel
MFC after:	1 month
2011-12-27 20:03:57 +00:00
Sergey Kandaurov
8f3f6f16e4 Clean up from the 4.x era.
In an example of boot command:
- rename wd(4) IDE disk drives name to ad(4) for the time being.
- update the used kernel path "/kernel" to the current default.
[It still worked occasionally by looking into the /boot/kernel directory,
so the resulting path was "/boot//kernel/kernel", with two slashes.]

Bump .Dd for this and previous changes.

MFC after:	1 week
2011-12-27 15:59:51 +00:00
Matt Jacob
f6683e5594 Fix target mode compilation issues that arose after a change
in the sense data structures.

MFC after:	1 week
2011-12-27 14:59:24 +00:00
Ed Schouten
fd8a33c1d6 Add missing \.
While sorting the MLINKS by name, I forgot to re-add it.
2011-12-27 13:01:10 +00:00
Ed Schouten
4d8a7eab01 Add manual page for atomic operations. 2011-12-27 12:58:54 +00:00
Martin Matuska
73278c5812 Update to vendor revision 4016.
Vendor has integrated most of our local changes in revisions 3976-3979 so
future updates are going to be easier.
Thanks to Tim Kientzle <kientzle@FreeBSD.org>.

MFC after:	8 days
2011-12-27 10:36:56 +00:00
Xin LI
b0266169d4 Update rtprio(2) manual page to reflect the latest changes in -CURRENT as
well as provide documentation for rtprio_thread(2) system call.

MFC after:	1 month
X-MFC-after:	r228470
2011-12-27 10:34:00 +00:00
Doug Barton
436c93525d 1. Remove a bunch of duplicates. Usually this means removing them from
fortunes, but occasionally remove them from the other 2 files when
   they are not offensive, or not murphy'ish enough.

   Where the version in fortunes had better attribution and/or formatting,
   copy it over.

2. Fix a few typos

3. Use the full name of François De La Rochefoucauld, fix one of his
   quotes, and remove the duplicate of it.
2011-12-27 10:21:57 +00:00
Martin Matuska
1cd00a236b Update to vendor revision 4016
Obtained from:	http://libarchive.googlecode.com/svn/release/2.8
2011-12-27 10:21:29 +00:00
Michael Tuexen
60990c0c06 Address issues found by clang. While there, fix also some style
issues.

MFC after: 3 months.
2011-12-27 10:16:24 +00:00
Ed Schouten
d4ae5eb992 Fix some bugs in <stdatomic.h>.
- Make atomic_init() work for GCC, as assigning to structs doesn't work.
- Fix misplaced parenthesis in atomic_is_lock_free() for GCC.
- Make atomic_compare_exchange_strong() for GCC return the proper
  boolean value, whether object == expected.
- Fix argument passing in atomic_exchange_explicit() for GCC.
2011-12-26 23:33:41 +00:00
Martin Matuska
7691a6970b Update to vendor revision 3982
Obtained from:	http://libarchive.googlecode.com/svn/release/2.8
2011-12-26 22:25:58 +00:00
Ed Schouten
fc6f0665ba Add libstdthreads.
This library implements the C11 threads interface on top of the pthreads
library.  As discussed on the lists, the preferred way to implement
this, is as a separate library.

It is unlikely that these functions will be used a lot in the future. It
would have been easier if the C11 working group standardized (a subset
of) pthreads and clock_nanosleep(). Having it as a separate library
allows the embedded people to omit it from their system.

Discussed on:	arch@, threads@
2011-12-26 21:51:53 +00:00
Adrian Chadd
d015e7e4d2 Oops, my bad. Fix a broken thing I introduced earlier. 2011-12-26 19:41:46 +00:00
Ed Schouten
c6d3530d85 As per C11, add static_assert() to <assert.h>. 2011-12-26 18:57:59 +00:00
Ed Schouten
b1214a51cc Improve C11 bits in <stdlib.h>:
- Add missing semicolon to quick_exit(),
- Remove `func' parameter name from at_quick_exit(),
- Fix indentation.
- Compare against 2011 value.
2011-12-26 18:55:37 +00:00
Ed Schouten
489818ac07 Add cdefs-magic to add optional C11 bits to headers. 2011-12-26 18:49:56 +00:00
Christian Brueffer
4ff79fdf3f Add missing -l flag to usage().
PR:		163629
Submitted by:	olgeni
MFC after:	1 week
2011-12-26 16:47:45 +00:00
Ed Schouten
2157f34d3a The standard is now called C11 -- C12.
While there, compare against the proper __STDC_VERSION value.
2011-12-26 10:58:21 +00:00
Xin LI
42821a2fc9 Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not
apply to us).
2011-12-26 09:07:08 +00:00
Xin LI
b4a93b50d6 Import nc from OpenBSD 5.0. 2011-12-26 08:59:17 +00:00
Adrian Chadd
613f73a82d AR5416 has 14 GPIO pins, from 0->13. 2011-12-26 08:21:29 +00:00
Adrian Chadd
404b0e8b91 Since the only thing with a mux is the AR5416 and later, and we're now
doing split software/hardware LED configuration, we can now simply
treat "softled" as an "output" mux type.

This works fine on this DWA-552. Previous generation (pre-11n NICs) don't
have a GPIO mux - only input/output configuration - so they ignore this
field.
2011-12-26 07:48:29 +00:00
Adrian Chadd
3440495a52 Flesh out configurable hardware based LED blinking.
The hardware (MAC) LED blinking involves a few things:

* Selecting which GPIO pins map to the MAC "power" and "network" lines;
* Configuring the MAC LED state (associated, scanning, idle);
* Configuring the MAC LED blinking type and speed.

The AR5416 HAL configures the normal blinking setup - ie, blink rate based
on TX/RX throughput.  The default AR5212 HAL doesn't program in any
specific blinking type, but the default of 0 is the same.

This code introduces a few things:

* The hardware led override is configured via sysctl 'hardled';
* The MAC network and power LED GPIO lines can be set, or left at -1
  if needed.  This is intended to allow only one of the hardware MUX
  entries to be configured (eg for PCIe cards which only have one LED
  exposed.)

TODO:

* For AR2417, the software LED blinking involves software blinking the
  Network LED.  For the AR5416 and later, this can just be configured
  as a GPIO output line.  I'll chase that up with a subsequent commit.

* Add another software LED blink for "Link", separate from "activity",
  which blinks based on the association state.  This would make my
  D-Link DWA-552 have consistent and useful LED behaviour (as they're
  marked "Link" and "Activity."

* Don't expose the hardware LED override unless it's an AR5416 or later,
  as the previous generation hardware doesn't have this multiplexing
  setup.
2011-12-26 07:47:05 +00:00
Adrian Chadd
a497cd8806 Setup the initial LED state on attach and resume.
Some of the NICs I have here power up with the LEDs blinking, which is
incorrect. The blinking should only occur when the NIC is attempting
to associate.

* On powerup, set the state to HAL_LED_INIT, which turns on the "Power" MAC
  LED but leaves the "Network" MAC LED the way it is.

* On resume, also init it to HAL_LED_INIT unless in station mode, where
  it's forced to HAL_LED_RUN. Hopefully the net80211 state machine will
  call newstate() at some point, which will refiddle the LEDs.

I've tested this on a handful of 11n and pre-11n NICs. The blinking
behaviour is slightly more sensible now.
2011-12-26 06:25:12 +00:00
Adrian Chadd
2942e03f5c Update the hardware LED blinking code to do something useful rather than
relying on what the register defaults are.

This forces the blink mode to be proportional to the TX and RX frames
which match the RX filter.

This (along with a few tweaks to if_ath_led.c to configure the correct
GPIO pins) allows my DWA-552 AR5416 NIC to blink the LEDs in a useful
fashion, however those LEDs are marked "Link" and "Act(ivity)", which
don't really map well to the "power" / "network" LED interface which
the MAC provides. Some further tinkering is needed to see what other
useful operating modes are possible.
2011-12-26 06:07:21 +00:00
Adrian Chadd
6558ffd99a Refactor out the software LED config code into a common function, called
ath_led_config().

The eventual aim is to have both software and hardware based LED
configuration done here.
2011-12-26 05:46:22 +00:00
Adrian Chadd
c65ee21d46 First pass of LED related code changes.
Migrate the LED code out of if_ath.c and into if_ath_led.c.
These routines are _all_ software based LED blinking.
2011-12-26 05:37:09 +00:00
Adrian Chadd
7e97436b0e Do a quick style(9) pass of some of the code introduced with 802.11n
support.
2011-12-26 05:26:35 +00:00
Glen Barber
bd45f5676d Add missing opening and closing brackets in getopt_long.3 and getsubopt.3
to make the examples reflect reality more closely.

MFC after:	1 week
X-MFC-After:	9.0-RELEASE
2011-12-26 03:14:37 +00:00
Ed Schouten
5b7b8966c1 Add the C11 standard to groff. This allows us to refer to C11 as -isoC-11.
MFC after:	2 months
2011-12-25 22:05:33 +00:00
Ed Schouten
36893c3ded Make white space in this file a bit more consistent.
Remove trailing whitespace and place all macro definitions at the same
column.
2011-12-25 21:05:35 +00:00