]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd cxl(4) and if_cxl(4) as links to cxgbe(4).
np [Fri, 20 Feb 2015 22:52:24 +0000 (22:52 +0000)]
Add cxl(4) and if_cxl(4) as links to cxgbe(4).

MFC after: 1 week.

9 years agoregex(3): Fix uninitialized pointer values.
pfg [Fri, 20 Feb 2015 21:21:38 +0000 (21:21 +0000)]
regex(3): Fix uninitialized pointer values.

CID: 405582 (also clang static checker)
CID: 1018724

9 years agoDon't specify a resid parameter if we're just going to ignore it. Instead,
markj [Fri, 20 Feb 2015 20:49:00 +0000 (20:49 +0000)]
Don't specify a resid parameter if we're just going to ignore it. Instead,
let vn_rdwr() check for short reads.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agotab vs spaces.
pfg [Fri, 20 Feb 2015 20:27:53 +0000 (20:27 +0000)]
tab vs spaces.

9 years agoFix the logic for skipping parameters (with -s) that have "jailsys"
jamie [Fri, 20 Feb 2015 20:12:05 +0000 (20:12 +0000)]
Fix the logic for skipping parameters (with -s) that have "jailsys"
parents (such as host.hostname); these were being skipped all the time.
That it went this long without anyone noticing is a sign that this feature
isn't actually used by anyone, but it's there so it might as well work.

MFC after: 1 week

9 years agoAllow parameters listed on the command line to override the -v option,
jamie [Fri, 20 Feb 2015 19:48:24 +0000 (19:48 +0000)]
Allow parameters listed on the command line to override the -v option,
instead of crashing.

PR: 197701
MFC after: 1 week

9 years agosfxge: reap Tx descriptors on unblock
arybchik [Fri, 20 Feb 2015 19:44:02 +0000 (19:44 +0000)]
sfxge: reap Tx descriptors on unblock

Otherwise when processing finally comes to efx_tx_qdesc_post() it could
be insufficient space between reaped and added to post pending
descriptors.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoFix build on i386 without "device apic"
tijl [Fri, 20 Feb 2015 19:42:26 +0000 (19:42 +0000)]
Fix build on i386 without "device apic"

Reviewed by: kib

9 years agosfxge: add assertions that required event handlers are implemented
arybchik [Fri, 20 Feb 2015 19:42:05 +0000 (19:42 +0000)]
sfxge: add assertions that required event handlers are implemented

efx_ev_mcdi() does not assert or check that all event handlers it
calls are non-null.  Add assertions at the top for all required
event handlers, as some events (in the case of this bug, monitor
events) are rare.

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: style fixes
arybchik [Fri, 20 Feb 2015 19:39:40 +0000 (19:39 +0000)]
sfxge: style fixes

Use nitem() to get number of array elements.
Remove unused define.
Use TAB to indent.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: regenerate sensor map
arybchik [Fri, 20 Feb 2015 19:37:10 +0000 (19:37 +0000)]
sfxge: regenerate sensor map

Add Florence R7 and Modena sensors.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoDefault XZ_THREADS=0, and add to RELEASE_RMAKEFLAGS
gjb [Fri, 20 Feb 2015 18:51:52 +0000 (18:51 +0000)]
Default XZ_THREADS=0, and add to RELEASE_RMAKEFLAGS
so it is passed to the 'release' make(1) target if
it needs to be adjusted to a non-zero integer.

Sponsored by: The FreeBSD Foundation

9 years agoFix XZ_THREADS description in release(7), which defaults to
gjb [Fri, 20 Feb 2015 18:49:49 +0000 (18:49 +0000)]
Fix XZ_THREADS description in release(7), which defaults to
'0', not kern.ncpu.

Sponsored by: The FreeBSD Foundation

9 years agoFix wording in entry for r278934.
gjb [Fri, 20 Feb 2015 18:42:00 +0000 (18:42 +0000)]
Fix wording in entry for r278934.

Submitted by: markj
Sponsored by: The FreeBSD Foundation

9 years agoHandle SIOCSIFCAP by propogating the request to the parent interface. This
delphij [Fri, 20 Feb 2015 18:39:12 +0000 (18:39 +0000)]
Handle SIOCSIFCAP by propogating the request to the parent interface.  This
allows adding an vlan interface into a bridge.

