]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMove major includes into /usr/share/bsdconfig for easy external access.
dteske [Tue, 18 Sep 2012 22:28:42 +0000 (22:28 +0000)]
Move major includes into /usr/share/bsdconfig for easy external access.

Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)

11 years agoAdd entries for two USB devices I have locally.
gavin [Tue, 18 Sep 2012 22:25:49 +0000 (22:25 +0000)]
Add entries for two USB devices I have locally.

MFC after: 1 week

11 years agoif a file in plist starts with / then do not prefix it with "prefix" [1]
bapt [Tue, 18 Sep 2012 22:09:23 +0000 (22:09 +0000)]
if a file in plist starts with / then do not prefix it with "prefix" [1]
pkg info -g returns 1 if a file mismatch [2]
flush stdout in pkg info -g [3]
clean up quiet mode (-q | --quiet) output of pkg_version(1) [4]
fix missing error call in uname check added to pkg_version(1) [5]
fix pkg_add(1) fails to install with -C from bad path [6]
only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7]

PR: bin/13128 [1]
bin/139015 [2]
bin/113702 [3]
bin/142570 [4]
bin/146857 [5]
bin/157543 [6]
Submitted by: cy [1]
Anton Yuzhaninov <citrin@citrin.ru> [2]
Ighighi <ighighi@gmail.com> [3]
"N.J. Mann" <njm@njm.me.uk> [4]
gcooper [5]
David Naylor <naylor.b.david@gmail.com> [6]
netchild [7]
MFC after: 2 weeks

11 years agoAlign the PCI Express #defines with the style used for the PCI-X
gavin [Tue, 18 Sep 2012 22:04:59 +0000 (22:04 +0000)]
Align the PCI Express #defines with the style used for the PCI-X
#defines.  This also has the advantage that it makes the names more
compact, iand also allows us to correct the non-uniform naming of
the PCIM_LINK_* defines, making them all consistent amongst themselves.

This is a mostly mechanical rename:
  s/PCIR_EXPRESS_/PCIER_/g
  s/PCIM_EXP_/PCIEM_/g
  s/PCIM_LINK_/PCIEM_LINK_/g

When this is MFC'd, #defines will be added for the old names to assist
out-of-tree drivers.

Discussed with: jhb
MFC after: 1 week

11 years agoOops - take a copy of ath_tx_status from the buffer before the TX processing
adrian [Tue, 18 Sep 2012 20:33:04 +0000 (20:33 +0000)]
Oops - take a copy of ath_tx_status from the buffer before the TX processing
is done.

The aggregate path was definitely accessing 'ts' before it was actually
being assigned.

This had the side effect of over-filtering frames, since occasionally that
bit would be '1'.

Whilst here, do the same thing in the non-aggregate completion function -
as calling the filter function may also invalidate bf.

Pointy hat to: adrian, for not noticing this over many, many code reviews.

11 years agoIf caller specifies UMA_ZONE_OFFPAGE explicitly, then do not waste memory
glebius [Tue, 18 Sep 2012 20:28:55 +0000 (20:28 +0000)]
If caller specifies UMA_ZONE_OFFPAGE explicitly, then do not waste memory
in an allocation for a slab.

Reviewed by: jeff

11 years agoAdd #if 0 around nvme_async_event_cb() until NVMe AER functionality
jimharris [Tue, 18 Sep 2012 18:23:21 +0000 (18:23 +0000)]
Add #if 0 around nvme_async_event_cb() until NVMe AER functionality
can be tested.

This fixes a build warning found only with clang.

11 years agoAdd __aligned(4) to NVMe defined data structures.
jimharris [Tue, 18 Sep 2012 18:16:52 +0000 (18:16 +0000)]
Add __aligned(4) to NVMe defined data structures.

This fixes issue in nvmecontrol(8), where clang throws a cast-align
warning when casting a __packed structure pointer to a uint32_t
pointer as part of printing raw hex output.

Reported by: dhw

11 years agoFix grammar in the portion about FIBs. Also, cross-reference
bjk [Tue, 18 Sep 2012 16:00:44 +0000 (16:00 +0000)]
Fix grammar in the portion about FIBs.  Also, cross-reference
setfib(2) instead of setfib(1) for the 16-FIB limit.

PR: docs/157452
Approved by: hrs (mentor)

11 years agoFix panics on attempt to dereference uninitizlized pointer, returned via
mav [Tue, 18 Sep 2012 15:38:42 +0000 (15:38 +0000)]
Fix panics on attempt to dereference uninitizlized pointer, returned via
'path' argument of ofw_parsedev() if devspec refers raw device with no path.

For example, `ls /pci@1f,0/ide@d/disk@0,0:a/` works fine, while
`ls /pci@1f,0/ide@d/disk@0,0:a` panicked before this change.

11 years agohwpmc amd_pcpu_fini: fix a bug in code locked under DEBUG
avg [Tue, 18 Sep 2012 13:33:39 +0000 (13:33 +0000)]
hwpmc amd_pcpu_fini: fix a bug in code locked under DEBUG

MFC after: 16 days

11 years ago- Bump date.
zont [Tue, 18 Sep 2012 13:24:14 +0000 (13:24 +0000)]
- Bump date.

Submitted by: pluknet
Approved by: kib (mentor)
X-MFC-With: r240645

