]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoStyle cleanups on ifconfig.8
allanjude [Fri, 6 Jun 2014 00:22:19 +0000 (00:22 +0000)]
Style cleanups on ifconfig.8
fix igor warnings
uppercase all instances of Ethernet
replace bad e.g.

CR: D91
Approved by: wblock (mentor)

10 years agoDocument r266463, newsyslog.conf(5) includes in conf.d.
gjb [Thu, 5 Jun 2014 23:53:47 +0000 (23:53 +0000)]
Document r266463, newsyslog.conf(5) includes in conf.d.

Sponsored by: The FreeBSD Foundation

10 years agoAdd support for arbitrary http requests
bapt [Thu, 5 Jun 2014 22:16:26 +0000 (22:16 +0000)]
Add support for arbitrary http requests

Submitted by: Alex Hornung <alex@alexhornung.com>
Reviewed by: des
Obtained from: Dragonfly
MFC after: 3 week

10 years agoRemove unnecessary semicolons
bapt [Thu, 5 Jun 2014 22:13:30 +0000 (22:13 +0000)]
Remove unnecessary semicolons

Patch by Sascha Wildner <saw@online.de> for Dragonfly

Reviewed by: des
Obtained from: Dragonfly
MFC after: 1 week

10 years agoUse NULL instead of 0
bapt [Thu, 5 Jun 2014 22:10:25 +0000 (22:10 +0000)]
Use NULL instead of 0

Patch by Sascha Wildner <saw@online.de> for Dragonfly

Reviewed by: des
Obtained from: Dragonfly
MFC after: 1 week

10 years agoAvoid using hard-coded SoC's register address in mptramp code for Armada XP
zbb [Thu, 5 Jun 2014 21:37:04 +0000 (21:37 +0000)]
Avoid using hard-coded SoC's register address in mptramp code for Armada XP

SoC's registers base address may differ between boards
(0xf1000000 or 0xd0000000). Therefore, in order to use
the proper CPU Boot Address Redirect register during SMP
initialization in mptramp the real, physical address has
to be passed to mptramp based on the value from DT.

Reviewed by: gber

10 years agoFix broken SMP startup on Armada XP after r265694
zbb [Thu, 5 Jun 2014 21:35:10 +0000 (21:35 +0000)]
Fix broken SMP startup on Armada XP after r265694

During Armada's platform_mp_start_ap(), mptramp code
is being copied to the specific physical location (0xffff0000).
Before r265694 the address to which the code should be copied
was equal to the address of mpentry routine that followed the
mptramp in locore.S. Now the mptramp end address should be
exported and used as a copy limit.

Reviewed by: gber

10 years agowhitespace change: remove trailing whitespace
luigi [Thu, 5 Jun 2014 21:12:41 +0000 (21:12 +0000)]
whitespace change: remove trailing whitespace

10 years agoIf HTTP_USER_AGENT is defined but empty, don't send User-Agent at all.
des [Thu, 5 Jun 2014 20:27:16 +0000 (20:27 +0000)]
If HTTP_USER_AGENT is defined but empty, don't send User-Agent at all.

PR: 184507
Submitted by: jbeich@tormail.org (with modifications)
MFC after: 1 week

10 years agovt fontcvt: Accept space after BITMAP in .bdf parser
emaste [Thu, 5 Jun 2014 19:38:44 +0000 (19:38 +0000)]
vt fontcvt: Accept space after BITMAP in .bdf parser

The Unifont BDF generator incorrectly adds a space after BITMAP, and
and that error has been widely propagated.

10 years agoRegen after r267124 for WITHOUT_VT_SUPPORT
emaste [Thu, 5 Jun 2014 18:59:21 +0000 (18:59 +0000)]
Regen after r267124 for WITHOUT_VT_SUPPORT

10 years agoInstall VT support files
emaste [Thu, 5 Jun 2014 18:53:56 +0000 (18:53 +0000)]
Install VT support files

They can be disabled by setting WITHOUT_VT_SUPPORT=yes in src.conf.

Sponsored by: The FreeBSD Foundation

10 years agoSupport "GNU Unifont" format font data
emaste [Thu, 5 Jun 2014 18:38:27 +0000 (18:38 +0000)]
Support "GNU Unifont" format font data

The GNU Unifont .hex format is a text file.  Each line represents one
glyph and consists of a four-digit hex code point, a colon, and pairs of
hex digits representing the bitmap.  By default an 8x16 font is assumed,
with 16x16 double-width glyphs, resulting in either 32 or 64 hex digits
for the bitmap.

Our version of the file format supports comments at the top of the file
to set the height and width:

# Height: <decimal height>
# Width: <decimal width>

Each row of bitmap data is rounded up to byte width - for example, a
10-pixel wide font uses 4 characters per row.