Thanks for William Katsak <wkatsak cs rutgers edu> for testing and fixing
an issue in my previous patch draft.

MFC after: 2 weeks

9 years agoDocument r275140, pmc callchain depths increased.
gjb [Fri, 20 Feb 2015 18:06:11 +0000 (18:06 +0000)]
Document r275140, pmc callchain depths increased.

Sponsored by: The FreeBSD Foundation

9 years agoFix a typo in r278037 entry: s/cam/ctl/
gjb [Fri, 20 Feb 2015 17:56:27 +0000 (17:56 +0000)]
Fix a typo in r278037 entry: s/cam/ctl/

Submitted by: mav
Sponsored by: The FreeBSD Foundation

9 years agoDocument XZ_THREADS in release(7).
gjb [Fri, 20 Feb 2015 17:53:10 +0000 (17:53 +0000)]
Document XZ_THREADS in release(7).

Sponsored by: The FreeBSD Foundation

9 years agoUpdate the commented last revision.
gjb [Fri, 20 Feb 2015 17:46:20 +0000 (17:46 +0000)]
Update the commented last revision.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278926, 'make release' now uses multi-threaded
gjb [Fri, 20 Feb 2015 17:46:18 +0000 (17:46 +0000)]
Document r278926, 'make release' now uses multi-threaded
xz(1).

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278433, xz(1) update to 5.2.0.
gjb [Fri, 20 Feb 2015 17:46:15 +0000 (17:46 +0000)]
Document r278433, xz(1) update to 5.2.0.
Separately document multi-threaded support to keep the
version update separate, so it remains correct if xz(1)
is updated again.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278354, ctld(8) update to control non-iSCSI CTL
gjb [Fri, 20 Feb 2015 17:46:12 +0000 (17:46 +0000)]
Document r278354, ctld(8) update to control non-iSCSI CTL
ports

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278320, devctl(3) and devctl(8) added.
gjb [Fri, 20 Feb 2015 17:46:10 +0000 (17:46 +0000)]
Document r278320, devctl(3) and devctl(8) added.

Sponsored by: The FreeBSD Foundation

9 years agoAdd a 'General Storage' section.
gjb [Fri, 20 Feb 2015 17:46:07 +0000 (17:46 +0000)]
Add a 'General Storage' section.
Document r278037, CAM LUN mapping rewrite.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278934, elf(3) dependency removed from dtri.o
gjb [Fri, 20 Feb 2015 17:46:04 +0000 (17:46 +0000)]
Document r278934, elf(3) dependency removed from dtri.o

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277990, powerpc64 kernel now built as
gjb [Fri, 20 Feb 2015 17:46:02 +0000 (17:46 +0000)]
Document r277990, powerpc64 kernel now built as
a position-independent executable

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277904, '-s' option added to config(8).
gjb [Fri, 20 Feb 2015 17:45:59 +0000 (17:45 +0000)]
Document r277904, '-s' option added to config(8).

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277610, futimens(2) and utimensat(2) added.
gjb [Fri, 20 Feb 2015 17:45:56 +0000 (17:45 +0000)]
Document r277610, futimens(2) and utimensat(2) added.

Sponsored by: The FreeBSD Foundation

9 years agoProperly mark up author name.
brueffer [Fri, 20 Feb 2015 13:50:50 +0000 (13:50 +0000)]
Properly mark up author name.

9 years agoProperly mark up author name.
brueffer [Fri, 20 Feb 2015 11:23:41 +0000 (11:23 +0000)]
Properly mark up author name.

9 years agoApply mdoc style.
brueffer [Fri, 20 Feb 2015 10:25:13 +0000 (10:25 +0000)]
Apply mdoc style.

MFC after: 1 week

9 years agosfxge: add Florence R7 turbo mode support to common code
arybchik [Fri, 20 Feb 2015 07:57:59 +0000 (07:57 +0000)]
sfxge: add Florence R7 turbo mode support to common code

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: regenerate MCDI protocol headers
arybchik [Fri, 20 Feb 2015 07:54:35 +0000 (07:54 +0000)]
sfxge: regenerate MCDI protocol headers

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: handle fragmented TCP header in mbuf
arybchik [Fri, 20 Feb 2015 07:53:46 +0000 (07:53 +0000)]
sfxge: handle fragmented TCP header in mbuf

