]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMFC
attilio [Tue, 26 Feb 2013 17:33:18 +0000 (17:33 +0000)]
MFC

11 years agoAs VM_OBJECT_SLEEP() is a vm_object_t specific function, make
attilio [Tue, 26 Feb 2013 01:38:12 +0000 (01:38 +0000)]
As VM_OBJECT_SLEEP() is a vm_object_t specific function, make
the passed object as the first argument of the function for consistency.

Sponsored by: EMC / Isilon storage revision

11 years agoMFC
attilio [Tue, 26 Feb 2013 01:05:25 +0000 (01:05 +0000)]
MFC

11 years agoMerge from vmobj-rwlock branch:
attilio [Tue, 26 Feb 2013 01:00:11 +0000 (01:00 +0000)]
Merge from vmobj-rwlock branch:
Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h.

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

11 years agoUpdate base system libexpat to 2.1.0.
delphij [Tue, 26 Feb 2013 00:58:44 +0000 (00:58 +0000)]
Update base system libexpat to 2.1.0.

MFC after: 3 days

11 years agoVendor import of expat 2.1.0 (trimmed).
delphij [Tue, 26 Feb 2013 00:43:01 +0000 (00:43 +0000)]
Vendor import of expat 2.1.0 (trimmed).

11 years agocxgbe(4): Ask the card's firmware to pad up tiny CPLs by encapsulating
np [Tue, 26 Feb 2013 00:27:27 +0000 (00:27 +0000)]
cxgbe(4): Ask the card's firmware to pad up tiny CPLs by encapsulating
them in a firmware message if it is able to do so.  This works out
better for one of the FIFOs in the chip.

MFC after: 5 days

11 years agocxgbe(4): Update firmware to 1.8.4.0.
np [Tue, 26 Feb 2013 00:10:28 +0000 (00:10 +0000)]
cxgbe(4): Update firmware to 1.8.4.0.

MFC after: 5 days

11 years agoPart #2 of the TX chainmask changes:
adrian [Mon, 25 Feb 2013 22:45:02 +0000 (22:45 +0000)]
Part #2 of the TX chainmask changes:

* Remove ar5416UpdateChainmasks();
* Remove the TX chainmask override code from the ar5416 TX descriptor
  setup routines;
* Write a driver method to calculate the current chainmask based on the
  operating mode and update the driver state;
* Call the HAL chainmask method before calling ath_hal_reset();
* Use the currently configured chainmask in the TX descriptors rather than
  the hardware TX chainmasks.

Tested:

* AR5416, STA/AP mode - legacy and 11n modes

11 years agoBegin adding support to explicitly set the current chainmask.
adrian [Mon, 25 Feb 2013 22:42:43 +0000 (22:42 +0000)]
Begin adding support to explicitly set the current chainmask.

Right now the only way to set the chainmask is to set the hardware
configured chainmask through capabilities.  This is fine for forcing
the chainmask to be something other than what the hardware is capable
of (eg to reduce TX/RX to one connected antenna) but it does change what
the HAL hardware chainmask configuration is.

For operational mode changes, it (may?) make sense to separately control
the TX/RX chainmask.

Right now it's done as part of ar5416_reset.c - ar5416UpdateChainMasks()
calculates which TX/RX chainmasks to enable based on the operating mode.
(1 for legacy and whatever is supported for 11n operation.)  But doing
this in the HAL is suboptimal - the driver needs to know the currently
configured chainmask in order to correctly enable things for each
TX descriptor.  This is currently done by overriding the chainmask
config in the ar5416 TX routines but this has to disappear - the AR9300
HAL support requires the driver to dynamically set the TX chainmask based
on the TX power and TX rate in order to meet mini-PCIe slot power
requirements.

So:

* Introduce a new HAL method to set the operational chainmask variables;
* Introduce null methods for the previous generation chipsets;
* Add new driver state to record the current chainmask separate from
  the hardware configured chainmask.

Part #2 of this will involve disabling ar5416UpdateChainMasks() and moving
it into the driver; as well as properly programming the TX chainmask
based on the currently configured HAL chainmask.

Tested:

* AR5416, STA mode - both legacy (11a/11bg) and 11n rates - verified
  that AR_SELFGEN_MASK (the chainmask used for self-generated frames like
  ACKs and RTSes) is correct, as well as the TX descriptor contents is
  correct.

11 years agoIn all situations where we need to bootstrap yacc, we also need to
des [Mon, 25 Feb 2013 22:25:56 +0000 (22:25 +0000)]
In all situations where we need to bootstrap yacc, we also need to
bootstrap liby.  This was not readily apparent, because a normal 'make
buildworld' or 'make toolchain' builds liby before building anything
that uses yacc.  However, 'make kernel-toolchain' does not build
headers or libraries, so it was not possible to build a kernel from
head on, say, stable/9 without first building the complete toolchain.