See http://czyborra.com/unifont/ for more background on the original
format.

Sponsored by: The FreeBSD Foundation

10 years ago- Verify that we don't load more data into a FIFO than it is
hselasky [Thu, 5 Jun 2014 18:23:51 +0000 (18:23 +0000)]
- Verify that we don't load more data into a FIFO than it is
configured to handle.
- Add code to handle suspend and resume.

MFC after: 3 days

10 years agoNeed to check the transfer cache field in the device done function
hselasky [Thu, 5 Jun 2014 18:19:48 +0000 (18:19 +0000)]
Need to check the transfer cache field in the device done function
to be sure all allocated channels are freed and not the transfer first
one.

10 years agoTry to fix DWC OTG regression issues with full and low speed devices:
hselasky [Thu, 5 Jun 2014 18:17:40 +0000 (18:17 +0000)]
Try to fix DWC OTG regression issues with full and low speed devices:
- Remove double buffering interrupt and isochronous traffic via the
transaction translator. It can be avoided because the DWC OTG will
always delay the start split transactions for interrupt and
isochronous traffic, but will not delay the complete split
transactions, if we set the odd frame bit correctly.
- Need to check the transfer cache field in the device done function
to be sure all allocated channels are freed and not the transfer first
one. This seems to resolve the control endpoint transfer type quirk
which is now removed.
- Make sure any received data upon TX is dumped else RX path will
stop.
- Transmit isochronous data before receiving isochronous data as a
means to optimise the TT schedule.
- Implement a simple TT bandwidth scheduler.
- Cleanup use of old "td->error" variable.
- On interrupt IN traffic via the transaction translator we simply
ignore missed transfer opportunities and silently retry the
transaction upon next available time slot.

MFC after: 3 days

10 years agovt fontcvt: -w sets the width, not height
emaste [Thu, 5 Jun 2014 18:01:59 +0000 (18:01 +0000)]
vt fontcvt: -w sets the width, not height

10 years agoThe code that combines adjacent ranges for BIO_DELETEs to optimize
imp [Thu, 5 Jun 2014 17:13:42 +0000 (17:13 +0000)]
The code that combines adjacent ranges for BIO_DELETEs to optimize
trims to the device assumes the list is sorted. Don't apply the
optimization of not sorting the queue when we have SSDs to the
delete_queue, since it causes more discard traffic to the drive. While
one could argue that the higher levels should coalesce the trims,
that's not done today, so some optimization at this level is needed.

CR: https://phabric.freebsd.org/D142

10 years agoUpdate reported libusb version to 1.0.13
emaste [Thu, 5 Jun 2014 14:19:32 +0000 (14:19 +0000)]
Update reported libusb version to 1.0.13

QEMU libusb host support needs at least libusbx-1.0.13, and our in-tree
libusb supports the required functionality.  Exp-run in PR.

PR: 181035

10 years agoUpdate vt(4) "Terminus BSD Console" font
emaste [Thu, 5 Jun 2014 13:49:37 +0000 (13:49 +0000)]
Update vt(4) "Terminus BSD Console" font

"Terminus BSD Console" is a derivative of Terminus that is provided
by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the             FreeBSD vt(4) console.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoUse ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf().
tuexen [Thu, 5 Jun 2014 12:51:12 +0000 (12:51 +0000)]
Use ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf().
This was suggested by kevlo@.

MFC after: 3 days

10 years agoFix OpenSSL multiple vulnerabilities.
delphij [Thu, 5 Jun 2014 12:32:16 +0000 (12:32 +0000)]
Fix OpenSSL multiple vulnerabilities.

Security: CVE-2014-0195, CVE-2014-0221, CVE-2014-0224,
CVE-2014-3470
Security: SA-14:14.openssl
Approved by: so

10 years agoMac OS X 10.10 is not released yet, removed.
maxim [Thu, 5 Jun 2014 09:27:42 +0000 (09:27 +0000)]
Mac OS X 10.10 is not released yet, removed.

Pointed out by: pluknet

10 years agomdoc: drop the trailing dot from the xref list.
pluknet [Thu, 5 Jun 2014 08:20:14 +0000 (08:20 +0000)]
mdoc: drop the trailing dot from the xref list.

10 years agoOpenBSD 5.5, Mac OS X 10.10, Dragonfly BSD 3.8.0 added.
maxim [Thu, 5 Jun 2014 07:28:27 +0000 (07:28 +0000)]
OpenBSD 5.5, Mac OS X 10.10, Dragonfly BSD 3.8.0 added.

10 years agoConvert functions to the new-style format.
davide [Thu, 5 Jun 2014 03:46:46 +0000 (03:46 +0000)]
Convert functions to the new-style format.

Submitted by: Vijay Singh <vijju.singh@gmail.com> via -hackers

