Commit Graph

189866 Commits

Author SHA1 Message Date
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Aleksandr Rybalko
16aa1f0950 Hide debug messages under VT_DEBUG.
Sponsored by:	The FreeBSD Foundation
2014-05-08 22:52:05 +00:00
Christian Brueffer
02e843636a Fix two more typos.
Submitted by:	Trond Endrestol
2014-05-08 21:02:23 +00:00
Michael Tuexen
26461454fc Use KASSERTs as suggested by glebius@
MFC after: 3 days
X-MFC with: 265691
2014-05-08 20:47:54 +00:00
Kenneth D. Merry
a371d6f964 Add #ifdefs in the mpr(4) driver so that versions of stable/9 that
have implemented the PIM_NOSCAN rescan functionality will have it
enabled.

This is a no-op for head.

Reviewed by:	slm
Sponsored by:	Spectra Logic Corporation
MFC after:	3 days
2014-05-08 20:46:46 +00:00
Kenneth D. Merry
d2b4e18b21 Fix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers.
TLR is necessary for reliable communication with SAS tape drives.

This was broken by change 246713 in the mps(4) driver.  It changed the
cm_data field for SCSI I/O requests to point to the CCB instead of the data
buffer.  So, instead, look at the CCB's data pointer to determine whether
or not we're talking to a tape drive.

Also, take the residual into account to make sure that we don't go off the
end of the request.

MFC after:	3 days
Sponsored by:	Spectra Logic Corporation
2014-05-08 20:28:22 +00:00
Pedro F. Giffuni
437bce620f Fix the incorrect handling of %b and \c in printf(1)
This is required for POSIX compliance.

Obtained from:	Garrett D'Amore (Illumos)
MFC after:	4 days
2014-05-08 20:20:59 +00:00
Ian Lepore
9f8e153645 Consolitate all the AP core startup stuff under a single #ifdef SMP block.
Remove some other ifdefs that came in with a copy/paste that mean basically
"if this processor supports multicore stuff", because if you're starting up
an AP core... it does.
2014-05-08 20:02:38 +00:00
David C Somayajulu
ed062a309e Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business.
Added clean option to Makefile

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
MFC after:5 days
2014-05-08 19:40:37 +00:00
Alan Somers
540c78258c Incorporate feedback from bde and jilles regarding r265472 to dd(1).
* Don't use sysexits.h.  Just exit 1 on error and 0 otherwise.
* Don't sacrifice precision by converting the output of clock_gettime() to a
  double and then comparing the results.  Instead, subtract the values of
  the two clock_gettime() calls, then convert to double.
* Don't use CLOCK_MONOTONIC_PRECISE.  It's an unportable synonym for
  CLOCK_MONOTONIC.
* Use more appropriate names for some local variables.
* In the summary message, round elapsed time to the nearest microsecond.

Reported by:	bde, jilles
MFC after:	3 days
X-MFC-With:	265472
2014-05-08 19:10:04 +00:00
Ian Lepore
f296249f58 Move the mptramp code which is specific to the Marvell ArmadaXP SoC out of
the common locore.S file and into the mv/armadaxp directory.
2014-05-08 18:36:42 +00:00
Michael Tuexen
8e1d0a568a For some UDP packets (for example with 200 byte payload) and IP options,
the IP header and the UDP header are not in the same mbuf.
Add code to in_delayed_cksum() to deal with this case.

MFC after: 3 days
2014-05-08 17:27:46 +00:00
Ian Lepore
0bd55d38ec Use edge-triggered interrupts rather than polling loops to avoid missing
transitions of the INIT_B line.  Also, release the mutex during uiomove().

Submitted by:	Thomas Skibo <ThomasSkibo@sbcglobal.net>
2014-05-08 17:20:45 +00:00
Alexander Motin
afb8674c79 Import adapted OpenSolaris' thread pool API implementation.
The thread pool is used by libzfs to implement parallel disk scanning.
Without this change our dummy wrapper made `zpool import ZZZ` command to
scan all disks sequentially from the single thread when searching for pools.
This change makes it use two threads per CPU, same as in OpenSolaris.