11 years agoDo more than r236298 did in the projects/pf branch: use M_NOWAIT in
glebius [Tue, 18 Sep 2012 12:34:35 +0000 (12:34 +0000)]
Do more than r236298 did in the projects/pf branch: use M_NOWAIT in
altq_add() and its descendants. Currently altq(4) in FreeBSD is configured
via pf(4) ioctls, which can't configure altq(4) w/o holding locks.
Fortunately, altq(4) code in spife of using M_WAITOK is ready to receive
NULL from malloc(9), so change is mostly mechanical. While here, utilize
M_ZERO instead of bzero().

A large redesign needed to achieve M_WAITOK usage when configuring altq(4).
Or an alternative (not pf(4)) configuration interface should be implemented.

Reported by: pluknet

11 years ago- Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively.
zont [Tue, 18 Sep 2012 12:25:14 +0000 (12:25 +0000)]
- Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively.

Approved by: kib (mentor)
MFC after: 1 week

11 years agoFix build, pass the pointy hat please.
glebius [Tue, 18 Sep 2012 12:21:32 +0000 (12:21 +0000)]
Fix build, pass the pointy hat please.

11 years agoProvide kernel compile time option to make pf(4) default rule to drop.
glebius [Tue, 18 Sep 2012 11:07:19 +0000 (11:07 +0000)]
Provide kernel compile time option to make pf(4) default rule to drop.

This is important to secure a small timeframe at boot time, when
network is already configured, but pf(4) is not yet.

PR: kern/171622
Submitted by: Olivier Cochard-LabbИ <olivier cochard.me>

11 years agoMake ruleset anchors in pf(4) reentrant. We've got two problems here:
glebius [Tue, 18 Sep 2012 10:54:56 +0000 (10:54 +0000)]
Make ruleset anchors in pf(4) reentrant. We've got two problems here:

1) Ruleset parser uses a global variable for anchor stack.
2) When processing a wildcard anchor, matching anchors are marked.

To fix the first one:

o Allocate anchor processing stack on stack. To make this allocation
  as small as possible, following measures taken:
  - Maximum stack size reduced from 64 to 32.
  - The struct pf_anchor_stackframe trimmed by one pointer - parent.
    We can always obtain the parent via the rule pointer.
  - When pf_test_rule() calls pf_get_translation(), the former lends
    its stack to the latter, to avoid recursive allocation 32 entries.

The second one appeared more tricky. The code, that marks anchors was
added in OpenBSD rev. 1.516 of pf.c. According to commit log, the idea
is to enable the "quick" keyword on an anchor rule. The feature isn't
documented anywhere. The most obscure part of the 1.516 was that code
examines the "match" mark on a just processed child, which couldn't be
put here by current frame. Since this wasn't documented even in the
commit message and functionality of this is not clear to me, I decided
to drop this examination for now. The rest of 1.516 is redone in a
thread safe manner - the mark isn't put on the anchor itself, but on
current stack frame. To avoid growing stack frame, we utilize LSB
from the rule pointer, relying on kernel malloc(9) returning pointer
aligned addresses.

Discussed with: dhartmei

11 years ago- Add $FreeBSD$ to allow modifications to this file.
glebius [Tue, 18 Sep 2012 10:52:46 +0000 (10:52 +0000)]
- Add $FreeBSD$ to allow modifications to this file.
- Move $OpenBSD$ to a more standard place.

11 years agoImplement my first cut at filtered frames in aggregation sessions.
adrian [Tue, 18 Sep 2012 10:14:17 +0000 (10:14 +0000)]
Implement my first cut at filtered frames in aggregation sessions.

The hardware can optionally "filter" frames if successive transmissions
to a given node (ie, "entry in the keycache") fail.  That way the hardware
can implement a kind of early abort of all the other frames queued to
that destination, rather than simply trying to TX each frame to that
destination (and failing.)

The background:

* If a frame comes back as being filtered, the hardware didn't try to
  TX it (or it was outside the TX burst opportunity.) So, take it as a hint
  that some (but not all, see below) frames to the destination may be
  filtered.

* If the CLRDMASK bit is set in a TX descriptor, the "filter to this
  destination" bit in the keycache entry is cleared and TX to that host
  will be unconditionally retried.

* Right now everything has the CLRDMASK bit set, so filtered frames
  tend to be aggregates and frames that fall outside of the WME burst
  window. It was a bit worse in the past as I had messed up the TX
  flags and CLRDMASK wasn't being set on aggregate frames.

The annoying bits:

* It's easy (ish) to do for aggregate session frames - firstly, they
  can be retried in any order as long as they're within the BAW, and
  there's already a bunch of infrastructure tracking how many frames
  the TID has queued to the hardware (tid->hwq_depth.) However, for
  frames that bypassed the software queue, hwq_depth doesn't get
  incremented. I'll fix that in a subsequent commit.

* For non-aggregate session frames, the only retries that can occur
  are ones for sequence numbers that hvaen't successfully been TXed yet.
  Since there's no re-ordering going on in non-aggregate sessions, if any
  subsequent seqno frames make it out, any filtered frames before that
  seqno need to be dropped.

  Hence why this initially is just for aggregate session frames.

* Since there may be intermediary frames to the destination that
  have CLRDMASK set - for example, any directly dispatched management
  frames to that destination - it's possible that there will be some
  filtered frames followed up by some non filtered frames.  Thus,
  it can't be assumed that once you see a filtered frame for the given
  destination node, all subsequent frames for all TIDs will be filtered.