10 years agoCatch up with recent changes...
kevlo [Thu, 5 Jun 2014 03:16:23 +0000 (03:16 +0000)]
Catch up with recent changes...

10 years agoCorrect the document date for last change.
wblock [Thu, 5 Jun 2014 01:58:21 +0000 (01:58 +0000)]
Correct the document date for last change.

MFC after: 1 week

10 years agoRemove D-Link DWA140 rev D1 by accident.
kevlo [Thu, 5 Jun 2014 01:55:23 +0000 (01:55 +0000)]
Remove D-Link DWA140 rev D1 by accident.

Pointed out by Anders Larsson in private email.

10 years agocxgbe(4): Properly account for the freelist buffers used when returning
np [Thu, 5 Jun 2014 00:38:32 +0000 (00:38 +0000)]
cxgbe(4):  Properly account for the freelist buffers used when returning
early from service_iq due to a budget restriction.  This fixes a potential
rx hang when using INTx.

MFC after: 3 days

10 years agoRemove extra copy of old email address.
emaste [Wed, 4 Jun 2014 20:05:52 +0000 (20:05 +0000)]
Remove extra copy of old email address.

MFC after: 3 days

10 years agoUpdate vt(4) console font author's email address
emaste [Wed, 4 Jun 2014 19:42:47 +0000 (19:42 +0000)]
Update vt(4) console font author's email address

MFC after: 3 days

10 years agoCross-reference jot(1) and seq(1).
kib [Wed, 4 Jun 2014 17:17:30 +0000 (17:17 +0000)]
Cross-reference jot(1) and seq(1).

MFC after: 3 days

10 years agoMore RSU fixes:
hselasky [Wed, 4 Jun 2014 16:58:35 +0000 (16:58 +0000)]
More RSU fixes:
- Properly align temporary buffer to 32-bit.
- Add an extra parenthesis to make expression clear.
- Range check the association ID received from hardware.

MFC after: 1 week

10 years agomake sure ifp->if_transmit returns 0 if a buffer is enqueued.
luigi [Wed, 4 Jun 2014 16:57:05 +0000 (16:57 +0000)]
make sure ifp->if_transmit returns 0 if a buffer is enqueued.
A similar fix should be applied to vmxnet, ixgbe, igb, i40e.
(some of them previously reported by Michael Tuexen)

Drivers using if_transmit are correct, and so are most of the
other drivers that reassing if_transmit.

Among other things, this bug causes panics when using netmap emulation
on top of generic drivers.

Approved by: bryanv
MFC after: 3 days

10 years agoSadly, we do not actually live in the future.
allanjude [Wed, 4 Jun 2014 16:55:38 +0000 (16:55 +0000)]
Sadly, we do not actually live in the future.

Approved by: wblock (mentor)

10 years agoBulk document the kern.geom.label.*.enable sysctls and tunables.
ivoras [Wed, 4 Jun 2014 16:29:18 +0000 (16:29 +0000)]
Bulk document the kern.geom.label.*.enable sysctls and tunables.

10 years agoFor Xeon 7500 and 48XX (Nehalem EX and Westmere EX) variants of the
kib [Wed, 4 Jun 2014 16:06:38 +0000 (16:06 +0000)]
For Xeon 7500 and 48XX (Nehalem EX and Westmere EX) variants of the
Core i7 and Westmere processors, the uncore PMC subsystem is
completely different from the uncore PMC on smaller versions of CPUs.
Disable existing uncore hwpmc code for EX, otherwise non-existing MSRs
are accessed.

The cores PMCs seems to be identical for non-EX and EX, according to
the SDM.

Reviewed by: davide, fabient
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoAllow shared locking for the tmpfs vnodes.
kib [Wed, 4 Jun 2014 15:30:49 +0000 (15:30 +0000)]
Allow shared locking for the tmpfs vnodes.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years ago- Add support for SG_GET_SG_TABLESIZE IOCTL to report that we don't support
mav [Wed, 4 Jun 2014 12:05:47 +0000 (12:05 +0000)]
- Add support for SG_GET_SG_TABLESIZE IOCTL to report that we don't support
scatter/gather lists.
- Return error for still unsupported SG 3.x API read/write calls.

MFC after: 1 month

10 years agoThe external USB HUB in the RPI-B rejects control endpoint traffic
hselasky [Wed, 4 Jun 2014 10:29:01 +0000 (10:29 +0000)]
The external USB HUB in the RPI-B rejects control endpoint traffic
using the BULK endpoint type, while other USB HUBs do not. Disable
endpoint type workaround for TT traffic.

MFC after: 3 days