TCP header is fragmented in the case of VLAN tagged IPv6 traffic without
HW VLAN tagging.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoMake the PowerMac fan control nonlinear
jhibbits [Fri, 20 Feb 2015 06:19:23 +0000 (06:19 +0000)]
Make the PowerMac fan control nonlinear

Summary:
Currently, fan control is linear between the target temperature and max
temperature, which is far from ideal.  This changes it to be proportional to the
distance between the current temperature and the two endpoints (target and max
temp).  This also adds a hysteresis, so that fans keep going when the
temperature drops, for about 10 seconds, before slowing down.

Reviewers: nwhitehorn

Reviewed By: nwhitehorn

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

MFC after: 3 weeks

9 years agoAdd rudimentary man page for llan(4) virtualized ethernet controllers.
nwhitehorn [Fri, 20 Feb 2015 05:40:39 +0000 (05:40 +0000)]
Add rudimentary man page for llan(4) virtualized ethernet controllers.

MFC after: 1 week

9 years agoAllow EFI and ACPI to be included together. When ACPI is included
imp [Fri, 20 Feb 2015 01:40:55 +0000 (01:40 +0000)]
Allow EFI and ACPI to be included together. When ACPI is included
first, EFI will use its definitions for {,U}INT{8,16,32,64} and
BOOLEAN. When EFI is included first, define ACPI_USE_SYSTEM_INTTYPES
to tell ACPI that these are already defined.

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

9 years agodbm_delete(3) correct man page to match current behaviour.
pfg [Fri, 20 Feb 2015 01:31:10 +0000 (01:31 +0000)]
dbm_delete(3) correct man page to match current behaviour.

"The dbm_store() and dbm_delete() functions shall return 0 when they
succeed and a negative value when they fail."

Reference:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html

PR: 42422
Suggested by: delphij
MFC after: 3 days

9 years agoFix small memleaks in nis_passwd() and nis_group().
pfg [Fri, 20 Feb 2015 01:02:32 +0000 (01:02 +0000)]
Fix small memleaks in nis_passwd() and nis_group().

These only occur upon error.

Code Review: https://reviews.freebsd.org/D1849
Reviewed by: delphij

CID: 1016715
CID: 1016717

9 years agoBring the XL710 drivers up to the SW3 release level.
jfv [Fri, 20 Feb 2015 00:40:26 +0000 (00:40 +0000)]
Bring the XL710 drivers up to the SW3 release level.

MFC after: 1 week

9 years agoThe last userland piece of in_var.h is now 'struct in_aliasreq'. Move
glebius [Thu, 19 Feb 2015 23:59:27 +0000 (23:59 +0000)]
The last userland piece of in_var.h is now 'struct in_aliasreq'.  Move
it to the top of the file, and ifdef _KERNEL the rest.

9 years agoNow that all users of _WANT_IFADDR are fixed, remove this crutch and
glebius [Thu, 19 Feb 2015 23:16:10 +0000 (23:16 +0000)]
Now that all users of _WANT_IFADDR are fixed, remove this crutch and
hide ifaddr, in_ifaddr and in6_ifaddr under _KERNEL.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoThe ipftest(1) is a program that emulates ipf(4) operation and tests packets
glebius [Thu, 19 Feb 2015 23:14:35 +0000 (23:14 +0000)]
The ipftest(1) is a program that emulates ipf(4) operation and tests packets
against rules.  It definitely doesn't need to know about kernel internals,
such as 'struct ifaddr'.  What it does with ifaddr, is that it only takes
ifa_addr member of it, and treats it as sockaddr, while it is only a pointer
to sockaddr.  Fortunately, sizeof(struct ifaddr) > sizeof(struct sockaddr_in6),
so no problems arise.

Fix that declaring a private struct ifaddr in ipftest(1) and stop including
if_var.h.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoNow that IGMP and MLD sysctls provide a clean API structures that do not
glebius [Thu, 19 Feb 2015 22:42:33 +0000 (22:42 +0000)]
Now that IGMP and MLD sysctls provide a clean API structures that do not
leak kernel internal stuff, reconnect ifmcstat(1) back to build.  However,
disable kvm(3) support in it, since it requires uncovering tons of _KERNEL
defined declarations, which can be achieved either uncovering them globally
or providing dirty hacks such as _WANT_IFADDR.  If anyone demands an
ifmcstat-like kvm-based tool, please take the code out of usr.sbin/ifmstat
and create a tool in src/tools/tools.

