]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years ago- Trim an unused and bogus Makefile for mount_smbfs.
Davide Italiano [Fri, 28 Jun 2013 21:00:08 +0000 (21:00 +0000)]
- Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.

11 years agoProperly use v_data field. This magically worked (even if wrong) until
Davide Italiano [Fri, 28 Jun 2013 20:32:48 +0000 (20:32 +0000)]
Properly use v_data field. This magically worked (even if wrong) until
now because v_data is the first field of the structure, but it's not
something we should rely on.

11 years agoRemove a reference to LK_DRAIN now that lockmgr(9) is gone from this
Davide Italiano [Fri, 28 Jun 2013 20:21:13 +0000 (20:21 +0000)]
Remove a reference to LK_DRAIN now that lockmgr(9) is gone from this
piece of code.

Reported by: attilio

11 years agoGarbage collect an useless check. smp should be never NULL.
Davide Italiano [Fri, 28 Jun 2013 20:14:30 +0000 (20:14 +0000)]
Garbage collect an useless check. smp should be never NULL.

11 years agoPlug a couple of leakages in smbfs_lookup().
Davide Italiano [Fri, 28 Jun 2013 20:07:24 +0000 (20:07 +0000)]
Plug a couple of leakages in smbfs_lookup().

11 years agoRemove duplicate NULL check in kern_proc_filedesc_out.
Mateusz Guzik [Fri, 28 Jun 2013 18:32:46 +0000 (18:32 +0000)]
Remove duplicate NULL check in kern_proc_filedesc_out.
No functional changes.

MFC after: 1 week

11 years agoRework r252313:
Mikolaj Golub [Fri, 28 Jun 2013 18:07:41 +0000 (18:07 +0000)]
Rework r252313:

The filedesc lock may not be dropped unconditionally before exporting
fd to sbuf: fd might go away during execution.  While it is ok for
DTYPE_VNODE and DTYPE_FIFO because the export is from a vrefed vnode
here, for other types it is unsafe.

Instead, drop the lock in export_fd_to_sb(), after preparing data in
memory and before writing to sbuf.

Spotted by: mjg
Suggested by: kib
Review by: kib
MFC after: 1 week

11 years agosysconf(3) returns a long, not an int.
David E. O'Brien [Fri, 28 Jun 2013 17:18:28 +0000 (17:18 +0000)]
sysconf(3) returns a long, not an int.

11 years agoMake a pass over this page to correct and clarify a few things as well as
John Baldwin [Fri, 28 Jun 2013 16:33:45 +0000 (16:33 +0000)]
Make a pass over this page to correct and clarify a few things as well as
some general word-smithing.
- Don't claim that adaptive mutexes have a timeout (they don't).
- Don't treat pool mutexes as a separate primitive in a few places.
- Describe sleepable read-mostly locks as a separate lock type and add
  them to the various tables.
- Don't claim that sx locks are less efficient.  That hasn't been true in
  a few years now.
- Describe lockmanager locks next to sx locks since they are very similar
  in terms of rules, etc., and so that all the lock primitives are
  grouped together before the non-lock primitives.
- Similarly, move the section on Giant after the description of all the
  non-lock primitives to preserve grouping.
- Condition variables work on several types of locks, not just mutexes.
- Add a bit of language to compare/contrast condition variables with
  sleep/wakeup.
- Add a note about why pause(9) is unique.
- Add some language to define bounded vs unbounded sleeps and explain
  why they are treated separately (bounded sleeps only need CPU time
  to make forward progress).
- Don't state that using mtx_sleep() is a bad idea.  It is in fact rather
  necessary.
- Rework the interaction table a bit.  First, it did not include really
  include sleepable rmlocks and it left out lockmgr entirely.  To get
  things to fit, combine similar lock types into the same column / row,
  and explicitly state what "sleep" means.  The notes about recursion
  and lock order were also a bit banal (lock order is always important,
  not just in the few places annotated here), so remove them.  In
  particular, the lock order note would need to be on just about every
  cell.  If we want to document recursion I think a better approach
  would be a separate table summarizing the recursion rules for each
  lock as having too many notes clutters the table.
- Tweak the tables to use less indentation so everything still fits with
  the added columns.
- Correct a few cells in the context mode table.
- Use mdoc markup instead of explicit markup in a few places.

Requested by: julian
MFC after: 2 weeks

11 years agoFix build with gcc.
Hiroki Sato [Fri, 28 Jun 2013 16:24:14 +0000 (16:24 +0000)]
Fix build with gcc.

11 years agoCorrect a bug that prevented deadlkres from (almost) ever firing.
Ryan Stone [Fri, 28 Jun 2013 15:55:30 +0000 (15:55 +0000)]
Correct a bug that prevented deadlkres from (almost) ever firing.

deadlkres was using a reversed test to check whether ticks had rolled over.
This meant that deadlkres could only fire after ticks had rolled over.
This test was actually unnecessary as deadlkres only ever took the
difference of ticks values which is safe even in the presence of ticks
rollover.  Remove the tests entirely.  Now deadlkres will properly fire
after a lock has been held after the timeout period.

MFC after: 1 month