Ok, with that in mind:

* Create a per-TID filtered frame queue for frames that the hardware
  returns as filtered.

* Track filtered frames per-tid, rather than per-node.  It just makes
  the locking much easier.

* When a filtered frame appears in the completion function, the node
  transitions to "filtered", and all subsequent completed error frames
  (filtered or otherwise) are put on the filtered frame queue.  The TID
  is paused once (during the transition from non-filtered to filtered).

* If a filtered frame retry count exceeds SWMAX_RETRIES, a BAR should be
  sent.

* Once all the frames queued to the hardware for the given filtered frame
  TID, transition back from filtered frame to non-filtered frame, which
  means pre-pending all the filtered frames onto the head of the software
  queue, clearing the filtered frame state and unpausing the TID.

Things get quite hairy around handling completion (aggr, non-aggr, norm,
direct-dispatched frames to a hardware queue); whether it's an "error",
"cleanup" or "BAR" state as well as filtered, which order to do things
in (eg do filtered BEFORE checking for BAR, as the filter completion
may be needed to actually transmit a BAR frame.)

This work has definitely reminded me that I have to tidy up all the locking
and remove some of the ridiculous lock/unlock/lock/unlock going on in the
completion functions.

It's also reminded me that I should really split out TID versus hardware TXQ
locking, even if the underlying locking is still the destination hardware TXQ.

Finally, this is all pre-requisite for working on AP mode power save support
(PS-POLL, uAPSD) as well as improving performance to misbehaving nodes (as
they can transition into filter mode, stopping any TX until everything has
caught up.)

Finally (ish) - this should also be done for non-aggregate sessions as
there are still plenty of laptops and mobile devices that don't speak
802.11n but do wish for stable, useful power save AP support where packets
aren't simply dropped.  This requires software retransmission for
non-aggregate sessions to be implemented, which includes the caveats I've
mentioned above.

Finally finally - this doesn't yet do anything about the CLRDMASK bit in the
TX descriptor.  That's still unconditionally set to 1.  I'll debug the
current work (mostly ensuring I haven't busted up the hairy transitions
between BAR, filtered, error (all frames in an aggregate failing) and
cleanup (when transitioning from aggregation -> non-aggregation.))

Finally finally finally - this is all original work by yours truely, rather
than ported from the Atheros internal driver codebase or Linux ath9k.

Tested:
 * AR9280, AR5416 in STA mode
 * AR9280, AR9130 in hostap mode
 * Lots and lots of iperf testing in very marginal and non-marginal conditions,
   complete with inducing filtered frames + BAR TX conditions.

11 years agoFix DIOCNATLOOK: zero key padding before performing lookup.
glebius [Tue, 18 Sep 2012 09:15:32 +0000 (09:15 +0000)]
Fix DIOCNATLOOK: zero key padding before performing lookup.

11 years agoloader/i386: replace ugly inb/outb re-implementations with cpufunc.h
avg [Tue, 18 Sep 2012 08:53:11 +0000 (08:53 +0000)]
loader/i386: replace ugly inb/outb re-implementations with cpufunc.h

Use of __builtin_constant_p in a function that is only called via
a pointer is a good example of how out-of-date it was.

Suggested by: bde
MFC after: 1 week

11 years agoacpi_cpu: explicitly notify userland about c-state changes
avg [Tue, 18 Sep 2012 08:17:29 +0000 (08:17 +0000)]
acpi_cpu: explicitly notify userland about c-state changes

... after they are committed.
A notification is sent per CPU.

Reviewed by: imp
MFC after: 3 weeks

11 years agomdoc: remove superfluous paragraph macro.
joel [Tue, 18 Sep 2012 08:12:28 +0000 (08:12 +0000)]
mdoc: remove superfluous paragraph macro.

11 years agozfs: correctly calculate dn_bonuslen for saving SAs to disk
avg [Tue, 18 Sep 2012 08:02:54 +0000 (08:02 +0000)]
zfs: correctly calculate dn_bonuslen for saving SAs to disk

Since all attribute values start at 8-byte aligned boundary, we would
previously incorrectly calculate dn_bonuslen if any attribute but the
last had a variable-length value with length not multiple of 8.

Reported by: Nicolas Rachinsky <fbsd-mas-0@ml.turing-complete.org>
Tested by: Nicolas Rachinsky <fbsd-mas-0@ml.turing-complete.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com> (for upstream)
MFC after: 2 weeks

11 years agozfs: allow both DEBUG and ZFS_DEBUG to be defined on command line
avg [Tue, 18 Sep 2012 08:00:56 +0000 (08:00 +0000)]
zfs: allow both DEBUG and ZFS_DEBUG to be defined on command line

Discussed with: pjd
MFC after: 10 days

11 years agoAdd missing break
kevlo [Tue, 18 Sep 2012 08:00:43 +0000 (08:00 +0000)]
Add missing break

11 years agog_disk_flushcache definitely should not be traced under G_T_TOPOLOGY
avg [Tue, 18 Sep 2012 07:57:34 +0000 (07:57 +0000)]
g_disk_flushcache definitely should not be traced under G_T_TOPOLOGY

... use G_T_BIO instead

MFC after: 1 week

