]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC 304438:
mckusick [Mon, 17 Oct 2016 22:33:29 +0000 (22:33 +0000)]
MFC 304438:

Fsck_ufs was using an int rather than a ufs2_daddr_t to store the
alternate superblock location when given in the -b option.

7 years agoMFC r304230:
mckusick [Mon, 17 Oct 2016 21:44:41 +0000 (21:44 +0000)]
MFC r304230:
Add two new macros, SLIST_CONCAT and LIST_CONCAT.

MFC r304239:
Bug 211013 reports that a write error to a UFS filesystem running
with softupdates panics the kernel.

PR: 211013

7 years agoMFC r302465:
gonzo [Mon, 17 Oct 2016 18:52:25 +0000 (18:52 +0000)]
MFC r302465:

Remove extra 0x before %p format strings introduced by r296182

7 years agoMFC r306790
davidcs [Mon, 17 Oct 2016 18:04:19 +0000 (18:04 +0000)]
MFC r306790
Add support for adding up to 64 Multicast addresses with a single
mailbox command

7 years agoMFC 305925,305926,305960
sephe [Mon, 17 Oct 2016 09:31:49 +0000 (09:31 +0000)]
MFC 305925,305926,305960

305925
    hyperv/hn: Don't mess up RSS key and indirect table after attachment.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7889

305926
    hyperv/hn: Add sysctls to dynamic adjust RSS key and indirect table

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7890

305960
    hyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7916

7 years agoMFC 305801,305923,305924
sephe [Mon, 17 Oct 2016 08:53:12 +0000 (08:53 +0000)]
MFC 305801,305923,305924

305801
    hyperv/hn: Fix some ifnet settings

    - ifnet.if_mtu does not require explicit setting.
    - ifnet.if_hdrlen must be set after ether_ifattach().

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7873

305923
    hyperv/hn: Regroup ifnet setup code.

    While I'm here, add comment along the attach DEVMETHOD.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7874

305924
    hyperv/hn: Put debug message under bootverbose

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7875

7 years agoMFC 305795,305796
sephe [Mon, 17 Oct 2016 08:48:45 +0000 (08:48 +0000)]
MFC 305795,305796

305795
    hyperv/hn: Bring in shims from stable/10

    This eases future MFCs to stable/10.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7871

305796
    hyperv/hn: Remove the FreeBSD_version check for TSO configuration

    It is available on both stable/10 and stable/11. This eases future MFCs
    to stable/10.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7872

7 years agoMFC 305794
sephe [Mon, 17 Oct 2016 08:44:59 +0000 (08:44 +0000)]
MFC 305794

    hyperv/hn: Use sx for the main lock.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7870

7 years agoMFC 305790-305793
sephe [Mon, 17 Oct 2016 08:42:54 +0000 (08:42 +0000)]
MFC 305790-305793

305790
    hyperv/hn: Remove unused softc field

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7866

305791
    hyperv/hn: Deprecate hn_softc_t

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7867

305792
    hyperv/hn: Function renaming: hn_ifinit -> hn_init

    No functional changes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7868

305793
    hyperv/hn: Cleanup hn_ioctl.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7869

7 years agoMFC 305789
sephe [Mon, 17 Oct 2016 08:39:17 +0000 (08:39 +0000)]
MFC 305789

    hyperv/vmbus: Make sure that the sub-channel count is valid.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7865

7 years agoMFC 305724,305725,305727-305730,305760,305761,305763,305788
sephe [Mon, 17 Oct 2016 08:37:19 +0000 (08:37 +0000)]
MFC 305724,305725,305727-305730,305760,305761,305763,305788

305724
    hyperv/hn: Rename RXBUF connect/disconnect functions.

    Minor cleanup and wording in error messages.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7823

305725
    hyperv/hn: Rename chimney sending buffer connect/disconnect functions.

    Minor cleanup and wording in error messages.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7825

305727
    hyperv/hn: Function rename.

    - Minor style changes.
    - Nuke unnecessary indirection.
    - Nuke unapplied comment.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7827

305728
    hyperv/hn: Reorganize sub-channel allocation.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7829

305729
    hyperv/hn: Reorganize RNDIS attach

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7830

305730
    hyperv/hn: Pull ether address and link status extraction up.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7831

305760
    hyperv/hn: Reorganize channel attach/detach code.

    This paves the way for further attach/detach code reorganization.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7858

305761
    hyperv/hn: Regroup synthetic parts attach code.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7859

305763
    hyperv/hn: Reorganize synthetic parts attach code.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7860

305788
    hyperv/hn: Pull RSS key and indirect table setup up.

    This paves the way for the dynamic RSS key and indirect table setting.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7864

7 years agoMFC 305722
sephe [Mon, 17 Oct 2016 08:29:16 +0000 (08:29 +0000)]
MFC 305722

    x86: Use sx lock for interrupt sources.

    - Certain pic_assign_cpu, e.g. msi_assign_cpu can have quite a long
      call chain.  For msi_assign_cpu, mutex makes complex PCI bridge
      drivers more tricky, e.g. sleep can note be called, etc, it will
      be pretty tricky for upcoming Hyper-V PCI bridge driver for PCI
      pass-through.
    - It is not used on any hot code path nor non-sleepable context, so
      sx should have the same effect as mutex.

    PIC list is still protected by mutex to keep suspend/resume work.

    Discussed with: jhb
    Reviewed by:    jhb
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7784