10 years agoFixes for the RSU driver:
hselasky [Wed, 4 Jun 2014 09:18:13 +0000 (09:18 +0000)]
Fixes for the RSU driver:
- The R92S_TCR register is an 8-bit register. Don't access it like a
16-bit register.
- Disable parsing the delete station event, due to many false events.
- Ensure that there is only one transfer queue for each endpoint, so
that packets transmitted don't get out of order.

MFC after: 1 week

10 years ago- Naively fix build by partially reverting r267029 to still use
bdrewery [Wed, 4 Jun 2014 05:04:15 +0000 (05:04 +0000)]
- Naively fix build by partially reverting r267029 to still use
  gethrtime() when building libzpool.

X-MFC-With: 267029

10 years agoFurther updates to the netstat(1) man page and usage message
allanjude [Wed, 4 Jun 2014 04:18:33 +0000 (04:18 +0000)]
Further updates to the netstat(1) man page and usage message

- Reformat the entire man page
- Create a proper synopsis section
- Use itemized-lists to describe each flag, rather than paragraphs
- Cross-reference common flags to a 'general flags' sub-section with short
inline description of the flag
- Label 'general flags' sub-section
- Apply additional fixes suggested by wblock, brueffer, and bdrewery
- Update .Dd that got undone previously
- Change the order of the .Op Fl to be alphabetical
- Add the -i | -I interface flags to the description of 'interface
display mode'
- Fix missing parameters in man page
- Fix missing parameters in usage()
- Sync man page and usage()

MFC Note: stable/9 and stable/10 do not have -R, will need to be removed
when merged

CR: D58
Reviewed by: brueffer, bcr
Approved by: wblock (mentor)
MFC after: 7 days
Sponsored by: ScaleEngine Inc.

10 years agovt fontcvt: Use a hash to speed up glyph deduplication
emaste [Wed, 4 Jun 2014 03:02:49 +0000 (03:02 +0000)]
vt fontcvt: Use a hash to speed up glyph deduplication

Walking a linked list of all glyphs to look for a duplicate is very slow
for large fonts (e.g., for CJK character sets).  In my test the runtime
for a sample 40000 character font went from just over 80 seconds on
average to just over 2 seconds.

Sponsored by: The FreeBSD Foundation

10 years agoMerge (unused) documentation of WITHOUT_TESTS into WITH_TESTS.
jmmv [Tue, 3 Jun 2014 22:34:27 +0000 (22:34 +0000)]
Merge (unused) documentation of WITHOUT_TESTS into WITH_TESTS.

The description of WITH/WITHOUT tweaks should only document the non-default
option.  TESTS still defaults to no, so the option to be documented is
WITH_TESTS.

10 years agodon't check fs_flags for _FLAGS_UPDATED as it is stored in fs_old_flags..
jmg [Tue, 3 Jun 2014 21:46:13 +0000 (21:46 +0000)]
don't check fs_flags for _FLAGS_UPDATED as it is stored in fs_old_flags..
If you had a UFS2 FS that didn't have it's super block at SBLOCK_UFS2,
you'll end up corrupting your FS as the superblock is updated and written
to a different location...

makefs used to put the superblock at SBLOCK_UFS1 for UFS 2 FS's causing
this issue...

Reviewed by: silience from mckusick
MFC after: 1 week

10 years agoDon't leak Giant.
delphij [Tue, 3 Jun 2014 21:31:28 +0000 (21:31 +0000)]
Don't leak Giant.

Noticed by: Sascha Wildner (DragonFlyBSD) via IRC
Reviewed by: mav
MFC after: 3 days

10 years agoReplace gethrtime() with cpu_ticks(), as source of random for the taskqueue
mav [Tue, 3 Jun 2014 21:06:03 +0000 (21:06 +0000)]
Replace gethrtime() with cpu_ticks(), as source of random for the taskqueue
selection.  gethrtime() in our port updated with HZ rate, so unusable for
this specific purpose, completely draining benefit of multiple taskqueues.

MFC after: 2 weeks

10 years ago- Avoid calling a wrapper function around strcmp
gahr [Tue, 3 Jun 2014 20:59:26 +0000 (20:59 +0000)]
- Avoid calling a wrapper function around strcmp
- Use sizeof(*array) instead of sizeof(element) everywhere

CR: D161
Approved by: cognet, bapt

10 years ago- style, remove (void) in front of printf and the like
gahr [Tue, 3 Jun 2014 20:58:11 +0000 (20:58 +0000)]
- style, remove (void) in front of printf and the like

CR: D161
Approved by: cognet, bapt

10 years agoFreeBSD, historically, has always used 8-bit addresses for i2c devices
loos [Tue, 3 Jun 2014 19:24:53 +0000 (19:24 +0000)]
FreeBSD, historically, has always used 8-bit addresses for i2c devices
(7-bit device address << 1), always leaving the room for the read/write bit.