MFC after: 1 week

11 years agoStyle.
pjd [Mon, 25 Feb 2013 20:51:29 +0000 (20:51 +0000)]
Style.

Suggested by: kib

11 years agoAfter r237012, the fdgrowtable() doesn't drop the filedesc lock anymore,
pjd [Mon, 25 Feb 2013 20:50:08 +0000 (20:50 +0000)]
After r237012, the fdgrowtable() doesn't drop the filedesc lock anymore,
so update a stale comment.

Reviewed by: kib, keramida

11 years agoGet rid of unused struct member.
neel [Mon, 25 Feb 2013 20:31:47 +0000 (20:31 +0000)]
Get rid of unused struct member.

Pointed out by: Gopakumar T
Obtained from: NetApp

11 years agoAdd i/o error counters to hastd(8) and make hastctl(8) display
trociny [Mon, 25 Feb 2013 20:09:07 +0000 (20:09 +0000)]
Add i/o error counters to hastd(8) and make hastctl(8) display
them.  This may be useful for detecting problems with HAST disks.

Discussed with and reviewed by: pjd
MFC after: 1 week

11 years agoImport media selection/preparation framework (sysinstall inspired). Makes
dteske [Mon, 25 Feb 2013 19:55:32 +0000 (19:55 +0000)]
Import media selection/preparation framework (sysinstall inspired). Makes
accessing files from various types of media nice and abstracted away from
the wet-work involved in preparing, validating, and initializing those
types of media. This will be used for the package management system module
and other modules that need access to files and want to allow the user to
decide where those files come from (either in a scripted fashion, prompted
fashion, or any combination thereof).

Heavily inspired by sysinstall and even uses the same reserved words so
that scripts are portable. Coded over months, tested continuously through-
out, and reviewed several times.

Some notes about the changes:
- Move network-setting acquisition/validation routines to media/tcpip.subr
- The options screen from sysinstall has been converted to a dialog menu
- The "UFS" media choice is renamed to "Directory" to reflect how sysinstall
  treats the choice and a new [true] "UFS" media choice has been added that
  acts on real UFS partitions (such as external disks with disklabels).
- Many more help files have been resurrected from sysinstall (I noticed that
  some of the content seems a bit dated; I gave them a once-over but they
  could really use an update).
- A total of 10 media choices are presented (via mediaGetType) including:
  CD/DVD, FTP, FTP Passive, HTTP Proxy, Directory, NFS, DOS, UFS, Floppy, USB
- Novel struct/device management layer for managing the issue of passing
  more information than can comfortably fit in an argument list.

11 years agoThe 5300 series ciss(4) board does not work in performant mode with our
sbruno [Mon, 25 Feb 2013 19:22:56 +0000 (19:22 +0000)]
The 5300 series ciss(4) board does not work in performant mode with our
currnet initialization sequence.  Set it to simple mode only so that
systems can be updated from stable/7 to newer installations.

At some point, we should figure out why we cannot initialize performant
mode on this board.

PR: kern/153361
Reviewed by: scottl
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoFix typo and update copyright.
dteske [Mon, 25 Feb 2013 19:14:06 +0000 (19:14 +0000)]
Fix typo and update copyright.

11 years agoEnhance test(1) by adding provision to compare any combination of the
peterj [Mon, 25 Feb 2013 19:05:40 +0000 (19:05 +0000)]
Enhance test(1) by adding provision to compare any combination of the
access, birth, change and modify times of two files, instead of only
being able to compare modify times.  The builtin test in sh(1) will
automagically acquire the same expansion.

Approved by: grog
MFC after: 2 weeks

11 years agoRemove EOL whitespace.
joel [Mon, 25 Feb 2013 17:32:10 +0000 (17:32 +0000)]
Remove EOL whitespace.

11 years agoIf rtadvd_interfaces is set to "none", start rtadvd without listing
des [Mon, 25 Feb 2013 17:07:42 +0000 (17:07 +0000)]
If rtadvd_interfaces is set to "none", start rtadvd without listing
any interfaces on the command line.

MFC after: 1 week

11 years ago- Implement and use usage().
des [Mon, 25 Feb 2013 16:47:09 +0000 (16:47 +0000)]
- Implement and use usage().
- Document the -C option.
- Allow rtadvd to be invoked without any interfaces on the command line,
  and document that possibility.

MFC after: 1 week

11 years agoFix ARM build by assigning the computed time here to
kientzle [Mon, 25 Feb 2013 16:25:38 +0000 (16:25 +0000)]
Fix ARM build by assigning the computed time here to
a variable of the right type for printf.