7 years agoMFC 305588
sephe [Mon, 17 Oct 2016 08:27:18 +0000 (08:27 +0000)]
MFC 305588

    pxeboot: Add nfs.read_size tunable.

    Increase this tunable improves kernel loading speed.

    Submitted by:   Jun Su <junsu microsoft com>
    Reviewed by:    rpokala, wblock (previous version)
    Obtained from:  DragonFlyBSD
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7756

7 years agoMFC 305586,305587
sephe [Mon, 17 Oct 2016 08:25:47 +0000 (08:25 +0000)]
MFC 305586,305587

305586
    hyperv/hn: Function renaming.

    While I'm here, remove obvious comment.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7810

305587
    hyperv/hn: Factor out NVS NDIS initialization

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7811

7 years agoMFC 305585
sephe [Mon, 17 Oct 2016 08:23:30 +0000 (08:23 +0000)]
MFC 305585

    hyperv/kvp: Fix IPv4/IPv6 address injection support.

    The GUID string provided by hypervisor has leading and trailing braces,
    while our GUID string does not have braces at all.  Both braces should
    be ignored, when the GUID strings are compared.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Modified by:    sephe
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7809

7 years agoMFC 305578-305581
sephe [Mon, 17 Oct 2016 08:20:17 +0000 (08:20 +0000)]
MFC 305578-305581

305578
    hyperv/hn: Pull vmbus channel open up.

    While I'm here, pull up the channel callback related code too.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7805

305579
    hyperv/hn: Push RXBUF size adjustment down.

    It is not used in other places.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7806

305580
    hyperv/hn: Factor out function to do NVS initialization.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7807

305581
    hyperv/hn: Pass MTU around.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7808

7 years agoMFC 305454,305455,305521,305524-305526
sephe [Mon, 17 Oct 2016 08:16:26 +0000 (08:16 +0000)]
MFC 305454,305455,305521,305524-305526

305454
    hyperv/hn: Fix VLAN tag setup for outgoing VLAN packets.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7785

305455
    hyperv/hn: Avoid bit fields for LSOv2 setup.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7786

305521
    hyperv/hn: Avoid bit fields for TXCSUM setup.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7792

305524
    hyperv/hn: Cleanup RNDIS packet message encapsulation.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7793

305525
    hyperv/hn: Simplify per-packet-info construction.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7794

305526
    hyperv/hn: Nuke unused bits

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7795

7 years agoMFC 305405,305407,305408,305410,305411,305453
sephe [Mon, 17 Oct 2016 08:10:24 +0000 (08:10 +0000)]
MFC 305405,305407,305408,305410,305411,305453

305405
    hyperv/vmbus: Stringent header length and total length check.

    While I'm here, minor style changes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7752

305407
    hyperv/hn: Stringent NVS notification length check.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7753

305408
    hyperv/hn: Stringent NVS RNDIS packets length checks.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7755

305410
    net/rndis: Define RNDIS status message, which could be sent by device.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7757

305411
    hyperv/hn: Stringent RNDIS control message length check.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7758

305453
    hyperv/hn: Stringent RNDIS packet message length/offset check.

    While I'm here, use definition in net/rndis.h

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7782

7 years agoMFC 305279-305281
sephe [Mon, 17 Oct 2016 08:06:19 +0000 (08:06 +0000)]
MFC 305279-305281

305279
    hyperv/ic: Minor style fix.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7743

305280
    hyperv/ic: Cleanup shutdown channel callback.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7744

305281
    hyperv/ic: Cleanup timesync channel callback.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7745

7 years agoMFC 305277,305278
sephe [Mon, 17 Oct 2016 08:03:15 +0000 (08:03 +0000)]
MFC 305277,305278

305277
    net/rndis: Add comment for rndis_comp_hdr

    Reviewed by:    hps
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7738

305278
    net/rndis: Define common message header for RNDIS messages.

    And avoid RNDIS_HEADER_OFFSET hardcoding.

    Reviewed by:    hps
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7739

7 years agoMFC 305175,305176,305179,305182,305268,305270,305276
sephe [Mon, 17 Oct 2016 07:46:13 +0000 (07:46 +0000)]
MFC 305175,305176,305179,305182,305268,305270,305276

305175
    net/rndis: Define per-packet-info for RNDIS packet message

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7708

305176
    hyperv/hn: Stringent per-packet-info verification.

    While I'm here, minor style changes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7709

305179
    hyperv/hn: Fix VLAN tag construction.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7716

305182
    net/rndis: Define types for RNDIS pktinfo rm_type field.

    They are defined by NDIS spec, so the NDIS prefix.

    Reviewed by:    hps
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7717

305268
    hyperv/hn: Rework RXCSUM related bits

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7735

305270
    hyperv/hn: Simplify RX hash related bits.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7736

305276
    hyperv/hn: Use the per-packet-info types defined by net/rndis.h

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7737

7 years agoMFC 305173,305174
sephe [Mon, 17 Oct 2016 07:38:21 +0000 (07:38 +0000)]
MFC 305173,305174

305173
    net/rndis: Add comment for rndis_set_parameter

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7705

305174
    hyperv/hn: Remove unused function

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7706

7 years agoMFC 305111
sephe [Mon, 17 Oct 2016 07:35:31 +0000 (07:35 +0000)]
MFC 305111

    hyperv/timesync: Rework time adjustment policy

    - By default, adjust time upon SYNC request.  It can be disabled
      through hw.hvtimesync.ignore_sync_req.  SYNC request will be
      sent by hypervisor the host is resumed, rebooted, etc.
    - By default, adjust time upon SAMPLE request, if there is 100ms
      difference between VM time and hypervisor time.  This can be
      disabled through hw.hvtimesync.sample_drift.

    And nuke the unnecessary task, since channel callback is running
    in a Hyper-V taskqueue nowadays.

    Submitted by:   YanZhe Chen <t-yachen microsoft com>
    Discussed with: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>, sephe
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7707

