]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoMFC: r265264, r265270
brueffer [Sat, 10 May 2014 20:45:23 +0000 (20:45 +0000)]
MFC: r265264, r265270

Add rsu(4) and urtwn(4) to the hardware notes.

10 years agoMFC: r257408 by kevlo
brueffer [Sat, 10 May 2014 19:47:54 +0000 (19:47 +0000)]
MFC: r257408 by kevlo

Add manpage for urtwnfw, the Realtek RTL8188CU/RTL8192CU firmware
module.  Also fix a few nits in urtwn.4.

10 years agoMFC: r265263
brueffer [Sat, 10 May 2014 19:10:31 +0000 (19:10 +0000)]
MFC: r265263

Make this manpage ready for hardware notes generation, add more Xrefs and perform
general cleanup.

In particular, don't claim rsu(4) devices can be configured with hostname(1)...

10 years agoMFC r259126:
rpaulo [Sat, 10 May 2014 08:10:01 +0000 (08:10 +0000)]
MFC r259126:

Activate the device before attempt to access any of its registers.  Without
this change we may end up with a panic (Fatal kernel mode data abort:
'External Non-Linefetch Abort (S)') as described in
http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.

It is now possible to bring up I2C1 and I2C2 on BBB.

10 years agoManually MFC 262714:
rpaulo [Sat, 10 May 2014 08:07:41 +0000 (08:07 +0000)]
Manually MFC 262714:
  Add a missing semicolong, noticed by the gnu dt compiler.

In head, the directory layout changed and we can't svn merge correctly.

10 years agoMFC r265275:
kib [Sat, 10 May 2014 07:53:36 +0000 (07:53 +0000)]
MFC r265275:
Overwrite the de_Name for the directories on rename to correct the dot
name.

10 years agoRevert bogus change in 265804 to configparser.c
rpaulo [Sat, 10 May 2014 07:26:49 +0000 (07:26 +0000)]
Revert bogus change in 265804 to configparser.c

10 years agoMFC r252440:
rpaulo [Sat, 10 May 2014 07:25:26 +0000 (07:25 +0000)]
MFC r252440:

    Enable the second and the third I2C controllers on Beaglebone-black.

10 years agoMFC r265411
davidcs [Sat, 10 May 2014 02:10:32 +0000 (02:10 +0000)]
MFC r265411
Modify Copyright information to reflect Qlogic Corporation's purchase
of Broadcom's NetXtreme business

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation

10 years agoMFC r264194:
jh [Fri, 9 May 2014 15:55:45 +0000 (15:55 +0000)]
MFC r264194:

Fork a child process and wait until the process terminates when the -P
option is specified. This behavior is documented on the manual page.

PR: bin/187265

10 years agoMFC: r265244
brueffer [Fri, 9 May 2014 13:18:24 +0000 (13:18 +0000)]
MFC: r265244

Free resources in an error case.

CID: 1018947
Found with: Coverity Prevent(tm)

10 years agoMFC r265464:
delphij [Fri, 9 May 2014 07:24:39 +0000 (07:24 +0000)]
MFC r265464:

Sort .ALLSRC before concatenating files together.  This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by: sjg

10 years agoMFC r265458:
delphij [Fri, 9 May 2014 07:21:32 +0000 (07:21 +0000)]
MFC r265458:
Import George Wilson's change for Illumos #4730:

4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>

Original author: George Wilson

10 years agoMFC r264836 (MFV r264830):
delphij [Fri, 9 May 2014 07:17:29 +0000 (07:17 +0000)]
MFC r264836 (MFV r264830):

4745 fix AVL code misspellings

10 years agoMFC r264835 (MFV r264829):
delphij [Fri, 9 May 2014 07:12:31 +0000 (07:12 +0000)]
MFC r264835 (MFV r264829):

3897 zfs filesystem and snapshot limits

10 years agoMFC r264740:
delphij [Fri, 9 May 2014 07:07:25 +0000 (07:07 +0000)]
MFC r264740:

