]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUpgrade to 9.8.3-P1, the latest from ISC. This version contains
dougb [Mon, 4 Jun 2012 22:11:20 +0000 (22:11 +0000)]
Upgrade to 9.8.3-P1, the latest from ISC. This version contains
a critical bugfix:

  Processing of DNS resource records where the rdata field is zero length
  may cause various issues for the servers handling them.

  Processing of these records may lead to unexpected outcomes. Recursive
  servers may crash or disclose some portion of memory to the client.
  Secondary servers may crash on restart after transferring a zone
  containing these records. Master servers may corrupt zone data if the
  zone option "auto-dnssec" is set to "maintain". Other unexpected
  problems that are not listed here may also be encountered.

All BIND users are strongly encouraged to upgrade.

12 years agoMigrate the TX path to a taskqueue for now, until a better way of
adrian [Mon, 4 Jun 2012 22:01:12 +0000 (22:01 +0000)]
Migrate the TX path to a taskqueue for now, until a better way of
implementing parallel TX and TX/RX completion can be done without
simply abusing long-held locks.

Right now, multiple concurrent ath_start() entries can result in
frames being dequeued out of order.  Well, they're dequeued in order
fine, but if there's any preemption or race between CPUs between:

* removing the frame from the ifnet, and
* calling and runningath_tx_start(), until the frame is placed on a
  software or hardware TXQ

Then although dequeueing the frame is in-order, queueing it to the hardware
may be out of order.

This is solved in a lot of other drivers by just holding a TX lock over
a rather long period of time.  This lets them continue to direct dispatch
without races between dequeue and hardware queue.

Note to observers: if_transmit() doesn't necessarily solve this.
It removes the ifnet from the main path, but the same issue exists if
there's some intermediary queue (eg a bufring, which as an aside also
may pull in ifnet when you're using ALTQ.)

So, until I can sit down and code up a much better way of doing parallel
TX, I'm going to leave the TX path using a deferred taskqueue task.
What I will likely head towards is doing a direct dispatch to hardware
or software via if_transmit(), but it'll require some driver changes to
allow queues to be made without using the really large ath_buf / ath_desc
entries.

TODO:

* Look at how feasible it'll be to just do direct dispatch to
  ath_tx_start() from if_transmit(), avoiding doing _any_ intermediary
  serialisation into a global queue.  This may break ALTQ for example,
  so I have to be delicate.

* It's quite likely that I should break up ath_tx_start() so it
  deposits frames onto the software queues first, and then only fill
  in the 802.11 fields when it's being queued to the hardware.
  That will make the if_transmit() -> software queue path very
  quick and lightweight.

* This has some very bad behaviour when using ACPI and Cx states.
  I'll do some subsequent analysis using KTR and schedgraph and file
  a follow-up PR or two.

PR: kern/168649

12 years ago1) IEEE Std 1003.1-2008, "errno" section, is explicit that
ache [Mon, 4 Jun 2012 21:34:49 +0000 (21:34 +0000)]
1) IEEE Std 1003.1-2008, "errno" section, is explicit that

"The setting of errno after a successful call to a function is
unspecified unless the description of that function specifies that
errno shall not be modified."

However, free() in IEEE Std 1003.1-2008 does not mention its interaction
with errno, so MAY modify it after successful call
(it depends on particular free() implementation, OS-specific, etc.).

So, save errno across free() calls to make code portable and
POSIX-conformant.

2) Remove unused serrno assignment.

MFC after:      1 week

12 years agoThe loaddev environment variable is not modifiable once set, so it is not
marius [Mon, 4 Jun 2012 20:56:40 +0000 (20:56 +0000)]
The loaddev environment variable is not modifiable once set, so it is not
update for ZFS. It seems that this does not really affect anything except
the help command. Nevertheless, rearrange things so loaddev is set only
once in all cases in order to get it right.
Pointed out by: avg

MFC after: r235364

12 years agoThe workaround added in r151650 for handling firmwares that don't allow
marius [Mon, 4 Jun 2012 20:45:33 +0000 (20:45 +0000)]
The workaround added in r151650 for handling firmwares that don't allow
a single device to be opened multiple times concurrently unfortunately
isn't sufficient with ZFS. This is due to the fact, that ZFS may open
different partitions of a single device simultaneously. So the best we
can do in this case is to cache the lastly used device path and close
and open devices in ofwd_strategy() as needed.

PR: 165025
Submitted by: Gavin Mu
MFC after: 1 week

12 years agoFix build of aicasm when CC=clang. This was due to a side-effect of the
dim [Mon, 4 Jun 2012 20:36:11 +0000 (20:36 +0000)]
Fix build of aicasm when CC=clang.  This was due to a side-effect of the
EARLY_BUILD macro: the -Qunused-arguments flag isn't passed anymore when
building this particular program.  However, with clang 3.1 and -Werror,
such unused argument warnings are flagged as errors, causing buildkernel
to fail at this stage, due to the -nostdinc flag passed during linking.
Since the -nostdinc flag isn't actually needed, just remove it.