7 years agoMFC 305052-305054,305110
sephe [Mon, 17 Oct 2016 07:32:49 +0000 (07:32 +0000)]
MFC 305052-305054,305110

305052
    hyperv/hn: Remove the useless rndis_device and related bits

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7687

305053
    hyperv/hn: Log packet message alignment.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7689

305054
    hyperv/hn: Remove unnecessary NULL check.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7690

305110
    hyperv/hn: Consolidate NVS transaction execution.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7704

7 years agoMFC 305049,305050
sephe [Mon, 17 Oct 2016 07:29:10 +0000 (07:29 +0000)]
MFC 305049,305050

305049
    hyperv/hn: Factor out func to exec RNDIS transaction w/o checking result

    It will be used by RNDIS HALT and RESET.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7685

305050
    hyperv/hn: Switch to new RNDIS transaction execution for halt.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7686

7 years agoMFC 304973,304975,304976,304979,305044-305048
sephe [Mon, 17 Oct 2016 07:27:16 +0000 (07:27 +0000)]
MFC 304973,304975,304976,304979,305044-305048

304973
    hyperv/hn: Switch to new RNDIS query for link status extraction.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7654

304975
    hyperv/hn: Switch to new RNDIS query for RSS capabilities extraction.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7656

304976
    hyperv/hn: Fix # of channels setting, if RSS is not available.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7657

304979
    hyperv/hn: Switch to new RNDIS set for RSS parameters.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7658

305044
    hyperv/hn: Move OIDs to net/rndis.h; they are standard NDIS OIDs.

    Actually all OIDs defined in net/rndis.h are standard NDIS OIDs.
    While I'm here, use the verbose macro name as in NDIS spec.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7679

305045
    hyperv/hn: Indentation and field comment fixup for ndis.h.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7680

305046
    net/rndis: Packet types are defined by NDIS; not RNDIS specific.

    Reviewed by:    hps
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7681

305047
    hyperv/hn: Switch to new RNDIS set for RX filters.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7683

305048
    hyperv/hn: Remove unused function

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7684

7 years agoMFC 304832-304834,304972
sephe [Mon, 17 Oct 2016 07:20:01 +0000 (07:20 +0000)]
MFC 304832-304834,304972

304832
    hyperv/hn: Use vmbus xact for RNDIS query.

    And switch MAC address query to use new RNDIS query function.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7639

304833
    hyperv/hn: Save the adopted NDIS version for RNDIS to use later.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7640

304834
    hyperv/hn: Use vmbus xact for RNDIS set.

    And use new RNDIS set to configure NDIS offloading parameters.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7641

304972
    hyperv/hn: Add definition for NDIS media state.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7652

7 years agoMFC 304790,304791
sephe [Mon, 17 Oct 2016 07:16:04 +0000 (07:16 +0000)]
MFC 304790,304791

304790
    hyperv/vmbus: Add function to calculate max # of elements in a bufring.

    Sponsored by:   Microsoft

304791
    hyperv/storvsc: Increase queue depth and rework channel selection.

    - Increasing queue depth gives ~100% performance improvement for
      randwrite fio test in Azure.
    - New channel selection, which takes LUN id and the current cpuid
      into consideration, gives additional ~20% performance improvement
      for ranwrite fio test in Azure.

    Submitted by:   Hongzhang Jiang <honzhan microsoft com>
    Modified by:    sephe
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7622

7 years agoMFC 304786,304788
sephe [Mon, 17 Oct 2016 07:13:48 +0000 (07:13 +0000)]
MFC 304786,304788

304786
    hyperv/ic: Cleanup heartbeat channel callback.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7626

304788
    hyperv/ic: Update total message size if negotiate message size grows.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7627

7 years agoMFC 304783-304785
sephe [Mon, 17 Oct 2016 07:10:58 +0000 (07:10 +0000)]
MFC 304783-304785

304783
    hyperv/hn: Use definition in net/rndis.h for message type and status code.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7620

304784
    hyperv/hn: Add compat code for RNDIS reorganization phase.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7621

304785
    hyperv/hn: Use vmbus xact for RNDIS initialize.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7624

7 years agoMFC 304730
sephe [Mon, 17 Oct 2016 07:06:14 +0000 (07:06 +0000)]
MFC 304730

    hyperv/ic: Redefine IC version negotiate message.

    And stringent input IC version negotiate message checks.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7614

7 years agoMFC 304724,304728
sephe [Mon, 17 Oct 2016 07:02:17 +0000 (07:02 +0000)]
MFC 304724,304728

304724
    hyperv/hn: Remove the redundant rid setting for RNDIS HALT.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7595

304728
    hyperv/hn: Log a warning for RESET_CMPLT.

    RESET is not used by the hn(4) at all, and RESET_CMPLT does not even
    have a rid to match with the pending requests.  So, let's put it
    onto an independent switch branch and log a warning about it.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7602

7 years agoMFC 304654,304722,304723
sephe [Mon, 17 Oct 2016 06:56:58 +0000 (06:56 +0000)]
MFC 304654,304722,304723

304654
    net: Split RNDIS protocol structs/macros out of dev/usb/net/if_urndisreg.h

    So that Hyper-V can leverage them instead of rolling its own definition.

    Discussed with: hps
    Reviewed by:    hps
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7592

