]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC r264851
smh [Thu, 8 May 2014 08:26:20 +0000 (08:26 +0000)]
MFC r264851

Eliminated optarg global being used outside of the function which called getopt

Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/stable/9@265658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264020 (by trasz):
mav [Thu, 8 May 2014 08:25:27 +0000 (08:25 +0000)]
MFC r264020 (by trasz):
Remove the homegrown ctl_be_block_io allocator, replacing it with UMA.
There is no performance difference.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263979 (by trasz):
mav [Thu, 8 May 2014 08:24:08 +0000 (08:24 +0000)]
MFC r263979 (by trasz):
Hide CTL messages about SCSI error responses.  Too many users take
them for actual target errors.  They can be enabled back by setting
kern.cam.ctl.verbose=1, or booting with bootverbose.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263811 (by trasz):
mav [Thu, 8 May 2014 08:21:52 +0000 (08:21 +0000)]
MFC r263811 (by trasz):
Remove ctl_mem_pool.{c,h}.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262782 (by trasz):
mav [Thu, 8 May 2014 08:18:46 +0000 (08:18 +0000)]
MFC r262782 (by trasz):
Fix missing unlock in persistent reservations code, which resulted in panics
with Hyper-V Failover Cluster.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258871:
mav [Thu, 8 May 2014 08:17:04 +0000 (08:17 +0000)]
MFC r258871:
Properly report an error instead of panicing when user tries to create
LUN backed by non-disk device, e.g. /dev/null.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265649 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257946:
mav [Thu, 8 May 2014 08:15:42 +0000 (08:15 +0000)]
MFC r257946:
Introduce seperate mutex lock to protect protect CTL I/O pools, slightly
reducing global CTL lock scope and congestion.

While there, simplify CTL I/O pools KPI, hiding implementation details.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256547 (by smh):
mav [Thu, 8 May 2014 08:11:44 +0000 (08:11 +0000)]
MFC r256547 (by smh):
Added 4K quirks for Corsair Neutron GTX SSD's

git-svn-id: svn://svn.freebsd.org/base/stable/9@265647 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255043 (by ken):
mav [Thu, 8 May 2014 08:08:24 +0000 (08:08 +0000)]
MFC r255043 (by ken):
Bump up the default timeouts for move commands in the ch(4) driver
to 15 minutes, and 5 minutes for things like READ ELEMENT STATUS.

This is needed to account for the worst case scenarios on at least
some Spectra Logic tape libraries.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265646 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244015 (by ken):
mav [Thu, 8 May 2014 07:56:05 +0000 (07:56 +0000)]
MFC r244015 (by ken):
Fix the CTL OOA queue dumping code so that it does not hold a mutex
while doing a copyout.  That can cause a panic, because copyout
can trigger VM faults, and we can't handle VM faults while holding
a mutex.

The solution here is to malloc a separate buffer to hold the OOA
queue entries, so that we don't risk a VM fault while filling up
the buffer and we don't have to drop the lock.  The other solution
would be to wire the user's memory while filling their buffer with
copyout, but that would have been a little more complex.

Also fix a debugging parenthesis issue in ctl_abort_task() pointed
out by Chuck Tuffli.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264834:
mav [Thu, 8 May 2014 07:06:15 +0000 (07:06 +0000)]
MFC r264834:
Disable UNMAP support for STEC 842 SSDs.

In some unknown cases UNMAP commands make device firmware stuck.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265639 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264406:
mav [Thu, 8 May 2014 07:02:46 +0000 (07:02 +0000)]
MFC r264406:
Report more readable state "-" for idle CAM scan thread.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265636 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260509:
mav [Thu, 8 May 2014 06:56:59 +0000 (06:56 +0000)]
MFC r260509:
Replace several instances of -1 with appropriate CAM_*_WILDCARD and types.

It was equal before r259397, but for good or bad, not any more for LUNs.

This change fixes at least CAM debugging.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoAdd a missing comma, and add a missing space.
gjb [Wed, 7 May 2014 22:17:16 +0000 (22:17 +0000)]
Add a missing comma, and add a missing space.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@265619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDocument r264699, find(1) -ignore_readdir_race
gjb [Wed, 7 May 2014 21:46:06 +0000 (21:46 +0000)]
Document r264699, find(1) -ignore_readdir_race

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@265617 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDocument r264423, sh(1) changes in variable assignments
gjb [Wed, 7 May 2014 21:39:01 +0000 (21:39 +0000)]
Document r264423, sh(1) changes in variable assignments
with 'local', 'export', and 'readonly'.