X-MFC-With: r236528

12 years agoAllow the -p argument to kdump to accept either a PID or a thread ID.
jhb [Mon, 4 Jun 2012 19:09:14 +0000 (19:09 +0000)]
Allow the -p argument to kdump to accept either a PID or a thread ID.

Submitted by: Dmitry Banschikov  d.banschikov hostcomm ru
MFC after: 1 week

12 years agoPlug more refcount leaks and possible NULL deref for interface
emax [Mon, 4 Jun 2012 18:43:51 +0000 (18:43 +0000)]
Plug more refcount leaks and possible NULL deref for interface
address list.

Submitted by: scottl@
MFC after: 3 days

12 years agoReplace the use of wall clock time with monotonically increasing
delphij [Mon, 4 Jun 2012 18:02:09 +0000 (18:02 +0000)]
Replace the use of wall clock time with monotonically increasing
clock.  In general, gettimeofday() is not appropriate interface
when accounting for elasped time because it can go backward, in
which case the policy code could errornously consider the limit
as exceeded.

MFC after: 1 week
Reported by: Mahesh Arumugam
Submitted by: Dorr H. Clark via gnn
Sponsored by: Citrix / NetScaler

12 years agoMake aicasm compile without warnings if -Wpointer-sign is enabled.
dim [Mon, 4 Jun 2012 17:22:43 +0000 (17:22 +0000)]
Make aicasm compile without warnings if -Wpointer-sign is enabled.

MFC after: 3 days

12 years agoIntegrate a fix for a very odd signal delivery problem found
gnn [Mon, 4 Jun 2012 16:15:40 +0000 (16:15 +0000)]
Integrate a fix for a very odd signal delivery problem found
by Bryan Cantril and others in the Solaris/Illumos version of DTrace.

Obtained from: https://www.illumos.org/issues/789
MFC after: 2 weeks

12 years agoFix DTrace TSC skew calculation:
zml [Mon, 4 Jun 2012 16:04:01 +0000 (16:04 +0000)]
Fix DTrace TSC skew calculation:

The skew calculation here is exactly backwards. We were able to repro
it on a multi-package ESX server running a FreeBSD VM, where the TSCs
can be pretty evil.

MFC after: 1 week

Submitted by: Jeff Ford <jeffrey.ford2@isilon.com>
Reviewed by: avg, gnn

12 years agoAdd myself as a new committer.
mjg [Mon, 4 Jun 2012 15:21:13 +0000 (15:21 +0000)]
Add myself as a new committer.

Approved by: trasz (mentor)

12 years agoMicrooptimisation of code from r236560, also coming from Nginx Inc.
glebius [Mon, 4 Jun 2012 14:18:13 +0000 (14:18 +0000)]
Microoptimisation of code from r236560, also coming from Nginx Inc.

Submitted by: ru

12 years agoOptimise kern_sendfile(): skip cycling through the entire mbuf chain in
glebius [Mon, 4 Jun 2012 12:49:21 +0000 (12:49 +0000)]
Optimise kern_sendfile(): skip cycling through the entire mbuf chain in
m_cat(), storing pointer to last mbuf in chain in local variable and
attaching new mbuf to the end of chain.

Submitter reports that CPU load dropped for > 10% on a web server
serving large files with this optimisation.

Submitted by: Sergey Budnevitch <sb nginx.com>

12 years agoFix panic introduced by r235745. Panic occurs after first packet traverse renamed...
melifaro [Mon, 4 Jun 2012 12:36:58 +0000 (12:36 +0000)]
Fix panic introduced by r235745. Panic occurs after first packet traverse renamed interface.
Add several comments on locking

Found by:         avg
Approved by:      ae(mentor)
Tested by:        avg
MFC after:        1 week

12 years agoAdd -p argument for `camcontrol debug` to allow enabling CAM_DEBUG_PROBE
mav [Mon, 4 Jun 2012 10:42:09 +0000 (10:42 +0000)]
Add -p argument for `camcontrol debug` to allow enabling CAM_DEBUG_PROBE
added at r208911.

12 years agoRemove some dead code that I doubt will ever be implemented.
mav [Mon, 4 Jun 2012 09:47:19 +0000 (09:47 +0000)]
Remove some dead code that I doubt will ever be implemented.

12 years agoDocument -r option in SYNOPSIS and usage statement.
trociny [Mon, 4 Jun 2012 09:25:01 +0000 (09:25 +0000)]
Document -r option in SYNOPSIS and usage statement.

Submitted by: Andrey Zonov <andrey zonov.org>
MFC after: 3 days

