]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix callout expiring dynamic rules.
Alexander V. Chernikov [Sat, 2 Mar 2013 14:47:10 +0000 (14:47 +0000)]
Fix callout expiring dynamic rules.

PR: kern/175530
Submitted by: Vladimir Spiridenkov <vs@gtn.ru>
MFC after: 2 weeks

11 years agoMerge from vmc-playground branch:
Attilio Rao [Sat, 2 Mar 2013 14:19:08 +0000 (14:19 +0000)]
Merge from vmc-playground branch:
Rename the pv_entry_t iterator from pv_list to pv_next.
Besides being more correct technically (as the name seems to suggest
this is a list while it is an iterator), it will also be needed by
vm_radix work to avoid a nameclash on macro expansions.

Sponsored by: EMC / Isilon storage division
Reviewed by: alc, jeff
Tested by: flo, pho, jhb, davide

11 years ago- Revert the part of r247601 which turned the overtemperature and power fail
Marius Strobl [Sat, 2 Mar 2013 13:08:13 +0000 (13:08 +0000)]
- Revert the part of r247601 which turned the overtemperature and power fail
  interrupt shutdown handlers into filters. Shutdown_nice(9) acquires a sleep
  lock, which filters shouldn't do. It also seems that kern_reboot(9) still
  may require Giant to be hold.
- Correct an incorrect argument to shutdown_nice(9).

Submitted by: bde

11 years agoRevert the part of r247600 which turned the overtemperature and power fail
Marius Strobl [Sat, 2 Mar 2013 13:04:58 +0000 (13:04 +0000)]
Revert the part of r247600 which turned the overtemperature and power fail
interrupt shutdown handlers into filters. Shutdown_nice(9) acquires a sleep
lock, which filters shouldn't do. It also seems that kern_reboot(9) still
may require Giant to be hold.

Submitted by: bde

11 years agonullfs: Improve f_flags in statfs().
Jilles Tjoelker [Sat, 2 Mar 2013 12:42:23 +0000 (12:42 +0000)]
nullfs: Improve f_flags in statfs().

Include some flags of the nullfs mount itself:
MNT_RDONLY, MNT_NOEXEC, MNT_NOSUID, MNT_UNION, MNT_NOSYMFOLLOW.

This allows userland code calling statfs() or fstatfs() to see these flags.
In particular, this allows opendir() to detect that a -t nullfs -o union
mount needs deduplication (otherwise at least . and .. are returned twice)
and allows rtld to detect a -t nullfs -o noexec mount as noexec.

Turn off the MNT_ROOTFS flag from the underlying filesystem because the
nullfs mount is definitely not the root filesystem.

Reviewed by: kib
MFC after: 1 week

11 years agoIf the target file already exists, check for the CAP_UNLINKAT capabiity right
Pawel Jakub Dawidek [Sat, 2 Mar 2013 09:58:47 +0000 (09:58 +0000)]
If the target file already exists, check for the CAP_UNLINKAT capabiity right
on the target directory descriptor, but only if this is renameat(2) and real
target directory descriptor is given (not AT_FDCWD). Without this fix regular
rename(2) fails if the target file already exists.

Reported by: Michael Butler <imb@protected-networks.net>
Reported by: Larry Rosenman <ler@lerctr.org>
Sponsored by: The FreeBSD Foundation

11 years agoDisable the ctl driver in GENERIC.
Adrian Chadd [Sat, 2 Mar 2013 08:12:41 +0000 (08:12 +0000)]
Disable the ctl driver in GENERIC.

It unfortunately steals a fair chunk of RAM at startup even if it's not
actively used, which prevents FreeBSD VMs of 128MB from successfully
booting and running.

11 years agomdoc: remove superfluous paragraph macro.
Joel Dahl [Sat, 2 Mar 2013 06:55:55 +0000 (06:55 +0000)]
mdoc: remove superfluous paragraph macro.

11 years agoMake this WARNS=9 clean on i386 w/ clang.
Marcel Moolenaar [Sat, 2 Mar 2013 05:28:55 +0000 (05:28 +0000)]
Make this WARNS=9 clean on i386 w/ clang.

11 years agoFix warnings (control reaches end of non-void function).
Marcel Moolenaar [Sat, 2 Mar 2013 05:07:51 +0000 (05:07 +0000)]
Fix warnings (control reaches end of non-void function).

11 years agoFix nandfs support by providing the same crc32 function as is used
Marcel Moolenaar [Sat, 2 Mar 2013 05:03:36 +0000 (05:03 +0000)]
Fix nandfs support by providing the same crc32 function as is used
in newfs_nandfs. In libstand we get crc32 from libz. The polynomial
is not the same as used for nandfs, which is the crc32 used in the
kernel.

11 years agoMove some virtual memory constants to the top of the file where they are on
Andrew Turner [Sat, 2 Mar 2013 05:02:29 +0000 (05:02 +0000)]
Move some virtual memory constants to the top of the file where they are on
other architectures [1].

While here:
 - Remove an unused and commented out include.
 - Add a comment describing the file that other copies have.
 - Fix the style of the defines and add a comment on what each one is.

Suggested by: [1] alc

11 years agoBuild the Raspberry Pi dtb file when building the kernel so we can copy it
Andrew Turner [Sat, 2 Mar 2013 03:23:14 +0000 (03:23 +0000)]
Build the Raspberry Pi dtb file when building the kernel so we can copy it
to the boot partition for U-Boot.

11 years agoEnsure the stack is correctly aligned before calling the first C function.
Andrew Turner [Sat, 2 Mar 2013 02:19:04 +0000 (02:19 +0000)]
Ensure the stack is correctly aligned before calling the first C function.

11 years agoAdd regression tests for the new Capsicum system calls.
Pawel Jakub Dawidek [Sat, 2 Mar 2013 01:00:26 +0000 (01:00 +0000)]
Add regression tests for the new Capsicum system calls.

Sponsored by: The FreeBSD Foundation

11 years agoUpdate existing regression tests after Capsicum overhaul.
Pawel Jakub Dawidek [Sat, 2 Mar 2013 00:56:53 +0000 (00:56 +0000)]
Update existing regression tests after Capsicum overhaul.

11 years agoRegen after r247602.
Pawel Jakub Dawidek [Sat, 2 Mar 2013 00:55:09 +0000 (00:55 +0000)]
Regen after r247602.

11 years agoMerge Capsicum overhaul:
Pawel Jakub Dawidek [Sat, 2 Mar 2013 00:53:12 +0000 (00:53 +0000)]
Merge Capsicum overhaul:

- Capability is no longer separate descriptor type. Now every descriptor
  has set of its own capability rights.

- The cap_new(2) system call is left, but it is no longer documented and
  should not be used in new code.

- The new syscall cap_rights_limit(2) should be used instead of
  cap_new(2), which limits capability rights of the given descriptor
  without creating a new one.

- The cap_getrights(2) syscall is renamed to cap_rights_get(2).

- If CAP_IOCTL capability right is present we can further reduce allowed
  ioctls list with the new cap_ioctls_limit(2) syscall. List of allowed
  ioctls can be retrived with cap_ioctls_get(2) syscall.

- If CAP_FCNTL capability right is present we can further reduce fcntls
  that can be used with the new cap_fcntls_limit(2) syscall and retrive
  them with cap_fcntls_get(2).

- To support ioctl and fcntl white-listing the filedesc structure was
  heavly modified.

- The audit subsystem, kdump and procstat tools were updated to
  recognize new syscalls.

- Capability rights were revised and eventhough I tried hard to provide
  backward API and ABI compatibility there are some incompatible changes
  that are described in detail below:

CAP_CREATE old behaviour:
- Allow for openat(2)+O_CREAT.
- Allow for linkat(2).
- Allow for symlinkat(2).
CAP_CREATE new behaviour:
- Allow for openat(2)+O_CREAT.

Added CAP_LINKAT:
- Allow for linkat(2). ABI: Reuses CAP_RMDIR bit.
- Allow to be target for renameat(2).

Added CAP_SYMLINKAT:
- Allow for symlinkat(2).

Removed CAP_DELETE. Old behaviour:
- Allow for unlinkat(2) when removing non-directory object.
- Allow to be source for renameat(2).

Removed CAP_RMDIR. Old behaviour:
- Allow for unlinkat(2) when removing directory.

Added CAP_RENAMEAT:
- Required for source directory for the renameat(2) syscall.

Added CAP_UNLINKAT (effectively it replaces CAP_DELETE and CAP_RMDIR):
- Allow for unlinkat(2) on any object.
- Required if target of renameat(2) exists and will be removed by this
  call.

Removed CAP_MAPEXEC.

CAP_MMAP old behaviour:
- Allow for mmap(2) with any combination of PROT_NONE, PROT_READ and
  PROT_WRITE.
CAP_MMAP new behaviour:
- Allow for mmap(2)+PROT_NONE.

Added CAP_MMAP_R:
- Allow for mmap(PROT_READ).
Added CAP_MMAP_W:
- Allow for mmap(PROT_WRITE).
Added CAP_MMAP_X:
- Allow for mmap(PROT_EXEC).
Added CAP_MMAP_RW:
- Allow for mmap(PROT_READ | PROT_WRITE).
Added CAP_MMAP_RX:
- Allow for mmap(PROT_READ | PROT_EXEC).
Added CAP_MMAP_WX:
- Allow for mmap(PROT_WRITE | PROT_EXEC).
Added CAP_MMAP_RWX:
- Allow for mmap(PROT_READ | PROT_WRITE | PROT_EXEC).

Renamed CAP_MKDIR to CAP_MKDIRAT.
Renamed CAP_MKFIFO to CAP_MKFIFOAT.
Renamed CAP_MKNODE to CAP_MKNODEAT.

CAP_READ old behaviour:
- Allow pread(2).
- Disallow read(2), readv(2) (if there is no CAP_SEEK).
CAP_READ new behaviour:
- Allow read(2), readv(2).
- Disallow pread(2) (CAP_SEEK was also required).

CAP_WRITE old behaviour:
- Allow pwrite(2).
- Disallow write(2), writev(2) (if there is no CAP_SEEK).
CAP_WRITE new behaviour:
- Allow write(2), writev(2).
- Disallow pwrite(2) (CAP_SEEK was also required).

Added convinient defines:

#define CAP_PREAD (CAP_SEEK | CAP_READ)
#define CAP_PWRITE (CAP_SEEK | CAP_WRITE)
#define CAP_MMAP_R (CAP_MMAP | CAP_SEEK | CAP_READ)
#define CAP_MMAP_W (CAP_MMAP | CAP_SEEK | CAP_WRITE)
#define CAP_MMAP_X (CAP_MMAP | CAP_SEEK | 0x0000000000000008ULL)
#define CAP_MMAP_RW (CAP_MMAP_R | CAP_MMAP_W)
#define CAP_MMAP_RX (CAP_MMAP_R | CAP_MMAP_X)
#define CAP_MMAP_WX (CAP_MMAP_W | CAP_MMAP_X)
#define CAP_MMAP_RWX (CAP_MMAP_R | CAP_MMAP_W | CAP_MMAP_X)
#define CAP_RECV CAP_READ
#define CAP_SEND CAP_WRITE

#define CAP_SOCK_CLIENT \
(CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \
 CAP_PEELOFF | CAP_RECV | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN)
#define CAP_SOCK_SERVER \
(CAP_ACCEPT | CAP_BIND | CAP_GETPEERNAME | CAP_GETSOCKNAME | \
 CAP_GETSOCKOPT | CAP_LISTEN | CAP_PEELOFF | CAP_RECV | CAP_SEND | \
 CAP_SETSOCKOPT | CAP_SHUTDOWN)

Added defines for backward API compatibility:

#define CAP_MAPEXEC CAP_MMAP_X
#define CAP_DELETE CAP_UNLINKAT
#define CAP_MKDIR CAP_MKDIRAT
#define CAP_RMDIR CAP_UNLINKAT
#define CAP_MKFIFO CAP_MKFIFOAT
#define CAP_MKNOD CAP_MKNODAT
#define CAP_SOCK_ALL (CAP_SOCK_CLIENT | CAP_SOCK_SERVER)

Sponsored by: The FreeBSD Foundation
Reviewed by: Christoph Mallon <christoph.mallon@gmx.de>
Many aspects discussed with: rwatson, benl, jonathan
ABI compatibility discussed with: kib

11 years ago- Apparently, it's no longer a problem to call shutdown_nice(9) from within
Marius Strobl [Sat, 2 Mar 2013 00:41:51 +0000 (00:41 +0000)]
- Apparently, it's no longer a problem to call shutdown_nice(9) from within
  an interrupt filter (some other drivers in the tree do the same). So
  change the overtemperature and power fail interrupts from handlers in order
  to code and get rid of a !INTR_MPSAFE handlers.
- Mark unused parameters as such.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