9 years ago- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really
glebius [Thu, 19 Feb 2015 22:37:01 +0000 (22:37 +0000)]
- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really
  represents a context.
- Preserve name 'struct mld_ifinfo' for a new structure, that will be stable
  API between userland and kernel.
- Make sysctl_mld_ifinfo() return the new 'struct mld_ifinfo', instead of
  old one, which had a bunch of internal kernel structures in it.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years ago- Rename 'struct igmp_ifinfo' into 'struct igmp_ifsoftc', since it really
glebius [Thu, 19 Feb 2015 22:35:23 +0000 (22:35 +0000)]
- Rename 'struct igmp_ifinfo' into 'struct igmp_ifsoftc', since it really
  represents a context.
- Preserve name 'struct igmp_ifinfo' for a new structure, that will be stable
  API between userland and kernel.
- Make sysctl_igmp_ifinfo() return the new 'struct igmp_ifinfo', instead of
  old one, which had a bunch of internal kernel structures in it.
- Move all above declarations from in_var.h to igmp_var.h, since they are
  private to IGMP code.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoAdd myself to committers-doc.dot
bhd [Thu, 19 Feb 2015 21:47:31 +0000 (21:47 +0000)]
Add myself to committers-doc.dot

Approved by: bcr (mentor)

9 years agoOnly disable gvn on clang 3.5 and newer.
imp [Thu, 19 Feb 2015 20:22:30 +0000 (20:22 +0000)]
Only disable gvn on clang 3.5 and newer.

9 years agoBurn bridges to FreeBSD 7.x IGMP stats.
glebius [Thu, 19 Feb 2015 19:36:54 +0000 (19:36 +0000)]
Burn bridges to FreeBSD 7.x IGMP stats.

9 years agoMake syslogd work in case shutdown() is POSIX-ly correct.
ed [Thu, 19 Feb 2015 18:56:39 +0000 (18:56 +0000)]
Make syslogd work in case shutdown() is POSIX-ly correct.

On POSIX conformant systems, shutdown() should return ENOTCONN when not
connected. We attempted to fix this once (kern/84761), but this change
got backed out because it 'breaks code' (r150155).

I just reapplied the patch and indeed, syslogd fails on startup. Make it
easier to re-enable this change in the future by paching up syslogd to
do the right thing.

MFC after: 3 weeks
Sponsored by: Nuxi

9 years agoUse KTR_COMPILE=(KTR_ALL) for LINTs, to get more code coverage.
glebius [Thu, 19 Feb 2015 17:03:13 +0000 (17:03 +0000)]
Use KTR_COMPILE=(KTR_ALL) for LINTs, to get more code coverage.

9 years agoAdda function to iterate over the cpu nodes in the OFW or FDT data. This
andrew [Thu, 19 Feb 2015 16:34:48 +0000 (16:34 +0000)]
Adda function to iterate over the cpu nodes in the OFW or FDT data. This
will be used with arm64 to find which cpus to enable, and could also be
used with 32-bit arm and mips for the same purpose.

Differential Revision: https://reviews.freebsd.org/D1825
Sponsored by: The FreeBSD Foundation

9 years agoFix build with KTR after r278978.
kib [Thu, 19 Feb 2015 15:41:23 +0000 (15:41 +0000)]
Fix build with KTR after r278978.

9 years agoAdd support to get the cpu ID from its device driver in a generic way.
andrew [Thu, 19 Feb 2015 12:47:48 +0000 (12:47 +0000)]
Add support to get the cpu ID from its device driver in a generic way.
This will be needed by arm64 to find the value to pass to the psci (Power
State Coordination Interface) driver, among other things, used to enable
cores.

Differential Revision: https://reviews.freebsd.org/D1824
Reviewed by: imp
Sponsored by: The FreeBSD Foundation

9 years agoUse the ARM unwinder with dtrace to extract the stack when asked. With this
andrew [Thu, 19 Feb 2015 12:20:21 +0000 (12:20 +0000)]
Use the ARM unwinder with dtrace to extract the stack when asked. With this
dtrace is able to display a stack trace similar to the one below.