Helped by: jilles (thanks!)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@265615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMerge r259393 from head:
gavin [Wed, 7 May 2014 21:01:35 +0000 (21:01 +0000)]
Merge r259393 from head:

  Fix several panics when initialization of an ISA or PC-CARD device fails:

  o  Assign sc->an_dev in an_probe() (which isn't really a probe function in
     the standard newbus sense) as we may need it for printing errors.
  o  Use device_printf() rather than if_printf() in an_reset() - this is
     called from an_probe() long before the ifp structure is initialised
     in an_attach().
  o  Initialize the ifp structure early in an_attach() as we use if_printf()
     in cases where allocation of descriptors etc fails.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259569, r259770 (by joel@), and r263451.
np [Wed, 7 May 2014 20:40:23 +0000 (20:40 +0000)]
MFC r259569, r259770 (by joel@), and r263451.

r259569:
cxgbe.4: Belated update to the man page to reflect T5 support.

r259770:
mdoc: nuke whitespace.

r263451:
cxgbe(4): man page updates.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 254959:
gavin [Wed, 7 May 2014 20:09:17 +0000 (20:09 +0000)]
MFC 254959:

  Allow more space for interface names.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265597 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253870, r258698 (by gnn@), r259048, and r261534.
np [Wed, 7 May 2014 19:13:09 +0000 (19:13 +0000)]
MFC r253870, r258698 (by gnn@), r259048, and r261534.

r253870:
Teach cxgbetool to display T5 congestion manager context.

r258698:
cxgbetool: "modinfo" command to display SFP+ module information.

trantor:~# cxgbetool t5nex0 modinfo 1
ID: SFP
Vendor FINISAR CORP.
SN AJ10JQR
PN FTLX8571D3BCL
Rev A
Temp: +35C
Vcc 3.225600V
TX Bias 2.176000uA
TX Power 0.588800mW
RX Power 0.486400mW

r259048:
Two new cxgbetool subcommands to set up scheduler classes and to bind
them to NIC queues.

r261534:
cxgbetool: Display the congestion channel map in hex.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265589 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258692 and r260207 (both by gnn@)
np [Wed, 7 May 2014 19:05:14 +0000 (19:05 +0000)]
MFC r258692 and r260207 (both by gnn@)

r258692:
Add constants for use in interrogating various fiber and copper connectors
most often used with network interfaces.

The SFF-8472 standard defines the information that can be retrieved
from an optic or a copper cable plugged into a NIC, most often
referred to as SFP+.  Examples of values that can be read
include the cable vendor's name, part number, date of manufacture
as well as running data such as temperature, voltage and tx
and rx power.

Copious comments on how to use these values with an I2C interface
are given in the header file itself.

r260207:
Convert #defines to enums so that the values are visible in the debugger.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259527, r260210 (by adrian@), r261533, r261536, r261537, r261558 (by
np [Wed, 7 May 2014 18:15:20 +0000 (18:15 +0000)]
MFC r259527, r260210 (by adrian@), r261533, r261536, r261537, r261558 (by
scottl@), r263317, r263412, r263457, and r264621 (by emax@).

r259527:
Do not create a hardware IPv6 server if the listen address is not
in6addr_any and is not in the CLIP table either.  This fixes a reported
TOE+IPv6 NULL-dereference panic in do_pass_open_rpl().

While here, stop creating hardware servers for any loopback address.
It's just a waste of server tids.

r260210:
Add an option to enable or disable the small RX packet copying that
is done to improve performance of small frames.

When doing RX packing, the RX copying isn't necessarily required.

r261533:
cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats.

r261536:
cxgbe(4): The T5 allows for a different freelist starvation threshold
for queues with buffer packing.  Use the correct value to calculate a
freelist's low water mark.

r261537:
cxgbe(4): Use the rx channel map (instead of the tx channel map) as the
congestion channel map.

r261558:
Add a new sysctl, dev.cxgbe.N.rsrv_noflow, and a companion tunable,
hw.cxgbe.rsrv_noflow.  When set, queue 0 of the port is reserved for
TX packets without a flowid.  The hash value of packets with a flowid
is bumped up by 1.  The intent is to provide a private queue for
link-level packets like LACP that is unlikely to overflow or suffer
deep queue latency.

r263317:
cxgbe(4): significant rx rework.

- More flexible cluster size selection, including the ability to fall
  back to a safe cluster size (PAGE_SIZE from zone_jumbop by default) in
  case an allocation of a larger size fails.
- A single get_fl_payload() function that assembles the payload into an
  mbuf chain for any kind of freelist.  This replaces two variants: one
  for freelists with buffer packing enabled and another for those without.