Use case insensitive match in portsnap.

PR: bin/186510
Submitted by: olli

10 years agoMFC r264671 (MFV r264668):
delphij [Fri, 9 May 2014 07:04:12 +0000 (07:04 +0000)]
MFC r264671 (MFV r264668):

4754 io issued to near-full luns even after setting noalloc threshold
4755 mg_alloc_failures is no longer needed

illumos/illumos@b6240e830b871f59c22a3918aebb3b36c872edba

10 years agoMFC r264669: MFV r264666:
delphij [Fri, 9 May 2014 06:56:26 +0000 (06:56 +0000)]
MFC r264669: MFV r264666:

4374 dn_free_ranges should use range_tree_t

illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4

10 years agoMFC r265732:
gjb [Fri, 9 May 2014 04:16:10 +0000 (04:16 +0000)]
MFC r265732:
  Add 9.3 to mdoc.local

Sponsored by: The FreeBSD Foundation

10 years agoMFC mpr(4) driver changes.
ken [Fri, 9 May 2014 03:59:12 +0000 (03:59 +0000)]
MFC mpr(4) driver changes.

This includes r265386, r265424, and r265473.

  ------------------------------------------------------------------------
  r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines

  Adjust #if statements inside mprsas_send_smpcmd() to more accurately
  reflect when unmapped I/O support was added.

  For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028.
  For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001.

  Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the
  i386 PAE build for non-unmapped I/O builds.  These were fixed in mps(4)
  in revision 241145, but didn't make it into the mpr(4) driver.  This
  change should only affect FreeBSD versions outside the above revisions,
  and thus doesn't affect head.

  Sponsored by: Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines

  Fix a problem with async notifications in the mpr(4) driver.

  This problem only occurs on versions of FreeBSD prior to the recent CAM
  locking changes.  (i.e. stable/9 and older versions of stable/10)  This
  change should be a no-op for head and stable/10.

  If a path isn't specified, xpt_register_async() will create a fully
  wildcarded path and acquire a lock (the XPT lock in older versions,
  and via xpt_path_lock() in newer versions) to call xpt_action() for the
  XPT_SASYNC_CB CCB.  It will then drop the lock and if the requested event
  includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up
  to date with any device arrivals or path registrations.

  The issue is that before the locking changes, each SIM lock would get
  acquired in turn during the EDT tree traversal process.  If a path is
  specified for xpt_register_async(), it won't acquire and drop its own lock,
  but instead expects the caller to hold its own SIM lock.  That works for
  the first part of xpt_register_async(), but causes a recursive lock
  acquisition once the EDT traversal happens and it comes to the SIM in
  question.  And it isn't possible to call xpt_action() without holding a SIM
  lock.

  The locking changes fix this by using the XPT topology lock for EDT
  traversal, so it is no longer an issue to hold the SIM lock while calling
  xpt_register_async().

  The solution for FreeBSD versions before the locking changes is to request
  notification of all device arrivals (so we pass a NULL path into
  xpt_register_async()) and then filter out the arrivals that are not ours.

  Sponsored by: Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines

  Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN.

  This is more consistent with the existing mps(4) behavior.

  Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com>

  ------------------------------------------------------------------------

Sponsored by: LSI, Spectra Logic

10 years agoMFC r265231:
pfg [Fri, 9 May 2014 01:30:15 +0000 (01:30 +0000)]
MFC r265231:

gcc: fix strict alignment.

From the OpenBSD log:

x86-64 ABI requires arrays greater than 16 bytes to be aligned to
16byte boundary.  However, GCC 16-byte aligns arrays of >=16 BITS,
not BYTES.

This diff improves bug detectability for code which has local arrays
of [16 .. 127] bits:  in those cases SSP will now detect even 1-byte
overflows.

Obtained from: OpenBSD (CVS rev 1.4)

10 years agoMFC r265202:
pfg [Fri, 9 May 2014 01:20:39 +0000 (01:20 +0000)]
MFC r265202:
Remove some unreachable breaks in regex.