12 years agoOn a child exit, call waitpid(2) to clean up the process table.
trociny [Mon, 4 Jun 2012 09:22:22 +0000 (09:22 +0000)]
On a child exit, call waitpid(2) to clean up the process table.

Submitted by: Andrey Zonov <andrey zonov.org>
MFC after: 1 week

12 years agoRestore changes accidentally removed in r235537.
gber [Mon, 4 Jun 2012 08:40:14 +0000 (08:40 +0000)]
Restore changes accidentally removed in r235537.

Noticed by: avg

12 years agoEliminate the now-unused AT91C_MASTER_CLOCK option and change the one
imp [Mon, 4 Jun 2012 04:24:59 +0000 (04:24 +0000)]
Eliminate the now-unused AT91C_MASTER_CLOCK option and change the one
place in the source it was used to the more correct AT91C_MAIN_CLOCK.
Sort AT91C_MAIN_CLOCK into a better location in the options.arm file.

12 years agoVarious small changes to PV entry management:
alc [Mon, 4 Jun 2012 03:51:08 +0000 (03:51 +0000)]
Various small changes to PV entry management:

Constify pc_freemask[].

pmap_pv_reclaim()
  Eliminate "freemask" because it was a pessimization.  Add a comment about
  the resident count adjustment.

free_pv_entry() [i386 only]
  Merge an optimization from amd64 (r233954).

get_pv_entry()
  Eliminate the move to tail of the pv_chunk on the global pv_chunks list.
  (The right strategy needs more thought.  Moreover, there were unintended
  differences between the amd64 and i386 implementation.)

pmap_remove_pages()
  Eliminate unnecessary ()'s.

12 years agoDisable verification of the flashed content for now; for reasons unknown
marius [Sun, 3 Jun 2012 21:03:16 +0000 (21:03 +0000)]
Disable verification of the flashed content for now; for reasons unknown
it sometimes causes physwr to hang.

12 years agoDuring buildworld and buildkernel, define EARLY_BUILD in the earlier
dim [Sun, 3 Jun 2012 20:35:41 +0000 (20:35 +0000)]
During buildworld and buildkernel, define EARLY_BUILD in the earlier
stages (build-tools, cross-tools, etc) of the build, so we can detect in
bsd.*.mk whether to pass compiler-specific flags to ${CC}.

In particular, this commit will allow using WITH_CLANG_IS_CC when the
base compiler is still gcc, and when ${CC}, ${CXX} and ${CPP} are left
at their defaults.  The early stages will then be built using gcc, and
no clang-specific flags will be passed to it.  The later stages will be
built as usual.

The EARLY_BUILD define can also serve other uses, such as building the
world stage C++ executables with libc++ instead of libstdc++: during the
early build stages, we cannot assume libc++ is already available, so we
must still build with libstdc++ at that time.

MFC after: 1 week

12 years agoMinor rearrangement of the locore <-> initarm interface. Pass in a
imp [Sun, 3 Jun 2012 18:34:32 +0000 (18:34 +0000)]
Minor rearrangement of the locore <-> initarm interface.  Pass in a
structure with the first 4 registers to allow a wider range of boot
loaders to work.  Future commits will make use of this to centralize
support for the different loaders.

12 years agoRemove code which is not needed.
tuexen [Sun, 3 Jun 2012 18:14:57 +0000 (18:14 +0000)]
Remove code which is not needed.

MFC after: 3 days

12 years agoAdd a knob to disable vn_io_fault.
kib [Sun, 3 Jun 2012 16:19:37 +0000 (16:19 +0000)]
Add a knob to disable vn_io_fault.

MFC after: 1 month

12 years agoCount and export the number of prefaulting happen.
kib [Sun, 3 Jun 2012 16:06:56 +0000 (16:06 +0000)]
Count and export the number of prefaulting happen.

MFC after:  1 month

12 years agoUse an existing function to get the source address.
tuexen [Sun, 3 Jun 2012 14:54:50 +0000 (14:54 +0000)]
Use an existing function to get the source address.

MFC after: 3 days

12 years agoFix make depend
uqs [Sun, 3 Jun 2012 12:19:16 +0000 (12:19 +0000)]
Fix make depend

12 years agoMinor spelling fixes.
joel [Sun, 3 Jun 2012 11:29:48 +0000 (11:29 +0000)]
Minor spelling fixes.

12 years agoMinor mdoc improvements.
joel [Sun, 3 Jun 2012 11:09:51 +0000 (11:09 +0000)]
Minor mdoc improvements.

12 years agoSimplify the code by using snprlcat().
pjd [Sun, 3 Jun 2012 10:50:46 +0000 (10:50 +0000)]
Simplify the code by using snprlcat().

MFC after: 3 days

