]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoNTB: Style(9) cleanups
Conrad Meyer [Tue, 13 Oct 2015 03:12:55 +0000 (03:12 +0000)]
NTB: Style(9) cleanups

8 years agoNTB: MFV 948d3a65: Xeon Errata Workaround
Conrad Meyer [Tue, 13 Oct 2015 03:12:11 +0000 (03:12 +0000)]
NTB: MFV 948d3a65: Xeon Errata Workaround

There is a Xeon hardware errata related to writes to SDOORBELL or B2BDOORBELL
in conjunction with inbound access to NTB MMIO Space, which may hang the
system.  To workaround this issue, use one of the memory windows to access the
interrupt and scratch pad registers on the remote system.  This bypasses the
issue, but removes one of the memory windows from use by the transport.  This
reduction of MWs necessitates adding some logic to determine the number of
available MWs.

Since some NTB usage methodologies may have unidirectional traffic, the ability
to disable the workaround via modparm has been added.

See BF113 in
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-c5500-c3500-spec-update.pdf
See BT119 in
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e5-family-spec-update.pdf

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Add hw.ntb sysctl node
Conrad Meyer [Tue, 13 Oct 2015 03:11:21 +0000 (03:11 +0000)]
NTB: Add hw.ntb sysctl node

8 years agoNTB: MFV b6750cfe: Correct USD/DSD Identification
Conrad Meyer [Tue, 13 Oct 2015 03:10:36 +0000 (03:10 +0000)]
NTB: MFV b6750cfe: Correct USD/DSD Identification

Due to ambiguous documentation, the USD/DSD identification is backward
when compared to the setting in BIOS.  Correct the bits to match the
BIOS setting.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV 87034511: Correct Number of Scratch Pad Registers
Conrad Meyer [Tue, 13 Oct 2015 03:10:04 +0000 (03:10 +0000)]
NTB: MFV 87034511: Correct Number of Scratch Pad Registers

The NTB Xeon hardware has 16 scratch pad registers and 16 back-to-back
scratch pad registers.  Correct the #define to represent this and update
the variable names to reflect their usage.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agocasperd: bump default socket queue length to SOMAXCONN; make length configurable.
Adrian Chadd [Tue, 13 Oct 2015 02:34:41 +0000 (02:34 +0000)]
casperd: bump default socket queue length to SOMAXCONN; make length configurable.

The current default listen queue for casperd is too small (8) and
hard-coded.

This patch increases the default to SOMAXCONN, and introduces a command
line flag that can used to further increase or decrease the queue length.

PR: bin/202147
Submitted by: <lidl@pix.net>

8 years agomakefs: introduce a new option to specify what to round the resulting
Adrian Chadd [Tue, 13 Oct 2015 02:32:15 +0000 (02:32 +0000)]
makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR: bin/203707
Submitted by: <eugen@grosbein.net>

8 years agoEnsure the client regions for unmapped bounce buffers created through bus_dmamap_load...
Jason A. Harmening [Tue, 13 Oct 2015 02:17:56 +0000 (02:17 +0000)]
Ensure the client regions for unmapped bounce buffers created through bus_dmamap_load_phys() do not span multiple pages.
This is already done for mapped buffers.
While here, stop casting bus_addr_t to vm_offset_t.

8 years agoiw_cxgbe: MPA v2 is always available.
Navdeep Parhar [Tue, 13 Oct 2015 01:04:38 +0000 (01:04 +0000)]
iw_cxgbe: MPA v2 is always available.

Submitted by: Krishnamraju Eraparaju at chelsio dot com
Reviewed by: Steve Wise at opengridcomputing dot com

8 years agoIf world is built with a custom sendmail.cf, use it for the distribution
Peter Wemm [Mon, 12 Oct 2015 21:02:36 +0000 (21:02 +0000)]
If world is built with a custom sendmail.cf, use it for the distribution
target.  This is the feeder for mergemaster / etcupdate.  This change
makes installworld/mergemaster/etcupdate behave the same regardless of
whether SENDMAIL_MC or SENDMAIL_CF is used.

If you use a custom SENDMAIL_MC/CF in make.conf and excluded it from
mergemaster.rc/etcupdate.conf to work around the conflicts, you may wish
to revert that or change it from 'ignore' to 'always install'.

If you do not use a custom SENDMAIL_MC/CF, there should be no change in
behavior.

8 years agoAdd support for reading device temperature
David C Somayajulu [Mon, 12 Oct 2015 20:21:17 +0000 (20:21 +0000)]
Add support for reading device temperature

MFC after:5 days

8 years agoIntegrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
Enji Cooper [Mon, 12 Oct 2015 18:31:21 +0000 (18:31 +0000)]
Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFreeBSD-specific addition to r289191.
Alexander Motin [Mon, 12 Oct 2015 18:15:25 +0000 (18:15 +0000)]
FreeBSD-specific addition to r289191.