11 years agoWhitespace cleanup for ipfw.8 -- start each sentence on a new line,
bjk [Tue, 18 Sep 2012 02:33:23 +0000 (02:33 +0000)]
Whitespace cleanup for ipfw.8 -- start each sentence on a new line,
and put a comma after e.g. and i.e..  While here, wrap long lines.

PR: docs/157452
Approved by: hrs (mentor)

11 years agoRemove bogus break statements.
kevlo [Tue, 18 Sep 2012 02:19:43 +0000 (02:19 +0000)]
Remove bogus break statements.

Obtained from: DragonFly

11 years agoAdd a couple of accessor inline functions for state that exists in net80211.
adrian [Tue, 18 Sep 2012 01:27:24 +0000 (01:27 +0000)]
Add a couple of accessor inline functions for state that exists in net80211.

Obtained from: Qualcomm Atheros

11 years agoRemove namespace pollution in _rmlock.h by defining rm_queue structure
attilio [Tue, 18 Sep 2012 00:43:15 +0000 (00:43 +0000)]
Remove namespace pollution in _rmlock.h by defining rm_queue structure
directly in _rmlock.h and then including it (and its dependencies)
in pcpu.h. This leads to few _*.h headers to be included in pcpu.h
but this is not considered a big deal.

Really pc_rm_queue should be implemented as a dynamic member with
DPCPU interface, but we really want to keep the read acquisition as
fast as possible, so even the further pc_dynamic indirection should be
avoided, and the pollution is dealt like this.

Discussed with: jhb
MFC after: 1 week

11 years agoRename AH_MIMO_MAX_CHAINS to AH_MAX_CHAINS, for compatibility with
adrian [Mon, 17 Sep 2012 23:24:45 +0000 (23:24 +0000)]
Rename AH_MIMO_MAX_CHAINS to AH_MAX_CHAINS, for compatibility with
internal atheros HAL code.

11 years agoyes(1) actually comes from V7.
obrien [Mon, 17 Sep 2012 23:04:15 +0000 (23:04 +0000)]
yes(1) actually comes from V7.

Submitted by: Simon Gerraty <sjg@juniper.net>

11 years agoIntegrate nvmecontrol(8) into the amd64 and i386 builds.
jimharris [Mon, 17 Sep 2012 21:41:38 +0000 (21:41 +0000)]
Integrate nvmecontrol(8) into the amd64 and i386 builds.

This includes adding NVMe header files to /usr/include/dev/nvme.

Sponsored by:  Intel

11 years agoAdd nvmecontrol(8) source code and beginnings of a man page to the tree.
jimharris [Mon, 17 Sep 2012 21:26:55 +0000 (21:26 +0000)]
Add nvmecontrol(8) source code and beginnings of a man page to the tree.

Sponsored by: Intel
Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com>

11 years agoAdd nvme(4) and nvd(4) Makefiles to the tree.
jimharris [Mon, 17 Sep 2012 19:58:02 +0000 (19:58 +0000)]
Add nvme(4) and nvd(4) Makefiles to the tree.

Noticed by: pluknet
Pointy-hat to:  jimharris

11 years agoIntegrate nvme(4) and nvd(4) into the amd64 and i386 builds.
jimharris [Mon, 17 Sep 2012 19:26:33 +0000 (19:26 +0000)]
Integrate nvme(4) and nvd(4) into the amd64 and i386 builds.

Sponsored by: Intel

11 years agoThis is the first of several commits which will add NVM Express (NVMe)
jimharris [Mon, 17 Sep 2012 19:23:01 +0000 (19:23 +0000)]
This is the first of several commits which will add NVM Express (NVMe)
support to FreeBSD.  A full description of the overall functionality
being added is below.  nvmexpress.org defines NVM Express as "an optimized
register interface, command set and feature set fo PCI Express (PCIe)-based
Solid-State Drives (SSDs)."

This commit adds nvme(4) and nvd(4) driver source code and Makefiles
to the tree.

Full NVMe functionality description:
Add nvme(4) and nvd(4) drivers and nvmecontrol(8) for NVM Express (NVMe)
device support.

There will continue to be ongoing work on NVM Express support, but there
is more than enough to allow for evaluation of pre-production NVM Express
devices as well as soliciting feedback.  Questions and feedback are welcome.

nvme(4) implements NVMe hardware abstraction and is a provider of NVMe
namespaces.  The closest equivalent of an NVMe namespace is a SCSI LUN.
nvd(4) is an NVMe consumer, surfacing NVMe namespaces as GEOM disks.
nvmecontrol(8) is used for NVMe configuration and management.

The following are currently supported:
nvme(4)
- full mandatory NVM command set support
- per-CPU IO queues (enabled by default but configurable)
- per-queue sysctls for statistics and full command/completion queue
     dumps for debugging
- registration API for NVMe namespace consumers
- I/O error handling (except for timeoutsee below)
- compilation switches for support back to stable-7

nvd(4)
- BIO_DELETE and BIO_FLUSH (if supported by controller)
- proper BIO_ORDERED handling

nvmecontrol(8)
- devlist: list NVMe controllers and their namespaces
- identify: display controller or namespace identify data in
      human-readable or hex format
- perftest: quick and dirty performance test to measure raw
      performance of NVMe device without userspace/physio/GEOM
      overhead