12 years agocpucontrol: use CPUCTL_UPDATE ioctl on correct file descriptor
avg [Sun, 3 Jun 2012 08:30:00 +0000 (08:30 +0000)]
cpucontrol: use CPUCTL_UPDATE ioctl on correct file descriptor

I guess that means that microcode update has never worked for AMD CPUs.
Please also note that only older AMD CPUs and micrcode file format are
supported anyway (pre 10h family).

MFC after: 1 week

12 years agofree wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG
avg [Sun, 3 Jun 2012 08:01:12 +0000 (08:01 +0000)]
free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG

Those calls are useful with hardware watchdog drivers too.

MFC after: 3 weeks

12 years agoMinor mdoc improvements.
joel [Sun, 3 Jun 2012 07:45:42 +0000 (07:45 +0000)]
Minor mdoc improvements.

12 years agoPlug reference leak.
emax [Sun, 3 Jun 2012 07:36:59 +0000 (07:36 +0000)]
Plug reference leak.

Interface routes are refcounted as packets move through the stack,
and there's garbage collection tied to it so that route changes can
safely propagate while traffic is flowing. In our setup, we weren't
changing or deleting any routes, but the refcounting logic in
ip6_input() was wrong and caused a reference leak on every inbound
V6 packet. This eventually caused a 32bit overflow, and the resulting
0 value caused the garbage collection to run on the active route.
That then snowballed into the panic.

Reviewed by: scottl
MFC after: 3 days

12 years agomdoc: add missing width argument to Bl -tag.
joel [Sun, 3 Jun 2012 06:57:47 +0000 (06:57 +0000)]
mdoc: add missing width argument to Bl -tag.

12 years agoRemove stray repeated line...
imp [Sun, 3 Jun 2012 05:36:25 +0000 (05:36 +0000)]
Remove stray repeated line...

12 years ago- Now that the DataFlash related drivers work properly (at91_spi(4) since
marius [Sun, 3 Jun 2012 01:07:55 +0000 (01:07 +0000)]
- Now that the DataFlash related drivers work properly (at91_spi(4) since
  r236495 and at45d(4) since r236496), enable them by default.
- Sort BOOTP options.

12 years ago- Loop up to 3 seconds when waiting for a device to get ready. [1]
marius [Sun, 3 Jun 2012 01:00:55 +0000 (01:00 +0000)]
- Loop up to 3 seconds when waiting for a device to get ready. [1]
- Make the device description match the driver name.
- Identify the chip variant based on the JEDEC and use that information
  to use the proper values for page count, offset and size instead of
  hardcoding a AT45DB642x with 2^N byte page support disabled.
- Take advantage of bioq_takefirst().
- Given that CONTINUOUS_ARRAY_READ_HF (0x0b) command isn't even mentioned
  in Atmel's DataFlash Application Note, as suggested by the previous
  comment may not work on all all devices and actually doesn't properly
  on at least AT45DB321D (JEDEC 0x1f2701), rewrite at45d_task() to use
  CONTINUOUS_ARRAY_READ (0xe8) for reading instead. This rewrite is laid
  out in a way allowing to easily add support for BIO_DELETE later on.
- Add support for reads and writes not starting on a page boundary.
- Verify the flash content after writing.
- Let at45d_task() gracefully handle errors on SPI transfers and the
  device not becoming ready afterwards again. [1]
- Use DEVMETHOD_END. [1]
- Use NULL instead of 0 for pointers. [1]

Additional testing by: Ian Lepore

Submitted by: Ian Lepore [1]
MFC after: 1 week

12 years ago- Prepend the device description with "AT91" to reflect its nature. [1]
marius [Sun, 3 Jun 2012 00:54:10 +0000 (00:54 +0000)]
- Prepend the device description with "AT91" to reflect its nature. [1]
- Move DMA tag and map creature to at91_spi_activate() where the other
  resource allocation also lives. [1]
- Flesh out at91_spi_deactivate(). [1]
- Work around the "Software Reset must be Written Twice" erratum.
- For now, run the bus at the slowest speed possible in order to work
  around data corruption on transit even seen with 9 MHz on ETHERNUT5
  (15 MHz maximum) and AT45DB321D (20 MHz maximum). This also serves as
  a poor man's work-around for the "NPCSx rises if no data data is to be
  transmitted" erratum of RM9200. Being able to use the appropriate bus
  speed would require:
  1) Adding a proper work-around for the RM9200 bug consisting of taking
     the chip select control away from the SPI peripheral and managing it
     directly as a GPIO line.
  2) Taking the maximum frequencies supported by the actual board and the
     slave devices into account and basing the whole thing on the master
     clock instead of hardcoding a divisor as previously done.
  3) Fixing the above mentioned data corruption.
- KASSERT that TX/RX command and data sizes match on transfers.
- Introduce a mutex ensuring that only one child device is running a SPI
  transfer at a time. [1]