304722
    net/rndis: Add canonical RNDIS major/minor version as of today.

    Reviewed by:    hps
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7593

304723
    net/rndis: Fix RNDIS_STATUS_PENDING definition.

    While I'm here, sort the RNDIS status in ascending order.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7594

7 years agoMFC 304441,304444,304446,304447,304591,304593-304595
sephe [Mon, 17 Oct 2016 06:47:34 +0000 (06:47 +0000)]
MFC 304441,304444,304446,304447,304591,304593-304595

304441
    hyperv/hn: Move NVS version to softc

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7553

304444
    hyperv/hn: Remove assign-only struct field

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7554

304446
    hyperv/hn: Remove the useless num_channel

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7555

304447
    hyperv/hn: Move RXBUF to hn_softc

    And don't recreate RXBUF for each primary channel open, it is now
    created in device_attach DEVMETHOD and destroyed in device_detach
    DEVMETHOD.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7556

304591
    hyperv/hn: Move chimney sending buffer to hn_softc

    And don't recreate chimney sending buffer for each primary channel
    open, it is now created in device_attach DEVMETHOD and destroyed
    in device_detach DEVMETHOD.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7574

304593
    hyperv/hn: Get rid of netvsc_dev

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7575

304594
    hyperv/hn: Factor out function to execute NVS transactions.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7577

304595
    hyperv/hn: Factor out function to simplify NVS request sending

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7578

7 years agoMFC 304331
sephe [Mon, 17 Oct 2016 06:18:10 +0000 (06:18 +0000)]
MFC 304331

    hyperv/kvp: Remove unnecessary function parameter.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7550

7 years agoMFC 304327,304329,304330
sephe [Mon, 17 Oct 2016 06:16:08 +0000 (06:16 +0000)]
MFC 304327,304329,304330

304327
    hyperv/hn: Pass RX packet info to netvsc_recv.

    This paves to nuke netvsc_packet, which does not serves much
    purpose now.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7541

304329
    hyperv/hn: Constify RNDIS messages on RX path.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7542

304330
    hyperv/hn: Get rid of the useless netvsc_packet

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7544

7 years agoMFC 304270,304273
sephe [Mon, 17 Oct 2016 06:12:25 +0000 (06:12 +0000)]
MFC 304270,304273

304270
    hyperv/util: Don't reference hn_softc in KVP

    hn_softc is private data struct.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7519

304273
    hyperv/util: Factor out helper for IC device_probe DEVMETHOD

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7530

7 years agoMFC 304204-304206,304252-304256
sephe [Mon, 17 Oct 2016 06:09:36 +0000 (06:09 +0000)]
MFC 304204-304206,304252-304256

304204
    hyperv/hn: Factor out hn_nvs_send/hn_nvs_send_sglist

    Avoid unnecessary message type setting and centralize the send context
    to transaction id cast.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7500

304205
    hyperv/hn: Simplify RNDIS NVS message sending.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7501

304206
    hyperv/hn: Simplify RNDIS message checks on RX path.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7502

304252
    hyperv/hn: Ignore the useless TX table.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7514

304253
    hyperv/hn: Simplify RNDIS RX packets acknowledgement.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7515

304254
    hyperv/hn: Remove reference to nvsp_msg

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7516

304255
    hyperv/hn: Remove reference to nvsp_status

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7517

304256
    hyperv/hn: Get rid of unused bits

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7518

7 years agoMFC 303945,303947-303949,303989,303992,303998,304001,304002,304109,304111
sephe [Mon, 17 Oct 2016 05:53:38 +0000 (05:53 +0000)]
MFC 303945,303947-303949,303989,303992,303998,304001,304002,304109,304111

303945
    hyperv/vmbus: Add macro to get channel packet data length.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7455

303947
    hyperv/vmbus: Add APIs for various types of transactions.

    Reviewed by:    Jun Su <junsu microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7456

303948
    hyperv/hn: Switch to vmbus xact APIs for NVS initialization

    Reviewed by:    Jun Su <junsu microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7457

303949
    hyperv/vmbus: Use xact APIs to implement post message Hypercall APIs

    Avoid code duplication.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7458

303989
    hyperv/hn: Simplify NDIS configuration.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7466

303992
    hyperv/hn: Simplify NDIS initialization.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7467

303998
    hyperv/hn: Switch to vmbus xact APIs for NVS RXBUF connection.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7469

304001
    hyperv/hn: Switch to vmbus xact APIs for NVS chimney buffer connection.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7470

304002
    hyperv/hn: Simplify RXBUF disconnection.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7472

304109
    hyperv/hn: Simplify chimney sending buffer disconnection.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7479

304111
    hyperv/hn: Switch to vmbus xact APIs for sub-channel alloc request.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7480

7 years agoMFC 303944
sephe [Mon, 17 Oct 2016 05:39:45 +0000 (05:39 +0000)]
MFC 303944

    cam/da: Add quirk for I-O Data USB Flash Disk

    PR:             211716
    Submitted by:   Jun Su <junsu microsoft com>
    Reported by:    Jun Su <junsu microsoft com>
    Sponsored by:   Microsoft

7 years agoMFC 303867,303901
sephe [Mon, 17 Oct 2016 05:37:22 +0000 (05:37 +0000)]
MFC 303867,303901

303867
    hyperv/hn: Move gpa array out of netvsc_packet.

    Prepare to deprecate the netvsc_packet.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7436

303901
    hyperv/hn: Reorganize send done callback.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7450