11 years agoSeveral cleanups and fixes to mxge:
gallatin [Mon, 25 Feb 2013 16:22:40 +0000 (16:22 +0000)]
Several cleanups and fixes to mxge:

- Remove vestigial null pointer tests after malloc(..., M_WAITOK).

- Remove vestigal qualhack union

- Use strlcpy() instead of the error-prone strncpy() when parsing
  EEPROM and copying strings

- Check the MAC address in the EEPROM strings more strictly.

- Expand the macro MXGE_NEXT_STRING() at its only user. Due to a typo,
  the macro was very confusing.

- Remove unnecessary buffer limit check.  The buffer is double-NUL
  terminated per construction.

PR: kern/176369
Submitted by: Christoph Mallon <christoph.mallon gmx.de>

11 years agoDon't try and negotiate sync mode if either period or offset are zero.
mjacob [Mon, 25 Feb 2013 14:06:24 +0000 (14:06 +0000)]
Don't try and negotiate sync mode if either period or offset are zero.

PR: kern/163064
Partially Submitted by: Peter <pmc@citylink.dinoex.sub.org>
MFC after: 1 month

11 years agoMFV v242732:
mm [Mon, 25 Feb 2013 12:33:31 +0000 (12:33 +0000)]
MFV v242732:

Merge the ZFS I/O deadman thread from vendor (illumos).
This feature panics the system on hanging ZFS I/O, helps debugging
and resumes failed service.

The panic behavior can be controlled with the loader-only tunables:
vfs.zfs.deadman_enabled (enable or disable panic on stalled ZFS I/O)
vfs.zfs.deadman_synctime (expiration time for stalled ZFS I/O)

By default, ZFS I/O deadman is enabled by default on amd64 and i386
excluding virtual guest machines.

Illumos ZFS issues:
  3246 ZFS I/O deadman thread

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

MFC after: 2 weeks

11 years agoTurn off fast posting for the ISP2100- I'd forgotten that it actually
mjacob [Mon, 25 Feb 2013 11:22:54 +0000 (11:22 +0000)]
Turn off fast posting for the ISP2100- I'd forgotten that it actually
might have been enabled for them- now that we use all 32 bits of handle.
Fast Posting doesn't pass the full 32 bits.

Noticed by: Bugs in NetBSD. Only a NetBSD user might actually still use such old hardware.
MFC after: 1 week

11 years agoFix init/uninit function type.
hselasky [Mon, 25 Feb 2013 10:57:35 +0000 (10:57 +0000)]
Fix init/uninit function type.

11 years agoFix off-by-one error in sanity checks
gonzo [Mon, 25 Feb 2013 09:33:48 +0000 (09:33 +0000)]
Fix off-by-one error in sanity checks

11 years agoAdd new USB ID.
hselasky [Mon, 25 Feb 2013 08:24:21 +0000 (08:24 +0000)]
Add new USB ID.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

11 years ago- Fix off-by-one error when returning max pin number
gonzo [Mon, 25 Feb 2013 08:04:47 +0000 (08:04 +0000)]
- Fix off-by-one error when returning max pin number
- Fix GPIOGET for output pins. Requesting state for
    output pin is valid operation, get the state from
    TI_GPIO_DATAOUTX register

11 years agokernacc() expects all KVAs to be covered in the kernel map. With the
marcel [Mon, 25 Feb 2013 02:41:38 +0000 (02:41 +0000)]
kernacc() expects all KVAs to be covered in the kernel map. With the
introduction of the PBVM, this stopped being the case. Redefine the
VM parameters so that the PBVM is included in the kernel map. In
particular this introduces VM_INIT_KERNEL_ADDRESS to point to the base
of region 5 now that VM_MIN_KERNEL_ADDRESS points to the base of
region 4 to include the PBVM.
While here define KERNBASE to the actual link address of the kernel as
is intended.

PR: 169926

11 years agoFix the bug I introduced in r247045.
kientzle [Mon, 25 Feb 2013 01:50:04 +0000 (01:50 +0000)]
Fix the bug I introduced in r247045.
After digging through more carefully, it looks like there's
no real need to have the DTB in the module directory.
So we can simplify a lot:  Just copy DTB into local heap
for "fdt addr" and U-Boot integration, drop all the extra
COPYIN() calls.

I've left one final COPYIN() to update the in-kernel DTB
for consistency with how this code used to work, but I'm
no longer convinced it's appropriate here.

I've also remove the mem_load_raw() utility that I added
to boot/common/module.c with r247045 since it's no longer
necessary.

11 years agolibc/opendir: Improve behaviour of union uniquifier:
jilles [Sun, 24 Feb 2013 20:53:32 +0000 (20:53 +0000)]
libc/opendir: Improve behaviour of union uniquifier:

* Reopen the directory using openat(fd, ".", ...) instead of opening the
  pathname again. This fixes a race condition where the meaning of the
  pathname changes and allows a reopen with fdopendir().
* Always reopen the directory for union stacks, not only when DTF_REWIND
  is passed. Applications should be able to fchdir(dirfd(dir)) and
  *at(dirfd(dir), ...). DTF_REWIND now does nothing.

11 years agoCatch up with internal API changes for initbarea() and getdatablk()
pluknet [Sun, 24 Feb 2013 19:32:43 +0000 (19:32 +0000)]
Catch up with internal API changes for initbarea() and getdatablk()
of fsck_ffs introduced with r247212.

Submitted by: David Wolfskill <david@catwhisker.org>

11 years agoMFC
attilio [Sun, 24 Feb 2013 17:20:53 +0000 (17:20 +0000)]
MFC

11 years agoMerge part of r1712 from elftoolchain, making it possible to resize ELF
markj [Sun, 24 Feb 2013 15:15:50 +0000 (15:15 +0000)]
Merge part of r1712 from elftoolchain, making it possible to resize ELF
sections and indirectly change the layout of an ELF file when
ELF_F_LAYOUT is not set.

PR: bin/167103
Approved by: rstone (co-mentor)
Obtained from: elftoolchain
MFC after: 2 weeks

11 years agoWhen running with the -d option, instrument fsck_ffs to track the number,
mckusick [Sun, 24 Feb 2013 06:44:29 +0000 (06:44 +0000)]
When running with the -d option, instrument fsck_ffs to track the number,
data type, and running time of its I/O operations.

No functional changes.

11 years ago- Move dma, sdhci and mbox nodes down in dts in order to get them
gonzo [Sat, 23 Feb 2013 23:22:48 +0000 (23:22 +0000)]
- Move dma, sdhci and mbox nodes down in dts in order to get them
    initialized after FPIO controller since they might rely on GPIO
    functionality

- Update interrupts property of dma node to contain all allocated
    interrupts

11 years agoBump per-device interrupt limit to more reasonable default.
gonzo [Sat, 23 Feb 2013 22:58:04 +0000 (22:58 +0000)]
Bump per-device interrupt limit to more reasonable default.

Some hardware like DMA and GPIO controllers might require
more then 8 interrupts per device instance.

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Discussed with: gber@, raj@

11 years agosh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.
jilles [Sat, 23 Feb 2013 22:50:57 +0000 (22:50 +0000)]
sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.

11 years agoPull in r175962 from upstream llvm trunk:
dim [Sat, 23 Feb 2013 22:48:12 +0000 (22:48 +0000)]
Pull in r175962 from upstream llvm trunk:

  X86: Disable cmov-memory patterns on subtargets without cmov.

  Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher.  Since our default CPU is i486, cmov
instructions will now be disabled by default.

MFC after: 1 week

11 years agoAdd macroses to properly map IO peripherals memory window from
gonzo [Sat, 23 Feb 2013 22:46:26 +0000 (22:46 +0000)]
Add macroses to properly map IO peripherals memory window from
    ARM physical memory address space to VideoCore address space

11 years ago"fdt addr" gets run from loader.rc before the kernel is loaded.
kientzle [Sat, 23 Feb 2013 20:34:47 +0000 (20:34 +0000)]
"fdt addr" gets run from loader.rc before the kernel is loaded.
This was broken by r247045 which tried to copy the FDT into the
module directory immediately.
Instead, store the address and arrange for the FDT to get
copied into the module directory later when the usual
FDT initialization runs.

11 years agoPrint kernel args as late as possible before jumping into kernel.
kientzle [Sat, 23 Feb 2013 20:27:03 +0000 (20:27 +0000)]
Print kernel args as late as possible before jumping into kernel.

11 years agoEnable PREEMPTION by default now that PR 147501 has been fixed.
marcel [Sat, 23 Feb 2013 19:27:53 +0000 (19:27 +0000)]
Enable PREEMPTION by default now that PR 147501 has been fixed.

11 years agoAdd basic and not very reliable protection against going to sleep with
mav [Sat, 23 Feb 2013 18:32:42 +0000 (18:32 +0000)]
Add basic and not very reliable protection against going to sleep with
thread scheduled by interrupt fired after we entered critical section.
None of cpu_sleep() implementations on ARM check sched_runnable() now, so
put the first line of defence here.  This mostly fixes unexpectedly long
sleeps in synthetic tests of calloutng code and probably other situations.

11 years agoMFC
attilio [Sat, 23 Feb 2013 16:01:03 +0000 (16:01 +0000)]
MFC

11 years agoChange the use of hard functions for vm_pager_ok and switch to
attilio [Sat, 23 Feb 2013 15:50:28 +0000 (15:50 +0000)]
Change the use of hard functions for vm_pager_ok and switch to
const variables.