# dtrace -p 603 -n 'tcp:kernel::receive { stack(); }'
  0     70                         :receive
              kernel`ip_input+0x140
              kernel`netisr_dispatch_src+0xb8
              kernel`ether_demux+0x1c4
              kernel`ether_nh_input+0x3a8
              kernel`netisr_dispatch_src+0xb8
              kernel`ether_input+0x60
              kernel`cpsw_intr_rx+0xac
              kernel`intr_event_execute_handlers+0x128
              kernel`ithread_loop+0xb4
              kernel`fork_exit+0x84
              kernel`swi_exit
              kernel`swi_exit

Tested by: gnn
Sponsored by: ABT Systems Ltd

9 years agoAllow the ARM unwinder to work through modules. This will be used to add
andrew [Thu, 19 Feb 2015 12:06:57 +0000 (12:06 +0000)]
Allow the ARM unwinder to work through modules. This will be used to add
support for unwinding from dtrace.

Tested by: gnn (with dtrace)
Sponsored by: ABT Systems Ltd

9 years agoTry to unbreak NOIP and NOINET6 LINT builds after r278886
bz [Thu, 19 Feb 2015 11:48:00 +0000 (11:48 +0000)]
Try to unbreak NOIP and NOINET6 LINT builds after r278886
by placing appropriate #ifdefs around otherwise unused variables
or sections with functions called which are not available without
IPv6 support in the kernel.

9 years agoUnbreak freshly installed worlds by properly "commenting" out ifmcstat
ngie [Thu, 19 Feb 2015 11:17:36 +0000 (11:17 +0000)]
Unbreak freshly installed worlds by properly "commenting" out ifmcstat

Pointyhat to: glebius

9 years agoTemporarily disconnect ifmcstat(8) from build, to make world buildable
glebius [Thu, 19 Feb 2015 06:27:14 +0000 (06:27 +0000)]
Temporarily disconnect ifmcstat(8) from build, to make world buildable
ifmcstat(8) noses in kernel memory too much, and thus is very tentative
to any changes in kernel.

I will rewrite it to use some API instead of libkvm(3) and connect back
to build.

9 years agoWiden _KERNEL ifdef to hide more kernel network stack structures from userland.
glebius [Thu, 19 Feb 2015 06:24:27 +0000 (06:24 +0000)]
Widen _KERNEL ifdef to hide more kernel network stack structures from userland.

9 years agoFix a grammar nit.
gjb [Thu, 19 Feb 2015 05:20:59 +0000 (05:20 +0000)]
Fix a grammar nit.

Sponsored by: The FreeBSD Foundation

9 years agoRemove unnecessary checks for a return value of NULL from M_WAITOK
markj [Thu, 19 Feb 2015 03:32:48 +0000 (03:32 +0000)]
Remove unnecessary checks for a return value of NULL from M_WAITOK
allocations.

MFC after: 3 days

9 years agoFree the zlib stream after expanding a compressed CTF section.
markj [Thu, 19 Feb 2015 03:29:46 +0000 (03:29 +0000)]
Free the zlib stream after expanding a compressed CTF section.

Note that this memory would only be leaked once, since CTF info for a kld
file is cached after the first access.

MFC after: 3 days

9 years agofix spelling, add comma and remove BUGS section.. it provided no useful
jmg [Thu, 19 Feb 2015 01:51:17 +0000 (01:51 +0000)]
fix spelling, add comma and remove BUGS section..  it provided no useful
information, and is not really bugs, but limitations for other reasons...

9 years agoUse new struct mbufq instead of struct ifqueue to manage packet queues in
glebius [Thu, 19 Feb 2015 01:21:23 +0000 (01:21 +0000)]
Use new struct mbufq instead of struct ifqueue to manage packet queues in
IPv6 multicast code.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoUse new struct mbufq instead of struct ifqueue to manage packet queues in
glebius [Thu, 19 Feb 2015 01:21:02 +0000 (01:21 +0000)]
Use new struct mbufq instead of struct ifqueue to manage packet queues in
IPv4 multicast code.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoProvide a set of inline functions to manage simple mbuf(9) queues, based
glebius [Thu, 19 Feb 2015 01:19:42 +0000 (01:19 +0000)]
Provide a set of inline functions to manage simple mbuf(9) queues, based
on queue(3)'s STAILQ.  Utilize them in cxgb(4) and Xen, deleting home
grown implementations.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoEnsure that the supplied data length is large enough to hold the base
jhb [Wed, 18 Feb 2015 23:34:03 +0000 (23:34 +0000)]
Ensure that the supplied data length is large enough to hold the base
FPU state to avoid passing a negative length to fpusetregs() / npxsetregs().

