Commit Graph

202999 Commits

Author SHA1 Message Date
Xin LI
1ae1bd497f Use arc4random_buf(). While there, unifdef the code for HAVE_ARC4RANDOM.
MFC after:	2 weeks
2015-08-16 23:23:58 +00:00
Sean Bruno
7c669ab6cc Bump all copywrite dates to 2015
Differential Revision:	https://reviews.freebsd.org/D3160
Submitted by:	erj
MFC after:	2 weeks
Sponsored by:	Intel Corportation
2015-08-16 20:13:58 +00:00
Sean Bruno
d2635c677b e1000/if_lem.c bump to 1.1.0
- deprecate fbsd 8

Differential Revision:	https://reviews.freebsd.org/D3164
Submitted by:	erj
MFC after:	2 weeks
Sponsored by:	Intel Corporation
2015-08-16 20:10:43 +00:00
Sean Bruno
df40405fab Increase EM_MAX_SCATTER to 64 such that the size of em_xmit()::segs[EM_MAX_SCATTER]
doesn't get overrun by things like NFS that can and do shove more than 32 segs when
being used with em(4) and TSO4.

Update tso handling code in em_xmit() with update from jhb@ in email thread:
https://lists.freebsd.org/pipermail/freebsd-net/2014-July/039306.html

set ifp->if_hw_tsomax, ifp->if_hw_tsomaxsegcount & ifp->if_hw_tsomaxsegsize
to appropriate values.

Define a TSO workaround "magic" number  of 4 that is used to avoid an
alignment issue in hardware.

Change a couple of integer values that were used as booleans to actual
bool types.

Ensure that em_enable_intr() enables the appropriate mask of interrupts
and not just a hardcoded define of values.

PR:		200221 199174 195078
Differential Revision:	https://reviews.freebsd.org/D3192
Reviewed by:	erj jhb hiren
MFC after:	2 weeks
Sponsored by:	Limelight Networks
2015-08-16 19:43:44 +00:00
Jilles Tjoelker
842ad8ac0b wordexp(): Stop using the undocumented wordexp builtin.
The functionality of the wordexp builtin is easily replaced using normal
shell code, although performance is slightly worse.

This does not mean that wordexp() will remain shell-independent -- a fully
reliable implementation of WRDE_NOCMD is really only possible using
extensions to the shell, or by adding much of the shell's code to libc.
2015-08-16 19:42:15 +00:00
Sean Bruno
38be29d321 Add capability to disable CRC stripping. This breaks IPMI/BMC capabilities on certain adatpers.
Linux has been doing the exact same thing since 2008

eb7c3adb1c

PR:	161277
Differential Revision:	https://reviews.freebsd.org/D3282
Submitted by:	Fravadona@gmail.com
Reviewed by:	erj wblock
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Limelight Networks
2015-08-16 19:06:23 +00:00
Alan Cox
f9b11500c2 As another piece of PG_CACHE page elimination, remove an LRU-defeating call
to vm_page_try_to_cache() from vm_pageout_flush().  Other changes, most
recently r286814, have made this call unnecessary.

Reviewed by:	kib
Discussed with:	jeff
Tested by:	pho
Sponsored by:	EMC / Isilon Storage Division
2015-08-16 17:07:53 +00:00
Ed Schouten
cd69db4b0e Pick UINT_MAX / 100 as an upperbound.
The fix that I applied in r286798 is already good, but it assumes that
sizeof(int) > sizeof(short). Express the upperbound in terms of
UINT_MAX. By dividing that by 100, we're sure that the resulting value
is never larger than approximately UINT_MAX / 10, which is safe.

PR:		202326
Discussed with:	kcwu csie org
MFC after:	1 month
2015-08-16 13:59:11 +00:00
Jilles Tjoelker
4b6578dc8c sh: Backslash-newline should not affect field splitting in read builtin.
This was originally broken in r212339 in 2010.
2015-08-16 12:57:17 +00:00
Alexander V. Chernikov
512e30ef9f Split arpresolve() into fast/slow path.
This change isolates the most common case (e.g. successful lookup)
  from more complicates scenarios. It also (tries to) make code
  more simple by avoiding retry: cycle.