- Add preliminary, #ifdef'ed out support for setting the chip select. [1]
- Use the RX instead of the TX commando size when setting up the RX side
  of a transfer.
- For controllers having SPI_SR_TXEMPTY, i.e. !RM9200, also wait for the
  completion of the TX part of transfers before stopping the whole thing
  again.
- Use DEVMETHOD_END. [1]
- Use NULL instead of 0 for pointers. [1, partially]

Additional testing by:  Ian Lepore

Submitted by:   Ian Lepore [1]
MFC after:      1 week

12 years agoIsolate the global pv list lock from data and other locks to prevent false
alc [Sat, 2 Jun 2012 22:14:10 +0000 (22:14 +0000)]
Isolate the global pv list lock from data and other locks to prevent false
sharing within the cache.

12 years agoHonor sysctl for TTL.
tuexen [Sat, 2 Jun 2012 21:22:26 +0000 (21:22 +0000)]
Honor sysctl for TTL.

MFC after: 3 days

12 years agoDon't request data from the IPv6 layer, which is not used.
tuexen [Sat, 2 Jun 2012 20:53:23 +0000 (20:53 +0000)]
Don't request data from the IPv6 layer, which is not used.

MFC after: 3 days

12 years agoAdd missing prototypes. While at it, sort them alphabetically.
marius [Sat, 2 Jun 2012 20:47:00 +0000 (20:47 +0000)]
Add missing prototypes. While at it, sort them alphabetically.

MFC after: 3 days

12 years agoRemove nitems() now that it lives in <sys/param.h> since r236486.
marius [Sat, 2 Jun 2012 20:00:52 +0000 (20:00 +0000)]
Remove nitems() now that it lives in <sys/param.h> since r236486.

12 years agoTake advantage of nitems().
marius [Sat, 2 Jun 2012 19:41:28 +0000 (19:41 +0000)]
Take advantage of nitems().

MFC after: 3 days

12 years agoFix typo [1]. Use commas to separate flag printouts, in style with
kib [Sat, 2 Jun 2012 19:39:12 +0000 (19:39 +0000)]
Fix typo [1]. Use commas to separate flag printouts, in style with
other parts of function.

Submitted by: bf [1]
MFC after:   1 week

12 years agoAdd nitems(), a macro for determining the number of elements in a
marius [Sat, 2 Jun 2012 19:30:49 +0000 (19:30 +0000)]
Add nitems(), a macro for determining the number of elements in a
statically-allocated array.

Obtained from: OpenBSD (in principle)
MFC after: 3 days

12 years agoUpdate the print mask for decoding b_flags. Add print masks for
kib [Sat, 2 Jun 2012 18:44:40 +0000 (18:44 +0000)]
Update the print mask for decoding b_flags. Add print masks for
b_vflags and b_xflags_t and print them as well.

MFC after:   1 week

12 years agoUse plain store for atomic_store_rel on x86, instead of implicitly
kib [Sat, 2 Jun 2012 18:10:16 +0000 (18:10 +0000)]
Use plain store for atomic_store_rel on x86, instead of implicitly
locked xchg instruction.  IA32 memory model guarantees that store has
release semantic, since stores cannot pass loads or stores.

Reviewed by:   bde, jhb
Tested by:   pho
MFC after:   2 weeks

12 years agoRemove an unused parameter.
tuexen [Sat, 2 Jun 2012 13:13:38 +0000 (13:13 +0000)]
Remove an unused parameter.

MFC after: 3 days

12 years agoInstall libcxxrt's C++ ABI and unwind headers. This is done in libc++'s
dim [Sat, 2 Jun 2012 11:07:19 +0000 (11:07 +0000)]
Install libcxxrt's C++ ABI and unwind headers.  This is done in libc++'s
Makefile, so these headers go into the same destination directory as
libc++'s own headers, currently /usr/include/c++/v1.

MFC after: 3 days

12 years agomdoc: minor Bl improvements.
joel [Sat, 2 Jun 2012 11:03:14 +0000 (11:03 +0000)]
mdoc: minor Bl improvements.

12 years agoTabify libcxxrt and libc++'s Makefiles.
dim [Sat, 2 Jun 2012 11:00:48 +0000 (11:00 +0000)]
Tabify libcxxrt and libc++'s Makefiles.

MFC after: 3 days

12 years agoRemove invalid remark about pipes.
ed [Sat, 2 Jun 2012 10:50:25 +0000 (10:50 +0000)]
Remove invalid remark about pipes.

The stat structures returned on pipes seems to contain all the
information required by POSIX. Especially the wording "and thus to a
pipe" makes little sense, because it seems to imply a certain
relationship between sockets and pipes that simply isn't there.

MFC after: 2 weeks