8 years agoMFV r289188: 6281 prefetching should apply to 1MB reads
Alexander Motin [Mon, 12 Oct 2015 15:48:45 +0000 (15:48 +0000)]
MFV r289188: 6281 prefetching should apply to 1MB reads

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f

8 years agoMFV r289187: 6251 add tunable to disable free_bpobj processing
Alexander Motin [Mon, 12 Oct 2015 15:44:44 +0000 (15:44 +0000)]
MFV r289187: 6251 add tunable to disable free_bpobj processing

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1

8 years agoMFV r289185: 6250 zvol_dump_init() can hold txg open
Alexander Motin [Mon, 12 Oct 2015 15:39:03 +0000 (15:39 +0000)]
MFV r289185: 6250 zvol_dump_init() can hold txg open

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece

8 years agoAdd missing commas
Ed Maste [Mon, 12 Oct 2015 15:35:34 +0000 (15:35 +0000)]
Add missing commas

Pointy hat to: kan
Obtained from: ELF Tool Chain r3253

8 years ago6281 prefetching should apply to 1MB reads
Alexander Motin [Mon, 12 Oct 2015 14:27:27 +0000 (14:27 +0000)]
6281 prefetching should apply to 1MB reads

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f

8 years ago6251 add tunable to disable free_bpobj processing
Alexander Motin [Mon, 12 Oct 2015 14:24:11 +0000 (14:24 +0000)]
6251 add tunable to disable free_bpobj processing

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1

8 years agoFix indentation in etc/rc.d/fsck.
Eric van Gyzen [Mon, 12 Oct 2015 14:23:10 +0000 (14:23 +0000)]
Fix indentation in etc/rc.d/fsck.

MFC after: 3 days
Sponsored by: Dell Inc.

8 years ago6250 zvol_dump_init() can hold txg open
Alexander Motin [Mon, 12 Oct 2015 14:23:00 +0000 (14:23 +0000)]
6250 zvol_dump_init() can hold txg open

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece

8 years agoUpdate from svn-1.8.14 to 1.9.2.
Peter Wemm [Mon, 12 Oct 2015 09:53:55 +0000 (09:53 +0000)]
Update from svn-1.8.14 to 1.9.2.

Formal release notes are available:
  https://subversion.apache.org/docs/release-notes/1.9.html

Of particular note, the client checkout format has *not* changed so
upgrades should *not* be required.

When reading a repository (file:// or running as a local server), an
improved fsfs version 7 is available with significant performance
improvements.  An optional upgrade is possible to use the new features.
Without the upgrade, this is fully read/write compatible with the
version 6 fsfs as in svn-1.8.

Relnotes: yes

8 years agoVendor import of subversion-1.9.2
Peter Wemm [Mon, 12 Oct 2015 08:54:49 +0000 (08:54 +0000)]
Vendor import of subversion-1.9.2

8 years agoAccept any correct frames from any source when MONITOR mode is used.
Kevin Lo [Mon, 12 Oct 2015 08:17:21 +0000 (08:17 +0000)]
Accept any correct frames from any source when MONITOR mode is used.

Submitted by: Andriy Voskoboinyk <s3erios at gmail.com>
Differential Revision: https://reviews.freebsd.org/D3812

8 years agoRefactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
Enji Cooper [Mon, 12 Oct 2015 08:16:03 +0000 (08:16 +0000)]
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison

8 years agonet80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used...
Adrian Chadd [Mon, 12 Oct 2015 05:21:51 +0000 (05:21 +0000)]
net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used here)

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3776

8 years agourtwn(4): split *reg and *var parts (no functional change).
Adrian Chadd [Mon, 12 Oct 2015 05:14:49 +0000 (05:14 +0000)]
urtwn(4): split *reg and *var parts (no functional change).

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3775

8 years agonet80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_ra...
Adrian Chadd [Mon, 12 Oct 2015 04:55:20 +0000 (04:55 +0000)]
net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output().

This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still
doing that.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3774

8 years agonet80211: free node reference in the ieee80211_parent_xmitpkt() when error happened.
Adrian Chadd [Mon, 12 Oct 2015 04:30:38 +0000 (04:30 +0000)]
net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened.

Move error handling into ieee80211_parent_xmitpkt() instead of spreading it
between functions.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3772

8 years agowpi(4): add support for TX fragmentation.
Adrian Chadd [Mon, 12 Oct 2015 04:05:12 +0000 (04:05 +0000)]
wpi(4): add support for TX fragmentation.

Tested:

* Tested with Intel 3945BG, HOSTAP and STA modes

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