The actual goal is to prepare code to the upcoming change that will
  allow LL address retrieval without acquiring LLE lock at all.

Reviewed by:		ae
Differential Revision:	https://reviews.freebsd.org/D3383
2015-08-16 12:23:58 +00:00
Enji Cooper
b3667a140d Regen src.conf.5 per r286822 2015-08-16 10:10:58 +00:00
Enji Cooper
edefff7ed6 Reap MK_SYSINSTALL
It's no longer in use in the tree (most likely missed when sade/sysinstall
were removed)

MFC after: 1 week
2015-08-16 09:51:24 +00:00
Justin Hibbits
cf5aa3269f SRR1 and DSISR aren't pointers, print them as integers. 2015-08-16 01:08:59 +00:00
Alexander Motin
4ab41168ac Small addition to r286814.
Submitted by:	bz
MFC after:	2 weeks
2015-08-15 22:55:32 +00:00
Oleksandr Tymoshenko
34a1f44995 Make dtb file configurable via loader(8) variable. ubldr already checks
"fdt_file" and "fdtfile" U-Boot variables. Add one more check for
"fdt_file" loader(8) variable.

loader(8) variable takes precedence over u-boot env one
2015-08-15 21:47:07 +00:00
Alexander Motin
217b4e023d Remove UMA allocation of ATA requests.
After CAM replaced old ATA stack, this driver processes no more then one
request at a time per channel.  Using UMA after that is overkill, so
replace it with simple preallocation of one request per channel.

MFC after:	2 weeks
2015-08-15 21:46:02 +00:00
Antoine Brodin
84d5c498b5 bsd.lib.mk has to be included after MLINKS assignment 2015-08-15 19:00:38 +00:00
Alexander Motin
a15bbf1508 Polish sizes processing. 2015-08-15 18:22:16 +00:00
Marcel Moolenaar
296a51148d Improve support for Macs that have a stride not equal to the
horizonal resolution (width). In those cases fb_bpp ended up
completely wrong -- as in 6 bytes per pixel or something like
that. Since we already have a way to calculate fb_depth given
the masks and fb_bpp is effectively the same as fb_depth, all
we need to do is make sure fb_bpp is rounded to the next
multiple of the number of bits in a byte -- we assume we can
divide by the number of bits in a byte throughout vt(4).
While here:
-   simplify how we calculate fb_depth.
-   use fb_bpp instead of fb_depth to calculate fb_stride;
    we know we can divide fb_bpp.
-   don't limit fb_width and fb_height by VT_FB_DEFAULT_WIDTH
    and VT_FB_DEFAULT_HEIGHT (resp.). Those constants have
    not relation to the size of the frame buffer.

This at least fixes "lower-resolution" Macs. We're talking
1280x1024 or so. There still is a problem with 27" Macs,
which typically have a horizontal resolution over 2K.

PR:		193745 (partial)
Ok'd by:	emaste@
2015-08-15 16:13:28 +00:00
Marcel Moolenaar
8bd2e88e36 Improve the VT initialization message: have it say what the
resolution is. For text mode this is the number of columns
by the number of rows. Include the name of the driver in a
much less prominent way.
2015-08-15 15:44:09 +00:00
Alexander Motin
67ceb24bca Move "ioctl" CAM frontend into separate file.
It has nothing to share with too huge ctl.c other then device descriptor,
but even that may be counted as design error that may be fixed later.
At some point we may even want to have several ioctl ports.
2015-08-15 15:42:21 +00:00
Alexander Motin
2f444d157b Drop "internal" CTL frontend.
Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places..
2015-08-15 13:34:38 +00:00
Baptiste Daroussin
fcb92d50f7 Update to use the latest version of the PCI IDs Repository.
MFC after:	1 week
2015-08-15 12:55:06 +00:00
Hans Petter Selasky
ce842cec42 Fixes for HIGH speed ISOCHRONOUS traffic. HS ISOCHRONOUS traffic at
intervals less than 250us was not handled properly. Add support for
high-bandwidth ISOCHRONOUS packets. USB webcams, USB audio and USB DVB
devices are expected to work better. High-bandwidth INTERRUPT
endpoints is not yet supported.