12 years agoAdd appropriate checks for ic_bsschan being set to IEEE80211_CHAN_ANYC in
hselasky [Sat, 2 Jun 2012 09:10:51 +0000 (09:10 +0000)]
Add appropriate checks for ic_bsschan being set to IEEE80211_CHAN_ANYC in
some of the USB WLAN drivers. This fixes a panic when using monitor mode.

MFC after: 1 week
Submitted by: PseudoCylon

12 years agomdoc: minor Bl improvements.
joel [Sat, 2 Jun 2012 08:47:26 +0000 (08:47 +0000)]
mdoc: minor Bl improvements.

12 years agoRewrite enabling NCQ for SATA devices in a way more alike to SCSI TCQ.
mav [Sat, 2 Jun 2012 08:29:07 +0000 (08:29 +0000)]
Rewrite enabling NCQ for SATA devices in a way more alike to SCSI TCQ.
This allows to control it with `camcontrol negotiate adaX -T (en|dis)able`
on the fly, same as for SCSI devices.

Sponsored by: iXsystems, Inc.

12 years agoDocument the limitations of the -delete primary
eadler [Sat, 2 Jun 2012 03:13:27 +0000 (03:13 +0000)]
Document the limitations of the -delete primary

PR: bin/166554
Submitted by: Richard Kettlewell <rjk@greenend.org.uk>
Discussed with: jilles
Approved by: bcr
MFC after: 3 days

12 years agoClean up and complete the incomplete deferred enable code.
mjacob [Fri, 1 Jun 2012 23:29:48 +0000 (23:29 +0000)]
Clean up and complete the incomplete deferred enable code.
Make the default role NONE if target mode is selected. This
allows ctl(8) to switch to/from target mode via knob settings.
If we default to role 'none', this causes a reset of the
24XX f/w which then causes initiators to wake up and notice
when we come online.

Reviewed by:    kdm
MFC after:      2 weeks
Sponsored by:   Spectralogic

12 years agoPrint FC PortID as a hex number. This makes it easy to
mjacob [Fri, 1 Jun 2012 23:24:56 +0000 (23:24 +0000)]
Print FC PortID as a hex number. This makes it easy to
figure out domain, etc..

Zero ATIO and INOTify allocations. It makes for much
less guesswork when looking at the structure and
seeing 'deadc0de' present.

Reviewed by: kdm
MFC after: 2 weeks
Sponsored by: Spectralogic

12 years agoConsistently use ACPI_SUCCESS() and ACPI_FAILURE() macros wherever possible.
jkim [Fri, 1 Jun 2012 21:33:33 +0000 (21:33 +0000)]
Consistently use ACPI_SUCCESS() and ACPI_FAILURE() macros wherever possible.

12 years agoCentralize the specification of the krb5 build tools.
obrien [Fri, 1 Jun 2012 21:26:28 +0000 (21:26 +0000)]
Centralize the specification of the krb5 build tools.

12 years agomdoc: terminate quoted string and remove unneeded paragraph macro.
joel [Fri, 1 Jun 2012 19:26:38 +0000 (19:26 +0000)]
mdoc: terminate quoted string and remove unneeded paragraph macro.

12 years agoTidy up code clutter in SMP case a bit. No functional change.
jkim [Fri, 1 Jun 2012 19:19:04 +0000 (19:19 +0000)]
Tidy up code clutter in SMP case a bit.  No functional change.

12 years agoDoh! Bump the date as I touched it!
sbruno [Fri, 1 Jun 2012 19:09:17 +0000 (19:09 +0000)]
Doh!  Bump the date as I touched it!

Noted by: gjb@
MFC after: 3 days

12 years agoRevert r236380
eadler [Fri, 1 Jun 2012 18:58:50 +0000 (18:58 +0000)]
Revert r236380

PR: kern/166780
Requested by: many
Approved by: cperciva (implicit)

12 years agoAdd a new -e flag to pciconf(8)'s list mode to display PCI error details.
jhb [Fri, 1 Jun 2012 18:33:40 +0000 (18:33 +0000)]
Add a new -e flag to pciconf(8)'s list mode to display PCI error details.
Currently this dumps the status of any error bits in the PCI status register
and PCI-express device status register.  It also lists any errors indicated
by version 1 of PCI-express Advanced Error Reporting (AER).

MFC after: 1 week

12 years agoCall AcpiSetFirmwareWakingVector() with interrupt disabled for consistency.
jkim [Fri, 1 Jun 2012 18:18:48 +0000 (18:18 +0000)]
Call AcpiSetFirmwareWakingVector() with interrupt disabled for consistency.

12 years agoAdd notes and information for exposed tuneables in bce(4).
sbruno [Fri, 1 Jun 2012 18:01:51 +0000 (18:01 +0000)]
Add notes and information for exposed tuneables in bce(4).
Add source of documentation for this driver.

