]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoAdd a new driver to support the Intel Non-Transparent Bridge(NTB).
carl [Mon, 29 Apr 2013 22:48:53 +0000 (22:48 +0000)]
Add a new driver to support the Intel Non-Transparent Bridge(NTB).

The NTB allows you to connect two systems with this device using a PCI-e
link. The driver is made of two modules:
 - ntb_hw which is a basic hardware abstraction layer for the device.
 - if_ntb which implements the ntb network device and the communication
   protocol.

The driver is limited at the moment to CPU memcpy instead of using DMA, and
only Back-to-Back mode is supported. Also the network device isn't full
featured yet. These changes will be coming soon. The DMA change will also
bring in the ioat driver from the project branch it is on now.

This is an initial port of the GPL/BSD Linux driver contributed by Jon Mason
from Intel. Any bugs are my contributions.

Sponsored by: Intel
Reviewed by: jimharris, joel (man page only)
Approved by: jimharris (mentor)

11 years agoProperly terminate the result string for intermediate results, to
kib [Mon, 29 Apr 2013 21:12:25 +0000 (21:12 +0000)]
Properly terminate the result string for intermediate results, to
allow the final strcpy() to start at the intended place.

Reported and tested by: pgj
Pointy hat to: kib
MFC after: 3 days

11 years agoStyle nit.
des [Mon, 29 Apr 2013 20:14:11 +0000 (20:14 +0000)]
Style nit.

11 years agoAdd a -Z option which zeroes unused blocks. It can be combined with -E,
des [Mon, 29 Apr 2013 20:13:09 +0000 (20:13 +0000)]
Add a -Z option which zeroes unused blocks.  It can be combined with -E,
in which case unused blocks are first zeroed and then erased.

Reviewed by: mckusick
MFC after: 3 weeks

11 years agoFix a bug that allows NFS clients to issue READDIR on files.
des [Mon, 29 Apr 2013 20:09:44 +0000 (20:09 +0000)]
Fix a bug that allows NFS clients to issue READDIR on files.

PR: kern/178016
Security: CVE-2013-3266
Security: FreeBSD-SA-13:05.nfsserver

11 years agowhitespace - document alternative locking under linux
luigi [Mon, 29 Apr 2013 19:30:35 +0000 (19:30 +0000)]
whitespace - document alternative locking under linux

11 years agoOnly cleanup CMI-related state on detach if the system supports CMI.
jhb [Mon, 29 Apr 2013 18:54:31 +0000 (18:54 +0000)]
Only cleanup CMI-related state on detach if the system supports CMI.

PR: kern/163268
MFC after: 1 week

11 years agowhitespace changes:
luigi [Mon, 29 Apr 2013 18:00:53 +0000 (18:00 +0000)]
whitespace changes:
remove $Id$ lines, and add blank lines around some #if / #elif /#endif

11 years agoAdd missing braces.
delphij [Mon, 29 Apr 2013 17:00:26 +0000 (17:00 +0000)]
Add missing braces.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly
MFC after: 1 week

11 years agoexplicitly mark some variables as const
luigi [Mon, 29 Apr 2013 16:58:21 +0000 (16:58 +0000)]
explicitly mark some variables as const

11 years agoA transition period of more than two years is more than enough:
eadler [Mon, 29 Apr 2013 15:58:04 +0000 (15:58 +0000)]
A transition period of more than two years is more than enough:
Remove the compatibility code added in 2011-02-10.

This change is not intended for MFC

Reviewed by: imp

11 years agoDebugging changes!
adrian [Mon, 29 Apr 2013 07:28:29 +0000 (07:28 +0000)]
Debugging changes!

* That lock isn't actually held during reset - just the whole TX/RX path
  is paused.  So, remove the assertion.

* Log the TX queue status - how many hardware frames are active in the
  MAC and whether the queue is active.

11 years agoRemove useless ifdef KLD_MODULE from dummynet module unload path. This
glebius [Mon, 29 Apr 2013 06:11:19 +0000 (06:11 +0000)]
Remove useless ifdef KLD_MODULE from dummynet module unload path. This
fixes panic on unload.

Reported by: pho

11 years agoMark usage() __dead2
eadler [Sun, 28 Apr 2013 22:52:43 +0000 (22:52 +0000)]
Mark usage() __dead2

11 years agoReplace a silly command sequence with a proper if-then-else.
n_hibma [Sun, 28 Apr 2013 22:12:40 +0000 (22:12 +0000)]
Replace a silly command sequence with a proper if-then-else.
Generate images sparsely. This saves space and time, especially when
generating images inside a VM (PR 173482).
Add a 'true' statement to last_orders to prevent some version of sh from
tripping over an empty function.