This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them
compatible with 8-bit addresses.  Previous to this commit an i2c device
would have different addresses depending on the controller it was attached
to (by example, when compared to any iicbb(4) based i2c controller), which
was a pretty annoying behavior.

Also, update the PMIC i2c address on beaglebone* DTS files to match the new
address scheme.

Now the userland utilities need to do the correct slave address shifting
(but it is going to work with any i2c controller on the system).

Discussed with: ian
MFC after: 2 weeks

10 years agoFix incorrect error handling in PAM policy parser. [SA-14:13]
delphij [Tue, 3 Jun 2014 19:01:38 +0000 (19:01 +0000)]
Fix incorrect error handling in PAM policy parser. [SA-14:13]

10 years agovt fontcvt: Make the bold font optional
emaste [Tue, 3 Jun 2014 17:54:18 +0000 (17:54 +0000)]
vt fontcvt: Make the bold font optional

Sponsored by: The FreeBSD Foundation

10 years agovt fontcvt: Make height and width optional arguments
emaste [Tue, 3 Jun 2014 17:53:11 +0000 (17:53 +0000)]
vt fontcvt: Make height and width optional arguments

Now defaults to a 16x8 font size.  The height and width can be specified
using -h and -w respectively.

Sponsored by: The FreeBSD Foundation

10 years agoRemove the unnecessary i2c slave address assignment.
loos [Tue, 3 Jun 2014 14:46:50 +0000 (14:46 +0000)]
Remove the unnecessary i2c slave address assignment.