Differential Revision: https://reviews.freebsd.org/D1861
Reviewed by: kib, emaste

9 years agoFix bootstrap on systems with old yacc with small MAXTABLE.
jkim [Wed, 18 Feb 2015 23:10:15 +0000 (23:10 +0000)]
Fix bootstrap on systems with old yacc with small MAXTABLE.

9 years agoMerge ACPICA 20141107 and 20150204.
jkim [Wed, 18 Feb 2015 20:33:00 +0000 (20:33 +0000)]
Merge ACPICA 20141107 and 20150204.

9 years agoRestore the ability to use clang as an external compiler. This was
grehan [Wed, 18 Feb 2015 19:27:51 +0000 (19:27 +0000)]
Restore the ability to use clang as an external compiler. This was
inadvertently removed when support for external GCC was added.

Deprecate XFLAGS in favour of the newer XCFLAGS/XCXXFLAGS.

Tested with: make universe, make CROSS_COMPILER_PREFIX=/usr/bin/ buildworld
Reviewed by: imp, bapt

9 years agoMake sure that the flags for the XPT_DEV_ADVINFO CCB are initialized
ken [Wed, 18 Feb 2015 18:30:19 +0000 (18:30 +0000)]
Make sure that the flags for the XPT_DEV_ADVINFO CCB are initialized
properly.

If there is garbage in the flags field, it can sometimes include a
set CDAI_FLAG_STORE flag, which may cause either an error or
perhaps result in overwriting the field that was intended to be
read.

sys/cam/cam_ccb.h:
Add a new flag to the XPT_DEV_ADVINFO CCB, CDAI_FLAG_NONE,
that callers can use to set the flags field when no store
is desired.

sys/cam/scsi/scsi_enc_ses.c:
In ses_setphyspath_callback(), explicitly set the
XPT_DEV_ADVINFO flags to CDAI_FLAG_NONE when fetching the
physical path information.  Instead of ORing in the
CDAI_FLAG_STORE flag when storing the physical path, set
the flags field to CDAI_FLAG_STORE.

sys/cam/scsi/scsi_sa.c:
Set the XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE when
fetching extended inquiry information.

sys/cam/scsi/scsi_da.c:
When storing extended READ CAPACITY information, set the
XPT_DEV_ADVINFO flags field to CDAI_FLAG_STORE instead of
ORing it into a field that isn't initialized.

sys/dev/mpr/mpr_sas.c,
sys/dev/mps/mps_sas.c:
When fetching extended READ CAPACITY information, set the
XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE instead of
setting it to 0.

sbin/camcontrol/camcontrol.c:
When fetching a device ID, set the XPT_DEV_ADVINFO flags
field to CDAI_FLAG_NONE instead of 0.

sys/sys/param.h:
Bump __FreeBSD_version to 1100061 for the new XPT_DEV_ADVINFO
CCB flag, CDAI_FLAG_NONE.

Sponsored by: Spectra Logic
MFC after: 1 week

9 years agoIf malloc() sleeps, Giant is dropped. Recheck for another thread
kib [Wed, 18 Feb 2015 18:12:06 +0000 (18:12 +0000)]
If malloc() sleeps, Giant is dropped.  Recheck for another thread
doing our work.

Remove unneeded check for failed M_WAITOK allocation.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd LIBXO.
marcel [Wed, 18 Feb 2015 17:28:55 +0000 (17:28 +0000)]
Add LIBXO.

9 years agoClean up a bit of the INET/INET6 mess wrt options.
imp [Wed, 18 Feb 2015 15:25:25 +0000 (15:25 +0000)]
Clean up a bit of the INET/INET6 mess wrt options.

9 years agoCleanup the way we include some files (in this case EISA) based on
imp [Wed, 18 Feb 2015 15:25:22 +0000 (15:25 +0000)]
Cleanup the way we include some files (in this case EISA) based on
kernel config. Also tidy up the ed options.

9 years agoPopulate new KERN_OPTS from all the opt_*.h files in
imp [Wed, 18 Feb 2015 15:25:19 +0000 (15:25 +0000)]
Populate new KERN_OPTS from all the opt_*.h files in
KERNBUILDDIR. Come up with some sensible defaults (though listing them
in kmod.mk may be unwise -- we have no easy way to know what are the
best sensible defaults for everything so we just catch the big stuff).
Append SRCS.${opt} for each option in KERN_OPTS to SRCS to allow easy
conditional compilation. Append any notion of KERN_OPTS_EXTRA to the
list of kernel opts.

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