11 years agoRemove cast that was only required for K&R C.
eadler [Sun, 28 Apr 2013 22:05:01 +0000 (22:05 +0000)]
Remove cast that was only required for K&R C.

Reviewed by: jilles

11 years agoDoing a cpio from /var/empty if dir was not specified or non-existent
n_hibma [Sun, 28 Apr 2013 21:44:44 +0000 (21:44 +0000)]
Doing a cpio from /var/empty if dir was not specified or non-existent
copies its mode to the destination. This is not desirable.
Rephrase this code to be more sensible.

PR: 173483
MFC after: 1 week

11 years agoCorrect comment typo's
smh [Sun, 28 Apr 2013 21:14:23 +0000 (21:14 +0000)]
Correct comment typo's
Add missing comment

Reviewed by: pjd (mentor)
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoSilence warning from clang:
sbruno [Sun, 28 Apr 2013 20:55:45 +0000 (20:55 +0000)]
Silence warning from clang:

/home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: warning: for loop has empty body [-Wempty-body]
                for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ;
                                                                               ^
/home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: note: put the semicolon on a separate line to silence this warning

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoThe controller does not zero this data structure, ever.
sbruno [Sun, 28 Apr 2013 20:46:32 +0000 (20:46 +0000)]
The controller does not zero this data structure, ever.

Zero it out here so we do not misinterpret the data error.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoRework the handling of the tmpfs node backing swap object and tmpfs
kib [Sun, 28 Apr 2013 19:38:59 +0000 (19:38 +0000)]
Rework the handling of the tmpfs node backing swap object and tmpfs
vnode v_object to avoid double-buffering.  Use the same object both as
the backing store for tmpfs node and as the v_object.

Besides reducing memory use up to 2x times for situation of mapping
files from tmpfs, it also makes tmpfs read and write operations copy
twice bytes less.

VM subsystem was already slightly adapted to tolerate OBJT_SWAP object
as v_object. Now the vm_object_deallocate() is modified to not
reinstantiate OBJ_ONEMAPPING flag and help the VFS to correctly handle
VV_TEXT flag on the last dereference of the tmpfs backing object.

Reviewed by: alc
Tested by: pho, bf
MFC after: 1 month

11 years agoMake vm_object_page_clean() and vm_mmap_vnode() tolerate the vnode'
kib [Sun, 28 Apr 2013 19:25:09 +0000 (19:25 +0000)]
Make vm_object_page_clean() and vm_mmap_vnode() tolerate the vnode'
v_object of non OBJT_VNODE type.

For vm_object_page_clean(), simply do not assert that object type must
be OBJT_VNODE, and add a comment explaining how the check for
OBJ_MIGHTBEDIRTY prevents the rest of function from operating on such
objects.

For vm_mmap_vnode(), if the object type is not OBJT_VNODE, require it
to be for swap pager (or default), handle the bypass filesystems, and
correctly acquire the object reference in this case.

Reviewed by: alc
Tested by: pho, bf
MFC after: 1 week

11 years agoAssert that the object type for the vnode' non-NULL v_object, passed
kib [Sun, 28 Apr 2013 19:19:26 +0000 (19:19 +0000)]
Assert that the object type for the vnode' non-NULL v_object, passed
to vnode_pager_setsize(), is either OBJT_VNODE, or, if vnode was
already reclaimed, OBJT_DEAD.  Note that the later is only possible
due to some filesystems, in particular, nfsiods from nfs clients, call
vnode_pager_setsize() with unlocked vnode.

More, if the object is terminated, do not perform the resizing
operation.

Reviewed by: alc
Tested by: pho, bf
MFC after: 1 week

11 years agoEliminate the layering violation in the kern_sendfile(). When quering
kib [Sun, 28 Apr 2013 19:12:09 +0000 (19:12 +0000)]
Eliminate the layering violation in the kern_sendfile().  When quering
the file size, use VOP_GETATTR() instead of accessing vnode vm_object
un_pager.vnp.vnp_size.

Take the shared vnode lock earlier to cover the added VOP_GETATTR()
call and, as consequence, the whole internal sendfile loop.  Reduce vm
object lock scope to not protect the local calculations.

Note that this is the last misuse of the vnp_size in the tree, the
others were removed from the ELF image activator by r230246.

Reviewed by: alc
Tested by: pho, bf (previous version)
MFC after: 1 week

11 years agoConvert panic() into KASSERT().
kib [Sun, 28 Apr 2013 18:40:55 +0000 (18:40 +0000)]
Convert panic() into KASSERT().

Reviewed by: alc
MFC after: 1 week

11 years agoAdd some cam_freeze_devq()'s missed at r249466.
mav [Sun, 28 Apr 2013 18:12:43 +0000 (18:12 +0000)]
Add some cam_freeze_devq()'s missed at r249466.
This makes number of freezes match the number of releases.

