]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoWhen rerooting, ignore ESRCH returned from kill(2). I couldn't reproduce
trasz [Wed, 11 May 2016 09:30:18 +0000 (09:30 +0000)]
When rerooting, ignore ESRCH returned from kill(2).  I couldn't reproduce
this by myself, but apparently it sometimes happens when rerooting from
single user mode.

Reported by: jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoCosmetic fixes for growfs(8) - remove unneeded capitalization and a spurious
trasz [Wed, 11 May 2016 09:26:23 +0000 (09:26 +0000)]
Cosmetic fixes for growfs(8) - remove unneeded capitalization and a spurious
newline, clarify a message.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd more atomic LinuxKPI functions.
hselasky [Wed, 11 May 2016 07:58:43 +0000 (07:58 +0000)]
Add more atomic LinuxKPI functions.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoMake sdhci(4) work after suspend/resume for chipsets that require
trasz [Wed, 11 May 2016 07:50:35 +0000 (07:50 +0000)]
Make sdhci(4) work after suspend/resume for chipsets that require
the frequency quirk. This makes it work on eg ThinkPad T420.

Without it, after resume one can see this:

mmc0: ACMD42 failed, RESULT: 4
mmcsd0: Error indicated: 1 Timeout
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_pci0-slot0: Argument: 0x00000200 | Trn mode: 0x00000037
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000001
sdhci_pci0-slot0: Argument: 0x00000040 | Trn mode: 0x00000013
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
autofs_flush: /net flushed
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
autofs_flush: /media flushed
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================

Afterwards all operations on /dev/mmcsd0 fail with EIO.

Reviewed by: jhb@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6265

8 years agoUse vfs_hash_ref(9) to eliminate LK_EXCLOTHER kludge. As a
kib [Wed, 11 May 2016 06:35:46 +0000 (06:35 +0000)]
Use vfs_hash_ref(9) to eliminate LK_EXCLOTHER kludge.  As a
consequence, the nfs client override of VOP_LOCK1() is no longer
needed.

Reviewed and tested by: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoAdd vfs_hash_ref(9) function, which finds a vnode by the hash value
kib [Wed, 11 May 2016 06:32:22 +0000 (06:32 +0000)]
Add vfs_hash_ref(9) function, which finds a vnode by the hash value
and returns it referenced.

The function is similar to vfs_hash_get(9), but unlike the later,
returned vnode is not locked.  This operation cannot be requested with
the vget(9) flags.

Reviewed and tested by: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agosfxge(4): update unicast filter insertion algorithm
arybchik [Wed, 11 May 2016 06:29:07 +0000 (06:29 +0000)]
sfxge(4): update unicast filter insertion algorithm

As unicast filters are not chained, we should always try to insert the
specific filter for our MAC address, and then try to insert the unicast
mis-match filter if that fails or all unicast has been requested.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6295

8 years agosfxge(4): fix efx_filter_reconfigure parameter type
arybchik [Wed, 11 May 2016 06:28:08 +0000 (06:28 +0000)]
sfxge(4): fix efx_filter_reconfigure parameter type

This caused signed/unsigned errors in some subsequent patches.
The only value passed to this is a uint32_t.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6294

8 years ago[siba] add r4 and r8 sprom formats for core_pwr_info.
adrian [Wed, 11 May 2016 06:27:46 +0000 (06:27 +0000)]
[siba] add r4 and r8 sprom formats for core_pwr_info.

The upcoming bwn(4) N-PHY support requires this (among other things that
are (hopefully) upcoming.)

Obtained from: Linux ssb (definitions)

8 years agoStyle: wrap long lines.
kib [Wed, 11 May 2016 06:27:00 +0000 (06:27 +0000)]
Style: wrap long lines.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agosfxge(4): make efx_sram_test Siena-only
arybchik [Wed, 11 May 2016 06:21:07 +0000 (06:21 +0000)]
sfxge(4): make efx_sram_test Siena-only

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6293

8 years agosfxge(4): add new Emerald board sensors to common code
arybchik [Wed, 11 May 2016 06:19:53 +0000 (06:19 +0000)]
sfxge(4): add new Emerald board sensors to common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6292

8 years agosfxge(4): simplify efx_mac_select
arybchik [Wed, 11 May 2016 06:19:05 +0000 (06:19 +0000)]
sfxge(4): simplify efx_mac_select

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6291