MFC after:	2 weeks
2015-08-15 12:06:15 +00:00
Hans Petter Selasky
22ef3de712 Fix race in USB PF which can happen if we stop tracing exactly when
the kernel is tapping an USB transfer. This leads to a NULL pointer
access. The solution is to only trace while the USB bus lock is
locked.

MFC after:	2 weeks
2015-08-15 09:00:36 +00:00
Ed Schouten
c5b3acf218 Stop parsing digits if the value already exceeds USHRT_MAX.
There is no need for us to support parsing values that are larger than
the maximum terminal window size. In this case that would be the maximum
of unsigned short.

The problem with parsing larger values is that they can cause integer
overflows when adjusting the cursor position, leading to all sorts of
failing assertions.

PR:		202326
Reported by:	kcwu csie org
MFC after:	1 month
2015-08-15 08:42:33 +00:00
Ed Schouten
ee79e27438 Add missing 'static' keyword to keep build at WARNS=6 happy.
MFC after:	1 month
2015-08-15 08:29:13 +00:00
Mariusz Zaborski
347a39b4a6 Add support for the arrays in nvlist library.
- Add
  nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist,
  descriptor} functions.
- Add support for (un)packing arrays.
- Add the nvl_array_next field to the nvlist structure.
  If an array is added by the nvlist_{move,add}_nvlist_array function
  this field will contains next element in the array.
- Add the nitems field to the nvpair and nvpair_header structure.
  This field contains number of elements in the array.
- Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of
  an array.
- Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only
  on packing/unpacking.
- Add new API for traversing arrays (nvlist_get_array_next).
- Add the nvlist_get_pararr function which combines the
  nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in
  the array it will return next element from array. If nvlist is last
  element in array or it isn't in array it will return his
  container (parent). This function should simplify traveling over nvlist.
- Add tests for new features.
- Add documentation for new functions.
- Add my copyright.
- Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file.

PR:		191083
Reviewed by:	allanjude (doc)
Approved by:	pjd (mentor)
2015-08-15 06:34:49 +00:00
Xin LI
e678759c30 Remove automatic checkout feature.
Obtained from:	DragonFly via OpenBSD
Relnotes:	yes
MFC:		never
2015-08-15 00:42:33 +00:00
Rui Paulo
1558258bc4 sys/conf: pass NMFLAGS to nm(1) via genassym.sh. 2015-08-14 22:58:32 +00:00
Rui Paulo
aea3463e34 genassym.sh: call nm(1) with NMFLAGS. 2015-08-14 22:57:13 +00:00
Rui Paulo
60c07d1ce3 bsd.lib.mk: pass NMFLAGS to the lorder script. 2015-08-14 22:55:23 +00:00
Rui Paulo
25ec8c921c Introduce a new make variable: NMFLAGS.
As the name indicates, these are flags to pass to nm(1).  The newer
binutils have a plugin mechanism so, to build something with LLVM's
LTO, we need to pass flags to nm(1).  This commit also extends
lorder(1) to pass NMFLAGS to nm(1).
2015-08-14 22:54:52 +00:00
Rick Macklem
29dc40b6be For the case where an NFSv4.1 ExchangeID operation has the client identifier
that already has a confirmed ClientID, the nfsrv_setclient() function would
not fill in the clientidp being returned. As such, the value of ClientID
returned would be whatever garbage was on the stack.
An NFSv4.1 client would not normally do this, but it appears that it can
happen for certain Linux clients. When it happens, the client persistently
retries the ExchangeID and Create_session after Create_session fails when
it uses the bogus clientid. With this patch, the correct clientid is replied.
This problem was identified in a packet trace supplied by
Ahmed Kamal via email.

Reported by:	email.ahmedkamal@googlemail.com
MFC after:	2 weeks
2015-08-14 22:02:14 +00:00
Jilles Tjoelker
58bbcdb183 sh: When setting option via long name, don't go via letter.
Looking up the letter makes no sense and prevents adding options that only
have a long name, no letter.
2015-08-14 21:44:15 +00:00
Jason A. Harmening
7b59f7bc5c Use pmap_quick_enter_page() to handle bouncing of unmapped buffers in the x86 busdma_bounce implementation. Also treat user buffers as unmapped.
This allows two things:
1. Sync'ing bounced maps in non-sleepable contexts.  The physcopy* calls previously used could sleep on sf_buf operations in some cases.
2. Sync'ing user buffers outside the context of the owning process