Reported by: dim

11 years agoWhen the world is built WITHOUT_OPENSSH also don't
eadler [Sun, 28 Apr 2013 17:58:11 +0000 (17:58 +0000)]
When the world is built WITHOUT_OPENSSH also don't
install ssh-copy-id.

PR: misc/177590
Submitted by: Oleg Ginzburg <olevole@olevole.ru>
Reviewed by: imp

11 years agoEnable building string functions as part of libstand on mips; the Makefile
rwatson [Sun, 28 Apr 2013 16:35:24 +0000 (16:35 +0000)]
Enable building string functions as part of libstand on mips; the Makefile
is a bit obfuscated here, as ia64 adds string source files elsewhere, so
simply exclude it here.

Reviewed by: imp
MFC after: 3 days
Sponsored by: DARPA, AFRL

11 years agoLet's align correctly by setting to 17.
sbruno [Sun, 28 Apr 2013 16:35:23 +0000 (16:35 +0000)]
Let's align correctly by setting to 17.

OpenCISS states that if the value is 0, then the driver should try a value
of 31.  That's just silly.  Set to 17 so that the subtraction for maxio
becomes 16 and aligns nicely.

Reviewed by: scottl
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoIts time to retire COMPAQ. I don't think that its coming back. :-)
sbruno [Sun, 28 Apr 2013 16:20:09 +0000 (16:20 +0000)]
Its time to retire COMPAQ.  I don't think that its coming back.  :-)

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoMerge @228176 from Perforce to fix a bug introduced in r249553:
rwatson [Sun, 28 Apr 2013 14:40:29 +0000 (14:40 +0000)]
Merge @228176 from Perforce to fix a bug introduced in r249553:

  Trim two now-unneeded (and likely harmful) lines from the libstand
  setjmp/longjmp for MIPS.

  Spotted by:   jmallett

MFC after:      3 days
Sponsored by: DARPA, AFRL

11 years agoFix EXIT STATUS. biff reports its status when it was invoked.
joel [Sun, 28 Apr 2013 09:29:44 +0000 (09:29 +0000)]
Fix EXIT STATUS. biff reports its status when it was invoked.

Submitted by: Ryan Kavanagh,
Jason McIntyre <jmc@kerhand.co.uk>
Obtained from: OpenBSD

11 years agoEliminate an unneeded call to vm_radix_trimkey() from vm_radix_lookup_le().
alc [Sun, 28 Apr 2013 08:29:00 +0000 (08:29 +0000)]
Eliminate an unneeded call to vm_radix_trimkey() from vm_radix_lookup_le().
This call is clearing bits from the key that will be set again by the next
line.

Sponsored by: EMC / Isilon Storage Division

11 years agoBring copyright changes with the agreement of Thomas Skibo.
wkoszek [Sun, 28 Apr 2013 07:00:36 +0000 (07:00 +0000)]
Bring copyright changes with the agreement of Thomas Skibo.

Communication on src-commiters, Sat, 27 Apr 2013 22:09:06 -0700,
Subject was: "Re: svn commit: r249997"

As I'm here, fix the style main block comments in files' headers.

11 years agomdoc improvements
joel [Sun, 28 Apr 2013 06:15:56 +0000 (06:15 +0000)]
mdoc improvements

11 years agoRemove extra code for SA_RESETHAND, it is not needed because kernel has
davidxu [Sun, 28 Apr 2013 03:13:45 +0000 (03:13 +0000)]
Remove extra code for SA_RESETHAND, it is not needed because kernel has
already done this.

11 years agoAdd an alternate version of beastie to the examples directory.
eadler [Sun, 28 Apr 2013 02:23:39 +0000 (02:23 +0000)]
Add an alternate version of beastie to the examples directory.

PR: docs/38556
Submitted by: Rahul Siddharthan <rsidd@online.fr>
Submitted on: 25 May 2002 22:49:56 -0000
MFC After: 2 weeks

11 years agoGet rid of the 'vsc_rxpend' state - it doesn't serve any purpose because we
neel [Sun, 28 Apr 2013 01:02:59 +0000 (01:02 +0000)]
Get rid of the 'vsc_rxpend' state - it doesn't serve any purpose because we
drop any frames that arrive while the device is starved for receive buffers.

This makes the receive path to only execute in context of the receive thread
and allows for further simplification.

Reviewed by: grehan

11 years agoBring over my FreeBSD modifications for the AR9300 HAL to make it
adrian [Sun, 28 Apr 2013 00:57:47 +0000 (00:57 +0000)]
Bring over my FreeBSD modifications for the AR9300 HAL to make it
work in FreeBSD.