8 years agonet80211: separate mbuf cleanup from ieee80211_fragment()
Adrian Chadd [Mon, 12 Oct 2015 03:27:08 +0000 (03:27 +0000)]
net80211: separate mbuf cleanup from ieee80211_fragment()

* Create ieee80211_free_mbuf() which frees a list of mbufs.
* Use it in the fragment transmit path and ath / uath transmit paths.
* Call it in xmit_pkt() if the transmission fails; otherwise fragments
  may be leaked.

This should be a big no-op.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3769

8 years agoRevert r289150:
Pedro F. Giffuni [Mon, 12 Oct 2015 02:05:25 +0000 (02:05 +0000)]
Revert r289150:
Correct handling of enum attributes with g++

It is causing issues on some platforms.

Reported by: sbruno (through adrian)

8 years agosh: Make struct arglist an array instead of a linked list.
Jilles Tjoelker [Sun, 11 Oct 2015 21:33:00 +0000 (21:33 +0000)]
sh: Make struct arglist an array instead of a linked list.

This simplifies the code (e.g. allowing use of qsort(3) instead of a
hand-rolled mergesort) and should have better cache properties.

The waste of unused args arrays after resizes is approximately the same as
the savings from getting rid of the next pointers.

At the same time, remove a piece of global state and move some duplicated
code into a function.

8 years agoDefault TESTSDIR to /usr/tests/${RELDIR:H}
Enji Cooper [Sun, 11 Oct 2015 21:29:24 +0000 (21:29 +0000)]
Default TESTSDIR to /usr/tests/${RELDIR:H}

