]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoConditionally compile [additional] programs into rescue(8) if requested
ngie [Sun, 12 Mar 2017 04:24:29 +0000 (04:24 +0000)]
Conditionally compile [additional] programs into rescue(8) if requested

Trivial oversight missed in r314240 cleanup because I enable these knobs on
my test machines.

MK_INET6_SUPPORT - rtsol
MK_NETCAT - nc

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoAdd the capability to refresh the gpart(8) label without need a reboot.
araujo [Sun, 12 Mar 2017 04:15:56 +0000 (04:15 +0000)]
Add the capability to refresh the gpart(8) label without need a reboot.

gpart(8) has functionality to change the label of an GPT partition.
This functionality works like it should, however, after a label change
the /dev/gpt/ entries remain unchanged. glabel(8) status output remains
unchanged. The change only takes effect after a reboot.

PR: 162690
Submitted by: sub.mesa@gmail, Ben RUBSON <ben.rubson@gmail.com>, ae
Reviewed by: allanjude, bapt, bcr
MFC after: 6 weeks.
Differential Revision: https://reviews.freebsd.org/D9935

7 years agoRemove /rescue/iscsictl and /rescue/iscsid if MK_ISCSI == no
ngie [Sun, 12 Mar 2017 04:14:21 +0000 (04:14 +0000)]
Remove /rescue/iscsictl and /rescue/iscsid if MK_ISCSI == no

MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoRestore some of the error message text accidentally removed in r315098
ngie [Sun, 12 Mar 2017 04:08:36 +0000 (04:08 +0000)]
Restore some of the error message text accidentally removed in r315098

"unexpected symlink contents" is more pedantically correct than
"unexpected symlink".

MFC after: 1 week
X-MFC with: r315098
Sponsored by: Dell EMC Isilon

7 years agoFix building with recent gcc
bapt [Sun, 12 Mar 2017 04:04:16 +0000 (04:04 +0000)]
Fix building with recent gcc

Reported by: lwhsu, ngie

7 years agoAdd 3 more testcases demonstrating how install -l sr works
ngie [Sun, 12 Mar 2017 03:58:54 +0000 (03:58 +0000)]
Add 3 more testcases demonstrating how install -l sr works

The additional testcases use absolute paths for sources and targets,
as the other testcase which tested `-l sr` used flat relative paths in
the same directory.

Please note that these testcases do not test `-l a` -- that's already
addressed in the battery of tests.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix bad latest entry
bapt [Sun, 12 Mar 2017 03:53:41 +0000 (03:53 +0000)]
Fix bad latest entry

Reported by: ngie

7 years agolibc: small cleanup.
pfg [Sun, 12 Mar 2017 03:50:13 +0000 (03:50 +0000)]
libc: small cleanup.

Initialize newsize in the code section so we avoids asigning the
value if we exit early.

7 years agoImplement a stub --horizon-lines=NUM for compatibility with GNU diff3
bapt [Sun, 12 Mar 2017 03:49:05 +0000 (03:49 +0000)]
Implement a stub --horizon-lines=NUM for compatibility with GNU diff3

some options of GNU diff3 would call diff with --horizon-lines, rcs is depending
on that.

Reported by: antoine

7 years agoUse nitems() from sys/param.h.
araujo [Sun, 12 Mar 2017 03:43:28 +0000 (03:43 +0000)]
Use nitems() from sys/param.h.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D9943

7 years agoFix wrong date in diff(1)
bapt [Sun, 12 Mar 2017 03:36:33 +0000 (03:36 +0000)]
Fix wrong date in diff(1)

Reported by: rgrimes

7 years agoFinish removal of WITHOUT_MANDOCDB
bapt [Sun, 12 Mar 2017 03:35:01 +0000 (03:35 +0000)]
Finish removal of WITHOUT_MANDOCDB

7 years agoFix native-xtools after replacement of GNU diff
bapt [Sun, 12 Mar 2017 03:33:20 +0000 (03:33 +0000)]
Fix native-xtools after replacement of GNU diff

7 years agoClarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body
ngie [Sun, 12 Mar 2017 03:29:49 +0000 (03:29 +0000)]
Clarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body

Unfortunately kyua does not omit the path mismatch on failure, so it must be coded
into the error message.