7 years agoMFC 303822-303824
sephe [Mon, 17 Oct 2016 05:33:41 +0000 (05:33 +0000)]
MFC 303822-303824

303822
    hyperv/ic: Remove never used second parameter of hv_negotiate_version()

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7422

303823
    hyperv/ic: Expose the receive buffer length for callers to use.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7423

303824
    hyperv/ic: Pass the channel callback to hv_util_attach()

    The saved channel callback in util softc is actually never used.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7424

7 years agoMFC 303603-303605,303764
sephe [Mon, 17 Oct 2016 05:28:06 +0000 (05:28 +0000)]
MFC 303603-303605,303764

303603
    hyperv/vmbus: Remove the artificial entry limit of SG and PRP list.

    Just make sure that the total channel packet size does not exceed 1/2
    data size of the TX bufring.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7359

303604
    hyperv/storvsc: Set maxio to 128KB.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7360

303605
    hyperv/storvsc: Stringent PRP list assertions

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7361

303764
    hyperv/vmbus: Only make sure the TX bufring will not be closed.

    KVP can write data, whose size is > 1/2 TX bufring size.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7414

7 years agoMFC 303474
sephe [Mon, 17 Oct 2016 03:51:56 +0000 (03:51 +0000)]
MFC 303474

    hyperv/storvsc: Use busdma(9) and enable PIM_UNMAPPED by default.

    The UNMAPPED I/O greatly improves userland direct disk I/O performance
    by 35% ~ 135%.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7195

7 years agoMFC 303421,303422,303470-303473
sephe [Mon, 17 Oct 2016 03:48:22 +0000 (03:48 +0000)]
MFC 303421,303422,303470-303473

303421
    hyperv/vmbus: Avoid unnecessary mb()

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7333

303422
    hyperv/vmbus: Inclusion cleanup

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7334

303470
    hyperv/vmbus: Reindent function declarations.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7344

303471
    hyperv/vmbus: Forward declare static functions

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7346

303472
    hyperv/vmbus: Move driver glue to the beginning of the files

    Just as most of other drivers do.  And move sysinit function close
    to its SYSINIT.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7347

303473
    hyperv/vmbus: Revoke unnecessary exposure of vmbus softc

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7348

7 years agoMFC 303379
sephe [Mon, 17 Oct 2016 03:42:11 +0000 (03:42 +0000)]
MFC 303379

    hyperv/vmbus: Rename cleaned up bufring code

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7318

7 years agoMFC 303284,303329,303361,303362,303366,303368-303370
sephe [Mon, 17 Oct 2016 03:35:20 +0000 (03:35 +0000)]
MFC 303284,303329,303361,303362,303366,303368-303370

303284
    hyperv/vmbus: Move bufring info definition to vmbus_brvar.h

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7282

303329
    hyperv/vmbus: Nuke unnecessary accessor functions.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7303

303361
    hyperv/vmbus: Initialize RX/TX bufring mutex at channel creation time

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7312

303362
    hyperv/vmbus: Use different struct for RX/TX bufring.

    So that they can use suitable MP synchronization mechanism.

    While I'm here change the bufring init/read/write function names.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7313

303366
    hyperv/vmbus: Update comment for bufring

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7314

303368
    hyperv/vmbus: Cleanup TX bufring write process.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7315

303369
    hyperv/vmbus: Stringent RX bufring data length checks.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7316

303370
    hyperv/vmbus: Cleanup RX bufring read process.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7317

7 years agoMFC 303283
sephe [Mon, 17 Oct 2016 03:29:31 +0000 (03:29 +0000)]
MFC 303283

    hyperv/vmbus: Rename hv_vmbus_priv.h to vmbus_brvar.h

    It only contains bufring related bits for a while.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7281

7 years agoMFC 303178,303180,303182
sephe [Mon, 17 Oct 2016 03:27:23 +0000 (03:27 +0000)]
MFC 303178,303180,303182

303178
    hyperv/vmbus: Cosmetic bufring cleanup.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7267

303180
    hyperv/vmbus: Cleanup and augment bufring sysctl tree creation

    Binary state node is added, so that userland programs do not have
    to parse human readable state string.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7268

303182
    hyperv/vmbus: Move vmbus bufring definition to vmbus_reg.h

    And add more comment about its fields.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7269

7 years agoMFC 303066-303072,303127-303129,303131
sephe [Mon, 17 Oct 2016 03:24:03 +0000 (03:24 +0000)]
MFC 303066-303072,303127-303129,303131

303066
    hyperv/vmbus: Get rid of unnecessary definition.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7240

303067
    hyperv/vmbus: Move IC register definition to Hyper-V utilities

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7241

303068
    hyperv/vmbus: Channel struct field rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7242

303069
    hyperv/vmbus: Pass channel as the first argument for channel callback

    The prepares to kill device private fields in channel struct, which
    are not flexible and extensible.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7243

303070
    hyperv/vmbus: Deprecate the device private data in channel struct

    They are neither flexible nor extensible.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7244

303071
    hyperv/vmbus: Hide channel struct definition.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7245

303072
    hyperv/vmbus: Save MNF trigger location instead of MNF trigger index.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7246

303127
    hyperv/vmbus: Save event flag location and evet flag mask.

    This avoids unnecessary access to the vmbus_softc struct on sending path.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7257

303128
    hyperv/vmbus: Reorder channel fields.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7258

303129
    hyperv/vmbus: Shuffle function declaration and macro definition.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7259

303131
    hyperv: hv_vmbus_channel -> vmbus_channel

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7260