When run from bin/ls/tests, for example, the value of TESTSDIR would be
${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. ->
/usr/tests/bin/ls

Document the new behavior in bsd.README.

While here, also document TESTSBASE

Relnotes: yes
Differential Revision: D1022
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV c336acd3: memcpy lockup workaround
Conrad Meyer [Sun, 11 Oct 2015 21:01:14 +0000 (21:01 +0000)]
NTB: MFV c336acd3: memcpy lockup workaround

The system will appear to lockup for long periods of time due to the NTB
driver spending too much time in memcpy.  Avoid this by reducing the
number of packets that can be serviced on a given interrupt.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size
Conrad Meyer [Sun, 11 Oct 2015 21:00:19 +0000 (21:00 +0000)]
NTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size

The ring logic of the NTB receive buffer/transmit memory window requires
there to be at least 2 payload sized allotments.  For the minimal size
case, split the buffer into two and set the transport_mtu to the
appropriate size.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV 90f9e934: reset tx_index on link toggle
Conrad Meyer [Sun, 11 Oct 2015 20:59:40 +0000 (20:59 +0000)]
NTB: MFV 90f9e934: reset tx_index on link toggle

If the NTB link toggles, the driver could stop receiving due to the
tx_index not being set to 0 on the transmitting size on a link-up event.
This is due to the driver expecting the incoming data to start at the
beginning of the receive buffer and not at a random place.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV b77b2637: Link toggle memory leak
Conrad Meyer [Sun, 11 Oct 2015 20:59:02 +0000 (20:59 +0000)]
NTB: MFV b77b2637: Link toggle memory leak

Each link-up will allocate a new NTB receive buffer when the NTB
properties are negotiated with the remote system.  These allocations did
not check for existing buffers and thus did not free them.  Now, the
driver will check for an existing buffer and free it if not of the
correct size, before trying to alloc a new one.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV 113fc505: Handle 64bit BAR sizes
Conrad Meyer [Sun, 11 Oct 2015 20:58:00 +0000 (20:58 +0000)]
NTB: MFV 113fc505: Handle 64bit BAR sizes

64bit BAR sizes are permissible with an NTB device.  To support them
various modifications and clean-ups were required, most significantly
using 2 32bit scratch pad registers for each BAR.

Also, modify the driver to allow more than 2 Memory Windows.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV cc0f868d: fix pointer math issues
Conrad Meyer [Sun, 11 Oct 2015 20:57:09 +0000 (20:57 +0000)]
NTB: MFV cc0f868d: fix pointer math issues

->remote_rx_info and ->rx_info are struct ntb_rx_info pointers.  If we
add sizeof(struct ntb_rx_info) then it goes too far.

Authored by: Dan Carpenter
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

8 years agoSimplify netbsd-tests.test.mk
Enji Cooper [Sun, 11 Oct 2015 20:02:10 +0000 (20:02 +0000)]
Simplify netbsd-tests.test.mk

- projects/bmake and subsequent commits provide SRCTOP; there's no need to
  manually specify it now.
- Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually
  specifying this is probably no longer needed, but it persists just in case
  (supporting commits will need to be made to move it out of some of the meta
  .mk files).
- Compute a sane default for TESTSRC. Error out if the path cannot be found.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoCorrect handling of enum attributes with g++
Pedro F. Giffuni [Sun, 11 Oct 2015 19:58:57 +0000 (19:58 +0000)]
Correct handling of enum attributes with g++

From OpenBSD's commit log:

This was responsible for memory corruption with recent versions
of Mesa where c and c++ code share a header with a packed enum type.

Reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219

Obtained from: OpenBSD (CVS rev. 1.2)
MFC after: 1 week

8 years agoUse existing CONFDIR instead of adding a new CONFIGDIR
Baptiste Daroussin [Sun, 11 Oct 2015 19:25:39 +0000 (19:25 +0000)]
Use existing CONFDIR instead of adding a new CONFIGDIR

Reported by: jbeich

8 years agoCorrect flash layout (this is a 4M flash unit).
Sean Bruno [Sun, 11 Oct 2015 18:37:29 +0000 (18:37 +0000)]
Correct flash layout (this is a 4M flash unit).

Remove "rootfs" entry and assign the 800K or so to the kernel
partition as this unit boots from usb mass storage.

8 years agoMake delete method set via kern.cam.da.X.delete_method persistent.
Alexander Motin [Sun, 11 Oct 2015 18:26:06 +0000 (18:26 +0000)]
Make delete method set via kern.cam.da.X.delete_method persistent.

This allows to set delete method via tunable, before device capabilities
are known.  Also allow ZERO method for devices not reporting LBP, if user
explicitly requests it -- it may be useful if storage supports compression
and WRITE SAME, but does not support UNMAP.

MFC after: 2 weeks

8 years agoFix build with gcc 4.2
Baptiste Daroussin [Sun, 11 Oct 2015 17:45:20 +0000 (17:45 +0000)]
Fix build with gcc 4.2

8 years agoRemove legacy CHS geometry from dmesg and unify capacity outputs.
Alexander Motin [Sun, 11 Oct 2015 13:48:20 +0000 (13:48 +0000)]
Remove legacy CHS geometry from dmesg and unify capacity outputs.

8 years agoRemove compatibility shims for legacy ATA device names.
Alexander Motin [Sun, 11 Oct 2015 13:01:51 +0000 (13:01 +0000)]
Remove compatibility shims for legacy ATA device names.

We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely
removed old stack at 10.x, so at 11.x it is time to remove compat shims.

8 years agoRemove lock upgrade attempt from ctl_be_block_open_file().
Alexander Motin [Sun, 11 Oct 2015 08:28:49 +0000 (08:28 +0000)]
Remove lock upgrade attempt from ctl_be_block_open_file().

I am not sure what for it was done.  Now open routine should automatically
fall back to read-only if open for writing is impossible.  In such case
attempt to upgrade to write sounds strange.

MFC after: 1 week

8 years agoUse machine specific values cleaned from openwrt for the mac address
Sean Bruno [Sun, 11 Oct 2015 03:31:11 +0000 (03:31 +0000)]
Use machine specific values cleaned from openwrt for the mac address
location on the TP link mr3020

8 years agowpi(4): do not count failures twice for ic_raw_xmit().
Adrian Chadd [Sun, 11 Oct 2015 02:00:08 +0000 (02:00 +0000)]
wpi(4): do not count failures twice for ic_raw_xmit().

Tested:

* Tested with Intel 3945BG, STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3768

8 years agowpi(4): move error handling upper (wpi_tx_data()/wpi_cmd2() -> wpi_raw_xmit()/wpi_tra...
Adrian Chadd [Sun, 11 Oct 2015 01:58:50 +0000 (01:58 +0000)]
wpi(4): move error handling upper (wpi_tx_data()/wpi_cmd2() -> wpi_raw_xmit()/wpi_transmit()).

Tested:

* Tested with Intel 3945BG, STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3767

8 years agowpi(4): fix possible race between TX/RX threads.
Adrian Chadd [Sun, 11 Oct 2015 01:56:46 +0000 (01:56 +0000)]
wpi(4): fix possible race between TX/RX threads.

Tested:

* Tested with Intel 3945BG, STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3766

8 years agowpi(4): do not allocate space for unused rings.
Adrian Chadd [Sun, 11 Oct 2015 01:53:51 +0000 (01:53 +0000)]
wpi(4): do not allocate space for unused rings.

Tested:

* Tested with Intel 3945BG, STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3765

8 years agowpi(4): do not override iv_recv_mgmt() in non-adhoc modes.
Adrian Chadd [Sun, 11 Oct 2015 01:50:54 +0000 (01:50 +0000)]
wpi(4): do not override iv_recv_mgmt() in non-adhoc modes.

Tested:

* Tested with Intel 3945BG, IBSS and STA modes

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3764

8 years agowpi(4): use more correct types.
Adrian Chadd [Sun, 11 Oct 2015 01:31:18 +0000 (01:31 +0000)]
wpi(4): use more correct types.

This change fixes some amount of -Wsign-conversion and -Wconversion warnings
and sets correct sizes for some variables (as a result, some loop counters
were touched too).

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3763

8 years agoUpdate Dragonfly Mail Agent to v0.10
Baptiste Daroussin [Sat, 10 Oct 2015 23:31:47 +0000 (23:31 +0000)]
Update Dragonfly Mail Agent to v0.10

8 years agoImport dma 0.10
Baptiste Daroussin [Sat, 10 Oct 2015 23:22:05 +0000 (23:22 +0000)]
Import dma 0.10

8 years agoReplace a local sx lock that allowed only one client at a time to access
Ian Lepore [Sat, 10 Oct 2015 19:51:00 +0000 (19:51 +0000)]
Replace a local sx lock that allowed only one client at a time to access
an eeprom device with iicbus_request/release_bus(), which achieves the
same effect and also keeps other i2c slave drivers from clashing on the bus.

8 years agoThere's no way a fbsd install + kernel will fit into 4MB of flash.
Sean Bruno [Sat, 10 Oct 2015 19:08:34 +0000 (19:08 +0000)]
There's no way a fbsd install + kernel will fit into 4MB of flash.

Assume and enforce the fact that this will always boot a rootfs from
usb.

8 years agoRemove a double "as well as"
Poul-Henning Kamp [Sat, 10 Oct 2015 17:32:06 +0000 (17:32 +0000)]
Remove a double "as well as"

8 years agoFix installing config files as non root
Baptiste Daroussin [Sat, 10 Oct 2015 14:43:46 +0000 (14:43 +0000)]
Fix installing config files as non root

Reported by: adrian

8 years agoInstall bsd.confs.mk
Baptiste Daroussin [Sat, 10 Oct 2015 10:48:09 +0000 (10:48 +0000)]
Install bsd.confs.mk
Rename ETCDIR into CONFIGDIR to avoid conflicts with the ports tree

8 years agoAdd 'p' postfix to mdconfig(8).
Edward Tomasz Napierala [Sat, 10 Oct 2015 09:37:31 +0000 (09:37 +0000)]
Add 'p' postfix to mdconfig(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoChange the default setting of kern.ipc.shm_allow_removed from 0 to 1.
Edward Tomasz Napierala [Sat, 10 Oct 2015 09:29:47 +0000 (09:29 +0000)]
Change the default setting of kern.ipc.shm_allow_removed from 0 to 1.

This removes the need for manually changing this flag for Google Chrome
users. It also improves compatibility with Linux applications running under
Linuxulator compatibility layer, and possibly also helps in porting software
from Linux.

Generally speaking, the flag allows applications to create the shared memory
segment, attach it, remove it, and then continue to use it and to reattach it
later. This means that the kernel will automatically "clean up" after the
application exits.

It could be argued that it's against POSIX. However, SUSv3 says this
about IPC_RMID: "Remove the shared memory identifier specified by shmid from
the system and destroy the shared memory segment and shmid_ds data structure
associated with it." From my reading, we break it in any case by deferring
removal of the segment until it's detached; we won't break it any more
by also deferring removal of the identifier.

This is the behaviour exhibited by Linux since... probably always, and
also by OpenBSD since the following commit:

revision 1.54
date: 2011/10/27 07:56:28; author: robert; state: Exp; lines: +3 -8;
Allow segments to be used even after they were marked for deletion with
the IPC_RMID flag.
This is permitted as an extension beyond the standards and this is similar
to what other operating systems like linux do.

MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3603

8 years agoProvide better debug message on kernel module name clash.
Edward Tomasz Napierala [Sat, 10 Oct 2015 09:21:55 +0000 (09:21 +0000)]
Provide better debug message on kernel module name clash.

Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoMake geom_nop(4) collect statistics on all types of BIOs, not just
Edward Tomasz Napierala [Sat, 10 Oct 2015 09:03:31 +0000 (09:03 +0000)]
Make geom_nop(4) collect statistics on all types of BIOs, not just
reads and writes.

PR: kern/198405
Submitted by: Matthew D. Fuller <fullermd at over-yonder dot net>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3679

8 years agodrm/i915: Remove "Attempting to unbind pinned buffer" message
Jean-Sébastien Pédron [Sat, 10 Oct 2015 07:43:02 +0000 (07:43 +0000)]
drm/i915: Remove "Attempting to unbind pinned buffer" message

This error message is removed in later versions of Linux and currently,
it spams users.

PR: 200712
MFC after: 1 week

8 years agoUpdate the AP135 reference design flash layout to be more useful.
Adrian Chadd [Sat, 10 Oct 2015 05:00:18 +0000 (05:00 +0000)]
Update the AP135 reference design flash layout to be more useful.

* Shuffle the kernel to be at the beginning
* Give the kernel 2mb, the rootfs 6mb, and 'mib0' the rest
* put the cfg parition just before the ART calibration data for the
  wifi part in the SoC
* .. and make sure ART points to the right 64k region.

I've updated the freebsd-wifi-build wiki the instructions on using this.

If someone has an AP135 with 8MB SPI flash then this won't work; everything
minus the big mib0 partition is just a bit over 8MB.  Come see me if this
ever happens (you'll likely just have to shrink the rootfs and the kernel
a little in order to make it fit.)

Tested:

* AP135 reference board.

8 years agoTranslate iic hardware layer status values to errno return values.
Ian Lepore [Sat, 10 Oct 2015 02:29:02 +0000 (02:29 +0000)]
Translate iic hardware layer status values to errno return values.

8 years agoAdd a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT).
Ian Lepore [Sat, 10 Oct 2015 02:06:07 +0000 (02:06 +0000)]
Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT).

8 years agoiw_cxgbe: fix for page fault in cm_close_handler().
Navdeep Parhar [Sat, 10 Oct 2015 01:41:07 +0000 (01:41 +0000)]
iw_cxgbe: fix for page fault in cm_close_handler().

This is roughly the iw_cxgbe equivalent of
https://github.com/torvalds/linux/commit/be13b2dff8c4e41846477b22cc5c164ea5a6ac2e
-----------------
RDMA/cxgb4: Connect_request_upcall fixes

When processing an MPA Start Request, if the listening endpoint is
DEAD, then abort the connection.

If the IWCM returns an error, then we must abort the connection and
release resources.  Also abort_connection() should not post a CLOSE
event, so clean that up too.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-----------------

Submitted by: Krishnamraju Eraparaju at chelsio dot com.

8 years agoRemove all of the syncs
Enji Cooper [Sat, 10 Oct 2015 01:31:39 +0000 (01:31 +0000)]
Remove all of the syncs

They're unnecessary as shown by further testing on my VM

Requested by: jhb

8 years agoFlip on fast frames support for AR5416 and AR9300 series NICs.
Adrian Chadd [Sat, 10 Oct 2015 00:13:45 +0000 (00:13 +0000)]
Flip on fast frames support for AR5416 and AR9300 series NICs.

This was off because the net80211 aggregation code was using the same
state pointers for both fast frames and ampdu tx support which led to some
pretty unfortunate panic-y behaviour.

Now that net80211 doesn't panic, let's flip this back on.

It doesn't (yet) do the horrific sounding thing of A-MPDU aggregates
of fast frames; that'll come next.  It's a pre-requisite to supporting
AMSDU + AMPDU anyway, which actually speeds things up quite considerably
(think packing lots of little ACK frames into a single AMSDU.)

Tested:

* QCA955x SoC, AP mode
* AR5416, STA mode
* AR9170, STA mode (with local fast frame patches)

8 years agoFix more cases of iicbus-layer functions that must return IIC_Exxxx values.
Ian Lepore [Sat, 10 Oct 2015 00:12:03 +0000 (00:12 +0000)]
Fix more cases of iicbus-layer functions that must return IIC_Exxxx values.

8 years agoReturn only IIC_Exxxx status values from iicbus-layer functions. Most of
Ian Lepore [Fri, 9 Oct 2015 23:58:19 +0000 (23:58 +0000)]
Return only IIC_Exxxx status values from iicbus-layer functions.  Most of
these functions are thin wrappers around calling the hardware-layer driver,
but some of them do sanity checks and return an error.  Since the hardware
layer can only return IIC_Exxxxx status values, the iicbus helper functions
must also adhere to that, so that drivers at higher layers can assume that
any non-zero status value is an IIC_Exxxx value that provides details about
what happened at the hardware layer (sometimes those details are important
for certain slave drivers).

8 years agoMove ppp.conf into the ppp sources
Baptiste Daroussin [Fri, 9 Oct 2015 23:57:07 +0000 (23:57 +0000)]
Move ppp.conf into the ppp sources

8 years agoAdd iic2errno(), a helper function to translate IIC_Exxxxx status values to
Ian Lepore [Fri, 9 Oct 2015 23:20:08 +0000 (23:20 +0000)]
Add iic2errno(), a helper function to translate IIC_Exxxxx status values to
errno values that are at least vaguely equivelent.  Also add a new status
value, IIC_ERESOURCE, to indicate a failure to acquire memory or other
required resources to complete a transaction.

The IIC_Exxxxxx values are supposed to communicate low-level details of the
i2c transaction status between the lowest-layer hardware driver and
higher-layer bus protocol and device drivers for slave devices on the bus.
Most of those slave drivers just return all status values from the lower
layers directly to their callers, resulting in crazy error reporting from a
user's point of view (things like timeouts being reported as "no such
process").  Now there's a helper function to make it easier to start
cleaning up all those drivers.

8 years agoRename the dma directory into dmagent to avoid collision on unclean oject
Baptiste Daroussin [Fri, 9 Oct 2015 23:19:29 +0000 (23:19 +0000)]
Rename the dma directory into dmagent to avoid collision on unclean oject
directory where an old dma binary can remain

8 years agoUse IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers.
Ian Lepore [Fri, 9 Oct 2015 22:49:50 +0000 (22:49 +0000)]
Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers.
Make it clearer what each one means in the comments that define them.

IIC_BUSBSY was used in many places to mean two different things, either
"someone else has reserved the bus so you have to wait until they're done"
or "the signal level on the bus was not in the state I expected before/after
issuing some command".

Now IIC_BUSERR is used consistantly to refer to protocol/signaling errors,
and IIC_BUSBSY refers to ownership/reservation of the bus.

8 years agoMostly rewrite the imx i2c driver. This started out as an attempt to fix
Ian Lepore [Fri, 9 Oct 2015 22:28:56 +0000 (22:28 +0000)]
Mostly rewrite the imx i2c driver.  This started out as an attempt to fix
one specific problem: the driver didn't check for ACK/NAK after writing a
slave address byte to the bus, and some slaves signal that they are busy
(such as when completing an internal write to flash memory) by sending a
NAK in response to being addressed.

While working on that problem I discovered that the driver's handling of
error conditions in general didn't match the state transition diagram in
the reference manual, and making that right resulted in a lot of code
reorganization.

Along the way various other changes also happened...

 - Remove a mutex that wasn't protecting anything.
 - Remove some mystery DELAY()s, document the few that remain.
 - Use pause_sbt(9) to yield the processor for the bulk of the time it
   takes to transfer each byte rather than busy-polling the whole time.
 - Disable the controller when no transfers are in progress; since we
   don't operate in slave mode, there's no reason to run the hardware.
 - Remove a bunch of unecessary code from probe().

8 years agoInstall configuration files with CONFMODE instead of SHAREMODE
Baptiste Daroussin [Fri, 9 Oct 2015 22:15:31 +0000 (22:15 +0000)]
Install configuration files with CONFMODE instead of SHAREMODE

8 years agoAdd installconfig as a top level target
Baptiste Daroussin [Fri, 9 Oct 2015 22:14:07 +0000 (22:14 +0000)]
Add installconfig as a top level target

8 years agoAdd missing Makefile
Baptiste Daroussin [Fri, 9 Oct 2015 22:10:54 +0000 (22:10 +0000)]
Add missing Makefile

8 years agoMove all the dma(8) components into one single directory
Baptiste Daroussin [Fri, 9 Oct 2015 22:09:44 +0000 (22:09 +0000)]
Move all the dma(8) components into one single directory

Simplifying maintainance and options (only one place to deal with MK_DMAGENT)

This also makes packaging base less intrusive by getting a single point where
to add tags.

8 years agoChange make distribution so that it now call installconfig in all dirs along
Baptiste Daroussin [Fri, 9 Oct 2015 22:05:31 +0000 (22:05 +0000)]
Change make distribution so that it now call installconfig in all dirs along
with the current behaviour of calling "distribution" in the etc target.

This allows mergemaster/etcupdate to still work when some configuration will be
moved to be handled in the same directories their source code lives in.

8 years agoAdd a new bsd.confs.mk similar to bsd.files.mk or bsd.incs.mk
Baptiste Daroussin [Fri, 9 Oct 2015 21:57:42 +0000 (21:57 +0000)]
Add a new bsd.confs.mk similar to bsd.files.mk or bsd.incs.mk

It defines a CONFS variable for all files supposed to be installed as a
configuration file and handle as such

8 years agoBugfix: Exit the transfer loop if any read or write operation fails. Also,
Ian Lepore [Fri, 9 Oct 2015 21:34:46 +0000 (21:34 +0000)]
Bugfix: Exit the transfer loop if any read or write operation fails.  Also,
perform a stop operation on the bus if there was an error, otherwise the
bus will remain hung forever.  Consistantly use 'if (error != 0)' style in
the function.

8 years agoStyle and whitespace cleanups. The only functional change is removal of
Ian Lepore [Fri, 9 Oct 2015 21:27:30 +0000 (21:27 +0000)]
Style and whitespace cleanups.  The only functional change is removal of
a printf that appears to be left over from development debugging.

8 years agoPull in r242623 from upstream libc++ trunk (by Eric Fiselier):
Dimitry Andric [Fri, 9 Oct 2015 21:04:28 +0000 (21:04 +0000)]
Pull in r242623 from upstream libc++ trunk (by Eric Fiselier):

  Enable and fix warnings during the build.

  Although CMake adds warning flags, they are ignored in the libc++ headers
  because the headers '#pragma system header' themselves.

  This patch disables the system header pragma when building libc++ and fixes
  the warnings that arose.

  The warnings fixed were:
  1. <memory> - anonymous structs are a GNU extension
  2. <functional> - anonymous structs are a GNU extension.
  3. <__hash_table> - Embedded preprocessor directives have undefined behavior.
  4. <string> - Definition is missing noexcept from declaration.
  5. <__std_stream> - Unused variable.

This should fix building world (in particular libatf-c++) with -std=c++11.

Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>

8 years agoAdd llvm patch corresponding to r289072.
Dimitry Andric [Fri, 9 Oct 2015 21:00:04 +0000 (21:00 +0000)]
Add llvm patch corresponding to r289072.

8 years agoLet -c imply -S (hide signal output).
Bryan Drewery [Fri, 9 Oct 2015 20:47:29 +0000 (20:47 +0000)]
Let -c imply -S (hide signal output).

Without this, the signals are shown seemingly randomly in the output before
the final summary is shown.  This is especially noticeable when there is
not much output from the application being traced.

Discussed with: jhb
Relnotes: yes

8 years agoAdd definitions for MIPS TLS relocations to elftoolchain.
Alexander Kabaev [Fri, 9 Oct 2015 18:39:55 +0000 (18:39 +0000)]
Add definitions for MIPS TLS relocations to elftoolchain.

This makes our readelf more useful when looking for TLS-related
issues.

8 years agoRemove some trailing space.
Alexander Kabaev [Fri, 9 Oct 2015 18:39:52 +0000 (18:39 +0000)]
Remove some trailing space.

8 years agoaddr2line: initialize die to NULL
Ed Maste [Fri, 9 Oct 2015 18:26:24 +0000 (18:26 +0000)]
addr2line: initialize die to NULL

GCC on MIPS produced a 'may be used uninitialized' warning after
r289071.

Reported by: sbruno
Pointy hat to: emaste

8 years agoRemove empty line again from libc++'s iostream.cpp. This was used to
Dimitry Andric [Fri, 9 Oct 2015 18:23:10 +0000 (18:23 +0000)]
Remove empty line again from libc++'s iostream.cpp.  This was used to
force updates to this file, so it will be rebuilt by the fixed clang
from r289072.

8 years agoTemporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin):
Dimitry Andric [Fri, 9 Oct 2015 18:21:45 +0000 (18:21 +0000)]
Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin):

  [SLP] Vectorize for all-constant entries.