Sponsored by: EMC / Isilon storage division
Reported by: pjd

11 years agosh: Test that the exit status is 1 if read encounters EOF.
jilles [Sat, 23 Feb 2013 15:15:41 +0000 (15:15 +0000)]
sh: Test that the exit status is 1 if read encounters EOF.

11 years agoNow that qsort(3) has a sample comparison function, point to that
keramida [Sat, 23 Feb 2013 12:31:52 +0000 (12:31 +0000)]
Now that qsort(3) has a sample comparison function, point to that
example from bsearch(3) too, so that we don't have to duplicate
the example code in both places.

PR: docs/176197
Reviewed by: stefanf
Approved by: remko (mentor), gjb (mentor)
MFC after: 1 week

11 years agoMFV r246653:
mm [Sat, 23 Feb 2013 11:21:05 +0000 (11:21 +0000)]
MFV r246653:
Import vendor change to avoid "unitialized variable" warnings.

Illumos ZFS issues:
  3522 zfs module should not allow uninitialized variables

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

11 years agoPull in r172354 from upstream clang trunk:
dim [Fri, 22 Feb 2013 22:40:10 +0000 (22:40 +0000)]
Pull in r172354 from upstream clang trunk:

  Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
  flag information down from the Clang driver into the Gold linker plugin
  for LTO. This allows specifying -march on the linker commandline and
  should hopefully have it pass all the way through to the LTO optimizer.

  Fixes PR14697.

Pull in r175919 from upstream clang trunk:

  Driver: Pass down the -march setting down to -cc1as on x86 too.

  The assembler historically didn't make use of any target features, but this has
  changed when support for old CPUs that don't support long nops was added.

This should fix the long nops that still occurred in crt*.o, and
possibly other object files, if the system was compiled for a CPU that
does not support those, such as Geode.

Note that gcc on i386 also does not pass through any -march, -mcpu or
-mtune setting to gas, but this has not caused any trouble yet, because
gas defaults to i386.

Reported by: lev
MFC after: 1 week

11 years agoFix command timeout caused by data underrun during fetching ATAPI sense
mav [Fri, 22 Feb 2013 21:43:21 +0000 (21:43 +0000)]
Fix command timeout caused by data underrun during fetching ATAPI sense
data, introduced by r246713.  There are two places where ata_request is
filled in ATA_CAM: ata_cam_begin_transaction() and ata_cam_request_sense().
In the first case DMA should be done for addresses from the CCB. In second
case, DMA should be done to the different address, the address of the sense
buffer inside the CCB structure itself.

11 years agoDon't print an empty line for files with no attributes when -q is given for
pjd [Fri, 22 Feb 2013 20:49:50 +0000 (20:49 +0000)]
Don't print an empty line for files with no attributes when -q is given for
lsextattr(8).

11 years agoBack out prev. change preventing /sys/sys symlink. It appears my install
ache [Fri, 22 Feb 2013 19:57:18 +0000 (19:57 +0000)]
Back out prev. change preventing /sys/sys symlink. It appears my install
was not very recent and not acts like 'ln -h'

11 years agoHide SEMB port of the SiI3826 Port Multiplier by default to avoid extra
mav [Fri, 22 Feb 2013 19:53:12 +0000 (19:53 +0000)]
Hide SEMB port of the SiI3826 Port Multiplier by default to avoid extra
errors while it tries to talk via I2C to usually missing external SEP.
There is tunable to enable it back when needed.

11 years agoBump mxge copyright.
gallatin [Fri, 22 Feb 2013 19:23:33 +0000 (19:23 +0000)]
Bump mxge copyright.

Sponsored by: Myricom

MFC After: 7 days

11 years agoImprovements for newer mxge nics:
gallatin [Fri, 22 Feb 2013 19:21:29 +0000 (19:21 +0000)]
Improvements for newer mxge nics:

- Some mxge nics may store the serial number in the SN2 field of the
  EEPROM.  These will also have an SN=0 field, so parse the SN2 field,
  and give it precedence.

- Skip MXGEFW_CMD_UNALIGNED_TEST on mxge nics which do not require it.
  This saves roughly 10ms per port at device attach time.

Sponsored by: Myricom

MFC After: 7 days

11 years agoAdd DA_Q_NO_PREVENT quirk for Kingston DataTraveler G3 1.00 USB flash.
mav [Fri, 22 Feb 2013 17:45:32 +0000 (17:45 +0000)]
Add DA_Q_NO_PREVENT quirk for Kingston DataTraveler G3 1.00 USB flash.

PREVENT ALLOW MEDIUM REMOVAL commands return errors on these devices
without returning sense data. In some cases unrelated following commands
start to return errors too, that makes device to be dropped by CAM.