Thanks to Warren Block for the suggestions for readability.

Note that strict_rx_mtu in inverted in stable/7/8/9 and is
named loose_rx_mtu.  Ensure that this is converted over when MFC'd

hw.bce.rx_ticks
hw.bce.rx_ticks_int
hw.bce.rx_quick_cons_trip
hw.bce.rx_quick_cons_trip_int
hw.bce.tx_ticks
hw.bce.tx_ticks_int
hw.bce.tx_quick_cons_trip
hw.bce.tx_quick_cons_trip_int
hw.bce.strict_rx_mtu
hw.bce.hdr_split
hw.bce.tx_pages
hw.bce.rx_pages
hw.bce.tso_enable
hw.bce.verbose

Reviewed by:  Warren Block <wblock@wonkity.com>
MFC after: 3 days

12 years agoImprove style(9) in the previous commit.
jkim [Fri, 1 Jun 2012 17:07:52 +0000 (17:07 +0000)]
Improve style(9) in the previous commit.

12 years agoExecute AcpiLeaveSleepStatePrep() for S1 and reduce code duplication.
jkim [Fri, 1 Jun 2012 17:00:33 +0000 (17:00 +0000)]
Execute AcpiLeaveSleepStatePrep() for S1 and reduce code duplication.

MFC after: 3 days

12 years agoImprove support for detaching kernel drivers on a per interface basis.
hselasky [Fri, 1 Jun 2012 16:30:54 +0000 (16:30 +0000)]
Improve support for detaching kernel drivers on a per interface basis.

MFC after: 1 week

12 years agoCommit a portion of 233708 I missed earlier and don't include the
jhb [Fri, 1 Jun 2012 15:52:41 +0000 (15:52 +0000)]
Commit a portion of 233708 I missed earlier and don't include the
definition of igb_start() and igb_start_locked() (nor set if_start in
the ifnet) when igb(4) uses if_transmit.

12 years agoRemove unnecessary initializations. The BSS of boot2 is in fact
jhb [Fri, 1 Jun 2012 15:48:24 +0000 (15:48 +0000)]
Remove unnecessary initializations.  The BSS of boot2 is in fact
zero'd when boot2 begins execution by the _start() routine in btxcsu.S.

MFC after: 1 week

12 years agoExtend VERBOSE_SYSINIT to also print out the name of variables passed
jhb [Fri, 1 Jun 2012 15:42:37 +0000 (15:42 +0000)]
Extend VERBOSE_SYSINIT to also print out the name of variables passed
to SYSINIT routines if they can be resolved via symbol look up in DDB.
To avoid false positives, only honor a name if the symbol resolves
exactly to the pointer value (no offset).

MFC after: 1 week

12 years agoCall AcpiLeaveSleepStatePrep() in interrupt disabled context
iwasaki [Fri, 1 Jun 2012 15:26:32 +0000 (15:26 +0000)]
Call AcpiLeaveSleepStatePrep() in interrupt disabled context
(described in ACPICA source code).

- Move intr_disable() and intr_restore() from acpi_wakeup.c to acpi.c
  and call AcpiLeaveSleepStatePrep() in interrupt disabled context.
- Add acpi_wakeup_machdep() to execute wakeup MD procedures and call
  it twice in interrupt disabled/enabled context (ia64 version is
  just dummy).
- Rename wakeup_cpus variable in acpi_sleep_machdep() to suspcpus in
  order to be shared by acpi_sleep_machdep() and acpi_wakeup_machdep().
- Move identity mapping related code to acpi_install_wakeup_handler()
  (i386 version) for preparation of x86/acpica/acpi_wakeup.c
  (MFC candidate).

Reviewed by: jkim@
MFC after: 2 days

12 years agoStyle(9) improvements: remove unnecessary parenthesis, improve order
ghelmer [Fri, 1 Jun 2012 15:02:23 +0000 (15:02 +0000)]
Style(9) improvements: remove unnecessary parenthesis, improve order
of local variable declarations, remove bogus casts, and resolve long
lines.

Reviewed by: bde

12 years agoMake TCP LRO work properly with VIMAGE kernels rather than just panicing.
bz [Fri, 1 Jun 2012 11:42:50 +0000 (11:42 +0000)]
Make TCP LRO work properly with VIMAGE kernels rather than just panicing.
There's no VIMAGE context set there yet as this is before if_ethersubr.c.

MFC after: 3 days
X-MFC with: r235981

12 years agoUse AC_GETDEV_CHANGED async to notify ada driver about DMA and NCQ status
mav [Fri, 1 Jun 2012 09:32:37 +0000 (09:32 +0000)]
Use AC_GETDEV_CHANGED async to notify ada driver about DMA and NCQ status
change. Now that allows switching between PIO and DMA modes on the fly.

