Commit Graph

204409 Commits

Author SHA1 Message Date
Alan Cox
9e829b2272 The conversion of kmem_alloc_attr() from operating on a vm map to a vmem
arena in r254025 introduced a bug in the case when an allocation is only
partially successful.  Specifically, the vm object lock was not being
acquired before freeing the allocated pages.  To address this bug, replace
the existing code by a call to kmem_unback().

Change the type of a variable in kmem_alloc_attr() so that an allocation
of two or more gigabytes won't fail.

Replace the error handling code in kmem_back() by a call to kmem_unback().

Reviewed by:	kib (an earlier version)
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 22:57:10 +00:00
Mark Johnston
0a805de6f3 Remove a check for a condition that is always false by a preceding KASSERT
that was added in r144704.
2015-09-26 22:26:55 +00:00
Adrian Chadd
ac9e537ce0 Free the TX/RX list buffers /before/ tearing down net80211 state.
Otherwise buffers in the RX queue get freed with their parent vap
being gone and you end up with a juicy kernel panic.
2015-09-26 22:20:30 +00:00
Mark Johnston
e19a95e53b Document the interface for applying advice up to the end of a file.
MFC after:	3 days
2015-09-26 22:20:11 +00:00
Adrian Chadd
4bfc53b885 Oops - commit the correct manpage content for otusfw.4. 2015-09-26 22:19:07 +00:00
Mark Johnston
d925c2e800 Fix argument ordering in vn_printf().
MFC after:	3 days
2015-09-26 22:16:54 +00:00
Conrad Meyer
0ceadbf05d Revert r288270 to fix the build
Submitted by:	bdrewery
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 20:26:05 +00:00
Alan Cox
087a613247 Exploit r288122 to address a cosmetic issue. Since the pages allocated
by noobj_alloc() don't belong to a vm object, they can't be paged out.
Since they can't be paged out, they are never enqueued in a paging queue.
Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance
that these pages are being enqueued in the inactive queue.  As of r288122,
we can avoid giving this false impression by passing PQ_NONE.

Submitted by:	kmacy
Differential Revision:	https://reviews.freebsd.org/D1674
2015-09-26 17:45:10 +00:00
Hans Petter Selasky
2b56913e8c Fix spelling.
Submitted by:	Maxime Soule <btik-fbsd@scoubidou.com>
PR:		203249
MFC after:	2 weeks
2015-09-26 16:48:25 +00:00
Josh Paetzel
5eff3ec6e0 Increase group limit for kerberized NFSv4
PR:	202659
Submitted by:	matthew.l.dailey@dartmouth.edu
Reviewed by:	rmacklem dfr
MFC after:	1 week
Sponsored by:	iXsystems
2015-09-26 16:30:16 +00:00
Conrad Meyer
0d27967e31 Document bus_get_resource(9).
Suggested by:	Francois Tigeot
Obtained from:	DragonFlyBSD 09301a2b29f3ae5edd39a858f909f8770372f71e
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:52:47 +00:00
Bryan Drewery
cfac01438a Hookup mkcsmapper_static and mkesdb_static for all but install.
These are only handled as 'build-tools' in Makefile.inc1.  This causes
'make clean' from the top of the tree to not clean the directories.  It also
effectively has kept them disconnected and risks them bitrotting.  The
buildworld process never cleans them either.

Connect them so they will always be built, cleaned, etc, but never installed.

Discussed with:	imp (briefly)
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:28:04 +00:00
Bryan Drewery
5a1af1a0ac Revert r288268. Wrong change committed. 2015-09-26 14:27:21 +00:00
Bryan Drewery
3c9e00f39e Hookup mkcsmapper_static and mkesdb_static for all but install.
These are only handled as 'build-tools' in Makefile.inc1.  This causes
'make clean' from the top of the tree to not clean the directories.  It also
effectively has kept them disconnected and risks them bitrotting.  The
buildworld process never cleans them either.

Connect them so they will always be built, cleaned, etc, but never installed.