The ti_i2c controller only works in the master mode and the i2c address
passed on iicbus_reset() is used to set the controller slave address when
operating as an i2c slave (which isn't currently supported).

When talking to a slave, the slave address is correctly provided to
ti_i2c_tranfer().

10 years agoFix case when vt(4) started w/o driver assigned.
ray [Tue, 3 Jun 2014 13:33:43 +0000 (13:33 +0000)]
Fix case when vt(4) started w/o driver assigned.
o Always init locks and cv ASAP.
o Initialize driver-independent parts even if driver probing fail.
o Allow to call vt_upgrade anytime, for later loaded drivers.
o New window flag VWF_READY, to track if window already initialized.
Other updates:
o Pass vd as a cookie for kbd_allocate.
o Do not blank window on driver replacement.

Tested by: hselasky (RPi), emaste(VGA, EFIFB, KMS), me

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years ago- Use strlen instead of hardcoding a number
gahr [Tue, 3 Jun 2014 07:11:22 +0000 (07:11 +0000)]
- Use strlen instead of hardcoding a number
- Terminate a sentence with a period

Approved by: cognet

10 years agoFix few outdated names of defines:
sobomax [Tue, 3 Jun 2014 05:19:10 +0000 (05:19 +0000)]
Fix few outdated names of defines:

o NR_REG_SW_NIC -> NR_REG_SW
o NR_RING_NIC_SW -> NR_REG_NIC_SW
o NETMAP_NO_TX_SYNC -> NETMAP_NO_TX_POLL
o NETMAP_DO_RX_SYNC -> NETMAP_DO_RX_POLL

I hope dear luigi has not left those as an excercise to careful
reader, in which case I apologize in advance for ruining his play.

MFC after:     1 week

10 years agoFix build UDP-Lite with VIMAGE enabled when building with gcc.
kevlo [Tue, 3 Jun 2014 01:30:32 +0000 (01:30 +0000)]
Fix build UDP-Lite with VIMAGE enabled when building with gcc.

Reported and tested by: Jason Hellenthal

10 years agohandle longer commands so that lines don't overflow... people who added
jmg [Mon, 2 Jun 2014 23:50:19 +0000 (23:50 +0000)]
handle longer commands so that lines don't overflow...  people who added
commands forgot to check this...

10 years agoadd Xref to sound(4)...
jmg [Mon, 2 Jun 2014 22:58:00 +0000 (22:58 +0000)]
add Xref to sound(4)...

MFC after: 1 week

10 years agoAdd missing Ivy Bridge and Haswell events.
gnn [Mon, 2 Jun 2014 20:50:08 +0000 (20:50 +0000)]
Add missing Ivy Bridge and Haswell events.

Submitted by: Anton Rang <rang@mac.com>
MFC: 2 weeks

10 years agoOverhaul CAM SG driver IOCTL interfaces.
mav [Mon, 2 Jun 2014 19:53:53 +0000 (19:53 +0000)]
Overhaul CAM SG driver IOCTL interfaces.

Make it really work for native FreeBSD programs.  Before this it was broken
for years due to different number of pointer dereferences in Linux and
FreeBSD IOCTL paths, permanently returning errors to FreeBSD programs.
This change breaks the driver FreeBSD IOCTL ABI, making it more strict,
but since it was not working any way -- who bother.

Add shims for 32-bit programs on 64-bit host, translating the argument
of the SG_IO IOCTL for both FreeBSD and Linux ABIs.

With this change I was able to run 32-bit Linux sg3_utils tools and simple
32 and 64-bit FreeBSD test tools on both 32 and 64-bit FreeBSD systems.

MFC after: 1 month

10 years agoConvert bxe(4) to use the driver API.
marcel [Mon, 2 Jun 2014 18:54:45 +0000 (18:54 +0000)]
Convert bxe(4) to use the driver API.

Submitted by:   Sreekanth Rupavatharam <rupavath@juniper.net>
Obtained from:  Juniper Networks, Inc.

10 years agoConvert em(4) to use the driver API.
marcel [Mon, 2 Jun 2014 18:52:03 +0000 (18:52 +0000)]
Convert em(4) to use the driver API.

Submitted by:   Anuranjan Shukla <anshukla@juniper.net>
Obtained from:  Juniper Networks, Inc.

10 years agoConvert fxp(4) to use the driver API.
marcel [Mon, 2 Jun 2014 18:45:36 +0000 (18:45 +0000)]
Convert fxp(4) to use the driver API.

Submitted by: Anuranjan Shukla <anshukla@juniper.net>
Obtained from: Juniper Networks, Inc.

10 years agoRemove extraneous "mkdir -p"
emaste [Mon, 2 Jun 2014 18:30:57 +0000 (18:30 +0000)]
Remove extraneous "mkdir -p"

The directory hierarchy is created by an mtree file (BSD.usr.dist,
in the case of calendar(1)).  An explicit "mkdir -p" in a program's
Makefile is redundant, and can mask a missing mtree entry.

10 years agoAdd convert_drvapi.sh; a script that helps to convert NIC drivers
marcel [Mon, 2 Jun 2014 18:02:10 +0000 (18:02 +0000)]
Add convert_drvapi.sh; a script that helps to convert NIC drivers
to use the procedural interface.

Submitted by: Sreekanth Rupavatharam <rupavath@juniper.net>
Reviewed by: glebius@
Obtained from: Juniper Networks, Inc.

10 years agoIntroduce a procedural interface to the ifnet structure. The new
marcel [Mon, 2 Jun 2014 17:54:39 +0000 (17:54 +0000)]
Introduce a procedural interface to the ifnet structure.  The new
interface allows the ifnet structure to be defined as an opaque
type in NIC drivers.  This then allows the ifnet structure to be
changed without a need to change or recompile NIC drivers.

Put differently, NIC drivers can be written and compiled once and
be used with different network stack implementations, provided of
course that those network stack implementations have an API and
ABI compatible interface.

This commit introduces the 'if_t' type to replace 'struct ifnet *'
as the type of a network interface. The 'if_t' type is defined as
'void *' to enable the compiler to perform type conversion to
'struct ifnet *' and vice versa where needed and without warnings.
The functions that implement the API are the only functions that
need to have an explicit cast.

The MII code has been converted to use the driver API to avoid
unnecessary code churn. Code churn comes from having to work with
both converted and unconverted drivers in correlation with having
callback functions that take an interface. By converting the MII
code first, the callback functions can be defined so that the
compiler will perform the typecasts automatically.

As soon as all drivers have been converted, the if_t type can be
redefined as needed and the API functions can be fix to not need
an explicit cast.

The immediate benefactors of this change are:
1.  Juniper Networks - The network stack implementation in Junos
    is entirely different from FreeBSD's one and this change
    allows Juniper to build "stock" NIC drivers that can be used
    in combination with both the FreeBSD and Junos stacks.
2.  FreeBSD - This change opens the door towards changing ifnet
    and implementing new features and optimizations in the network
    stack without it requiring a change in the many NIC drivers
    FreeBSD has.

Submitted by: Anuranjan Shukla <anshukla@juniper.net>
Reviewed by: glebius@
Obtained from: Juniper Networks, Inc.

10 years agoDocument the diskid automatic label class.
ivoras [Mon, 2 Jun 2014 15:05:25 +0000 (15:05 +0000)]
Document the diskid automatic label class.
While there, also document the glabel "native" labels and explain why
there are additional nodes created for nested GEOM classes.

Reminded by: jmg

10 years ago- Return NULL and set errno to EINVAL if size is 0 (as required by POSIX).
gahr [Mon, 2 Jun 2014 13:48:57 +0000 (13:48 +0000)]
- Return NULL and set errno to EINVAL if size is 0 (as required by POSIX).
Update the manpage to reflect this change.
- Always set the current position to the first null-byte when opening in append
mode. This makes the implementation compatible with glibc's. Update the test
suite.

Reported by: pho
Approved by: cognet

10 years agoChange type of the DMA address so that on PAE platforms we get can
hselasky [Mon, 2 Jun 2014 07:08:34 +0000 (07:08 +0000)]
Change type of the DMA address so that on PAE platforms we get can
64-bit DMA addresses even though the USB stack currently only uses
32-bit DMA.

Suggested by: Kohji Okuno <okuno.kohji@jp.panasonic.com>

10 years agoenable sound modules on arm.. This is necessary to get the uaudio
jmg [Mon, 2 Jun 2014 03:27:33 +0000 (03:27 +0000)]
enable sound modules on arm..  This is necessary to get the uaudio
module installed...

10 years agoNote that recording is not supported for snd_envy24*
bjk [Mon, 2 Jun 2014 03:07:16 +0000 (03:07 +0000)]
Note that recording is not supported for snd_envy24*

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

10 years agoDocument some more socket features
bjk [Mon, 2 Jun 2014 03:03:57 +0000 (03:03 +0000)]
Document some more socket features

Add some mention of the functions used by protocol implementations,
upcalls, and other general routines.

Not all functionality is documented; in particular:
o the *at() variants, which are useful only for implementing the
  corresponding syscalls.
o soconnect2(), also only used to implement a syscall (socketpair()).
o sockargs(), which is essentually unused and only tangentially
  socket-related.
o selsocket(), which is commented as being present solely for use by
  netncp and netsmb.
o getsockaddr(), which is just a convenience shortcut for copyin().

Reviewed by: jhb (previous version)
Approved by: hrs (mentor)

10 years agoNever, ever, abbreviate the month names on manual pages.
loos [Mon, 2 Jun 2014 02:20:28 +0000 (02:20 +0000)]
Never, ever, abbreviate the month names on manual pages.

Pointed out by: brueffer
Pointy hat to: loos

10 years agoConfigure the analog input 7 which, on BBB, is connected to the 3V3B rail
loos [Mon, 2 Jun 2014 02:00:17 +0000 (02:00 +0000)]
Configure the analog input 7 which, on BBB, is connected to the 3V3B rail
through a voltage divisor (R163 and R164 on page 4 of BBB schematic).

Add a note about this on ti_adc(4) man page.  The ti_adc(4) man page will
first appear on 10.1-RELEASE.

MFC after: 1 week
Suggested by: Sulev-Madis Silber (ketas)
Manual page reviewed by: brueffer (D127)

10 years agoarc: add linting for python files
eadler [Mon, 2 Jun 2014 00:21:42 +0000 (00:21 +0000)]
arc: add linting for python files

10 years agoDNOLD_IS_ECN introduced by r266941 is not required.
hiren [Sun, 1 Jun 2014 20:19:17 +0000 (20:19 +0000)]
DNOLD_IS_ECN introduced by r266941 is not required.
DNOLD_* flags are for compat with old binaries.

Suggested by: luigi

10 years agoSplit the virtio.h header file into multiple files
bryanv [Sun, 1 Jun 2014 18:16:01 +0000 (18:16 +0000)]
Split the virtio.h header file into multiple files

Reorganize the previous contexts of the file as it is in Linux. The
eventual goal is to install the header files and share them between
the kernel and bhyve.

MFC after: 1 week

10 years agoAdd ident value. This fixes universe build.
br [Sun, 1 Jun 2014 17:09:02 +0000 (17:09 +0000)]
Add ident value. This fixes universe build.

Pointed out by: andrew

10 years agoprintf: Install tests/regress.missingpos1.out, fixing tests.
jilles [Sun, 1 Jun 2014 13:33:22 +0000 (13:33 +0000)]
printf: Install tests/regress.missingpos1.out, fixing tests.

10 years agosh: Avoid undefined behaviour shifting negative values left in arithmetic.
jilles [Sun, 1 Jun 2014 11:25:34 +0000 (11:25 +0000)]
sh: Avoid undefined behaviour shifting negative values left in arithmetic.

With i386 base clang, arith_yacc.o remains unchanged.

10 years agoAdd basic support for isochronous transfers in host mode to the
hselasky [Sun, 1 Jun 2014 10:22:18 +0000 (10:22 +0000)]
Add basic support for isochronous transfers in host mode to the
ISP/SAF1761 driver.

Sponsored by: DARPA, AFRL

10 years agoFix i2c communication interface to be compatible with
br [Sun, 1 Jun 2014 08:45:27 +0000 (08:45 +0000)]
Fix i2c communication interface to be compatible with
vendor tools, e.g. embedded controller tool

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoRename exynos uart driver filenames.
br [Sun, 1 Jun 2014 08:34:45 +0000 (08:34 +0000)]
Rename exynos uart driver filenames.

10 years agoAdd support for Exynos 5420 Octa - 8-core
br [Sun, 1 Jun 2014 08:15:34 +0000 (08:15 +0000)]
Add support for Exynos 5420 Octa - 8-core
heterogeneous (big.LITTLE) ARM machine
(4 x Cortex-A15 @ 1.8Ghz, 4 x Cortex-A7 @ 1Ghz)

Add configuration for Arndale Octa development board

10 years agoDo only receive chars if there are some data in the buffer.
br [Sun, 1 Jun 2014 07:34:54 +0000 (07:34 +0000)]
Do only receive chars if there are some data in the buffer.
This fixes operation on newer Exynos boards.

10 years agoECN marking implenetation for dummynet.
hiren [Sun, 1 Jun 2014 07:28:24 +0000 (07:28 +0000)]
ECN marking implenetation for dummynet.
Changes include both DCTCP and RFC 3168 ECN marking methodology.

DCTCP draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00

Submitted by: Midori Kato (aoimidori27@gmail.com)
Worked with: Lars Eggert (lars@netapp.com)
Reviewed by: luigi, hiren

10 years agoSilence tinderbox build.
ganbold [Sun, 1 Jun 2014 05:02:48 +0000 (05:02 +0000)]
Silence tinderbox build.

Approved by:    stas (mentor)

10 years agoPin the right thread.
adrian [Sun, 1 Jun 2014 04:11:05 +0000 (04:11 +0000)]
Pin the right thread.

This _was_ right, a last minute suggestion and not enough testing makes
Adrian a bad boy.

Tested:

* igb(4) with RSS patches, by hand verifying each igb(4) taskqueue
  tid from procstat -ka using cpuset -g -t <tid>.

10 years agoAllow customization of the brand displayed in the boot menu.
rodrigc [Sun, 1 Jun 2014 04:08:45 +0000 (04:08 +0000)]
Allow customization of the brand displayed in the boot menu.
If the user specifies in /boot/loader.conf:

    loader_brand="mycustom-brand"

Then "mycustom-brand" will be executed instead of "fbsd-logo".

Submitted by:    alfred
Obtained from:   FreeNAS

10 years agoExport two new settings for the AM335x PWM, the clock prescaler (clkdiv)
loos [Sun, 1 Jun 2014 03:57:57 +0000 (03:57 +0000)]
Export two new settings for the AM335x PWM, the clock prescaler (clkdiv)
and the actual PWM frequency.

Enforce the maximum value for the period sysctl.

The frequency systcl now allows the direct setting of the PWM frequency (it
will try to find the better clkdiv and period for a given frequency, i.e.
the ones that will give the better PWM resolution).

This allows the use lower frequencies on the PWM.  Without changing the
clock prescaler the minimum PWM frequency was 1.52kHz.

PWM frequencies checked with an osciloscope.

PWM output tested with some R/C servos at 50Hz.

10 years agoAdds the bsnmp module to export the temperature data from lm75 sensors on
loos [Sun, 1 Jun 2014 03:14:03 +0000 (03:14 +0000)]
Adds the bsnmp module to export the temperature data from lm75 sensors on
the system.

Together with lm75(4) this module allows easy temperature monitoring over
SNMP, specially for embedded systems.

Manual page reviewed by:        brueffer (D128)

10 years agoUse MIN(a,b) from <sys/param.h> instead of rolling our own version.
neel [Sun, 1 Jun 2014 02:47:09 +0000 (02:47 +0000)]
Use MIN(a,b) from <sys/param.h> instead of rolling our own version.

Pointed out by: grehan

10 years agoLimit the maximum number of back-to-back iterations of a "rep; ins/outs"
neel [Sun, 1 Jun 2014 02:13:07 +0000 (02:13 +0000)]
Limit the maximum number of back-to-back iterations of a "rep; ins/outs"
to 16. This is arbitrary and is used to ensure that a vcpu goes back into
the vm_run() loop to process interrupts or rendezvous events in a timely
fashion.

Found with: Coverity Scan
CID: 1216436

10 years agoActivate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
neel [Sat, 31 May 2014 23:37:34 +0000 (23:37 +0000)]
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.

Add ioctl VM_GET_CPUS to get the current set of 'active' and 'suspended' cpus
and display them via /usr/sbin/bhyvectl using the "--get-active-cpus" and
"--get-suspended-cpus" options.

This is in preparation for being able to reset virtual machine state without
having to destroy and recreate it.

10 years agosh: Simplify find_command() slightly.
jilles [Sat, 31 May 2014 22:25:45 +0000 (22:25 +0000)]
sh: Simplify find_command() slightly.

10 years agoGrammar cleanup; sort SEE ALSO.
brueffer [Sat, 31 May 2014 21:12:14 +0000 (21:12 +0000)]
Grammar cleanup; sort SEE ALSO.

MFC after: 1 week