9 years agoAdd copyright statement I should have had on these files in 2006,
imp [Wed, 18 Feb 2015 14:33:33 +0000 (14:33 +0000)]
Add copyright statement I should have had on these files in 2006,
based on the spibus_if.m file.

9 years agofiledesc: obtain a stable copy of credentials in fget_unlocked
mjg [Wed, 18 Feb 2015 13:37:28 +0000 (13:37 +0000)]
filedesc: obtain a stable copy of credentials in fget_unlocked

This was broken in r278930.

While here tidy up fget_mmap to use fdp from local var instead of obtaining
the same pointer from td.

9 years agoFix UP build.
kib [Wed, 18 Feb 2015 10:51:48 +0000 (10:51 +0000)]
Fix UP build.

Sponsored by: The FreeBSD Foundation
MFC after: 2 months

9 years agoBump revision again after my Fortuna change.
delphij [Wed, 18 Feb 2015 08:24:00 +0000 (08:24 +0000)]
Bump revision again after my Fortuna change.

9 years ago - fortuna.c: catch up with r278927 and fix a buffer overflow by using the
delphij [Wed, 18 Feb 2015 08:21:51 +0000 (08:21 +0000)]
 - fortuna.c: catch up with r278927 and fix a buffer overflow by using the
      temporary buffer when remaining space is not enough to hold
      a whole block.
 - yarrow.c:  add a comment that we intend to change the code and remove
      memcpy's in the future. (*)

Requested by: markm (*)
Reviewed by: markm
Approved by: so (self)

9 years agoMatch the right backlight driver.
jhibbits [Wed, 18 Feb 2015 07:34:32 +0000 (07:34 +0000)]
Match the right backlight driver.

Some ATI-based PowerBooks use the string 'mnca' in the backlight controller
device tree entry, so account for this and don't use nVidia when it's not an
nVidia device.

MFC after: 3 weeks

9 years agoDon't set the write bit if we're just reading.
jhibbits [Wed, 18 Feb 2015 06:53:40 +0000 (06:53 +0000)]
Don't set the write bit if we're just reading.

Also fix a couple typos.

MFC after: 3 weeks

9 years agosfxge: fix broken MCDI_EV_FIELD() macro
arybchik [Wed, 18 Feb 2015 06:26:07 +0000 (06:26 +0000)]
sfxge: fix broken MCDI_EV_FIELD() macro

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: support variable-length response to MCDI GET_BOARD_CFG
arybchik [Wed, 18 Feb 2015 06:23:16 +0000 (06:23 +0000)]
sfxge: support variable-length response to MCDI GET_BOARD_CFG

Allocate the minimum or maximum response length for GET_BOARD_CFG as
appropriate.  When looking up firmware subtypes by partition ID,
check the ID against the actual response length.

Merge of the patch made by Ben Hutchings in 2011.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: add driver context member with number of event queues
arybchik [Wed, 18 Feb 2015 06:21:59 +0000 (06:21 +0000)]
sfxge: add driver context member with number of event queues

Mainly to unify with similar member for transmit and receive queues.
It will be used in the future for resources allocation processing.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: add driver context member with number of receive queues
arybchik [Wed, 18 Feb 2015 06:20:59 +0000 (06:20 +0000)]
sfxge: add driver context member with number of receive queues

Mainly to unify with similar member for transmit queues.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: add driver context member with number of transmit queues
arybchik [Wed, 18 Feb 2015 06:19:35 +0000 (06:19 +0000)]
sfxge: add driver context member with number of transmit queues

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: add TCP segment size to sfxge_tso_state
arybchik [Wed, 18 Feb 2015 06:18:51 +0000 (06:18 +0000)]
sfxge: add TCP segment size to sfxge_tso_state

It avoids access to m_pkthdr when TSO packet is started and also makes
tso_start_new_packet() function smaller.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoOn my Lenovo T400, a Atheros 2413 has a problem powering up
imp [Wed, 18 Feb 2015 05:53:04 +0000 (05:53 +0000)]
On my Lenovo T400, a Atheros 2413 has a problem powering up
sometimes. It will power up wrong and identify itself badly:

cardbus0: <network, ethernet> at device 0.0 (no driver attached)
cardbus0: <simple comms, UART> at device 0.1 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.2 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.3 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.4 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.5 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.6 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.7 (no driver attached)

All the higher numbered functions (.2 and above) have a config space
of all 0's. This smells a bit like a special debug mode, but the
current atheros driver doesn't cope. It is unclear if this card is
just a flake, or if we're doing something wrong in the power-up
sequence.

Put a work around into the code that tests for this rather unusual
condition. If we power a CardBus device up, and the device says it is
multi-function, and any of the functions have a 0 device ID, try the
power-up sequence again.

9 years agoRemove drti.o's dependency on libelf. This makes it possible to add DTrace
markj [Wed, 18 Feb 2015 03:54:54 +0000 (03:54 +0000)]
Remove drti.o's dependency on libelf. This makes it possible to add DTrace
probes to userland programs and libraries without also needing to link
libelf.

dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace
probe and provider metdata) section in the generated object file; drti.o
now just uses this symbol to locate the section. A complication occurs
when multiple dtrace-generated object files are linked together, since the
__SUNW_dof symbol defined in each file is global. This is handled by
using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has
been linked with the generated object file. Upstream, this is done using a
linker feature not present in GNU ld.

Differential Revision: https://reviews.freebsd.org/D1757
Reviewed by: rpaulo
MFC after: 1 month
Relnotes: yes

9 years agoFix a typo in ipv6_down().
rpaulo [Wed, 18 Feb 2015 03:46:43 +0000 (03:46 +0000)]
Fix a typo in ipv6_down().

We weren't skipping extraneous entries in the ifconfig | grep inet6 case.

Submitted by: Ashutosh Kumar AK0037447 at TechMahindra.com
MFC after: 1 week

9 years agolibc: clean some set-but-not-used errors.
pfg [Wed, 18 Feb 2015 03:33:17 +0000 (03:33 +0000)]
libc: clean some set-but-not-used errors.

These were found by gcc 5.0 on Dragonfly BSD, however I
made no attempt to silence the false positives.

Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b)

9 years agofiledesc: simplify fget_unlocked & friends
mjg [Tue, 17 Feb 2015 23:54:06 +0000 (23:54 +0000)]
filedesc: simplify fget_unlocked & friends

Introduce fget_fcntl which performs appropriate checks when needed.
This removes a branch from fget_unlocked.

Introduce fget_mmap dealing with cap_rights_to_vmprot conversion.
This removes a branch from _fget.

Modify fget_unlocked to pass sequence counter to interested callers so
that they can perform their own checks and make sure the result was
otained from stable & current state.

Reviewed by: silence on -hackers

9 years agobump the rev... ZFS is the first fall out of this bug, but there might
jmg [Tue, 17 Feb 2015 23:41:08 +0000 (23:41 +0000)]
bump the rev...  ZFS is the first fall out of this bug, but there might
be others...

9 years agoministat(1): replace malloc + memset with calloc.
pfg [Tue, 17 Feb 2015 23:20:19 +0000 (23:20 +0000)]
ministat(1): replace malloc + memset with calloc.

Reviewed by: phk

9 years agoFix a bug where this function overflowed it's buffer... This was
jmg [Tue, 17 Feb 2015 23:14:26 +0000 (23:14 +0000)]
Fix a bug where this function overflowed it's buffer...  This was
causing ZFS panics on boot...

This is purely reviewed and tested by peter.

Reviewed by: peter
Approved by: so (implicit), peter

9 years agorelease: use xz via pipe when compressing the tarballs.
rpaulo [Tue, 17 Feb 2015 23:13:45 +0000 (23:13 +0000)]
release: use xz via pipe when compressing the tarballs.

libarchive(3) doesn't support the new liblzma API yet, but this change
allows us to enable multi-threaded xz compression.
``make release'' should now finish in half the time on a machine with
several cores and fast disks (our typical build server).

This behaviour only applies when building a release and it doesn't
affect buildworld/installworld.  To disable threaded xz compression,
set XZ_THREADS=1.

Reviewed by: gjb
Tested by: gjb

9 years agoEven more fixes to !INET and !INET6 kernels.
glebius [Tue, 17 Feb 2015 22:33:22 +0000 (22:33 +0000)]
Even more fixes to !INET and !INET6 kernels.

In collaboration with: pluknet