Discussed with:	imp (briefly)
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:26:08 +00:00
Bryan Drewery
266a154003 Remove redundant .NOPATH.
All of these are already in CLEANFILES which is added to .NOPATH in bsd.obj.mk.

Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:15:01 +00:00
Bryan Drewery
595fe15108 Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:13:51 +00:00
Ian Lepore
e488229ba4 Wait up to 10 seconds for late-initializing network interfaces to arrive.
Reviewed by:	rmacklem
2015-09-26 13:55:55 +00:00
Alexander Motin
2e33ae99cf Allow LOG SENSE command on non-disk devices. 2015-09-26 13:51:29 +00:00
Adrian Chadd
cc43c3e8a7 Don't duplicate checks; net80211 now does this for us.
Submitted by:	s3erios@gmail.com
2015-09-26 13:22:44 +00:00
Alexander Motin
0b33261bbe Remove concept of control device. 2015-09-26 12:53:55 +00:00
Alexander Motin
6bff2b5bff Move ioctl frontend defines where they belong. 2015-09-26 11:56:28 +00:00
Alexander Motin
d3ab449cfa Remove few more unused variables. 2015-09-26 11:39:54 +00:00
Alexander Motin
9c887a4f86 Remove some duplicate, legacy, dead and questionable code. 2015-09-26 11:28:45 +00:00
Konstantin Belousov
873a0bd675 Make the __bitcount*() functions unconditionally available, by moving
them out of the #if _BSD_VISIBLE block.  Other headers may depend on
__bitcount().  The dependencies can be a header not specified by
POSIX, and then namespace restrictions by _XOPEN_SOURCE are not
applicable, as it was reported.  Or, we might grow an implementation
of some POSIX facility using __bitcount(), which also should work.

Reported by:	Jason Schulz <schulz.j@gmail.com>
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-09-26 07:30:45 +00:00
Adrian Chadd
74d7b9a832 * Add 11n HT40 support - i needed to send both HTINFO and HTCAP fields
in the join message so the firmware would pick it up.