7 years agoMFC 303023
sephe [Mon, 17 Oct 2016 03:07:06 +0000 (03:07 +0000)]
MFC 303023

    hyperv/vmbus: Rename laundered vmbus channel code

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7232

7 years agoMFC 302888-302892,302986,303020-303022
sephe [Mon, 17 Oct 2016 02:44:27 +0000 (02:44 +0000)]
MFC 302888-302892,302986,303020-303022

302888
    hyperv/hn: Busdma-fy rxbuf and chimney sending buffer

    Nuke unused channel GPADL API.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7211

302889
    hyperv/vmbus: Back out r302888 temporarily

    Committed by accident w/ duplicated commit log

    Sponsored by:   Microsoft OSTC

302890
    hyperv/vmbus: Function rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7212

302891
    hyperv/vmbus: Cosmetic vmbus channel close cleanup

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7213

302892
    hyperv/vmbus: Cleanup channel sysctl tree creation

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7214

302986
    hyperv/vmbus: Cosmetic vmbus channel open cleanup

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7217

303020
    hyperv/vmbus: Cleanup cpu based channel selection.

    And create cpu to channel map at device attach time for storvsc(4).

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7229

303021
    hyperv/vmbus: Function rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7230

303022
    hyperv/vmbus: Temp/internal variable/function rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7231

7 years agoMFC 302887
sephe [Mon, 17 Oct 2016 02:38:44 +0000 (02:38 +0000)]
MFC 302887

    hyperv/hn: Busdma-fy rxbuf and chimney sending buffer

    Nuke unused channel GPADL API.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7211

7 years agoMFC 302885,302886
sephe [Mon, 17 Oct 2016 02:36:49 +0000 (02:36 +0000)]
MFC 302885,302886

302885
    hyperv/vmbus: Cleanup channel receiving.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7202

302886
    hyperv/vmbus: Cleanup channel packet receiving.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7204

7 years agoMFC 302882-302884
sephe [Mon, 17 Oct 2016 02:34:13 +0000 (02:34 +0000)]
MFC 302882-302884

302882
    hyperv/vmbus: Function rename

    And reorder the error prone parameters list.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7191

302883
    hyperv/vmbus: Field rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7193

302884
    hyperv/vmbus: Factor out macros to do channel packet length conversion.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7194

7 years agoMFC 302875,302876,302878-302881
sephe [Mon, 17 Oct 2016 02:30:45 +0000 (02:30 +0000)]
MFC 302875,302876,302878-302881

302875
    hyperv/vmbus: Redefine channel packet.

    The channel packet header will be shared w/ PRP (physical region page)
    list channel packet and SG (scatter gather) list channel packet.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7155

302876
    hyperv/vmbus: Rework sglist sending.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7156

302878
    hyeprv/vmbus: Rework prplist sending.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7175

302879
    hyperv/vmbus: Move channel packet flags definition to vmbus.h

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7176

302880
    hyperv/vmbus: Move channel packet types definition to vmbus.h

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7177

302881
    hyperv/vmbus: Cleanup channel sending

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7178

7 years agoMFC 302873,302874
sephe [Mon, 17 Oct 2016 02:25:43 +0000 (02:25 +0000)]
MFC 302873,302874

302873
    hyperv/vmbus: Set vcpuid to 0, if MSR_HV_VP_INDEX does not exist.

    Mainly for compatibility.  While I'm here, rename cpuid related
    fields in hv_vmbus_channel.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7141

302874
    hyperv/vmbus: Field rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7146

7 years agoMFC 302871,302872
sephe [Mon, 17 Oct 2016 02:23:05 +0000 (02:23 +0000)]
MFC 302871,302872

302871
    hyperv/vmbus: Add vmbus_chan_gpadl_connect, which takes GPA physaddr

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7139

302872
    hyperv/vmbus: Busdma-fy channel bufring.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7140

7 years agoMFC 302867-302870
sephe [Mon, 17 Oct 2016 02:19:55 +0000 (02:19 +0000)]
MFC 302867-302870

302867
    hyperv/vmbus: Remove unused struct

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7127

302868
    hyperv/vmbus: Function rename

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7129

302869
    hyperv/vmbus: Remove unused function definition/declaration.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7131

302870
    hyperv/vmbus: Use iovec for bufring scatter/gather list.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7134

7 years agoMFC 302864
sephe [Mon, 17 Oct 2016 02:12:49 +0000 (02:12 +0000)]
MFC 302864

    hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7126

7 years agoMFC 302816-302818
sephe [Mon, 17 Oct 2016 02:02:44 +0000 (02:02 +0000)]
MFC 302816-302818

302816
    hyperv/vmbus: Release vmbus channel lock before detach devices

    Device detach method may sleep.

    While I'm here, rename the function, fix indentation and function
    comment.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7110

302817
    hyperv/vmbus: Field renaming to reflect reality

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7111

302818
    hyperv/vmbus: Fix the racy channel close.

    It is not safe to iterate the sub-channel list w/o lock on the
    close path, while it's even more difficult to hold the lock
    and iterate the sub-channel list.  We leverage the
    vmbua_{get,rel}_subchan() functions to solve this dilemma.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7112

7 years agoMFC 302808-302815
sephe [Mon, 17 Oct 2016 01:59:42 +0000 (01:59 +0000)]
MFC 302808-302815

302808
    hyperv/vmbus: Alloc/Free monitor param in vmbus channel alloc/free.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7101

302809
    hyperv/vmbus: Move device register and channel free to the caller.

    This paves the way for more cleanup/disentangle.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7102