Approved by:	kib (mentor)
2015-08-14 20:08:16 +00:00
John Baldwin
3ebe4c01f7 Remove another remnant of PV domU support and assume that we always run
with an automatically translated physmap under XEN.

Reviewed by:	royger (earlier version)
Differential Revision:	https://reviews.freebsd.org/D3325
2015-08-14 18:38:39 +00:00
Jason A. Harmening
e6e0582bd4 Reformat x86 bounce buffer synchronization code to reduce indentation. No functional change.
Approved by:	kib (mentor)
2015-08-14 18:01:40 +00:00
Alan Cox
cff0a327b8 Stop describing an acquire operation as a read barrier and a release
operation as a write barrier.  That description has never been correct,
and it has caused confusion.  An acquire operation orders writes as well
as reads, and a release operation orders reads as well as writes.

Also, explicitly say that a thread doesn't see its own accesses being
reordered.  The reordering of a thread's accesses is only (potentially)
visible to another thread.  Thus, memory barriers need only be used to
control the ordering of accesses between threads, not within a thread.

Reviewed by:	bde, kib
Discussed with:	jhb
MFC after:	1 week
2015-08-14 17:49:03 +00:00
Ian Lepore
46d49ed78e Use simple fixed name strings for these timecounters and eventimers which
are tied to fixed pieces of hardware; dynamic string formatting isn't needed.
2015-08-14 16:48:07 +00:00
Pedro F. Giffuni
842898ceec Remove a stale comment and clarify the original where it was taken from
The comment in the libc/sys symbol map referenced the generated symbols
for the syscall trampolines. Such comment was out of place in the secure
symbol map so remove the stale comment and attempt to clarify the old one
to avoid risks of confusion.

Pointed out by:	kib
2015-08-14 14:58:04 +00:00
Michael Tuexen
faadc1b492 Allow the path MTU to grow up to the outgoing interface MTU.
MFC after: 3 days
2015-08-14 14:26:13 +00:00
Hans Petter Selasky
e4344dae5b Handle NYET high speed tokens and predict NAK'ing is up next.
MFC after:	2 weeks
2015-08-14 14:20:10 +00:00
Andrew Turner
6d16fc0687 Use __builtin_clzll to count the leading zero bits, the data is based on
long long so __builtin_clz will return an incorrect value.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D3375
2015-08-14 14:17:04 +00:00
Hans Petter Selasky
7462a4dda1 Minor code refactor to avoid duplicating code.
MFC after:	2 weeks
2015-08-14 13:58:18 +00:00
Konstantin Belousov
0a44024a4e Comment only change, fix grammar and somewhat clarify the action.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2015-08-14 13:51:59 +00:00
Alexander Motin
d8928f479b Remove some random accumulated diff from Illumos.
Submitted by:	avg (partially)
2015-08-14 13:43:12 +00:00
Baptiste Daroussin
5770ce6f1d Regression: fix pw usermod -w xxx
Reported by:	gjb
2015-08-14 13:39:55 +00:00
Alexander Motin
6cb8dbf791 2618 arc.c mistypes in the comments
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Bart Coddens <bart.coddens@gmail.com>

illumos/illumos-gate@fc98fea58e
2015-08-14 13:10:30 +00:00
Hans Petter Selasky
43ea03d756 Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2.

Description of problem:
USB transfers can process data in their callbacks sometimes causing
unacceptable latency for other USB transfers. Separate BULK completion
callbacks from CONTROL, INTERRUPT and ISOCHRONOUS callbacks, and give
BULK completion callbacks lesser execution priority than the
others. This way USB audio won't be interfered by heavy USB ethernet
usage for example.

Further serve USB transfer completion in a round robin fashion,
instead of only serving the most CPU hungry. This has been done by
adding a third flag to USB transfer queue structure which keeps track
of looping callbacks. The "command" callback function then decides
what to do when looping.

MFC after:		2 weeks
2015-08-14 12:57:53 +00:00