* Strip out the direct hardware fiddling for 40MHz mode - the firmware
  we're using doesn't require it (the rtl8712su firmware does; it
  is less 'fullmac' than what we're using.)

* Fix the mbuf handling during errors - rsu_tx shouldn't free mbufs;
  it's up to the caller to do so.  This brings it in line with
  what other drivers do or should be doing.

Tested:

* RTL8712, HT40 channel, STA mode (during this commit)
2015-09-26 07:25:53 +00:00
Alan Cox
9f86aba61c Exploit r288122 to address a cosmetic issue. Since PV chunk pages don't
belong to a vm object, they can't be paged out.  Since they can't be paged
out, they are never enqueued in a paging queue.  Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
are being enqueued in the inactive queue.  As of r288122, we can avoid
this false impression by passing PQ_NONE.

Submitted by:	kmacy (an earlier version)
Differential Revision:	https://reviews.freebsd.org/D1674
2015-09-26 07:18:05 +00:00
Adrian Chadd
436ed6b50d Fix a bug in the TX command handling - log when a too-large payload is
sent, and fix a bug I found when doing so.
2015-09-26 07:14:00 +00:00
Adrian Chadd
20aff35e6b Add man pages for the AR9170 and AR9170 firmware. 2015-09-26 07:09:46 +00:00
Adrian Chadd
a9fcb51fbb Add an initial driver for the AR9170 series draft-11n hardware from
Atheros.

Thanks to OpenBSD for providing a driver based on the original
Atheros open source driver circa 2008.  This uses the early, pre-carl9170
atheros provided firmware.

It only supports 11bg at the moment.  I've not tested it with 11a
(and so the TX rate control logic may be slightly wrong!) so if
you do have the dual-band version of this hardware please do let me know.

Tested:

* AR9170, TP-Link WN821N 2GHz.

TODO:

* Hook this up to a non-module build.
2015-09-26 07:08:35 +00:00
Adrian Chadd
4c794fa51a Update USB device IDs for the upcoming AR9170 support. 2015-09-26 06:57:08 +00:00
Bryan Drewery
3cad5c68de META_MODE: Make it easier to keep the bootstrap-tools args in sync.
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 04:22:18 +00:00
Bryan Drewery
6a8077f3d5 Add SUBDIR_PARALLEL.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 01:28:50 +00:00
Bryan Drewery
a98533d3e8 Remove disconnected directories.
These were added disconnected in 2005 in r145524.

Sponsored by:	EMC / Isilon Storage Division
2015-09-26 01:24:35 +00:00
Alexander Motin
0bb9989c43 Pass to sobind() copy of the address, not the original. 2015-09-26 01:23:29 +00:00
Bryan Drewery
534ec42f5d Add missing CLEANFILES.
MFC after:	1 week
X-MFC-With:	r288199
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 01:04:52 +00:00
Adrian Chadd
b86fd7bcea Perform some rather amusing layering violations to add mbuf tags to the
net80211 receive path.  This allows drivers (notably USB right now, but
anything/everything!) to optionally defer bulk RX of 802.11 frames until
/outside/ of the driver lock(s), rather than doing:

UNLOCK(sc);
ieee80211_input*()
LOCK(sc);

.. which is really stupid.

The existing API is maintaned - if ieee80211_input() / ieee80211_input_all()
is called then the RSSI/NF values are used.  If the MIMO versions are called
with a given rx status pointer then it's used. Else, it'll use whatever
is in the RX mbuf tag.
2015-09-26 00:53:37 +00:00
Xin LI
70061f6535 Vendor import nc(1) from OPENBSD_5_8. 2015-09-26 00:19:13 +00:00
Bjoern A. Zeeb
5ddb05c2fe Compare the newly allocated array elements to NULL in order to see
if the malloc succeeded.

Spotted by:	reading kernel compile time log
MFC after:	2 weeks
2015-09-25 23:07:17 +00:00
Bryan Drewery
e56a42ab8c Remove 'set -e' that are no longer needed as it is already default.
When bmake was initially imported at r241298 shell commands were no longer
ran with 'set -e' as they were before.  This was fixed in r254980 so they
again always use 'set -e'.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 23:03:32 +00:00
Bryan Drewery
c41b621878 Explicitly enable .MAKE.ALWAYS_PASS_JOB_QUEUE for bmake.
This is a NOP as r254419 enabled this by default in bmake.  Add it here though
to ensure it is known that we are using this as a default and in case a
bmake import removes the default we have.

This tells bmake to always pass job tokens into sub-commands.  Otherwise
it would only do so if the target being built depended on the special
.MAKE target (which causes _all_ commands to be executed with -n as well)
or if the command matches '${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make' (before
expansion, so ${LIB32WMAKE} would not qualify).  Using '+' on a command
(which runs the command with -n) would not pass the job token even though it
is a documented way to achieve the .MAKE effect on a command.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 22:51:30 +00:00
Alexander Motin
86b7954b92 Properly lock LUN in ctl_failover_lun(). 2015-09-25 22:45:23 +00:00
Conrad Meyer
76ad56672b MFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer
Note, this has been broken since import in r227825.

PR:		https://github.com/pathscale/libcxxrt/issues/29
Reviewed by:	emaste (earlier version), kan (informally)
Obtained from:	Anton Rang
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3733
2015-09-25 22:29:21 +00:00
Ed Maste
7fc0791608 Remove apostrophe from AP's for consistency (arm64 mp_machdep) 2015-09-25 21:04:31 +00:00
Bryan Drewery
1e066951b0 Add missing binutils ldscripts.
Some of these are after the fix in r288230 to install them.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-25 20:45:10 +00:00
Bryan Drewery
dabaad6678 Fix subdir -j build after r287983 by adding missing dependencies.
Sponsored by:	EMC / Isilon Storage Division
2015-09-25 20:31:04 +00:00
Ed Maste
ccd23b44ea Build ofwdump(8) on MIPS too
It will be useful as FDT sees increasing usage on FreeBSD/mips.

Sponsored by:	DARPA, AFRL
2015-09-25 20:26:59 +00:00
Ed Maste
209e744f89 xinstall: renumber UCB clauses to avoid skipping #3 2015-09-25 20:25:18 +00:00
Bryan Drewery
ef59fb822d Fix emulation ldscripts not being installed since r131832.
For example, 32bit scripts on 64bit host.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-25 20:21:45 +00:00
Alexander Motin
f44570f617 Fix bit masks changed for the wrong commands in r288221. 2015-09-25 19:46:34 +00:00
Bryan Drewery
ec766071e3 META_MODE: Remove DEP_MACHINE from Makefile.depend files.
This has not been needed since r246865 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:44:01 +00:00