The following are still work in progress and will be completed over the
next 3-6 months in rough priority order:
- complete man pages
- firmware download and activation
- asynchronous error requests
- command timeout error handling
- controller resets
- nvmecontrol(8) log page retrieval

This has been primarily tested on amd64, with light testing on i386.  I
would be happy to provide assistance to anyone interested in porting
this to other architectures, but am not currently planning to do this
work myself.  Big-endian and dmamap sync for command/completion queues
are the main areas that would need to be addressed.

The nvme(4) driver currently has references to Chatham, which is an
Intel-developed prototype board which is not fully spec compliant.
These references will all be removed over time.

Sponsored by:        Intel
Contributions from:  Joe Golio/EMC <joseph dot golio at emc dot com>

11 years agoAdd UQ_UMS_IGNORE quirk.
hselasky [Mon, 17 Sep 2012 19:06:35 +0000 (19:06 +0000)]
Add UQ_UMS_IGNORE quirk.
Wrap two long lines.
Some minor spelling correction.

PR: usb/171721

11 years agoImplement support for USB Audio v2.0. Remove some redundant
hselasky [Mon, 17 Sep 2012 15:43:57 +0000 (15:43 +0000)]
Implement support for USB Audio v2.0. Remove some redundant
USB audio v1.0 debug data, hence userspace tools like lsusb
exist to show this information properly.

11 years agoAdd locking to mlx(4) to make it MPSAFE along with some other fixes:
jhb [Mon, 17 Sep 2012 15:27:30 +0000 (15:27 +0000)]
Add locking to mlx(4) to make it MPSAFE along with some other fixes:
- Use callout(9) rather than timeout(9).
- Add a mutex as an I/O lock that protects the adapter and is used
  for the I/O path.
- Add an sx lock as a configuration lock that protects the relationship
  of configured volumes.
- Freeze the request queue when a DMA load is deferred with EINPROGRESS
  and unfreeze the queue when the DMA callback is invoked.
- Explicitly poll the hardware while waiting to submit a command to
  allow completed commands to free up slots in the command ring.
- Remove driver-wide 'initted' variable from mlx_*_fw_handshake() routines.
  That state should be per-controller instead.  Add it as an argument
  since the first caller knows when it is the first caller.
- Remove explicit bus_space tag/handle and use bus_*() rather than
  bus_space_*().
- Move duplicated PCI device ID probing into a  mlx_pci_match() routine.
- Don't check for PCIM_CMD_MEMEN (the PCI bus will enable that when
  allocating the resource) and use pci_enable_busmaster() rather than
  manipulating the register directly.

Tested by: no one despite multiple requests (hope it works)

11 years agoMake systat(1) accept fractional number of seconds.
melifaro [Mon, 17 Sep 2012 13:36:47 +0000 (13:36 +0000)]
Make systat(1) accept fractional number of seconds.
Make old alarm(3)-based code use select(2).

MFC after: 2 weeks

11 years ago- Add #defines for the bits within the iPCI Express PCIR_EXPRESS_LINK_CTL
gavin [Mon, 17 Sep 2012 12:51:48 +0000 (12:51 +0000)]
- Add #defines for the bits within the iPCI Express PCIR_EXPRESS_LINK_CTL
  register
- Add missing register PCIR_EXPRESS_ROOT_CAP
- Correct a spelling mistake (SLAT -> SLOT) [1]

Reviewed by: jhb [1]

11 years agoRemove unused variable cd.
kevlo [Mon, 17 Sep 2012 09:32:11 +0000 (09:32 +0000)]
Remove unused variable cd.
This variable is initialized but not used.

11 years agoAdd a kernel config for the Toshiba AC100. The AC100 is an ARM laptop with
andrew [Mon, 17 Sep 2012 09:22:59 +0000 (09:22 +0000)]
Add a kernel config for the Toshiba AC100. The AC100 is an ARM laptop with
an NVidia Tegra 2 CPU.

Tegra 2 needs an external patch to pmap for atomic operations to work. Even
with this the Kernel only gets to the mount root prompt. As such Tegra
support is considered experimental, however adding the kernel config will
help ensure the Tegra code builds.

11 years agoIn snmp_hostres, device_map table is used for consistent device table
trociny [Mon, 17 Sep 2012 07:32:53 +0000 (07:32 +0000)]
In snmp_hostres, device_map table is used for consistent device table
indexing. When a device has gone it is not removed from device_map
table but just its entry_p field is set to NULL.

So when traversing device_map in disk_OS_get_ATA_disks() and
disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the
bsnmpd crash is possible when a removed map entry is dereferenced.

Before the fix, for disk_OS_get_ATA_disks() the crash could be easily
reproduced running:

  atacontrol detach ata1

The crash was not observed in disk_OS_get_MD_disks() because currently
snmp_hostres does no see md(4) disks: to get the device list it uses
devinfo(3), which does not return md devices.

Reported by: Miroslav Lachman 000.fbsd quip.cz
MFC after: 1 week

11 years agoAdd the Tegra2 DTS files. Now our dtc supports including other files use
andrew [Mon, 17 Sep 2012 07:14:07 +0000 (07:14 +0000)]
Add the Tegra2 DTS files. Now our dtc supports including other files use
this support to pull out the SoC specific parts of the dts file.

11 years agoTake credit for the work I've done in this source file.
adrian [Mon, 17 Sep 2012 03:17:42 +0000 (03:17 +0000)]
Take credit for the work I've done in this source file.