On system with 200 HDDs this change reduces ZFS pool import time from 35
to 22 seconds.
2014-05-08 16:59:36 +00:00
Warner Losh
fa11423442 Add usr/share/mk/src.opts.mk to obsolete files. It never should have
been installed in the first place, and it must be removed ASAP or
weird build errors may start happening in the future if this file is
ever taken from the installed system. Add note to UPDATING.
2014-05-08 15:58:34 +00:00
Alexander V. Chernikov
6db47af467 Rename rt_msg1() to more handy rtsock_msg_mbuf().
(Just for history purposes: rt_msg2() was renamed
 to rtsock_msg_buffer() in r265019).

Sponsored by:	Yandex LLC
MFC after:	1 month
2014-05-08 13:54:57 +00:00
Aleksandr Rybalko
8a25d54521 Fix scrollback.
Sponsored by:	The FreeBSD Foundation
2014-05-08 13:46:36 +00:00
Aleksandr Rybalko
7273a5307a No need to assign fields required and checked on probe.
Sponsored by:	The FreeBSD Foundation
2014-05-08 13:38:29 +00:00
Alexander V. Chernikov
3deb3649d5 Fix incorrect netmasks being passed via rtsock.
Since radix has been ignoring sa_family in passed sockaddrs,
no one ever has bothered filling valid sa_family in netmasks.
Additionally, radix adjusts sa_len field in every netmask not to
compare zero bytes at all.

This leads us to rt_mask with sa_family of AF_UNSPEC (-1) and
arbitrary sa_len field (0 for default route, for example).

However, rtsock have been passing that rt_mask intact for ages,
requiring all rtsock consumers to make ther own local hacks.
We even have unfixed on in base:

do `route -n monitor` in one window and issue `route -n get addr`
for some directly-connected address. You will probably see the following:

got message of size 304 on Thu May  8 15:06:06 2014
RTM_GET: Report Metrics: len 304, pid: 30493, seq 1, errno 0, flags:<UP,DONE,PINNED>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
 10.0.0.0 link#1 (255) ffff ffff ff em0:8.0.27.c5.29.d4 10.0.0.92
_________________^^^^^^^^^^^^^^^^^^

after the change:

got message of size 312 on Thu May  8 15:44:07 2014
RTM_GET: Report Metrics: len 312, pid: 2895, seq 1, errno 0, flags:<UP,DONE,PINNED>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
 10.0.0.0 link#1 255.255.255.0 em0:8.0.27.c5.29.d4 10.0.0.92
_________________^^^^^^^^^^^^^^^^^^

Sponsored by:	Yandex LLC
MFC after:	1 month
2014-05-08 11:56:06 +00:00
Mark Johnston
f0736f4cec Re-apply r248644. This fixes an annoying problem which caused dtrace -c to
fail to attach to stripped binaries. With the _r_debug_postinit symbol,
dtrace(1) can now set a breakpoint in the victim process after it has
registered its DOF table(s) with the kernel. r_debug_state cannot be used
for this purpose since it is called before DOF is made available, in which
case dtrace(1) cannot create USDT probes before the program begins
execution.

MFC after:	2 weeks
2014-05-08 03:43:18 +00:00
Mark Johnston
59c56d6c6f Fix the rd_event_addr prototype and slightly clarify the use of the "event"
parameter.

MFC after:	3 days
2014-05-08 03:33:54 +00:00
Mark Johnston
b252f278ea Handle the different event types properly in rd_event_addr(). In particular,
with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1)
uses r_debug_state for dl state transitions, so we use its address for
RD_DLACTIVITY events.

MFC after:	2 weeks
2014-05-08 03:26:25 +00:00
Warner Losh
09df65e474 Put bsd.own.mk back in the list, and take src.opts.mk out.
Fix a silly typo.
2014-05-08 02:24:30 +00:00
Warner Losh
8a863ef3d5 Fix a typo make should have complained about.
Submitted by: Mark Johnston
2014-05-08 02:18:36 +00:00
Ganbold Tsagaankhuu
229af4388c Silence no interrupt-parent found message during boot.
Approved by:	stas (mentor)
2014-05-08 00:26:21 +00:00
Simon J. Gerraty
f974b33f6e Update - allow collecting stats when WITH_META_STATS is defined. 2014-05-07 23:50:44 +00:00
Jilles Tjoelker
5699ef2588 sh: Add some tests for normal use of getopts. 2014-05-07 21:45:25 +00:00
Ed Maste
97a9b0b123 Handle ELF files with 65280 or more sections
If e_shnum or e_shstrndx are at least SHN_LORESERVE (0xff00) then an
escape value is used to indicate that the actual value is found in one
of section 0's fields.