11 years agoCorrect comment typos.
Sergey Kandaurov [Fri, 28 Jun 2013 14:41:06 +0000 (14:41 +0000)]
Correct comment typos.

11 years agor251088 reverted the default value for UsePrivilegeSeparation from
Dag-Erling Smørgrav [Fri, 28 Jun 2013 09:41:59 +0000 (09:41 +0000)]
r251088 reverted the default value for UsePrivilegeSeparation from
"sandbox" to "yes", but did not update the documentation to match.

11 years agoDon't try to re-insert an already present but invalid page.
Gavin Atkinson [Fri, 28 Jun 2013 07:51:12 +0000 (07:51 +0000)]
Don't try to re-insert an already present but invalid page.

This could happen if a thread doing a page-in loses a ZFS range lock
race to a thread writing to the same range

This fixes "panic: vm_page_alloc: pindex already allocated" in
http://docs.FreeBSD.org/cgi/mid.cgi?1372165971.96049.42.camel

Submitted by: avg
MFC after: 1 week

11 years agoAllow 8259 registers to be read. This is a transient condition
Peter Grehan [Fri, 28 Jun 2013 06:25:04 +0000 (06:25 +0000)]
Allow 8259 registers to be read. This is a transient condition
during Linux boot.

Submitted by: tycho nightingale at pluribusnetworks com
Reviewed by: neel

11 years agoMake sure all CPUID values are handled, instead of exiting the
Peter Grehan [Fri, 28 Jun 2013 06:05:33 +0000 (06:05 +0000)]
Make sure all CPUID values are handled, instead of exiting the
bhyve process when an unhandled one is encountered.

Hide some additional capabilities from the guest (e.g. debug store).