8 years agosfxge(4): remove Falcon specific EV_GLOBAL support
arybchik [Wed, 11 May 2016 06:18:15 +0000 (06:18 +0000)]
sfxge(4): remove Falcon specific EV_GLOBAL support

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6290

8 years agosfxge(4): remove Falcon-specific code paths from common code
arybchik [Wed, 11 May 2016 06:16:53 +0000 (06:16 +0000)]
sfxge(4): remove Falcon-specific code paths from common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6289

8 years agosfxge(4): add TLV format buffer manipulation functions for V3 licensing
arybchik [Wed, 11 May 2016 06:15:07 +0000 (06:15 +0000)]
sfxge(4): add TLV format buffer manipulation functions for V3 licensing

The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6288

8 years agohyperv/hn: Extract RSS hash value and type.
sephe [Wed, 11 May 2016 03:31:25 +0000 (03:31 +0000)]
hyperv/hn: Extract RSS hash value and type.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6287

8 years agoDon't mark the initial portal registers as fully mapped.
jhibbits [Wed, 11 May 2016 00:41:40 +0000 (00:41 +0000)]
Don't mark the initial portal registers as fully mapped.

BMan and QMan will do this at attach time.  Even though the registers are mapped
now, dpaa_portal_map_registers() will be called at BMan and QMan attach time,
updating the mappings to be private, and in the case of cache-enabled registers,
marked as coherent memory mappings.

8 years agoUse DEVMETHOD_END instead of its value to indicate end of methods table
gonzo [Wed, 11 May 2016 00:34:43 +0000 (00:34 +0000)]
Use DEVMETHOD_END instead of its value to indicate end of methods table

8 years agoUse GPIO pin management API in gpiobacklight
gonzo [Wed, 11 May 2016 00:26:52 +0000 (00:26 +0000)]
Use GPIO pin management API in gpiobacklight

- Get rid of hack with re-parenting gpio-leds node to gpiobus
- Use gpio_pin_set_active to enable/disable backlight, it automatically
    takes care of active-low pins

8 years agoRename siba -> siba_s5, to specifically reference that it's for the
adrian [Tue, 10 May 2016 22:38:39 +0000 (22:38 +0000)]
Rename siba -> siba_s5, to specifically reference that it's for the
legacy siba sentry5 cpu glue.

The siba_cc code is the hard-coded chipcommon bits for the sentry s5,
which will eventually be replaced with the more flexible bhnd sipa/cc
code.

bwn, etc uses siba_bwn, which doesn't use siba or siba_cc to do anything.

8 years agoChange the default installation directory for modules to /boot/modules.
jhb [Tue, 10 May 2016 22:32:23 +0000 (22:32 +0000)]
Change the default installation directory for modules to /boot/modules.

Kernel installs always override KMODDIR when installing modules, so
this default setting is only used for standalone module builds.  Many
out-of-tree modules manually override KMODDIR already to avoid placing
modules in /boot/kernel.  This now makes that behavior the default.

Discussed on: arch@
Reviewed by: imp
Relnotes: yes

8 years agoAllow orm(4) to be disabled from probing/attaching by a hints entry:
bz [Tue, 10 May 2016 22:28:06 +0000 (22:28 +0000)]
Allow orm(4) to be disabled from probing/attaching by a hints entry:
hint.orm.0.disabled=1

Suggested by: jhb
Reviewed by: jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6307

8 years agoMove vm_domain_rr_selectdomain() under #ifdef VM_NUMA_ALLOC.
jhb [Tue, 10 May 2016 22:25:55 +0000 (22:25 +0000)]
Move vm_domain_rr_selectdomain() under #ifdef VM_NUMA_ALLOC.

The function had a null function body in the !VM_NUMA_ALLOC case but
also wasn't called in the !VM_NUMA_ALLOC case.

Suggested by: ngie

8 years agoMake libcrypto.so position independent on i386.
jkim [Tue, 10 May 2016 20:31:09 +0000 (20:31 +0000)]
Make libcrypto.so position independent on i386.

8 years agoFix DTrace test ATF wrapper generation.
markj [Tue, 10 May 2016 20:25:49 +0000 (20:25 +0000)]
Fix DTrace test ATF wrapper generation.

8 years agonetipsec: Fix minor style nit
cem [Tue, 10 May 2016 20:14:11 +0000 (20:14 +0000)]
netipsec: Fix minor style nit

Coverity points out that 'continue' is equivalent to 'break' in a do {}
while(false) loop.