Sponsored by:	DARPA, AFRL
2014-05-07 21:16:47 +00:00
Glen Barber
adb7cfe32b Document r265555, addition of mrsas(4).
Sponsored by:	The FreeBSD Foundation
2014-05-07 21:00:09 +00:00
Glen Barber
68c06f2a11 Separate &darpa; entity and create &darpa_afrl to
avoid confusion.

Suggested by:	rwatson
Sponsored by:	The FreeBSD Foundation
2014-05-07 20:31:44 +00:00
Glen Barber
17021848d8 Correct attribution for casperd, co-sponsored by
The FreeBSD Foundation and Google, Inc.[1]

Since this was dual-sponsored, the sponsorurl needs
to be empty.

Add Google to the sponsor.ent file.

Reminded by:	rwatson [1]
Sponsored by:	The FreeBSD Foundation
2014-05-07 20:27:57 +00:00
Glen Barber
a8783f0d7e Add a note to keep the entity lists sorted alphabetically.
Sponsored by:	The FreeBSD Foundation
2014-05-07 20:18:50 +00:00
Glen Barber
2d7acd0341 Add attribution for r265348.
Add Netgate to sponsor.ent.

Sponsored by:	The FreeBSD Foundation
2014-05-07 20:15:36 +00:00
Glen Barber
91f7ca8625 Add attribution for r265236.
Add LSI and Spectra Logic to sponsor.ent.

Sponsored by:	The FreeBSD Foundation
2014-05-07 20:15:34 +00:00
Glen Barber
258edf4796 Add attribution for r264601.
Sponsored by:	The FreeBSD Foundation
2014-05-07 20:15:32 +00:00
Glen Barber
880014df66 Add attribution for r258884.
Add DARPA, AFRL to sponsor.ent.

Sponsored by:	The FreeBSD Foundation
2014-05-07 20:15:30 +00:00
Glen Barber
b17cc1119a Add sponsorship attribution for r258838 (casperd(8)).
Sponsored by:	The FreeBSD Foundation
2014-05-07 19:53:51 +00:00
Glen Barber
b9a00c9165 Add references to sponsor.ent and vendor.ent in
relnotes/article.xml and share/xml/catalog.xml.

Sponsored by:	The FreeBSD Foundation
2014-05-07 19:44:44 +00:00
Glen Barber
6ed9a30c51 Add two new entity files in followup to r265590,
sponsor.ent and vendor.ent, which will be used for
sponsor/vendor names and URLs.

Sponsored by:	The FreeBSD Foundation
2014-05-07 19:43:23 +00:00
Thomas Quinot
aa7a161b40 (dd_out): Fix handling of all-zeroes block at end of input with
conv=sparse.

This change fixes two separate issues observed when the last output
block is all zeroes, and conv=sparse is in use. In this case, care
must be taken to roll back the last seek and write the entire last zero
block at the original offset where it should have occurred: when the
destination file is a block device, it is not possible to roll back
by just one character as the write would then not be properly aligned.

Furthermore, the buffer used to write this last all-zeroes block
needs to be properly zeroed-out. This was not the case previously,
resulting in a junk data byte appearing instead of a zero in the
output stream.

PR:		bin/189174
PR:		bin/189284
Reviewed by:	kib
MFC after:	2 weeks
2014-05-07 19:33:29 +00:00
Pedro F. Giffuni
f8a6c905bf Add width and precision specifiers to printf(1) %n$.
This actually completes r264743 so that width and precision
specifiers work properly with %n$. These keeps consistency
with  ksh93 and zsh.

Requested by:	jilles
Obtained from:	Garrett D'Amore (Illumos)
MFC after:	4 days
2014-05-07 19:30:28 +00:00
Thomas Quinot
4d6bab2606 Introduce a new command line switch '-H' for stat(1)
causing arguments to be interpreted as NFS file handles.

Reviewed by:	-arch (jhb, eadler)
MFC after:	1 month
2014-05-07 19:22:54 +00:00
Glen Barber
37e9c1d132 Modify release.xsl to allow proper attribution for
sponsored and/or contributed works.

This works similarly to how the subversion revision is
suffixed in release notes entries when 'revision="NNNNNN"'
is set.