This should fix libc++'s iostream initialization SIGBUSing on amd64,
whenever the global cout symbol is not aligned to 16 bytes.

Some further explanation: libc++'s iostream.cpp contains the definitions
of std::cout, std::cerr and so on.  These global objects are effectively
declared with an alignment of 8 bytes.  When an executable is linked
against libc++.so, it can sometimes get a copy of the global object,
which is then at the same alignment.

However, with clang 3.7.0, the initialization of these global objects
will incorrectly use SSE instructions (e.g. movdqa), whenever the
optimization level is high enough, and SSE is enabled, such as on amd64.
When any of these objects is not aligned to 16 bytes, this will result
in a SIGBUS during iostream initialization.  In contrast, clang 3.6.x
and earlier took the 8 byte alignment into consideration, and avoided
SSE for those particular operations.

After bisecting of upstream changes, I found that the above revision
caused the change of this behavior, so I am reverting it now as a
workaround, while a discussion and test case is being prepared for
upstream.

8 years agoUpdate to ELF Tool Chain r3250
Ed Maste [Fri, 9 Oct 2015 17:46:05 +0000 (17:46 +0000)]
Update to ELF Tool Chain r3250

Highlights (not already in the FreeBSD tree):
  - addr2line: Fixed multiple memory leaks related to DIE allocation
  - readelf: improve sh_link validation
  - various man page improvements

Sponsored by: The FreeBSD Foundation

8 years agoAdd .gnu.versym VERSYM_HIDDEN flag and related mask
Ed Maste [Fri, 9 Oct 2015 17:33:05 +0000 (17:33 +0000)]
Add .gnu.versym VERSYM_HIDDEN flag and related mask

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoImport ELF Tool Chain snapshot revision 3250
Ed Maste [Fri, 9 Oct 2015 16:43:36 +0000 (16:43 +0000)]
Import ELF Tool Chain snapshot revision 3250

From http://svn.code.sf.net/p/elftoolchain/code