This fixes the issue with FreeBSD 9.1 MP guests exiting the VM on
AP spinup (where CPUID is used when sync'ing the TSCs) and the
issue with the Java build where CPUIDs are issued from a guest
userspace.

Submitted by: tycho nightingale at pluribusnetworks com
Reviewed by: neel
Reported by: many

11 years agoFix build.
Hiroki Sato [Fri, 28 Jun 2013 05:09:01 +0000 (05:09 +0000)]
Fix build.

Spotted by: gjb

11 years agoAllow the PCI config address register to be read. The Linux
Peter Grehan [Fri, 28 Jun 2013 05:01:25 +0000 (05:01 +0000)]
Allow the PCI config address register to be read. The Linux
kernel does this. Also remove an unused header file.

Submitted by: tycho nightingale at pluribusnetworks com
Reviewed by: neel

11 years ago - Add a general purpose resource allocator, vmem, from NetBSD. It was
Jeff Roberson [Fri, 28 Jun 2013 03:51:20 +0000 (03:51 +0000)]
 - Add a general purpose resource allocator, vmem, from NetBSD.  It was
   originally inspired by the Solaris vmem detailed in the proceedings
   of usenix 2001.  The NetBSD version was heavily refactored for bugs
   and simplicity.
 - Use this resource allocator to allocate the buffer and transient maps.
   Buffer cache defrags are reduced by 25% when used by filesystems with
   mixed block sizes.  Ultimately this may permit dynamic buffer cache
   sizing on low KVA machines.

Discussed with: alc, kib, attilio
Tested by: pho
Sponsored by: EMC / Isilon Storage Division

11 years agoThe dtmalloc provider uses the short description of a malloc type as the
Mark Johnston [Fri, 28 Jun 2013 03:14:40 +0000 (03:14 +0000)]
The dtmalloc provider uses the short description of a malloc type as the
function name of its corresponding DTrace probes. These descriptions may
contain whitespace, but probe names cannot, so just replace any whitespace
with underscores when creating probes.

MFC after: 1 week

11 years agoSupport reading registers r0-r3 when unwinding. There is a seperate
Andrew Turner [Thu, 27 Jun 2013 22:26:56 +0000 (22:26 +0000)]
Support reading registers r0-r3 when unwinding. There is a seperate
instruction to load these. We only hit it when unwinding past an trap frame
as in C r0-r3 would never have been saved onto the stack.

11 years agoMake detaching drivers from PCI devices more robust. While here, fix a
John Baldwin [Thu, 27 Jun 2013 20:21:54 +0000 (20:21 +0000)]
Make detaching drivers from PCI devices more robust.  While here, fix a
bug where a PCI device would be powered down if it failed to probe, but
not when its driver was detached (e.g. via kldunload).
- Add a new helper method resource_list_release_active() which forcefully
  releases any active resources of a specified type from a resource list.
- Add a bus_child_detached method for the PCI bus driver which forces any
  active resources to be released (and whines to the console if it finds
  any) and then powers the device down.
- Call pci_child_detached() if we fail to probe a device when a driver
  is kldloaded.  This isn't perfect but can avoid leaking resources
  from a probe() routine in the kldload case.

Reviewed by: imp, brooks
MFC after: 1 month

11 years agoAdd "amdfam10" to the supported CPU types for amd64. This complements
Jung-uk Kim [Thu, 27 Jun 2013 19:47:58 +0000 (19:47 +0000)]
Add "amdfam10" to the supported CPU types for amd64.  This complements
r251691 and 251692.

11 years agoTo avoid LOR, always drop the filedesc lock before exporting fd to sbuf.
Mikolaj Golub [Thu, 27 Jun 2013 19:14:03 +0000 (19:14 +0000)]
To avoid LOR, always drop the filedesc lock before exporting fd to sbuf.

Reviewed by: kib
MFC after: 3 days

11 years agoUpdate T5 register ranges. This is so that regdump skips over registers
Navdeep Parhar [Thu, 27 Jun 2013 18:59:07 +0000 (18:59 +0000)]
Update T5 register ranges.  This is so that regdump skips over registers
with read side-effects.

MFC after: 3 days

11 years agoAdd UNWINDSVCFRAME to provide the unwind pseudo ops to allow us to unwind
Andrew Turner [Thu, 27 Jun 2013 18:54:18 +0000 (18:54 +0000)]
Add UNWINDSVCFRAME to provide the unwind pseudo ops to allow us to unwind
past a trapframe.

Use this macro in exception_exit as it is the function the unwinder enters
as the functions that store the frame setting lr to point to it.

11 years ago- Add vnode-backed swap space specification support. This is enabled when
Hiroki Sato [Thu, 27 Jun 2013 18:28:45 +0000 (18:28 +0000)]
- Add vnode-backed swap space specification support.  This is enabled when
  device names "md" or "md[0-9]*" and a "file" option are specified in
  /etc/fstab like this:

  md    none    swap    sw,file=/swap.bin       0       0

- Add GBDE/GELI encrypted swap space specification support, which
  rc.d/encswap supported.  The /etc/fstab lines are like the following:

  /dev/ada1p1.bde       none    swap    sw      0       0
  /dev/ada1p2.eli       none    swap    sw      0       0

  .eli devices accepts aalgo, ealgo, keylen, and sectorsize as options.

  swapctl(8) can understand an encrypted device in the command line
  like this:

  # swapctl -a /dev/ada2p1.bde

- "-L" flag is added to support "late" option to defer swapon until
  rc.d/mountlate runs.

- rc.d script change:

    rc.d/encswap -> removed
    rc.d/addswap -> just display a warning message if $swapfile is defined
    rc.d/swap1 -> renamed to rc.d/swap
    rc.d/swaplate -> newly added to support "late" option

These changes alleviate a race condition between device creation/removal
and swapon/swapoff.

MFC after: 1 week
Reviewed by: wblock (manual page)

11 years agoFix build.
Gleb Smirnoff [Thu, 27 Jun 2013 10:42:09 +0000 (10:42 +0000)]
Fix build.

11 years agoAdd support for the NTT Docomo L-02C card.
Remko Lodder [Thu, 27 Jun 2013 09:08:07 +0000 (09:08 +0000)]
Add support for the NTT Docomo L-02C card.
(This file didn't get along in the previous commit)

PR: 180017
Submitted by: Masaharu FUJITA
Glanced at by: imp
MFC after: 1 week

11 years agoAdd support for the NTT Docomo L-02C card.
Remko Lodder [Thu, 27 Jun 2013 09:06:00 +0000 (09:06 +0000)]
Add support for the NTT Docomo L-02C card.

PR: 180017
Submitted by: Masaharu FUJITA
Glanced at by: imp
MFC after: 1 week

11 years ago- Request non-cached memory for framebuffer
Oleksandr Tymoshenko [Thu, 27 Jun 2013 00:33:08 +0000 (00:33 +0000)]
- Request non-cached memory for framebuffer
- Properly probe/initialize syscons

11 years agoMove definitions required by userland applications out of acpica_machdep.h.
Jung-uk Kim [Thu, 27 Jun 2013 00:22:40 +0000 (00:22 +0000)]
Move definitions required by userland applications out of acpica_machdep.h.

11 years agoMerge ACPICA 20130626.
Jung-uk Kim [Thu, 27 Jun 2013 00:16:54 +0000 (00:16 +0000)]
Merge ACPICA 20130626.

11 years agoAdd firmware replacement and activation support to nvmecontrol(8) through
Jim Harris [Thu, 27 Jun 2013 00:08:25 +0000 (00:08 +0000)]
Add firmware replacement and activation support to nvmecontrol(8) through
a new firmware command.

NVMe controllers may support up to 7 firmware slots for storing of
different firmware revisions.  This new firmware command supports
firmware replacement (i.e. firmware download) with or without immediate
activation, or activation of a previously stored firmware image.  It
also supports selection of the firmware slot during replacement
operations, using IDENTIFY information from the controller to
check that the specified slot is valid.

Newly activated firmware does not take effect until the new controller
reset, either via a reboot or separate 'nvmecontrol reset' command to the
same controller.

Submitted by: Joe Golio <joseph.golio@emc.com>
Obtained from: EMC / Isilon Storage Division
MFC after: 3 days

11 years agoAdd log page support to nvmecontrol(8) through a new logpage command.
Jim Harris [Wed, 26 Jun 2013 23:53:54 +0000 (23:53 +0000)]
Add log page support to nvmecontrol(8) through a new logpage command.

This includes pretty printers for all of the standard NVMe log pages
(Error, SMART/Health, Firmware), as well as hex output for non-standard
or vendor-specific log pages.

Submitted by: Joe Golio <joseph.golio@emc.com>
Obtained from: EMC / Isilon Storage Division
MFC after: 3 days

11 years agoConsistently cast ACPICA 64-bit integer types when we print them.
Jung-uk Kim [Wed, 26 Jun 2013 23:52:10 +0000 (23:52 +0000)]
Consistently cast ACPICA 64-bit integer types when we print them.

11 years agoAdd generalized helper functions for printing hex data as part of
Jim Harris [Wed, 26 Jun 2013 23:46:31 +0000 (23:46 +0000)]
Add generalized helper functions for printing hex data as part of
nvmecontrol commands.

Submitted by: Joe Golio <joseph.golio@emc.com>
Obtained from: EMC / Isilon Storage Division
MFC after: 3 days

11 years agoEnsure that a device node is specified when invoking the identify or reset
Jim Harris [Wed, 26 Jun 2013 23:41:07 +0000 (23:41 +0000)]
Ensure that a device node is specified when invoking the identify or reset
commands.

Also improve the checking of device node names, so that better error
messages are displayed when incorrect names are specified.

Sponsored by: Intel
MFC after: 3 days

11 years agoRemove remaining uio-related code.
Jim Harris [Wed, 26 Jun 2013 23:37:11 +0000 (23:37 +0000)]
Remove remaining uio-related code.

The nvme_physio() function was removed quite a while ago, which was the
only user of this uio-related code.

Sponsored by: Intel
MFC after: 3 days

11 years agoFail any passthrough command whose transfer size exceeds the controller's
Jim Harris [Wed, 26 Jun 2013 23:32:45 +0000 (23:32 +0000)]
Fail any passthrough command whose transfer size exceeds the controller's
max transfer size.  This guards against rogue commands coming in from
userspace.

Also add KASSERTS for the virtual address and unmapped bio cases, if the
transfer size exceeds the controller's max transfer size.

Sponsored by: Intel
MFC after: 3 days

11 years agoUse MAXPHYS to specify the maximum I/O size for nvme(4).
Jim Harris [Wed, 26 Jun 2013 23:27:17 +0000 (23:27 +0000)]
Use MAXPHYS to specify the maximum I/O size for nvme(4).

Also allow admin commands to transfer up to this maximum I/O size, rather
than the artificial limit previously imposed.  The larger I/O size is very
beneficial for upcoming firmware download support.  This has the added
benefit of simplifying the code since both admin and I/O commands now use
the same maximum I/O size.

Sponsored by: Intel
MFC after: 3 days

11 years agoCreate #defines for NVME_CTRLR_PREFIX and NVME_NS_PREFIX for the "nvme"
Jim Harris [Wed, 26 Jun 2013 23:20:08 +0000 (23:20 +0000)]
Create #defines for NVME_CTRLR_PREFIX and NVME_NS_PREFIX for the "nvme"
and "ns" strings, rather than hardcoding the string values throughout the
nvmecontrol code base.

Sponsored by: Intel
MFC after: 3 days

11 years agoAdd an nvme_function structure array, defining the name, C function and
Jim Harris [Wed, 26 Jun 2013 23:11:20 +0000 (23:11 +0000)]
Add an nvme_function structure array, defining the name, C function and
usage message for each nvmecontrol command.  This helps reduce some code
clutter both now and for future commits which will add logpage and
firmware support to nvmecontrol(8).

Also move helper function prototypes to the end of the header file, after
the per-command functions.

Sponsored by: Intel
MFC after: 3 days

11 years agoBreak out code related to the reset command into a separate source file.
Jim Harris [Wed, 26 Jun 2013 23:05:48 +0000 (23:05 +0000)]
Break out code related to the reset command into a separate source file.

Sponsored by: Intel
MFC after: 3 days

11 years agoBreak out code related to the perftest command into a separate file.
Jim Harris [Wed, 26 Jun 2013 23:02:48 +0000 (23:02 +0000)]
Break out code related to the perftest command into a separate file.

Sponsored by: Intel
MFC after: 3 days

11 years agoBreak out code related to the identify command into a separate source file.
Jim Harris [Wed, 26 Jun 2013 23:00:42 +0000 (23:00 +0000)]
Break out code related to the identify command into a separate source file.

Sponsored by: Intel
MFC after: 3 days

11 years agoBreak out code related to the devlist command into a separate source file.
Jim Harris [Wed, 26 Jun 2013 22:58:59 +0000 (22:58 +0000)]
Break out code related to the devlist command into a separate source file.

Sponsored by: Intel
MFC after: 3 days

11 years agoAdd separate *_usage() functions for each nvmecontrol command.
Jim Harris [Wed, 26 Jun 2013 22:53:21 +0000 (22:53 +0000)]
Add separate *_usage() functions for each nvmecontrol command.

Sponsored by: Intel
MFC after: 3 days

11 years agoAdd an open_dev() helper function to be used in the various places
Jim Harris [Wed, 26 Jun 2013 22:50:49 +0000 (22:50 +0000)]
Add an open_dev() helper function to be used in the various places
where nvmecontrol needs to open a handle to a controller or namespace
device node.

Sponsored by: Intel
MFC after: 3 days

11 years agoFor ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA
Jim Harris [Wed, 26 Jun 2013 22:08:45 +0000 (22:08 +0000)]
For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA
by treating it as UDMA.

This fixes a problem introduced in r249933/r249939, where CAM sends
ATA_DSM_TRIM to SATA devices using ATA_PASSTHROUGH_16.  scsi_ata_trim()
sets protocol as DMA (not UDMA) which is for multi-word DMA, even
though no such mode is selected for the device.  isci(4) would fail
these commands which is the correct behavior but not consistent with
other HBAs, namely LSI's.

smh@ did some further testing on an LSI controller, which rejected
ATA_PASSTHROUGH_16 commands with mode=UDMA_OUT, even though only
a UDMA mode was selected on the device.  So this precludes adding
any kind of mode detection in CAM to determine which mode to use on
a per-device basis.

Sponsored by: Intel
Discussed with: scottl, smh
Reported by: scottl
Tested by: scottl
MFC after: 3 days

11 years agoIn the Xen block front driver, take advantage of backends that
Justin T. Gibbs [Wed, 26 Jun 2013 20:39:07 +0000 (20:39 +0000)]
In the Xen block front driver, take advantage of backends that
support cache flush and write barrier commands.

sys/dev/xen/blkfront/block.h:
Add per-command flag that specifies that the I/O queue must
be frozen after this command is dispatched.  This is used
to implement "single-stepping".

Remove the unused per-command flag that indicates a polled
command.

Add block device instance flags to record backend features.

Add a block device instance flag to indicate the I/O queue
is frozen until all outstanding I/O completes.

Enhance the queue API to allow the number of elements in a
queue to be interrogated.

Prefer "inline" to "__inline".

sys/dev/xen/blkfront/blkfront.c:
Formalize queue freeze semantics by adding methods for both
global and command-associated queue freezing.

Provide mechanism to freeze the I/O queue until all outstanding
I/O completes.  Use this to implement barrier semantics
(BIO_ORDERED) when the backend does not support
BLKIF_OP_WRITE_BARRIER commands.

Implement BIO_FLUSH as either a BLKIF_OP_FLUSH_DISKCACHE
command or a 0 byte write barrier.  Currently, all publicly
available backends perform a diskcache flush when processing
barrier commands, and this frontend behavior matches what
is done in Linux.

Simplify code by using new queue length API.

Report backend features during device attach and via sysctl.

Submitted by: Roger Pau Monné
Submitted by: gibbs (Merge with new driver queue API, sysctl support)

11 years agoMinor sorting.
Pedro F. Giffuni [Wed, 26 Jun 2013 19:43:22 +0000 (19:43 +0000)]
Minor sorting.

MFC after: 3 days

11 years agoImport ACPICA 20130626.
Jung-uk Kim [Wed, 26 Jun 2013 19:01:10 +0000 (19:01 +0000)]
Import ACPICA 20130626.

11 years agoFix some UTF-8 chars slipped into r252204 via copy/paste.
Alexander Motin [Wed, 26 Jun 2013 09:56:33 +0000 (09:56 +0000)]
Fix some UTF-8 chars slipped into r252204 via copy/paste.

11 years agoAdd the EEPROM start offset and size in so ath_ahb will use the
Adrian Chadd [Wed, 26 Jun 2013 05:03:47 +0000 (05:03 +0000)]
Add the EEPROM start offset and size in so ath_ahb will use the
supplied EEPROM data.

This needs to die in a fire and replaced with the firmware API
to store the calibration data early ..

11 years agoAdd in the vendor / device id so the ath_ahb glue works.
Adrian Chadd [Wed, 26 Jun 2013 05:02:47 +0000 (05:02 +0000)]
Add in the vendor / device id so the ath_ahb glue works.

11 years agoAdd the wireless support to the AR933x base kernel, as the support
Adrian Chadd [Wed, 26 Jun 2013 05:02:30 +0000 (05:02 +0000)]
Add the wireless support to the AR933x base kernel, as the support
actually works now.

11 years agoAdd in two new configuration options for the current generation SoCs.
Adrian Chadd [Wed, 26 Jun 2013 05:01:50 +0000 (05:01 +0000)]
Add in two new configuration options for the current generation SoCs.

11 years agoExtend the AHB code to work on chips besides the AR9130.
Adrian Chadd [Wed, 26 Jun 2013 04:58:25 +0000 (04:58 +0000)]
Extend the AHB code to work on chips besides the AR9130.

The AHB code:

* hard coded the AR9130 device id;
* assumes a 4k flash calibration space.

This code now extends this:

* hint.ath.X.eepromsize now overrides the eeprom range, instead of 4k
* hint.ath.X.device_id and hint.ath.X.vendor_id can now be overridden.

Tested:

* AR9330 board (Carambola 2)

11 years agoIf EEPROM data is provided by the AHB layer, copy it in.
Adrian Chadd [Wed, 26 Jun 2013 04:53:33 +0000 (04:53 +0000)]
If EEPROM data is provided by the AHB layer, copy it in.

This is required for the flash layer code to correctly work.

Tested:

* AR9330 SoC (carambola 2)

11 years agoRe-enable the channel set code for the AR933x.
Adrian Chadd [Wed, 26 Jun 2013 04:46:43 +0000 (04:46 +0000)]
Re-enable the channel set code for the AR933x.

This required a HAL change to map the 2GHz frequency back to an IEEE
channel number in order to fetch some value(s) to program in.

11 years agoAdd a HAL local routine to map the 2GHz channel frequency to an IEEE
Adrian Chadd [Wed, 26 Jun 2013 04:46:03 +0000 (04:46 +0000)]
Add a HAL local routine to map the 2GHz channel frequency to an IEEE
channel.

There's some HAL code in the AR9300 HAL that requires a back-mapping
and using the net80211 code isn't appropriate here.

11 years agoIn preparation to support AR933x SoC builds, allow the AH_SUPPORT_AR93(xx)
Adrian Chadd [Wed, 26 Jun 2013 04:34:45 +0000 (04:34 +0000)]
In preparation to support AR933x SoC builds, allow the AH_SUPPORT_AR93(xx)
options to set the AR9300 HAL defines.

This enables the Wasp, Hornet (and later Scorpion) SoC code.

11 years agoAdd a stub AR93xx RF module just to keep the linker happy.
Adrian Chadd [Wed, 26 Jun 2013 04:33:57 +0000 (04:33 +0000)]
Add a stub AR93xx RF module just to keep the linker happy.

When building AR933x test images, I'd like to only build only the ar9300
HAL.  To do this, it needs to supply an RF linker entry or it won't compile.

Tested:

* AR933x test builds

11 years agoDocument ifconfig_wlanX="HOSTAP"
Rui Paulo [Wed, 26 Jun 2013 04:33:32 +0000 (04:33 +0000)]
Document ifconfig_wlanX="HOSTAP"

11 years agosed: use getline() instead of fgetln().
Pedro F. Giffuni [Wed, 26 Jun 2013 04:14:19 +0000 (04:14 +0000)]
sed: use getline() instead of fgetln().

In BSD, fgetln() available in libc but in Illumos the Solaris port had to
include it internally. It also seems to have caused problems [1].

Aid portability by using getline() instead.

Reference:
https://www.illumos.org/issues/3820 [1]

Submitted by: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.com>
Reviewed by: dds
MFC after: 2 weeks

11 years agoImplement ifconfig_wlanX="HOSTAP".
Rui Paulo [Wed, 26 Jun 2013 04:00:52 +0000 (04:00 +0000)]
Implement ifconfig_wlanX="HOSTAP".

Not only this is a bit cleaner, it allows multiple instances of hostapd to be
running on the system host, useful for simultaneous dual-band WiFi.
This is similar to ifconfig_wlanX="WPA" but it uses /etc/hostapd-wlanX.conf.
Compatibility with hostapd_enable=YES/NO was kept.

Reviewed by: adrian

11 years agoPrint the 'setting internal ...' message only with bootverbose.
Rui Paulo [Wed, 26 Jun 2013 02:56:54 +0000 (02:56 +0000)]
Print the 'setting internal ...' message only with bootverbose.

11 years ago- Adding myself to the committers-ports.dot
Mark Felder [Wed, 26 Jun 2013 02:21:37 +0000 (02:21 +0000)]
- Adding myself to the committers-ports.dot
- Adding myself to the freebsd calendar

Approved by: swills (mentor)

11 years agoDon't blidly clear GPIOs configuration. Just use firmware configured
Pyun YongHyeon [Wed, 26 Jun 2013 01:15:40 +0000 (01:15 +0000)]
Don't blidly clear GPIOs configuration. Just use firmware configured
one.  This change also fixes non-working traffic LED on BCM57780.

Submitted by: Masanobu SAITOH <msaitoh@NetBSD.org>
Tested by: Alexander Milanov <a@amilanov.com>

11 years ago - Resolve bucket recursion issues by passing a cookie with zone flags
Jeff Roberson [Wed, 26 Jun 2013 00:57:38 +0000 (00:57 +0000)]
 - Resolve bucket recursion issues by passing a cookie with zone flags
   through bucket_alloc() to uma_zalloc_arg() and uma_zfree_arg().
 - Make some smaller buckets for large zones to further reduce memory
   waste.
 - Implement uma_zone_reserve().  This holds aside a number of items only
   for callers who specify M_USE_RESERVE.  buckets will never be filled
   from reserve allocations.

Sponsored by: EMC / Isilon Storage Division

11 years agoMFV r252215:
Xin LI [Tue, 25 Jun 2013 22:14:32 +0000 (22:14 +0000)]
MFV r252215:

Restore a previous behavior before r251646, where when destructing
ZFS snapshot, the ioctl would return ENOENT when it hit any of
them in the errlist (the new behavior was only return ENOENT when
all returns error).

Illumos ZFS issues:
  3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl

MFC after: 1 week

11 years agoDiff reduction against Illumos, no real change to code itself.
Xin LI [Tue, 25 Jun 2013 21:51:52 +0000 (21:51 +0000)]
Diff reduction against Illumos, no real change to code itself.

This marks vendor branch revision 252213 as merged, the actual code was
committed in r245479.

MFC after: 1 week

11 years agoUpdate vendor/illumos/dist and vendor-sys/illumos/dist
Xin LI [Tue, 25 Jun 2013 21:44:48 +0000 (21:44 +0000)]
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14060:aeb4e8fef072

Illumos ZFS issues:
  3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl

11 years agoUpdate vendor/illumos/dist to illumos-gate 14056:812b3d1ca0a0
Xin LI [Tue, 25 Jun 2013 21:34:21 +0000 (21:34 +0000)]
Update vendor/illumos/dist to illumos-gate 14056:812b3d1ca0a0

Illumos ZFS issues:
  3818 zpool status -x should report pools with removed l2arc devices

11 years agoA few mostly cosmetic nits to aid in debugging:
John Baldwin [Tue, 25 Jun 2013 20:23:08 +0000 (20:23 +0000)]
A few mostly cosmetic nits to aid in debugging:
- Call lock_init() first before setting any lock_object fields in
  lock init routines.  This way if the machine panics due to a duplicate
  init the lock's original state is preserved.
- Somewhat similarly, don't decrement td_locks and td_slocks until after
  an unlock operation has completed successfully.

11 years agoSeveral improvements to rmlock(9). Many of these are based on patches
John Baldwin [Tue, 25 Jun 2013 18:44:15 +0000 (18:44 +0000)]
Several improvements to rmlock(9).  Many of these are based on patches
provided by Isilon.
- Add an rm_assert() supporting various lock assertions similar to other
  locking primitives.  Because rmlocks track readers the assertions are
  always fully accurate unlike rw_assert() and sx_assert().
- Flesh out the lock class methods for rmlocks to support sleeping via
  condvars and rm_sleep() (but only while holding write locks), rmlock
  details in 'show lock' in DDB, and the lc_owner method used by
  dtrace.
- Add an internal destroyed cookie so that API functions can assert
  that an rmlock is not destroyed.
- Make use of rm_assert() to add various assertions to the API (e.g.
  to assert locks are held when an unlock routine is called).
- Give RM_SLEEPABLE locks their own lock class and always use the
  rmlock's own lock_object with WITNESS.
- Use THREAD_NO_SLEEPING() / THREAD_SLEEPING_OK() to disallow sleeping
  while holding a read lock on an rmlock.

Submitted by: andre
Obtained from: EMC/Isilon

11 years agoAdd include path to the ar9300 HAL.
Adrian Chadd [Tue, 25 Jun 2013 17:50:48 +0000 (17:50 +0000)]
Add include path to the ar9300 HAL.

11 years agoAdd Qlogic 10Gb Ethernet Driver for Qlogic 8100 Series CNA Adapter
David C Somayajulu [Tue, 25 Jun 2013 17:50:22 +0000 (17:50 +0000)]
Add Qlogic 10Gb Ethernet Driver for Qlogic 8100 Series CNA Adapter
Driver version (v2.0.0)

Submitted by: David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
Approved by: George Neville-Neil (gnn@freebsd.org)

11 years agoIf daily_status_security_inline is set, the rc value needs to be
John Baldwin [Tue, 25 Jun 2013 15:45:31 +0000 (15:45 +0000)]
If daily_status_security_inline is set, the rc value needs to be
forced to 3 so that the output of this script is always displayed.
In fact, setting this flag is identical to setting
daily_status_security_output to an empty string.  To make the logic
less confusing, change the behavior of daily_status_security_inline
such that it just forces daily_status_security_output to an empty
string and then applies the normal logic.

PR: conf/178611
Submitted by: Jason Unovitch <jason.unovitch@gmail.com>
MFC after: 3 days

11 years agoAdd bunch of names for Seagate and HGST vennor-specififc ASC/ASCQ codes.
Alexander Motin [Tue, 25 Jun 2013 10:50:17 +0000 (10:50 +0000)]
Add bunch of names for Seagate and HGST vennor-specififc ASC/ASCQ codes.

11 years agoAdd test for SATA registers writability and skip using them if it failed.
Alexander Motin [Tue, 25 Jun 2013 09:15:49 +0000 (09:15 +0000)]
Add test for SATA registers writability and skip using them if it failed.

There are some systems reported, where PCI BAR(5), used for SATA registers
access, is present, but not functional.  Attempt to use it brakes devices
detection logic.  Try to detect those cases on attach by setting and testing
some bits in SControl register.  If bits are unsettable, fallback to legacy
ATA without hot-plug detection, speed control/reporting, etc.

MFC after: 2 weeks

11 years agoRegenerate usb.conf after r252196.
Kevin Lo [Tue, 25 Jun 2013 07:17:30 +0000 (07:17 +0000)]
Regenerate usb.conf after r252196.

Spotted by: rpaulo

11 years agoAdd support for D-Link DWA-131.
Kevin Lo [Tue, 25 Jun 2013 06:43:04 +0000 (06:43 +0000)]
Add support for D-Link DWA-131.

11 years agoAdd Lenovo USB 2.0 Ethernet adapter to the list of supported
Pyun YongHyeon [Tue, 25 Jun 2013 00:29:13 +0000 (00:29 +0000)]
Add Lenovo USB 2.0 Ethernet adapter to the list of supported
devices.

11 years agoAdd Lenovo USB 2.0 Ethernet adapter.
Pyun YongHyeon [Tue, 25 Jun 2013 00:26:30 +0000 (00:26 +0000)]
Add Lenovo USB 2.0 Ethernet adapter.

PR: usb/179920
MFC After: 1 week

11 years agoDue to the routing related networking kernel redesign work
Qing Li [Tue, 25 Jun 2013 00:10:49 +0000 (00:10 +0000)]
Due to the routing related networking kernel redesign work
in FBSD 8.0, interface routes have been returened to the
applications without the RTF_GATEWAY bit. This incompatibility
has caused some issues with Zebra, Qugga and the like.
This patch provides the RTF_GATEWAY flag bit in returned interface
routes so to behave similarly to pre 8.0 systems.

Reviewed by:     hrs
Verified by:     mackn at opendns dot com

11 years agoFlag mpt(4) as supporting unmapped I/O; all necessary conversion actually
Marius Strobl [Mon, 24 Jun 2013 21:27:15 +0000 (21:27 +0000)]
Flag mpt(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713 except for a comment update.

MFC after: 3 days

11 years agogcc: configuration fix.
Pedro F. Giffuni [Mon, 24 Jun 2013 21:13:58 +0000 (21:13 +0000)]
gcc:  configuration fix.

-Fix configuration support for FreeBSD 10 and 11.

Note this change is based on GCC-SVN-131197 with permission
by gerald@ .

Reported by: jmallet

11 years agoMore whitespace.
Devin Teske [Mon, 24 Jun 2013 20:58:54 +0000 (20:58 +0000)]
More whitespace.

11 years agoWhitespace.
Devin Teske [Mon, 24 Jun 2013 20:39:07 +0000 (20:39 +0000)]
Whitespace.

11 years agogcc: add some configuration and references.
Pedro F. Giffuni [Mon, 24 Jun 2013 20:38:27 +0000 (20:38 +0000)]
gcc: add some configuration and references.

-Add configure support for FreeBSD 10 and 11.
-Adapt a threading fix to gnu POSIX95 (which we don't use).
-Refer to a bug fix for the disabled vrptree support.

This is all useless in our current build but it is included
for convenience in case someone may want to re-package our
older gcc.

Reviewed by: gerald (long ago)

11 years agoAdd missing Obsolete Files
Eitan Adler [Mon, 24 Jun 2013 20:36:12 +0000 (20:36 +0000)]
Add missing Obsolete Files

Submitted by: Kurt Lidl <lidl@pi-coral.com>

11 years agoRemove request to email suggestions and fixes to the author.
Eitan Adler [Mon, 24 Jun 2013 19:57:25 +0000 (19:57 +0000)]
Remove request to email suggestions and fixes to the author.
He is no longer involved with the FreeBSD project.

While here: remove "no known bugs" and related.  This isn't present in other manual pages.

PR: docs/179914

11 years agoMake the order of operations for lib/msun more clear.
Eitan Adler [Mon, 24 Jun 2013 19:12:17 +0000 (19:12 +0000)]
Make the order of operations for lib/msun more clear.

Tested with md5 sum of object code

Reported by: swildner@DragonFlyBSD.org
Submitted by: bde

11 years agoDisable hw.pci.realloc_bars by default. It wasn't needed for the original
John Baldwin [Mon, 24 Jun 2013 18:30:44 +0000 (18:30 +0000)]
Disable hw.pci.realloc_bars by default.  It wasn't needed for the original
tester of this fix, and realloc_bars breaks some other cases as a small
BAR that is reallocated can end up grabbing space needed by a much larger
BAR in the existing window of a PCI-PCI bridge.

MFC after: 3 days

11 years agoTypo in comment.
Gleb Smirnoff [Mon, 24 Jun 2013 13:36:16 +0000 (13:36 +0000)]
Typo in comment.

11 years agoRevert r252126, r252124, r252121.
Glen Barber [Mon, 24 Jun 2013 09:18:41 +0000 (09:18 +0000)]
Revert r252126, r252124, r252121.

Submitted by: hrs

11 years agoWhen RX checksum offloading is active, AX88772B will prepend a
Pyun YongHyeon [Mon, 24 Jun 2013 05:18:31 +0000 (05:18 +0000)]
When RX checksum offloading is active, AX88772B will prepend a
checksum header.  The header contains a received frame length but
the defined length for AX88772B is different with other ASIX
controllers.  When the RX checksum is off, AX88772B controller does
not prepend a checksum header so driver has to use normal header
length mask.
This change should fix RX errors when RX checksum offloading is
off.

Tested by: kevlo
MFC After: 1 week

11 years agoDelete the nd6 entries associated with an off-link prefix
Qing Li [Mon, 24 Jun 2013 05:01:13 +0000 (05:01 +0000)]
Delete the nd6 entries associated with an off-link prefix
if the same prefix cannot be found on an alternative
interface.

Reviewed by: hrs
MFC after: 1 week