The <para> tag in relnotes/article.xml can now take the
following new elements:

 - contrib: defined to what type of contribution the change
   is.  Right now, only 'vendor' or 'sponsor' are used.
   'vendor' is intended for vendor-contributed code, such as
   driver updates, etc.  'sponsor' is intended for sponsored
   work (the 'Sponsored by:' in the commit template).

 - vendor: The canonical name of the vendor.

 - sponsor: The canonical name of the sponsor.

 - vendorurl: The URL for the vendor website, if applicable.

 - sponsorurl: The URL for the sponsor website, if applicable.

If 'vendor' or 'sponsor' are set, but 'contrib' is not, nothing
is rendered.  If 'contrib' is set, but no 'vendor' or 'sponsor'
are defined, nothing is printed.  If 'vendorurl' or 'sponsorurl'
are set, the 'vendor' or 'sponsor' text is link, otherwise is
non-clickable text.

Sponsored by:	The FreeBSD Foundation
2014-05-07 19:20:54 +00:00
Adrian Chadd
e3665aee04 Add casts to have it compile on amd64 without complaining about
mismatched types.

Tested:

* AR9280, TDMA slave, amd64.
2014-05-07 19:07:45 +00:00
Christian Brueffer
5fdd3ac20b Generate hardware notes for mrsas(4). 2014-05-07 18:27:12 +00:00
Christian Brueffer
20f355b2e5 First cleanup pass: new sentence -> new line, mdoc, typos and style. 2014-05-07 18:21:38 +00:00
Warner Losh
bd871f14b7 bsd.compiler.mk was implicitly included by bsd.own.mk in historical
versions. With its movement to src.opts.mk, bsd.prog.mk was testing
COMPILER_TYPE without including the bsd.compiler.mk anymore. In the
source tree, this caused no problems, for reasons that aren't clear,
but does cause problems outside of the source tree. Allow
bsd.compiler.mk to be included multiple times safely, and always
include bsd.compiler.mk at the top of bsd.prog.mk. Resist the urge to
put it in bsd.init.mk, since that would reintroduce the implicit
include.
2014-05-07 18:15:02 +00:00
Warner Losh
5d420b97e6 All the NO_foo options processed in src.opts.mk are really bsd.opts.mk
options, so move their processing there. This fixes issues with
Makefiles that define NO_MAN=t and only inlcude bsd.*.mk files. A few
ports fell into this category, and they should be fixed by this change.
Also, for now, disable the warning about NO_foo being deprecated. More
work is needed than anticipated before we can do that, so kill the
noise for now.
2014-05-07 18:14:56 +00:00
Mark Johnston
7a61fc5a8e - Export the function added in r265456 rather than the non-existent
_rtld_debug_postinit(). [1]
- Use __compiler_membar() instead of inline asm in _r_debug_state() and
  _r_debug_postinit(). [2]

Pointy hat to:	markj [1]
Reported by:	attilio [2]
Discussed with:	kib
X-MFC-With:	r265456
2014-05-07 17:21:22 +00:00
Doug Ambrisko
665484d8f0 Add mrsas(4) driver from LSI official support of newer MegaRAID SAS
cards.  LSI has been maintaining this driver outside of the FreeBSD
tree.  It overlaps support of ThunderBolt and Invader cards that mfi(4)
supports.  By default mfi(4) will attach to cards.  If the tunable:
	hw.mfi.mrsas_enable=1
is set then mfi(4) will not probe and attach to these newer cards and
allow mrsas(4) to attach.  So by default this driver will not effect
a FreeBSD system unless mfi(4) is removed from the kernel or the
tunable is enabled.

mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices
show up as /dev/daX.  mfiutil(8) does not work with mrsas.  The FreeBSD
version of MegaCli and StorCli from LSI do work with mrsas.  It appears
that StorCli only works with mrsas.  MegaCli appears to work with mfi(4)
and mrsas(4).

It would be good to add mfiutil(4) support to mrsas, emulations modes,
kernel logging, device aliases to ease the transition between mfi(4)
and mrsas(4).

Style issues should be resolved by LSI when they get committers approved.
The plan is get this driver in FreeBSD 9.3 to improve HW support.

Thanks to LSI for developing, testing and working with FreeBSD to
make this driver co-exist in FreeBSD.  This improves the overall
support of MegaRAID SAS.

Submitted by:	Kashyap Desai <Kashyap.Desai@lsi.com>
Reviewed by:	scottl
MFC after:	3 days
Sponsored by:	LSI
2014-05-07 16:16:49 +00:00