This is based on a much bigger cleanup done in Illumos.

Reference:
https://www.illumos.org/issues/2077

10 years agoMerge 260488, r260508.
melifaro [Thu, 8 May 2014 21:03:31 +0000 (21:03 +0000)]
Merge 260488, r260508.

r260488:
  Split rt_newaddrmsg_fib() into two different functions.
  Adding/deleting interface addresses involves access to 3 different subsystems,
  int different parts of code. Each call can fail, so reporting successful
  operation by rtsock in the middle of the process error-prone.

  Further split routing notification API and actual rtsock calls via creating
  public-available rt_addrmsg() / rt_routemsg() functions with "private"
  rtsock_* backend.

r260508:
  Simplify inet alias handling code: if we're adding/removing alias which
  has the same prefix as some other alias on the same interface, use
  newly-added rt_addrmsg() instead of hand-rolled in_addralias_rtmsg().

  This eliminates the following rtsock messages:

  Pinned RTM_ADD for prefix (for alias addition).
  Pinned RTM_DELETE for prefix (for alias withdrawal).

  Example (got 10.0.0.1/24 on vlan4, playing with 10.0.0.2/24):

  before commit, addition:

    got message of size 116 on Fri Jan 10 14:13:15 2014
    RTM_NEWADDR: address being added to iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

    got message of size 192 on Fri Jan 10 14:13:15 2014
    RTM_ADD: Add Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,PINNED>
    locks:  inits:
    sockaddrs: <DST,GATEWAY,NETMASK>
     10.0.0.0 10.0.0.2 (255) ffff ffff ff

  after commit, addition:

    got message of size 116 on Fri Jan 10 13:56:26 2014
    RTM_NEWADDR: address being added to iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 14.0.0.2 14.0.0.255

  before commit, wihdrawal:

    got message of size 192 on Fri Jan 10 13:58:59 2014
    RTM_DELETE: Delete Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,PINNED>
    locks:  inits:
    sockaddrs: <DST,GATEWAY,NETMASK>
     10.0.0.0 10.0.0.2 (255) ffff ffff ff

    got message of size 116 on Fri Jan 10 13:58:59 2014
    RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

  adter commit, withdrawal:

    got message of size 116 on Fri Jan 10 14:14:11 2014
    RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

  Sending both RTM_ADD/RTM_DELETE messages to rtsock is completely wrong
  (and requires some hacks to keep prefix in route table on RTM_DELETE).

  I've tested this change with quagga (no change) and bird (*).

  bird alias handling is already broken in *BSD sysdep code, so nothing
  changes here, too.

  I'm going to MFC this change if there will be no complains about behavior
  change.

  While here, fix some style(9) bugs introduced by r260488
  (pointed by glebius and bde).

10 years agoMFC: r265252
rmacklem [Thu, 8 May 2014 20:52:25 +0000 (20:52 +0000)]
MFC: r265252
The new draft specification for NFSv4.0 specifies that a server
should either accept owner and owner_group strings that are just
the digits of the uid/gid or return NFS4ERR_BADOWNER.
This patch adds a sysctl vfs.nfsd.enable_stringtouid, which can
be set to enable the server w.r.t. accepting numeric string. It
also ensures that NFS4ERR_BADOWNER is returned if numeric uid/gid
strings are not enabled. This fixes the server for recent Linux
nfs4 clients that use numeric uid/gid strings by default.

10 years agoMerge r260379, r260460.
melifaro [Thu, 8 May 2014 20:41:39 +0000 (20:41 +0000)]
Merge r260379, r260460.

r260379:
  Partially fix IPv4 interface routes deletion in RADIX_MPATH.

  Noticed by:   Nikolay Denev <ndenev at gmail.com>

r260460:
  Constanly use RT_ALL_FIBS everywhere instead of -1.

10 years agoMerge r259528, r259528, r260295.
melifaro [Thu, 8 May 2014 20:27:06 +0000 (20:27 +0000)]
Merge r259528, r259528, r260295.