Cache the values, run the test(1) call, then print out the values in an atf_fail
call to emit the required diagnostics to debug why things are failing.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agolibc: small cleanups.
pfg [Sun, 12 Mar 2017 03:29:23 +0000 (03:29 +0000)]
libc: small cleanups.

Remove unused initialization: "num" is properly defined before use.

Reviewed by: ngie
MFC after: 3 days

7 years agolibc: small cleanups.
pfg [Sun, 12 Mar 2017 03:26:25 +0000 (03:26 +0000)]
libc: small cleanups.

Unsign setlen: it is local and will never be negative. Having one more bit
for growth is beneficial and it avoids a cast when it's going to be used
for allocation.

Reviewed by: ngie
MFC after: 3 days

7 years agolibc: small cleanups.
pfg [Sun, 12 Mar 2017 03:22:18 +0000 (03:22 +0000)]
libc: small cleanups.

Rename nitems to numitems: it shares the anme with an existing macro in
sys/params.h. Also initialize the value later which avoids asigning the
value if we exit early.

Reviewed by: ngie
MFC after: 3 days

7 years agoDelete duplicate -I <SRCTOP>/lib/libipsec added in r171135
ngie [Sun, 12 Mar 2017 02:21:16 +0000 (02:21 +0000)]
Delete duplicate -I <SRCTOP>/lib/libipsec added in r171135

It's already handled earlier on in the Makefile, per the change made
in r80029.

MFC after: 1 month
Sponsored by: Dell EMC Isilon

7 years agoRemove i915drm and radeondrm from NOTES and conf.
manu [Sun, 12 Mar 2017 00:52:16 +0000 (00:52 +0000)]
Remove i915drm and radeondrm from NOTES and conf.
This unbreak LINT kernel.

Reported by: lwhsu

7 years agoRevert r314833 until the problem with INSTALL_RSYMLINKS can be found
rgrimes [Sun, 12 Mar 2017 00:37:45 +0000 (00:37 +0000)]
Revert r314833 until the problem with INSTALL_RSYMLINKS can be found
as it appears to break arm release builds.

PR: 217705
Reported by: cyclaero@gmail.com
Approved by: grehan (mentor) implict as reverting

7 years agoExtend the pl011 small-fifos fix to other SoCs that indicate rev 5
ian [Sat, 11 Mar 2017 22:34:02 +0000 (22:34 +0000)]
Extend the pl011 small-fifos fix to other SoCs that indicate rev 5
hardware but lack the larger fifos rev 5 hardware should have.

The linux world (where our FDT data comes from) solved this by adding
a new property to pl011 nodes, "arm,primecell-periphid".  When this
property is present, its values override the values in the hardware
periphid registers.  For pl011 rev 5 hardware with small fifos, they
override the id so that it appears to be rev 4 hardware.

The driver now uses the new property when present.  It also continues
to check the device compat string, to handle older fdt data that may
still be in use on existing systems (on RPi systems it is common to
update system software without updating fdt data which is part of the
boot firmware).

Reviewed by: imp

7 years agoDocument uiomove_frombuf(9).
ian [Sat, 11 Mar 2017 22:22:51 +0000 (22:22 +0000)]
Document uiomove_frombuf(9).

7 years agoDo not consider using -C arg "as is" for .CURDIR unless it starts with /.
sjg [Sat, 11 Mar 2017 20:28:31 +0000 (20:28 +0000)]
Do not consider using -C arg "as is" for .CURDIR unless it starts with /.

Reported by:    bdrewery

7 years agoImprove ctl(4) description, including frontends and backends.
mav [Sat, 11 Mar 2017 20:23:05 +0000 (20:23 +0000)]
Improve ctl(4) description, including frontends and backends.

MFC after: 2 weeks

7 years agoFix removal of /usr/share/info.
jhb [Sat, 11 Mar 2017 19:59:31 +0000 (19:59 +0000)]
Fix removal of /usr/share/info.

- The GNU as manual is named as.info.gz.
- Remove the generated /usr/share/info/dir file.

7 years agoSimplify the control flow and tidy up a comment in map_insert.
alc [Sat, 11 Mar 2017 18:57:13 +0000 (18:57 +0000)]
Simplify the control flow and tidy up a comment in map_insert.

In collaboration with: kib
MFC after: 1 week