302810
    hyperv/vmbus: Move new channel scan notification to device register

    And nuke now unnecessary function indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7103

302811
    hyperv/vmbus: Cleanup vmbus_chan_msgproc_choffer

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7104

302812
    hyperv/vmbus: Nuke the channel open state.

    Channel is either opened or not-opened.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7105

302813
    hyperv/vmbus: Cleanup vmbus_chan_add()

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7106

302814
    hyperv/vmbus: Use sub-channel index to detect primary channel

    In case that VMBUS_CHAN_ISPRIMARY is needed in the early place of
    channel setup.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7108

302815
    hyperv/vmbus: Only add primary channels to vmbus channel list

    - Make the vmbus_chan_add more straightforward.
    - Partially fix the hv_vmbus_release_unattached_channels().

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7109

7 years agoMFC 302733,302737,302801-302806
sephe [Mon, 17 Oct 2016 01:47:49 +0000 (01:47 +0000)]
MFC 302733,302737,302801-302806

302733
    hyperv/vmbus: Remove unused code

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7089

302737
    hyperv/vmbus: Cleanup channel rescind

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7090

302801
    hyperv/vmbus: Remove unused bits

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7091

302802
    hyperv: hv_guid -> struct hyperv_guid.

    This paves way for the further cleanup/disentangle.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7092

302803
    hyperv/vmbus: Move channel offer message definition to vmbus_reg.h

    - Avoid bit fields.
    - Avoid unnecessary indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7093

302804
    hyperv/vmbus: Switch to vmbus channel message macros

    Prepare for more cleanup.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7094

302805
    hyperv/vmbus: Remove unused bits

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7095

302806
    hyperv/vmbus: Get rid of rel{_id,id}, use channel id consistently.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7100

7 years agoMFC r306840:
sevan [Sun, 16 Oct 2016 23:55:20 +0000 (23:55 +0000)]
MFC r306840:
Sort SEE ALSO section sequentially.
Highlighted by mandoc -Tlint

PR:             212440
Approved by:    imp
Differential Revision:  https://reviews.freebsd.org/D8192

7 years agoMFC r306736:
sevan [Sun, 16 Oct 2016 23:52:27 +0000 (23:52 +0000)]
MFC r306736:
Add history section to nos-tun(8)

PR: 212545
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306735:
sevan [Sun, 16 Oct 2016 23:51:15 +0000 (23:51 +0000)]
MFC r306735:
Add history section to natd(8)
Fix back sentence raised by igor.

PR:             212544
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306734:
sevan [Sun, 16 Oct 2016 23:48:23 +0000 (23:48 +0000)]
MFC r306734:
Add history section to fsck_ffs(8)
Move sentence to a new line as advised by igor.

PR: 212474
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306733:
sevan [Sun, 16 Oct 2016 23:47:00 +0000 (23:47 +0000)]
MFC r306733:
Add history section to fsck(8)

PR: 212472
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306732:
sevan [Sun, 16 Oct 2016 23:42:19 +0000 (23:42 +0000)]
MFC r306732:
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach.
Add authors section.