11 years agoEliminate an unused #define.
alc [Fri, 22 Feb 2013 16:59:52 +0000 (16:59 +0000)]
Eliminate an unused #define.

11 years agoTry harder to make mxge safe for all combinations of INET and INET6
gallatin [Fri, 22 Feb 2013 16:46:28 +0000 (16:46 +0000)]
Try harder to make mxge safe for all combinations of INET and INET6

- Re-fix build by restoring local removed in r247151, but protected
  by #if defined(INET) || defined(INET6) so that the compile
  succeeds in the !(INET||INET6) case.

- Protect call to in_pseudo() with an #ifdef INET, to allow
  a kernel to link with mxge when INET is not compiled in.

- Also remove an errant (improperly commented) obsolete debugging printf

Thanks to Glebius for pointing out the !(INET||INET6) build issue.

Sponsored by: Myricom

MFC After: 7 days

11 years agoFix build.
glebius [Fri, 22 Feb 2013 12:41:24 +0000 (12:41 +0000)]
Fix build.

11 years agoAdd a workaround for AR5416, AR9130 and AR9160 chipsets - work around
adrian [Fri, 22 Feb 2013 07:07:11 +0000 (07:07 +0000)]
Add a workaround for AR5416, AR9130 and AR9160 chipsets - work around
an incorrectly calculated RTS duration value when transmitting aggregates.

These earlier 802.11n NICs incorrectly used the ACK duration time when
calculating what to put in the RTS of an aggregate frame.  Instead it
should have used the block-ack time.  The result is that other stations
may not reserve enough time and start transmitting _over_ the top of
the in-progress blockack field.  Tsk.

This workaround is to popuate the burst duration field with the delta
between the ACK duration the hardware is using and the required duration
for the block-ack.  The result is that the RTS field should now contain
the correct duration for the subsequent block-ack.

This doesn't apply for AR9280 and later NICs.

Obtained from: Qualcomm Atheros

11 years agoAdd the ability to have a 'fallback' search for memory ranges.
grehan [Fri, 22 Feb 2013 00:46:32 +0000 (00:46 +0000)]
Add the ability to have a 'fallback' search for memory ranges.
These set of ranges will be looked at if a standard memory
range isn't found, and won't be installed in the cache.
Use this to implement the memory behaviour of the PCI hole on
x86 systems, where writes are ignored and reads always return -1.
This allows breakpoints to be set when issuing a 'boot -d', which
has the side effect of accessing the PCI hole when changing the
PTE protection on kernel code, since the pmap layer hasn't been
initialized (a bug, but present in existing FreeBSD releases so
has to be handled).

Reviewed by: neel
Obtained from: NetApp

11 years agoDocument VFCF_SBDRY.
pluknet [Thu, 21 Feb 2013 22:21:45 +0000 (22:21 +0000)]
Document VFCF_SBDRY.

Reviewed by: jhb
X-MFC with: r247116

11 years agoMFC
attilio [Thu, 21 Feb 2013 21:59:35 +0000 (21:59 +0000)]
MFC

11 years agoComplete the asserts by definining also assertions for
attilio [Thu, 21 Feb 2013 21:56:51 +0000 (21:56 +0000)]
Complete the asserts by definining also assertions for
RA_RLOCKED and RA_LOCKED cases.

Sponsored by: EMC / Isilon storage division
Requested by: alc

11 years agoHide the details for the assertion for VM_OBJECT_LOCK operations.
attilio [Thu, 21 Feb 2013 21:54:53 +0000 (21:54 +0000)]
Hide the details for the assertion for VM_OBJECT_LOCK operations.
Rename current VM_OBJECT_LOCK_ASSERT(foo, RA_WLOCKED) into
VM_OBJECT_ASSERT_WLOCKED(foo)

Sponsored by: EMC / Isilon storage division
Requested by: alc

11 years agoDisable debugging entries about BAW issues. I haven't seen any issues
adrian [Thu, 21 Feb 2013 21:47:35 +0000 (21:47 +0000)]
Disable debugging entries about BAW issues.  I haven't seen any issues
to do with BAW tracking in the last 9 months or so.

11 years agoReflect CARP media-type departure.
pluknet [Thu, 21 Feb 2013 21:35:09 +0000 (21:35 +0000)]
Reflect CARP media-type departure.

X-MFC after: never

11 years agoImprove mxge's receive performance for IPv6:
gallatin [Thu, 21 Feb 2013 21:28:33 +0000 (21:28 +0000)]
Improve mxge's receive performance for IPv6:

- Add support for IPv6 rx csum offload
- Finally switch mxge from using its own driver lro, to
using tcp_lro

MFC after: 7 days
Sponsored by: Myricom Inc.