r259528:
  Simplify contiguous mask checking.

  Suggested by: glebius

r260228:
  Remove useless register variable modifiers.
  Do some more style(9).

r260295:
  Change semantics for rnh_lookup() function: now
  it performs exact match search, regardless of netmask existance.
  This simplifies most of rnh_lookup() consumers.

  Fix panic triggered by deleting non-existent host route.

  PR:           kern/185092
  Submitted by: Nikolay Denev <ndenev at gmail.com>

10 years agoMerge r260524,r260540
melifaro [Thu, 8 May 2014 19:35:12 +0000 (19:35 +0000)]
Merge r260524,r260540

r260524:
  Add -4/-6 shorthand for -finet/-finet6 in route(8) and netstat(8).

r260540:
  Bump dates in nestat(1) and route(8) man pages.
  Fix several small errors introduced by r260524.

  Suggested by: glebius

10 years agoMerge r258708, r258711, r260247, r261117.
melifaro [Thu, 8 May 2014 19:11:41 +0000 (19:11 +0000)]
Merge r258708, r258711, r260247, r261117.

r258708:
Check ipfw table numbers in both user and kernel space before rule addition.
Found by:       Saychik Pavel <umka@localka.net>

r258711:
Simplify O_NAT opcode handling.

r260247:
Use rnh_matchaddr instead of rnh_lookup for longest-prefix match.
rnh_lookup is effectively the same as rnh_matchaddr if called with
empy network mask.

r261117:
Reorder struct ip_fw_chain:
* move rarely-used fields down
* move uh_lock to different cacheline
* remove some usused fields

10 years agoMFC: r265360
brueffer [Thu, 8 May 2014 19:03:04 +0000 (19:03 +0000)]
MFC: r265360

Remove stray comma.

10 years agoMerge r258677.
melifaro [Thu, 8 May 2014 18:09:32 +0000 (18:09 +0000)]
Merge r258677.

Fix key lookup in ipfw(8) broken since r232865.
Print warning for IPv4 address strings which are valid in
inet_aton() but not valid in inet_pton(). (1)

Found by:       Özkan KIRIK <ozkan.kirik@gmail.com>
Submitted by:   Ian Smith <smithi@nimnet.asn.au> (1)

10 years agoMFC r265201
brooks [Thu, 8 May 2014 16:12:38 +0000 (16:12 +0000)]
MFC r265201

Fix a 2038 bug.

If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not
just years less than 2038.

Don't bother fixing the underflow in the case of years before 1903.

MFC after: 1 week
Sponsored by: DARPA, AFRL

10 years agoMFC r260234, r260328:
mav [Thu, 8 May 2014 13:31:01 +0000 (13:31 +0000)]
MFC r260234, r260328:
Remove extra conversion to nanoseconds from ddi_get_lbolt64().

As result this uses one multiplication and shifts instead of one division
and two multiplications.

10 years agoMFC r264145:
mav [Thu, 8 May 2014 13:12:24 +0000 (13:12 +0000)]
MFC r264145:
Add property and sysctl to control how ZVOLs are exposed to OS.

New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL
between three modes:
 geom -- existing fully functional behavior (default);
 dev -- exposing volumes only as raw disk device file in devfs;
 none -- not exposing volumes outside ZFS.