- Buffer packing with any sized cluster.  It was limited to 4K clusters
  only before this change.
- Enable buffer packing for TOE rx queues as well.
- Statistics and tunables to go with all these changes.  The driver's
  man page will be updated separately.

r263412:
cxgbe(4): if_iqdrops statistic should include tunnel congestion drops.

r263457:
cxgbe(4):  Recognize the "spider" configuration where a T5 card's 40G
QSFP port is presented as 4 distinct 10G SFP+ ports to the driver.

r264621:
use correct (integer) type for the temperature sysctl

git-svn-id: svn://svn.freebsd.org/base/stable/9@265582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263311:
jimharris [Wed, 7 May 2014 16:48:43 +0000 (16:48 +0000)]
MFC r263311:

nvme: Allocate all MSI resources up front so that we can fall back to
INTx if necessary.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263310:
jimharris [Wed, 7 May 2014 16:47:58 +0000 (16:47 +0000)]
MFC r263310:

nvme: Close hole where nvd(4) would not be notified of all nvme(4)
instances if modules loaded during boot.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263303:
jimharris [Wed, 7 May 2014 16:46:56 +0000 (16:46 +0000)]
MFC r263303:

Update nvme(4) and nvd(4) man pages to clarify the differences between
their respective device nodes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263278:
jimharris [Wed, 7 May 2014 16:45:50 +0000 (16:45 +0000)]
MFC r263278:

nvme:  NVMe specification dictates 4-byte alignment for PRPs (not 8).

git-svn-id: svn://svn.freebsd.org/base/stable/9@265563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263277:
jimharris [Wed, 7 May 2014 16:45:05 +0000 (16:45 +0000)]
MFC r263277:

nvme: Remove the software progress marker SET_FEATURE command during
controller initialization.

The spec says OS drivers should send this command after controller
initialization completes successfully, but other NVMe OS drivers are
not sending this command.  This change will therefore reduce differences
between the FreeBSD and other OS drivers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263276:
jimharris [Wed, 7 May 2014 16:44:02 +0000 (16:44 +0000)]
MFC r263276:

Base the max number of SG elements on MAXPHYS.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263275:
jimharris [Wed, 7 May 2014 16:43:10 +0000 (16:43 +0000)]
MFC r263275:

isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set
translate their response.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260382:
jimharris [Wed, 7 May 2014 16:42:19 +0000 (16:42 +0000)]
MFC r260382:

For IDENTIFY passthrough commands to Chatham prototype controllers, copy
the spoofed identify data into the user buffer rather than issuing the
command to the controller, since Chatham IDENTIFY data is always spoofed.

While here, fix a bug in the spoofed data for Chatham submission and
completion queue entry sizes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260381:
jimharris [Wed, 7 May 2014 16:40:44 +0000 (16:40 +0000)]
MFC r260381:

For "nvmecontrol devlist", show namespace sizes in terms of MB instead of
GB to improve granularity of the reporting - especially for namespaces
that are on the order of 1 or 2 GB.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258071:
jimharris [Wed, 7 May 2014 16:37:04 +0000 (16:37 +0000)]
MFC r258071:

Check for special status code from FIRMWARE_ACTIVATE command
signifying that a reboot is required to complete activation
of the requested firmware image.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262338
alc [Wed, 7 May 2014 15:52:41 +0000 (15:52 +0000)]
MFC r262338
  When the kernel is running in a virtual machine, it cannot rely upon the
  processor family to determine if the workaround for AMD Family 10h Erratum
  383 should be enabled.  To enable virtual machine migration among a
  heterogeneous collection of physical machines, the hypervisor may have
  been configured to report an older processor family with a reduced feature
  set.  Effectively, the reported processor family and its features are like
  a "least common denominator" for the collection of machines.

  Therefore, when the kernel is running in a virtual machine, instead of
  relying upon the processor family, we now test for features that prove
  that the underlying processor is not affected by the erratum.  (The
  features that we test for are unlikely to ever be emulated in software
  on an affected physical processor.)

PR: 186061

git-svn-id: svn://svn.freebsd.org/base/stable/9@265554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259103 and r259382.
np [Wed, 7 May 2014 15:34:04 +0000 (15:34 +0000)]
MFC r259103 and r259382.

r259103:
cxgbe(4): save a copy of the RSS map for each port for the driver's use.