12 years agoAdd myself as a new committer.
jase [Fri, 1 Jun 2012 08:44:17 +0000 (08:44 +0000)]
Add myself as a new committer.

Approved by: flo, culot (mentors)

12 years agoSmall cleanups. No functional change.
tuexen [Fri, 1 Jun 2012 08:26:50 +0000 (08:26 +0000)]
Small cleanups. No functional change.

MFC after: 3 days

12 years agoMake devd build with libc++.
dim [Fri, 1 Jun 2012 06:56:35 +0000 (06:56 +0000)]
Make devd build with libc++.

MFC after: 3 days

12 years agoFix dangling else in libc++'s __bit_reference header. This has also
dim [Fri, 1 Jun 2012 06:55:01 +0000 (06:55 +0000)]
Fix dangling else in libc++'s __bit_reference header.  This has also
been sent upstream.

MFC after: 3 days

12 years agoPull in r155978 from upstream llvm trunk:
dim [Fri, 1 Jun 2012 06:50:37 +0000 (06:50 +0000)]
Pull in r155978 from upstream llvm trunk:

  Fix unintentional use of operator bool.

This enables llvm's bugpoint tool to build with libc++.

MFC after: 3 days

12 years agoAdd a missing #include, required for IEEE80211_DEBUG.
adrian [Fri, 1 Jun 2012 06:20:39 +0000 (06:20 +0000)]
Add a missing #include, required for IEEE80211_DEBUG.

12 years agoAdd sysctl to query amount of swap space free
eadler [Fri, 1 Jun 2012 04:42:52 +0000 (04:42 +0000)]
Add sysctl to query amount of swap space free

PR: kern/166780
Submitted by: Radim Kolar <hsn@sendmail.cz>
Approved by: cperciva
MFC after: 1 week

12 years agoAdding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.
eadler [Fri, 1 Jun 2012 04:34:49 +0000 (04:34 +0000)]
Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.

PR: kern/166239
Submitted by: Pavel Timofeev <timp87@gmail.com>
Discussed on: -stable, -scsi
Reviewed by: scottl
No objection from: mjacob
Approved by: cperciva
MFC after: 3 days

12 years agoEliminate code duplication in free_pv_entry() and pmap_remove_pages() by
alc [Fri, 1 Jun 2012 04:26:50 +0000 (04:26 +0000)]
Eliminate code duplication in free_pv_entry() and pmap_remove_pages() by
introducing free_pv_chunk().

12 years agoFix warning generated by clang;
eadler [Fri, 1 Jun 2012 04:23:20 +0000 (04:23 +0000)]
Fix warning generated by clang;
warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]

Reported by: arundel
Reviewed by: gnn
Approved by: cperciva
MFC after: 3 days

12 years agoAdd characters mapping for codepages used in Germany.
eadler [Fri, 1 Jun 2012 03:59:08 +0000 (03:59 +0000)]
Add characters mapping for codepages used in Germany.

(not verified by me to be accurate)

PR: bin/163847
Submitted by: Gabor Fischer <Gabor.Fischer@gmx.net>
Reviewed by: bp
Approved by: cperciva
MFC after: 3 weeks

12 years agopmap_alloc_vhpt() doesn't need the pages that it allocates to be mapped
alc [Fri, 1 Jun 2012 03:56:12 +0000 (03:56 +0000)]
pmap_alloc_vhpt() doesn't need the pages that it allocates to be mapped
into the kernel map, so vm_page_alloc_contig() can be used in place of
contigmalloc().

Reviewed by: marcel

12 years agoRevert debug and other immature code accidentally committed in r236372.
imp [Fri, 1 Jun 2012 03:00:36 +0000 (03:00 +0000)]
Revert debug and other immature code accidentally committed in r236372.

12 years agoInitialize the clocks before we call cninit() so that the serial
imp [Fri, 1 Jun 2012 02:55:42 +0000 (02:55 +0000)]
Initialize the clocks before we call cninit() so that the serial
console so initialized will work upon return from cninit.  While this
is the very next line, other platforms setup all this stuff before
calling cninit.  Also, initialize the SDRAM base register in the inner
block in at91_ramsize().

12 years agoRemove unnecessary device_printfs.
yongari [Thu, 31 May 2012 23:56:10 +0000 (23:56 +0000)]
Remove unnecessary device_printfs.

Pointed out by: marius

12 years agoUpdate date for r236338 & r236346.
obrien [Thu, 31 May 2012 20:13:44 +0000 (20:13 +0000)]
Update date for r236338 & r236346.

12 years agoCorrect table counter functionality to not panic.
eri [Thu, 31 May 2012 20:10:05 +0000 (20:10 +0000)]
Correct table counter functionality to not  panic.
This was caused by not proper initialization of necessary parameters.

PR: 168200
Reviewed by: bz@, glebius@
MFC after: 1 week