The "dev" mode is less functional (can't be partitioned, mounted, etc),
but it is faster, and in some scenarios with untrusted consumers safer.
It can be useful for NAS, VM block storages, etc.
The "none" mode may be convenient for backup servers, etc. that don't
need direct data access.

Due to the way ZVOL is integrated with main ZFS code, those property
and sysctl are checked only during pool import and volume creation.

10 years agoMFC r264086:
mav [Thu, 8 May 2014 13:10:39 +0000 (13:10 +0000)]
MFC r264086:
3580 Want zvols to return volblocksize when queried for physical block size

illumos/illumos-gate@a0b60564dfc644f4bfaef1ce26d343b44cf68bc5

It is irrelevant for FreeBSD, just reducing diff.

10 years agoMFC r265054:
mav [Thu, 8 May 2014 12:07:40 +0000 (12:07 +0000)]
MFC r265054:
Reduce number of opens by REOM RAID during provider taste.

Instead opening/closing provider by each of metadata classes, do it only
once in core code.  Since for SCSI disks open/close means sending some
SCSI commands to the device, this change reduces taste time.

Sponsored by: iXsystems, Inc.

10 years agoMFC r264313:
mav [Thu, 8 May 2014 12:04:40 +0000 (12:04 +0000)]
MFC r264313:
Do not increment bio_data in case of BIO_DELETE.

This fixes KASSERT() panic in g_io_request().

10 years agoMFC: r264888
rmacklem [Thu, 8 May 2014 11:59:23 +0000 (11:59 +0000)]
MFC: r264888
The PR reported that the old NFS server did not set uio_td == NULL
for the VOP_READ() call. This patch fixes both the old and new
server for this case.

10 years agoMFC r264853
smh [Thu, 8 May 2014 08:30:18 +0000 (08:30 +0000)]
MFC r264853

Add some new ATA defines for SATA 3.1 spec

Sponsored by: Multiplay

10 years agoMFC r264849 & r264883
smh [Thu, 8 May 2014 08:23:24 +0000 (08:23 +0000)]
MFC r264849 & r264883

Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
values can be viewed.

Sponsored by: Multiplay

10 years agoMFC r264878
smh [Thu, 8 May 2014 08:20:23 +0000 (08:20 +0000)]
MFC r264878

Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
insufficient on some machines

Sponsored by: Multiplay

10 years agoMFC r264863
smh [Thu, 8 May 2014 08:18:48 +0000 (08:18 +0000)]
MFC r264863

Add information about supported NCQ functionality to camcontrol identify.

Sponsored by: Multiplay

10 years agoMFC r264851
smh [Thu, 8 May 2014 08:17:12 +0000 (08:17 +0000)]
MFC r264851

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

Sponsored by: Multiplay

10 years agoMFC r265159:
mav [Thu, 8 May 2014 07:13:22 +0000 (07:13 +0000)]
MFC r265159:
Respect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page.

Nobody yet reported disk supporting I/Os less then our MAXPHYS value, but
since we any way have code to read Block Limits VPD page, that is easy.

10 years agoMFC r265150:
mav [Thu, 8 May 2014 07:12:06 +0000 (07:12 +0000)]
MFC r265150:
Do not reread SCSI disk VPD pages on every device open.

Instead of rereading VPD pages on every device open, do it only on initial
device probe, and in cases when device reported via UNIT ATTENTIONs that
something has changed.  Capacity is still rereaded on every open because
it is more critical for operation and more probable to change in run time.

On my tests with Intel 530 SSDs on mps(4) HBA this change reduces time
GEOM needs to retaste the device (that includes few open/close cycles)
from ~150ms to ~30ms.

10 years agoMFC r264886:
mav [Thu, 8 May 2014 07:10:38 +0000 (07:10 +0000)]
MFC r264886:
Remove limits on size of READ/WRITE operations.

Instead of allocating up to 16MB or RAM at once to handle whole I/O,
allocate up to 1MB at a time, but do multiple ctl_datamove() and storage
I/Os if needed.

10 years agoMFC r264884:
mav [Thu, 8 May 2014 07:08:47 +0000 (07:08 +0000)]
MFC r264884:
Make CAM target CTL frontend respect SIM I/O size limitations.

If datamove size is bigger then SIM can handle, or it has more segments
then this code can handle -- split it into several CTIO requests.

10 years agoMFC r264880 (by trasz):
mav [Thu, 8 May 2014 07:07:51 +0000 (07:07 +0000)]
MFC r264880 (by trasz):
Modify CTL iSCSI frontend to properly handle situations where datamove
routine is called multiple times per SCSI task.

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

In some unknown cases UNMAP commands make device firmware stuck.

10 years agoMFC r264407:
mav [Thu, 8 May 2014 07:04:13 +0000 (07:04 +0000)]
MFC r264407:
Join CTL worker threads into one process for convenience.
Report their idle state as "-".

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

10 years agoMFC r264274, r264279, r264283, r264296, r264297:
mav [Thu, 8 May 2014 07:00:45 +0000 (07:00 +0000)]
MFC r264274, r264279, r264283, r264296, r264297:
Add support for SCSI UNMAP commands to CTL.

This patch adds support for three new SCSI commands: UNMAP, WRITE SAME(10)
and WRITE SAME(16).  WRITE SAME commands support both normal write mode
and UNMAP flag.  To properly report UNMAP capabilities this patch also adds
support for reporting two new VPD pages: Block limits and Logical Block
Provisioning.

UNMAP support can be enabled per-LUN by adding "-o unmap=on" to `ctladm
create` command line or "option unmap on" to lun sections of /etc/ctl.conf.

At this moment UNMAP supported for ramdisks and device-backed block LUNs.
It was tested to work great with ZFS ZVOLs.  For file-backed LUNs UNMAP
support is unfortunately missing due to absence of respective VFS KPI.

Sponsored by:   iXsystems, Inc

10 years agoMFC r260509:
mav [Thu, 8 May 2014 06:55:48 +0000 (06:55 +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.

10 years agoMFC: r264845
rmacklem [Wed, 7 May 2014 22:33:36 +0000 (22:33 +0000)]
MFC: r264845
Remove an unnecessary level of indirection for an argument.
This simplifies the code and should avoid the clang sparc
port from generating an abort() call.

10 years agoMFC: r264842
rmacklem [Wed, 7 May 2014 22:27:03 +0000 (22:27 +0000)]
MFC: r264842
Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
so that it only does the RPC for names that are answered by the RPC.
Doing the RPC for other names is harmless, but unnecessary.

10 years agoMerge r259393 from head:
gavin [Wed, 7 May 2014 21:38:33 +0000 (21:38 +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.

10 years agoMerge r256782 from head:
gavin [Wed, 7 May 2014 20:57:16 +0000 (20:57 +0000)]
Merge r256782 from head:

  Add 26 new device IDs to uslcom(4).  This brings us in sync with Linux
  v3.12 rc5

10 years agoMerge r264984
scottl [Wed, 7 May 2014 20:28:27 +0000 (20:28 +0000)]
Merge r264984

Retire smp_active.  It was racey and caused demonstrated problems with
the cpufreq code.  Replace its use with smp_started.  There's at least
one userland tool that still looks at the kern.smp.active sysctl, so
preserve it but point it to smp_started as well.

Obtained from: Netflix, Inc.

10 years agoMerged r262424-262425,265085
scottl [Wed, 7 May 2014 20:20:52 +0000 (20:20 +0000)]
Merged r262424-262425,265085

Add the -a option to pmcstat.  This produces a full stack track on the
sampled points.  See the man page for details on how this works.

Obtained from:  Netflix, Inc.

10 years agoMFC r263445 and r265385. Note that the change to ObsoleteFiles.inc in
asomers [Wed, 7 May 2014 18:49:25 +0000 (18:49 +0000)]
MFC r263445 and r265385.  Note that the change to ObsoleteFiles.inc in
r265385 does not need to be MFCed, because the obsolete files in question
were never MFCed to any stable branch.

r265385
Remove the ifconfig test added in rev 263445.  After discussion with
melifaro, we agreed that ifconfig's behavior was not a bug.  The main
motivation for bin/187551 was to partially resolve kern/187549, but we
resolved kern/187549 in a different way instead.

ObsoleteFiles.inc
etc/mtree/BSD.tests.dist
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
        Remove /usr/tests/sbin/ifconfig

r263445
Add several ATF tests that deal with multiple fibs.  They're described in
several different PRs, but the tests share some common code, so I'm
committing them together.

sbin/ifconfig/tests
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
        Add fibs_test.sh, which regresses bin/187551

tests/sys/netinet
tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
tests/sys/Makefile
        Add fibs_test.sh, which regresses kern/167947, kern/187552
        kern/187549, kern/187550, and kern/187553

etc/mtree/BSD.tests.dist
        Add newly created directories

10 years agoMFC r263311:
jimharris [Wed, 7 May 2014 17:20:15 +0000 (17:20 +0000)]
MFC r263311:

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

10 years agoMFC r263310:
jimharris [Wed, 7 May 2014 17:18:51 +0000 (17:18 +0000)]
MFC r263310:

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

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

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

10 years agoMFC r263278:
jimharris [Wed, 7 May 2014 17:02:15 +0000 (17:02 +0000)]
MFC r263278:

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

10 years agoMFC r263277:
jimharris [Wed, 7 May 2014 17:00:39 +0000 (17:00 +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.

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

Base the max number of SG elements on MAXPHYS.

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

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

10 years agoMFC r260382:
jimharris [Wed, 7 May 2014 16:55:08 +0000 (16:55 +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.

10 years agoMFC r260381:
jimharris [Wed, 7 May 2014 16:53:42 +0000 (16:53 +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.

10 years agoMFC r258071:
jimharris [Wed, 7 May 2014 16:52:29 +0000 (16:52 +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.

10 years agoDocument r265388, addition of mpr(4).
gjb [Wed, 7 May 2014 12:48:18 +0000 (12:48 +0000)]
Document r265388, addition of mpr(4).

Sponsored by: The FreeBSD Foundation

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

Allow GEOM_VINUM to be statically compiled into the kernel.

Submitted by: gleb

10 years agoMFC r264573+264608+264609:
delphij [Wed, 7 May 2014 08:06:54 +0000 (08:06 +0000)]
MFC r264573+264608+264609:

Sync with OpenBSD.

10 years agoMFC r264405:
trasz [Wed, 7 May 2014 08:04:41 +0000 (08:04 +0000)]
MFC r264405:

Fix periph listing when IOCTL buffer border hits result for wanted bus.

10 years agoMFC r264355 by mav@:
trasz [Wed, 7 May 2014 08:03:30 +0000 (08:03 +0000)]
MFC r264355 by mav@:

Remove unused val argument value from SYSCTL_INT() calls.

10 years agoMFC r264877:
trasz [Wed, 7 May 2014 08:00:59 +0000 (08:00 +0000)]
MFC r264877:

Style fixes.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264876:
trasz [Wed, 7 May 2014 07:59:44 +0000 (07:59 +0000)]
MFC r264876:

Grammar fix.

10 years agoMFC r264604:
trasz [Wed, 7 May 2014 07:57:53 +0000 (07:57 +0000)]
MFC r264604:

Remove redundant code.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264549:
trasz [Wed, 7 May 2014 07:56:36 +0000 (07:56 +0000)]
MFC r264549:

Make it possible for the initiator side to operate in both proxy
and normal mode; this makes it possible to compile with the former
by default, but use it only when neccessary.  That's especially
important for the userland part.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264545:
trasz [Wed, 7 May 2014 07:54:47 +0000 (07:54 +0000)]
MFC r264545:

Fix typo.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264348 by mav@:
trasz [Wed, 7 May 2014 07:53:24 +0000 (07:53 +0000)]
MFC r264348 by mav@:

Improve use of socket buffer upcalls.

Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups
until we have enough data to read or space to write.

Increase partial receive len from 1K to 128K to not wake up on every
received packet.

This significantly reduces locks congestion and CPU usage and improves
throughput for large I/Os on NICs without TSO and LRO.

MFC r264552 by mav@:

Close the race in older code, that caused connection stuck after r264348.

Sponsored by: iXsystems, Inc.

10 years agoMFC r264544:
trasz [Wed, 7 May 2014 07:48:32 +0000 (07:48 +0000)]
MFC r264544:

Add kern.iscsi.fail_on_disconnection; this is required for gmultipath
to work.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264538:
trasz [Wed, 7 May 2014 07:47:29 +0000 (07:47 +0000)]
MFC r264538:

Remove useless debug.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264537:
trasz [Wed, 7 May 2014 07:46:23 +0000 (07:46 +0000)]
MFC r264537:

Be more strict with locking for is_waiting_for_iscsid variable.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264536:
trasz [Wed, 7 May 2014 07:45:22 +0000 (07:45 +0000)]
MFC r264536:

Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
because of ISCSIDFAIL.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264535:
trasz [Wed, 7 May 2014 07:44:17 +0000 (07:44 +0000)]
MFC r264535:

English.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264534:
trasz [Wed, 7 May 2014 07:43:13 +0000 (07:43 +0000)]
MFC r264534:

If we fail to create LUN, try again on next configuration reload.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264533:
trasz [Wed, 7 May 2014 07:41:58 +0000 (07:41 +0000)]
MFC r264533:

Use consistent punctuation.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264532:
trasz [Wed, 7 May 2014 07:40:45 +0000 (07:40 +0000)]
MFC r264532:

Use proper terminology in debug messages.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264531:
trasz [Wed, 7 May 2014 07:39:16 +0000 (07:39 +0000)]
MFC r264531:

Constify.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264530:
trasz [Wed, 7 May 2014 07:37:55 +0000 (07:37 +0000)]
MFC r264530:

Properly pass the initiator address when running in proxy mode.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264529:
trasz [Wed, 7 May 2014 07:36:46 +0000 (07:36 +0000)]
MFC r264529:

Use socket address from accept(2) instead of retrieving it via
getpeername(2).

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264528:
trasz [Wed, 7 May 2014 07:35:21 +0000 (07:35 +0000)]
MFC r264528:

Rework the way we enable CTL iSCSI port.  Previously conf_apply()
needed it to be already enabled, because listening in proxy mode
requires it; however, it's conf_apply() that opens pidfiles,
so it resulted in port being enabled before pidfile was opened.
This was not so bad, but it was also disabled when pidfile couldn't
be opened due to ctld already running; this means that starting
second ctld instance screwed up the first.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264527:
trasz [Wed, 7 May 2014 07:33:56 +0000 (07:33 +0000)]
MFC r264527:

Make it possible to interrupt login when running in proxy mode.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264526:
trasz [Wed, 7 May 2014 07:32:45 +0000 (07:32 +0000)]
MFC r264526:

Properly identify target portal when running in proxy mode.  While here,
remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264525:
trasz [Wed, 7 May 2014 07:31:25 +0000 (07:31 +0000)]
MFC r264525:

Add some stuff to make it easier to figure out for the system administrator
whether the ICL_KERNEL_PROXY stuff got compiled in correctly.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264524:
trasz [Wed, 7 May 2014 07:29:39 +0000 (07:29 +0000)]
MFC r264524:

Make it possible for the iSCSI target side to operate in both normal
and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually
works again.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264500:
trasz [Wed, 7 May 2014 07:28:23 +0000 (07:28 +0000)]
MFC r264500:

Stop treating LUN 0 as mandatory.  There is no reason to do that.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r263740:
trasz [Wed, 7 May 2014 07:25:47 +0000 (07:25 +0000)]
MFC r263740:

Use a less unusual syntax in debug printfs.

Sponsored by: The FreeBSD Foundation

10 years agoMFC r264264 by mav@:
trasz [Wed, 7 May 2014 07:20:02 +0000 (07:20 +0000)]
MFC r264264 by mav@:

Wakeup only one thread of added in r263978i at a time.

This slightly reduces lock congestion between threads.

10 years agoMFC r264163:
trasz [Wed, 7 May 2014 07:18:38 +0000 (07:18 +0000)]
MFC r264163:

Remove hack to pass STAILQ to a function and do it properly instead.

Sponsored by: The FreeBSD Foundation