11 years agoMinor correction.
mjacob [Mon, 17 Sep 2012 02:50:16 +0000 (02:50 +0000)]
Minor correction.

MFC after: 1 day

11 years agoAdd some edits to the changed comments so that they make more sense.
mjacob [Mon, 17 Sep 2012 02:49:02 +0000 (02:49 +0000)]
Add some edits to the changed comments so that they make more sense.

MFC after: 1 day

11 years agoUpdate release(7) to reflect changes from r240586 and r240587:
gjb [Mon, 17 Sep 2012 02:45:52 +0000 (02:45 +0000)]
Update release(7) to reflect changes from r240586 and r240587:

 - Remove cvs(1) references.
 - Remove CVS* environment references.
 - Add default entries for the default SVNROOT for the Ports
   Collection, and Documentation Project.
 - While here, update 'SGML-based documentation' to 'XML-based',
   since the recent SGML->XML conversion.
 - Update an example providing SVNROOT environment usage.

Reminded by: nwhitehorn
MFC After: 1 week
X-MFC-With: r240586, r240587

11 years agoUpdate usage() in comment section.
gjb [Mon, 17 Sep 2012 02:35:00 +0000 (02:35 +0000)]
Update usage() in comment section.
Remove CVS_* variables in comments.

MFC after: 1 week
X-MFC-With: r240586

11 years agoUpdate generate-release.sh script:
gjb [Mon, 17 Sep 2012 02:23:03 +0000 (02:23 +0000)]
Update generate-release.sh script:

 - Use svn for ports and doc trees
 - When installing a binary textproc/docproj package,
   switch pkg_add(1) to pkg(8) [1]

Reviewed by: nwhitehorn
Approved by: nwhitehorn
Enhanced by: glebius [1]
MFC After: 1 week
X-MFC-To: 9-only

11 years agoAdd a per-TID filter queue and filter state bits.
adrian [Mon, 17 Sep 2012 01:21:55 +0000 (01:21 +0000)]
Add a per-TID filter queue and filter state bits.

These are intended for software TX filtering support, where the NIC
decides there has been too many successive failues to a destination
and will filter it.

Although the filtering is done per-destination (via the keycache),
the state and queue is kept per-TID for now.  It simplifies the overall
architecture design and locking.

Whilst here, add ATH_TID_UNLOCK_ASSERT().

11 years agoAdd a debug bit for TX destination filtering.
adrian [Mon, 17 Sep 2012 01:18:47 +0000 (01:18 +0000)]
Add a debug bit for TX destination filtering.

11 years agoImprove performance of the Sample rate algorithm on 802.11n networks.
adrian [Mon, 17 Sep 2012 01:09:17 +0000 (01:09 +0000)]
Improve performance of the Sample rate algorithm on 802.11n networks.

* Don't treat high percentage failures as "sucessive failures" - high
  MCS rates are very picky and will quite happily "fade" from low
  to high failure % and back again within a few seconds.  If they really
  don't work, the aggregate will just plain fail.

* Only sample MCS rates +/- 3 from the current MCS.  Sample will back off
  quite quickly, so there's no need to sample _all_ MCS rates between
  a high MCS rate and MCS0; there may be a lot of them.

* Modify the smoothing rate to be 75% rather than 95% - it's more adaptive
  but it comes with a cost of being slightly less stable at times.
  A per-node, hysterisis behaviour would be nicer.

11 years agoRemove references to userstat(1) and jailstat(1). Those tools were never
trasz [Sun, 16 Sep 2012 23:25:13 +0000 (23:25 +0000)]
Remove references to userstat(1) and jailstat(1).  Those tools were never
merged from the Perforce branch.  They might be brought in when %CPU limits
go into the tree.

PR: docs/171240
MFC after: 2 weeks

11 years agoFix a crash bug introduced in the iterate node work recently done.
adrian [Sun, 16 Sep 2012 22:45:00 +0000 (22:45 +0000)]
Fix a crash bug introduced in the iterate node work recently done.

When resuming, the first VAP is checked for max_aid; however if there
is no VAP, this results in a NULL pointer dereference and kernel
panic.

11 years agoRemove trailing whitespace.
joel [Sun, 16 Sep 2012 21:17:28 +0000 (21:17 +0000)]
Remove trailing whitespace.

11 years agofix the kernel files to match our standard "option<space><tab>" format
jmg [Sun, 16 Sep 2012 19:48:48 +0000 (19:48 +0000)]
fix the kernel files to match our standard "option<space><tab>" format
such that when commenting/uncommentting lines, horizontal spacing is
maintained...

Also fix some minor comment formatting to line things up, etc...

Reviewed by: gnn, imp
MFC after: 1 week

11 years agoremove some unnecessary debugging statements, dead code and incorrect
jmg [Sun, 16 Sep 2012 19:42:27 +0000 (19:42 +0000)]
remove some unnecessary debugging statements, dead code and incorrect
comment...

Reviewed by: gnn, imp

11 years agoOptimise i387 trigonometric functions. Replace "andw 0x400,%ax \ jnz" with
tijl [Sun, 16 Sep 2012 16:58:49 +0000 (16:58 +0000)]
Optimise i387 trigonometric functions. Replace "andw 0x400,%ax \ jnz" with
"sahf \ jp", "fprem1" with "fprem" and "fstsw %ax" with "fnstsw %ax".