Reported by: Coverity
CID: 1354983
Sponsored by: EMC / Isilon Storage Division

8 years agosdiff(1): Fix potential NULL deref in cleanup path
cem [Tue, 10 May 2016 20:09:40 +0000 (20:09 +0000)]
sdiff(1): Fix potential NULL deref in cleanup path

In the presence of the --diff-pid argument, it is possible for 'diffpipe' to be
NULL.  Only fclose() it if it was initialized.

Reported by: Coverity
CID: 1355183
Sponsored by: EMC / Isilon Storage Division

8 years agoPass device tree node as a part of gpio_pin_get_by_ofw_XXX API
gonzo [Tue, 10 May 2016 20:02:03 +0000 (20:02 +0000)]
Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API

Current API assumes that "gpios" property belongs to the device's node but for
some binding it's not true: gpiokeys has set of child nodes with this property.

Patch adds new argument instead of replacing device_t because device_t will be
used to track ownership for allocated pins

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D6277

8 years agoWhen PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid
manu [Tue, 10 May 2016 19:11:25 +0000 (19:11 +0000)]
When PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid
(>= 1 and <= real ncores) and set mp_ncpus to it.

Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6151

8 years agoUpdate the example growfs(8) manual page to include information on how
trasz [Tue, 10 May 2016 18:28:38 +0000 (18:28 +0000)]
Update the example growfs(8) manual page to include information on how
to make the system "notice" the updated disk size.

