]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoi386 bootinfo: re-arrange EFI fields for natural alignment and packing
avg [Sun, 13 May 2012 09:25:39 +0000 (09:25 +0000)]
i386 bootinfo: re-arrange EFI fields for natural alignment and packing

Suggested by: bde
MFC after: 2 weeks

12 years agozfs boot code: mark spa_t arguments as const where they are used as such
avg [Sun, 13 May 2012 09:22:18 +0000 (09:22 +0000)]
zfs boot code: mark spa_t arguments as const where they are used as such

MFC after: 1 month

12 years agoRegenerate after r235388.
marius [Sun, 13 May 2012 05:09:36 +0000 (05:09 +0000)]
Regenerate after r235388.

12 years ago- Get rid of debugging support in order to get rid of the V8-specific C
marius [Sun, 13 May 2012 05:08:13 +0000 (05:08 +0000)]
- Get rid of debugging support in order to get rid of the V8-specific C
  compiler frame size used there so this whole thing is V8/V9-agnostic.
- Use 32-bit function alignment as GCC does when using UltraSPARC I or
  higher optimizations.
- Don't waste delay slots when possible.

Unfortunately, this still doesn't make libcompiler_rt a viable replacement
for libgcc on sparc64 though as once installed instead, buildworld times
increase by nearly 60% (which isn't related to these assembler functions).

12 years agoFix config_lazy_lock so that thread caching isn't used for
jasone [Sun, 13 May 2012 01:33:28 +0000 (01:33 +0000)]
Fix config_lazy_lock so that thread caching isn't used for
single-threaded applications.

12 years agoFix two cases in the new NFS server where a tsleep() is
rmacklem [Sat, 12 May 2012 22:20:55 +0000 (22:20 +0000)]
Fix two cases in the new NFS server where a tsleep() is
used, when the code should actually protect the tested
variable with a mutex. Since the tsleep()s had a 10sec
timeout, the race would have only delayed the allocation
of a new clientid for a client. The sleeps will also
rarely occur, since having a callback in progress when
a client acquires a new clientid, is unlikely.
in practice, since having a callback in progress when
a fresh clientid is being acquired by a client is unlikely.

MFC after: 1 month

12 years agoImport dtracetoolkit into cddl/contrib
gnn [Sat, 12 May 2012 21:25:48 +0000 (21:25 +0000)]
Import dtracetoolkit into cddl/contrib

12 years agoRevert previous failed cp.
gnn [Sat, 12 May 2012 21:23:31 +0000 (21:23 +0000)]
Revert previous failed cp.

12 years agoImport dtracetoolkit into cddl/contrib
gnn [Sat, 12 May 2012 21:15:21 +0000 (21:15 +0000)]
Import dtracetoolkit into cddl/contrib

12 years agoSetup the CPU port and broadcast map on the AR7240, rather than
adrian [Sat, 12 May 2012 21:08:07 +0000 (21:08 +0000)]
Setup the CPU port and broadcast map on the AR7240, rather than
depending upon the bootloader initialising it.

The aim is to eventually support a full switch set and reinitialisation
rather than relying on a consistent bootloader setup.

Remove the port flood config from arswitch.c, it's not yet used and
it's totally incorrect.

Whilst I'm here, also add in a comment describing why the full switch
reset is disabled.

Obtained from: Linux (OpenWRT) - Values

12 years agoRemove leading .Ns macro to silence mdoc(7) warning.
gjb [Sat, 12 May 2012 20:53:00 +0000 (20:53 +0000)]
Remove leading .Ns macro to silence mdoc(7) warning.

12 years agoAdd new pager type, OBJT_MGTDEVICE. It provides the device pager
kib [Sat, 12 May 2012 20:49:58 +0000 (20:49 +0000)]
Add new pager type, OBJT_MGTDEVICE. It provides the device pager
which carries fictitous managed pages. In particular, the consumers of
the new object type can remove all mappings of the device page with
pmap_remove_all().

The range of physical addresses used for fake page allocation shall be
registered with vm_phys_fictitious_reg_range() interface to allow the
PHYS_TO_VM_PAGE() to work in pmap.

Most likely, only i386 and amd64 pmaps can handle fictitious managed
pages right now.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agomdoc(7) markup cleanup.
gjb [Sat, 12 May 2012 20:46:19 +0000 (20:46 +0000)]
mdoc(7) markup cleanup.

12 years agoAdd a facility to register a range of physical addresses to be used
kib [Sat, 12 May 2012 20:42:56 +0000 (20:42 +0000)]
Add a facility to register a range of physical addresses to be used
for allocation of fictitious pages, for which PHYS_TO_VM_PAGE()
returns proper fictitious vm_page_t. The range should be de-registered
after consumer stopped using it.

De-inline the PHYS_TO_VM_PAGE() since it now carries code to iterate
over registered ranges.

A hash container might be developed instead of range registration
interface, and fake pages could be put automatically into the hash,
were PHYS_TO_VM_PAGE() could look them up later. This should be
considered before the MFC of the commit is done.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agoFix mdoc(7) markup.
gjb [Sat, 12 May 2012 20:41:40 +0000 (20:41 +0000)]
Fix mdoc(7) markup.

12 years ago.. oops, include setting the MTU.
adrian [Sat, 12 May 2012 20:40:13 +0000 (20:40 +0000)]
.. oops, include setting the MTU.

12 years agoDocument what the flood register setting does.
adrian [Sat, 12 May 2012 20:39:41 +0000 (20:39 +0000)]
Document what the flood register setting does.

12 years agoAdd the remaining scripts from the DTraceToolkit, version 0.99, to the
gnn [Sat, 12 May 2012 20:38:18 +0000 (20:38 +0000)]
Add the remaining scripts from the DTraceToolkit, version 0.99, to the
vendor tree.

http://www.brendangregg.com/dtrace.html#DTraceToolkit

12 years ago* Add in the AR7240 global control field for setting the maximum frame
adrian [Sat, 12 May 2012 20:36:12 +0000 (20:36 +0000)]
* Add in the AR7240 global control field for setting the maximum frame
  size for the AR7240.

* Include SM/MS macros, thanks to ath_hal(4).

* This field is for normal packets, VLAN and other headers are added to
  this by the switch device.

* Set the MTU to 1536, to match what is done in Linux.  Use the SM
  macro to write this field.

Obtained from: Atheros (AR7240 datasheet), Linux OpenWRT (MTU default)

12 years agoSplit the code from vm_page_getfake() to initialize the fake page struct
kib [Sat, 12 May 2012 20:34:22 +0000 (20:34 +0000)]
Split the code from vm_page_getfake() to initialize the fake page struct
vm_page into new interface vm_page_initfake(). Handle the case of fake
page re-initialization with changed memattr.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agoAssert that the page passed to vm_page_putfake() is unmanaged.
kib [Sat, 12 May 2012 20:27:51 +0000 (20:27 +0000)]
Assert that the page passed to vm_page_putfake() is unmanaged.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agosparc64/zfs boot: take advantage of new libzfsboot capabilities
avg [Sat, 12 May 2012 20:27:33 +0000 (20:27 +0000)]
sparc64/zfs boot: take advantage of new libzfsboot capabilities

Also drop the now unneeded compatibility shims.

Tested by: marius
MFC after: 1 month

12 years agoMinor mdoc nits.
joel [Sat, 12 May 2012 20:27:13 +0000 (20:27 +0000)]
Minor mdoc nits.

12 years agoAssert that fictitious or unmanaged pages do not appear on
kib [Sat, 12 May 2012 20:24:46 +0000 (20:24 +0000)]
Assert that fictitious or unmanaged pages do not appear on
active/inactive lists.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agozfs boot code: use %j and uintmax_t instead %ll and uint64_t in printfs
avg [Sat, 12 May 2012 20:23:30 +0000 (20:23 +0000)]
zfs boot code: use %j and uintmax_t instead %ll and uint64_t in printfs

This is to silence warnings that result from different definitions of
uint64_t on different architectures, specifically i386 and sparc64.

MFC after: 1 month

12 years agoProvide in the association change notification the received ABORT chunk
tuexen [Sat, 12 May 2012 20:11:35 +0000 (20:11 +0000)]
Provide in the association change notification the received ABORT chunk
if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458.

MFC after: 3 days

12 years agoCommit the change forgotten in r235356.
kib [Sat, 12 May 2012 20:10:18 +0000 (20:10 +0000)]
Commit the change forgotten in r235356.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agoSet formatting width and offset in DB_COMMAND(9).
gjb [Sat, 12 May 2012 20:08:16 +0000 (20:08 +0000)]
Set formatting width and offset in DB_COMMAND(9).

12 years agoFix an mdoc(7) nit.
gjb [Sat, 12 May 2012 20:06:17 +0000 (20:06 +0000)]
Fix an mdoc(7) nit.

12 years agoMake the vm_page_array_size long. Remove redundand zero initialization
kib [Sat, 12 May 2012 20:03:06 +0000 (20:03 +0000)]
Make the vm_page_array_size long. Remove redundand zero initialization
for vm_page_array_size and nearby variablees.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month

12 years agoRemove end of line whitespace.
joel [Sat, 12 May 2012 19:59:37 +0000 (19:59 +0000)]
Remove end of line whitespace.

12 years agoMinor mdoc nit.
joel [Sat, 12 May 2012 19:53:44 +0000 (19:53 +0000)]
Minor mdoc nit.

12 years agoRemove duplicate config bits.
adrian [Sat, 12 May 2012 19:43:22 +0000 (19:43 +0000)]
Remove duplicate config bits.

Submitted by: juli

12 years agoAdd glue/support for the SAM9XE512-based Ethernut 5 boards. Currently,
marius [Sat, 12 May 2012 18:11:26 +0000 (18:11 +0000)]
Add glue/support for the SAM9XE512-based Ethernut 5 boards. Currently,
all integrated and on-board peripherals except the DataFlash (at91_spi(4)
and at45d(4) still need to be unb0rken) and NAND Flash (missing NAND
framework) are working.
AFAICT, this makes FreeBSD the first operating system besides Nut/OS
supporting Ethernut 5 out of tree.

12 years agoDocuement requirement to alter some sysctls when using igb(4) with
gjb [Sat, 12 May 2012 18:10:27 +0000 (18:10 +0000)]
Docuement requirement to alter some sysctls when using igb(4) with
jumbo frames.

PR: 153738
Submitted by: Tom Judge (tom!tomjudge.com)
Discussed with: jfv (in part, a long time ago...)
MFC after: 1 week

12 years agoRevert this - I disabled it whilst hwpmc is/was broken.
adrian [Sat, 12 May 2012 17:42:22 +0000 (17:42 +0000)]
Revert this - I disabled it whilst hwpmc is/was broken.

12 years agoFlip on WN1043ND switch PHY support.
adrian [Sat, 12 May 2012 17:41:42 +0000 (17:41 +0000)]
Flip on WN1043ND switch PHY support.

* Add the i2c bitbang bus;
* Add the etherswitch/rtl8366rb drivers;
* "fix" the USB GPIO configuration so USB actually works.

Submitted by: Stefan Bethke <stb@lassitu.de>

12 years agomdoc: use Po and Pc macros instead of parens. Also avoid starting a line
joel [Sat, 12 May 2012 17:14:55 +0000 (17:14 +0000)]
mdoc: use Po and Pc macros instead of parens. Also avoid starting a line
with Ns.

12 years agoadd a zfs spa_t change missed in r235329
avg [Sat, 12 May 2012 16:36:54 +0000 (16:36 +0000)]
add a zfs spa_t change missed in r235329

sys/cddl/boot is obviously not under sys/boot...

Pointed out by: Jan Beich <jbeich@tormail.org>
Pointyhat to: avg
MFC after: 1 month

12 years agoRegenerate src.conf(5) for mdoc(7) and typo corrections.
gjb [Sat, 12 May 2012 16:12:36 +0000 (16:12 +0000)]
Regenerate src.conf(5) for mdoc(7) and typo corrections.

PR: 167804
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days

12 years agoRemove tab from kernel configuration option. This is consistent with the rest
joel [Sat, 12 May 2012 16:08:05 +0000 (16:08 +0000)]
Remove tab from kernel configuration option. This is consistent with the rest
of our manual pages.

12 years agoAdd opt_wlan.h includes, so IEEE80211_* configuration changes are
adrian [Sat, 12 May 2012 15:11:53 +0000 (15:11 +0000)]
Add opt_wlan.h includes, so IEEE80211_* configuration changes are
correctly picked up.

Noticed by: Justin Hibbits, whilst debugging @ BSDCan

12 years agoGeneral mdoc(7) and typo fixes.
gjb [Sat, 12 May 2012 15:08:22 +0000 (15:08 +0000)]
General mdoc(7) and typo fixes.

PR: 167804
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days

12 years agomdoc: remove redundant paragraph macro.
joel [Sat, 12 May 2012 14:46:49 +0000 (14:46 +0000)]
mdoc: remove redundant paragraph macro.

12 years agomdoc: remove redundant Pp and end a display block with Ed.
joel [Sat, 12 May 2012 14:43:52 +0000 (14:43 +0000)]
mdoc: remove redundant Pp and end a display block with Ed.

12 years agoConvert the if_vr(4) driver model to the interrupt filter model and use
rpaulo [Sat, 12 May 2012 14:37:25 +0000 (14:37 +0000)]
Convert the if_vr(4) driver model to the interrupt filter model and use
a taskqueue.

This gives a 16% performance improvement under high load on slow systems,
especially when vr shares an interrupt with another device, which is
common with the Alix x86 boards.
Contrary to the other devices, I left the interrupt processing for loop
in because there was no significant difference in performance and this
should avoid enqueuing more taskqueues unnecessarily.
We also decided to move the vr_start_locked() call inside the for loop
because we found out that it helps performance since TCP ACKs now have a
chance to go out quicker.

Reviewed by: yongari (older version, same idea)
Discussed with: yongari, jhb

12 years agoAdd two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
mav [Sat, 12 May 2012 13:55:36 +0000 (13:55 +0000)]
Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
to allow drivers to handle request completion directly without passing
them to the CAM SWI thread removing extra context switch.
Modify all ATA/SATA drivers to use them.

Reviewed by: gibbs, ken
MFC after: 2 weeks

12 years agoPR# 165923 reported intermittent write failures for dirty
rmacklem [Sat, 12 May 2012 12:02:51 +0000 (12:02 +0000)]
PR# 165923 reported intermittent write failures for dirty
memory mapped pages being written back on an NFS mount.
Since any thread can call VOP_PUTPAGES() to write back a
dirty page, the credentials of that thread may not have
write access to the file on an NFS server. (Often the uid
is 0, which may be mapped to "nobody" in the NFS server.)
Although there is no completely correct fix for this
(NFS servers check access on every write RPC instead of at
open/mmap time), this patch avoids the common cases by
holding onto a credential that recently opened the file
for writing and uses that credential for the write RPCs
being done by VOP_PUTPAGES() for both NFS clients.

Tested by: Joel Ray Holveck (joelh at juniper.net)
PR: kern/165923
Reviewed by: kib
MFC after: 2 weeks

12 years agoAdd more obsolete files.
antoine [Sat, 12 May 2012 10:53:49 +0000 (10:53 +0000)]
Add more obsolete files.

12 years agozfs boot: try to set vfs.root.mountfrom from currdev as a fallback
avg [Sat, 12 May 2012 09:07:41 +0000 (09:07 +0000)]
zfs boot: try to set vfs.root.mountfrom from currdev as a fallback

This way with the new zfsloader there is no need to explicitly set zfs
root filesystem either via vfs.root.mountfrom or fstab.
It should be automatically picked up from currdev which is by default
is set from bootfs.

Tested by: Florian Wagner <florian@wagner-flo.net> (x86)
MFC after: 1 month

12 years agozfsboot/zfsloader: support accessing filesystems within a pool
avg [Sat, 12 May 2012 09:03:30 +0000 (09:03 +0000)]
zfsboot/zfsloader: support accessing filesystems within a pool

In zfs loader zfs device name format now is "zfs:pool/fs",
fully qualified file path is "zfs:pool/fs:/path/to/file"
loader allows accessing files from various pools and filesystems as well
as changing currdev to a different pool/filesystem.

zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or,
as before, pool:path/to/file; in the latter case a default filesystem
is used (pool root or bootfs).  zfsboot passes guids of the selected
pool and dataset to zfsloader to be used as its defaults.

zfs support should be architecture independent and is provided
in a separate library, but architectures wishing to use this zfs support
still have to provide some glue code and their devdesc should be
compatible with zfs_devdesc.
arch_zfs_probe method is used to discover all disk devices that may
be part of ZFS pool(s).

libi386 unconditionally includes zfs support, but some zfs-specific
functions are stubbed out as weak symbols.  The strong definitions
are provided in libzfsboot.
This change mean that the size of i386_devspec becomes larger
to match zfs_devspec.

Backward-compatibility shims are provided for recently added sparc64
zfs boot support.  Currently that architecture still works the old
way and does not support the new features.

TODO:
- clear up pool root filesystem vs pool bootfs filesystem distinction
- update sparc64 support
- set vfs.root.mountfrom based on currdev (for zfs)

Mid-future TODO:
- loader sub-menu for selecting alternative boot environment

Distant future TODO:
- support accessing snapshots, using a snapshot as readonly root

Reviewed by: marius (sparc64),
Gavin Mu <gavin.mu@gmail.com> (sparc64)
Tested by: Florian Wagner <florian@wagner-flo.net> (x86),
marius (sparc64)
No objections: fs@, hackers@
MFC after: 1 month

12 years agomdoc: end list context with El.
joel [Sat, 12 May 2012 07:52:45 +0000 (07:52 +0000)]
mdoc: end list context with El.

12 years agomdoc: list items should be specified with the It macro.
joel [Sat, 12 May 2012 07:01:21 +0000 (07:01 +0000)]
mdoc: list items should be specified with the It macro.

12 years ago* Remove the AR7240 register defines and reuse the AR8x16 defines.
adrian [Sat, 12 May 2012 06:24:21 +0000 (06:24 +0000)]
* Remove the AR7240 register defines and reuse the AR8x16 defines.
* Include a new register define to represent "disable port mirroring
  to CPU port".

Obtained from: Patrick Kelsey <kelsey@ieee.org>

12 years agoNow that there's a hint for it, add a "I'm an AR7240 switch!" hint.
adrian [Sat, 12 May 2012 05:27:14 +0000 (05:27 +0000)]
Now that there's a hint for it, add a "I'm an AR7240 switch!" hint.

12 years agoFurther arswitch work:
adrian [Sat, 12 May 2012 05:26:49 +0000 (05:26 +0000)]
Further arswitch work:

* Add in the AR724x support.  It probes the same as an AR8216/AR8316, so
  just add in a hint to force the probe success rather than auto-detecting
  it.

* Add in the missing entries from conf/files, lacking in the previous
  commit.

The register values and CPU port / mirror port initialisation value was
obtained from Linux OpenWRT ag71xx_ar7240.c.

The DELAY(1000) to let things settle is my local workaround.  For some
reason, PHY4 doesn't seem to probe very reliably without it.  It's quite
possible that we're missing some MDIO bus initialisation code in if_arge
for the AR724x case.  As I dislike DELAY() workarounds in general, it's
definitely worth trying to figure out why this is the case.

Tested on: AP93 (AR7240) reference design

Obtained from: Linux OpenWRT

12 years agoImport jemalloc 3.0.0. This fixes memory zeroing bugs that manifested as
jasone [Sat, 12 May 2012 05:26:49 +0000 (05:26 +0000)]
Import jemalloc 3.0.0.  This fixes memory zeroing bugs that manifested as
jemalloc assertion failures for debug builds, or as calloc() sometimes
returning non-zeroed memory for production builds.

12 years agoPointy hat to sleep deprived committer.
sbruno [Sat, 12 May 2012 05:05:22 +0000 (05:05 +0000)]
Pointy hat to sleep deprived committer.

Use a *real* variable type instead of one I made up.

Background Music:  Queen -- Bicycle Race

Reviewed by:    BSDCAN 2012 Hacker Lounge Audience

12 years agoAdd in the AP93 configuration file.
adrian [Sat, 12 May 2012 04:52:59 +0000 (04:52 +0000)]
Add in the AP93 configuration file.

The AP93 has:

* AR7240 - mips24k processor with integrated 10/100 switch and
  various other peripherals;
* AR9283 - 2x2 2.4GHz 802.11n (with calibration data in flash);
* 64MB RAM;
* 16MB SPI flash.

The switch code detects as an AR8216 at the present moment, which isn't
_entirely_ strictly true.  However, the MII/MDIO routing in AP93.hints
works - the arge0 MAC connects to PHY4 in the switch, but via the
switch internal MDIO bus.  The switch connects to arge0's MDIO bus,
but only to export the switch registers.

Thanks to stb and ray for the switch work, and ray for helping determine
what the correct switch hints should be for this thing.

12 years agoRemove duplicate words in mdoc(7) pages.
gjb [Sat, 12 May 2012 03:46:43 +0000 (03:46 +0000)]
Remove duplicate words in mdoc(7) pages.

PR: 167810
Submitted by: Bryan Drewery {bryan!shatow%net} (hackers lounge)
Found with: textproc/igor
MFC after: 3 days

12 years agoFix inappropriate data type for two bus_dmamap_t variables that were causing
sbruno [Sat, 12 May 2012 03:30:50 +0000 (03:30 +0000)]
Fix inappropriate data type for two bus_dmamap_t variables that were causing
PAE to insta-panic on startup.  Remove one unused variable that was
commented out.

Reviewed by: ambrisko@
Obtained from: jhb@ peter@ bz@ and countless others during BSDCAN
MFC after: 3 days

12 years agoGeneral mdoc(7) and typo fixes.
gjb [Sat, 12 May 2012 03:25:46 +0000 (03:25 +0000)]
General mdoc(7) and typo fixes.

PR: 167776
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days

12 years agoI forgot to bump the manpage date.
mdf [Sat, 12 May 2012 02:49:40 +0000 (02:49 +0000)]
I forgot to bump the manpage date.

Reminded by: Garrett Cooper
MFC after: 3 days
X-MFC-with: r235297

12 years agoBump .Dd
gjb [Sat, 12 May 2012 00:30:54 +0000 (00:30 +0000)]
Bump .Dd

12 years agoRevert previous revision, misunderstood the code :(
delphij [Fri, 11 May 2012 23:43:32 +0000 (23:43 +0000)]
Revert previous revision, misunderstood the code :(

12 years agoRelease proc lock after setting signal queue.
delphij [Fri, 11 May 2012 23:41:52 +0000 (23:41 +0000)]
Release proc lock after setting signal queue.

PR: kern/167727
Submitted by: Jinjun Gao <gjinjun gmail com>
MFC after: 2 weeks

12 years agoAdd a -v and -N option to kenv(1), so it can be more easily used in
mdf [Fri, 11 May 2012 23:05:14 +0000 (23:05 +0000)]
Add a -v and -N option to kenv(1), so it can be more easily used in
scripts the way sysctl(8) is.  The -N option, like in sysctl(8),
displays only the kenv names, not their values.  The -v option prints an
individual kenv variable name with its value as name="value".  This is
the inverse of sysctl(8)'s -n flag, since the default behaviour of
kenv(1) is already like sysctl(8) -n.

Submitted by: Garrett Cooper < yanegomi AT gmail DOT com >
MFC after: 1 week

12 years agoFix .Pp macro.
joel [Fri, 11 May 2012 22:05:30 +0000 (22:05 +0000)]
Fix .Pp macro.

12 years agoFix the case where the utility is being used to run a command directly,
delphij [Fri, 11 May 2012 21:52:05 +0000 (21:52 +0000)]
Fix the case where the utility is being used to run a command directly,
this is a regression introduced with r228917.

PR: bin/154042
Submitted by: Bugs Beastie <bugsbeastie gmail.com>
MFC after: 1 week

12 years agoAdd pointers for how to setup debugging over firewire.
imp [Fri, 11 May 2012 21:25:59 +0000 (21:25 +0000)]
Add pointers for how to setup debugging over firewire.

12 years agoThe linker isn't consistent in the ordering of dynamic sysctls, so don't
jamie [Fri, 11 May 2012 21:22:52 +0000 (21:22 +0000)]
The linker isn't consistent in the ordering of dynamic sysctls, so don't
assume that the unnamed final component of "security.jail.param.foo." is
one less than the "foo" component.  It might be one greater instead.

12 years agoAdd switch support to AP96.
adrian [Fri, 11 May 2012 21:13:43 +0000 (21:13 +0000)]
Add switch support to AP96.

12 years agoAdd etherswitchcfg.
adrian [Fri, 11 May 2012 20:56:04 +0000 (20:56 +0000)]
Add etherswitchcfg.

Submitted by: Stefan Bethke <stb@lassitu.de>

12 years agoCommit the first pass of the etherswitch support.
adrian [Fri, 11 May 2012 20:53:20 +0000 (20:53 +0000)]
Commit the first pass of the etherswitch support.

This is designed to support the very basic ethernet switch chip behaviour,
specifically:

* accessing switch register space;
* accessing per-PHY registers (for switches that actually expose PHYs);
* basic vlan group support, which applies for the rtl8366 driver but not
  for the atheros switches.

This also includes initial support for:

* rtl8366rb support - which is a 10/100/1000 switch which supports
  vlan groups;
* Initial Atheros AR8316 switch support - which is a 10/100/1000 switch
  which supports an alternate vlan configuration (so the vlan group
  methods are stubbed.)

The general idea here is that the switch driver may speak to a variety of
backend busses (mdio, i2c, spi, whatever) and expose:

* If applicable, one or more MDIO busses which ethernet interfaces can
  then attach PHYs to via miiproxy/mdioproxy;

* exposes miibusses, one for each port at the moment, so ..

* .. a PHY can be exposed on each miibus, for each switch port, with all
  of the existing MII/ifnet framework.

However:

* The ifnet is manually created for now, and it isn't linked into the
  interface list, nor can you (currently) send/receive frames on this ifnet.
  At some point in the future there may be _some_ support for this, for
  switches with a multi-port, isolated mode.

* I'm still in the process of sorting out correct(er) locking.

TODO:

* ray's switch code in zrouter (zrouter.org) includes a much more developed
  newbus API that covers the various switch methods, as well as a
  capability API so drivers, the switch layer and the userland utility
  can properly control the subset of supported features.

  The plan is to sort that out later, once the rest of ray's switch drivers
  are brought over and extended to export MII busses and PHYs.

Submitted by: Stefan Bethke <stb@lassitu.de>
Reviewed by: ray

12 years agoGeneral mdoc(7) and typo fixes.
gjb [Fri, 11 May 2012 20:06:46 +0000 (20:06 +0000)]
General mdoc(7) and typo fixes.

PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days

12 years agoSkip nd6 line with no warning message when the system does not support
hrs [Fri, 11 May 2012 20:01:45 +0000 (20:01 +0000)]
Skip nd6 line with no warning message when the system does not support
INET6.

Spotted by: flo

12 years agoFix a bug in the handling of association reset request.
tuexen [Fri, 11 May 2012 19:15:33 +0000 (19:15 +0000)]
Fix a bug in the handling of association reset request.

MFC after: 3 days

12 years agoOnly provide the supported features in the SCTP_ASSOC_CHANGE notif
tuexen [Fri, 11 May 2012 18:07:36 +0000 (18:07 +0000)]
Only provide the supported features in the SCTP_ASSOC_CHANGE notif
if the state is SCTP_COMM_UP or SCTP_RESTART.
While there, do some cleanups.

MFC after: 3 days

12 years agoFix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219.
dim [Fri, 11 May 2012 18:07:23 +0000 (18:07 +0000)]
Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219.
This file uses .code16 directives, which are not yet supported by
clang's integrated assembler.

MFC after: 1 month

12 years agoRemove a constant which is only used on non-FreeBSD platform.
tuexen [Fri, 11 May 2012 17:50:51 +0000 (17:50 +0000)]
Remove a constant which is only used on non-FreeBSD platform.
(The actual code for the socket option handling has been #ifdefed
out forever...)

MFC after: 3 days.

12 years agoRemove unused cruft. We call through memcpy more directly when we
imp [Fri, 11 May 2012 17:49:00 +0000 (17:49 +0000)]
Remove unused cruft.  We call through memcpy more directly when we
need to move the kernel, so we no longer need this.

12 years agoThis comment has become unmoored from the code to which it applies.
imp [Fri, 11 May 2012 17:40:13 +0000 (17:40 +0000)]
This comment has become unmoored from the code to which it applies.
Move it back.

12 years ago- Print package name in case an empty pkgdep line is found.
beat [Fri, 11 May 2012 16:09:12 +0000 (16:09 +0000)]
- Print package name in case an empty pkgdep line is found.

PR: bin/164378
Submitted by: Yuri <yuri AT tsoft.com> and many others
Approved by: flz
MFC after: 2 weeks

12 years ago- Add regression tests for BSD sort
gabor [Fri, 11 May 2012 16:04:55 +0000 (16:04 +0000)]
- Add regression tests for BSD sort

12 years agoRemove obsolte big endian flag. It is no longer needed.
imp [Fri, 11 May 2012 14:51:59 +0000 (14:51 +0000)]
Remove obsolte big endian flag.  It is no longer needed.

12 years agoAdd support for passing in the board ID.
imp [Fri, 11 May 2012 14:45:29 +0000 (14:45 +0000)]
Add support for passing in the board ID.

# This doesn't implement the full Linux boot ABI for arm yet.
# since there's no ATAGs list passed in for r2, and r0 has
# boot options rather than 0 as specified in the standard.
# Commited code to the tree won't touch any of this anyway, but
# future code may be able to use this.

12 years agoHack to unbreak boot2 for at91rm9200 boot loader. When the at91sam
imp [Fri, 11 May 2012 14:40:25 +0000 (14:40 +0000)]
Hack to unbreak boot2 for at91rm9200 boot loader.  When the at91sam
code came in, it moved things around which wound up breaking the
build.  We have to do this bit of a hack to avoid duplication of a lot
of #defines.

12 years ago- Prevent error status leak if write to some of the RAID1/1E volume disks
mav [Fri, 11 May 2012 13:20:17 +0000 (13:20 +0000)]
- Prevent error status leak if write to some of the RAID1/1E volume disks
failed while write to some other succeeded. Instead mark disk as failed.
- Make RAID1E less aggressive in failing disks to avoid volume breakage.

MFC after: 2 weeks

12 years ago- Regen
gabor [Fri, 11 May 2012 13:03:52 +0000 (13:03 +0000)]
- Regen

12 years ago- Hook up BSD sort to the build. By default, it will be installed as
gabor [Fri, 11 May 2012 12:47:21 +0000 (12:47 +0000)]
- Hook up BSD sort to the build.  By default, it will be installed as
  "bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
  is set, BSD sort will be the default "sort" and GNU sort will be installed
  as "gnusort".

12 years agoAdd a BSD-licensed sort rewrite that was started by me and later completed
gabor [Fri, 11 May 2012 12:37:16 +0000 (12:37 +0000)]
Add a BSD-licensed sort rewrite that was started by me and later completed
with the major functionality and optimizations by Oleg Moskalenko.
It is compatible with the latest version of POSIX and the current GNU sort
version that we have in base.  Beside this, it implements all the
functionality introduced in later versions of GNU sort.  For now, it will
be installed as "bsdsort", keeping GNU sort as the default sort
implementation.

12 years agoAccording to SUSv4, realpath(3) must fail if
kib [Fri, 11 May 2012 11:29:08 +0000 (11:29 +0000)]
According to SUSv4, realpath(3) must fail if
[ENOENT]  A component of file_name does not name an existing file or
    file_name points to an empty string.
[ENOTDIR] A component of the path prefix is not a directory, or the
    file_name argument contains at least one non- <slash> character
    and ends with one or more trailing <slash> characters and the last
    pathname component names an existing file that is neither a
    directory nor a symbolic link to a directory.
Add checks for the listed conditions, and set errno accordingly.

Update the realpath(3) manpage to mention SUS behaviour. Remove the
requirement to include sys/param.h before stdlib.h.

PR:     128933
MFC after:  3 weeks

12 years agoStop lying about default UFS blocksizes.
uqs [Fri, 11 May 2012 10:13:34 +0000 (10:13 +0000)]
Stop lying about default UFS blocksizes.

This catches up with the year-old change to default blocksizes. Also
reduce the variants of spelling gigabyte from 3 down to 2 (GB and GiB).

Suggested by: arundel (about a year ago now ...)

12 years agoMFi386: improve argument passing via btxldr
avg [Fri, 11 May 2012 09:46:17 +0000 (09:46 +0000)]
MFi386: improve argument passing via btxldr

use related definitions in i386 bootargs.h

Reviewed by: nyan, jhb
MFC after: 1 month

12 years agoMake sure we don't dereference a null pointer
kevlo [Fri, 11 May 2012 07:12:18 +0000 (07:12 +0000)]
Make sure we don't dereference a null pointer

12 years agoDon't hang if there is no /cpus node in the device tree.
kientzle [Fri, 11 May 2012 04:18:39 +0000 (04:18 +0000)]
Don't hang if there is no /cpus node in the device tree.

12 years agoRemove unused variable mii.
kevlo [Fri, 11 May 2012 03:17:32 +0000 (03:17 +0000)]
Remove unused variable mii.
This variable is initialized but not used.

12 years agoInitialize "error" to zero when it's declared in em_setup_receive_ring()
kevlo [Fri, 11 May 2012 03:15:22 +0000 (03:15 +0000)]
Initialize "error" to zero when it's declared in em_setup_receive_ring()

12 years ago- Change the module order of these MAC drivers to be last so they are
marius [Fri, 11 May 2012 02:40:40 +0000 (02:40 +0000)]
- Change the module order of these MAC drivers to be last so they are
  deterministically handled after the corresponding PHY drivers when
  loaded as modules. Otherwise, when these MAC/PHY driver pairs are
  compiled into a single module probing the PHY driver may fail. This
  makes r151438 and r226154 actually work. [1]
  Reported and tested by: yongari (fxp(4))
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

Submitted by: jhb [1]
MFC after: 3 days

12 years agoDocument the unzip(1) '-Z' option implemented in r234206.
gjb [Fri, 11 May 2012 00:19:06 +0000 (00:19 +0000)]
Document the unzip(1) '-Z' option implemented in r234206.

Submitted by: swills (via hacker lounge)
MFC after: 3 days