11 years agoRevert 240527:
eadler [Sun, 16 Sep 2012 16:08:20 +0000 (16:08 +0000)]
Revert 240527:
mntbuf can poit to memory allocated by getmntinfo(3) which can't be freed

PR: bin/171634
Approved by: cperciva (implicit)

11 years agoWarn about filesystem-based attacks.
des [Sun, 16 Sep 2012 15:22:15 +0000 (15:22 +0000)]
Warn about filesystem-based attacks.

11 years ago- Make truss thread-aware.
zont [Sun, 16 Sep 2012 14:38:01 +0000 (14:38 +0000)]
- Make truss thread-aware.

Approved by: kib (mentor)
MFC after: 2 weeks

11 years agoAdd section describing existing filtering points.
melifaro [Sun, 16 Sep 2012 13:13:02 +0000 (13:13 +0000)]
Add section describing existing filtering points.
Document byteorder behavior in AF_INET[6] hooks in new section.

MFC after: 2 weeks

11 years agoStart to clean up ARMv6 initarm implementations by making the Tegra 2
andrew [Sun, 16 Sep 2012 08:09:10 +0000 (08:09 +0000)]
Start to clean up ARMv6 initarm implementations by making the Tegra 2
version similar to the Ti version.

11 years agoIn the Tegra 2 standard config:
andrew [Sun, 16 Sep 2012 08:00:29 +0000 (08:00 +0000)]
In the Tegra 2 standard config:
 * Remove an unneeded makeoption
 * Set machine correctly
 * Properly indent the include of files.tegra2

11 years agoThe cpu_reset function is noreturn, make sure this is true on Tegra 2.
andrew [Sun, 16 Sep 2012 07:55:49 +0000 (07:55 +0000)]
The cpu_reset function is noreturn, make sure this is true on Tegra 2.
While here fix a typo.

11 years ago- Add myself as a new src committer.
peterj [Sun, 16 Sep 2012 06:44:58 +0000 (06:44 +0000)]
- Add myself as a new src committer.
- Sort jhb's mentees
- Add grog's (ex-)mentor

Approved by: jhb (co-mentor), grog (co-mentor)

11 years agoAdd Perforce support.
rpaulo [Sun, 16 Sep 2012 06:01:34 +0000 (06:01 +0000)]
Add Perforce support.

11 years agoHandle AT_TIMEKEEP in procstat(1) -x [1]. Remove the AT_COUNT switch
kib [Sun, 16 Sep 2012 05:52:54 +0000 (05:52 +0000)]
Handle AT_TIMEKEEP in procstat(1) -x [1]. Remove the AT_COUNT switch
case, since AT_COUNT is not an aux vector, it is the counter of total
number of defined vectors.

PR: bin/171662 [1]
MFC after: 1 week

11 years agosh: Prefer internal nextopt() to libc getopt().
jilles [Sat, 15 Sep 2012 21:56:30 +0000 (21:56 +0000)]
sh: Prefer internal nextopt() to libc getopt().

This reduces code duplication and code size.

/usr/bin/printf is not affected.

Side effect: different error messages when certain builtins are passed
invalid options.

11 years agoAdd myself, and show gabor@ as my mentor.
ebrandi [Sat, 15 Sep 2012 20:09:08 +0000 (20:09 +0000)]
Add myself, and show gabor@ as my mentor.

Approved by:    gabor (mentor)

11 years agoPrefer __containerof() above member2struct().
ed [Sat, 15 Sep 2012 19:28:54 +0000 (19:28 +0000)]
Prefer __containerof() above member2struct().

The first does proper checking of the argument types, while the latter
does not.

11 years agoEliminate an unused malloc type.
alc [Sat, 15 Sep 2012 17:32:19 +0000 (17:32 +0000)]
Eliminate an unused malloc type.

11 years agoPull in r163967 from upstream llvm trunk:
dim [Sat, 15 Sep 2012 17:02:05 +0000 (17:02 +0000)]
Pull in r163967 from upstream llvm trunk:

  X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe
  fp math.

This should make clang emit calls to libm for sinf/cosf by default.

MFC after: 1 week

11 years agoRemove a reference to CVS and to freefall from a user-facing man page.
issyl0 [Sat, 15 Sep 2012 16:24:03 +0000 (16:24 +0000)]
Remove a reference to CVS and to freefall from a user-facing man page.

PR: docs/171658
Reported by: Chris Petrik (c dot petrik dot sosa at gmail dot com)
Approved by: gabor (mentor)
MFC after: 5 days

11 years agoFree memory before exiting in order to
eadler [Fri, 14 Sep 2012 23:47:23 +0000 (23:47 +0000)]
Free memory before exiting in order to
help tools understand that we're not leaking it.

PR: bin/171634
Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Approved by: cperciva
MFC after: 3 days

11 years agosiginfo(3): Document TRAP_DTRACE signal code.
jilles [Fri, 14 Sep 2012 22:12:04 +0000 (22:12 +0000)]
siginfo(3): Document TRAP_DTRACE signal code.

MFC after: 1 week

11 years agosiginfo(3): Document SI_LWP signal code.
jilles [Fri, 14 Sep 2012 22:10:01 +0000 (22:10 +0000)]
siginfo(3): Document SI_LWP signal code.