This is still heavily a work in progress but I'd rather it start
shipping in -HEAD sooner rather than later.

This doesn't (yet) link it into the build system either for a static
kernel or as a module; that will come later (after many, many make universe
tests.)

11 years agoCopy the vendor branch ar9300 code from qcamain_open_hal into this
adrian [Sun, 28 Apr 2013 00:53:31 +0000 (00:53 +0000)]
Copy the vendor branch ar9300 code from qcamain_open_hal into this
directory.

Only copy the ar9300 HAL, we don't want to grab everything.

11 years agoInitial import of the QCA qcamain_open_hal repository.
adrian [Sun, 28 Apr 2013 00:45:58 +0000 (00:45 +0000)]
Initial import of the QCA qcamain_open_hal repository.

Source: https://github.com/qca/qcamain_open_hal_public
Revision: 60390a9f9ac6a20db168fbbc01a4ad4e01c395ce

Thankyou to QCA for this release.

11 years agoPolish devcfg(4) slightly: add \n after the end of every sentence.
wkoszek [Sat, 27 Apr 2013 23:59:15 +0000 (23:59 +0000)]
Polish devcfg(4) slightly: add \n after the end of every sentence.

11 years agoMove IPPROTO_IPV6 from #ifdef __BSD_VISIBLE to #if __POSIX_VISIBLE >= 201112
cperciva [Sat, 27 Apr 2013 23:36:01 +0000 (23:36 +0000)]
Move IPPROTO_IPV6 from #ifdef __BSD_VISIBLE to #if __POSIX_VISIBLE >= 201112
since POSIX 2001 states that it shall be defined.

Reported by: sbruno
Reviewed by: jilles
MFC after: 1 week

11 years agoAdd Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.
wkoszek [Sat, 27 Apr 2013 23:07:49 +0000 (23:07 +0000)]
Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.

Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net>
Tested by: wkoszek (ZedBoard)
Reviewed by: wkoszek, freebsd-arm@ (no objections raised)

11 years agoMerge libc++ trunk r180598. Contains several minor cleanups and bug
dim [Sat, 27 Apr 2013 22:47:52 +0000 (22:47 +0000)]
Merge libc++ trunk r180598.  Contains several minor cleanups and bug
fixes, no major changes.

MFC after: 2 weeks

11 years agoAdd Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.
wkoszek [Sat, 27 Apr 2013 22:38:29 +0000 (22:38 +0000)]
Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.

Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net>
Reviewed by: wkoszek, freebsd-arm@ (no objections raised)

11 years agoAdd missing static qualifiers
eadler [Sat, 27 Apr 2013 21:59:43 +0000 (21:59 +0000)]
Add missing static qualifiers

Reviewed by: ed, jilles
MFC After: 3 days

11 years agoEnable improved <tgmath.h> for Clang even when not using C11.
ed [Sat, 27 Apr 2013 21:18:34 +0000 (21:18 +0000)]
Enable improved <tgmath.h> for Clang even when not using C11.

By using __has_extension(c_generic_selections), we can explicitly test
whether we're dealing with a version of Clang that supports _Generic().
That way we can use the improved <tgmath.h> code, even when not using
-std=c11. This massively reduces the compilation time when invoking
these functions.

11 years agoMerge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:
dim [Sat, 27 Apr 2013 19:26:56 +0000 (19:26 +0000)]
Merge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:

* Don't call the _fast version of the TLS accessor in terminate() or
  unexpected().
  1) TLS may not have been set up yet.
  2) When we're in one of these functions, Really Bad Stuff has
     happened and potentially saving a few cycles really isn't
     important.
* Merge in fixes from FreeBSD trunk to make atomics work with recent
  clang.

MFC after: 1 week

11 years agoAvoid some lookup restarts in vm_radix_lookup_{ge,le}().
alc [Sat, 27 Apr 2013 16:44:59 +0000 (16:44 +0000)]
Avoid some lookup restarts in vm_radix_lookup_{ge,le}().

Sponsored by: EMC / Isilon Storage Division

11 years agolibthr: Fix a parameter name in an internal header file.
jilles [Sat, 27 Apr 2013 14:21:36 +0000 (14:21 +0000)]
libthr: Fix a parameter name in an internal header file.

11 years agosh: Don't consider jobs -s/-p as reporting the status of jobs.
jilles [Sat, 27 Apr 2013 14:07:25 +0000 (14:07 +0000)]
sh: Don't consider jobs -s/-p as reporting the status of jobs.

This ensures that something like j=$(jobs -p) does not prevent any
status from being written to the terminal.

11 years agosyslogd: Use closefrom() instead of getdtablesize()/close() loop.
jilles [Sat, 27 Apr 2013 13:26:35 +0000 (13:26 +0000)]
syslogd: Use closefrom() instead of getdtablesize()/close() loop.