11 years ago- While Netra X1 generally show no ill effects when registering a power
Marius Strobl [Sat, 2 Mar 2013 00:37:31 +0000 (00:37 +0000)]
- While Netra X1 generally show no ill effects when registering a power
  fail interrupt handler, there seems to be either a broken batch of them
  or a tendency to develop a defect which causes this interrupt to fire
  inadvertedly. Given that apart from this problem these machines work
  just fine, add a tunable allowing the setup of the power fail interrupt
  to be disabled.
  While at it, remove the DEBUGGER_ON_POWERFAIL compile time option and
  make that behavior also selectable via the newly added tunable.
- Apparently, it's no longer a problem to call shutdown_nice(9) from within
  an interrupt filter (some other drivers in the tree do the same). So
  change the power fail interrupt from an handler in order to simplify the
  code and get rid of a !INTR_MPSAFE handler.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

11 years agoProvide cap_sandboxed(3) function, which is a wrapper around cap_getmode(2)
Pawel Jakub Dawidek [Sat, 2 Mar 2013 00:11:27 +0000 (00:11 +0000)]
Provide cap_sandboxed(3) function, which is a wrapper around cap_getmode(2)
system call, which has a nice property - it never fails, so it is a bit
easier to use. If there is no support for capability mode in the kernel
the function will return false (not in a sandbox). If the kernel is compiled
with the support for capability mode, the function will return true or false
depending if the calling process is in the capability mode sandbox or not
respectively.

Sponsored by: The FreeBSD Foundation

11 years agoFix assignment of maximum bounadary.
Xin LI [Fri, 1 Mar 2013 23:26:13 +0000 (23:26 +0000)]
Fix assignment of maximum bounadary.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad
MFC after: 2 weeks

11 years agoFix wrong assignment.
Xin LI [Fri, 1 Mar 2013 23:21:18 +0000 (23:21 +0000)]
Fix wrong assignment.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev 9568dd07a22a136e380e6c19a8ea188eb92976d5
MFC after: 2 weeks

11 years agoFix a typo in mfi_stp_cmd() that would give wrong assignment.
Xin LI [Fri, 1 Mar 2013 23:18:20 +0000 (23:18 +0000)]
Fix a typo in mfi_stp_cmd() that would give wrong assignment.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev 0dc98fff2206d7bb78ce5e07ac34d6954e4bd96a
MFC after: 3 days

11 years agoMFV r247575:
Xin LI [Fri, 1 Mar 2013 22:20:13 +0000 (22:20 +0000)]
MFV r247575:

Import a fix tighten assertion on SPA versions from vendor (Illumos).

Illumos ZFS issue:

  3543 Feature flags causes assertion in spa.c to miss certain cases

MFC after: 2 weeks

11 years agoInitialize count in order to appease clang.
Marius Strobl [Fri, 1 Mar 2013 22:09:08 +0000 (22:09 +0000)]
Initialize count in order to appease clang.

Submitted by: delphij

11 years agoInitialize count in order to appease clang.
Marius Strobl [Fri, 1 Mar 2013 22:05:20 +0000 (22:05 +0000)]
Initialize count in order to appease clang.

Submitted by: delphij

11 years agoReplace the TDP_NOSLEEPING flag with a counter so that the
John Baldwin [Fri, 1 Mar 2013 22:03:31 +0000 (22:03 +0000)]
Replace the TDP_NOSLEEPING flag with a counter so that the
THREAD_NO_SLEEPING() and THREAD_SLEEPING_OK() macros can nest.

Reviewed by: attilio

11 years agoIncrease the maximum text size on ARM to 64MiB. Without this clang would be
Andrew Turner [Fri, 1 Mar 2013 21:59:23 +0000 (21:59 +0000)]
Increase the maximum text size on ARM to 64MiB. Without this clang would be
sent a SIGABRT when it is loaded as it is too large. This is the smallest
power of two MiB value that allows us to execute clang.

While here wrap it in an #ifndef to be consistent with the other
architectures.

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>

11 years agoRemove unnecessary variables.
Pawel Jakub Dawidek [Fri, 1 Mar 2013 21:58:56 +0000 (21:58 +0000)]
Remove unnecessary variables.

11 years agoMFV r247316:
Martin Matuska [Fri, 1 Mar 2013 21:58:51 +0000 (21:58 +0000)]
MFV r247316:
Merge new read-only zfs properties from vendor (illumos)

Illumos ZFS issues:
  3588 provide zfs properties for logical (uncompressed) space used and
       referenced

References:
  https://www.illumos.org/issues/3588

MFC after: 2 weeks

11 years agoReduce lock scope a little.
Pawel Jakub Dawidek [Fri, 1 Mar 2013 21:57:02 +0000 (21:57 +0000)]
Reduce lock scope a little.

11 years ago- Move reporting of failures to disable RX/TX MAC under bootverbose as at
Marius Strobl [Fri, 1 Mar 2013 20:51:53 +0000 (20:51 +0000)]
- Move reporting of failures to disable RX/TX MAC under bootverbose as at
  least the Saturn chips of 501-6738 cards may fail to do so the first
  time, which isn't fatal though.
  Reported by: Paul Keusemann
- Explain why we don't enable infinite bursts on sparc64.
- Given that these chips support memory write invalidate, make sure that
  it's enabled in the command register. Also make sure that PERR# and
  SERR# assertion is enabled.

MFC after: 1 week