7 years agoIncrease device openings to tagged maximum.
mav [Sat, 11 Mar 2017 18:46:46 +0000 (18:46 +0000)]
Increase device openings to tagged maximum.

Some SIMs report much less untagged device openings then tagged ones.
Target mode devices are not handled by regular probing routines, and so
there is nothing to increase queue size for them to the SIM's maximum.
To fix that resize the queue explicitly on ctl periph registration.
This radically improves performance of mpt(4) in target mode.

Also fetch and report device queue statistics in `ctladm dumpstructs`,
since regular way of `camcontrol tags` is not usable in target mode.

MFC after: 2 weeks

7 years agoaacraid: fix build with AACRAID_DEBUG=2
avg [Sat, 11 Mar 2017 18:40:39 +0000 (18:40 +0000)]
aacraid: fix build with AACRAID_DEBUG=2

MFC after: 10 days

7 years agoAllow XPT_GDEV_STATS for UNCONFIGURED devices.
mav [Sat, 11 Mar 2017 18:23:05 +0000 (18:23 +0000)]
Allow XPT_GDEV_STATS for UNCONFIGURED devices.

Queue statistics has nothing to do with presence or absence of INQUIRY
data, etc.  Target mode devices are never configured, but have queues.

MFC after: 2 weeks

7 years agouma: fix pages <-> items conversions at several places
avg [Sat, 11 Mar 2017 16:43:38 +0000 (16:43 +0000)]
uma: fix pages <-> items conversions at several places

Those places were not taking into account uk_ppera.
At present one allocation is always used by one slab, so uk_ppera must
be used to convert between pages and slabs.
uk_ipers is used to convert between slabs and items.

MFC after: 1 month (if ever)

7 years agouma: eliminate uk_slabsize field
avg [Sat, 11 Mar 2017 16:35:36 +0000 (16:35 +0000)]
uma: eliminate uk_slabsize field

The field was not used beyond the initial keg setup stage anyway.

MFC after: 1 month (if ever)

7 years agozfs: provide a special vptocnp method for the .zfs vnode
avg [Sat, 11 Mar 2017 16:00:49 +0000 (16:00 +0000)]
zfs: provide a special vptocnp method for the .zfs vnode

vop_stdvptocnp() doesn't work properly if .zfs directory is hidden.

Reported by: swills, des
Tested by: des
MFC after: 1 week
MFC with: r314048

7 years agotrace thread running state when a thread is run for the first time
avg [Sat, 11 Mar 2017 15:57:41 +0000 (15:57 +0000)]
trace thread running state when a thread is run for the first time

This applies to both KTR_SCHED and DTrace sched:::on-cpu tracing.

MFC after: 10 days

7 years agoactually implement proc:::lwp-exit probe
avg [Sat, 11 Mar 2017 15:47:27 +0000 (15:47 +0000)]
actually implement proc:::lwp-exit probe

MFC after: 4 days

7 years agorevert r314862, use of GCC_MS_EXTENSIONS in qlxgbe
avg [Sat, 11 Mar 2017 15:16:55 +0000 (15:16 +0000)]
revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe

Commit r278913 made explicit use of GCC_MS_EXTENSIONS  unnecessary.

Requested by: glebius

7 years agoPartially fix target task management requests handling.
mav [Sat, 11 Mar 2017 14:25:14 +0000 (14:25 +0000)]
Partially fix target task management requests handling.

 - XPT_NOTIFY_ACKNOWLEDGE was not handled, causing stuck requests.
 - XPT_ABORT was not even trying to abort active ATIOs/INOTs.
 - Initiator's tag was not stored and not used where needed.
 - List of TM request types needed update.
 - mpt_scsi_tgt_status() missed some useful debugging.

After this change global TM requests, such as reset, should work properly.
ABORT TASK (ABTS) requests are still not passes to CTL, that is not good
and should be fixed.

MFC after: 2 weeks