When syslogd forks a process for '|' destinations, it closes all file
descriptors greater than 2.

Use closefrom() for this instead of a getdtablesize()/close() loop because
it is both faster and avoids leaving file descriptors open because the limit
was lowered after they were opened.

MFC after: 1 week

11 years agoMFprojects/camlock r249542:
mav [Sat, 27 Apr 2013 12:46:04 +0000 (12:46 +0000)]
MFprojects/camlock r249542:
Remove ADA_FLAG_PACK_INVALID flag. Since ATA disks have no concept of media
change it only duplicates CAM_PERIPH_INVALID flag, so we can use last one.

Slightly cleanup DA_FLAG_PACK_INVALID use.

11 years agoMFprojects/camlock r249541:
mav [Sat, 27 Apr 2013 12:39:28 +0000 (12:39 +0000)]
MFprojects/camlock r249541:
Give periph validity flag own periph reference.  That slightly simplifies
the release logic and covers hypothetical case if lock is dropped inside
the periph_oninval() method.

11 years agointro(2): Fix some errors in ENFILE and EMFILE descriptions.
jilles [Sat, 27 Apr 2013 11:55:23 +0000 (11:55 +0000)]
intro(2): Fix some errors in ENFILE and EMFILE descriptions.

MFC after: 1 week

11 years agoChange maxio to reflect variable hardware configurations.
sbruno [Sat, 27 Apr 2013 08:40:37 +0000 (08:40 +0000)]
Change maxio to reflect variable hardware configurations.

If max_sg_length is 0, then we default to 16

If max_sg_length is less than CISS_MAX_SG_ELEMENTS, then
we will set round the value of max_sg_length to the nearest
power of 2 and use it to align maxio.

Else, we will use CISS_MAX_SG_ELEMENTS for our calculations.

Thanks to scottl for working me through the history and providing
the basis for this patch.

Submitted by: scott
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoAdd const qualifier to the dst parameter of the ifnet if_output method.
glebius [Sat, 27 Apr 2013 08:11:48 +0000 (08:11 +0000)]
Add const qualifier to the dst parameter of the ifnet if_output method.

11 years agoReturn "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
mav [Sat, 27 Apr 2013 06:57:39 +0000 (06:57 +0000)]
Return "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
it look better in bsdinstall.

11 years agoAdd reset support to the Wii.
rpaulo [Sat, 27 Apr 2013 06:54:49 +0000 (06:54 +0000)]
Add reset support to the Wii.

11 years agoRemove references to MK_IDEA.
ed [Sat, 27 Apr 2013 05:44:39 +0000 (05:44 +0000)]
Remove references to MK_IDEA.

As of r249959, we want to build with IDEA support enabled
unconditionally. As this change removed the MK_IDEA flag, update these
Makefiles accordingly.

11 years agoPartially revert my last change.
ed [Sat, 27 Apr 2013 05:06:25 +0000 (05:06 +0000)]
Partially revert my last change.

I forgot that I still had a locally applied patch to my copy of Clang
that needs to be pushed in before we should use C11 atomics.

11 years agoUse C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.
ed [Sat, 27 Apr 2013 05:01:29 +0000 (05:01 +0000)]
Use C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.

Reviewed by: pjd

11 years agoUnbreak <stdatomic.h> on ARM + Clang.
ed [Sat, 27 Apr 2013 04:56:02 +0000 (04:56 +0000)]
Unbreak <stdatomic.h> on ARM + Clang.

Clang only supports atomic operations for ARMv6. For non-ARMv6, we still
need to emit these functions.

Clang's prototype for these functions slightly differs, as it is truly
based on GCC's documentation. It requires the use of signed types, but
also requires varargs. Still, we are not allowed to simply implement
this function directly. Cleverly work around this by implementing it
under a different name and using __strong_reference().

11 years agoAdd a comma to satisfy Igor.
eadler [Sat, 27 Apr 2013 04:09:09 +0000 (04:09 +0000)]
Add a comma to satisfy Igor.

11 years agoFix the frambuffer issues by calling pmap_mapdev() in the attach routine. This
rpaulo [Sat, 27 Apr 2013 01:57:45 +0000 (01:57 +0000)]
Fix the frambuffer issues by calling pmap_mapdev() in the attach routine. This
will make the framebuffer region uncacheable and it will create a proper
KVA -> RAM mapping.

11 years agoRemove IDEA from OptionalObsoleteFiles.inc
eadler [Sat, 27 Apr 2013 00:03:07 +0000 (00:03 +0000)]
Remove IDEA from OptionalObsoleteFiles.inc

Also add an UPDATING entry (requsted by gjb)