11 years agoSeparate items in the list of System values with .Pp to ease readability.
pluknet [Thu, 21 Feb 2013 20:45:19 +0000 (20:45 +0000)]
Separate items in the list of System values with .Pp to ease readability.

11 years agoRemove supposedly unused vm_pager.h.
attilio [Thu, 21 Feb 2013 20:42:51 +0000 (20:42 +0000)]
Remove supposedly unused vm_pager.h.

Sponsored by: EMC / Isilon storage division

11 years agocxgbe(4): Add sysctls to extract debug information from the chip:
np [Thu, 21 Feb 2013 20:13:15 +0000 (20:13 +0000)]
cxgbe(4): Add sysctls to extract debug information from the chip:

dev.t4nex.X.misc.cim_la         logic analyzer dump
dev.t4nex.X.misc.cim_qcfg       queue configuration
dev.t4nex.X.misc.cim_ibq_xxx    inbound queues
dev.t4nex.X.misc.cim_obq_xxx    outbound queues

Obtained from: Chelsio
MFC after: 1 week

11 years agoreorder so all the flags are together and make the PCLMUL flag unique..
jmg [Thu, 21 Feb 2013 19:13:19 +0000 (19:13 +0000)]
reorder so all the flags are together and make the PCLMUL flag unique..

This fixes the problem on amd64 miscompiling mpboot.s causing boot
issues...  We are still using gas for a few files in the kernel...

Submitted by: kib
MFC after: 1 month

11 years agoFurther refine the handling of stop signals in the NFS client. The
jhb [Thu, 21 Feb 2013 19:02:50 +0000 (19:02 +0000)]
Further refine the handling of stop signals in the NFS client.  The
changes in r246417 were incomplete as they did not add explicit calls to
sigdeferstop() around all the places that previously passed SBDRY to
_sleep().  In addition, nfs_getcacheblk() could trigger a write RPC from
getblk() resulting in sigdeferstop() recursing.  Rather than manually
deferring stop signals in specific places, change the VFS_*() and VOP_*()
methods to defer stop signals for filesystems which request this behavior
via a new VFCF_SBDRY flag.  Note that this has to be a VFC flag rather than
a MNTK flag so that it works properly with VFS_MOUNT() when the mount is
not yet fully constructed.  For now, only the NFS clients are set this new
flag in VFS_SET().

A few other related changes:
- Add an assertion to ensure that TDF_SBDRY doesn't leak to userland.
- When a lookup request uses VOP_READLINK() to follow a symlink, mark
  the request as being on behalf of the thread performing the lookup
  (cnp_thread) rather than using a NULL thread pointer.  This causes
  NFS to properly handle signals during this VOP on an interruptible
  mount.

PR: kern/176179
Reported by: Russell Cattelan (sigdeferstop() recursion)
Reviewed by: kib
MFC after: 1 month

11 years agosplsoftvm() is no longer in the tree. gc.
imp [Thu, 21 Feb 2013 17:54:14 +0000 (17:54 +0000)]
splsoftvm() is no longer in the tree. gc.

11 years agobus_dmamap_load_ccb doesn't exist on earlier versions of FreeBSD or
imp [Thu, 21 Feb 2013 17:50:21 +0000 (17:50 +0000)]
bus_dmamap_load_ccb doesn't exist on earlier versions of FreeBSD or
DragonFlyBSD, so it certainly doesn't need splsoftvm(). Remove it.

# I doubt this driver will now compile on older FreeBSD versions or DFBSD
# We should consider unifdefing it since that code seems unmaintained.

11 years agoRemove splsoftclock() since it is now gone.
imp [Thu, 21 Feb 2013 17:40:59 +0000 (17:40 +0000)]
Remove splsoftclock() since it is now gone.

11 years agoFix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
gallatin [Thu, 21 Feb 2013 17:00:35 +0000 (17:00 +0000)]
Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4
checksum is correct. Without this fix, the tcp_lro code will reject
good IPv4 traffic from drivers that do not implement IPv4 header
harder csum offload.

Sponsored by: Myricom Inc.

MFC after: 7 days

11 years agoIn the EXAMPLES section: append the subsystem regular expression with a
pluknet [Thu, 21 Feb 2013 15:41:09 +0000 (15:41 +0000)]
In the EXAMPLES section: append the subsystem regular expression with a
typical interface name pattern as devd(8) uses full string match.

Discussed with: avg, glebius

11 years agoUse critical_enter/critical_exit around the time sensitive part of
imp [Thu, 21 Feb 2013 15:35:48 +0000 (15:35 +0000)]
Use critical_enter/critical_exit around the time sensitive part of
this code to depessimize the worst case we've lived with silently and
uneventfully for the past 12 years. Add a comment about a refinement
for those needing more assurance of accuracy.