7 years agoFix the attribute for scteken_clear() (change it back from the user
bde [Sat, 11 Mar 2017 13:56:06 +0000 (13:56 +0000)]
Fix the attribute for scteken_clear() (change it back from the user
user default normal attribute to the current attribute).

This change only fixes a logic error.  scterm_clear() used to be
used for terminal reset, but teken uses a general fill function for
that, leaving scterm_clear() only used for initialization and mode
change, when using the user default attribute is correct.  It is not
really a terminal function, but needs to sync its changes with the
terminal layer.  Syncing of the attribute is currently broken for
terminal reset, but works for initialization and mode change.

7 years agoAdd a scteken_set_cursor() (sc to teken) method and use it to fix
bde [Sat, 11 Mar 2017 11:31:06 +0000 (11:31 +0000)]
Add a scteken_set_cursor() (sc to teken) method and use it to fix
some cases of initialization and resetting of the teken cursor position.
(This bad name is consistent with others, but it is too easy to confuse
with scteken_cursor() which goes in the opposite direction.)

The following cases were broken:
- for booting without a syscons console, the teken and sc positions for
  ttyv0 were (0, 0), but are supposed to be somewhere in the middle of
  the screen (after carefully preserved BIOS and loader messages) (at
  least if there is no mode switch that loses the messages).
- after mode switches, the screen is cleared and the cursor is supposed to
  be moved to (0, 0), but it was only moved there for sc.

The following case was hacked to work:
- for booting with a syscons console, it was arranged that scteken_init()
  for the console could see a nonzero cursor position and adjust, although
  this broke the sc seeing it in the non-console case above.

7 years agoSplit overbloated machep.c to multiple files and do basic cleanup
mmel [Sat, 11 Mar 2017 07:07:41 +0000 (07:07 +0000)]
Split overbloated machep.c to multiple files and do basic cleanup
of these fragments.

7 years agoRegenerate after r315057
bapt [Sat, 11 Mar 2017 06:58:28 +0000 (06:58 +0000)]
Regenerate after r315057

7 years agoRemove the WITHOUT_MANDOCDB option
bapt [Sat, 11 Mar 2017 06:51:21 +0000 (06:51 +0000)]
Remove the WITHOUT_MANDOCDB option

mandoc database is activated since FreeBSD 11.0, let's remove the previous
database format for FreeBSD 12.0

7 years agoRemove the warning when MANPATH is set in the environment
bapt [Sat, 11 Mar 2017 06:31:16 +0000 (06:31 +0000)]
Remove the warning when MANPATH is set in the environment

The MANPATH environment variable behaviour is documented properly in the manpage
and it now has extended to new feature that allows to make MANPATH env variable
extending the default search path rather than overwriting it making the warning
painful

Reported by: kargl
MFC after: 1 week

7 years agoAdd the diff to the tests mtree
bapt [Sat, 11 Mar 2017 06:27:06 +0000 (06:27 +0000)]
Add the diff to the tests mtree

Reported by: lwhsu

7 years agoExtend functionality MANPATH in man(1) to followup with apropos(1) from
bapt [Sat, 11 Mar 2017 06:24:49 +0000 (06:24 +0000)]
Extend functionality MANPATH in man(1) to followup with apropos(1) from
mandoc.

If MANPATH begins with a colon, it is appended to the default list; if it ends
with a colon, it is prepended to the default list; or if it contains two
adjacent colons, the standard search path is inserted between the colons.  If
none of these conditions are met, it overrides the standard search path.

Import the MANPATH description from mandoc into the man(1) man page

Reported by: kargl
MFC after: 1 week

7 years agoAdd share/man if it exists to the MANPATH
bapt [Sat, 11 Mar 2017 05:56:50 +0000 (05:56 +0000)]
Add share/man if it exists to the MANPATH

localbase is not consistent with base for manpages:
/usr/local/man vs /usr/share/man adding share/man allows to fix that
inconsistency and would permit to remove tons of patches/modifications in the
ports tree

7 years agoDocument the removal of radeon and i915 old drm driver done in r315045.
manu [Sat, 11 Mar 2017 05:12:39 +0000 (05:12 +0000)]
Document the removal of radeon and i915 old drm driver done in r315045.

Reported by: linimon

7 years agoImport diff from OpenBSD and remove GNU diff
bapt [Sat, 11 Mar 2017 05:01:29 +0000 (05:01 +0000)]
Import diff from OpenBSD and remove GNU diff

Some of the modifications from the previous summer of code has been integrated
Modification for compatibility with GNU diff output has been added

Main difference with OpenBSD:
Implement multiple GNU diff options:
* --ignore-file-name-case
* --no-ignore-file-name-case
* --normal
* --tabsize
* --strip-trailing-cr
Make diff -p compatible with GNU diff
Implement diff -l
Make diff -r compatible with GNU diff

Capsicumize diffing 2 regular files
Add a simple test suite

Approved by: AsiaBSDcon devsummit
Obtained from: OpenBSD, GSoC
Relnotes: yes

7 years agoFix the L2 address printed in the "arp: %s moved from %*D" message.
ae [Sat, 11 Mar 2017 04:57:52 +0000 (04:57 +0000)]
Fix the L2 address printed in the "arp: %s moved from %*D" message.

In the r292978 struct llentry was changed and the ll_addr field become
the pointer.

PR: 217667
MFC after: 1 week

7 years agoBring back the cast removed in my previous commit to allow us build vmstat
araujo [Sat, 11 Mar 2017 04:36:15 +0000 (04:36 +0000)]
Bring back the cast removed in my previous commit to allow us build vmstat
with WARNS 2. This cast was first introduced at r87690.

Reported by: bde, pfg and ngie
MFC after: 3 weeks.

7 years agoUse nitems() from sys/param.h.
araujo [Sat, 11 Mar 2017 04:03:13 +0000 (04:03 +0000)]
Use nitems() from sys/param.h.

MFC after: 3 weeks.

7 years agoUse nitems() from sys/param.h.
araujo [Sat, 11 Mar 2017 04:01:35 +0000 (04:01 +0000)]
Use nitems() from sys/param.h.

Reviewed by: np
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9945

7 years agoUse nitems() from sys/param.h
araujo [Sat, 11 Mar 2017 04:00:27 +0000 (04:00 +0000)]
Use nitems() from sys/param.h

Reviewed by: jhb
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9941

7 years agodrm(old): Remove i915 and radeon drivers
manu [Sat, 11 Mar 2017 03:01:18 +0000 (03:01 +0000)]
drm(old): Remove i915 and radeon drivers

They cannot be used anymore with the userland bits we provide.
Furthermore, their KMS versions support the same hardware.

Submitted by: dumbbell
Reviewed by: emaste, manu
Sponsored by: AsiaBSDCon
Differential Revision: https://reviews.freebsd.org/D5614

7 years agoIncrease WARNS for pw tests
asomers [Sat, 11 Mar 2017 00:11:20 +0000 (00:11 +0000)]
Increase WARNS for pw tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for rtld-elf tests
asomers [Sat, 11 Mar 2017 00:10:40 +0000 (00:10 +0000)]
Increase WARNS for rtld-elf tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for libutil tests
asomers [Sat, 11 Mar 2017 00:09:54 +0000 (00:09 +0000)]
Increase WARNS for libutil tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for libproc tests
asomers [Sat, 11 Mar 2017 00:09:30 +0000 (00:09 +0000)]
Increase WARNS for libproc tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for libpathconv tests
asomers [Sat, 11 Mar 2017 00:08:46 +0000 (00:08 +0000)]
Increase WARNS for libpathconv tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for libmp tests
asomers [Sat, 11 Mar 2017 00:08:11 +0000 (00:08 +0000)]
Increase WARNS for libmp tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for libcrypt tests
asomers [Sat, 11 Mar 2017 00:07:04 +0000 (00:07 +0000)]
Increase WARNS for libcrypt tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie, julian
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoDocument that the msun tests require WARNS=0
asomers [Sat, 11 Mar 2017 00:04:59 +0000 (00:04 +0000)]
Document that the msun tests require WARNS=0

ATF tests have a default WARNS of 0, unlike other usermode programs.  This
change is technically a noop, but it documents that the msun tests don't
work with any warnings enabled, at least not on all architectures.

Reviewed by:  ngie
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for nss tests
asomers [Sat, 11 Mar 2017 00:03:41 +0000 (00:03 +0000)]
Increase WARNS for nss tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by:  ngie
MFC after:    3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision:        https://reviews.freebsd.org/D9933

7 years agoIncrease WARNS for iconv tests
asomers [Sat, 11 Mar 2017 00:02:05 +0000 (00:02 +0000)]
Increase WARNS for iconv tests

ATF tests have a default WARNS of 0, unlike other usermode programs.

Reviewed by: ngie
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933

7 years ago[fdt] Make DTBs generated by make_dtb.sh overlay-ready
gonzo [Fri, 10 Mar 2017 22:45:07 +0000 (22:45 +0000)]
[fdt] Make DTBs generated by make_dtb.sh overlay-ready

Generate symbols node when compiling dts files so they can be modified
during boot-time by applying overlays.

7 years agoAbort all ATIOs and INOTs queued to SIM on LUN disable.
mav [Fri, 10 Mar 2017 21:09:33 +0000 (21:09 +0000)]
Abort all ATIOs and INOTs queued to SIM on LUN disable.

Some SIMs may not abort them implicitly, that either fail the LUN disable
request or just make us wait for those CCBs forever.  With this change
I can successfully disable LUNs on mpt(4).  For isp(4), which aborts them
implicitly, this change should be irrelevant.

MFC after: 2 weeks

7 years agoSwitch work_queue from TAILQ to STAILQ.
mav [Fri, 10 Mar 2017 20:20:00 +0000 (20:20 +0000)]
Switch work_queue from TAILQ to STAILQ.

It is mostly FIFO and we don't need random removal there.

MFC after: 2 weeks

7 years agoRequest change of SIM target role only when it is different.
mav [Fri, 10 Mar 2017 19:43:45 +0000 (19:43 +0000)]
Request change of SIM target role only when it is different.

Separate WWNs change into separate request to know what actually failed.

MFC after: 2 weeks

7 years ago[loader][fdt] Fix applying overlays without __local_fixups__ node
gonzo [Fri, 10 Mar 2017 19:15:57 +0000 (19:15 +0000)]
[loader][fdt] Fix applying overlays without __local_fixups__ node

Do not return error if __local_fixups__ node is missing in DTB overlay
because local fixup data is optional.

Reported by: Manuel Stuhn
MFC after: 1 week

7 years agoTypo.
markj [Fri, 10 Mar 2017 19:13:38 +0000 (19:13 +0000)]
Typo.

MFC after: 3 days

7 years agoTypo.
glebius [Fri, 10 Mar 2017 19:08:31 +0000 (19:08 +0000)]
Typo.

7 years agoUpdate clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.
dim [Fri, 10 Mar 2017 19:02:41 +0000 (19:02 +0000)]
Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.
We were already very close to the last release candidate, so this is a
pretty minor update.

Relnotes: yes
MFC after: 1 month
X-MFC-With: r314564

7 years ago[dtc] regenerate version file if upstream Makefile has been changed
gonzo [Fri, 10 Mar 2017 17:37:55 +0000 (17:37 +0000)]
[dtc] regenerate version file if upstream Makefile has been changed

Keep version file in sync by adding dependency to upstream Makefile

7 years agoMerge from vendor branch importing dtc 1.4.3
gonzo [Fri, 10 Mar 2017 17:36:05 +0000 (17:36 +0000)]
Merge from vendor branch importing dtc 1.4.3

Major new feature in this import is FDT overlay support

7 years agor314948 seems to be missing a variable or two that will break
sbruno [Fri, 10 Mar 2017 17:14:08 +0000 (17:14 +0000)]
r314948 seems to be missing a variable or two that will break
TFTP/MFSRoot booting via PXE.  For the TFTP_LOADER case, go ahead and
fire off the old bootp() request to ensure that whatever is missing is
populated.

Sponsored by: Limelight Networks

7 years agolocaledef(1): Add comment markings for license.
pfg [Fri, 10 Mar 2017 16:12:16 +0000 (16:12 +0000)]
localedef(1): Add comment markings for license.

7 years agolocaledef(1): Fix mismatch.
pfg [Fri, 10 Mar 2017 16:06:14 +0000 (16:06 +0000)]
localedef(1): Fix mismatch.

Obtained from: illumos
X-MFC with: r314974

7 years agosh: Fix executing wrong command with ${unsetvar#$(cmdsubst)}$(cmdsubst).
jilles [Fri, 10 Mar 2017 16:04:00 +0000 (16:04 +0000)]
sh: Fix executing wrong command with ${unsetvar#$(cmdsubst)}$(cmdsubst).

The parsed internal representation of words consists of a byte string with a
list of nodes (commands in command substitution). Each unescaped CTLBACKQ or
CTLBACKQ | CTLQUOTE byte corresponds to an entry in the list.

If param in ${param#%##%%word} is not set, the word is not expanded (in a
deviation of POSIX shared with other ash variants and ksh93). Erroneously,
the pointer in the list of commands (argbackq) was not advanced. This caused
the wrong command to be executed later if the outer word contained another
command substitution.

Example:
  echo "${unsetvar#$(echo a)}$(echo b)"
wrote "a" but should write "b".

MFC after: 1 week

7 years agoAdd PIM_EXTLUNS support to mpt(4).
mav [Fri, 10 Mar 2017 14:44:59 +0000 (14:44 +0000)]
Add PIM_EXTLUNS support to mpt(4).

Target mode is still limited to 256 LUNs due to the way driver is written,
but initiator can now use full 8 byte LUN space.

MFC after: 2 weeks

7 years agoRename scteken_revattr() to scteken_sc_to_te_attr(). scteken_revattr()
bde [Fri, 10 Mar 2017 14:25:38 +0000 (14:25 +0000)]
Rename scteken_revattr() to scteken_sc_to_te_attr().  scteken_revattr()
looked like it might handle reverse attributes, but it actually handles
conversion of attributes in the direction indicated by the new name.
Reverse attributes are just broken.

Rename scteken_attr() to scteken_te_to_sc_attr().  scteken_attr() looked
like it might give teken attributes, but it actually gives sc attributes.

Change scteken_te_to_sc_attr() to return int instead of unsigned int.
u_char would be enough, and it promotes to int, and syscons uses int
or u_short for its attributes everywhere else (u_short holds a shifted
form and it promotes to int too).

7 years agoImprove residuals reporting in target mode.
mav [Fri, 10 Mar 2017 13:39:16 +0000 (13:39 +0000)]
Improve residuals reporting in target mode.

MFC after: 2 weeks

7 years agoFix panic on wildcard target LUN disable.
mav [Fri, 10 Mar 2017 13:14:06 +0000 (13:14 +0000)]
Fix panic on wildcard target LUN disable.

MFC after: 2 weeks

7 years agoStart fixing some bugs in attribute handling.
bde [Fri, 10 Mar 2017 11:44:09 +0000 (11:44 +0000)]
Start fixing some bugs in attribute handling.

This change just does cleanups missed in r56043 17 years ago.  The
default attributes were still stored in structs for the purpose of
changing them and passing around pointers to the defaults, but r56043
added another layer that made the defaults invariant and only used for
initialization and reset.  Just use the defaults directly.  This was
already done for the kernel defaults.  The defaults for reverse
attributes aren't actually used, but are ignored in layers that no
longer support them.

7 years agoFix FC target mode in mpt(4), broken in multiple ways.
mav [Fri, 10 Mar 2017 10:35:52 +0000 (10:35 +0000)]
Fix FC target mode in mpt(4), broken in multiple ways.

 - Not set BufferLength caused receive of empty ATIOs.
 - CDB length guessing was broken at least for RC16.
 - mpt_req_untimeout() was called with wrong req parameter.
 - Sense data reporting was broken in several ways.

With this change my LSI7204EP-LC can pass at least basic tests as target.
The code is still far from perfect, but finally I found second hw/driver
after isp(4) that really can work in CAM target mode.

MFC after: 2 weeks

7 years agoFix compilation on sparc64. The frame buffer address is in a field that
bde [Fri, 10 Mar 2017 10:25:48 +0000 (10:25 +0000)]
Fix compilation on sparc64.  The frame buffer address is in a field that
is unavailable on sparc64 only.  This makes the new ec_putc() a non-op
on sparc64 but still calls it.  On other non-x86 arches, it should
compile but might not work.

Reported by: gjb

7 years agoFix NULL pointer dereference and panic with shm file pread/pwrite.
mmokhi [Fri, 10 Mar 2017 10:09:44 +0000 (10:09 +0000)]
Fix NULL pointer dereference and panic with shm file pread/pwrite.

PR: 217429
Reported by: Tim Newsham <tim.newsham@nccgroup.trust>
Reviewed by: kib
Approved by: dchagin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9844

7 years agoAdd a very natural, binary version of the ASCII table.
jlh [Fri, 10 Mar 2017 09:58:10 +0000 (09:58 +0000)]
Add a very natural, binary version of the ASCII table.

Reviewed by: bcr, eadler
Obtained from: https://garbagecollected.org/2017/01/31/four-column-ascii/
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D9902

7 years agoUse nitems() from sys/param.h.
araujo [Fri, 10 Mar 2017 06:25:54 +0000 (06:25 +0000)]
Use nitems() from sys/param.h.

Reviewed by: ngie
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9940

7 years agoUse nitems() from sys/param.h.
araujo [Fri, 10 Mar 2017 06:23:15 +0000 (06:23 +0000)]
Use nitems() from sys/param.h.

Reviewed by: ngie
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9936

7 years agoUse nitems() from sys/param.h and also remove the cast.
araujo [Fri, 10 Mar 2017 04:49:40 +0000 (04:49 +0000)]
Use nitems() from sys/param.h and also remove the cast.

Reviewed by: markj
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9937

7 years agoUse nitems() from sys/param.h.
araujo [Fri, 10 Mar 2017 04:30:31 +0000 (04:30 +0000)]
Use nitems() from sys/param.h.

Reviewed by: ume
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9938

7 years agoUse nitems() from sys/param.h.
araujo [Fri, 10 Mar 2017 04:24:21 +0000 (04:24 +0000)]
Use nitems() from sys/param.h.

Reviewed by: asomers
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9944

7 years agoImport dtc 1.4.3
gonzo [Fri, 10 Mar 2017 03:28:43 +0000 (03:28 +0000)]
Import dtc 1.4.3

Obtained from:  https://www.kernel.org/pub/software/utils/dtc/dtc-1.4.3.tar.gz

7 years agolocaledef(1): Fix small coverity issues.
pfg [Thu, 9 Mar 2017 21:49:11 +0000 (21:49 +0000)]
localedef(1): Fix small coverity issues.

- Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
- Buffer not null terminated (BUFFER_SIZE_WARNING)

CID: 13385571338565

Obtained from: illumos
MFC after: 5 days

7 years agoAvoid bind lock recursion.
kib [Thu, 9 Mar 2017 21:05:47 +0000 (21:05 +0000)]
Avoid bind lock recursion.

When dlclose(3) unloads an object with filtees, it recursively calls
dlclose(3) on each filtee in free_needed_filtees().  Introduce
dlclose_locked() helper, called from free_needed_filtees() instead of
dlclose(), and pass the bind lockstate down to avoid recursing.

Reported and tested by: jhibbits
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRevert r314969, r314961:
pfg [Thu, 9 Mar 2017 19:02:36 +0000 (19:02 +0000)]
Revert r314969, r314961:

The localdef(1) changes are breaking world:

00:18:40.750 /usr/src/share/colldef/af_ZA.UTF-8.src: 2421: error: Bad file
descriptor

I will fix them offline.

Reported by: lwshu and many others

7 years agoFix implementation of the DECLARE_WORK() macro in the LinuxKPI to fully
hselasky [Thu, 9 Mar 2017 18:37:17 +0000 (18:37 +0000)]
Fix implementation of the DECLARE_WORK() macro in the LinuxKPI to fully
initialize the declared work structure and not only the function callback
pointer.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoImplement support for mutexes with deadlock avoidance in the LinuxKPI.
hselasky [Thu, 9 Mar 2017 18:33:40 +0000 (18:33 +0000)]
Implement support for mutexes with deadlock avoidance in the LinuxKPI.

When locking a mutex and deadlock is detected the first mutex lock
call that sees the deadlock will return -EDEADLK .

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agolocaledef(1): Fix mismatch in previous commit.
pfg [Thu, 9 Mar 2017 18:06:48 +0000 (18:06 +0000)]
localedef(1): Fix mismatch in previous commit.

delete_category is meant to replace fclose() and unlink().
This broke world.

Found by: kib
Pointedhat: pfg

7 years agoReport some more data in XPT_PATH_INQ.
mav [Thu, 9 Mar 2017 17:53:37 +0000 (17:53 +0000)]
Report some more data in XPT_PATH_INQ.

I am not sure they are used anywhere, but why not.

MFC after: 2 weeks

7 years agoAdd support for XPT_GET_SIM_KNOB in FC mode.
mav [Thu, 9 Mar 2017 17:35:35 +0000 (17:35 +0000)]
Add support for XPT_GET_SIM_KNOB in FC mode.

MFC after: 2 weeks