11 years agoRemove the WITH_IDEA option and build it unconditionally.
eadler [Fri, 26 Apr 2013 23:24:41 +0000 (23:24 +0000)]
Remove the WITH_IDEA option and build it unconditionally.
The European version of the patent expired in 2011.
The US version of the patent expired in 2012 or prior.

Reviewed by: des
No objection from: cperciva, ehaupt

11 years agoConditionally compile this only if ATH_DEBUG is defined.
adrian [Fri, 26 Apr 2013 22:22:38 +0000 (22:22 +0000)]
Conditionally compile this only if ATH_DEBUG is defined.

11 years agoDump the entire TXQ descriptor contents during a reset, rather than only
adrian [Fri, 26 Apr 2013 21:51:17 +0000 (21:51 +0000)]
Dump the entire TXQ descriptor contents during a reset, rather than only
completed descriptors.

11 years agosysconf(3): Correct the description of _SC_OPEN_MAX.
jilles [Fri, 26 Apr 2013 21:43:42 +0000 (21:43 +0000)]
sysconf(3): Correct the description of _SC_OPEN_MAX.

Reported by: bde
MFC after: 1 week

11 years agoProperly sanitize --menu results (guards against Gtk library warnings from
dteske [Fri, 26 Apr 2013 21:28:24 +0000 (21:28 +0000)]
Properly sanitize --menu results (guards against Gtk library warnings from
X11 side of things from bleeding into Xdialog(1) stderr output). It should
be duely noted that such errors are not a by-product of anything in the
Xdialog(1) utility or API, but optional libraries that it can link against
(such as Gtk1 versus Gtk2; if you compile xdialog from ports against Gtk2
AND misconfigure your fonts or generally make Gtk2 unhappy, these warning
messages can bleed into the captured stderr -- that is we we sanitize!).

11 years agoComments.
dteske [Fri, 26 Apr 2013 21:19:05 +0000 (21:19 +0000)]
Comments.

11 years agoFix examples for overriding INSTALL to not suggest hardcoding
bdrewery [Fri, 26 Apr 2013 19:56:14 +0000 (19:56 +0000)]
Fix examples for overriding INSTALL to not suggest hardcoding
'install' since it breaks buildworld after the introduction and
use of 'install -l' in r245752. Overriding INSTALL causes
/usr/bin/install to be used instead of the proper
/usr/src/tools/install.sh which handles the new flag.

Approved by: bapt
MFC after: 2 weeks

11 years agoAccording to devctl(4), clients must read events whole; they may not
asomers [Fri, 26 Apr 2013 19:49:37 +0000 (19:49 +0000)]
According to devctl(4), clients must read events whole; they may not
piece them together from multiple reads().  It's as if /dev/devctl is
a datagram device instead of a stream device.  However, devd's
internal buffer was too small (1025 bytes) to read an entire
ereport.fs.zfs.checksum event (variable, up to ~1300 bytes).  This
commit enlarges the buffer to 8k.

Reviewed by: imp
Approved by: ken (mentor)
MFC after: 2 weeks

11 years agoAdd two more 'static' qualifiers
eadler [Fri, 26 Apr 2013 17:56:35 +0000 (17:56 +0000)]
Add two more 'static' qualifiers

11 years agoTake some improvements from DragonFlyBSD:
eadler [Fri, 26 Apr 2013 17:45:40 +0000 (17:45 +0000)]
Take some improvements from DragonFlyBSD:
- add const where appropriate
- add static where appropriate
- fix a whitespace issues

Reviewed by: brooks
Obtained from: DragonFlyBSD
MFC After: 1 week

11 years agoAdd -x option to avoid crossing mount points when removing a hierarchy.
eadler [Fri, 26 Apr 2013 17:45:37 +0000 (17:45 +0000)]
Add -x option to avoid crossing mount points when removing a hierarchy.

Discussed on: -hackers
Inspired by: DragonflyBSD
MFC After: 1 week

11 years agoAdjust the min comparison to look at the adjust value after subtraction, don't
sbruno [Fri, 26 Apr 2013 17:28:45 +0000 (17:28 +0000)]
Adjust the min comparison to look at the adjust value after subtraction, don't
subtract 1 from the chosen value if we are going to use the configued value.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoMove pinmux configuration to board-specific config. It will vary
gonzo [Fri, 26 Apr 2013 17:27:53 +0000 (17:27 +0000)]
Move pinmux configuration to board-specific config. It will vary
    from board to board.

11 years agoBump FreeBSD_version after glebius' changes.
adrian [Fri, 26 Apr 2013 17:06:36 +0000 (17:06 +0000)]
Bump FreeBSD_version after glebius' changes.

11 years agoAdded automatic detection of non-rotating media which disables the
smh [Fri, 26 Apr 2013 16:31:03 +0000 (16:31 +0000)]
Added automatic detection of non-rotating media which disables the
use of BIO queue sorting, hence optimising performance for devices
such as SSD's

Reviewed by: scottl
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoTeach GEOM and CAM about the difference between the max "size" of r/w and delete
smh [Fri, 26 Apr 2013 16:22:54 +0000 (16:22 +0000)]
Teach GEOM and CAM about the difference between the max "size" of r/w and delete
requests.

sys/geom/geom_disk.h:
        - Added d_delmaxsize which represents the maximum size of individual
          device delete requests in bytes. This can be used by devices to
          inform geom of their size limitations regarding delete operations
          which are generally different from the read / write limits as data
          is not usually transferred from the host to physical device.

sys/geom/geom_disk.c:
        - Use new d_delmaxsize to calculate the size of chunks passed through to
          the underlying strategy during deletes instead of using read / write
          optimised values. This defaults to d_maxsize if unset (0).

        - Moved d_maxsize default up so it can be used to default d_delmaxsize

sys/cam/ata/ata_da.c:
        - Added d_delmaxsize calculations for TRIM and CFA

sys/cam/scsi/scsi_da.c:
        - Added re-calculation of d_delmaxsize whenever delete_method is set.

        - Added kern.cam.da.X.delete_max sysctl which allows the max size for
          delete requests to be limited. This is useful in preventing timeouts
          on devices who's delete methods are slow. It should be noted that
          this limit is reset then the device delete method is changed and
          that it can only be lowered not increased from the device max.

Reviewed by: mav
Approved by: pjd (mentor)

11 years agoAdded available delete methods discovery during device probe, including the
smh [Fri, 26 Apr 2013 16:17:04 +0000 (16:17 +0000)]
Added available delete methods discovery during device probe, including the
maximum sizes for said methods, which are used when processing BIO_DELETE
requests. This includes updating UNMAP support discovery to be based on
SBC-3 T10/1799-D Revision 31 specification.

Added ATA TRIM support to cam scsi devices via ATA Pass-Through(16)

sys/cam/scsi/scsi_da.c:
        - Added ATA Data Set Management TRIM support via ATA Pass-Through(16)
          as a delete_method

        - Added four new probe states used to identity available methods and their
          limits for the processing of BIO_DELETE commands via both UNMAP and the
          new ATA TRIM commands.

        - Renamed Probe states to better indicate their use

        - Added delete method descriptions used when informing user of issues.

        - Added automatic calculation of the optimum delete mode based on which
          method presents the largest maximum request size as this is most likely
          to result in the best performance.

        - Added WRITE SAME max block limits

        - Updated UNMAP range generation to mirror that used by ATA TRIM, this
          optimises the generation of ranges and fixes a potential overflow
          issue in the count when combining multiple BIO_DELETE requests

        - Added output of warnings about short deletes. This should only ever
          be triggered on devices that fail to correctly advertise their supported
          delete modes / max sizes.

        - Fixed WS16 requests being incorrectly limited to 65535 in length.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoRefactored scsi_xpt use of device_has_vpd to generic scsi_vpd_supported_page
smh [Fri, 26 Apr 2013 16:11:03 +0000 (16:11 +0000)]
Refactored scsi_xpt use of device_has_vpd to generic scsi_vpd_supported_page
so its available for use in generic scsi code.

This is a pre-requirement for using VPD queries to determine available SCSI
delete methods within scsi_da.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoUpdated TRIM calculations in cam/ata to be based off ATA_DSM_* defines
smh [Fri, 26 Apr 2013 15:59:19 +0000 (15:59 +0000)]
Updated TRIM calculations in cam/ata to be based off ATA_DSM_* defines

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdded the ability to send ATA identify and Data Set Management (DSM) TRIM
smh [Fri, 26 Apr 2013 15:53:22 +0000 (15:53 +0000)]
Added the ability to send ATA identify and Data Set Management (DSM) TRIM
commands to an ATA device attached via a SCSI control.

sys/cam/scsi/scsi_all.c:
        - Added scsi_ata_identify, scsi_ata_trim
          Which use ATA Pass-Through to send commands to the attached disk.

sys/cam/scsi/scsi_all.h:
        - Added defines for all missing ATA Pass-Through commands values.

        - Added scsi_ata_identify, scsi_ata_trim methods used in ATA TRIM
          support.

        - Added scsi_vpd_logical_block_prov structure used when querying for
          the supported sizes UNMAP commands.

        - Added scsi_vpd_block_limits structure used when querying for the
          supported sizes of the UNMAP command.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdded Dataset Management defines to be used by TRIM in cam ata and scsi to
smh [Fri, 26 Apr 2013 15:46:09 +0000 (15:46 +0000)]
Added Dataset Management defines to be used by TRIM in cam ata and scsi to
calculate the size of blocks.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdded a sysctl (kern.geom.dev.delete_max_sectors) to control the maximum
smh [Fri, 26 Apr 2013 15:43:24 +0000 (15:43 +0000)]
Added a sysctl (kern.geom.dev.delete_max_sectors) to control the maximum
size of a delete request sent to the providing device performed by g_dev_ioctl.

This allows the kernel and apps via ioctl e.g. newfs -E to request large LBA
deletes which siginificantly improves performance.

Previously this was hard coded to 65536 sectors, the new default is 262144
which doubles the throughput of deletes on commonly available SSD's.

In tests on a Intel 520 120GB FW: 400i disk it improved the delete throughput
from 1.6GB/s to over 2.6GB/s on a full disk delete such as that done via
newfs -E

For some SSD's where delete time is pretty much constant, no matter what
the request, setting this to 0 will provide significantly better throughput
e.g. Samsung 840 240GB FW DXT07B0Q @ 262144 = 79G/s, @ 0 = 2259G/s

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoRemoved unneeded tests in dadeletemethodset changing it to return void
smh [Fri, 26 Apr 2013 15:31:52 +0000 (15:31 +0000)]
Removed unneeded tests in dadeletemethodset changing it to return void

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoDocument constantness of dst argument to if_output.
glebius [Fri, 26 Apr 2013 13:18:07 +0000 (13:18 +0000)]
Document constantness of dst argument to if_output.

Submitted by: pluknet

11 years agoAdd usie to LINT.
glebius [Fri, 26 Apr 2013 13:03:22 +0000 (13:03 +0000)]
Add usie to LINT.

11 years agoOn those machines that use critical(9) for counter(9) we need to
glebius [Fri, 26 Apr 2013 13:02:11 +0000 (13:02 +0000)]
On those machines that use critical(9) for counter(9) we need to
include systm.h.

11 years agoAdd const qualifier to the dst parameter of the ifnet if_output method.
glebius [Fri, 26 Apr 2013 12:50:32 +0000 (12:50 +0000)]
Add const qualifier to the dst parameter of the ifnet if_output method.

11 years agoDon't appease clang static analyzer after all and roll back
uqs [Fri, 26 Apr 2013 12:27:30 +0000 (12:27 +0000)]
Don't appease clang static analyzer after all and roll back
the free(3) of mntbuf ... again. There's no point in doing
useless extra work when we're about to exit.

See also r240565.

Not reading file history: uqs

11 years agoChanged ZFS TRIM sysctl from vfs.zfs.trim_disable -> vfs.zfs.trim.enabled
smh [Fri, 26 Apr 2013 11:24:20 +0000 (11:24 +0000)]
Changed ZFS TRIM sysctl from vfs.zfs.trim_disable -> vfs.zfs.trim.enabled
Enabled ZFS TRIM by default

Reviewed by: pjd (mentor)
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoOcteon 2 (6xxx) and newer CPUs don't use the clock CPU speed for its
imp [Fri, 26 Apr 2013 05:42:35 +0000 (05:42 +0000)]
Octeon 2 (6xxx) and newer CPUs don't use the clock CPU speed for its
I/O clock. Thankfully, the simple executive provies a way to querry
the proper clock that works on all models. Move to asking for the SCLK
via this interface.

This gets the serial console working after we start init and open the
console and set the divisor (which turned the output from good to
bad). I can login on the console now.

11 years agoRemove a comment that shouldn't have gone in.
jhibbits [Fri, 26 Apr 2013 05:18:18 +0000 (05:18 +0000)]
Remove a comment that shouldn't have gone in.

X-MFC-with: r249864

11 years agoUse a thread for the processing of virtio tx descriptors rather
grehan [Fri, 26 Apr 2013 05:13:48 +0000 (05:13 +0000)]
Use a thread for the processing of virtio tx descriptors rather
than blocking the vCPU thread. This improves bulk data performance
by ~30-40% and doesn't harm req/resp time for stock netperf runs.

Future work will use a thread pool rather than a thread per tx queue.

Submitted by: Dinakar Medavaram
Reviewed by: neel, grehan
Obtained from: NetApp

11 years agoGripe if some <slot,function> tuple is specified more than once instead of
neel [Fri, 26 Apr 2013 02:24:50 +0000 (02:24 +0000)]
Gripe if some <slot,function> tuple is specified more than once instead of
silently overwriting the previous assignment.

Gripe if the emulation is not recognized instead of silently ignoring the
emulated device.

If an error is detected by pci_parse_slot() then exit from the command line
parsing loop in main().

Submitted by (initial version): Chris Torek (chris.torek@gmail.com)