(Relnotes, since I've forget to set it for "camcontrol reprobe", and
it's worth mentioning.)

MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation

8 years agoEnsure waiting loops terminate during cold boot. This fixes boot with
hselasky [Tue, 10 May 2016 18:18:29 +0000 (18:18 +0000)]
Ensure waiting loops terminate during cold boot. This fixes boot with
MacBookPro and i915kms_load="YES" in /boot/loader.conf.

A lowlevel timeout in one of the display ports caused an infinite wait
because a ticks/jiffies comparison was constant. The clock subsystem
which makes ticks/jiffies increment is started after the initial
driver probing is done. Refer to sys/kernel.h and SI_SUB_DRIVERS vs
SI_SUB_CLOCKS .

Discussed with: kmacy @

8 years agoMerge a20_mp_start_ap and a31_mp_start_ap into one function.
manu [Tue, 10 May 2016 18:00:37 +0000 (18:00 +0000)]
Merge a20_mp_start_ap and a31_mp_start_ap into one function.
This function works with all smp non-multicluster allwinner SoC (A20, A31, A31S and H3).

Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D6269

8 years agoImplement ioremap_wt() and use that in the MEMREMAP_WT case for i386
hselasky [Tue, 10 May 2016 17:51:17 +0000 (17:51 +0000)]
Implement ioremap_wt() and use that in the MEMREMAP_WT case for i386
and amd64.

Suggested by: cem @
Discussed with: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agosed.1: Correction for the case insensitive case.
pfg [Tue, 10 May 2016 17:01:51 +0000 (17:01 +0000)]
sed.1: Correction for the case insensitive case.

Use the capital I instead of the lowercase.

Submitted by: Mikhail T.
PR: 195929
MFC after: 2 weeks

8 years agoaic7xxx: minor spelling fixes.
pfg [Tue, 10 May 2016 16:40:19 +0000 (16:40 +0000)]
aic7xxx: minor spelling fixes.

Affects mostly comments but also a visible text string,

Differential Revision: https://reviews.freebsd.org/D6270

8 years agoFix kernel LINT build after r299363.
hselasky [Tue, 10 May 2016 16:31:18 +0000 (16:31 +0000)]
Fix kernel LINT build after r299363.

Define shadowing macros the same way to avoid macro redefinition
compile error(s) for now.

Approved by: np @

8 years agoAllow sleepable allocations in enclosure daemon threads.
mav [Tue, 10 May 2016 16:20:36 +0000 (16:20 +0000)]
Allow sleepable allocations in enclosure daemon threads.

There were at least two places where M_NOWAIT was used without NULL check.
This change should fix NULL-dereference panic there and possibly improve
operation in other ways under memory pressure.

MFC after: 2 weeks

8 years agoAdd a missing section to a cross-reference.
jhb [Tue, 10 May 2016 16:13:54 +0000 (16:13 +0000)]
Add a missing section to a cross-reference.

While here, add bus_space(9) to the SEE ALSO section.

8 years agoAdd "camcontrol reprobe" subcommand, and implement it for da(4).
trasz [Tue, 10 May 2016 15:46:33 +0000 (15:46 +0000)]
Add "camcontrol reprobe" subcommand, and implement it for da(4).
This makes it possible to manually force updating capacity data
after the disk got resized. Without it it might be neccessary to
reboot before FreeBSD notices updated disk size under eg VMWare.

Discussed with: imp@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6108

8 years agoPush the logic to talk with the MSI/MSI-X interrupt controller to the FDT
andrew [Tue, 10 May 2016 15:45:59 +0000 (15:45 +0000)]
Push the logic to talk with the MSI/MSI-X interrupt controller to the FDT
attachment. This is where it will live when we import intrng as it will
need to look at either the msi-parent or msi-map FDT properties.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from mpr(4).
trasz [Tue, 10 May 2016 15:04:24 +0000 (15:04 +0000)]
Remove NULL checks after M_WAITOK allocations from mpr(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6297

8 years agosiba depends on bhndbus; add the device to the kernel config.
bz [Tue, 10 May 2016 14:59:48 +0000 (14:59 +0000)]
siba depends on bhndbus; add the device to the kernel config.
This gets us past compiling and now only linking is failing on builtins.

8 years agoRemove NULL checks after M_WAITOK allocations from mps(4).
trasz [Tue, 10 May 2016 14:57:14 +0000 (14:57 +0000)]
Remove NULL checks after M_WAITOK allocations from mps(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6296

8 years agobsdinstall/zfsboot: Do not mirror swap when swapsize is 0
allanjude [Tue, 10 May 2016 14:38:43 +0000 (14:38 +0000)]
bsdinstall/zfsboot: Do not mirror swap when swapsize is 0

PR: 209415
Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after: 2 weeks

8 years agoCapitalize "LDAP" in the description field of the _ypldap entry.
bcr [Tue, 10 May 2016 12:47:36 +0000 (12:47 +0000)]
Capitalize "LDAP" in the description field of the _ypldap entry.

Reviewed by: bapt
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D5267

8 years agoAdd more LinuxKPI I/O functions.
hselasky [Tue, 10 May 2016 12:04:57 +0000 (12:04 +0000)]
Add more LinuxKPI I/O functions.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoUse function macros when possible to avoid stray substitutions.
hselasky [Tue, 10 May 2016 11:39:36 +0000 (11:39 +0000)]
Use function macros when possible to avoid stray substitutions.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:35:03 +0000 (11:35 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoAdd missing semicolon and properly wrap macro argument.
hselasky [Tue, 10 May 2016 11:34:22 +0000 (11:34 +0000)]
Add missing semicolon and properly wrap macro argument.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
hselasky [Tue, 10 May 2016 11:31:00 +0000 (11:31 +0000)]
Allow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
point to a constant.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDirectly set the NONBLOCK flags when creating the socket
bapt [Tue, 10 May 2016 11:18:53 +0000 (11:18 +0000)]
Directly set the NONBLOCK flags when creating the socket

No functional changes

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:17:36 +0000 (11:17 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:17:19 +0000 (11:17 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:12:31 +0000 (11:12 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:11:23 +0000 (11:11 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:09:26 +0000 (11:09 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: OpenBSD

8 years agoRemove misc NULL checks after M_WAITOK allocations.
trasz [Tue, 10 May 2016 10:26:07 +0000 (10:26 +0000)]
Remove misc NULL checks after M_WAITOK allocations.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL check after M_WAITOK allocations from mfi(4).
trasz [Tue, 10 May 2016 10:24:35 +0000 (10:24 +0000)]
Remove NULL check after M_WAITOK allocations from mfi(4).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from firewire.
trasz [Tue, 10 May 2016 10:21:03 +0000 (10:21 +0000)]
Remove NULL checks after M_WAITOK allocations from firewire.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd locking annotations to amd64 struct md_page members.
kib [Tue, 10 May 2016 09:58:51 +0000 (09:58 +0000)]
Add locking annotations to amd64 struct md_page members.

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

8 years agoRefactor the root mount hold code and add the wait to etc/rc.d/fsck.
trasz [Tue, 10 May 2016 08:44:44 +0000 (08:44 +0000)]
Refactor the root mount hold code and add the wait to etc/rc.d/fsck.
This fixes mounting (non-root) USB drives on boot with fsck enabled
(with non-zero 'Pass#' field in fstab(5)).

Reported by: Graham Menhennitt <graham at menhennitt.com.au>
Reviewed by: jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6221

8 years agoFix previous commit to report proper error code.
mav [Tue, 10 May 2016 08:37:41 +0000 (08:37 +0000)]
Fix previous commit to report proper error code.

MFC after: 2 weeks

8 years agoValidate XCOPY range offsets and lengths.
mav [Tue, 10 May 2016 08:28:16 +0000 (08:28 +0000)]
Validate XCOPY range offsets and lengths.

MFC after: 2 weeks

8 years agoMore XCOPY parameters validation.
mav [Tue, 10 May 2016 08:08:39 +0000 (08:08 +0000)]
More XCOPY parameters validation.

MFC after: 2 weeks

8 years agosfxge(4): cleanup: fix typo
arybchik [Tue, 10 May 2016 08:00:40 +0000 (08:00 +0000)]
sfxge(4): cleanup: fix typo

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove unneeded include files
arybchik [Tue, 10 May 2016 07:59:23 +0000 (07:59 +0000)]
sfxge(4): cleanup: remove unneeded include files

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoRename dprintf into dbg_printf to avoid collision with dprintf(3)
bapt [Tue, 10 May 2016 07:52:17 +0000 (07:52 +0000)]
Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agorename getline into zgetline to avoid collision with getline(3)
bapt [Tue, 10 May 2016 07:50:57 +0000 (07:50 +0000)]
rename getline into zgetline to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD

8 years agoRename dprintf into dbg_printf to avoid collision with dprintf(3)
bapt [Tue, 10 May 2016 07:45:44 +0000 (07:45 +0000)]
Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agosfxge(4): cleanup: remove unused efx_infer_family()
arybchik [Tue, 10 May 2016 07:42:18 +0000 (07:42 +0000)]
sfxge(4): cleanup: remove unused efx_infer_family()

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove obsolete common code module
arybchik [Tue, 10 May 2016 07:40:03 +0000 (07:40 +0000)]
sfxge(4): cleanup: remove obsolete common code module

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: fix typos
arybchik [Tue, 10 May 2016 07:38:23 +0000 (07:38 +0000)]
sfxge(4): cleanup: fix typos

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup efx_check.h comments and error messages
arybchik [Tue, 10 May 2016 07:22:19 +0000 (07:22 +0000)]
sfxge(4): cleanup efx_check.h comments and error messages

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_TXC43128
arybchik [Tue, 10 May 2016 07:21:14 +0000 (07:21 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_TXC43128

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_SFX7101
arybchik [Tue, 10 May 2016 07:20:18 +0000 (07:20 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_SFX7101

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_SFT9001
arybchik [Tue, 10 May 2016 07:19:15 +0000 (07:19 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_SFT9001

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_QT2025C
arybchik [Tue, 10 May 2016 07:18:18 +0000 (07:18 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_QT2025C

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_QT2022C2
arybchik [Tue, 10 May 2016 07:17:08 +0000 (07:17 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_QT2022C2

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_NULL
arybchik [Tue, 10 May 2016 07:15:57 +0000 (07:15 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_NULL

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_NVRAM_SFX7101
arybchik [Tue, 10 May 2016 07:15:09 +0000 (07:15 +0000)]
sfxge(4): remove EFSYS_OPT_NVRAM_SFX7101

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoImprove validation of some POPULATE TOKEN parameters.
mav [Tue, 10 May 2016 07:14:49 +0000 (07:14 +0000)]
Improve validation of some POPULATE TOKEN parameters.

MFC after: 2 weeks

8 years agosfxge(4): remove EFSYS_OPT_NVRAM_SFT9001
arybchik [Tue, 10 May 2016 07:13:45 +0000 (07:13 +0000)]
sfxge(4): remove EFSYS_OPT_NVRAM_SFT9001

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_FALCON_BOOTROM
arybchik [Tue, 10 May 2016 07:12:27 +0000 (07:12 +0000)]
sfxge(4): remove EFSYS_OPT_FALCON_BOOTROM

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MON_NULL
arybchik [Tue, 10 May 2016 07:11:09 +0000 (07:11 +0000)]
sfxge(4): remove EFSYS_OPT_MON_NULL

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MON_MAX6647
arybchik [Tue, 10 May 2016 07:09:18 +0000 (07:09 +0000)]
sfxge(4): remove EFSYS_OPT_MON_MAX6647

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MON_LM87
arybchik [Tue, 10 May 2016 07:08:40 +0000 (07:08 +0000)]
sfxge(4): remove EFSYS_OPT_MON_LM87

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MAC_FALCON_XMAC
arybchik [Tue, 10 May 2016 07:07:49 +0000 (07:07 +0000)]
sfxge(4): remove EFSYS_OPT_MAC_FALCON_XMAC

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MAC_FALCON_GMAC
arybchik [Tue, 10 May 2016 07:06:44 +0000 (07:06 +0000)]
sfxge(4): remove EFSYS_OPT_MAC_FALCON_GMAC

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
arybchik [Tue, 10 May 2016 07:02:59 +0000 (07:02 +0000)]
sfxge(4): remove EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_FALCON
arybchik [Tue, 10 May 2016 07:01:06 +0000 (07:01 +0000)]
sfxge(4): remove EFSYS_OPT_FALCON

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): add TLV item manipulation functions to common code
arybchik [Tue, 10 May 2016 06:53:38 +0000 (06:53 +0000)]
sfxge(4): add TLV item manipulation functions to common code

Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code.  Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format.  Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6264

8 years agosfxge(4): restructure TLV buffer validation
arybchik [Tue, 10 May 2016 06:51:20 +0000 (06:51 +0000)]
sfxge(4): restructure TLV buffer validation

Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6263

8 years agoRevert r299292, which was not a mismerge. It has an additional horrible
gjb [Tue, 10 May 2016 05:47:25 +0000 (05:47 +0000)]
Revert r299292, which was not a mismerge.  It has an additional horrible
side effect of replacing /etc/{master.,}passwd and /etc/group.

Submitted by: O. Hartmann
Pointyhat to: gjb (myself)
Sponsored by: The FreeBSD Foundation

8 years ago[siba] migrate siba.c to siba_mips.c
adrian [Tue, 10 May 2016 05:05:23 +0000 (05:05 +0000)]
[siba] migrate siba.c to siba_mips.c

Turns out that ye olde siba.c is /just/ the siba mips code (used by
the initial SENTRY5 port.  However, I don't think it was ever
finished enough to be useful, and I do have this nagging feeling
that we'll eventually replace it with the bhnd code.

But, since bhnd(4) introduced siba.c too, we ended up with a
source file name clash, and that broke the SENTRY5 build.

It /looks/ like this is the only place siba.c / device siba is
used.

8 years agotcp/syncache: Add comment for syncache_respond
sephe [Tue, 10 May 2016 04:59:04 +0000 (04:59 +0000)]
tcp/syncache: Add comment for syncache_respond

Suggested by: hiren, hps
Reviewed by: sbruno
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6148

8 years ago[bhnd] fix bcma resource allocation for regions; EROM work around.
adrian [Tue, 10 May 2016 04:55:57 +0000 (04:55 +0000)]
[bhnd] fix bcma resource allocation for regions; EROM work around.

* bcma.c - assign different resource IDs for different regions
* bcma_erom.c - workaround for BCM/MIPS bus enumerations

Tested:

* (submitter) Tested on ASUS RT-N16 initially, double checked on ASUS RT-N53
* (landonf) BCM4331

Submitted by: Michael Zhilin <mizkha@gmail.com>
Differential Revision: https://reviews.freebsd.org/D6245

8 years agoBump date. Forgotten in r299312.
imp [Tue, 10 May 2016 04:01:04 +0000 (04:01 +0000)]
Bump date. Forgotten in r299312.

8 years agoDocument g_reset_bio(). This is long overdue. g_reset_bio will reset
imp [Tue, 10 May 2016 03:57:47 +0000 (03:57 +0000)]
Document g_reset_bio(). This is long overdue. g_reset_bio will reset
the bio to a pristine state should you wish to re-use it for another
I/O without freeing it. In the bast, a simple bzero was done to do
this, but that may not be sufficient in the future when the bio may
contain state that's not part of the documented API. Besides, it makes
the code clearer as to the intent...

Noticed by: smh@

8 years agoDon't store generated firmware object files in the source directory.
jhb [Tue, 10 May 2016 03:34:20 +0000 (03:34 +0000)]
Don't store generated firmware object files in the source directory.

Trim the leading directory of a firmware source file from the resulting
target object file name so the object file is stored in the object
directory. Previously, using 'FIRMWS= /path/to/fw.bin:fw.bin' would
store the generated 'fw.bin.fwo' file in the /path/to directory. Now
it stores it in the object directory of the kernel module being built.

Reviewed by: bdrewery
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6285