Fix ddb's show rtc command deadlock potential when debugging rtc code
by not taking the lock if we're in the debugger. If you need a thumb
to count the number of people that have encountered this, I'd be
surprised.

Submitted by: bde

11 years agoMFC
attilio [Thu, 21 Feb 2013 15:06:19 +0000 (15:06 +0000)]
MFC

11 years agoFix other architectures and ZFS.
attilio [Thu, 21 Feb 2013 15:02:36 +0000 (15:02 +0000)]
Fix other architectures and ZFS.

Sponsored by: EMC / Isilon storage division

11 years agoFix build.
glebius [Thu, 21 Feb 2013 12:52:18 +0000 (12:52 +0000)]
Fix build.

11 years agoFix build.
glebius [Thu, 21 Feb 2013 12:40:52 +0000 (12:40 +0000)]
Fix build.

11 years agoBe slightly more paranoid with the TX DMA buffer maximum threshold.
adrian [Thu, 21 Feb 2013 08:42:40 +0000 (08:42 +0000)]
Be slightly more paranoid with the TX DMA buffer maximum threshold.

Specifically - never jack the TX FIFO threshold up to the absolute
maximum; always leave enough space for two DMA transactions to
appear.

This is a paranoia from the Linux ath9k driver.  It can't hurt.

Obtained from: Linux ath9k

11 years agoRemove incorrect comment about splsoftclock.
imp [Thu, 21 Feb 2013 07:19:50 +0000 (07:19 +0000)]
Remove incorrect comment about splsoftclock.

11 years agoLocking for todr got pushed down into inittodr and the client
imp [Thu, 21 Feb 2013 07:16:40 +0000 (07:16 +0000)]
Locking for todr got pushed down into inittodr and the client
libraries it calls (although some might not be doing it right). We are
serialized right now by giant as well. This means the splsoftclock are
now an anachronism that has no benefit, even marking where locking
needs to happen. Remove them.

11 years agoAdd an option to allow the minimum number of delimiters to be tweaked.
adrian [Thu, 21 Feb 2013 06:38:49 +0000 (06:38 +0000)]
Add an option to allow the minimum number of delimiters to be tweaked.

This is primarily for debugging purposes.

Tested:

* AR5416, STA mode

11 years agoCorrect comment about use of pmtimer, and the real reason it isn't
imp [Thu, 21 Feb 2013 06:38:24 +0000 (06:38 +0000)]
Correct comment about use of pmtimer, and the real reason it isn't
used or desirable for amd64.

11 years agoAdd a new option to limit the maximum size of aggregates.
adrian [Thu, 21 Feb 2013 06:18:40 +0000 (06:18 +0000)]
Add a new option to limit the maximum size of aggregates.
The default is to limit them to what the hardware is capable of.

Add sysctl twiddles for both the non-RTS and RTS protected aggregate
generation.

Whilst here, add some comments about stuff that I've discovered during
my exploration of the TX aggregate / delimiter setup path from the
reference driver.

11 years agoRemove this unneeded printf(), sorry!
adrian [Thu, 21 Feb 2013 02:52:13 +0000 (02:52 +0000)]
Remove this unneeded printf(), sorry!

11 years agoThe request queue is already locked, so we don't need the splsofclock/splx
imp [Thu, 21 Feb 2013 02:43:44 +0000 (02:43 +0000)]
The request queue is already locked, so we don't need the splsofclock/splx
here to note future work.

11 years agoDon't worry if a module is already loaded when looking for a fstype to mount
jamie [Thu, 21 Feb 2013 02:41:37 +0000 (02:41 +0000)]
Don't worry if a module is already loaded when looking for a fstype to mount
(possible in a race condition).

Reviewed by: kib
MFC after: 1 week

11 years agoMost other giant locked storage drivers in the tree don't use
imp [Thu, 21 Feb 2013 02:40:20 +0000 (02:40 +0000)]
Most other giant locked storage drivers in the tree don't use
splsoftclock to note the need for future locking, so remove it from
here.

11 years agoThe other giant locked storage drivers have removed splbio(), for the
imp [Thu, 21 Feb 2013 02:34:04 +0000 (02:34 +0000)]
The other giant locked storage drivers have removed splbio(), for the
most part, so remove it here too. Anybody locking this driver will need
far more than locks where splbio() were, so remove these nops.

11 years agoFix broken usage of splhigh() by removing it.
imp [Thu, 21 Feb 2013 00:40:08 +0000 (00:40 +0000)]
Fix broken usage of splhigh() by removing it.

11 years agoKill now-bogus splhigh() -- it is a nop
imp [Thu, 21 Feb 2013 00:36:12 +0000 (00:36 +0000)]
Kill now-bogus splhigh() -- it is a nop