Describe SI_LWP as being generated by pthread_kill() because thr_kill() is
a private undocumented function.

MFC after: 1 week

11 years agosiginfo(3): Document SI_USER and SI_KERNEL signal codes.
jilles [Fri, 14 Sep 2012 22:05:09 +0000 (22:05 +0000)]
siginfo(3): Document SI_USER and SI_KERNEL signal codes.

MFC after: 1 week

11 years agos/ is is / is /g
eadler [Fri, 14 Sep 2012 22:00:03 +0000 (22:00 +0000)]
s/ is is / is /g
s/ a a / a /g

Approved by: cperciva
MFC after: 3 days

11 years agos/teh/the/g
eadler [Fri, 14 Sep 2012 21:59:55 +0000 (21:59 +0000)]
s/teh/the/g

Approved by: cperciva
MFC after: 3 days

11 years ago- Fix build of French release notes with the XMLified doc tree
gabor [Fri, 14 Sep 2012 21:36:01 +0000 (21:36 +0000)]
- Fix build of French release notes with the XMLified doc tree

11 years agoCorrect double "the the"
eadler [Fri, 14 Sep 2012 21:28:56 +0000 (21:28 +0000)]
Correct double "the the"

Approved by: cperciva
MFC after: 3 days

11 years agoupdate to version 20120526
bapt [Fri, 14 Sep 2012 21:17:53 +0000 (21:17 +0000)]
update to version 20120526

11 years ago- Fix build of the German release notes with the XMLified doc tree
gabor [Fri, 14 Sep 2012 21:12:41 +0000 (21:12 +0000)]
- Fix build of the German release notes with the XMLified doc tree

11 years agoRevert previous commit...
gjb [Fri, 14 Sep 2012 20:51:35 +0000 (20:51 +0000)]
Revert previous commit...

Pointyhat to: gjb (myself)

11 years agoisci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7
jimharris [Fri, 14 Sep 2012 20:05:38 +0000 (20:05 +0000)]
isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7
(download microcode with offsets, save, and activate).

SATI translation layer was incorrectly using allocation length instead
of blocks, and was constructing the ATA command incorrectly.

Also change #define to specify that the 512 block size here is
specific for DOWNLOAD_MICROCODE, and does not relate to the device's
logical block size.

Submitted by: scottl (with small modifications)
MFC after: 3 days

11 years agosched_ule: fix inverted condition in reporting of priority lending via ktr
avg [Fri, 14 Sep 2012 19:55:28 +0000 (19:55 +0000)]
sched_ule: fix inverted condition in reporting of priority lending via ktr

Reviewed by: kan
MFC after: 1 week

11 years agoFix man2hwnotes.pl script, which should fix the RELNOTES build.
gjb [Fri, 14 Sep 2012 19:52:33 +0000 (19:52 +0000)]
Fix man2hwnotes.pl script, which should fix the RELNOTES build.

11 years ago- Make the release notes build with the XMLified doc tree
gabor [Fri, 14 Sep 2012 18:33:12 +0000 (18:33 +0000)]
- Make the release notes build with the XMLified doc tree

11 years agoSmall cleanups. No functional change.
tuexen [Fri, 14 Sep 2012 18:32:20 +0000 (18:32 +0000)]
Small cleanups. No functional change.

MFC after: 10 days

11 years agoBump date missed in r202756
eadler [Fri, 14 Sep 2012 17:50:42 +0000 (17:50 +0000)]
Bump date missed in r202756

PR: docs/171624
Submitted by: bdrewery
Approved by: gabor
MFC after: 3 days

11 years agosh: Reduce code duplication: use setinputfile instead of open/setinputfd
jilles [Fri, 14 Sep 2012 15:22:15 +0000 (15:22 +0000)]
sh: Reduce code duplication: use setinputfile instead of open/setinputfd
combination.

MFC after: 2 weeks

11 years agoMinor mdoc fix.
joel [Fri, 14 Sep 2012 13:14:48 +0000 (13:14 +0000)]
Minor mdoc fix.

11 years agoUse libmd if and only if OpenSSL is not available.
des [Fri, 14 Sep 2012 13:00:43 +0000 (13:00 +0000)]
Use libmd if and only if OpenSSL is not available.

PR: bin/171402
MFC after: 3 days

11 years agoAdding missing return statements during error conditions.
eadler [Fri, 14 Sep 2012 12:15:13 +0000 (12:15 +0000)]
Adding missing return statements during error conditions.

PR: kern/171187
Submitted by: Mark Johnston <markjdb@gmail.com>
Reviewed by: des
Approved by: cperciva
MFC after: 2 weeks

11 years agoo Create directory sys/netpfil, where all packet filters should
glebius [Fri, 14 Sep 2012 11:51:49 +0000 (11:51 +0000)]
o Create directory sys/netpfil, where all packet filters should
  reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c -> sys/netpfil/pf/
sys/contrib/pf/net/*.h -> sys/net/
contrib/pf/pfctl/*.c -> sbin/pfctl
contrib/pf/pfctl/*.h -> sbin/pfctl
contrib/pf/pfctl/pfctl.8 -> sbin/pfctl
contrib/pf/pfctl/*.4 -> share/man/man4
contrib/pf/pfctl/*.5 -> share/man/man5

sys/netinet/ipfw -> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with: bz, luigi