[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps

PR: 212470
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306731:
sevan [Sun, 16 Oct 2016 23:40:17 +0000 (23:40 +0000)]
MFC r306731:
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.
5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation
 older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fd
isk first appeared in Mach.
Add authors section.
Make correction pointed by igor
[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps
PR:             212469
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306728:
sevan [Sun, 16 Oct 2016 23:36:52 +0000 (23:36 +0000)]
MFC r306728:
Add history section for devfs(8)
Move sentence to a new line as advised by igor.

PR: 212441
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306727:
sevan [Sun, 16 Oct 2016 23:35:04 +0000 (23:35 +0000)]
MFC r306727:
Add history section for devd(8)
Move sentence to a new line as advised by igor

PR:             212439
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306725:
sevan [Sun, 16 Oct 2016 23:31:15 +0000 (23:31 +0000)]
MFC r306725:
Add history section for clri(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man8/clri.8

PR: 212438
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306724:
sevan [Sun, 16 Oct 2016 23:29:40 +0000 (23:29 +0000)]
MFC r306724:
Add history section for bsdlabel(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/man/cat8/disklabel.0
Remove tab after space, highlighted by igor

PR:             212436
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306723:
sevan [Sun, 16 Oct 2016 23:26:11 +0000 (23:26 +0000)]
MFC r306723:
Add history section for atmconfig(8)

PR: 212415
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306722:
sevan [Sun, 16 Oct 2016 23:19:14 +0000 (23:19 +0000)]
MFC r306722:
Add history section for test(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c

PR:             211789
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306721:
sevan [Sun, 16 Oct 2016 23:15:33 +0000 (23:15 +0000)]
MFC r306721:
Add history section for stty(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1

PR: 211788
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306720:
sevan [Sun, 16 Oct 2016 23:14:27 +0000 (23:14 +0000)]
MFC r306720:
Add history section of pwd(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c

PR:             211787
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306719:
sevan [Sun, 16 Oct 2016 23:11:33 +0000 (23:11 +0000)]
MFC r306719:
Document origins of expr & authors
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1

PR: 173979
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306718:
sevan [Sun, 16 Oct 2016 23:09:55 +0000 (23:09 +0000)]
MFC r306718:
Add history section for echo(1)
Sourced using the draft copy of the second edition manual
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf

PR:             211785
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306617:
sevan [Sun, 16 Oct 2016 23:03:47 +0000 (23:03 +0000)]
MFC r306617:
shutdown appeared as a standalone utility in 4.1BSD.
http://mail-index.netbsd.org/source-changes-d/2016/09/13/msg008686.html
http://mail-index.netbsd.org/source-changes-d/2016/09/14/msg008691.html
PR: 212552
Approved by: bcr (mentor)
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306616:
sevan [Sun, 16 Oct 2016 22:54:23 +0000 (22:54 +0000)]
MFC r306616:
setkey appeared in FreeBSD 4.0

PR: 212551
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306615:
sevan [Sun, 16 Oct 2016 22:51:25 +0000 (22:51 +0000)]
MFC r306615:
sconfig appeared in FreeBSD 5.2.

PR: 212550
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306614:
sevan [Sun, 16 Oct 2016 22:33:51 +0000 (22:33 +0000)]
MFC r306614:
Note the version PF first appeared in FreeBSD & from which version it was ported from.
Address the contractions raised by igor.

PR:             212574
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8105

7 years agoMFC r306613:
sevan [Sun, 16 Oct 2016 22:31:10 +0000 (22:31 +0000)]
MFC r306613:
Note the change of name in FreeBSD 5.0.

PR: 212542
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306612:
sevan [Sun, 16 Oct 2016 22:26:39 +0000 (22:26 +0000)]
MFC r306612:
Note the name change from mount_null to mount_nullfs in FreeBSD 5.0.

PR: 212541
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r307038
arybchik [Sat, 15 Oct 2016 13:42:52 +0000 (13:42 +0000)]
MFC r307038

sfxge(4): update external port mapping for Medford

Extend the mapping table for external port numbering to support port modes
which output to the second external port only. Where supported, map from
the current port mode rather than inferring from all the available modes.
Updated comments for clarity.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r306944
arybchik [Sat, 15 Oct 2016 13:39:30 +0000 (13:39 +0000)]
MFC r306944

sfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode
definition use

It fixes driver attach issue to a new firmware which reports a new
port-modes.

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r306853
bapt [Sat, 15 Oct 2016 12:41:11 +0000 (12:41 +0000)]
MFC r306853

Import tzdata 2016g

7 years agoMFC r306852
bapt [Sat, 15 Oct 2016 12:37:57 +0000 (12:37 +0000)]
MFC r306852

Incorporate a change from OpenBSD by millert@OpenBSD.org

Don't warn about valid time zone abbreviations.  POSIX
through 2000 says that an abbreviation cannot start with ':', and
cannot contain ',', '-', '+', NUL, or a digit.  POSIX from 2001
on changes this rule to say that an abbreviation can contain only
'-', '+', and alphanumeric characters from the portable character
set in the current locale.  To be portable to both sets of rules,
an abbreviation must therefore use only ASCII letters."  Adapted
from tzcode2015f.

This is needed to be able to update tzdata to a newer version

7 years agoMFC r306877
bapt [Sat, 15 Oct 2016 12:35:16 +0000 (12:35 +0000)]
MFC r306877

Remove the WITH_FMAKE option left over from r284464

7 years agoMFC r306854
bapt [Sat, 15 Oct 2016 12:22:06 +0000 (12:22 +0000)]
MFC r306854

Update pci_vendors to 2016-10-03

7 years agoMFC r302951,r302952,r304071:
mmel [Sat, 15 Oct 2016 09:09:25 +0000 (09:09 +0000)]
MFC r302951,r302952,r304071:

  r302951:
    OFWPCI: Improve resource handling.  - add new rman for prefetchable memory.
    Is used only if given 'ranges'
      property contains prefetchable memory range.
  r302952:
    OFWPCI: Add support for NEW_PCIB.
  r304071:
    OFWPCI: Don't strip RF_ACTIVE from flags when parent bus method is called.

7 years agoMFC r302560:
mmel [Sat, 15 Oct 2016 08:52:42 +0000 (08:52 +0000)]
MFC r302560:

  OFWPCI: Fix style(9).  No functional change.

7 years agoMFC r306759:
mmel [Sat, 15 Oct 2016 08:31:46 +0000 (08:31 +0000)]
MFC r306759:

  ARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6 specific
  file. Consistently use BUSDMA_DCACHE_ALIGN for cache line alignment.

7 years agoMFC r306756:
mmel [Sat, 15 Oct 2016 08:27:54 +0000 (08:27 +0000)]
MFC r306756:

  ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it
  directly.

7 years agoMFC r306755:
mmel [Sat, 15 Oct 2016 07:38:27 +0000 (07:38 +0000)]
MFC r306755:

  ARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores.  Not a
  functional change.

7 years agoMFC r306754:
mmel [Sat, 15 Oct 2016 07:30:13 +0000 (07:30 +0000)]
MFC r306754:

  ARM: Remove unused variable.  Not a functional change.

7 years agoMFC r307000, r307001:
avos [Sat, 15 Oct 2016 07:28:46 +0000 (07:28 +0000)]
MFC r307000, r307001:

mbuf(9), mbuf_tags(9): fix function prototypes.

- Add m_getclr(9) symlink to ObsoleteFiles.inc (removed in r295481).
- Add const qualifiers in m_dup(), m_dup_pkthdr() and m_tag_copy_chain()
(r286450).
- Fix m_dup_pkthdr() definition (it's not the same as m_move_pkthdr()).

7 years agoBump __FreeBSD_version for todays ZFS merges.
mav [Fri, 14 Oct 2016 18:42:30 +0000 (18:42 +0000)]
Bump __FreeBSD_version for todays ZFS merges.