r259382:
Read card capabilities after firmware initialization, instead of setting
them up as part of firmware initialization (which the driver gets to do
only if it's the master driver).

Read the range of tids available for the ETHOFLD functionality if it's
enabled.

New is_ftid() and is_etid() functions to test whether a tid falls within
the range of filter tids or ETHOFLD tids respectively.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258879:
np [Wed, 7 May 2014 15:24:24 +0000 (15:24 +0000)]
MFC r258879:
cxgbe(4):  T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
scheduling classes in the chip and to bind tx queue(s) to a scheduling
class respectively.  These can be used for various kinds of tx traffic
throttling (to force selected tx queues to drain at a fixed Kbps rate,
or a % of the port's total bandwidth, or at a fixed pps rate, etc.).

git-svn-id: svn://svn.freebsd.org/base/stable/9@265552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257772, r258441, and r258689.
np [Wed, 7 May 2014 15:13:57 +0000 (15:13 +0000)]
MFC r257772, r258441, and r258689.

r257772:
cxgbe(4): Tidy up the display for payload memory statistics (pm_stats).

# sysctl -n dev.t4nex.0.misc.pm_stats
# sysctl -n dev.t5nex.0.misc.pm_stats

r258441:
cxgbe(4): update the internal list of device features.

r258689:
Disable an assertion that relies on some code[1] that isn't in HEAD yet.

[1] http://lists.freebsd.org/pipermail/freebsd-net/2013-August/036573.html

git-svn-id: svn://svn.freebsd.org/base/stable/9@265551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257654
np [Wed, 7 May 2014 15:01:14 +0000 (15:01 +0000)]
MFC r257654
cxgbe(4): Exclude MPS_RPLC_MAP_CTL (0x11114) from the register dump.  Turns
out it's a write-only register with strange side effects on read.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265248
marius [Wed, 7 May 2014 09:56:14 +0000 (09:56 +0000)]
MFC: r265248

Allow GEOM_VINUM to be statically compiled into the kernel.

Submitted by: gleb

git-svn-id: svn://svn.freebsd.org/base/stable/9@265537 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256477:
np [Wed, 7 May 2014 05:28:23 +0000 (05:28 +0000)]
MFC r256477:
cxgbe(4): Store the log2 of the # of doorbells per BAR2 page for both
ingress and egress queues, and for both T4 and T5.  These values are
used by the T4/T5 iWARP driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256459:
np [Wed, 7 May 2014 05:06:55 +0000 (05:06 +0000)]
MFC r256459:
cxgbe(4): Update T4 and T5 firmwares to 1.9.12.0

git-svn-id: svn://svn.freebsd.org/base/stable/9@265483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255198, r255410, and r255411.
np [Wed, 7 May 2014 04:21:07 +0000 (04:21 +0000)]
MFC r255198, r255410, and r255411.

r255198:
For TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is
set to 15 to indicate that the peer did not send a window scale option
with its SYN.  Do not send a window scale option in the SYN|ACK reply
in that case.

r255410:
Fix a miscalculation that caused cxgbe/tom to auto-increment
a TOE socket's tx buffer size too aggressively.

r255411:
Rework the tx credit mechanism between the cxgbe/tom driver
and the card.  This helps smooth out some burstiness in the
exchange.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255050, r255052.
np [Wed, 7 May 2014 04:00:05 +0000 (04:00 +0000)]
MFC r255050, r255052.

r255050:
Implement support for rx buffer packing.  Enable it by default for T5
cards.

This is a T4 and T5 chip feature which lets the chip deliver multiple
Ethernet frames in a single buffer.  This is more efficient within the
chip, in the driver, and reduces wastage of space in rx buffers.

- Always allocate rx buffers from the jumbop zone, no matter what the
  MTU is.  Do not use the normal cluster refcounting mechanism.
- Reserve space for an mbuf and a refcount in the cluster itself and let
  the chip DMA multiple frames in the rest.
- Use the embedded mbuf for the first frame and allocate mbufs on the
  fly for any additional frames delivered in the cluster.  Each of these
  mbufs has a reference on the underlying cluster.

r255052:
Fix the sysctl that displays whether buffer packing is enabled
or not.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265481 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255111, r255112, r255131, r255167, r256066, r261150, r261151,
bryanv [Wed, 7 May 2014 03:17:21 +0000 (03:17 +0000)]
MFC r255111, r255112, r255131, r255167, r256066, r261150, r261151,
    r261164, r261166, r261167, r261168, r261394, r261395:

This updates the network driver to support multiple queues, and several bug
fixes. Note that multiqueue support is not compiled in by default since that
would change ALTQ behavior.

  - Sync VirtIO net device header file from recent Linux
  - Import multiqueue VirtIO net driver
  - Fix build with gcc
  - Do not hold the vtnet Rx queue lock when calling up into the stack
  - Read and write the MAC address in the config space byte by byte
  - Also include the mbuf's csum_flags in an assert message
  - Remove stray space
  - Move duplicated transmit start code into a single function
  - Avoid queue unlock followed by relock when the enable interrupt race is
    lost
  - Check for a full virtqueue in the multiqueue transmit path
  - Do not place the sglist used for Rx/Tx on the stack
  - Use m_defrag() instead of m_collapse() to compact a long mbuf chain

git-svn-id: svn://svn.freebsd.org/base/stable/9@265480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255047 (with a manual tweak to match the ext_free in stable/9):
np [Wed, 7 May 2014 03:06:50 +0000 (03:06 +0000)]
MFC r255047 (with a manual tweak to match the ext_free in stable/9):

Add a routine for attaching an mbuf to a buffer with an external
refcount.  This one is willing to work with buffers that may already be
referenced.  MEXTADD/m_extadd are suitable only for the first attachment
to a cluster -- they initialize the refcount to 1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265479 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253701, r253829, r253873, r253889, r253890, r254577, r254727, and r254933.
np [Wed, 7 May 2014 02:13:55 +0000 (02:13 +0000)]
MFC r253701, r253829, r253873, r253889, r253890, r254577, r254727, and r254933.

r253701:
Display a string instead of a numeric code in the linkdnrc sysctl.

r253829:
Display SGE tunables in the sysctl tree.

dev.t5nex.0.fl_pktshift: payload DMA offset in rx buffer (bytes)
dev.t5nex.0.fl_pad: payload pad boundary (bytes)
dev.t5nex.0.spg_len: status page size (bytes)
dev.t5nex.0.cong_drop: congestion drop setting

r253873:
Set up congestion manager context properly for T5 based cards.

r253889:
Fix previous commit (r253873).  "cong" has one bit per channel but the
congestion channel map has 1 nibble per channel.  So bits wxyz need to
be blown up into 000w000x000y000z.

r253890:
Display temperature sensor data.  Shows -1 if sensor not
available on the card.

# sysctl dev.t4nex.0.temperature
# sysctl dev.t5nex.0.temperature

r254577:
Display P/N information in the description.

r254727:
There is no need to hold the freelist lock around alloc/free of
software descriptors.  This also silences WITNESS warnings when
the software descriptors are allocated with M_WAITOK.

r254933:
Use correct mailbox and PCIe PF number when querying RDMA parameters.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agor253688:
np [Tue, 6 May 2014 19:18:20 +0000 (19:18 +0000)]
r253688:
Reserve room for ioctls that aren't in this copy of the driver yet.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265097
brooks [Tue, 6 May 2014 15:38:44 +0000 (15:38 +0000)]
MFC: r265097

Merge from CheriBSD:

commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Fri Mar 28 16:24:45 2014 +0000

    Add a long needed seatbelt.

    Exit with an error when make is called without a target at the top level
    rather than poluting the source tree and causing use confusion in future
    builds.

commit a9d9aa341b2f4308a227ab460ba85f1f287ad028
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Tue Apr 29 16:06:12 2014 +0000

    Simplify seatbelt added in 1d1b908 based in feedback.

    Discussed with:     imp@FreeBSD.org

Reviewed by: imp
Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/9@265450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265102:
kib [Tue, 6 May 2014 12:39:23 +0000 (12:39 +0000)]
MFC r265102:
Fix one cases of recursive acquisitions of the vm object lock, only
possible in rare failure situations.  The second part of r265102 is
not applicable to stable/9 since vm_page_insert() cannot fail there.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265100:
kib [Tue, 6 May 2014 12:35:19 +0000 (12:35 +0000)]
MFC r265100:
Fix the comparision for the end of range in vm_phys_fictitious_reg_range().

git-svn-id: svn://svn.freebsd.org/base/stable/9@265438 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264610:
mav [Tue, 6 May 2014 09:55:49 +0000 (09:55 +0000)]
MFC r264610:
Correct AMD chipsets identification.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260830:
mav [Tue, 6 May 2014 09:52:37 +0000 (09:52 +0000)]
MFC r260830:
Add ID for one more ASMedia AHCI-compatible controller.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264738
rmacklem [Mon, 5 May 2014 20:55:37 +0000 (20:55 +0000)]
MFC: r264738
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265390 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264705, r264749
rmacklem [Mon, 5 May 2014 20:48:36 +0000 (20:48 +0000)]
MFC: r264705, r264749
Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250916: coexist with /etc/localtime being a symlink
peter [Mon, 5 May 2014 19:35:02 +0000 (19:35 +0000)]
MFC r250916: coexist with /etc/localtime being a symlink

git-svn-id: svn://svn.freebsd.org/base/stable/9@265383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264739
rmacklem [Mon, 5 May 2014 11:30:45 +0000 (11:30 +0000)]
MFC: r264739
Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265357 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMRC r265230:
gjb [Mon, 5 May 2014 01:29:33 +0000 (01:29 +0000)]
MRC r265230:
  Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not
  honored as make(1) arguments.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@265343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262661:
markj [Mon, 5 May 2014 01:26:28 +0000 (01:26 +0000)]
MFC r262661:
Fix emulation of call and jmp instructions on i386 and for 32-bit processes
on amd64.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265341 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264681
rmacklem [Mon, 5 May 2014 01:07:56 +0000 (01:07 +0000)]
MFC: r264681
Modify the NFSv4 client open/create RPC so that it acquires
post-open/create directory attributes. This allows the RPC to
name cache the newly created file and reduces the lookup RPC
count by about 10% for software builds.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264672
rmacklem [Mon, 5 May 2014 01:01:30 +0000 (01:01 +0000)]
MFC: r264672
Modify the Lookup RPC for NFSv4 so that it acquires directory
attributes. This allows the client to cache directory names
when they are looked up, reducing the Lookup RPC count by
about 40% for software builds.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265339 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265002:
kib [Sun, 4 May 2014 08:00:07 +0000 (08:00 +0000)]
MFC r265002:
Fix vm_fault_copy_entry() operation on upgrade; allow it to find the
pages in the shadowed objects.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265003:
kib [Sun, 4 May 2014 07:57:20 +0000 (07:57 +0000)]
MFC r265003:
Fix order of libthr and libc in the global dso list for sshd.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261147, r261149:
bryanv [Sun, 4 May 2014 01:03:54 +0000 (01:03 +0000)]
MFC r261147, r261149:

 - Remove spaces before tabs in the function prototype list
 - Read each field of the configuration individually

git-svn-id: svn://svn.freebsd.org/base/stable/9@265302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260582, r260583:
bryanv [Sun, 4 May 2014 00:57:38 +0000 (00:57 +0000)]
MFC r260582, r260583:

 - Add unmapped IO support to virtio_blk(4)
 - Add unmapped IO support to virtio_scsi(4)

git-svn-id: svn://svn.freebsd.org/base/stable/9@265301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260581:
bryanv [Sun, 4 May 2014 00:45:00 +0000 (00:45 +0000)]
MFC r260581:

 - Add sglist_append_bio(9) to append a struct bio's data to a sglist

git-svn-id: svn://svn.freebsd.org/base/stable/9@265300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260581:
bryanv [Sun, 4 May 2014 00:43:00 +0000 (00:43 +0000)]
MFC r260581:

 - Add sglist_append_bio(9) to append a struct bio's data to a sglist

git-svn-id: svn://svn.freebsd.org/base/stable/9@265299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255110
bryanv [Sun, 4 May 2014 00:14:49 +0000 (00:14 +0000)]
MFC r255110

 - Add optional VirtIO device method for post-attach notifications

git-svn-id: svn://svn.freebsd.org/base/stable/9@265298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264933:
gjb [Sun, 4 May 2014 00:13:26 +0000 (00:13 +0000)]
MFC r264933:
  Fix indentation in make-memstick.sh.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@265297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255166, r255109:
bryanv [Sun, 4 May 2014 00:10:25 +0000 (00:10 +0000)]
MFC r255166, r255109:

 - Fix unintended compiler constant folding
 - Add support for postponing VirtIO virtqueue interrupts

git-svn-id: svn://svn.freebsd.org/base/stable/9@265295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264907, r264908, r264922:
gjb [Sun, 4 May 2014 00:09:17 +0000 (00:09 +0000)]
MFC r264907, r264908, r264922:
  Record mergeinfo for r264907 and r264908, reverted
  in r264922.

This commit is for merge tracking purposes only.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@265294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264630
rmacklem [Sat, 3 May 2014 23:48:26 +0000 (23:48 +0000)]
MFC: r264630
For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.

The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.

This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264517
rmacklem [Sat, 3 May 2014 23:42:00 +0000 (23:42 +0000)]
MFC: r264517
Vlan did not set the value of if_hw_tsomax, so when vlan
was stacked on top of a network interface that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface. This patch modifies vlan so that
it sets if_hw_tsomax to the value of the parent interface.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264469, r264498
rmacklem [Sat, 3 May 2014 22:27:24 +0000 (22:27 +0000)]
MFC: r264469, r264498
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262543:
markj [Sat, 3 May 2014 16:24:41 +0000 (16:24 +0000)]
MFC r262543:
Fix the struct reg mappings for i386 and amd64, which differ between illumos
and FreeBSD.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262542:
markj [Sat, 3 May 2014 16:09:08 +0000 (16:09 +0000)]
MFC r262542:
Move some files that are identical on i386 and amd64 to an x86 subdirectory
rather than keeping duplicate copies.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agodate(1): Add "-R" flag to use RFC 2822 date and time output format [MFC]
dumbbell [Sat, 3 May 2014 14:04:04 +0000 (14:04 +0000)]
date(1): Add "-R" flag to use RFC 2822 date and time output format [MFC]

As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z"
as the output format while LC_TIME is set to the "C" locale.

This is compatible with date(1) from the GNU core utilities.

This is an MFC of r264968 and r264970.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264494:
ae [Fri, 2 May 2014 21:54:36 +0000 (21:54 +0000)]
MFC r264494:
  Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
  When server doesn't support this request, try to use SMB_INFO_ALLOCATION.
  And use SMB_COM_QUERY_INFORMATION_DISK request as fallback.

MFC r264600:
  Remove redundant unlock.

  This code was removed from the opensolaris and darwin's
  netsmb implementations, in DfBSD it also has been disabled.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265246 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264040:
pfg [Fri, 2 May 2014 20:13:52 +0000 (20:13 +0000)]
MFC r264040:

4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59

Reference:
https://www.illumos.org/issues/4248
https://www.illumos.org/issues/4249

Obtained from: Illumos

git-svn-id: svn://svn.freebsd.org/base/stable/9@265235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r265090
marius [Fri, 2 May 2014 10:31:12 +0000 (10:31 +0000)]
MFC: r265090

Merge r133175 from upstream:

2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

PR libstdc++/35566
* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829 (merged to stable/9 in r237507).

Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/9@265221 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262733:
markj [Thu, 1 May 2014 03:16:40 +0000 (03:16 +0000)]
MFC r262733:
Use a full path to the target for make rules which create symlinks @,
machine and ${MACHINE_CPUARCH}. Otherwise the presence of a file named
"x86" or "x86.c" in the make path can cause problems.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264581, r264744 (partial):
pfg [Wed, 30 Apr 2014 20:46:52 +0000 (20:46 +0000)]
MFC r264581, r264744 (partial):

Various style(9) fixes and typos in printf and grep.

#define should be followed by a tab.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265161 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265046
smh [Wed, 30 Apr 2014 11:06:02 +0000 (11:06 +0000)]
MFC r265046

Fix ZIO reordering issue which could cause data loss / corruption.

Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/stable/9@265146 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoPick up the 2014032601 update which adds an IPv6 address for C.
erwin [Wed, 30 Apr 2014 09:55:45 +0000 (09:55 +0000)]
Pick up the 2014032601 update which adds an IPv6 address for C.

Note that this is a direct commit to stable/9 as this file
is no longer in HEAD.

Sponsored by: DK Hostmaster A/S

git-svn-id: svn://svn.freebsd.org/base/stable/9@265142 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix TCP reassembly vulnerability.
delphij [Wed, 30 Apr 2014 04:04:20 +0000 (04:04 +0000)]
Fix TCP reassembly vulnerability.

Patch done by: glebius
Security: FreeBSD-SA-14:08.tcp
Security: CVE-2014-3000

git-svn-id: svn://svn.freebsd.org/base/stable/9@265123 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r265015:
hselasky [Tue, 29 Apr 2014 05:47:13 +0000 (05:47 +0000)]
MFC r265015:
Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel
LynxPoint USB 3.0 controllers found in MacBookPro 2013's.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265079 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRevert r265076; r262775 should not be MFC'd to stable/9.
markj [Tue, 29 Apr 2014 03:58:17 +0000 (03:58 +0000)]
Revert r265076; r262775 should not be MFC'd to stable/9.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265077 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262775:
markj [Tue, 29 Apr 2014 03:50:23 +0000 (03:50 +0000)]
MFC r262775:
Log the name of the file that we failed to open rather than an
uninitialized buffer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264436:
markj [Tue, 29 Apr 2014 03:37:30 +0000 (03:37 +0000)]
MFC r264436:
Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265074 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC uftdi(4) driver changes...
ian [Mon, 28 Apr 2014 13:28:10 +0000 (13:28 +0000)]
MFC uftdi(4) driver changes...
  r264010: Support speeds up to 12mbaud on newer chips.
  r264018: Update list of supported FTDI chips.
  r264031: Use 2K IO buffers for improved throughput.
  r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO,
           and other modes.
  r264800: Various fixes to r264149 pointed out by Coverity scan.

git-svn-id: svn://svn.freebsd.org/base/stable/9@265050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264467:
delphij [Mon, 28 Apr 2014 06:11:44 +0000 (06:11 +0000)]
MFC r264467:

Take into account when zpool history block grows exceeding 128KB in zpool(8)
and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in
spa_history_create_obj()).

PR: bin/186574
Submitted by: Andrew Childs <lorne cons org nz> (with changes)

git-svn-id: svn://svn.freebsd.org/base/stable/9@265040 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264832 (partial)
marius [Sat, 26 Apr 2014 01:00:37 +0000 (01:00 +0000)]
MFC: r264832 (partial)

- Sprinkle const and static as appropriate.
- Convert the remainder of snd_hda(4) to take advantage of nitems().
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264962 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r264794:
gjb [Sat, 26 Apr 2014 00:55:36 +0000 (00:55 +0000)]
MFC r264794:
  Move xdev knobs from release/arm/release.sh and into an
  XDEV_FLAGS variable in ${KERNCONF}.conf file.

Local changes:
  Fix XDEV_FLAGS for stable/9 branch, in particular, remove
  all *_CLANG* knobs, and move WITH_GCC=1 to XDEV_FLAGS.
  This is effectively a no-op on stable/9, and merged for
  tracking purpose only.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@264960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r264831
marius [Sat, 26 Apr 2014 00:40:02 +0000 (00:40 +0000)]
MFC: r264831

Add quirk to configure headphones redirection on Intel DH87RL boards.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264957 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260064
marius [Fri, 25 Apr 2014 22:23:26 +0000 (22:23 +0000)]
MFC: r260064

- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264955 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260063
marius [Fri, 25 Apr 2014 22:19:06 +0000 (22:19 +0000)]
MFC: r260063

- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260061
marius [Fri, 25 Apr 2014 22:04:33 +0000 (22:04 +0000)]
MFC: r260061

- Add support for using MSI instead of INTx, controllable via the tunable
  hw.ral.msi_disable (defaulting to using MSI).
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- Use PCIR_BAR instead of a homegrown macro.
- There's no need to keep track of resource IDs.
- Release resources again in case attaching fails.
- Quiesce the interrupt before detaching.
- Sprinkle const.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Trim headers.
- Nuke dupe $FreeBSD$.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260058
marius [Fri, 25 Apr 2014 22:01:05 +0000 (22:01 +0000)]
MFC: r260058

- Remove a redundant variable in mpt_pci_attach().
- #if 0 the currently unused paired port linking and unlinking of dual
  adapters.
- Simplify MSI/MSI-X allocation and release. For a single one, we don't need
  to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough
  to just do nothing in case of INTx.
- Canonicalize actions taken on attach failure and detach.
- Remove the remainder of incomplete support for older FreeBSD versions.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260086
marius [Fri, 25 Apr 2014 21:58:16 +0000 (21:58 +0000)]
MFC: r260086

- Probe with BUS_PROBE_DEFAULT instead of 0.
- Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since
  r189367.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260053
marius [Fri, 25 Apr 2014 21:42:46 +0000 (21:42 +0000)]
MFC: r260053

- There's no need to keep track of resource IDs.
- Simplify MSI allocation and release. For a single one, we don't need to
  fiddle with the MSI count and pci_release_msi(9) is smart enough to just
  do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260050, r261528
marius [Fri, 25 Apr 2014 21:32:38 +0000 (21:32 +0000)]
MFC: r260050, r261528

- Switch to using the common MII bitbang'ing code instead of duplicating it.
- Based on lessons learnt with dc(4) (see r185750), add bus space barriers to
  the MII bitbang read and write functions as well as to instances of page
  switching.
- Add missing locking to ed_ifmedia_{upd,sts}().
- Canonicalize some messages.
- Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named
  ED_TC5299J_MII_DIRIN.
- Remove unused headers.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264943 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r260045
marius [Fri, 25 Apr 2014 21:28:41 +0000 (21:28 +0000)]
MFC: r260045

- Simplify MSI allocation and release. For a single one, we don't need to
  fiddle with the MSI count and pci_release_msi(9) is smart enough to just
  do nothing in case of INTx.
- Don't allocate MSI as RF_SHAREABLE.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f