11 years agoUpdate vendor-sys/illumos/dist to illumos-gate 13970:c9a5683da38e
Martin Matuska [Fri, 1 Mar 2013 20:48:07 +0000 (20:48 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 13970:c9a5683da38e

Illumos ZFS issues:
  3543 Feature flags causes assertion in spa.c to miss certain cases

11 years ago- In sbbc_pci_attach() just pass the already obtained bus tag and handle
Marius Strobl [Fri, 1 Mar 2013 20:36:59 +0000 (20:36 +0000)]
- In sbbc_pci_attach() just pass the already obtained bus tag and handle
  instead of acquiring these anew.
- Use NULL instead of 0 for pointers.

MFC after: 1 week

11 years ago- Remove an unused header.
Marius Strobl [Fri, 1 Mar 2013 20:34:02 +0000 (20:34 +0000)]
- Remove an unused header.
- Use NULL instead of 0 for pointers.
- Let ofw_pcib_probe() return BUS_PROBE_DEFAULT instead of 0 so specialized
  PCI-PCI-bridge drivers may attach instead.
- Add WARs for PLX Technology PEX 8114 bridges and PEX 8532 switches.
  Ideally, these should live in MI code but at least for the latter we're
  missing the necessary infrastructure there.

MFC after: 1 week

11 years ago- Apparently, r186520 was just wrong and the clock of Oxford OX16PCI958 is
Marius Strobl [Fri, 1 Mar 2013 20:16:06 +0000 (20:16 +0000)]
- Apparently, r186520 was just wrong and the clock of Oxford OX16PCI958 is
  neither DEFAULT_RCLK * 2 nor DEFAULT_RCLK * 10 but plain DEFAULT_RCLK
  and there's no (open) source indicating otherwise. This was tested with
  an EXSYS EX-41098-2, whose clock is not configurable and identifies as:
  puc0@pci0:5:1:0:        class=0x070200 card=0x06711415 chip=0x95381415 rev=0x01 hdr=0x00
      vendor     = 'Oxford Semiconductor Ltd'
      class      = simple comms
      subclass   = multiport serial

  Note that this exactly matches the card mentioned in PR 129665 so no
  sub-device/sub-vendor based quirking of the latter is possible. So maybe
  we should grow some sort of tunable, in case non-default cards such as
  the latter aren't configurable either (this also wouldn't be the first
  time an allegedly tested commit turns out to be wrong though).
- Make the TiMedia tables const.

MFC after: 1 week

11 years ago- Make tables, device ID strings etc const. This includes #ifdef'ing 0
Marius Strobl [Fri, 1 Mar 2013 19:55:10 +0000 (19:55 +0000)]
- Make tables, device ID strings etc const. This includes #ifdef'ing 0
  aac_command_status_table, which is actually unused since r111532.
  While at it, make aac_if a pointer to the now const interface tables
  instead of copying them over to the softc (this alone already reduces the
  size of aac.ko on amd64 by ~1 KiB).
- Remove redundant softc members.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove redundant bzero(9)'ing of the softc.
- Use pci_enable_busmaster(9) instead of duplicating it.
- Remove redundant checking for PCIM_CMD_MEMEN (resource allocation will
  just fail).
- Canonicalize the error messages in case of resource allocation failures.
- Add support for using MSI instead of INTx, controllable via the tunable
  hw.aac.enable_msi (defaulting to on).

MFC after: 1 month

11 years ago- Make tables, device ID strings etc const.
Marius Strobl [Fri, 1 Mar 2013 19:12:38 +0000 (19:12 +0000)]
- Make tables, device ID strings etc const.
- Use NULL instead of 0 for pointers.
- Remove redundant bzero(9)'ing of the softc.
- Remove redundant/unused softc members.
- Don't allocate MSI/MSI-X as RF_SHAREABLE.
- Re-use bus accessor macros instead of duplicating them.
- In bce_miibus_{read,write}_reg(), remove superfluous limiting of the PHY
  address (missed in r213893).

MFC after: 1 week

11 years agoEliminate a redundant #include: machine/pmap.h is already included
Alan Cox [Fri, 1 Mar 2013 19:02:41 +0000 (19:02 +0000)]
Eliminate a redundant #include: machine/pmap.h is already included
through vm/pmap.h.

11 years ago- Use strdup(9) instead of reimplementing it.
Marius Strobl [Fri, 1 Mar 2013 18:49:14 +0000 (18:49 +0000)]
- Use strdup(9) instead of reimplementing it.
- Use __DECONST instead of strange casts.
- Reduce code duplication and simplify name2oid().

PR: 176373
Submitted by: Christoph Mallon
MFC after: 1 week

11 years agoMake the default implementation of the VOP_VPTOCNP() fail if the
Konstantin Belousov [Fri, 1 Mar 2013 18:40:14 +0000 (18:40 +0000)]
Make the default implementation of the VOP_VPTOCNP() fail if the
directory entry, matched by the inode number, is ".".

NFSv4 client might instantiate the distinct vnodes which have the same
inode number, since single v4 export can be combined from several
filesystems on the server.  For instance, a case when the nested
server mount point is exactly one directory below the top of the
export, causes directory and its parent to have the same inode number
2.  The vop_stdvptocnp() algorithm then returns "." as the name of the
lower directory.

Filtering out the "." entry with ENOENT works around this behaviour,
the error forces getcwd(3) to fall back to usermode implementation,
which compares both st_dev and st_ino.

Based on the submission by: rmacklem
Tested by: rmacklem
MFC after: 1 week

11 years agoFix typo.
Kevin Lo [Fri, 1 Mar 2013 15:48:31 +0000 (15:48 +0000)]
Fix typo.

11 years agoAssign the len field of the netbuf structure to the current length of
Kevin Lo [Fri, 1 Mar 2013 15:45:57 +0000 (15:45 +0000)]
Assign the len field of the netbuf structure to the current length of
a sockaddr.

Obtained from: NetBSD

11 years agoFix the zfs_ioctl compat layer to support zfs_cmd size change introduced
Martin Matuska [Fri, 1 Mar 2013 09:42:58 +0000 (09:42 +0000)]
Fix the zfs_ioctl compat layer to support zfs_cmd size change introduced
in r247265 (ZFS deadman thread). Both new utilities now support the old
kernel and new kernel properly detects old utilities.

For future backwards compatibility, the vfs.zfs.version.ioctl read-only
sysctl has been introduced. With this sysctl zfs utilities will be able
to detect the ioctl interface version of the currently loaded zfs module.

As a side effect, the zfs utilities between r247265 and this revision don't
support the old kernel module. If you are using HEAD newer or equal than
r247265, install the new kernel module (or whole kernel) first.

MFC after: 10 days

11 years agoCopy the definition of VM_MAX_AUTOTUNE_MAXUSERS from i386. (See r242847.)
Alan Cox [Fri, 1 Mar 2013 08:30:31 +0000 (08:30 +0000)]
Copy the definition of VM_MAX_AUTOTUNE_MAXUSERS from i386.  (See r242847.)

Tested by: andrew

11 years agoFixed documented prototype of kinfo_getproc(3).
Ruslan Ermilov [Fri, 1 Mar 2013 07:39:14 +0000 (07:39 +0000)]
Fixed documented prototype of kinfo_getproc(3).

11 years agoProvide slightly more helpful feedback when we can't figure out what
Brooks Davis [Fri, 1 Mar 2013 03:25:43 +0000 (03:25 +0000)]
Provide slightly more helpful feedback when we can't figure out what
compiler the user is using.

PR: misc/173914

11 years agoSpecify the length of the mapping requested from 'paddr_guest2host()'.
Neel Natu [Fri, 1 Mar 2013 02:26:28 +0000 (02:26 +0000)]
Specify the length of the mapping requested from 'paddr_guest2host()'.

This seems prudent to do in its own right but it also opens up the possibility
of not having to mmap the entire guest address space in the 'bhyve' process
context.

Discussed with: grehan
Obtained from: NetApp

11 years agoEnable uart driver for A10.
Ganbold Tsagaankhuu [Fri, 1 Mar 2013 01:47:11 +0000 (01:47 +0000)]
Enable uart driver for A10.

Approved by: gonzo@

11 years agoAdd support for A10 uart.
Ganbold Tsagaankhuu [Fri, 1 Mar 2013 01:42:31 +0000 (01:42 +0000)]
Add support for A10 uart.
A10 uart is derived from Synopsys DesignWare uart and requires
to read Uart Status Register when IIR_BUSY has detected.
Also this change includes FDT check, where it checks device
specific properties defined in dts and sets the busy_detect variable.
broken_txfifo is also needed to be set in order to make it work for
A10 uart case.

Reviewed by: marcel@
Approved by: gonzo@

11 years agoMinor wordsmithing.
Glen Barber [Thu, 28 Feb 2013 23:45:41 +0000 (23:45 +0000)]
Minor wordsmithing.

X-MFC-Needs: r245617

11 years agoAdd missing flags.
Adrian Chadd [Thu, 28 Feb 2013 23:39:38 +0000 (23:39 +0000)]
Add missing flags.

11 years agoOops - fix an incorrect test.
Adrian Chadd [Thu, 28 Feb 2013 23:39:22 +0000 (23:39 +0000)]
Oops - fix an incorrect test.

11 years agoDon't enable the HT flags for legacy rates.
Adrian Chadd [Thu, 28 Feb 2013 23:31:23 +0000 (23:31 +0000)]
Don't enable the HT flags for legacy rates.

I stumbled across this whilst trying to debug another weird hang reported
on the freebsd-wireless list.

Whilst here, add in the STBC check to ath_rateseries_setup().

Whilst here, fix the short preamble flag to be set only for legacy rates.

Whilst here, comment that we should be using the full set of decisions
made by ath_rateseries_setup() rather than recalculating them!

11 years agoChange the ixgbe module name to if_ixgbe to conform
Jack F Vogel [Thu, 28 Feb 2013 22:48:00 +0000 (22:48 +0000)]
Change the ixgbe module name to if_ixgbe to conform
to the usual naming convention.

11 years agoAdd platform DMA support to SDHCI driver for BCM2835
Oleksandr Tymoshenko [Thu, 28 Feb 2013 19:51:30 +0000 (19:51 +0000)]
Add platform DMA support to SDHCI driver for BCM2835

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Reviewed by: ian@

11 years agoAdd driver for BCM2835's DMA engine
Oleksandr Tymoshenko [Thu, 28 Feb 2013 19:48:19 +0000 (19:48 +0000)]
Add driver for BCM2835's DMA engine

This is a version of code submitted by Daisuke Aoyama <aoyama at peach.ne.jp>
with some architectural changes.

11 years agoAdd hooks for plugging platform-provided transfer backend.
Oleksandr Tymoshenko [Thu, 28 Feb 2013 19:43:14 +0000 (19:43 +0000)]
Add hooks for plugging platform-provided transfer backend.

In order to use platorm backend hardware driver should
impement three methods:
- platform_start_transfer and platform_finish_transfer
    to start and finish transfer
- platform_will_handle - check whether transaction is
    suitable for backend. If not - driver will fall back
    to PIO mode.

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Approved by: ian@

11 years agoMove the definition of sbintime_t type from <sys/time.h> to <sys/types.h>.
Davide Italiano [Thu, 28 Feb 2013 17:10:30 +0000 (17:10 +0000)]
Move the definition of sbintime_t type from <sys/time.h> to <sys/types.h>.
With this change we prevent gross namespace pollution.

Reported by: bde
Suggested by: attilio

11 years agoMFcalloutng:
Davide Italiano [Thu, 28 Feb 2013 16:22:49 +0000 (16:22 +0000)]
MFcalloutng:
Style fixes.

11 years agoMFcalloutng:
Alexander Motin [Thu, 28 Feb 2013 13:46:03 +0000 (13:46 +0000)]
MFcalloutng:
Switch eventtimers(9) from using struct bintime to sbintime_t.
Even before this not a single driver really supported full dynamic range of
struct bintime even in theory, not speaking about practical inexpediency.
This change legitimates the status quo and cleans up the code.

11 years agoMFcalloutng (r247427 by mav):
Davide Italiano [Thu, 28 Feb 2013 11:27:01 +0000 (11:27 +0000)]
MFcalloutng (r247427 by mav):
We don't need any precision here. Let it be fast and dirty shift then
slow and excessively precise 64-bit division.

11 years agoMFcalloutng:
Davide Italiano [Thu, 28 Feb 2013 10:46:54 +0000 (10:46 +0000)]
MFcalloutng:
When CPU becomes idle, cpu_idleclock() calculates time to the next timer
event in order to reprogram hw timer. Return that time in sbintime_t to
the caller and pass it to acpi_cpu_idle(), where it can be used as one
more factor (quite precise) to extimate furter sleep time and choose
optimal sleep state. This is a preparatory change for further callout
improvements will be committed in the next days.

The commmit is not targeted for MFC.

11 years agoIntroduce sbintime_t type -- the simplified version of struct bintime,
Alexander Motin [Thu, 28 Feb 2013 10:21:04 +0000 (10:21 +0000)]
Introduce sbintime_t type -- the simplified version of struct bintime,
using 32.32 fixed point in form of single int64_t.  It is much easier to
use in cases where additional precision and range of struct bintime is
not required.

Reviewed by: bde (previous version), davide

11 years agoRefresh vendor driver version which adds ARC-1224 support.
Xin LI [Thu, 28 Feb 2013 04:16:47 +0000 (04:16 +0000)]
Refresh vendor driver version which adds ARC-1224 support.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>
MFC after: 3 days

11 years agoWhen we are waiting for new trail files we may have been disconnected and
Pawel Jakub Dawidek [Thu, 28 Feb 2013 01:24:24 +0000 (01:24 +0000)]
When we are waiting for new trail files we may have been disconnected and
reconnected in the meantime. Check if reset is set before opening next trail
file, as not doing so will result in sending OPEN message with the same
file name twice and this is illegal - the second OPEN is send without first
closing previous trail file.

11 years agoProperly handle '-h' argument.
Glen Barber [Thu, 28 Feb 2013 01:22:14 +0000 (01:22 +0000)]
Properly handle '-h' argument.

PR: 176332
Reviewed by: scottl
MFC after: 3 days

11 years agoRemove the quirk to allow use of MSI when the guest is running inside bhyve.
Neel Natu [Thu, 28 Feb 2013 01:00:32 +0000 (01:00 +0000)]
Remove the quirk to allow use of MSI when the guest is running inside bhyve.

This became redundant after the hostbridge presented to the guest started
advertising the PCI-E capability (r246846).

Obtained from: NetApp

11 years agoComplete r247297:
Attilio Rao [Thu, 28 Feb 2013 00:18:56 +0000 (00:18 +0000)]
Complete r247297:
Remove unused inclusions of vm/vm_pager.h and vm/vnode_pager.h.

Sponsored by: EMC / Isilon storage division

11 years agoAdds hw.mfi.cmd_timeout loader / sysctl tuneable which controls the default
Steven Hartland [Wed, 27 Feb 2013 23:17:45 +0000 (23:17 +0000)]
Adds hw.mfi.cmd_timeout loader / sysctl tuneable which controls the default
timeout used in the mfi driver. This is useful for long running commands
such as secure erase.

Reviewed by: John Baldwin
Approved by: pjd (mentor)

11 years agoAdd a reminder that the user should update boot block if they are upgrading
Xin LI [Wed, 27 Feb 2013 21:58:06 +0000 (21:58 +0000)]
Add a reminder that the user should update boot block if they are upgrading
their existing system and use LZ4 compression for ZFS.

Suggested by: mm
MFC after: 3 days

11 years agoRemove EOL whitespace.
Joel Dahl [Wed, 27 Feb 2013 20:16:30 +0000 (20:16 +0000)]
Remove EOL whitespace.

11 years agomdoc: begin sentence on new line.
Joel Dahl [Wed, 27 Feb 2013 20:15:06 +0000 (20:15 +0000)]
mdoc: begin sentence on new line.

11 years agomdoc: add missing El.
Joel Dahl [Wed, 27 Feb 2013 20:09:25 +0000 (20:09 +0000)]
mdoc: add missing El.

11 years agofix this script so we don't expand the second $FreeBSD since svn thinks
John-Mark Gurney [Wed, 27 Feb 2013 19:59:58 +0000 (19:59 +0000)]
fix this script so we don't expand the second $FreeBSD since svn thinks
the $ in $1 ends the keyword, and expands it...

11 years agoFix a typo that prevented booting a kernel that had virtual addresses in
Ian Lepore [Wed, 27 Feb 2013 19:59:41 +0000 (19:59 +0000)]
Fix a typo that prevented booting a kernel that had virtual addresses in
the elf headers.

11 years agoFix a potential race in returning setting errno when an
Michael Tuexen [Wed, 27 Feb 2013 19:51:47 +0000 (19:51 +0000)]
Fix a potential race in returning setting errno when an
association goes down.
Reported by Mozilla in
https://bugzilla.mozilla.org/show_bug.cgi?id=845513

MFC after: 3 days

11 years agoAdd an implementation of open_memstream() and open_wmemstream(). These
John Baldwin [Wed, 27 Feb 2013 19:50:46 +0000 (19:50 +0000)]
Add an implementation of open_memstream() and open_wmemstream().  These
routines provide write-only stdio FILE objects that store their data in a
dynamically allocated buffer.  They are a string builder interface somewhat
akin to a completely dynamic sbuf.

Reviewed by: bde, jilles (earlier versions)
MFC after: 1 month

11 years agowatchdogd(8) and watchdog(4) enhancements.
Alfred Perlstein [Wed, 27 Feb 2013 19:03:31 +0000 (19:03 +0000)]
watchdogd(8) and watchdog(4) enhancements.

The following support was added to watchdog(4):
- Support to query the outstanding timeout.
- Support to set a software pre-timeout function watchdog with an 'action'
- Support to set a software only watchdog with a configurable 'action'

'action' can be a mask specifying a single operation or a combination of:
 log(9), printf(9), panic(9) and/or kdb_enter(9).

Support the following in watchdogged:
- Support to utilize the new additions to watchdog(4).
- Support to warn if a watchdog script runs for too long.
- Support for "dry run" where we do not actually arm the watchdog,
  but only report on our timing.

Sponsored by:   iXsystems, Inc.
MFC after:      1 month

11 years agoMerge from vmobj-rwlock:
Attilio Rao [Wed, 27 Feb 2013 18:12:13 +0000 (18:12 +0000)]
Merge from vmobj-rwlock:
VM_OBJECT_LOCKED() macro is only used to implement a custom version
of lock assertions right now (which likely spread out thanks to
copy and paste).
Remove it and implement actual assertions.

Sponsored by: EMC / Isilon storage division
Reviewed by: alc
Tested by: pho

11 years agoThe .journal file needs to reside on the ROOTINO which must not extend
Peter Holm [Wed, 27 Feb 2013 18:12:04 +0000 (18:12 +0000)]
The .journal file needs to reside on the ROOTINO which must not extend
beyond direct blocks. A typo caused this check to fail.

11 years agoMFV 247176, 247178, 247315:
Martin Matuska [Wed, 27 Feb 2013 14:45:23 +0000 (14:45 +0000)]
MFV 247176, 247178, 247315:
Import metaslab_sync() speedup from vendor (illumos).

Illumos ZFS issues:
  3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread
  3564 spa_sync() spends 5-10% of its time in metaslab_sync() (when not
       condensing)
  3578 transferring the freed map to the defer map should be constant time
  3579 ztest trips assertion in metaslab_weight()

References:
  https://www.illumos.org/issues/3552
  https://www.illumos.org/issues/3564
  https://www.illumos.org/issues/3578
  https://www.illumos.org/issues/3579

MFC after: 2 weeks

11 years agoMap libraries linked with -Ttext-segment=base_addr at base_addr.
Tijl Coosemans [Wed, 27 Feb 2013 09:34:09 +0000 (09:34 +0000)]
Map libraries linked with -Ttext-segment=base_addr at base_addr.
Normal libraries have base address 0 and are unaffected by this change.

PR: 176216
Submitted by: Damjan Jovanovic <damjan.jov@gmail.com>
Reviewed by: kib
MFC after: 1 week

11 years agoFix typo
Oleksandr Tymoshenko [Wed, 27 Feb 2013 08:34:32 +0000 (08:34 +0000)]
Fix typo

11 years ago- Initialize GPIO_OE register based on pinmux configuration
Oleksandr Tymoshenko [Wed, 27 Feb 2013 08:32:34 +0000 (08:32 +0000)]
- Initialize GPIO_OE register based on pinmux configuration

Although AM335x TRM states that GPIO_OE register is not used and just
reflects pads configuration in practice it does control pin behavior
and shoiuld be set in addition to pinmux setup

11 years agoMake recursive getblk() slightly more useful. Keep the buffer state
Konstantin Belousov [Wed, 27 Feb 2013 07:34:09 +0000 (07:34 +0000)]
Make recursive getblk() slightly more useful.  Keep the buffer state
intact if getblk() is done on the already owned buffer.  Exit from
brelse() early when the lock recursion is detected, otherwise brelse()
might prematurely destroy the buffer under some circumstances.

Sponsored by: The FreeBSD Foundation
Noted by: mckusick
Tested by: pho
MFC after: 2 weeks

11 years agoThe softdep freeblks workitem might hold a reference on the dquot.
Konstantin Belousov [Wed, 27 Feb 2013 07:32:39 +0000 (07:32 +0000)]
The softdep freeblks workitem might hold a reference on the dquot.
Current dqflush() panics when a dquot with with non-zero refcount is
encountered.  The situation is possible, because quotas are turned off
before softdep workitem queue if flushed, due to the quota file writes
might create softdep workitems.

Make the encountering an active dquot in dqflush() not fatal, return
the error from quotaoff() instead.  Ignore the quotaoff() failures
when ffs_flushfiles() is called in the course of softdep_flushfiles()
loop, until the last iteration.  At the last loop, the quotas must be
closed, and because SU workitems should be already flushed, the
references to dquot are gone.

Sponsored by: The FreeBSD Foundation
Reported and tested by: pho
Reviewed by: mckusick
MFC after: 2 weeks

11 years agoAn inode block must not be blockingly read while cg block is owned.
Konstantin Belousov [Wed, 27 Feb 2013 07:31:23 +0000 (07:31 +0000)]
An inode block must not be blockingly read while cg block is owned.
The order is inode buffer lock -> snaplk -> cg buffer lock, reversing
the order causes deadlocks.

Inode block must not be written while cg block buffer is owned. The
FFS copy on write needs to allocate a block to copy the content of the
inode block, and the cylinder group selected for the allocation might
be the same as the owned cg block.  The reserved block detection code
in the ffs_copyonwrite() and ffs_bp_snapblk() is unable to detect the
situation, because the locked cg buffer is not exposed to it.

In order to maintain the dependency between initialized inode block
and the cg_initediblk pointer, look up the inode buffer in
non-blocking mode. If succeeded, brelse cg block, initialize the inode
block and write it.  After the write is finished, reread cg block and
update the cg_initediblk.

If inode block is already locked by another thread, let the another
thread initialize it.  If another thread raced with us after we
started writing inode block, the situation is detected by an update of
cg_initediblk.  Note that double-initialization of the inode block is
harmless, the block cannot be used until cg_initediblk is incremented.

Sponsored by: The FreeBSD Foundation
In collaboration with: pho
Reviewed by: mckusick
MFC after: 1 month
X-MFC-note: after r246877

11 years agoClear the memory allocated to build the unwind tables. This fixes C++
Andrew Turner [Wed, 27 Feb 2013 06:53:15 +0000 (06:53 +0000)]
Clear the memory allocated to build the unwind tables. This fixes C++
exceptions on ARM EABI with static binaries.

11 years agoRX checksum offloading on old Yukon controllers seem to cause more
Pyun YongHyeon [Wed, 27 Feb 2013 05:03:35 +0000 (05:03 +0000)]
RX checksum offloading on old Yukon controllers seem to cause more
problems.  Disable RX checksum offloading on controllers that don't
use new descriptor format but give chance to enable it with
ifconfig(8).

11 years agoI give up - just throw the EWMA update into the normal update_stats()
Adrian Chadd [Wed, 27 Feb 2013 04:33:06 +0000 (04:33 +0000)]
I give up - just throw the EWMA update into the normal update_stats()
routine.

There were still corner cases where the EWMA update stats are being
called on a rix which didn't have an intermediary stats update; thus
no packets were counted against it.  Sigh.

This should fix the crashes I've been seeing on recent -HEAD.

11 years agoFix typo in EFI GPT GUID.
Benno Rice [Wed, 27 Feb 2013 03:43:16 +0000 (03:43 +0000)]
Fix typo in EFI GPT GUID.

11 years agoFixes queuing issues where mfi_release_command blindly sets the cm_flags = 0
Steven Hartland [Wed, 27 Feb 2013 02:21:10 +0000 (02:21 +0000)]
Fixes queuing issues where mfi_release_command blindly sets the cm_flags = 0
without first removing the command from the relavent queue.

This was causing panics in the queue functions which check to ensure a command
is not on another queue.

Fixed some cases where the error from mfi_mapcmd was lost and where the command
was never released / dequeued in error cases.

Ensure that all failures to mfi_mapcmd are logged.

Fixed possible null pointer exception in mfi_aen_setup if mfi_get_log_state
failed.

Fixed mfi_parse_entries & mfi_aen_setup not returning possible errors.

Corrected MFI_DUMP_CMDS calls with invalid vars SC vs sc.

Commands which have timed out now set cm_error to ETIMEDOUT and call
mfi_complete which prevents them getting stuck in the busy queue forever.

Fixed possible use of NULL pointer in mfi_tbolt_get_cmd.

Changed output formats to be more easily recognisable when debugging.

Optimised mfi_cmd_pool_tbolt cleanup.

Made information about driver limiting commands always display as for modern
cards this can be severe.

Fixed mfi_tbolt_alloc_cmd out of memory case which previously didnt return an
error.

Added malloc checks for request_desc_pool including free when subsiquent errors
are detected.

Fixed overflow error in SIMD reply descriptor check.

Fixed tbolt_cmd leak in mfi_build_and_issue_cmd if there's an error during IO
build.

Elimintated double checks on sc->mfi_aen_cm & sc->mfi_map_sync_cm in
mfi_shutdown.

Move local hdr calculation after error check in mfi_aen_complete.

Fixed wakeup on NULL in mfi_aen_complete.

Fixed mfi_aen_cm cleanup in mfi_process_fw_state_chg_isr not checking if it was
NULL.

Changed mfi_alloc_commands to error if bus_dmamap_create fails. Previously we
would try to continue with the number of allocated commands but lots of places
in the driver assume sc->mfi_max_fw_cmds is whats available so its unsafe to do
this without lots of changes.

Removed mfi_total_cmds as its no longer used due the above change.

Corrected mfi_tbolt_alloc_cmd to return ENOMEM where appropriate.

Fixed timeouts actually firing at double what they should.

Setting hw.mfi.max_cmds=-1 now configures to use the controller max.

A few style (9) fixes e.g. braced single line conditions and double blank lines

Cleaned up queuing macros

Removed invalid queuing tests for multiple queues

Trap and deal with errors when doing sends in mfi_data_cb

Refactored frame sending into one method with error checking of the return
code so we can ensure commands aren't left on the queue after error. This
ensures that mfi_mapcmd & mfi_data_cb leave the queue in a valid state.

Refactored how commands are cleaned up, mfi_release_command now ensures
that all queues and command state is maintained in a consistent state.

Prevent NULL pointer use in mfi_tbolt_complete_cmd

Fixed use of NULL sc->mfi_map_sync_cm in wakeup

Added defines to help with output of mfi_cmd and header flags.

Fixed mfi_tbolt_init_MFI_queue invalidating cm_index of the acquired mfi_cmd.

Reset now reinitialises sync map as well as AEN.

Fixed possible use of NULL pointer in mfi_build_and_issue_cmd

Fixed mfi_tbolt_init_MFI_queue call to mfi_process_fw_state_chg_isr causing
panic on failure.

Ensure that tbolt cards always initialise next_host_reply_index and
free_host_reply_index (based off mfi_max_fw_cmds) on both startup and
reset as per the linux driver.

Fixed mfi_tbolt_complete_cmd not acknowledging unknown commands so
it didn't clear the controller.

Prevent locks from being dropped and re-acquired in the following functions
which was allowing multiple threads to enter critical methods such as
mfi_tbolt_complete_cmd & mfi_process_fw_state_chg_isr:-
* mfi_tbolt_init_MFI_queue
* mfi_aen_complete / mfi_aen_register
* mfi_tbolt_sync_map_info
* mfi_get_log_state
* mfi_parse_entries

The locking for these functions was promoting to higher level methods. This
also fixed MFI_LINUX_SET_AEN_2 which was already acquiring the lock, so would
have paniced for recursive lock.

This also required changing malloc of ld_sync in mfi_tbolt_sync_map_info to
M_NOWAIT which can hence now fail but this was already expected as its return
was being tested.

Removed the assignment of cm_index in mfi_tbolt_init_MFI_queue which breaks
the world if the cmd returned by mfi_dequeue_free isn't the first cmd.

Fixed locking in mfi_data_cb, this is an async callback from bus_dmamap_load
which could hence be called after the caller has dropped the lock. If we
don't have the lock we aquire it and ensure we unlock before returning.

Fixed locking mfi_comms_init when mfi_dequeue_free fails.

Fixed mfi_build_and_issue_cmd not returning tbolt cmds aquired to the pool
on error.

Fixed mfi_abort not dropping the io lock when mfi_dequeue_free fails.

Added hw.mfi.polled_cmd_timeout sysctl that enables tuning of polled
timeouts. This shouldn't be reduced below 50 seconds as its used for
firmware patching which can take quite some time.

Added hw.mfi.fw_reset_test sysctl which is avaliable when compiled with
MFI_DEBUG and allows the testing of controller reset that was provoking a
large number of the issues encountered here.

Reviewed by: Doug Ambrisko
Approved by: pjd (mentor)
MFC after: 1 month

11 years agoEnable STBC for the given rate series if it's negotiated:
Adrian Chadd [Wed, 27 Feb 2013 00:49:32 +0000 (00:49 +0000)]
Enable STBC for the given rate series if it's negotiated:

* If both ends have negotiated (at least) one stream;
* Only if it's a single stream rate (MCS0-7);
* Only if there's more than one TX chain enabled.

Tested:

* AR9280 STA mode -> Atheros AP; tested both MCS2 (STBC) and MCS12 (no STBC.)
  Verified using athalq to inspect the TX descriptors.

TODO:

* Test AR5416 - no STBC should be enabled;
* Test AR9280 with one TX chain enabled - no STBC should be enabled.

11 years agoFixes mfi panic on recused on non-recusive mutex MFI I/O lock
Steven Hartland [Wed, 27 Feb 2013 00:35:40 +0000 (00:35 +0000)]
Fixes mfi panic on recused on non-recusive mutex MFI I/O lock

Removes a mtx_unlock call for mfi_io_lock which is never aquired

While I'm here fix a braceing style issue.

Reviewed by: Doug Ambrisko
Approved by: pjd (mentor)
MFC after: 1 month

11 years agoAdd in the STBC TX/RX capability support into the HAL and driver.
Adrian Chadd [Wed, 27 Feb 2013 00:25:44 +0000 (00:25 +0000)]
Add in the STBC TX/RX capability support into the HAL and driver.

The HAL already included the STBC fields; it just needed to be exposed
to the driver and net80211 stack.

This should allow single-stream STBC TX and RX to be negotiated; however
the driver and rate control code currently don't do anything with it.

11 years agoMerge from vmc-playground branch:
Attilio Rao [Tue, 26 Feb 2013 23:35:27 +0000 (23:35 +0000)]
Merge from vmc-playground branch:
Replace the sub-optimal uma_zone_set_obj() primitive with more modern
uma_zone_reserve_kva().  The new primitive reserves before hand
the necessary KVA space to cater the zone allocations and allocates pages
with ALLOC_NOOBJ.  More specifically:
- uma_zone_reserve_kva() does not need an object to cater the backend
  allocator.
- uma_zone_reserve_kva() can cater M_WAITOK requests, in order to
  serve zones which need to do uma_prealloc() too.
- When possible, uma_zone_reserve_kva() uses directly the direct-mapping
  by uma_small_alloc() rather than relying on the KVA / offset
  combination.

The removal of the object attribute allows 2 further changes:
1) _vm_object_allocate() becomes static within vm_object.c
2) VM_OBJECT_LOCK_INIT() is removed.  This function is replaced by
   direct calls to mtx_init() as there is no need to export it anymore
   and the calls aren't either homogeneous anymore: there are now small
   differences between arguments passed to mtx_init().

Sponsored by: EMC / Isilon storage division
Reviewed by: alc (which also offered almost all the comments)
Tested by: pho, jhb, davide

11 years agoClarify that overriding the -h/-D flags through flags in device.hints
Nick Hibma [Tue, 26 Feb 2013 23:18:35 +0000 (23:18 +0000)]
Clarify that overriding the -h/-D flags through flags in device.hints
only works for sio(4) but not for uart(4) which no longer has this flag.

11 years agoRemove redundant xpt_alloc_ccb in isp_target_thread that was causing leakage.
Matt Jacob [Tue, 26 Feb 2013 21:37:12 +0000 (21:37 +0000)]
Remove redundant xpt_alloc_ccb in isp_target_thread that was causing leakage.

Pointed out by: Sascha Wildner of DragonFly BSD
MFC after: 1 week