]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'pci-v4.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Jun 2018 19:45:58 +0000 (12:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Jun 2018 19:45:58 +0000 (12:45 -0700)
Pull PCI updates from Bjorn Helgaas:

  - unify AER decoding for native and ACPI CPER sources (Alexandru
    Gagniuc)

  - add TLP header info to AER tracepoint (Thomas Tai)

  - add generic pcie_wait_for_link() interface (Oza Pawandeep)

  - handle AER ERR_FATAL by removing and re-enumerating devices, as
    Downstream Port Containment does (Oza Pawandeep)

  - factor out common code between AER and DPC recovery (Oza Pawandeep)

  - stop triggering DPC for ERR_NONFATAL errors (Oza Pawandeep)

  - share ERR_FATAL recovery path between AER and DPC (Oza Pawandeep)

  - disable ASPM L1.2 substate if we don't have LTR (Bjorn Helgaas)

  - respect platform ownership of LTR (Bjorn Helgaas)

  - clear interrupt status in top half to avoid interrupt storm (Oza
    Pawandeep)

  - neaten pci=earlydump output (Andy Shevchenko)

  - avoid errors when extended config space inaccessible (Gilles Buloz)

  - prevent sysfs disable of device while driver attached (Christoph
    Hellwig)

  - use core interface to report PCIe link properties in bnx2x, bnxt_en,
    cxgb4, ixgbe (Bjorn Helgaas)

  - remove unused pcie_get_minimum_link() (Bjorn Helgaas)

  - fix use-before-set error in ibmphp (Dan Carpenter)

  - fix pciehp timeouts caused by Command Completed errata (Bjorn
    Helgaas)

  - fix refcounting in pnv_php hotplug (Julia Lawall)

  - clear pciehp Presence Detect and Data Link Layer Status Changed on
    resume so we don't miss hotplug events (Mika Westerberg)

  - only request pciehp control if we support it, so platform can use
    ACPI hotplug otherwise (Mika Westerberg)

  - convert SHPC to be builtin only (Mika Westerberg)

  - request SHPC control via _OSC if we support it (Mika Westerberg)

  - simplify SHPC handoff from firmware (Mika Westerberg)

  - fix an SHPC quirk that mistakenly included *all* AMD bridges as well
    as devices from any vendor with device ID 0x7458 (Bjorn Helgaas)

  - assign a bus number even to non-native hotplug bridges to leave
    space for acpiphp additions, to fix a common Thunderbolt xHCI
    hot-add failure (Mika Westerberg)

  - keep acpiphp from scanning native hotplug bridges, to fix common
    Thunderbolt hot-add failures (Mika Westerberg)

  - improve "partially hidden behind bridge" messages from core (Mika
    Westerberg)

  - add macros for PCIe Link Control 2 register (Frederick Lawler)

  - replace IB/hfi1 custom macros with PCI core versions (Frederick
    Lawler)

  - remove dead microblaze and xtensa code (Bjorn Helgaas)

  - use dev_printk() when possible in xtensa and mips (Bjorn Helgaas)

  - remove unused pcie_port_acpi_setup() and portdrv_acpi.c (Bjorn
    Helgaas)

  - add managed interface to get PCI host bridge resources from OF (Jan
    Kiszka)

  - add support for unbinding generic PCI host controller (Jan Kiszka)

  - fix memory leaks when unbinding generic PCI host controller (Jan
    Kiszka)

  - request legacy VGA framebuffer only for VGA devices to avoid false
    device conflicts (Bjorn Helgaas)

  - turn on PCI_COMMAND_IO & PCI_COMMAND_MEMORY in pci_enable_device()
    like everybody else, not in pcibios_fixup_bus() (Bjorn Helgaas)

  - add generic enable function for simple SR-IOV hardware (Alexander
    Duyck)

  - use generic SR-IOV enable for ena, nvme (Alexander Duyck)

  - add ACS quirk for Intel 7th & 8th Gen mobile (Alex Williamson)

  - add ACS quirk for Intel 300 series (Mika Westerberg)

  - enable register clock for Armada 7K/8K (Gregory CLEMENT)

  - reduce Keystone "link already up" log level (Fabio Estevam)

  - move private DT functions to drivers/pci/ (Rob Herring)

  - factor out dwc CONFIG_PCI Kconfig dependencies (Rob Herring)

  - add DesignWare support to the endpoint test driver (Gustavo
    Pimentel)

  - add DesignWare support for endpoint mode (Gustavo Pimentel)

  - use devm_ioremap_resource() instead of devm_ioremap() in dra7xx and
    artpec6 (Gustavo Pimentel)

  - fix Qualcomm bitwise NOT issue (Dan Carpenter)

  - add Qualcomm runtime PM support (Srinivas Kandagatla)

  - fix DesignWare enumeration below bridges (Koen Vandeputte)

  - use usleep() instead of mdelay() in endpoint test (Jia-Ju Bai)

  - add configfs entries for pci_epf_driver device IDs (Kishon Vijay
    Abraham I)

  - clean up pci_endpoint_test driver (Gustavo Pimentel)

  - update Layerscape maintainer email addresses (Minghuan Lian)

  - add COMPILE_TEST to improve build test coverage (Rob Herring)

  - fix Hyper-V bus registration failure caused by domain/serial number
    confusion (Sridhar Pitchai)

  - improve Hyper-V refcounting and coding style (Stephen Hemminger)

  - avoid potential Hyper-V hang waiting for a response that will never
    come (Dexuan Cui)

  - implement Mediatek chained IRQ handling (Honghui Zhang)

  - fix vendor ID & class type for Mediatek MT7622 (Honghui Zhang)

  - add Mobiveil PCIe host controller driver (Subrahmanya Lingappa)

  - add Mobiveil MSI support (Subrahmanya Lingappa)

  - clean up clocks, MSI, IRQ mappings in R-Car probe failure paths
    (Marek Vasut)

  - poll more frequently (5us vs 5ms) while waiting for R-Car data link
    active (Marek Vasut)

  - use generic OF parsing interface in R-Car (Vladimir Zapolskiy)

  - add R-Car V3H (R8A77980) "compatible" string (Sergei Shtylyov)

  - add R-Car gen3 PHY support (Sergei Shtylyov)

  - improve R-Car PHYRDY polling (Sergei Shtylyov)

  - clean up R-Car macros (Marek Vasut)

  - use runtime PM for R-Car controller clock (Dien Pham)

  - update arm64 defconfig for Rockchip (Shawn Lin)

  - refactor Rockchip code to facilitate both root port and endpoint
    mode (Shawn Lin)

  - add Rockchip endpoint mode driver (Shawn Lin)

  - support VMD "membar shadow" feature (Jon Derrick)

  - support VMD bus number offsets (Jon Derrick)

  - add VMD "no AER source ID" quirk for more device IDs (Jon Derrick)

  - remove unnecessary host controller CONFIG_PCIEPORTBUS Kconfig
    selections (Bjorn Helgaas)

  - clean up quirks.c organization and whitespace (Bjorn Helgaas)

* tag 'pci-v4.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (144 commits)
  PCI/AER: Replace struct pcie_device with pci_dev
  PCI/AER: Remove unused parameters
  PCI: qcom: Include gpio/consumer.h
  PCI: Improve "partially hidden behind bridge" log message
  PCI: Improve pci_scan_bridge() and pci_scan_bridge_extend() doc
  PCI: Move resource distribution for single bridge outside loop
  PCI: Account for all bridges on bus when distributing bus numbers
  ACPI / hotplug / PCI: Drop unnecessary parentheses
  ACPI / hotplug / PCI: Mark stale PCI devices disconnected
  ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug
  PCI: hotplug: Add hotplug_is_native()
  PCI: shpchp: Add shpchp_is_native()
  PCI: shpchp: Fix AMD POGO identification
  PCI: mobiveil: Add MSI support
  PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver
  PCI/AER: Decode Error Source Requester ID
  PCI/AER: Remove aer_recover_work_func() forward declaration
  PCI/DPC: Use the generic pcie_do_fatal_recovery() path
  PCI/AER: Pass service type to pcie_do_fatal_recovery()
  PCI/DPC: Disable ERR_NONFATAL handling by DPC
  ...

18 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
MAINTAINERS
arch/microblaze/include/asm/pci.h
arch/xtensa/include/asm/pci.h
drivers/infiniband/hw/hfi1/pcie.c
drivers/iommu/amd_iommu.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/nvme/host/pci.c
drivers/pci/Kconfig
drivers/pci/host/pci-aardvark.c
drivers/pci/pci-driver.c
drivers/pci/pci.c
include/linux/acpi.h
include/linux/pci.h
include/uapi/linux/pci_regs.h

index 1beb30d8d7fc18b3d278d8710553b1a80a1972a1,a19ccac3b4c7bb7f7a3a4717821b097f94e70593..20cc45602f4567bdc894bd3b604fa74e404c8b93
                        use by PCI
                        Format: <irq>,<irq>...
  
 -      acpi_mask_gpe=  [HW,ACPI]
 +      acpi_mask_gpe=  [HW,ACPI]
                        Due to the existence of _Lxx/_Exx, some GPEs triggered
                        by unsupported hardware/firmware features can result in
 -                        GPE floodings that cannot be automatically disabled by
 -                        the GPE dispatcher.
 +                      GPE floodings that cannot be automatically disabled by
 +                      the GPE dispatcher.
                        This facility can be used to prevent such uncontrolled
                        GPE floodings.
                        Format: <int>
                        for platform specific values (SB1, Loongson3 and
                        others).
  
 -      ccw_timeout_log [S390]
 +      ccw_timeout_log [S390]
                        See Documentation/s390/CommonIO for details.
  
 -      cgroup_disable= [KNL] Disable a particular controller
 +      cgroup_disable= [KNL] Disable a particular controller
                        Format: {name of the controller(s) to disable}
                        The effects of cgroup_disable=foo are:
                        - foo isn't auto-mounted if you mount all cgroups in
                        those clocks in any way. This parameter is useful for
                        debug and development, but should not be needed on a
                        platform with proper driver support.  For more
 -                      information, see Documentation/clk.txt.
 +                      information, see Documentation/driver-api/clk.rst.
  
        clock=          [BUGS=X86-32, HW] gettimeofday clocksource override.
                        [Deprecated]
                        Sets the size of memory pool for coherent, atomic dma
                        allocations, by default set to 256K.
  
 -      code_bytes      [X86] How many bytes of object code to print
 -                      in an oops report.
 -                      Range: 0 - 8192
 -                      Default: 64
 -
        com20020=       [HW,NET] ARCnet - COM20020 chipset
                        Format:
                        <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]]
                hvc<n>  Use the hypervisor console device <n>. This is for
                        both Xen and PowerPC hypervisors.
  
 -                If the device connected to the port is not a TTY but a braille
 -                device, prepend "brl," before the device type, for instance
 +              If the device connected to the port is not a TTY but a braille
 +              device, prepend "brl," before the device type, for instance
                        console=brl,ttyS0
                For now, only VisioBraille is supported.
  
  
        consoleblank=   [KNL] The console blank (screen saver) timeout in
                        seconds. A value of 0 disables the blank timer.
 -                       Defaults to 0.
 +                      Defaults to 0.
  
        coredump_filter=
                        [KNL] Change the default value for
                        or memory reserved is below 4G.
  
        cryptomgr.notests
 -                        [KNL] Disable crypto self-tests
 +                      [KNL] Disable crypto self-tests
  
        cs89x0_dma=     [HW,NET]
                        Format: <dma>
                        Format: <port#>,<type>
                        See also Documentation/input/devices/joystick-parport.rst
  
 -      ddebug_query=   [KNL,DYNAMIC_DEBUG] Enable debug messages at early boot
 +      ddebug_query=   [KNL,DYNAMIC_DEBUG] Enable debug messages at early boot
                        time. See
                        Documentation/admin-guide/dynamic-debug-howto.rst for
                        details.  Deprecated, see dyndbg.
                        causing system reset or hang due to sending
                        INIT from AP to BSP.
  
 -      disable_ddw     [PPC/PSERIES]
 +      disable_ddw     [PPC/PSERIES]
                        Disable Dynamic DMA Window support. Use this if
                        to workaround buggy firmware.
  
                        address. The serial port must already be setup
                        and configured. Options are not yet supported.
  
 +              qcom_geni,<addr>
 +                      Start an early, polled-mode console on a Qualcomm
 +                      Generic Interface (GENI) based serial port at the
 +                      specified address. The serial port must already be
 +                      setup and configured. Options are not yet supported.
 +
        earlyprintk=    [X86,SH,ARM,M68k,S390]
                        earlyprintk=vga
                        earlyprintk=efi
                        parameter will force ia64_sal_cache_flush to call
                        ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
  
 -      forcepae [X86-32]
 +      forcepae        [X86-32]
                        Forcefully enable Physical Address Extension (PAE).
                        Many Pentium M systems disable PAE but may have a
                        functionally usable PAE implementation.
  
        gamma=          [HW,DRM]
  
 -      gart_fix_e820=  [X86_64] disable the fix e820 for K8 GART
 +      gart_fix_e820=  [X86_64] disable the fix e820 for K8 GART
                        Format: off | on
                        default: on
  
                        x86-64 are 2M (when the CPU supports "pse") and 1G
                        (when the CPU supports the "pdpe1gb" cpuinfo flag).
  
 -      hvc_iucv=       [S390] Number of z/VM IUCV hypervisor console (HVC)
 -                             terminal devices. Valid values: 0..8
 -      hvc_iucv_allow= [S390] Comma-separated list of z/VM user IDs.
 -                             If specified, z/VM IUCV HVC accepts connections
 -                             from listed z/VM user IDs only.
 +      hung_task_panic=
 +                      [KNL] Should the hung task detector generate panics.
 +                      Format: <integer>
  
 +                      A nonzero value instructs the kernel to panic when a
 +                      hung task is detected. The default value is controlled
 +                      by the CONFIG_BOOTPARAM_HUNG_TASK_PANIC build-time
 +                      option. The value selected by this boot parameter can
 +                      be changed later by the kernel.hung_task_panic sysctl.
 +
 +      hvc_iucv=       [S390]  Number of z/VM IUCV hypervisor console (HVC)
 +                              terminal devices. Valid values: 0..8
 +      hvc_iucv_allow= [S390]  Comma-separated list of z/VM user IDs.
 +                              If specified, z/VM IUCV HVC accepts connections
 +                              from listed z/VM user IDs only.
        keep_bootcon    [KNL]
                        Do not unregister boot console at start. This is only
                        useful for debugging when something happens in the window
                        between unregistering the boot console and initializing
                        the real console.
  
 -      i2c_bus=        [HW] Override the default board specific I2C bus speed
 -                           or register an additional I2C bus that is not
 -                           registered from board initialization code.
 -                           Format:
 -                           <bus_id>,<clkrate>
 +      i2c_bus=        [HW]    Override the default board specific I2C bus speed
 +                              or register an additional I2C bus that is not
 +                              registered from board initialization code.
 +                              Format:
 +                              <bus_id>,<clkrate>
  
        i8042.debug     [HW] Toggle i8042 debug mode
        i8042.unmask_kbd_data
                        Default: only on s2r transitions on x86; most other
                        architectures force reset to be always executed
        i8042.unlock    [HW] Unlock (ignore) the keylock
 -      i8042.kbdreset  [HW] Reset device connected to KBD port
 +      i8042.kbdreset  [HW] Reset device connected to KBD port
  
        i810=           [HW,DRM]
  
                        programs exec'd, files mmap'd for exec, and all files
                        opened for read by uid=0.
  
 -      ima_template=   [IMA]
 +      ima_template=   [IMA]
                        Select one of defined IMA measurements template formats.
                        Formats: { "ima" | "ima-ng" | "ima-sig" }
                        Default: "ima-ng"
  
        ima_template_fmt=
 -                      [IMA] Define a custom template format.
 +                      [IMA] Define a custom template format.
                        Format: { "field1|...|fieldN" }
  
        ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage
        inport.irq=     [HW] Inport (ATI XL and Microsoft) busmouse driver
                        Format: <irq>
  
 -      int_pln_enable  [x86] Enable power limit notification interrupt
 +      int_pln_enable  [x86] Enable power limit notification interrupt
  
        integrity_audit=[IMA]
                        Format: { "0" | "1" }
                        0       disables intel_idle and fall back on acpi_idle.
                        1 to 9  specify maximum depth of C-state.
  
 -      intel_pstate=  [X86]
 -                     disable
 -                       Do not enable intel_pstate as the default
 -                       scaling driver for the supported processors
 -                     passive
 -                       Use intel_pstate as a scaling driver, but configure it
 -                       to work with generic cpufreq governors (instead of
 -                       enabling its internal governor).  This mode cannot be
 -                       used along with the hardware-managed P-states (HWP)
 -                       feature.
 -                     force
 -                       Enable intel_pstate on systems that prohibit it by default
 -                       in favor of acpi-cpufreq. Forcing the intel_pstate driver
 -                       instead of acpi-cpufreq may disable platform features, such
 -                       as thermal controls and power capping, that rely on ACPI
 -                       P-States information being indicated to OSPM and therefore
 -                       should be used with caution. This option does not work with
 -                       processors that aren't supported by the intel_pstate driver
 -                       or on platforms that use pcc-cpufreq instead of acpi-cpufreq.
 -                     no_hwp
 -                       Do not enable hardware P state control (HWP)
 -                       if available.
 -              hwp_only
 -                      Only load intel_pstate on systems which support
 -                      hardware P state control (HWP) if available.
 -              support_acpi_ppc
 -                      Enforce ACPI _PPC performance limits. If the Fixed ACPI
 -                      Description Table, specifies preferred power management
 -                      profile as "Enterprise Server" or "Performance Server",
 -                      then this feature is turned on by default.
 -              per_cpu_perf_limits
 -                      Allow per-logical-CPU P-State performance control limits using
 -                      cpufreq sysfs interface
 +      intel_pstate=   [X86]
 +                      disable
 +                        Do not enable intel_pstate as the default
 +                        scaling driver for the supported processors
 +                      passive
 +                        Use intel_pstate as a scaling driver, but configure it
 +                        to work with generic cpufreq governors (instead of
 +                        enabling its internal governor).  This mode cannot be
 +                        used along with the hardware-managed P-states (HWP)
 +                        feature.
 +                      force
 +                        Enable intel_pstate on systems that prohibit it by default
 +                        in favor of acpi-cpufreq. Forcing the intel_pstate driver
 +                        instead of acpi-cpufreq may disable platform features, such
 +                        as thermal controls and power capping, that rely on ACPI
 +                        P-States information being indicated to OSPM and therefore
 +                        should be used with caution. This option does not work with
 +                        processors that aren't supported by the intel_pstate driver
 +                        or on platforms that use pcc-cpufreq instead of acpi-cpufreq.
 +                      no_hwp
 +                        Do not enable hardware P state control (HWP)
 +                        if available.
 +                      hwp_only
 +                        Only load intel_pstate on systems which support
 +                        hardware P state control (HWP) if available.
 +                      support_acpi_ppc
 +                        Enforce ACPI _PPC performance limits. If the Fixed ACPI
 +                        Description Table, specifies preferred power management
 +                        profile as "Enterprise Server" or "Performance Server",
 +                        then this feature is turned on by default.
 +                      per_cpu_perf_limits
 +                        Allow per-logical-CPU P-State performance control limits using
 +                        cpufreq sysfs interface
  
        intremap=       [X86-64, Intel-IOMMU]
                        on      enable Interrupt Remapping (default)
                nopanic
                merge
                nomerge
 -              forcesac
                soft
                pt              [x86, IA-64]
                nobypass        [PPC/POWERNV]
                        * [no]ncqtrim: Turn off queued DSM TRIM.
  
                        * nohrst, nosrst, norst: suppress hard, soft
 -                          and both resets.
 +                        and both resets.
  
                        * rstonce: only attempt one reset during
                          hot-unplug link recovery
                        [KNL,SH] Allow user to override the default size for
                        per-device physically contiguous DMA buffers.
  
 -        memhp_default_state=online/offline
 +      memhp_default_state=online/offline
                        [KNL] Set the initial state for the memory hotplug
                        onlining policy. If not specified, the default value is
                        set according to the
                        emulation library even if a 387 maths coprocessor
                        is present.
  
 +      no5lvl          [X86-64] Disable 5-level paging mode. Forces
 +                      kernel to use 4-level paging instead.
 +
        no_console_suspend
                        [HW] Never suspend the console
                        Disable suspending of consoles during suspend and
                        allow data leaks with this option, which is equivalent
                        to spectre_v2=off.
  
 +      nospec_store_bypass_disable
 +                      [HW] Disable all mitigations for the Speculative Store Bypass vulnerability
 +
        noxsave         [BUGS=X86] Disables x86 extended register state save
                        and restore using xsave. The kernel will fallback to
                        enabling legacy floating-point and sse state.
                        [X86,PV_OPS] Disable paravirtualized VMware scheduler
                        clock and use the default one.
  
 -      no-steal-acc    [X86,KVM] Disable paravirtualized steal time accounting.
 +      no-steal-acc    [X86,KVM] Disable paravirtualized steal time accounting.
                        steal time is computed, but won't influence scheduler
                        behaviour
  
        notsc           [BUGS=X86-32] Disable Time Stamp Counter
  
        nowatchdog      [KNL] Disable both lockup detectors, i.e.
 -                        soft-lockup and NMI watchdog (hard-lockup).
 +                      soft-lockup and NMI watchdog (hard-lockup).
  
        nowb            [ARM]
  
                        If the dependencies are under your control, you can
                        turn on cpu0_hotplug.
  
 -      nps_mtm_hs_ctr= [KNL,ARC]
 +      nps_mtm_hs_ctr= [KNL,ARC]
                        This parameter sets the maximum duration, in
                        cycles, each HW thread of the CTOP can run
                        without interruptions, before HW switches it.
  
        pci=option[,option...]  [PCI] various PCI subsystem options:
                earlydump       [X86] dump PCI config space before the kernel
 -                              changes anything
 +                              changes anything
                off             [X86] don't probe for the PCI bus
                bios            [X86-32] force use of PCI BIOS, don't access
                                the hardware directly. Use this if your machine
                                is enabled by default.  If you need to use this,
                                please report a bug.
                nocrs           [X86] Ignore PCI host bridge windows from ACPI.
 -                              If you need to use this, please report a bug.
 +                              If you need to use this, please report a bug.
                routeirq        Do IRQ routing for all PCI devices.
                                This is normally done in pci_enable_device(),
                                so this option is a temporary workaround
                                on: Turn realloc on
                realloc         same as realloc=on
                noari           do not use PCIe ARI.
+               noats           [PCIE, Intel-IOMMU, AMD-IOMMU]
+                               do not use PCIe ATS (and IOMMU device IOTLB).
                pcie_scan_all   Scan all possible PCIe devices.  Otherwise we
                                only look for one device below a PCIe downstream
                                port.
                        cache (risks via metadata attacks are mostly
                        unchanged). Debug options disable merging on their
                        own.
 -                      For more information see Documentation/vm/slub.txt.
 +                      For more information see Documentation/vm/slub.rst.
  
        slab_max_order= [MM, SLAB]
                        Determines the maximum allowed order for slabs.
                        slub_debug can create guard zones around objects and
                        may poison objects when not in use. Also tracks the
                        last alloc / free. For more information see
 -                      Documentation/vm/slub.txt.
 +                      Documentation/vm/slub.rst.
  
        slub_memcg_sysfs=       [MM, SLUB]
                        Determines whether to enable sysfs directories for
                        Determines the maximum allowed order for slabs.
                        A high setting may cause OOMs due to memory
                        fragmentation. For more information see
 -                      Documentation/vm/slub.txt.
 +                      Documentation/vm/slub.rst.
  
        slub_min_objects=       [MM, SLUB]
                        The minimum number of objects per slab. SLUB will
                        the number of objects indicated. The higher the number
                        of objects the smaller the overhead of tracking slabs
                        and the less frequently locks need to be acquired.
 -                      For more information see Documentation/vm/slub.txt.
 +                      For more information see Documentation/vm/slub.rst.
  
        slub_min_order= [MM, SLUB]
                        Determines the minimum page order for slabs. Must be
                        lower than slub_max_order.
 -                      For more information see Documentation/vm/slub.txt.
 +                      For more information see Documentation/vm/slub.rst.
  
        slub_nomerge    [MM, SLUB]
                        Same with slab_nomerge. This is supported for legacy.
                        Not specifying this option is equivalent to
                        spectre_v2=auto.
  
 +      spec_store_bypass_disable=
 +                      [HW] Control Speculative Store Bypass (SSB) Disable mitigation
 +                      (Speculative Store Bypass vulnerability)
 +
 +                      Certain CPUs are vulnerable to an exploit against a
 +                      a common industry wide performance optimization known
 +                      as "Speculative Store Bypass" in which recent stores
 +                      to the same memory location may not be observed by
 +                      later loads during speculative execution. The idea
 +                      is that such stores are unlikely and that they can
 +                      be detected prior to instruction retirement at the
 +                      end of a particular speculation execution window.
 +
 +                      In vulnerable processors, the speculatively forwarded
 +                      store can be used in a cache side channel attack, for
 +                      example to read memory to which the attacker does not
 +                      directly have access (e.g. inside sandboxed code).
 +
 +                      This parameter controls whether the Speculative Store
 +                      Bypass optimization is used.
 +
 +                      on      - Unconditionally disable Speculative Store Bypass
 +                      off     - Unconditionally enable Speculative Store Bypass
 +                      auto    - Kernel detects whether the CPU model contains an
 +                                implementation of Speculative Store Bypass and
 +                                picks the most appropriate mitigation. If the
 +                                CPU is not vulnerable, "off" is selected. If the
 +                                CPU is vulnerable the default mitigation is
 +                                architecture and Kconfig dependent. See below.
 +                      prctl   - Control Speculative Store Bypass per thread
 +                                via prctl. Speculative Store Bypass is enabled
 +                                for a process by default. The state of the control
 +                                is inherited on fork.
 +                      seccomp - Same as "prctl" above, but all seccomp threads
 +                                will disable SSB unless they explicitly opt out.
 +
 +                      Not specifying this option is equivalent to
 +                      spec_store_bypass_disable=auto.
 +
 +                      Default mitigations:
 +                      X86:    If CONFIG_SECCOMP=y "seccomp", otherwise "prctl"
 +
        spia_io_base=   [HW,MTD]
        spia_fio_base=
        spia_pedr=
                        Format: [always|madvise|never]
                        Can be used to control the default behavior of the system
                        with respect to transparent hugepages.
 -                      See Documentation/vm/transhuge.txt for more details.
 +                      See Documentation/admin-guide/mm/transhuge.rst
 +                      for more details.
  
        tsc=            Disable clocksource stability checks for TSC.
                        Format: <string>
  
        usbcore.initial_descriptor_timeout=
                        [USB] Specifies timeout for the initial 64-byte
 -                        USB_REQ_GET_DESCRIPTOR request in milliseconds
 +                      USB_REQ_GET_DESCRIPTOR request in milliseconds
                        (default 5000 = 5.0 seconds).
  
        usbcore.nousb   [USB] Disable the USB subsystem
index 36003832c2a832211c4787b10b0be8dbd73f9a8d,1b7e7c36fda1ad945076e1bb5a57163527af5cdc..74e9db9e90885f1e86e6f9c8261388520eedc6f9
@@@ -75,7 -75,6 +75,7 @@@ cnxt  Conexant Systems, Inc
  compulab      CompuLab Ltd.
  cortina       Cortina Systems, Inc.
  cosmic        Cosmic Circuits
 +crane Crane Connectivity Solutions
  creative      Creative Technology Ltd
  crystalfontz  Crystalfontz America, Inc.
  cubietech     Cubietech, Ltd.
@@@ -183,7 -182,6 +183,7 @@@ karo       Ka-Ro electronics Gmb
  keithkoep     Keith & Koep GmbH
  keymile       Keymile GmbH
  khadas        Khadas
 +kiebackpeter    Kieback & Peter GmbH
  kinetic Kinetic Technologies
  kingnovel     Kingnovel Technology Co., Ltd.
  kosagi        Sutajio Ko-Usagi PTE Ltd.
@@@ -205,6 -203,7 +205,7 @@@ lwn        Liebherr-Werk Nenzing Gmb
  macnica       Macnica Americas
  marvell       Marvell Technology Group Ltd.
  maxim Maxim Integrated Products
+ mbvl  Mobiveil Inc.
  mcube mCube
  meas  Measurement Specialties
  mediatek      MediaTek Inc.
diff --combined MAINTAINERS
index dc241b04d1bdb3d0494aade6b7b4332a50b9b360,d70a026ccb84c45bae1abd2c0eca12224afa8d24..b4a564213cdf0eff056ed90d2b7dcca4263bdd04
@@@ -137,9 -137,9 +137,9 @@@ Maintainers List (try to look for most 
                -----------------------------------
  
  3C59X NETWORK DRIVER
 -M:    Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
 +M:    Steffen Klassert <klassert@kernel.org>
  L:    netdev@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    Documentation/networking/vortex.txt
  F:    drivers/net/ethernet/3com/3c59x.c
  
@@@ -564,9 -564,8 +564,9 @@@ S: Maintaine
  F:    drivers/media/dvb-frontends/af9033*
  
  AFFS FILE SYSTEM
 +M:    David Sterba <dsterba@suse.com>
  L:    linux-fsdevel@vger.kernel.org
 -S:    Orphan
 +S:    Odd Fixes
  F:    Documentation/filesystems/affs.txt
  F:    fs/affs/
  
@@@ -767,14 -766,12 +767,14 @@@ F:      drivers/gpu/drm/amd/amdgpu/amdgpu_am
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
 +F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
  F:    drivers/gpu/drm/amd/amdkfd/
  F:    drivers/gpu/drm/amd/include/cik_structs.h
  F:    drivers/gpu/drm/amd/include/kgd_kfd_interface.h
  F:    drivers/gpu/drm/amd/include/vi_structs.h
 +F:    drivers/gpu/drm/amd/include/v9_structs.h
  F:    include/uapi/linux/kfd_ioctl.h
  
  AMD SEATTLE DEVICE TREE SUPPORT
@@@ -908,8 -905,6 +908,8 @@@ ANDROID ION DRIVE
  M:    Laura Abbott <labbott@redhat.com>
  M:    Sumit Semwal <sumit.semwal@linaro.org>
  L:    devel@driverdev.osuosl.org
 +L:    dri-devel@lists.freedesktop.org
 +L:    linaro-mm-sig@lists.linaro.org (moderated for non-subscribers)
  S:    Supported
  F:    drivers/staging/android/ion
  F:    drivers/staging/android/uapi/ion.h
@@@ -1213,6 -1208,7 +1213,6 @@@ F:      drivers/*/*alpine
  ARM/ARTPEC MACHINE SUPPORT
  M:    Jesper Nilsson <jesper.nilsson@axis.com>
  M:    Lars Persson <lars.persson@axis.com>
 -M:    Niklas Cassel <niklas.cassel@axis.com>
  S:    Maintained
  L:    linux-arm-kernel@axis.com
  F:    arch/arm/mach-artpec
@@@ -1377,8 -1373,7 +1377,8 @@@ F:      arch/arm/mach-ebsa110
  F:    drivers/net/ethernet/amd/am79c961a.*
  
  ARM/ENERGY MICRO (SILICON LABS) EFM32 SUPPORT
 -M:    Uwe Kleine-König <kernel@pengutronix.de>
 +M:    Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
 +R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  N:    efm32
@@@ -1406,8 -1401,7 +1406,8 @@@ F:      arch/arm/mach-footbridge
  
  ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
  M:    Shawn Guo <shawnguo@kernel.org>
 -M:    Sascha Hauer <kernel@pengutronix.de>
 +M:    Sascha Hauer <s.hauer@pengutronix.de>
 +R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  R:    Fabio Estevam <fabio.estevam@nxp.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -1422,8 -1416,7 +1422,8 @@@ F:      include/soc/imx
  
  ARM/FREESCALE VYBRID ARM ARCHITECTURE
  M:    Shawn Guo <shawnguo@kernel.org>
 -M:    Sascha Hauer <kernel@pengutronix.de>
 +M:    Sascha Hauer <s.hauer@pengutronix.de>
 +R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  R:    Stefan Agner <stefan@agner.ch>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -2333,16 -2326,8 +2333,16 @@@ S:    Maintaine
  F:    drivers/gpio/gpio-ath79.c
  F:    Documentation/devicetree/bindings/gpio/gpio-ath79.txt
  
 +ATHEROS 71XX/9XXX USB PHY DRIVER
 +M:    Alban Bedel <albeu@free.fr>
 +W:    https://github.com/AlbanBedel/linux
 +T:    git git://github.com/AlbanBedel/linux
 +S:    Maintained
 +F:    drivers/phy/qualcomm/phy-ath79-usb.c
 +F:    Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
 +
  ATHEROS ATH GENERIC UTILITIES
 -M:    "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
 +M:    Kalle Valo <kvalo@codeaurora.org>
  L:    linux-wireless@vger.kernel.org
  S:    Supported
  F:    drivers/net/wireless/ath/*
@@@ -2357,7 -2342,7 +2357,7 @@@ S:      Maintaine
  F:    drivers/net/wireless/ath/ath5k/
  
  ATHEROS ATH6KL WIRELESS DRIVER
 -M:    Kalle Valo <kvalo@qca.qualcomm.com>
 +M:    Kalle Valo <kvalo@codeaurora.org>
  L:    linux-wireless@vger.kernel.org
  W:    http://wireless.kernel.org/en/users/Drivers/ath6kl
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
@@@ -2564,6 -2549,7 +2564,6 @@@ F:      Documentation/devicetree/bindings/so
  F:    sound/soc/atmel/tse850-pcm5142.c
  
  AZ6007 DVB DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -2628,7 -2614,7 +2628,7 @@@ S:      Maintaine
  F:    drivers/net/hamradio/baycom*
  
  BCACHE (BLOCK LAYER CACHE)
 -M:    Michael Lyle <mlyle@lyle.org>
 +M:    Coly Li <colyli@suse.de>
  M:    Kent Overstreet <kent.overstreet@gmail.com>
  L:    linux-bcache@vger.kernel.org
  W:    http://bcache.evilpiepirate.org
@@@ -2732,13 -2718,13 +2732,13 @@@ L:   netdev@vger.kernel.or
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
 +Q:    https://patchwork.ozlabs.org/project/netdev/list/?delegate=77147
  S:    Supported
  F:    arch/x86/net/bpf_jit*
  F:    Documentation/networking/filter.txt
  F:    Documentation/bpf/
  F:    include/linux/bpf*
  F:    include/linux/filter.h
 -F:    include/trace/events/bpf.h
  F:    include/trace/events/xdp.h
  F:    include/uapi/linux/bpf*
  F:    include/uapi/linux/filter.h
@@@ -2751,7 -2737,6 +2751,7 @@@ F:      net/sched/act_bpf.
  F:    net/sched/cls_bpf.c
  F:    samples/bpf/
  F:    tools/bpf/
 +F:    tools/lib/bpf/
  F:    tools/testing/selftests/bpf/
  
  BROADCOM B44 10/100 ETHERNET DRIVER
@@@ -3093,6 -3078,7 +3093,6 @@@ F:      include/linux/btrfs
  F:    include/uapi/linux/btrfs*
  
  BTTV VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -3147,13 -3133,6 +3147,13 @@@ S:    Supporte
  F:    Documentation/filesystems/caching/cachefiles.txt
  F:    fs/cachefiles/
  
 +CADENCE MIPI-CSI2 BRIDGES
 +M:    Maxime Ripard <maxime.ripard@bootlin.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/cdns,*.txt
 +F:    drivers/media/platform/cadence/cdns-csi2*
 +
  CADET FM/AM RADIO RECEIVER DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -3449,12 -3428,6 +3449,12 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
  F:    drivers/input/touchscreen/chipone_icn8318.c
  
 +CHIPONE ICN8505 I2C TOUCHSCREEN DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    drivers/input/touchscreen/chipone_icn8505.c
 +
  CHROME HARDWARE PLATFORM SUPPORT
  M:    Benson Leung <bleung@chromium.org>
  M:    Olof Johansson <olof@lixom.net>
@@@ -3715,6 -3688,7 +3715,6 @@@ F:      drivers/cpufreq/arm_big_little_dt.
  
  CPU POWER MONITORING SUBSYSTEM
  M:    Thomas Renninger <trenn@suse.com>
 -M:    Shuah Khan <shuahkh@osg.samsung.com>
  M:    Shuah Khan <shuah@kernel.org>
  L:    linux-pm@vger.kernel.org
  S:    Maintained
@@@ -3833,6 -3807,7 +3833,6 @@@ S:      Maintaine
  F:    drivers/media/dvb-frontends/cx24120*
  
  CX88 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -4270,9 -4245,6 +4270,9 @@@ F:      include/trace/events/fs_dax.
  
  DEVICE DIRECT ACCESS (DAX)
  M:    Dan Williams <dan.j.williams@intel.com>
 +M:    Dave Jiang <dave.jiang@intel.com>
 +M:    Ross Zwisler <ross.zwisler@linux.intel.com>
 +M:    Vishal Verma <vishal.l.verma@intel.com>
  L:    linux-nvdimm@lists.01.org
  S:    Supported
  F:    drivers/dax/
@@@ -4333,7 -4305,7 +4333,7 @@@ F:      Documentation/driver-api/dma-buf.rs
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
 -M:    Vinod Koul <vinod.koul@intel.com>
 +M:    Vinod Koul <vkoul@kernel.org>
  L:    dmaengine@vger.kernel.org
  Q:    https://patchwork.kernel.org/project/linux-dmaengine/list/
  S:    Maintained
@@@ -4354,14 -4326,12 +4354,14 @@@ W:   http://git.infradead.org/users/hch/d
  S:    Supported
  F:    lib/dma-debug.c
  F:    lib/dma-direct.c
 +F:    lib/dma-noncoherent.c
  F:    lib/dma-virt.c
  F:    drivers/base/dma-mapping.c
  F:    drivers/base/dma-coherent.c
  F:    include/asm-generic/dma-mapping.h
  F:    include/linux/dma-direct.h
  F:    include/linux/dma-mapping.h
 +F:    include/linux/dma-noncoherent.h
  
  DME1737 HARDWARE MONITOR DRIVER
  M:    Juerg Haefliger <juergh@gmail.com>
@@@ -4695,7 -4665,7 +4695,7 @@@ F:      Documentation/devicetree/bindings/di
  
  DRM DRIVERS FOR FREESCALE DCU
  M:    Stefan Agner <stefan@agner.ch>
 -M:    Alison Wang <alison.wang@freescale.com>
 +M:    Alison Wang <alison.wang@nxp.com>
  L:    dri-devel@lists.freedesktop.org
  S:    Supported
  F:    drivers/gpu/drm/fsl-dcu/
@@@ -4806,14 -4776,6 +4806,14 @@@ S:    Maintaine
  F:    drivers/gpu/drm/omapdrm/
  F:    Documentation/devicetree/bindings/display/ti/
  
 +DRM DRIVERS FOR V3D
 +M:    Eric Anholt <eric@anholt.net>
 +S:    Supported
 +F:    drivers/gpu/drm/v3d/
 +F:    include/uapi/drm/v3d_drm.h
 +F:    Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +
  DRM DRIVERS FOR VC4
  M:    Eric Anholt <eric@anholt.net>
  T:    git git://github.com/anholt/linux
@@@ -4860,15 -4822,6 +4860,15 @@@ S:    Maintaine
  F:    drivers/gpu/drm/tinydrm/
  F:    include/drm/tinydrm/
  
 +DRM DRIVERS FOR XEN
 +M:    Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +L:    dri-devel@lists.freedesktop.org
 +L:    xen-devel@lists.xen.org
 +S:    Supported
 +F:    drivers/gpu/drm/xen/
 +F:    Documentation/gpu/xen-front.rst
 +
  DRM TTM SUBSYSTEM
  M:    Christian Koenig <christian.koenig@amd.com>
  M:    Roger He <Hongbo.He@amd.com>
@@@ -5092,6 -5045,7 +5092,6 @@@ F:      drivers/edac/thunderx_edac
  
  EDAC-CORE
  M:    Borislav Petkov <bp@alien8.de>
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-edac@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next
@@@ -5120,6 -5074,7 +5120,6 @@@ S:      Maintaine
  F:    drivers/edac/fsl_ddr_edac.*
  
  EDAC-GHES
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
@@@ -5136,18 -5091,21 +5136,18 @@@ S:   Maintaine
  F:    drivers/edac/i5000_edac.c
  
  EDAC-I5400
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/i5400_edac.c
  
  EDAC-I7300
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/i7300_edac.c
  
  EDAC-I7CORE
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
@@@ -5197,6 -5155,7 +5197,6 @@@ S:      Maintaine
  F:    drivers/edac/r82600_edac.c
  
  EDAC-SBRIDGE
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
@@@ -5255,6 -5214,7 +5255,6 @@@ S:      Maintaine
  F:    drivers/net/ethernet/ibm/ehea/
  
  EM28XX VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -5360,6 -5320,7 +5360,6 @@@ F:      include/linux/*mdio*.
  F:    include/linux/of_net.h
  F:    include/linux/phy.h
  F:    include/linux/phy_fixed.h
 -F:    include/linux/platform_data/mdio-gpio.h
  F:    include/linux/platform_data/mdio-bcm-unimac.h
  F:    include/trace/events/mdio.h
  F:    include/uapi/linux/mdio.h
@@@ -5430,6 -5391,7 +5430,6 @@@ S:      Maintaine
  F:    drivers/iommu/exynos-iommu.c
  
  EZchip NPS platform support
 -M:    Elad Kanfi <eladkan@mellanox.com>
  M:    Vineet Gupta <vgupta@synopsys.com>
  S:    Supported
  F:    arch/arc/plat-eznps
@@@ -5455,19 -5417,6 +5455,19 @@@ S:    Maintaine
  F:    Documentation/hwmon/f71805f
  F:    drivers/hwmon/f71805f.c
  
 +FADDR2LINE
 +M:    Josh Poimboeuf <jpoimboe@redhat.com>
 +S:    Maintained
 +F:    scripts/faddr2line
 +
 +FAILOVER MODULE
 +M:    Sridhar Samudrala <sridhar.samudrala@intel.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    net/core/failover.c
 +F:    include/net/failover.h
 +F:    Documentation/networking/failover.rst
 +
  FANOTIFY
  M:    Jan Kara <jack@suse.cz>
  R:    Amir Goldstein <amir73il@gmail.com>
@@@ -5620,7 -5569,6 +5620,7 @@@ S:      Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga.git
  Q:    http://patchwork.kernel.org/project/linux-fpga/list/
  F:    Documentation/fpga/
 +F:    Documentation/driver-api/fpga/
  F:    Documentation/devicetree/bindings/fpga/
  F:    drivers/fpga/
  F:    include/linux/fpga/
@@@ -5678,6 -5626,7 +5678,6 @@@ M:      Claudiu Manoil <claudiu.manoil@nxp.c
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/freescale/gianfar*
 -X:    drivers/net/ethernet/freescale/gianfar_ptp.c
  F:    Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
  
  FREESCALE GPMI NAND DRIVER
@@@ -5703,8 -5652,7 +5703,8 @@@ F:      drivers/net/ethernet/freescale/fec.
  F:    Documentation/devicetree/bindings/net/fsl-fec.txt
  
  FREESCALE IMX / MXC FRAMEBUFFER DRIVER
 -M:    Sascha Hauer <kernel@pengutronix.de>
 +M:    Sascha Hauer <s.hauer@pengutronix.de>
 +R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  L:    linux-fbdev@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -5724,14 -5672,6 +5724,14 @@@ S:    Maintaine
  F:    drivers/net/ethernet/freescale/fman
  F:    Documentation/devicetree/bindings/powerpc/fsl/fman.txt
  
 +FREESCALE QORIQ PTP CLOCK DRIVER
 +M:    Yangbo Lu <yangbo.lu@nxp.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/ptp/ptp_qoriq.c
 +F:    include/linux/fsl/ptp_qoriq.h
 +F:    Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
 +
  FREESCALE QUAD SPI DRIVER
  M:    Han Xu <han.xu@nxp.com>
  L:    linux-mtd@lists.infradead.org
@@@ -5844,14 -5784,6 +5844,14 @@@ F:    fs/crypto
  F:    include/linux/fscrypt*.h
  F:    Documentation/filesystems/fscrypt.rst
  
 +FSNOTIFY: FILESYSTEM NOTIFICATION INFRASTRUCTURE
 +M:    Jan Kara <jack@suse.cz>
 +R:    Amir Goldstein <amir73il@gmail.com>
 +L:    linux-fsdevel@vger.kernel.org
 +S:    Maintained
 +F:    fs/notify/
 +F:    include/linux/fsnotify*.h
 +
  FUJITSU LAPTOP EXTRAS
  M:    Jonathan Woithe <jwoithe@just42.net>
  L:    platform-driver-x86@vger.kernel.org
@@@ -6011,8 -5943,8 +6011,8 @@@ S:      Maintaine
  F:    scripts/get_maintainer.pl
  
  GFS2 FILE SYSTEM
 -M:    Steven Whitehouse <swhiteho@redhat.com>
  M:    Bob Peterson <rpeterso@redhat.com>
 +M:    Andreas Gruenbacher <agruenba@redhat.com>
  L:    cluster-devel@redhat.com
  W:    http://sources.redhat.com/cluster/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
@@@ -6280,7 -6212,6 +6280,7 @@@ L:      linux-hwmon@vger.kernel.or
  W:    http://hwmon.wiki.kernel.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/hwmon/
  F:    Documentation/hwmon/
  F:    drivers/hwmon/
  F:    include/linux/hwmon*.h
@@@ -6325,7 -6256,7 +6325,7 @@@ S:      Odd Fixe
  F:    drivers/media/usb/hdpvr/
  
  HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER
 -M:    Jimmy Vance <jimmy.vance@hpe.com>
 +M:    Jerry Hoemann <jerry.hoemann@hpe.com>
  S:    Supported
  F:    Documentation/watchdog/hpwdt.txt
  F:    drivers/watchdog/hpwdt.c
@@@ -6567,15 -6498,9 +6567,15 @@@ F:    Documentation/networking/hinic.tx
  F:    drivers/net/ethernet/huawei/hinic/
  
  HUGETLB FILESYSTEM
 -M:    Nadia Yvette Chambers <nyc@holomorphy.com>
 +M:    Mike Kravetz <mike.kravetz@oracle.com>
 +L:    linux-mm@kvack.org
  S:    Maintained
  F:    fs/hugetlbfs/
 +F:    mm/hugetlb.c
 +F:    include/linux/hugetlb.h
 +F:    Documentation/admin-guide/mm/hugetlbpage.rst
 +F:    Documentation/vm/hugetlbfs_reserv.rst
 +F:    Documentation/ABI/testing/sysfs-kernel-mm-hugepages
  
  HVA ST MEDIA DRIVER
  M:    Jean-Christophe Trotin <jean-christophe.trotin@st.com>
@@@ -6815,12 -6740,6 +6815,12 @@@ L:    linux-scsi@vger.kernel.or
  S:    Supported
  F:    drivers/scsi/ibmvscsi/ibmvfc*
  
 +IBM Power Virtual Management Channel Driver
 +M:    Bryant G. Ly <bryantly@linux.vnet.ibm.com>
 +M:    Steven Royer <seroyer@linux.vnet.ibm.com>
 +S:    Supported
 +F:    drivers/misc/ibmvmc.*
 +
  IBM Power Virtual SCSI Device Drivers
  M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
  L:    linux-scsi@vger.kernel.org
@@@ -7104,13 -7023,14 +7104,13 @@@ L:   linux-fbdev@vger.kernel.or
  S:    Maintained
  F:    drivers/video/fbdev/i810/
  
 -INTEL ASoC BDW/HSW DRIVERS
 +INTEL ASoC DRIVERS
 +M:    Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
 +M:    Liam Girdwood <liam.r.girdwood@linux.intel.com>
  M:    Jie Yang <yang.jie@linux.intel.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
 -F:    sound/soc/intel/common/sst-dsp*
 -F:    sound/soc/intel/common/sst-firmware.c
 -F:    sound/soc/intel/boards/broadwell.c
 -F:    sound/soc/intel/haswell/
 +F:    sound/soc/intel/
  
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:    Intel SCU Linux support <intel-linux-scu@intel.com>
@@@ -7145,8 -7065,8 +7145,8 @@@ Q:      http://patchwork.ozlabs.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
  S:    Supported
 -F:    Documentation/networking/e100.txt
 -F:    Documentation/networking/e1000.txt
 +F:    Documentation/networking/e100.rst
 +F:    Documentation/networking/e1000.rst
  F:    Documentation/networking/e1000e.txt
  F:    Documentation/networking/igb.txt
  F:    Documentation/networking/igbvf.txt
@@@ -7476,6 -7396,16 +7476,6 @@@ S:     Obsolet
  F:    include/uapi/linux/ipx.h
  F:    drivers/staging/ipx/
  
 -IRDA SUBSYSTEM
 -M:    Samuel Ortiz <samuel@sortiz.org>
 -L:    irda-users@lists.sourceforge.net (subscribers-only)
 -L:    netdev@vger.kernel.org
 -W:    http://irda.sourceforge.net/
 -S:    Obsolete
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6.git
 -F:    Documentation/networking/irda.txt
 -F:    drivers/staging/irda/
 -
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
  M:    Marc Zyngier <marc.zyngier@arm.com>
  S:    Maintained
@@@ -7706,9 -7636,8 +7706,9 @@@ M:      Masahiro Yamada <yamada.masahiro@soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig
  L:    linux-kbuild@vger.kernel.org
  S:    Maintained
 -F:    Documentation/kbuild/kconfig-language.txt
 +F:    Documentation/kbuild/kconfig*
  F:    scripts/kconfig/
 +F:    scripts/Kconfig.include
  
  KDUMP
  M:    Dave Young <dyoung@redhat.com>
@@@ -7741,11 -7670,9 +7741,11 @@@ L:    linux-kbuild@vger.kernel.or
  S:    Maintained
  F:    Documentation/kbuild/
  F:    Makefile
 -F:    scripts/Makefile.*
 +F:    scripts/Kbuild*
 +F:    scripts/Makefile*
  F:    scripts/basic/
  F:    scripts/mk*
 +F:    scripts/mod/
  F:    scripts/package/
  
  KERNEL JANITORS
@@@ -7770,10 -7697,10 +7770,10 @@@ F:   include/linux/sunrpc
  F:    include/uapi/linux/sunrpc/
  
  KERNEL SELFTEST FRAMEWORK
 -M:    Shuah Khan <shuahkh@osg.samsung.com>
  M:    Shuah Khan <shuah@kernel.org>
  L:    linux-kselftest@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
 +Q:    https://patchwork.kernel.org/project/linux-kselftest/list/
  S:    Maintained
  F:    tools/testing/selftests/
  F:    Documentation/dev-tools/kselftest*
@@@ -7811,7 -7738,7 +7811,7 @@@ F:      arch/x86/include/asm/svm.
  F:    arch/x86/kvm/svm.c
  
  KERNEL VIRTUAL MACHINE FOR ARM (KVM/arm)
 -M:    Christoffer Dall <christoffer.dall@linaro.org>
 +M:    Christoffer Dall <christoffer.dall@arm.com>
  M:    Marc Zyngier <marc.zyngier@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    kvmarm@lists.cs.columbia.edu
@@@ -7825,7 -7752,7 +7825,7 @@@ F:      virt/kvm/arm
  F:    include/kvm/arm_*
  
  KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)
 -M:    Christoffer Dall <christoffer.dall@linaro.org>
 +M:    Christoffer Dall <christoffer.dall@arm.com>
  M:    Marc Zyngier <marc.zyngier@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    kvmarm@lists.cs.columbia.edu
@@@ -8121,9 -8048,6 +8121,9 @@@ F:      tools/lib/lockdep
  
  LIBNVDIMM BLK: MMIO-APERTURE DRIVER
  M:    Ross Zwisler <ross.zwisler@linux.intel.com>
 +M:    Dan Williams <dan.j.williams@intel.com>
 +M:    Vishal Verma <vishal.l.verma@intel.com>
 +M:    Dave Jiang <dave.jiang@intel.com>
  L:    linux-nvdimm@lists.01.org
  Q:    https://patchwork.kernel.org/project/linux-nvdimm/list/
  S:    Supported
@@@ -8132,9 -8056,6 +8132,9 @@@ F:      drivers/nvdimm/region_devs.
  
  LIBNVDIMM BTT: BLOCK TRANSLATION TABLE
  M:    Vishal Verma <vishal.l.verma@intel.com>
 +M:    Dan Williams <dan.j.williams@intel.com>
 +M:    Ross Zwisler <ross.zwisler@linux.intel.com>
 +M:    Dave Jiang <dave.jiang@intel.com>
  L:    linux-nvdimm@lists.01.org
  Q:    https://patchwork.kernel.org/project/linux-nvdimm/list/
  S:    Supported
@@@ -8142,9 -8063,6 +8142,9 @@@ F:      drivers/nvdimm/btt
  
  LIBNVDIMM PMEM: PERSISTENT MEMORY DRIVER
  M:    Ross Zwisler <ross.zwisler@linux.intel.com>
 +M:    Dan Williams <dan.j.williams@intel.com>
 +M:    Vishal Verma <vishal.l.verma@intel.com>
 +M:    Dave Jiang <dave.jiang@intel.com>
  L:    linux-nvdimm@lists.01.org
  Q:    https://patchwork.kernel.org/project/linux-nvdimm/list/
  S:    Supported
@@@ -8160,9 -8078,6 +8160,9 @@@ F:      Documentation/devicetree/bindings/pm
  
  LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM
  M:    Dan Williams <dan.j.williams@intel.com>
 +M:    Ross Zwisler <ross.zwisler@linux.intel.com>
 +M:    Vishal Verma <vishal.l.verma@intel.com>
 +M:    Dave Jiang <dave.jiang@intel.com>
  L:    linux-nvdimm@lists.01.org
  Q:    https://patchwork.kernel.org/project/linux-nvdimm/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git
@@@ -8279,7 -8194,7 +8279,7 @@@ F:      drivers/misc/lkdtm/
  
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <stern@rowland.harvard.edu>
 -M:    Andrea Parri <parri.andrea@gmail.com>
 +M:    Andrea Parri <andrea.parri@amarulasolutions.com>
  M:    Will Deacon <will.deacon@arm.com>
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Boqun Feng <boqun.feng@gmail.com>
@@@ -8386,7 -8301,6 +8386,7 @@@ F:      Documentation/admin-guide/LSM/LoadPi
  LOCKING PRIMITIVES
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
 +M:    Will Deacon <will.deacon@arm.com>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
@@@ -8543,7 -8457,6 +8543,7 @@@ M:      Vivien Didelot <vivien.didelot@savoi
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/dsa/mv88e6xxx/
 +F:    linux/platform_data/mv88e6xxx.h
  F:    Documentation/devicetree/bindings/net/dsa/marvell.txt
  
  MARVELL ARMADA DRM SUPPORT
@@@ -8901,7 -8814,6 +8901,7 @@@ L:      linux-media@vger.kernel.or
  L:    linux-renesas-soc@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/media/renesas,rcar-csi2.txt
  F:    Documentation/devicetree/bindings/media/rcar_vin.txt
  F:    drivers/media/platform/rcar-vin/
  
@@@ -8940,6 -8852,7 +8940,6 @@@ F:      Documentation/devicetree/bindings/me
  F:    drivers/staging/media/tegra-vde/
  
  MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  P:    LinuxTV.org Project
  L:    linux-media@vger.kernel.org
@@@ -9098,18 -9011,18 +9098,18 @@@ W:   http://www.mellanox.co
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/mellanox/mlx5/core/en_*
  
 -MELLANOX ETHERNET INNOVA DRIVER
 -M:    Ilan Tayari <ilant@mellanox.com>
 +MELLANOX ETHERNET INNOVA DRIVERS
  R:    Boris Pismenny <borisp@mellanox.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  W:    http://www.mellanox.com
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/mellanox/mlx5/core/en_accel/*
 +F:    drivers/net/ethernet/mellanox/mlx5/core/accel/*
  F:    drivers/net/ethernet/mellanox/mlx5/core/fpga/*
  F:    include/linux/mlx5/mlx5_ifc_fpga.h
  
  MELLANOX ETHERNET INNOVA IPSEC DRIVER
 -M:    Ilan Tayari <ilant@mellanox.com>
  R:    Boris Pismenny <borisp@mellanox.com>
  L:    netdev@vger.kernel.org
  S:    Supported
@@@ -9165,6 -9078,7 +9165,6 @@@ F:      include/uapi/rdma/mlx4-abi.
  
  MELLANOX MLX5 core VPI driver
  M:    Saeed Mahameed <saeedm@mellanox.com>
 -M:    Matan Barak <matanb@mellanox.com>
  M:    Leon Romanovsky <leonro@mellanox.com>
  L:    netdev@vger.kernel.org
  L:    linux-rdma@vger.kernel.org
@@@ -9175,6 -9089,7 +9175,6 @@@ F:      drivers/net/ethernet/mellanox/mlx5/c
  F:    include/linux/mlx5/
  
  MELLANOX MLX5 IB driver
 -M:    Matan Barak <matanb@mellanox.com>
  M:    Leon Romanovsky <leonro@mellanox.com>
  L:    linux-rdma@vger.kernel.org
  W:    http://www.mellanox.com
@@@ -9365,12 -9280,6 +9365,12 @@@ F:    include/linux/cciss*.
  F:    include/uapi/linux/cciss*.h
  F:    Documentation/scsi/smartpqi.txt
  
 +MICROSEMI ETHERNET SWITCH DRIVER
 +M:    Alexandre Belloni <alexandre.belloni@bootlin.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/mscc/
 +
  MICROSOFT SURFACE PRO 3 BUTTON DRIVER
  M:    Chen Yu <yu.c.chen@intel.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -9484,6 -9393,13 +9484,13 @@@ Q:    http://patchwork.linuxtv.org/project
  S:    Maintained
  F:    drivers/media/dvb-frontends/mn88473*
  
+ PCI DRIVER FOR MOBIVEIL PCIE IP
+ M:    Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
+ L:    linux-pci@vger.kernel.org
+ S:    Supported
+ F:    Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
+ F:    drivers/pci/host/pcie-mobiveil.c
  MODULE SUPPORT
  M:    Jessica Yu <jeyu@kernel.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
@@@ -9720,14 -9636,6 +9727,14 @@@ S:    Maintaine
  F:    Documentation/hwmon/nct6775
  F:    drivers/hwmon/nct6775.c
  
 +NET_FAILOVER MODULE
 +M:    Sridhar Samudrala <sridhar.samudrala@intel.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    driver/net/net_failover.c
 +F:    include/net/net_failover.h
 +F:    Documentation/networking/net_failover.rst
 +
  NETEFFECT IWARP RNIC DRIVER (IW_NES)
  M:    Faisal Latif <faisal.latif@intel.com>
  L:    linux-rdma@vger.kernel.org
@@@ -9789,7 -9697,7 +9796,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/netronome/
  
  NETWORK BLOCK DEVICE (NBD)
 -M:    Josef Bacik <jbacik@fb.com>
 +M:    Josef Bacik <josef@toxicpanda.com>
  S:    Maintained
  L:    linux-block@vger.kernel.org
  L:    nbd@other.debian.org
@@@ -9805,7 -9713,6 +9812,7 @@@ W:      https://fedorahosted.org/dropwatch
  F:    net/core/drop_monitor.c
  
  NETWORKING DRIVERS
 +M:    "David S. Miller" <davem@davemloft.net>
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
@@@ -9865,7 -9772,6 +9872,7 @@@ F:      include/uapi/linux/net_namespace.
  F:    tools/testing/selftests/net/
  F:    lib/net_utils.c
  F:    lib/random32.c
 +F:    Documentation/networking/
  
  NETWORKING [IPSEC]
  M:    Steffen Klassert <steffen.klassert@secunet.com>
@@@ -9921,21 -9827,8 +9928,21 @@@ F:    net/ipv6/calipso.
  F:    net/netfilter/xt_CONNSECMARK.c
  F:    net/netfilter/xt_SECMARK.c
  
 +NETWORKING [TCP]
 +M:    Eric Dumazet <edumazet@google.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    net/ipv4/tcp*.c
 +F:    net/ipv4/syncookies.c
 +F:    net/ipv6/tcp*.c
 +F:    net/ipv6/syncookies.c
 +F:    include/uapi/linux/tcp.h
 +F:    include/net/tcp.h
 +F:    include/linux/tcp.h
 +F:    include/trace/events/tcp.h
 +
  NETWORKING [TLS]
 -M:    Ilya Lesokhin <ilyal@mellanox.com>
 +M:    Boris Pismenny <borisp@mellanox.com>
  M:    Aviad Yehezkel <aviadye@mellanox.com>
  M:    Dave Watson <davejwatson@fb.com>
  L:    netdev@vger.kernel.org
@@@ -9975,7 -9868,7 +9982,7 @@@ F:      include/linux/platform_data/nxp-nci.
  F:    Documentation/devicetree/bindings/net/nfc/
  
  NFS, SUNRPC, AND LOCKD CLIENTS
 -M:    Trond Myklebust <trond.myklebust@primarydata.com>
 +M:    Trond Myklebust <trond.myklebust@hammerspace.com>
  M:    Anna Schumaker <anna.schumaker@netapp.com>
  L:    linux-nfs@vger.kernel.org
  W:    http://client.linux-nfs.org
@@@ -10458,7 -10351,6 +10465,7 @@@ T:   git git://linuxtv.org/media_tree.gi
  S:    Odd fixes
  F:    drivers/media/i2c/ov772x.c
  F:    include/media/i2c/ov772x.h
 +F:    Documentation/devicetree/bindings/media/i2c/ov772x.txt
  
  OMNIVISION OV7740 SENSOR DRIVER
  M:    Wenyou Yang <wenyou.yang@microchip.com>
@@@ -10826,9 -10718,9 +10833,9 @@@ F:   Documentation/devicetree/bindings/pc
  F:    drivers/pci/cadence/pcie-cadence*
  
  PCI DRIVER FOR FREESCALE LAYERSCAPE
- M:    Minghuan Lian <minghuan.Lian@freescale.com>
- M:    Mingkai Hu <mingkai.hu@freescale.com>
- M:    Roy Zang <tie-fei.zang@freescale.com>
+ M:    Minghuan Lian <minghuan.Lian@nxp.com>
+ M:    Mingkai Hu <mingkai.hu@nxp.com>
+ M:    Roy Zang <roy.zang@nxp.com>
  L:    linuxppc-dev@lists.ozlabs.org
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org
@@@ -10996,6 -10888,7 +11003,6 @@@ F:   drivers/pci/host
  F:    drivers/pci/dwc/
  
  PCIE DRIVER FOR AXIS ARTPEC
 -M:    Niklas Cassel <niklas.cassel@axis.com>
  M:    Jesper Nilsson <jesper.nilsson@axis.com>
  L:    linux-arm-kernel@axis.com
  L:    linux-pci@vger.kernel.org
@@@ -11054,8 -10947,8 +11061,8 @@@ M:   Shawn Lin <shawn.lin@rock-chips.com
  L:    linux-pci@vger.kernel.org
  L:    linux-rockchip@lists.infradead.org
  S:    Maintained
- F:    Documentation/devicetree/bindings/pci/rockchip-pcie.txt
- F:    drivers/pci/host/pcie-rockchip.c
+ F:    Documentation/devicetree/bindings/pci/rockchip-pcie*
+ F:    drivers/pci/host/pcie-rockchip*
  
  PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC
  M:    Linus Walleij <linus.walleij@linaro.org>
@@@ -11356,7 -11249,6 +11363,7 @@@ M:   Sebastian Reichel <sre@kernel.org
  L:    linux-pm@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
  S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-class-power
  F:    Documentation/devicetree/bindings/power/supply/
  F:    include/linux/power_supply.h
  F:    drivers/power/supply/
@@@ -11502,6 -11394,7 +11509,6 @@@ S:   Maintaine
  W:    http://linuxptp.sourceforge.net/
  F:    Documentation/ABI/testing/sysfs-ptp
  F:    Documentation/ptp/*
 -F:    drivers/net/ethernet/freescale/gianfar_ptp.c
  F:    drivers/net/phy/dp83640*
  F:    drivers/ptp/*
  F:    include/linux/ptp_cl*
@@@ -11736,7 -11629,7 +11743,7 @@@ S:   Maintaine
  F:    drivers/media/tuners/qt1010*
  
  QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
 -M:    Kalle Valo <kvalo@qca.qualcomm.com>
 +M:    Kalle Valo <kvalo@codeaurora.org>
  L:    ath10k@lists.infradead.org
  W:    http://wireless.kernel.org/en/users/Drivers/ath10k
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
@@@ -11758,13 -11651,6 +11765,13 @@@ F: Documentation/devicetree/bindings/me
  F:    Documentation/media/v4l-drivers/qcom_camss.rst
  F:    drivers/media/platform/qcom/camss-8x16/
  
 +QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
 +M:  Ilia Lin <ilia.lin@gmail.com>
 +L:  linux-pm@vger.kernel.org
 +S:  Maintained
 +F:  Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
 +F:  drivers/cpufreq/qcom-cpufreq-kryo.c
 +
  QUALCOMM EMAC GIGABIT ETHERNET DRIVER
  M:    Timur Tabi <timur@codeaurora.org>
  L:    netdev@vger.kernel.org
@@@ -11794,7 -11680,7 +11801,7 @@@ S:   Maintaine
  F:    drivers/media/platform/qcom/venus/
  
  QUALCOMM WCN36XX WIRELESS DRIVER
 -M:    Eugene Krasnikov <k.eugene.e@gmail.com>
 +M:    Kalle Valo <kvalo@codeaurora.org>
  L:    wcn36xx@lists.infradead.org
  W:    http://wireless.kernel.org/en/users/Drivers/wcn36xx
  T:    git git://github.com/KrasnikovEugene/wcn36xx.git
@@@ -11989,7 -11875,7 +11996,7 @@@ F:   include/linux/rtc.
  F:    include/uapi/linux/rtc.h
  F:    include/linux/rtc/
  F:    include/linux/platform_data/rtc-*
 -F:    tools/testing/selftests/timers/rtctest.c
 +F:    tools/testing/selftests/rtc/
  
  REALTEK AUDIO CODECS
  M:    Bard Liao <bardliao@realtek.com>
@@@ -12332,7 -12218,7 +12339,7 @@@ F:   Documentation/s390/vfio-ccw.tx
  F:    include/uapi/linux/vfio_ccw.h
  
  S390 ZCRYPT DRIVER
 -M:    Harald Freudenberger <freude@de.ibm.com>
 +M:    Harald Freudenberger <freude@linux.ibm.com>
  L:    linux-s390@vger.kernel.org
  W:    http://www.ibm.com/developerworks/linux/linux390/
  S:    Supported
@@@ -12361,6 -12247,7 +12368,6 @@@ S:   Odd Fixe
  F:    drivers/media/i2c/saa6588*
  
  SAA7134 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -12599,7 -12486,6 +12606,7 @@@ F:   drivers/scsi/st_*.
  SCTP PROTOCOL
  M:    Vlad Yasevich <vyasevich@gmail.com>
  M:    Neil Horman <nhorman@tuxdriver.com>
 +M:    Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
  L:    linux-sctp@vger.kernel.org
  W:    http://lksctp.sourceforge.net
  S:    Maintained
@@@ -12865,6 -12751,7 +12872,6 @@@ S:   Maintaine
  F:    drivers/media/radio/si4713/radio-usb-si4713.c
  
  SIANO DVB DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -12936,8 -12823,7 +12943,8 @@@ F:   include/linux/siphash.
  
  SIOX
  M:    Gavin Schenk <g.schenk@eckelmann.de>
 -M:    Uwe Kleine-König <kernel@pengutronix.de>
 +M:    Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
 +R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  S:    Supported
  F:    drivers/siox/*
  F:    include/trace/events/siox.h
@@@ -13172,13 -13058,6 +13179,13 @@@ S: Maintaine
  F:    drivers/ssb/
  F:    include/linux/ssb/
  
 +SONY IMX258 SENSOR DRIVER
 +M:    Sakari Ailus <sakari.ailus@linux.intel.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/imx258.c
 +
  SONY IMX274 SENSOR DRIVER
  M:    Leon Luo <leonl@leopardimaging.com>
  L:    linux-media@vger.kernel.org
@@@ -13223,7 -13102,7 +13230,7 @@@ F:   include/uapi/sound
  F:    sound/
  
  SOUND - COMPRESSED AUDIO
 -M:    Vinod Koul <vinod.koul@intel.com>
 +M:    Vinod Koul <vkoul@kernel.org>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  S:    Supported
@@@ -13383,18 -13262,19 +13390,18 @@@ M:        Jan-Benedict Glaw <jbglaw@lug-owl.de
  S:    Maintained
  F:    arch/alpha/kernel/srm_env.c
  
 +ST STM32 I2C/SMBUS DRIVER
 +M:    Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
 +L:    linux-i2c@vger.kernel.org
 +S:    Maintained
 +F:    drivers/i2c/busses/i2c-stm32*
 +
  STABLE BRANCH
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    stable@vger.kernel.org
  S:    Supported
  F:    Documentation/process/stable-kernel-rules.rst
  
 -STAGING - ATOMISP DRIVER
 -M:    Alan Cox <alan@linux.intel.com>
 -M:    Sakari Ailus <sakari.ailus@linux.intel.com>
 -L:    linux-media@vger.kernel.org
 -S:    Maintained
 -F:    drivers/staging/media/atomisp/
 -
  STAGING - COMEDI
  M:    Ian Abbott <abbotti@mev.co.uk>
  M:    H Hartley Sweeten <hsweeten@visionengravers.com>
@@@ -13512,7 -13392,6 +13519,7 @@@ F:   drivers/media/usb/stk1160
  STMMAC ETHERNET DRIVER
  M:    Giuseppe Cavallaro <peppe.cavallaro@st.com>
  M:    Alexandre Torgue <alexandre.torgue@st.com>
 +M:    Jose Abreu <joabreu@synopsys.com>
  L:    netdev@vger.kernel.org
  W:    http://www.stlinux.com
  S:    Supported
@@@ -13862,6 -13741,7 +13869,6 @@@ S:   Maintaine
  F:    drivers/media/i2c/tda9840*
  
  TEA5761 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -13870,6 -13750,7 +13877,6 @@@ S:   Odd fixe
  F:    drivers/media/tuners/tea5761.*
  
  TEA5767 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -13959,6 -13840,7 +13966,6 @@@ S:   Supporte
  F:    drivers/iommu/tegra*
  
  TEGRA KBC DRIVER
 -M:    Rakesh Iyer <riyer@nvidia.com>
  M:    Laxman Dewangan <ldewangan@nvidia.com>
  S:    Supported
  F:    drivers/input/keyboard/tegra-kbc.c
@@@ -14061,7 -13943,7 +14068,7 @@@ THUNDERBOLT DRIVE
  M:    Andreas Noever <andreas.noever@gmail.com>
  M:    Michael Jamet <michael.jamet@intel.com>
  M:    Mika Westerberg <mika.westerberg@linux.intel.com>
 -M:    Yehezkel Bernat <yehezkel.bernat@intel.com>
 +M:    Yehezkel Bernat <YehezkelShB@gmail.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git
  S:    Maintained
  F:    Documentation/admin-guide/thunderbolt.rst
@@@ -14071,7 -13953,7 +14078,7 @@@ F:   include/linux/thunderbolt.
  THUNDERBOLT NETWORK DRIVER
  M:    Michael Jamet <michael.jamet@intel.com>
  M:    Mika Westerberg <mika.westerberg@linux.intel.com>
 -M:    Yehezkel Bernat <yehezkel.bernat@intel.com>
 +M:    Yehezkel Bernat <YehezkelShB@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/thunderbolt.c
@@@ -14285,6 -14167,7 +14292,6 @@@ F:   Documentation/networking/tlan.tx
  F:    drivers/net/ethernet/ti/tlan.*
  
  TM6000 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -14483,15 -14366,6 +14490,15 @@@ S: Maintaine
  F:    drivers/tc/
  F:    include/linux/tc.h
  
 +TURBOSTAT UTILITY
 +M:    "Len Brown" <lenb@kernel.org>
 +L:    linux-pm@vger.kernel.org
 +B:    https://bugzilla.kernel.org
 +Q:    https://patchwork.kernel.org/project/linux-pm/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat
 +S:    Supported
 +F:    tools/power/x86/turbostat/
 +
  TW5864 VIDEO4LINUX DRIVER
  M:    Bluecherry Maintainers <maintainers@bluecherrydvr.com>
  M:    Anton Sviridenko <anton@corp.bluecherry.net>
@@@ -14738,9 -14612,7 +14745,9 @@@ M:   Woojung Huh <woojung.huh@microchip.c
  M:    Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/microchip,lan78xx.txt
  F:    drivers/net/usb/lan78xx.*
 +F:    include/dt-bindings/net/microchip-lan78xx.h
  
  USB MASS STORAGE DRIVER
  M:    Alan Stern <stern@rowland.harvard.edu>
@@@ -14778,13 -14650,13 +14785,13 @@@ F:        drivers/usb/common/usb-otg-fsm.
  
  USB OVER IP DRIVER
  M:    Valentina Manea <valentina.manea.m@gmail.com>
 -M:    Shuah Khan <shuahkh@osg.samsung.com>
  M:    Shuah Khan <shuah@kernel.org>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    Documentation/usb/usbip_protocol.txt
  F:    drivers/usb/usbip/
  F:    tools/usb/usbip/
 +F:    tools/testing/selftests/drivers/usb/usbip/
  
  USB PEGASUS DRIVER
  M:    Petko Manolov <petkan@nucleusys.com>
@@@ -15057,12 -14929,6 +15064,12 @@@ L: linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/platform/video-mux.c
  
 +VIDEO I2C POLLING DRIVER
 +M:    Matt Ranostay <matt.ranostay@konsulko.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/media/i2c/video-i2c.c
 +
  VIDEOBUF2 FRAMEWORK
  M:    Pawel Osciak <pawel@osciak.com>
  M:    Marek Szyprowski <m.szyprowski@samsung.com>
@@@ -15528,6 -15394,7 +15535,6 @@@ S:   Maintaine
  F:    arch/x86/entry/vdso/
  
  XC2028/3028 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
@@@ -15535,14 -15402,6 +15542,14 @@@ T: git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/tuners/tuner-xc2028.*
  
 +XDP SOCKETS (AF_XDP)
 +M:    Björn Töpel <bjorn.topel@intel.com>
 +M:    Magnus Karlsson <magnus.karlsson@intel.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/xskmap.c
 +F:    net/xdp/
 +
  XEN BLOCK SUBSYSTEM
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  M:    Roger Pau Monné <roger.pau@citrix.com>
@@@ -15613,13 -15472,6 +15620,13 @@@ S: Supporte
  F:    arch/x86/xen/*swiotlb*
  F:    drivers/xen/*swiotlb*
  
 +XEN SOUND FRONTEND DRIVER
 +M:    Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
 +L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Supported
 +F:    sound/xen/*
 +
  XFS FILESYSTEM
  M:    Darrick J. Wong <darrick.wong@oracle.com>
  M:    linux-xfs@vger.kernel.org
@@@ -15658,14 -15510,6 +15665,14 @@@ L: linux-kernel@vger.kernel.or
  S:    Supported
  F:    drivers/char/xillybus/
  
 +XLP9XX I2C DRIVER
 +M:    George Cherian <george.cherian@cavium.com>
 +M:    Jan Glauber <jglauber@cavium.com>
 +L:    linux-i2c@vger.kernel.org
 +W:    http://www.cavium.com
 +S:    Supported
 +F:    drivers/i2c/busses/i2c-xlp9xx.c
 +
  XRA1403 GPIO EXPANDER
  M:    Nandor Han <nandor.han@ge.com>
  M:    Semi Malinen <semi.malinen@ge.com>
@@@ -15760,7 -15604,7 +15767,7 @@@ L:   linux-media@vger.kernel.or
  W:    http://mjpeg.sourceforge.net/driver-zoran/
  T:    hg https://linuxtv.org/hg/v4l-dvb
  S:    Odd Fixes
 -F:    drivers/media/pci/zoran/
 +F:    drivers/staging/media/zoran/
  
  ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
  M:    Minchan Kim <minchan@kernel.org>
@@@ -15784,7 -15628,7 +15791,7 @@@ L:   linux-mm@kvack.or
  S:    Maintained
  F:    mm/zsmalloc.c
  F:    include/linux/zsmalloc.h
 -F:    Documentation/vm/zsmalloc.txt
 +F:    Documentation/vm/zsmalloc.rst
  
  ZSWAP COMPRESSED SWAP CACHING
  M:    Seth Jennings <sjenning@redhat.com>
index 66cf3a5a2f831adb9709636a5d74441b9750477b,54ee9196485271a0e4416e503a7a8805783e9bef..859c19828dd4499375e3d3e9c64a4d31a9afc138
@@@ -19,6 -19,7 +19,6 @@@
  #include <linux/scatterlist.h>
  
  #include <asm/io.h>
 -#include <asm/prom.h>
  #include <asm/pci-bridge.h>
  
  #define PCIBIOS_MIN_IO                0x1000
@@@ -61,10 -62,12 +61,6 @@@ extern int pci_mmap_legacy_page_range(s
  
  #define HAVE_PCI_LEGACY       1
  
- extern void pcibios_claim_one_bus(struct pci_bus *b);
- extern void pcibios_finish_adding_to_bus(struct pci_bus *bus);
 -/* The PCI address space does equal the physical memory
 - * address space (no IOMMU).  The IDE and SCSI device layers use
 - * this boolean for bounce buffer decisions.
 - */
 -#define PCI_DMA_BUS_IS_PHYS     (1)
--
  extern void pcibios_resource_survey(void);
  
  struct file;
index 6ddf0a30c60d14e02c0b79b22132c82479821d13,a94d4b281f4cf010504d3aeffe6a7c57b3001b31..883024054b05601f8f03159538e6931f22b0fb4a
@@@ -20,8 -20,6 +20,6 @@@
  
  #define pcibios_assign_all_busses()   0
  
- extern struct pci_controller* pcibios_alloc_controller(void);
  /* Assume some values. (We should revise them, if necessary) */
  
  #define PCIBIOS_MIN_IO                0x2000
@@@ -42,6 -40,8 +40,6 @@@
   * decisions.
   */
  
 -#define PCI_DMA_BUS_IS_PHYS   (1)
 -
  /* Tell PCI code what kind of PCI resource mappings we support */
  #define HAVE_PCI_MMAP                 1
  #define ARCH_GENERIC_PCI_MMAP_RESOURCE        1
index c1c982908b4bb2ad000fc1aa507be0036f78789d,6a04483105e580c9b4f1360f6e06cc1b3106fb55..bf601c7629fb2fe1d9979aa427bd946e30fb8f6c
  #include "chip_registers.h"
  #include "aspm.h"
  
- /* link speed vector for Gen3 speed - not in Linux headers */
- #define GEN1_SPEED_VECTOR 0x1
- #define GEN2_SPEED_VECTOR 0x2
- #define GEN3_SPEED_VECTOR 0x3
  /*
   * This file contains PCIe utility routines.
   */
@@@ -163,6 -158,9 +158,6 @@@ int hfi1_pcie_ddinit(struct hfi1_devdat
        resource_size_t addr;
        int ret = 0;
  
 -      dd->pcidev = pdev;
 -      pci_set_drvdata(pdev, dd);
 -
        addr = pci_resource_start(pdev, 0);
        len = pci_resource_len(pdev, 0);
  
@@@ -262,7 -260,7 +257,7 @@@ static u32 extract_speed(u16 linkstat
        case PCI_EXP_LNKSTA_CLS_5_0GB:
                speed = 5000; /* Gen 2, 5GHz */
                break;
-       case GEN3_SPEED_VECTOR:
+       case PCI_EXP_LNKSTA_CLS_8_0GB:
                speed = 8000; /* Gen 3, 8GHz */
                break;
        }
@@@ -317,7 -315,7 +312,7 @@@ int pcie_speeds(struct hfi1_devdata *dd
                return ret;
        }
  
-       if ((linkcap & PCI_EXP_LNKCAP_SLS) != GEN3_SPEED_VECTOR) {
+       if ((linkcap & PCI_EXP_LNKCAP_SLS) != PCI_EXP_LNKCAP_SLS_8_0GB) {
                dd_dev_info(dd,
                            "This HFI is not Gen3 capable, max speed 0x%x, need 0x3\n",
                            linkcap & PCI_EXP_LNKCAP_SLS);
@@@ -694,9 -692,6 +689,6 @@@ const struct pci_error_handlers hfi1_pc
  /* gasket block secondary bus reset delay */
  #define SBR_DELAY_US 200000   /* 200ms */
  
- /* mask for PCIe capability register lnkctl2 target link speed */
- #define LNKCTL2_TARGET_LINK_SPEED_MASK 0xf
  static uint pcie_target = 3;
  module_param(pcie_target, uint, S_IRUGO);
  MODULE_PARM_DESC(pcie_target, "PCIe target speed (0 skip, 1-3 Gen1-3)");
@@@ -1045,13 -1040,13 +1037,13 @@@ int do_pcie_gen3_transition(struct hfi1
                return 0;
  
        if (pcie_target == 1) {                 /* target Gen1 */
-               target_vector = GEN1_SPEED_VECTOR;
+               target_vector = PCI_EXP_LNKCTL2_TLS_2_5GT;
                target_speed = 2500;
        } else if (pcie_target == 2) {          /* target Gen2 */
-               target_vector = GEN2_SPEED_VECTOR;
+               target_vector = PCI_EXP_LNKCTL2_TLS_5_0GT;
                target_speed = 5000;
        } else if (pcie_target == 3) {          /* target Gen3 */
-               target_vector = GEN3_SPEED_VECTOR;
+               target_vector = PCI_EXP_LNKCTL2_TLS_8_0GT;
                target_speed = 8000;
        } else {
                /* off or invalid target - skip */
@@@ -1290,8 -1285,8 +1282,8 @@@ retry
        dd_dev_info(dd, "%s: ..old link control2: 0x%x\n", __func__,
                    (u32)lnkctl2);
        /* only write to parent if target is not as high as ours */
-       if ((lnkctl2 & LNKCTL2_TARGET_LINK_SPEED_MASK) < target_vector) {
-               lnkctl2 &= ~LNKCTL2_TARGET_LINK_SPEED_MASK;
+       if ((lnkctl2 & PCI_EXP_LNKCTL2_TLS) < target_vector) {
+               lnkctl2 &= ~PCI_EXP_LNKCTL2_TLS;
                lnkctl2 |= target_vector;
                dd_dev_info(dd, "%s: ..new link control2: 0x%x\n", __func__,
                            (u32)lnkctl2);
  
        dd_dev_info(dd, "%s: ..old link control2: 0x%x\n", __func__,
                    (u32)lnkctl2);
-       lnkctl2 &= ~LNKCTL2_TARGET_LINK_SPEED_MASK;
+       lnkctl2 &= ~PCI_EXP_LNKCTL2_TLS;
        lnkctl2 |= target_vector;
        dd_dev_info(dd, "%s: ..new link control2: 0x%x\n", __func__,
                    (u32)lnkctl2);
index 8fb8c737fffefa18ac3ae716474a40002a36ff05,56da1c6121d324c9215edaca85fa0a2782710922..d60c7dc62905d45a4d90fd3979540aaece08dfe2
@@@ -83,6 -83,7 +83,6 @@@
  
  static DEFINE_SPINLOCK(amd_iommu_devtable_lock);
  static DEFINE_SPINLOCK(pd_bitmap_lock);
 -static DEFINE_SPINLOCK(iommu_table_lock);
  
  /* List of all available dev_data structures */
  static LLIST_HEAD(dev_data_list);
@@@ -354,6 -355,9 +354,9 @@@ static bool pci_iommuv2_capable(struct 
        };
        int i, pos;
  
+       if (pci_ats_disabled())
+               return false;
        for (i = 0; i < 3; ++i) {
                pos = pci_find_ext_capability(pdev, caps[i]);
                if (pos == 0)
@@@ -3523,9 -3527,11 +3526,11 @@@ int amd_iommu_device_info(struct pci_de
  
        memset(info, 0, sizeof(*info));
  
-       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ATS);
-       if (pos)
-               info->flags |= AMD_IOMMU_DEVICE_FLAG_ATS_SUP;
+       if (!pci_ats_disabled()) {
+               pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ATS);
+               if (pos)
+                       info->flags |= AMD_IOMMU_DEVICE_FLAG_ATS_SUP;
+       }
  
        pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (pos)
@@@ -3561,7 -3567,6 +3566,7 @@@ EXPORT_SYMBOL(amd_iommu_device_info)
   *****************************************************************************/
  
  static struct irq_chip amd_ir_chip;
 +static DEFINE_SPINLOCK(iommu_table_lock);
  
  static void set_dte_irq_entry(u16 devid, struct irq_remap_table *table)
  {
index dfa0839f665613bc9ec0cf20e94df826708677bd,34fddb48fecc325718676a44c397c0daf10f592e..176fc9f4d7defe6a9d5b513902c97f56d732b323
@@@ -62,7 -62,6 +62,7 @@@
  #include "bnxt_vfr.h"
  #include "bnxt_tc.h"
  #include "bnxt_devlink.h"
 +#include "bnxt_debugfs.h"
  
  #define BNXT_TX_TIMEOUT               (5 * HZ)
  
@@@ -2384,7 -2383,6 +2384,7 @@@ static int bnxt_alloc_tx_rings(struct b
        for (i = 0, j = 0; i < bp->tx_nr_rings; i++) {
                struct bnxt_tx_ring_info *txr = &bp->tx_ring[i];
                struct bnxt_ring_struct *ring;
 +              u8 qidx;
  
                ring = &txr->tx_ring_struct;
  
  
                        memset(txr->tx_push, 0, sizeof(struct tx_push_bd));
                }
 -              ring->queue_id = bp->q_info[j].queue_id;
 +              qidx = bp->tc_to_qidx[j];
 +              ring->queue_id = bp->q_info[qidx].queue_id;
                if (i < bp->tx_nr_rings_xdp)
                        continue;
                if (i % bp->tx_nr_rings_per_tc == (bp->tx_nr_rings_per_tc - 1))
@@@ -3496,29 -3493,15 +3496,29 @@@ static int bnxt_hwrm_do_send_msg(struc
  
        if (!timeout)
                timeout = DFLT_HWRM_CMD_TIMEOUT;
 +      /* convert timeout to usec */
 +      timeout *= 1000;
  
        i = 0;
 -      tmo_count = timeout * 40;
 +      /* Short timeout for the first few iterations:
 +       * number of loops = number of loops for short timeout +
 +       * number of loops for standard timeout.
 +       */
 +      tmo_count = HWRM_SHORT_TIMEOUT_COUNTER;
 +      timeout = timeout - HWRM_SHORT_MIN_TIMEOUT * HWRM_SHORT_TIMEOUT_COUNTER;
 +      tmo_count += DIV_ROUND_UP(timeout, HWRM_MIN_TIMEOUT);
        resp_len = bp->hwrm_cmd_resp_addr + HWRM_RESP_LEN_OFFSET;
        if (intr_process) {
                /* Wait until hwrm response cmpl interrupt is processed */
                while (bp->hwrm_intr_seq_id != HWRM_SEQ_ID_INVALID &&
                       i++ < tmo_count) {
 -                      usleep_range(25, 40);
 +                      /* on first few passes, just barely sleep */
 +                      if (i < HWRM_SHORT_TIMEOUT_COUNTER)
 +                              usleep_range(HWRM_SHORT_MIN_TIMEOUT,
 +                                           HWRM_SHORT_MAX_TIMEOUT);
 +                      else
 +                              usleep_range(HWRM_MIN_TIMEOUT,
 +                                           HWRM_MAX_TIMEOUT);
                }
  
                if (bp->hwrm_intr_seq_id != HWRM_SEQ_ID_INVALID) {
                      HWRM_RESP_LEN_SFT;
                valid = bp->hwrm_cmd_resp_addr + len - 1;
        } else {
 +              int j;
 +
                /* Check if response len is updated */
                for (i = 0; i < tmo_count; i++) {
                        len = (le32_to_cpu(*resp_len) & HWRM_RESP_LEN_MASK) >>
                              HWRM_RESP_LEN_SFT;
                        if (len)
                                break;
 -                      usleep_range(25, 40);
 +                      /* on first few passes, just barely sleep */
 +                      if (i < DFLT_HWRM_CMD_TIMEOUT)
 +                              usleep_range(HWRM_SHORT_MIN_TIMEOUT,
 +                                           HWRM_SHORT_MAX_TIMEOUT);
 +                      else
 +                              usleep_range(HWRM_MIN_TIMEOUT,
 +                                           HWRM_MAX_TIMEOUT);
                }
  
                if (i >= tmo_count) {
                        netdev_err(bp->dev, "Error (timeout: %d) msg {0x%x 0x%x} len:%d\n",
 -                                 timeout, le16_to_cpu(req->req_type),
 +                                 HWRM_TOTAL_TIMEOUT(i),
 +                                 le16_to_cpu(req->req_type),
                                   le16_to_cpu(req->seq_id), len);
                        return -1;
                }
  
                /* Last byte of resp contains valid bit */
                valid = bp->hwrm_cmd_resp_addr + len - 1;
 -              for (i = 0; i < 5; i++) {
 +              for (j = 0; j < HWRM_VALID_BIT_DELAY_USEC; j++) {
                        /* make sure we read from updated DMA memory */
                        dma_rmb();
                        if (*valid)
                        udelay(1);
                }
  
 -              if (i >= 5) {
 +              if (j >= HWRM_VALID_BIT_DELAY_USEC) {
                        netdev_err(bp->dev, "Error (timeout: %d) msg {0x%x 0x%x} len:%d v:%d\n",
 -                                 timeout, le16_to_cpu(req->req_type),
 +                                 HWRM_TOTAL_TIMEOUT(i),
 +                                 le16_to_cpu(req->req_type),
                                   le16_to_cpu(req->seq_id), len, *valid);
                        return -1;
                }
@@@ -4361,9 -4334,26 +4361,9 @@@ static int hwrm_ring_alloc_send_msg(str
        mutex_unlock(&bp->hwrm_cmd_lock);
  
        if (rc || err) {
 -              switch (ring_type) {
 -              case RING_FREE_REQ_RING_TYPE_L2_CMPL:
 -                      netdev_err(bp->dev, "hwrm_ring_alloc cp failed. rc:%x err:%x\n",
 -                                 rc, err);
 -                      return -1;
 -
 -              case RING_FREE_REQ_RING_TYPE_RX:
 -                      netdev_err(bp->dev, "hwrm_ring_alloc rx failed. rc:%x err:%x\n",
 -                                 rc, err);
 -                      return -1;
 -
 -              case RING_FREE_REQ_RING_TYPE_TX:
 -                      netdev_err(bp->dev, "hwrm_ring_alloc tx failed. rc:%x err:%x\n",
 -                                 rc, err);
 -                      return -1;
 -
 -              default:
 -                      netdev_err(bp->dev, "Invalid ring\n");
 -                      return -1;
 -              }
 +              netdev_err(bp->dev, "hwrm_ring_alloc type %d failed. rc:%x err:%x\n",
 +                         ring_type, rc, err);
 +              return -EIO;
        }
        ring->fw_ring_id = ring_id;
        return rc;
@@@ -4487,9 -4477,23 +4487,9 @@@ static int hwrm_ring_free_send_msg(stru
        mutex_unlock(&bp->hwrm_cmd_lock);
  
        if (rc || error_code) {
 -              switch (ring_type) {
 -              case RING_FREE_REQ_RING_TYPE_L2_CMPL:
 -                      netdev_err(bp->dev, "hwrm_ring_free cp failed. rc:%d\n",
 -                                 rc);
 -                      return rc;
 -              case RING_FREE_REQ_RING_TYPE_RX:
 -                      netdev_err(bp->dev, "hwrm_ring_free rx failed. rc:%d\n",
 -                                 rc);
 -                      return rc;
 -              case RING_FREE_REQ_RING_TYPE_TX:
 -                      netdev_err(bp->dev, "hwrm_ring_free tx failed. rc:%d\n",
 -                                 rc);
 -                      return rc;
 -              default:
 -                      netdev_err(bp->dev, "Invalid ring\n");
 -                      return -1;
 -              }
 +              netdev_err(bp->dev, "hwrm_ring_free type %d failed. rc:%x err:%x\n",
 +                         ring_type, rc, error_code);
 +              return -EIO;
        }
        return 0;
  }
@@@ -4717,10 -4721,6 +4717,10 @@@ bnxt_hwrm_reserve_vf_rings(struct bnxt 
  
        __bnxt_hwrm_reserve_vf_rings(bp, &req, tx_rings, rx_rings, ring_grps,
                                     cp_rings, vnics);
 +      req.enables |= cpu_to_le32(FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS |
 +                                 FUNC_VF_CFG_REQ_ENABLES_NUM_L2_CTXS);
 +      req.num_rsscos_ctxs = cpu_to_le16(BNXT_VF_MAX_RSS_CTX);
 +      req.num_l2_ctxs = cpu_to_le16(BNXT_VF_MAX_L2_CTX);
        rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
        if (rc)
                return -ENOMEM;
@@@ -5309,7 -5309,6 +5309,7 @@@ static int bnxt_hwrm_queue_qportcfg(str
        for (i = 0; i < bp->max_tc; i++) {
                bp->q_info[i].queue_id = *qptr++;
                bp->q_info[i].queue_profile = *qptr++;
 +              bp->tc_to_qidx[i] = i;
        }
  
  qportcfg_exit:
@@@ -5377,8 -5376,7 +5377,8 @@@ int bnxt_hwrm_fw_set_time(struct bnxt *
        struct tm tm;
        time64_t now = ktime_get_real_seconds();
  
 -      if (bp->hwrm_spec_code < 0x10400)
 +      if ((BNXT_VF(bp) && bp->hwrm_spec_code < 0x10901) ||
 +          bp->hwrm_spec_code < 0x10400)
                return -EOPNOTSUPP;
  
        time64_to_tm(now, 0, &tm);
@@@ -5960,9 -5958,6 +5960,9 @@@ static int bnxt_init_msix(struct bnxt *
        if (total_vecs > max)
                total_vecs = max;
  
 +      if (!total_vecs)
 +              return 0;
 +
        msix_ent = kcalloc(total_vecs, sizeof(struct msix_entry), GFP_KERNEL);
        if (!msix_ent)
                return -ENOMEM;
@@@ -6462,9 -6457,6 +6462,9 @@@ static int bnxt_update_link(struct bnx
        }
        mutex_unlock(&bp->hwrm_cmd_lock);
  
 +      if (!BNXT_SINGLE_PF(bp))
 +              return 0;
 +
        diff = link_info->support_auto_speeds ^ link_info->advertising;
        if ((link_info->support_auto_speeds | diff) !=
            link_info->support_auto_speeds) {
@@@ -6851,8 -6843,6 +6851,8 @@@ static void bnxt_preset_reg_win(struct 
        }
  }
  
 +static int bnxt_init_dflt_ring_mode(struct bnxt *bp);
 +
  static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
  {
        int rc = 0;
        bnxt_preset_reg_win(bp);
        netif_carrier_off(bp->dev);
        if (irq_re_init) {
 +              /* Reserve rings now if none were reserved at driver probe. */
 +              rc = bnxt_init_dflt_ring_mode(bp);
 +              if (rc) {
 +                      netdev_err(bp->dev, "Failed to reserve default rings at open\n");
 +                      return rc;
 +              }
                rc = bnxt_reserve_rings(bp);
                if (rc)
                        return rc;
        }
  
        bnxt_enable_napi(bp);
 +      bnxt_debug_dev_init(bp);
  
        rc = bnxt_init_nic(bp, irq_re_init);
        if (rc) {
        return 0;
  
  open_err:
 +      bnxt_debug_dev_exit(bp);
        bnxt_disable_napi(bp);
        bnxt_del_napi(bp);
  
@@@ -7020,7 -7002,6 +7020,7 @@@ static void __bnxt_close_nic(struct bnx
  
        /* TODO CHIMP_FW: Link/PHY related cleanup if (link_re_init) */
  
 +      bnxt_debug_dev_exit(bp);
        bnxt_disable_napi(bp);
        del_timer_sync(&bp->timer);
        bnxt_free_skbs(bp);
@@@ -7298,25 -7279,6 +7298,25 @@@ skip_uc
        return rc;
  }
  
 +static bool bnxt_can_reserve_rings(struct bnxt *bp)
 +{
 +#ifdef CONFIG_BNXT_SRIOV
 +      if ((bp->flags & BNXT_FLAG_NEW_RM) && BNXT_VF(bp)) {
 +              struct bnxt_hw_resc *hw_resc = &bp->hw_resc;
 +
 +              /* No minimum rings were provisioned by the PF.  Don't
 +               * reserve rings by default when device is down.
 +               */
 +              if (hw_resc->min_tx_rings || hw_resc->resv_tx_rings)
 +                      return true;
 +
 +              if (!netif_running(bp->dev))
 +                      return false;
 +      }
 +#endif
 +      return true;
 +}
 +
  /* If the chip and firmware supports RFS */
  static bool bnxt_rfs_supported(struct bnxt *bp)
  {
@@@ -7333,7 -7295,7 +7333,7 @@@ static bool bnxt_rfs_capable(struct bnx
  #ifdef CONFIG_RFS_ACCEL
        int vnics, max_vnics, max_rss_ctxs;
  
 -      if (!(bp->flags & BNXT_FLAG_MSIX_CAP))
 +      if (!(bp->flags & BNXT_FLAG_MSIX_CAP) || !bnxt_can_reserve_rings(bp))
                return false;
  
        vnics = 1 + bp->rx_nr_rings;
@@@ -7767,7 -7729,7 +7767,7 @@@ static void bnxt_init_dflt_coal(struct 
        coal->coal_bufs = 30;
        coal->coal_ticks_irq = 1;
        coal->coal_bufs_irq = 2;
 -      coal->idle_thresh = 25;
 +      coal->idle_thresh = 50;
        coal->bufs_per_record = 2;
        coal->budget = 64;              /* NAPI budget */
  
@@@ -8567,9 -8529,6 +8567,9 @@@ static int bnxt_set_dflt_rings(struct b
  {
        int dflt_rings, max_rx_rings, max_tx_rings, rc;
  
 +      if (!bnxt_can_reserve_rings(bp))
 +              return 0;
 +
        if (sh)
                bp->flags |= BNXT_FLAG_SHARED_RINGS;
        dflt_rings = netif_get_num_default_rss_queues();
        return rc;
  }
  
 +static int bnxt_init_dflt_ring_mode(struct bnxt *bp)
 +{
 +      int rc;
 +
 +      if (bp->tx_nr_rings)
 +              return 0;
 +
 +      rc = bnxt_set_dflt_rings(bp, true);
 +      if (rc) {
 +              netdev_err(bp->dev, "Not enough rings available.\n");
 +              return rc;
 +      }
 +      rc = bnxt_init_int_mode(bp);
 +      if (rc)
 +              return rc;
 +      bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
 +      if (bnxt_rfs_supported(bp) && bnxt_rfs_capable(bp)) {
 +              bp->flags |= BNXT_FLAG_RFS;
 +              bp->dev->features |= NETIF_F_NTUPLE;
 +      }
 +      return 0;
 +}
 +
  int bnxt_restore_pf_fw_resources(struct bnxt *bp)
  {
        int rc;
@@@ -8678,29 -8614,13 +8678,13 @@@ static int bnxt_init_mac_addr(struct bn
                        memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN);
                } else {
                        eth_hw_addr_random(bp->dev);
 -                      rc = bnxt_approve_mac(bp, bp->dev->dev_addr);
                }
 +              rc = bnxt_approve_mac(bp, bp->dev->dev_addr);
  #endif
        }
        return rc;
  }
  
- static void bnxt_parse_log_pcie_link(struct bnxt *bp)
- {
-       enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
-       enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
-       if (pcie_get_minimum_link(pci_physfn(bp->pdev), &speed, &width) ||
-           speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN)
-               netdev_info(bp->dev, "Failed to determine PCIe Link Info\n");
-       else
-               netdev_info(bp->dev, "PCIe: Speed %s Width x%d\n",
-                           speed == PCIE_SPEED_2_5GT ? "2.5GT/s" :
-                           speed == PCIE_SPEED_5_0GT ? "5.0GT/s" :
-                           speed == PCIE_SPEED_8_0GT ? "8.0GT/s" :
-                           "Unknown", width);
- }
  static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
  {
        static int version_printed;
        netdev_info(dev, "%s found at mem %lx, node addr %pM\n",
                    board_info[ent->driver_data].name,
                    (long)pci_resource_start(pdev, 0), dev->dev_addr);
-       bnxt_parse_log_pcie_link(bp);
+       pcie_print_link_status(pdev);
  
        return 0;
  
@@@ -9142,7 -9061,6 +9125,7 @@@ static struct pci_driver bnxt_pci_drive
  
  static int __init bnxt_init(void)
  {
 +      bnxt_debug_init();
        return pci_register_driver(&bnxt_pci_driver);
  }
  
@@@ -9151,7 -9069,6 +9134,7 @@@ static void __exit bnxt_exit(void
        pci_unregister_driver(&bnxt_pci_driver);
        if (bnxt_pf_wq)
                destroy_workqueue(bnxt_pf_wq);
 +      bnxt_debug_exit();
  }
  
  module_init(bnxt_init);
index 0efae2030e71ba88342e04178449a11c9c20f4f6,7328f24ba1dd61c2eaae14f7b8a83728ef549c1a..35cb3ae4f7b672069423275707943733e6a5d5fa
@@@ -301,14 -301,14 +301,14 @@@ void t4_os_link_changed(struct adapter 
        }
  }
  
 -void t4_os_portmod_changed(const struct adapter *adap, int port_id)
 +void t4_os_portmod_changed(struct adapter *adap, int port_id)
  {
        static const char *mod_str[] = {
                NULL, "LR", "SR", "ER", "passive DA", "active DA", "LRM"
        };
  
 -      const struct net_device *dev = adap->port[port_id];
 -      const struct port_info *pi = netdev_priv(dev);
 +      struct net_device *dev = adap->port[port_id];
 +      struct port_info *pi = netdev_priv(dev);
  
        if (pi->mod_type == FW_PORT_MOD_TYPE_NONE)
                netdev_info(dev, "port module unplugged\n");
        else
                netdev_info(dev, "%s: unknown module type %d inserted\n",
                            dev->name, pi->mod_type);
 +
 +      /* If the interface is running, then we'll need any "sticky" Link
 +       * Parameters redone with a new Transceiver Module.
 +       */
 +      pi->link_cfg.redo_l1cfg = netif_running(dev);
  }
  
  int dbfifo_int_thresh = 10; /* 10 == 640 entry threshold */
@@@ -465,7 -460,7 +465,7 @@@ static int link_start(struct net_devic
                                    &pi->link_cfg);
        if (ret == 0) {
                local_bh_disable();
 -              ret = t4_enable_vi_params(pi->adapter, mb, pi->viid, true,
 +              ret = t4_enable_pi_params(pi->adapter, mb, pi, true,
                                          true, CXGB4_DCB_ENABLED);
                local_bh_enable();
        }
@@@ -2344,8 -2339,7 +2344,8 @@@ static int cxgb_close(struct net_devic
  
        netif_tx_stop_all_queues(dev);
        netif_carrier_off(dev);
 -      ret = t4_enable_vi(adapter, adapter->pf, pi->viid, false, false);
 +      ret = t4_enable_pi_params(adapter, adapter->pf, pi,
 +                                false, false, false);
  #ifdef CONFIG_CHELSIO_T4_DCB
        cxgb4_dcb_reset(dev);
        dcb_tx_queue_prio_enable(dev, false);
@@@ -2892,13 -2886,13 +2892,13 @@@ static int cxgb_set_tx_maxrate(struct n
        }
  
        /* Convert from Mbps to Kbps */
 -      req_rate = rate << 10;
 +      req_rate = rate * 1000;
  
        /* Max rate is 100 Gbps */
 -      if (req_rate >= SCHED_MAX_RATE_KBPS) {
 +      if (req_rate > SCHED_MAX_RATE_KBPS) {
                dev_err(adap->pdev_dev,
                        "Invalid rate %u Mbps, Max rate is %u Mbps\n",
 -                      rate, SCHED_MAX_RATE_KBPS >> 10);
 +                      rate, SCHED_MAX_RATE_KBPS / 1000);
                return -ERANGE;
        }
  
@@@ -3087,7 -3081,7 +3087,7 @@@ static void cxgb_del_udp_tunnel(struct 
                                           match_all_mac, match_all_mac,
                                           adapter->rawf_start +
                                            pi->port_id,
 -                                         1, pi->port_id, true);
 +                                         1, pi->port_id, false);
                if (ret < 0) {
                        netdev_info(netdev, "Failed to free mac filter entry, for port %d\n",
                                    i);
@@@ -3175,7 -3169,7 +3175,7 @@@ static void cxgb_add_udp_tunnel(struct 
                                            match_all_mac,
                                            adapter->rawf_start +
                                            pi->port_id,
 -                                          1, pi->port_id, true);
 +                                          1, pi->port_id, false);
                if (ret < 0) {
                        netdev_info(netdev, "Failed to allocate a mac filter entry, not adding port %d\n",
                                    be16_to_cpu(ti->port));
@@@ -3439,8 -3433,8 +3439,8 @@@ static int adap_config_hma(struct adapt
        sgl = adapter->hma.sgt->sgl;
        node = dev_to_node(adapter->pdev_dev);
        for_each_sg(sgl, iter, sgt->orig_nents, i) {
 -              newpage = alloc_pages_node(node, __GFP_NOWARN | GFP_KERNEL,
 -                                         page_order);
 +              newpage = alloc_pages_node(node, __GFP_NOWARN | GFP_KERNEL |
 +                                         __GFP_ZERO, page_order);
                if (!newpage) {
                        dev_err(adapter->pdev_dev,
                                "Not enough memory for HMA page allocation\n");
@@@ -4141,10 -4135,6 +4141,10 @@@ static int adap_init0(struct adapter *a
                 * card
                 */
                card_fw = kvzalloc(sizeof(*card_fw), GFP_KERNEL);
 +              if (!card_fw) {
 +                      ret = -ENOMEM;
 +                      goto bye;
 +              }
  
                /* Get FW from from /lib/firmware/ */
                ret = request_firmware(&fw, fw_info->fw_mod_name,
        adap->tids.nftids = val[4] - val[3] + 1;
        adap->sge.ingr_start = val[5];
  
 +      if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) {
 +              /* Read the raw mps entries. In T6, the last 2 tcam entries
 +               * are reserved for raw mac addresses (rawf = 2, one per port).
 +               */
 +              params[0] = FW_PARAM_PFVF(RAWF_START);
 +              params[1] = FW_PARAM_PFVF(RAWF_END);
 +              ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2,
 +                                    params, val);
 +              if (ret == 0) {
 +                      adap->rawf_start = val[0];
 +                      adap->rawf_cnt = val[1] - val[0] + 1;
 +              }
 +      }
 +
        /* qids (ingress/egress) returned from firmware can be anywhere
         * in the range from EQ(IQFLINT)_START to EQ(IQFLINT)_END.
         * Hence driver needs to allocate memory for this range to
@@@ -5066,79 -5042,6 +5066,6 @@@ static int init_rss(struct adapter *ada
        return 0;
  }
  
- static int cxgb4_get_pcie_dev_link_caps(struct adapter *adap,
-                                       enum pci_bus_speed *speed,
-                                       enum pcie_link_width *width)
- {
-       u32 lnkcap1, lnkcap2;
-       int err1, err2;
- #define  PCIE_MLW_CAP_SHIFT 4   /* start of MLW mask in link capabilities */
-       *speed = PCI_SPEED_UNKNOWN;
-       *width = PCIE_LNK_WIDTH_UNKNOWN;
-       err1 = pcie_capability_read_dword(adap->pdev, PCI_EXP_LNKCAP,
-                                         &lnkcap1);
-       err2 = pcie_capability_read_dword(adap->pdev, PCI_EXP_LNKCAP2,
-                                         &lnkcap2);
-       if (!err2 && lnkcap2) { /* PCIe r3.0-compliant */
-               if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB)
-                       *speed = PCIE_SPEED_8_0GT;
-               else if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB)
-                       *speed = PCIE_SPEED_5_0GT;
-               else if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB)
-                       *speed = PCIE_SPEED_2_5GT;
-       }
-       if (!err1) {
-               *width = (lnkcap1 & PCI_EXP_LNKCAP_MLW) >> PCIE_MLW_CAP_SHIFT;
-               if (!lnkcap2) { /* pre-r3.0 */
-                       if (lnkcap1 & PCI_EXP_LNKCAP_SLS_5_0GB)
-                               *speed = PCIE_SPEED_5_0GT;
-                       else if (lnkcap1 & PCI_EXP_LNKCAP_SLS_2_5GB)
-                               *speed = PCIE_SPEED_2_5GT;
-               }
-       }
-       if (*speed == PCI_SPEED_UNKNOWN || *width == PCIE_LNK_WIDTH_UNKNOWN)
-               return err1 ? err1 : err2 ? err2 : -EINVAL;
-       return 0;
- }
- static void cxgb4_check_pcie_caps(struct adapter *adap)
- {
-       enum pcie_link_width width, width_cap;
-       enum pci_bus_speed speed, speed_cap;
- #define PCIE_SPEED_STR(speed) \
-       (speed == PCIE_SPEED_8_0GT ? "8.0GT/s" : \
-        speed == PCIE_SPEED_5_0GT ? "5.0GT/s" : \
-        speed == PCIE_SPEED_2_5GT ? "2.5GT/s" : \
-        "Unknown")
-       if (cxgb4_get_pcie_dev_link_caps(adap, &speed_cap, &width_cap)) {
-               dev_warn(adap->pdev_dev,
-                        "Unable to determine PCIe device BW capabilities\n");
-               return;
-       }
-       if (pcie_get_minimum_link(adap->pdev, &speed, &width) ||
-           speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN) {
-               dev_warn(adap->pdev_dev,
-                        "Unable to determine PCI Express bandwidth.\n");
-               return;
-       }
-       dev_info(adap->pdev_dev, "PCIe link speed is %s, device supports %s\n",
-                PCIE_SPEED_STR(speed), PCIE_SPEED_STR(speed_cap));
-       dev_info(adap->pdev_dev, "PCIe link width is x%d, device supports x%d\n",
-                width, width_cap);
-       if (speed < speed_cap || width < width_cap)
-               dev_info(adap->pdev_dev,
-                        "A slot with more lanes and/or higher speed is "
-                        "suggested for optimal performance.\n");
- }
  /* Dump basic information about the adapter */
  static void print_adapter_info(struct adapter *adapter)
  {
@@@ -5205,7 -5108,6 +5132,7 @@@ static void free_some_resources(struct 
  {
        unsigned int i;
  
 +      kvfree(adapter->mps_encap);
        kvfree(adapter->smt);
        kvfree(adapter->l2t);
        kvfree(adapter->srq);
                   NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
  #define SEGMENT_SIZE 128
  
 -static int get_chip_type(struct pci_dev *pdev, u32 pl_rev)
 +static int t4_get_chip_type(struct adapter *adap, int ver)
  {
 -      u16 device_id;
 +      u32 pl_rev = REV_G(t4_read_reg(adap, PL_REV_A));
  
 -      /* Retrieve adapter's device ID */
 -      pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id);
 -
 -      switch (device_id >> 12) {
 +      switch (ver) {
        case CHELSIO_T4:
                return CHELSIO_CHIP_CODE(CHELSIO_T4, pl_rev);
        case CHELSIO_T5:
        case CHELSIO_T6:
                return CHELSIO_CHIP_CODE(CHELSIO_T6, pl_rev);
        default:
 -              dev_err(&pdev->dev, "Device %d is not supported\n",
 -                      device_id);
 +              break;
        }
        return -EINVAL;
  }
@@@ -5282,9 -5188,13 +5209,9 @@@ static int cxgb4_iov_configure(struct p
        u32 pcie_fw;
  
        pcie_fw = readl(adap->regs + PCIE_FW_A);
 -      /* Check if cxgb4 is the MASTER and fw is initialized */
 -      if (num_vfs &&
 -          (!(pcie_fw & PCIE_FW_INIT_F) ||
 -          !(pcie_fw & PCIE_FW_MASTER_VLD_F) ||
 -          PCIE_FW_MASTER_G(pcie_fw) != CXGB4_UNIFIED_PF)) {
 -              dev_warn(&pdev->dev,
 -                       "cxgb4 driver needs to be MASTER to support SRIOV\n");
 +      /* Check if fw is initialized */
 +      if (!(pcie_fw & PCIE_FW_INIT_F)) {
 +              dev_warn(&pdev->dev, "Device not initialized\n");
                return -EOPNOTSUPP;
        }
  
  
  static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
  {
 -      int func, i, err, s_qpp, qpp, num_seg;
 +      struct net_device *netdev;
 +      struct adapter *adapter;
 +      static int adap_idx = 1;
 +      int s_qpp, qpp, num_seg;
        struct port_info *pi;
        bool highdma = false;
 -      struct adapter *adapter = NULL;
 -      struct net_device *netdev;
 -      void __iomem *regs;
 -      u32 whoami, pl_rev;
        enum chip_type chip;
 -      static int adap_idx = 1;
 +      void __iomem *regs;
 +      int func, chip_ver;
 +      u16 device_id;
 +      int i, err;
 +      u32 whoami;
  
        printk_once(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION);
  
                goto out_free_adapter;
  
        /* We control everything through one PF */
 -      whoami = readl(regs + PL_WHOAMI_A);
 -      pl_rev = REV_G(readl(regs + PL_REV_A));
 -      chip = get_chip_type(pdev, pl_rev);
 -      func = CHELSIO_CHIP_VERSION(chip) <= CHELSIO_T5 ?
 -              SOURCEPF_G(whoami) : T6_SOURCEPF_G(whoami);
 +      whoami = t4_read_reg(adapter, PL_WHOAMI_A);
 +      pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id);
 +      chip = t4_get_chip_type(adapter, CHELSIO_PCI_ID_VER(device_id));
 +      if (chip < 0) {
 +              dev_err(&pdev->dev, "Device %d is not supported\n", device_id);
 +              err = chip;
 +              goto out_free_adapter;
 +      }
 +      chip_ver = CHELSIO_CHIP_VERSION(chip);
 +      func = chip_ver <= CHELSIO_T5 ?
 +             SOURCEPF_G(whoami) : T6_SOURCEPF_G(whoami);
  
        adapter->pdev = pdev;
        adapter->pdev_dev = &pdev->dev;
        }
        spin_lock_init(&adapter->mbox_lock);
        INIT_LIST_HEAD(&adapter->mlist.list);
 +      adapter->mbox_log->size = T4_OS_LOG_MBOX_CMDS;
        pci_set_drvdata(pdev, adapter);
  
        if (func != ent->driver_data) {
                goto out_free_adapter;
        }
  
 -      adapter->mbox_log->size = T4_OS_LOG_MBOX_CMDS;
 -
        /* PCI device has been enabled */
        adapter->flags |= DEV_ENABLED;
        memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map));
        if (err)
                goto out_free_adapter;
  
 +      if (is_kdump_kernel()) {
 +              /* Collect hardware state and append to /proc/vmcore */
 +              err = cxgb4_cudbg_vmcore_add_dump(adapter);
 +              if (err) {
 +                      dev_warn(adapter->pdev_dev,
 +                               "Fail collecting vmcore device dump, err: %d. Continuing\n",
 +                               err);
 +                      err = 0;
 +              }
 +      }
  
        if (!is_t4(adapter->params.chip)) {
                s_qpp = (QUEUESPERPAGEPF0_S +
                        NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
                        NETIF_F_HW_TC;
  
 -              if (CHELSIO_CHIP_VERSION(chip) > CHELSIO_T5)
 +              if (chip_ver > CHELSIO_T5) {
 +                      netdev->hw_enc_features |= NETIF_F_IP_CSUM |
 +                                                 NETIF_F_IPV6_CSUM |
 +                                                 NETIF_F_RXCSUM |
 +                                                 NETIF_F_GSO_UDP_TUNNEL |
 +                                                 NETIF_F_TSO | NETIF_F_TSO6;
 +
                        netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL;
 +              }
  
                if (highdma)
                        netdev->hw_features |= NETIF_F_HIGHDMA;
                adapter->params.offload = 0;
        }
  
 +      adapter->mps_encap = kvzalloc(sizeof(struct mps_encap_entry) *
 +                                        adapter->params.arch.mps_tcam_size,
 +                                    GFP_KERNEL);
 +      if (!adapter->mps_encap)
 +              dev_warn(&pdev->dev, "could not allocate MPS Encap entries, continuing\n");
 +
  #if IS_ENABLED(CONFIG_IPV6)
 -      if ((CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5) &&
 +      if (chip_ver <= CHELSIO_T5 &&
            (!(t4_read_reg(adapter, LE_DB_CONFIG_A) & ASLIPCOMPEN_F))) {
                /* CLIP functionality is not present in hardware,
                 * hence disable all offload features
        }
  
        /* check for PCI Express bandwidth capabiltites */
-       cxgb4_check_pcie_caps(adapter);
+       pcie_print_link_status(pdev);
  
        err = init_rss(adapter);
        if (err)
index 38b4e489949046f130ce36f7ae248b3a8eccea83,8990285f6e1229934e4eea5af6a79171c477d4b8..4929f726559850622a54ae1281c530c0b2c5095e
@@@ -1,5 -1,30 +1,5 @@@
 -/*******************************************************************************
 -
 -  Intel 10 Gigabit PCI Express Linux driver
 -  Copyright(c) 1999 - 2016 Intel Corporation.
 -
 -  This program is free software; you can redistribute it and/or modify it
 -  under the terms and conditions of the GNU General Public License,
 -  version 2, as published by the Free Software Foundation.
 -
 -  This program is distributed in the hope it will be useful, but WITHOUT
 -  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 -  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 -  more details.
 -
 -  You should have received a copy of the GNU General Public License along with
 -  this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 -
 -  The full GNU General Public License is included in this distribution in
 -  the file called "COPYING".
 -
 -  Contact Information:
 -  Linux NICS <linux.nics@intel.com>
 -  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
 -  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 -
 -*******************************************************************************/
 +// SPDX-License-Identifier: GPL-2.0
 +/* Copyright(c) 1999 - 2018 Intel Corporation. */
  
  #include <linux/types.h>
  #include <linux/module.h>
@@@ -245,9 -270,6 +245,6 @@@ static void ixgbe_check_minimum_link(st
                                     int expected_gts)
  {
        struct ixgbe_hw *hw = &adapter->hw;
-       int max_gts = 0;
-       enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
-       enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
        struct pci_dev *pdev;
  
        /* Some devices are not connected over PCIe and thus do not negotiate
        else
                pdev = adapter->pdev;
  
-       if (pcie_get_minimum_link(pdev, &speed, &width) ||
-           speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN) {
-               e_dev_warn("Unable to determine PCI Express bandwidth.\n");
-               return;
-       }
-       switch (speed) {
-       case PCIE_SPEED_2_5GT:
-               /* 8b/10b encoding reduces max throughput by 20% */
-               max_gts = 2 * width;
-               break;
-       case PCIE_SPEED_5_0GT:
-               /* 8b/10b encoding reduces max throughput by 20% */
-               max_gts = 4 * width;
-               break;
-       case PCIE_SPEED_8_0GT:
-               /* 128b/130b encoding reduces throughput by less than 2% */
-               max_gts = 8 * width;
-               break;
-       default:
-               e_dev_warn("Unable to determine PCI Express bandwidth.\n");
-               return;
-       }
-       e_dev_info("PCI Express bandwidth of %dGT/s available\n",
-                  max_gts);
-       e_dev_info("(Speed:%s, Width: x%d, Encoding Loss:%s)\n",
-                  (speed == PCIE_SPEED_8_0GT ? "8.0GT/s" :
-                   speed == PCIE_SPEED_5_0GT ? "5.0GT/s" :
-                   speed == PCIE_SPEED_2_5GT ? "2.5GT/s" :
-                   "Unknown"),
-                  width,
-                  (speed == PCIE_SPEED_2_5GT ? "20%" :
-                   speed == PCIE_SPEED_5_0GT ? "20%" :
-                   speed == PCIE_SPEED_8_0GT ? "<2%" :
-                   "Unknown"));
-       if (max_gts < expected_gts) {
-               e_dev_warn("This is not sufficient for optimal performance of this card.\n");
-               e_dev_warn("For optimal performance, at least %dGT/s of bandwidth is required.\n",
-                       expected_gts);
-               e_dev_warn("A slot with more lanes and/or higher speed is suggested.\n");
-       }
+       pcie_print_link_status(pdev);
  }
  
  static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
@@@ -727,8 -707,8 +682,8 @@@ static void ixgbe_dump(struct ixgbe_ada
                                        ring_desc = "";
                                pr_info("T [0x%03X]    %016llX %016llX %016llX %08X %p %016llX %p%s",
                                        i,
 -                                      le64_to_cpu(u0->a),
 -                                      le64_to_cpu(u0->b),
 +                                      le64_to_cpu((__force __le64)u0->a),
 +                                      le64_to_cpu((__force __le64)u0->b),
                                        (u64)dma_unmap_addr(tx_buffer, dma),
                                        dma_unmap_len(tx_buffer, len),
                                        tx_buffer->next_to_watch,
@@@ -839,15 -819,15 +794,15 @@@ rx_ring_summary
                                /* Descriptor Done */
                                pr_info("RWB[0x%03X]     %016llX %016llX ---------------- %p%s\n",
                                        i,
 -                                      le64_to_cpu(u0->a),
 -                                      le64_to_cpu(u0->b),
 +                                      le64_to_cpu((__force __le64)u0->a),
 +                                      le64_to_cpu((__force __le64)u0->b),
                                        rx_buffer_info->skb,
                                        ring_desc);
                        } else {
                                pr_info("R  [0x%03X]     %016llX %016llX %016llX %p%s\n",
                                        i,
 -                                      le64_to_cpu(u0->a),
 -                                      le64_to_cpu(u0->b),
 +                                      le64_to_cpu((__force __le64)u0->a),
 +                                      le64_to_cpu((__force __le64)u0->b),
                                        (u64)rx_buffer_info->dma,
                                        rx_buffer_info->skb,
                                        ring_desc);
@@@ -1191,7 -1171,7 +1146,7 @@@ static bool ixgbe_clean_tx_irq(struct i
  
                /* free the skb */
                if (ring_is_xdp(tx_ring))
 -                      page_frag_free(tx_buffer->data);
 +                      xdp_return_frame(tx_buffer->xdpf);
                else
                        napi_consume_skb(tx_buffer->skb, napi_budget);
  
@@@ -1743,14 -1723,15 +1698,14 @@@ static void ixgbe_process_skb_fields(st
        if (ixgbe_test_staterr(rx_desc, IXGBE_RXDADV_STAT_SECP))
                ixgbe_ipsec_rx(rx_ring, rx_desc, skb);
  
 -      skb->protocol = eth_type_trans(skb, dev);
 -
        /* record Rx queue, or update MACVLAN statistics */
        if (netif_is_ixgbe(dev))
                skb_record_rx_queue(skb, rx_ring->queue_index);
        else
                macvlan_count_rx(netdev_priv(dev), skb->len + ETH_HLEN, true,
 -                               (skb->pkt_type == PACKET_BROADCAST) ||
 -                               (skb->pkt_type == PACKET_MULTICAST));
 +                               false);
 +
 +      skb->protocol = eth_type_trans(skb, dev);
  }
  
  static void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,
@@@ -2236,7 -2217,7 +2191,7 @@@ static struct sk_buff *ixgbe_build_skb(
  #define IXGBE_XDP_TX 2
  
  static int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter,
 -                             struct xdp_buff *xdp);
 +                             struct xdp_frame *xdpf);
  
  static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
                                     struct ixgbe_ring *rx_ring,
  {
        int err, result = IXGBE_XDP_PASS;
        struct bpf_prog *xdp_prog;
 +      struct xdp_frame *xdpf;
        u32 act;
  
        rcu_read_lock();
        if (!xdp_prog)
                goto xdp_out;
  
 +      prefetchw(xdp->data_hard_start); /* xdp_frame write */
 +
        act = bpf_prog_run_xdp(xdp_prog, xdp);
        switch (act) {
        case XDP_PASS:
                break;
        case XDP_TX:
 -              result = ixgbe_xmit_xdp_ring(adapter, xdp);
 +              xdpf = convert_to_xdp_frame(xdp);
 +              if (unlikely(!xdpf)) {
 +                      result = IXGBE_XDP_CONSUMED;
 +                      break;
 +              }
 +              result = ixgbe_xmit_xdp_ring(adapter, xdpf);
                break;
        case XDP_REDIRECT:
                err = xdp_do_redirect(adapter->netdev, xdp, xdp_prog);
@@@ -4193,8 -4166,7 +4148,8 @@@ static void ixgbe_setup_psrtype(struct 
  static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
  {
        struct ixgbe_hw *hw = &adapter->hw;
 -      u32 reg_offset, vf_shift;
 +      u16 pool = adapter->num_rx_pools;
 +      u32 reg_offset, vf_shift, vmolr;
        u32 gcr_ext, vmdctl;
        int i;
  
        vmdctl |= IXGBE_VT_CTL_REPLEN;
        IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl);
  
 +      /* accept untagged packets until a vlan tag is
 +       * specifically set for the VMDQ queue/pool
 +       */
 +      vmolr = IXGBE_VMOLR_AUPE;
 +      while (pool--)
 +              IXGBE_WRITE_REG(hw, IXGBE_VMOLR(VMDQ_P(pool)), vmolr);
 +
        vf_shift = VMDQ_P(0) % 32;
        reg_offset = (VMDQ_P(0) >= 32) ? 1 : 0;
  
@@@ -4882,6 -4847,36 +4837,6 @@@ int ixgbe_del_mac_filter(struct ixgbe_a
        return -ENOMEM;
  }
  
 -/**
 - * ixgbe_write_uc_addr_list - write unicast addresses to RAR table
 - * @netdev: network interface device structure
 - * @vfn: pool to associate with unicast addresses
 - *
 - * Writes unicast address list to the RAR table.
 - * Returns: -ENOMEM on failure/insufficient address space
 - *                0 on no addresses written
 - *                X on writing X addresses to the RAR table
 - **/
 -static int ixgbe_write_uc_addr_list(struct net_device *netdev, int vfn)
 -{
 -      struct ixgbe_adapter *adapter = netdev_priv(netdev);
 -      int count = 0;
 -
 -      /* return ENOMEM indicating insufficient memory for addresses */
 -      if (netdev_uc_count(netdev) > ixgbe_available_rars(adapter, vfn))
 -              return -ENOMEM;
 -
 -      if (!netdev_uc_empty(netdev)) {
 -              struct netdev_hw_addr *ha;
 -              netdev_for_each_uc_addr(ha, netdev) {
 -                      ixgbe_del_mac_filter(adapter, ha->addr, vfn);
 -                      ixgbe_add_mac_filter(adapter, ha->addr, vfn);
 -                      count++;
 -              }
 -      }
 -      return count;
 -}
 -
  static int ixgbe_uc_sync(struct net_device *netdev, const unsigned char *addr)
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
@@@ -5261,6 -5256,29 +5216,6 @@@ static void ixgbe_fdir_filter_restore(s
        spin_unlock(&adapter->fdir_perfect_lock);
  }
  
 -static void ixgbe_macvlan_set_rx_mode(struct net_device *dev, unsigned int pool,
 -                                    struct ixgbe_adapter *adapter)
 -{
 -      struct ixgbe_hw *hw = &adapter->hw;
 -      u32 vmolr;
 -
 -      /* No unicast promiscuous support for VMDQ devices. */
 -      vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(pool));
 -      vmolr |= (IXGBE_VMOLR_ROMPE | IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE);
 -
 -      /* clear the affected bit */
 -      vmolr &= ~IXGBE_VMOLR_MPE;
 -
 -      if (dev->flags & IFF_ALLMULTI) {
 -              vmolr |= IXGBE_VMOLR_MPE;
 -      } else {
 -              vmolr |= IXGBE_VMOLR_ROMPE;
 -              hw->mac.ops.update_mc_addr_list(hw, dev);
 -      }
 -      ixgbe_write_uc_addr_list(adapter->netdev, pool);
 -      IXGBE_WRITE_REG(hw, IXGBE_VMOLR(pool), vmolr);
 -}
 -
  /**
   * ixgbe_clean_rx_ring - Free Rx Buffers per Queue
   * @rx_ring: ring to free buffers from
@@@ -5313,17 -5331,21 +5268,17 @@@ static void ixgbe_clean_rx_ring(struct 
        rx_ring->next_to_use = 0;
  }
  
 -static int ixgbe_fwd_ring_up(struct net_device *vdev,
 +static int ixgbe_fwd_ring_up(struct ixgbe_adapter *adapter,
                             struct ixgbe_fwd_adapter *accel)
  {
 -      struct ixgbe_adapter *adapter = accel->real_adapter;
 +      struct net_device *vdev = accel->netdev;
        int i, baseq, err;
  
 -      if (!test_bit(accel->pool, adapter->fwd_bitmask))
 -              return 0;
 -
        baseq = accel->pool * adapter->num_rx_queues_per_pool;
        netdev_dbg(vdev, "pool %i:%i queues %i:%i\n",
                   accel->pool, adapter->num_rx_pools,
                   baseq, baseq + adapter->num_rx_queues_per_pool);
  
 -      accel->netdev = vdev;
        accel->rx_base_queue = baseq;
        accel->tx_base_queue = baseq;
  
         */
        err = ixgbe_add_mac_filter(adapter, vdev->dev_addr,
                                   VMDQ_P(accel->pool));
 -      if (err >= 0) {
 -              ixgbe_macvlan_set_rx_mode(vdev, accel->pool, adapter);
 +      if (err >= 0)
                return 0;
 -      }
 +
 +      /* if we cannot add the MAC rule then disable the offload */
 +      macvlan_release_l2fw_offload(vdev);
  
        for (i = 0; i < adapter->num_rx_queues_per_pool; i++)
                adapter->rx_ring[baseq + i]->netdev = NULL;
  
 +      netdev_err(vdev, "L2FW offload disabled due to L2 filter error\n");
 +
 +      clear_bit(accel->pool, adapter->fwd_bitmask);
 +      kfree(accel);
 +
        return err;
  }
  
 -static int ixgbe_upper_dev_walk(struct net_device *upper, void *data)
 +static int ixgbe_macvlan_up(struct net_device *vdev, void *data)
  {
 -      if (netif_is_macvlan(upper)) {
 -              struct macvlan_dev *dfwd = netdev_priv(upper);
 -              struct ixgbe_fwd_adapter *vadapter = dfwd->fwd_priv;
 +      struct ixgbe_adapter *adapter = data;
 +      struct ixgbe_fwd_adapter *accel;
  
 -              if (dfwd->fwd_priv)
 -                      ixgbe_fwd_ring_up(upper, vadapter);
 -      }
 +      if (!netif_is_macvlan(vdev))
 +              return 0;
 +
 +      accel = macvlan_accel_priv(vdev);
 +      if (!accel)
 +              return 0;
 +
 +      ixgbe_fwd_ring_up(adapter, accel);
  
        return 0;
  }
  static void ixgbe_configure_dfwd(struct ixgbe_adapter *adapter)
  {
        netdev_walk_all_upper_dev_rcu(adapter->netdev,
 -                                    ixgbe_upper_dev_walk, NULL);
 +                                    ixgbe_macvlan_up, adapter);
  }
  
  static void ixgbe_configure(struct ixgbe_adapter *adapter)
@@@ -5740,7 -5752,7 +5695,7 @@@ static void ixgbe_clean_tx_ring(struct 
  
                /* Free all the Tx ring sk_buffs */
                if (ring_is_xdp(tx_ring))
 -                      page_frag_free(tx_buffer->data);
 +                      xdp_return_frame(tx_buffer->xdpf);
                else
                        dev_kfree_skb_any(tx_buffer->skb);
  
@@@ -6313,7 -6325,7 +6268,7 @@@ int ixgbe_setup_rx_resources(struct ixg
        struct device *dev = rx_ring->dev;
        int orig_node = dev_to_node(dev);
        int ring_node = -1;
 -      int size;
 +      int size, err;
  
        size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
  
                             rx_ring->queue_index) < 0)
                goto err;
  
 +      err = xdp_rxq_info_reg_mem_model(&rx_ring->xdp_rxq,
 +                                       MEM_TYPE_PAGE_SHARED, NULL);
 +      if (err) {
 +              xdp_rxq_info_unreg(&rx_ring->xdp_rxq);
 +              goto err;
 +      }
 +
        rx_ring->xdp_prog = adapter->xdp_prog;
  
        return 0;
@@@ -7621,19 -7626,17 +7576,19 @@@ static void ixgbe_reset_subtask(struct 
        if (!test_and_clear_bit(__IXGBE_RESET_REQUESTED, &adapter->state))
                return;
  
 +      rtnl_lock();
        /* If we're already down, removing or resetting, just bail */
        if (test_bit(__IXGBE_DOWN, &adapter->state) ||
            test_bit(__IXGBE_REMOVING, &adapter->state) ||
 -          test_bit(__IXGBE_RESETTING, &adapter->state))
 +          test_bit(__IXGBE_RESETTING, &adapter->state)) {
 +              rtnl_unlock();
                return;
 +      }
  
        ixgbe_dump(adapter);
        netdev_err(adapter->netdev, "Reset adapter\n");
        adapter->tx_timeout_count++;
  
 -      rtnl_lock();
        ixgbe_reinit_locked(adapter);
        rtnl_unlock();
  }
@@@ -7753,7 -7756,7 +7708,7 @@@ static int ixgbe_tso(struct ixgbe_ring 
  
        /* remove payload length from inner checksum */
        paylen = skb->len - l4_offset;
 -      csum_replace_by_diff(&l4.tcp->check, htonl(paylen));
 +      csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
  
        /* update gso size and bytecount with header size */
        first->gso_segs = skb_shinfo(skb)->gso_segs;
@@@ -8288,7 -8291,7 +8243,7 @@@ static u16 ixgbe_select_queue(struct ne
  }
  
  static int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter,
 -                             struct xdp_buff *xdp)
 +                             struct xdp_frame *xdpf)
  {
        struct ixgbe_ring *ring = adapter->xdp_ring[smp_processor_id()];
        struct ixgbe_tx_buffer *tx_buffer;
        dma_addr_t dma;
        u16 i;
  
 -      len = xdp->data_end - xdp->data;
 +      len = xdpf->len;
  
        if (unlikely(!ixgbe_desc_unused(ring)))
                return IXGBE_XDP_CONSUMED;
  
 -      dma = dma_map_single(ring->dev, xdp->data, len, DMA_TO_DEVICE);
 +      dma = dma_map_single(ring->dev, xdpf->data, len, DMA_TO_DEVICE);
        if (dma_mapping_error(ring->dev, dma))
                return IXGBE_XDP_CONSUMED;
  
  
        dma_unmap_len_set(tx_buffer, len, len);
        dma_unmap_addr_set(tx_buffer, dma, dma);
 -      tx_buffer->data = xdp->data;
 +      tx_buffer->xdpf = xdpf;
 +
        tx_desc->read.buffer_addr = cpu_to_le64(dma);
  
        /* put descriptor type bits */
@@@ -8780,49 -8782,6 +8735,49 @@@ static void ixgbe_set_prio_tc_map(struc
  }
  
  #endif /* CONFIG_IXGBE_DCB */
 +static int ixgbe_reassign_macvlan_pool(struct net_device *vdev, void *data)
 +{
 +      struct ixgbe_adapter *adapter = data;
 +      struct ixgbe_fwd_adapter *accel;
 +      int pool;
 +
 +      /* we only care about macvlans... */
 +      if (!netif_is_macvlan(vdev))
 +              return 0;
 +
 +      /* that have hardware offload enabled... */
 +      accel = macvlan_accel_priv(vdev);
 +      if (!accel)
 +              return 0;
 +
 +      /* If we can relocate to a different bit do so */
 +      pool = find_first_zero_bit(adapter->fwd_bitmask, adapter->num_rx_pools);
 +      if (pool < adapter->num_rx_pools) {
 +              set_bit(pool, adapter->fwd_bitmask);
 +              accel->pool = pool;
 +              return 0;
 +      }
 +
 +      /* if we cannot find a free pool then disable the offload */
 +      netdev_err(vdev, "L2FW offload disabled due to lack of queue resources\n");
 +      macvlan_release_l2fw_offload(vdev);
 +      kfree(accel);
 +
 +      return 0;
 +}
 +
 +static void ixgbe_defrag_macvlan_pools(struct net_device *dev)
 +{
 +      struct ixgbe_adapter *adapter = netdev_priv(dev);
 +
 +      /* flush any stale bits out of the fwd bitmask */
 +      bitmap_clear(adapter->fwd_bitmask, 1, 63);
 +
 +      /* walk through upper devices reassigning pools */
 +      netdev_walk_all_upper_dev_rcu(dev, ixgbe_reassign_macvlan_pool,
 +                                    adapter);
 +}
 +
  /**
   * ixgbe_setup_tc - configure net_device for multiple traffic classes
   *
@@@ -8890,8 -8849,6 +8845,8 @@@ int ixgbe_setup_tc(struct net_device *d
  #endif /* CONFIG_IXGBE_DCB */
        ixgbe_init_interrupt_scheme(adapter);
  
 +      ixgbe_defrag_macvlan_pools(dev);
 +
        if (netif_running(dev))
                return ixgbe_open(dev);
  
@@@ -8996,12 -8953,13 +8951,12 @@@ struct upper_walk_data 
  static int get_macvlan_queue(struct net_device *upper, void *_data)
  {
        if (netif_is_macvlan(upper)) {
 -              struct macvlan_dev *dfwd = netdev_priv(upper);
 -              struct ixgbe_fwd_adapter *vadapter = dfwd->fwd_priv;
 +              struct ixgbe_fwd_adapter *vadapter = macvlan_accel_priv(upper);
                struct upper_walk_data *data = _data;
                struct ixgbe_adapter *adapter = data->adapter;
                int ifindex = data->ifindex;
  
 -              if (vadapter && vadapter->netdev->ifindex == ifindex) {
 +              if (vadapter && upper->ifindex == ifindex) {
                        data->queue = adapter->rx_ring[vadapter->rx_base_queue]->reg_idx;
                        data->action = data->queue;
                        return 1;
@@@ -9051,6 -9009,7 +9006,6 @@@ static int parse_tc_actions(struct ixgb
  {
        const struct tc_action *a;
        LIST_HEAD(actions);
 -      int err;
  
        if (!tcf_exts_has_actions(exts))
                return -EINVAL;
  
                        if (!dev)
                                return -EINVAL;
 -                      err = handle_redirect_action(adapter, dev->ifindex, queue,
 -                                                   action);
 -                      if (err == 0)
 -                              return err;
 +                      return handle_redirect_action(adapter, dev->ifindex,
 +                                                    queue, action);
                }
 +
 +              return -EINVAL;
        }
  
        return -EINVAL;
@@@ -9105,8 -9064,7 +9060,8 @@@ static int ixgbe_clsu32_build_input(str
  
                for (j = 0; field_ptr[j].val; j++) {
                        if (field_ptr[j].off == off) {
 -                              field_ptr[j].val(input, mask, val, m);
 +                              field_ptr[j].val(input, mask, (__force u32)val,
 +                                               (__force u32)m);
                                input->filter.formatted.flow_type |=
                                        field_ptr[j].type;
                                found_entry = true;
                }
                if (nexthdr) {
                        if (nexthdr->off == cls->knode.sel->keys[i].off &&
 -                          nexthdr->val == cls->knode.sel->keys[i].val &&
 -                          nexthdr->mask == cls->knode.sel->keys[i].mask)
 +                          nexthdr->val ==
 +                          (__force u32)cls->knode.sel->keys[i].val &&
 +                          nexthdr->mask ==
 +                          (__force u32)cls->knode.sel->keys[i].mask)
                                found_jump_field = true;
                        else
                                continue;
@@@ -9222,8 -9178,7 +9177,8 @@@ static int ixgbe_configure_clsu32(struc
                for (i = 0; nexthdr[i].jump; i++) {
                        if (nexthdr[i].o != cls->knode.sel->offoff ||
                            nexthdr[i].s != cls->knode.sel->offshift ||
 -                          nexthdr[i].m != cls->knode.sel->offmask)
 +                          nexthdr[i].m !=
 +                          (__force u32)cls->knode.sel->offmask)
                                return err;
  
                        jump = kzalloc(sizeof(*jump), GFP_KERNEL);
@@@ -9444,22 -9399,6 +9399,22 @@@ static netdev_features_t ixgbe_fix_feat
        return features;
  }
  
 +static void ixgbe_reset_l2fw_offload(struct ixgbe_adapter *adapter)
 +{
 +      int rss = min_t(int, ixgbe_max_rss_indices(adapter),
 +                      num_online_cpus());
 +
 +      /* go back to full RSS if we're not running SR-IOV */
 +      if (!adapter->ring_feature[RING_F_VMDQ].offset)
 +              adapter->flags &= ~(IXGBE_FLAG_VMDQ_ENABLED |
 +                                  IXGBE_FLAG_SRIOV_ENABLED);
 +
 +      adapter->ring_feature[RING_F_RSS].limit = rss;
 +      adapter->ring_feature[RING_F_VMDQ].limit = 1;
 +
 +      ixgbe_setup_tc(adapter->netdev, adapter->hw_tcs);
 +}
 +
  static int ixgbe_set_features(struct net_device *netdev,
                              netdev_features_t features)
  {
                }
        }
  
 -      if (need_reset)
 +      if ((changed & NETIF_F_HW_L2FW_DOFFLOAD) && adapter->num_rx_pools > 1)
 +              ixgbe_reset_l2fw_offload(adapter);
 +      else if (need_reset)
                ixgbe_do_reset(netdev);
        else if (changed & (NETIF_F_HW_VLAN_CTAG_RX |
                            NETIF_F_HW_VLAN_CTAG_FILTER))
@@@ -9805,98 -9742,71 +9760,98 @@@ static int ixgbe_ndo_bridge_getlink(str
  
  static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
  {
 -      struct ixgbe_fwd_adapter *fwd_adapter = NULL;
        struct ixgbe_adapter *adapter = netdev_priv(pdev);
 -      int used_pools = adapter->num_vfs + adapter->num_rx_pools;
 +      struct ixgbe_fwd_adapter *accel;
        int tcs = adapter->hw_tcs ? : 1;
 -      unsigned int limit;
        int pool, err;
  
 -      /* Hardware has a limited number of available pools. Each VF, and the
 -       * PF require a pool. Check to ensure we don't attempt to use more
 -       * then the available number of pools.
 +      /* The hardware supported by ixgbe only filters on the destination MAC
 +       * address. In order to avoid issues we only support offloading modes
 +       * where the hardware can actually provide the functionality.
         */
 -      if (used_pools >= IXGBE_MAX_VF_FUNCTIONS)
 -              return ERR_PTR(-EINVAL);
 +      if (!macvlan_supports_dest_filter(vdev))
 +              return ERR_PTR(-EMEDIUMTYPE);
  
 -      if (((adapter->flags & IXGBE_FLAG_DCB_ENABLED) &&
 -            adapter->num_rx_pools >= (MAX_TX_QUEUES / tcs)) ||
 -          (adapter->num_rx_pools > IXGBE_MAX_MACVLANS))
 -              return ERR_PTR(-EBUSY);
 +      pool = find_first_zero_bit(adapter->fwd_bitmask, adapter->num_rx_pools);
 +      if (pool == adapter->num_rx_pools) {
 +              u16 used_pools = adapter->num_vfs + adapter->num_rx_pools;
 +              u16 reserved_pools;
 +
 +              if (((adapter->flags & IXGBE_FLAG_DCB_ENABLED) &&
 +                   adapter->num_rx_pools >= (MAX_TX_QUEUES / tcs)) ||
 +                  adapter->num_rx_pools > IXGBE_MAX_MACVLANS)
 +                      return ERR_PTR(-EBUSY);
 +
 +              /* Hardware has a limited number of available pools. Each VF,
 +               * and the PF require a pool. Check to ensure we don't
 +               * attempt to use more then the available number of pools.
 +               */
 +              if (used_pools >= IXGBE_MAX_VF_FUNCTIONS)
 +                      return ERR_PTR(-EBUSY);
  
 -      fwd_adapter = kzalloc(sizeof(*fwd_adapter), GFP_KERNEL);
 -      if (!fwd_adapter)
 -              return ERR_PTR(-ENOMEM);
 +              /* Enable VMDq flag so device will be set in VM mode */
 +              adapter->flags |= IXGBE_FLAG_VMDQ_ENABLED |
 +                                IXGBE_FLAG_SRIOV_ENABLED;
  
 -      pool = find_first_zero_bit(adapter->fwd_bitmask, adapter->num_rx_pools);
 -      set_bit(pool, adapter->fwd_bitmask);
 -      limit = find_last_bit(adapter->fwd_bitmask, adapter->num_rx_pools + 1);
 +              /* Try to reserve as many queues per pool as possible,
 +               * we start with the configurations that support 4 queues
 +               * per pools, followed by 2, and then by just 1 per pool.
 +               */
 +              if (used_pools < 32 && adapter->num_rx_pools < 16)
 +                      reserved_pools = min_t(u16,
 +                                             32 - used_pools,
 +                                             16 - adapter->num_rx_pools);
 +              else if (adapter->num_rx_pools < 32)
 +                      reserved_pools = min_t(u16,
 +                                             64 - used_pools,
 +                                             32 - adapter->num_rx_pools);
 +              else
 +                      reserved_pools = 64 - used_pools;
  
 -      /* Enable VMDq flag so device will be set in VM mode */
 -      adapter->flags |= IXGBE_FLAG_VMDQ_ENABLED | IXGBE_FLAG_SRIOV_ENABLED;
 -      adapter->ring_feature[RING_F_VMDQ].limit = limit + 1;
  
 -      fwd_adapter->pool = pool;
 -      fwd_adapter->real_adapter = adapter;
 +              if (!reserved_pools)
 +                      return ERR_PTR(-EBUSY);
  
 -      /* Force reinit of ring allocation with VMDQ enabled */
 -      err = ixgbe_setup_tc(pdev, adapter->hw_tcs);
 +              adapter->ring_feature[RING_F_VMDQ].limit += reserved_pools;
  
 -      if (!err && netif_running(pdev))
 -              err = ixgbe_fwd_ring_up(vdev, fwd_adapter);
 +              /* Force reinit of ring allocation with VMDQ enabled */
 +              err = ixgbe_setup_tc(pdev, adapter->hw_tcs);
 +              if (err)
 +                      return ERR_PTR(err);
  
 -      if (!err)
 -              return fwd_adapter;
 +              if (pool >= adapter->num_rx_pools)
 +                      return ERR_PTR(-ENOMEM);
 +      }
 +
 +      accel = kzalloc(sizeof(*accel), GFP_KERNEL);
 +      if (!accel)
 +              return ERR_PTR(-ENOMEM);
  
 -      /* unwind counter and free adapter struct */
 -      netdev_info(pdev,
 -                  "%s: dfwd hardware acceleration failed\n", vdev->name);
 -      clear_bit(pool, adapter->fwd_bitmask);
 -      kfree(fwd_adapter);
 -      return ERR_PTR(err);
 +      set_bit(pool, adapter->fwd_bitmask);
 +      accel->pool = pool;
 +      accel->netdev = vdev;
 +
 +      if (!netif_running(pdev))
 +              return accel;
 +
 +      err = ixgbe_fwd_ring_up(adapter, accel);
 +      if (err)
 +              return ERR_PTR(err);
 +
 +      return accel;
  }
  
  static void ixgbe_fwd_del(struct net_device *pdev, void *priv)
  {
        struct ixgbe_fwd_adapter *accel = priv;
 -      struct ixgbe_adapter *adapter = accel->real_adapter;
 +      struct ixgbe_adapter *adapter = netdev_priv(pdev);
        unsigned int rxbase = accel->rx_base_queue;
 -      unsigned int limit, i;
 +      unsigned int i;
  
        /* delete unicast filter associated with offloaded interface */
        ixgbe_del_mac_filter(adapter, accel->netdev->dev_addr,
                             VMDQ_P(accel->pool));
  
 -      /* disable ability to receive packets for this pool */
 -      IXGBE_WRITE_REG(&adapter->hw, IXGBE_VMOLR(accel->pool), 0);
 -
        /* Allow remaining Rx packets to get flushed out of the
         * Rx FIFO before we drop the netdev for the ring.
         */
        }
  
        clear_bit(accel->pool, adapter->fwd_bitmask);
 -      limit = find_last_bit(adapter->fwd_bitmask, adapter->num_rx_pools);
 -      adapter->ring_feature[RING_F_VMDQ].limit = limit + 1;
 -
 -      /* go back to full RSS if we're done with our VMQs */
 -      if (adapter->ring_feature[RING_F_VMDQ].limit == 1) {
 -              int rss = min_t(int, ixgbe_max_rss_indices(adapter),
 -                              num_online_cpus());
 -
 -              adapter->flags &= ~IXGBE_FLAG_VMDQ_ENABLED;
 -              adapter->flags &= ~IXGBE_FLAG_SRIOV_ENABLED;
 -              adapter->ring_feature[RING_F_RSS].limit = rss;
 -      }
 -
 -      ixgbe_setup_tc(pdev, adapter->hw_tcs);
 -      netdev_dbg(pdev, "pool %i:%i queues %i:%i\n",
 -                 accel->pool, adapter->num_rx_pools,
 -                 accel->rx_base_queue,
 -                 accel->rx_base_queue +
 -                 adapter->num_rx_queues_per_pool);
        kfree(accel);
  }
  
@@@ -9996,8 -9925,7 +9951,8 @@@ static int ixgbe_xdp_setup(struct net_d
                }
        } else {
                for (i = 0; i < adapter->num_rx_queues; i++)
 -                      xchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog);
 +                      (void)xchg(&adapter->rx_ring[i]->xdp_prog,
 +                          adapter->xdp_prog);
        }
  
        if (old_prog)
@@@ -10023,29 -9951,15 +9978,29 @@@ static int ixgbe_xdp(struct net_device 
        }
  }
  
 -static int ixgbe_xdp_xmit(struct net_device *dev, struct xdp_buff *xdp)
 +static void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring)
 +{
 +      /* Force memory writes to complete before letting h/w know there
 +       * are new descriptors to fetch.
 +       */
 +      wmb();
 +      writel(ring->next_to_use, ring->tail);
 +}
 +
 +static int ixgbe_xdp_xmit(struct net_device *dev, int n,
 +                        struct xdp_frame **frames, u32 flags)
  {
        struct ixgbe_adapter *adapter = netdev_priv(dev);
        struct ixgbe_ring *ring;
 -      int err;
 +      int drops = 0;
 +      int i;
  
        if (unlikely(test_bit(__IXGBE_DOWN, &adapter->state)))
                return -ENETDOWN;
  
 +      if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
 +              return -EINVAL;
 +
        /* During program transitions its possible adapter->xdp_prog is assigned
         * but ring has not been configured yet. In this case simply abort xmit.
         */
        if (unlikely(!ring))
                return -ENXIO;
  
 -      err = ixgbe_xmit_xdp_ring(adapter, xdp);
 -      if (err != IXGBE_XDP_TX)
 -              return -ENOSPC;
 -
 -      return 0;
 -}
 -
 -static void ixgbe_xdp_flush(struct net_device *dev)
 -{
 -      struct ixgbe_adapter *adapter = netdev_priv(dev);
 -      struct ixgbe_ring *ring;
 +      for (i = 0; i < n; i++) {
 +              struct xdp_frame *xdpf = frames[i];
 +              int err;
  
 -      /* Its possible the device went down between xdp xmit and flush so
 -       * we need to ensure device is still up.
 -       */
 -      if (unlikely(test_bit(__IXGBE_DOWN, &adapter->state)))
 -              return;
 +              err = ixgbe_xmit_xdp_ring(adapter, xdpf);
 +              if (err != IXGBE_XDP_TX) {
 +                      xdp_return_frame_rx_napi(xdpf);
 +                      drops++;
 +              }
 +      }
  
 -      ring = adapter->xdp_prog ? adapter->xdp_ring[smp_processor_id()] : NULL;
 -      if (unlikely(!ring))
 -              return;
 +      if (unlikely(flags & XDP_XMIT_FLUSH))
 +              ixgbe_xdp_ring_update_tail(ring);
  
 -      /* Force memory writes to complete before letting h/w know there
 -       * are new descriptors to fetch.
 -       */
 -      wmb();
 -      writel(ring->next_to_use, ring->tail);
 -
 -      return;
 +      return n - drops;
  }
  
  static const struct net_device_ops ixgbe_netdev_ops = {
        .ndo_features_check     = ixgbe_features_check,
        .ndo_bpf                = ixgbe_xdp,
        .ndo_xdp_xmit           = ixgbe_xdp_xmit,
 -      .ndo_xdp_flush          = ixgbe_xdp_flush,
  };
  
  /**
@@@ -10935,14 -10864,14 +10890,14 @@@ skip_bad_vf_detection
        rtnl_lock();
        netif_device_detach(netdev);
  
 +      if (netif_running(netdev))
 +              ixgbe_close_suspend(adapter);
 +
        if (state == pci_channel_io_perm_failure) {
                rtnl_unlock();
                return PCI_ERS_RESULT_DISCONNECT;
        }
  
 -      if (netif_running(netdev))
 -              ixgbe_close_suspend(adapter);
 -
        if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
                pci_disable_device(pdev);
        rtnl_unlock();
diff --combined drivers/nvme/host/pci.c
index e526437bacbf7fc5f5618ba954ae54f84b799c2f,284cdd336271f03c04799d385b9e64f376581062..d234de5505ea2b19f80f5ed336b63f217195a359
@@@ -13,7 -13,6 +13,7 @@@
   */
  
  #include <linux/aer.h>
 +#include <linux/async.h>
  #include <linux/blkdev.h>
  #include <linux/blk-mq.h>
  #include <linux/blk-mq-pci.h>
@@@ -69,6 -68,7 +69,6 @@@ MODULE_PARM_DESC(io_queue_depth, "set i
  struct nvme_dev;
  struct nvme_queue;
  
 -static void nvme_process_cq(struct nvme_queue *nvmeq);
  static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown);
  
  /*
@@@ -147,10 -147,9 +147,10 @@@ static inline struct nvme_dev *to_nvme_
  struct nvme_queue {
        struct device *q_dmadev;
        struct nvme_dev *dev;
 -      spinlock_t q_lock;
 +      spinlock_t sq_lock;
        struct nvme_command *sq_cmds;
        struct nvme_command __iomem *sq_cmds_io;
 +      spinlock_t cq_lock ____cacheline_aligned_in_smp;
        volatile struct nvme_completion *cqes;
        struct blk_mq_tags **tags;
        dma_addr_t sq_dma_addr;
        s16 cq_vector;
        u16 sq_tail;
        u16 cq_head;
 +      u16 last_cq_head;
        u16 qid;
        u8 cq_phase;
 -      u8 cqe_seen;
        u32 *dbbuf_sq_db;
        u32 *dbbuf_cq_db;
        u32 *dbbuf_sq_ei;
@@@ -421,25 -420,28 +421,25 @@@ static int nvme_pci_map_queues(struct b
  }
  
  /**
 - * __nvme_submit_cmd() - Copy a command into a queue and ring the doorbell
 + * nvme_submit_cmd() - Copy a command into a queue and ring the doorbell
   * @nvmeq: The queue to use
   * @cmd: The command to send
 - *
 - * Safe to use from interrupt context
   */
 -static void __nvme_submit_cmd(struct nvme_queue *nvmeq,
 -                                              struct nvme_command *cmd)
 +static void nvme_submit_cmd(struct nvme_queue *nvmeq, struct nvme_command *cmd)
  {
 -      u16 tail = nvmeq->sq_tail;
 -
 +      spin_lock(&nvmeq->sq_lock);
        if (nvmeq->sq_cmds_io)
 -              memcpy_toio(&nvmeq->sq_cmds_io[tail], cmd, sizeof(*cmd));
 +              memcpy_toio(&nvmeq->sq_cmds_io[nvmeq->sq_tail], cmd,
 +                              sizeof(*cmd));
        else
 -              memcpy(&nvmeq->sq_cmds[tail], cmd, sizeof(*cmd));
 +              memcpy(&nvmeq->sq_cmds[nvmeq->sq_tail], cmd, sizeof(*cmd));
  
 -      if (++tail == nvmeq->q_depth)
 -              tail = 0;
 -      if (nvme_dbbuf_update_and_check_event(tail, nvmeq->dbbuf_sq_db,
 -                                            nvmeq->dbbuf_sq_ei))
 -              writel(tail, nvmeq->q_db);
 -      nvmeq->sq_tail = tail;
 +      if (++nvmeq->sq_tail == nvmeq->q_depth)
 +              nvmeq->sq_tail = 0;
 +      if (nvme_dbbuf_update_and_check_event(nvmeq->sq_tail,
 +                      nvmeq->dbbuf_sq_db, nvmeq->dbbuf_sq_ei))
 +              writel(nvmeq->sq_tail, nvmeq->q_db);
 +      spin_unlock(&nvmeq->sq_lock);
  }
  
  static void **nvme_pci_iod_list(struct request *req)
@@@ -870,13 -872,6 +870,13 @@@ static blk_status_t nvme_queue_rq(struc
        struct nvme_command cmnd;
        blk_status_t ret;
  
 +      /*
 +       * We should not need to do this, but we're still using this to
 +       * ensure we can drain requests on a dying queue.
 +       */
 +      if (unlikely(nvmeq->cq_vector < 0))
 +              return BLK_STS_IOERR;
 +
        ret = nvme_setup_cmd(ns, req, &cmnd);
        if (ret)
                return ret;
        }
  
        blk_mq_start_request(req);
 -
 -      spin_lock_irq(&nvmeq->q_lock);
 -      if (unlikely(nvmeq->cq_vector < 0)) {
 -              ret = BLK_STS_IOERR;
 -              spin_unlock_irq(&nvmeq->q_lock);
 -              goto out_cleanup_iod;
 -      }
 -      __nvme_submit_cmd(nvmeq, &cmnd);
 -      nvme_process_cq(nvmeq);
 -      spin_unlock_irq(&nvmeq->q_lock);
 +      nvme_submit_cmd(nvmeq, &cmnd);
        return BLK_STS_OK;
  out_cleanup_iod:
        nvme_free_iod(dev, req);
@@@ -910,10 -914,10 +910,10 @@@ static void nvme_pci_complete_rq(struc
  }
  
  /* We read the CQE phase first to check if the rest of the entry is valid */
 -static inline bool nvme_cqe_valid(struct nvme_queue *nvmeq, u16 head,
 -              u16 phase)
 +static inline bool nvme_cqe_pending(struct nvme_queue *nvmeq)
  {
 -      return (le16_to_cpu(nvmeq->cqes[head].status) & 1) == phase;
 +      return (le16_to_cpu(nvmeq->cqes[nvmeq->cq_head].status) & 1) ==
 +                      nvmeq->cq_phase;
  }
  
  static inline void nvme_ring_cq_doorbell(struct nvme_queue *nvmeq)
        }
  }
  
 -static inline void nvme_handle_cqe(struct nvme_queue *nvmeq,
 -              struct nvme_completion *cqe)
 +static inline void nvme_handle_cqe(struct nvme_queue *nvmeq, u16 idx)
  {
 +      volatile struct nvme_completion *cqe = &nvmeq->cqes[idx];
        struct request *req;
  
        if (unlikely(cqe->command_id >= nvmeq->q_depth)) {
                return;
        }
  
 -      nvmeq->cqe_seen = 1;
        req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id);
        nvme_end_request(req, cqe->status, cqe->result);
  }
  
 -static inline bool nvme_read_cqe(struct nvme_queue *nvmeq,
 -              struct nvme_completion *cqe)
 +static void nvme_complete_cqes(struct nvme_queue *nvmeq, u16 start, u16 end)
  {
 -      if (nvme_cqe_valid(nvmeq, nvmeq->cq_head, nvmeq->cq_phase)) {
 -              *cqe = nvmeq->cqes[nvmeq->cq_head];
 +      while (start != end) {
 +              nvme_handle_cqe(nvmeq, start);
 +              if (++start == nvmeq->q_depth)
 +                      start = 0;
 +      }
 +}
  
 -              if (++nvmeq->cq_head == nvmeq->q_depth) {
 -                      nvmeq->cq_head = 0;
 -                      nvmeq->cq_phase = !nvmeq->cq_phase;
 -              }
 -              return true;
 +static inline void nvme_update_cq_head(struct nvme_queue *nvmeq)
 +{
 +      if (++nvmeq->cq_head == nvmeq->q_depth) {
 +              nvmeq->cq_head = 0;
 +              nvmeq->cq_phase = !nvmeq->cq_phase;
        }
 -      return false;
  }
  
 -static void nvme_process_cq(struct nvme_queue *nvmeq)
 +static inline bool nvme_process_cq(struct nvme_queue *nvmeq, u16 *start,
 +              u16 *end, int tag)
  {
 -      struct nvme_completion cqe;
 -      int consumed = 0;
 +      bool found = false;
  
 -      while (nvme_read_cqe(nvmeq, &cqe)) {
 -              nvme_handle_cqe(nvmeq, &cqe);
 -              consumed++;
 +      *start = nvmeq->cq_head;
 +      while (!found && nvme_cqe_pending(nvmeq)) {
 +              if (nvmeq->cqes[nvmeq->cq_head].command_id == tag)
 +                      found = true;
 +              nvme_update_cq_head(nvmeq);
        }
 +      *end = nvmeq->cq_head;
  
 -      if (consumed)
 +      if (*start != *end)
                nvme_ring_cq_doorbell(nvmeq);
 +      return found;
  }
  
  static irqreturn_t nvme_irq(int irq, void *data)
  {
 -      irqreturn_t result;
        struct nvme_queue *nvmeq = data;
 -      spin_lock(&nvmeq->q_lock);
 -      nvme_process_cq(nvmeq);
 -      result = nvmeq->cqe_seen ? IRQ_HANDLED : IRQ_NONE;
 -      nvmeq->cqe_seen = 0;
 -      spin_unlock(&nvmeq->q_lock);
 -      return result;
 +      irqreturn_t ret = IRQ_NONE;
 +      u16 start, end;
 +
 +      spin_lock(&nvmeq->cq_lock);
 +      if (nvmeq->cq_head != nvmeq->last_cq_head)
 +              ret = IRQ_HANDLED;
 +      nvme_process_cq(nvmeq, &start, &end, -1);
 +      nvmeq->last_cq_head = nvmeq->cq_head;
 +      spin_unlock(&nvmeq->cq_lock);
 +
 +      if (start != end) {
 +              nvme_complete_cqes(nvmeq, start, end);
 +              return IRQ_HANDLED;
 +      }
 +
 +      return ret;
  }
  
  static irqreturn_t nvme_irq_check(int irq, void *data)
  {
        struct nvme_queue *nvmeq = data;
 -      if (nvme_cqe_valid(nvmeq, nvmeq->cq_head, nvmeq->cq_phase))
 +      if (nvme_cqe_pending(nvmeq))
                return IRQ_WAKE_THREAD;
        return IRQ_NONE;
  }
  
  static int __nvme_poll(struct nvme_queue *nvmeq, unsigned int tag)
  {
 -      struct nvme_completion cqe;
 -      int found = 0, consumed = 0;
 +      u16 start, end;
 +      bool found;
  
 -      if (!nvme_cqe_valid(nvmeq, nvmeq->cq_head, nvmeq->cq_phase))
 +      if (!nvme_cqe_pending(nvmeq))
                return 0;
  
 -      spin_lock_irq(&nvmeq->q_lock);
 -      while (nvme_read_cqe(nvmeq, &cqe)) {
 -              nvme_handle_cqe(nvmeq, &cqe);
 -              consumed++;
 -
 -              if (tag == cqe.command_id) {
 -                      found = 1;
 -                      break;
 -              }
 -       }
 -
 -      if (consumed)
 -              nvme_ring_cq_doorbell(nvmeq);
 -      spin_unlock_irq(&nvmeq->q_lock);
 +      spin_lock_irq(&nvmeq->cq_lock);
 +      found = nvme_process_cq(nvmeq, &start, &end, tag);
 +      spin_unlock_irq(&nvmeq->cq_lock);
  
 +      nvme_complete_cqes(nvmeq, start, end);
        return found;
  }
  
@@@ -1052,7 -1052,10 +1052,7 @@@ static void nvme_pci_submit_async_event
        memset(&c, 0, sizeof(c));
        c.common.opcode = nvme_admin_async_event;
        c.common.command_id = NVME_AQ_BLK_MQ_DEPTH;
 -
 -      spin_lock_irq(&nvmeq->q_lock);
 -      __nvme_submit_cmd(nvmeq, &c);
 -      spin_unlock_irq(&nvmeq->q_lock);
 +      nvme_submit_cmd(nvmeq, &c);
  }
  
  static int adapter_delete_queue(struct nvme_dev *dev, u8 opcode, u16 id)
  }
  
  static int adapter_alloc_cq(struct nvme_dev *dev, u16 qid,
 -                                              struct nvme_queue *nvmeq)
 +              struct nvme_queue *nvmeq, s16 vector)
  {
        struct nvme_command c;
        int flags = NVME_QUEUE_PHYS_CONTIG | NVME_CQ_IRQ_ENABLED;
        c.create_cq.cqid = cpu_to_le16(qid);
        c.create_cq.qsize = cpu_to_le16(nvmeq->q_depth - 1);
        c.create_cq.cq_flags = cpu_to_le16(flags);
 -      c.create_cq.irq_vector = cpu_to_le16(nvmeq->cq_vector);
 +      c.create_cq.irq_vector = cpu_to_le16(vector);
  
        return nvme_submit_sync_cmd(dev->ctrl.admin_q, &c, NULL, 0);
  }
  static int adapter_alloc_sq(struct nvme_dev *dev, u16 qid,
                                                struct nvme_queue *nvmeq)
  {
 +      struct nvme_ctrl *ctrl = &dev->ctrl;
        struct nvme_command c;
        int flags = NVME_QUEUE_PHYS_CONTIG;
  
 +      /*
 +       * Some drives have a bug that auto-enables WRRU if MEDIUM isn't
 +       * set. Since URGENT priority is zeroes, it makes all queues
 +       * URGENT.
 +       */
 +      if (ctrl->quirks & NVME_QUIRK_MEDIUM_PRIO_SQ)
 +              flags |= NVME_SQ_PRIO_MEDIUM;
 +
        /*
         * Note: we (ab)use the fact that the prp fields survive if no data
         * is attached to the request.
@@@ -1205,7 -1199,7 +1205,7 @@@ static enum blk_eh_timer_return nvme_ti
                nvme_warn_reset(dev, csts);
                nvme_dev_disable(dev, false);
                nvme_reset_ctrl(&dev->ctrl);
 -              return BLK_EH_HANDLED;
 +              return BLK_EH_DONE;
        }
  
        /*
                dev_warn(dev->ctrl.device,
                         "I/O %d QID %d timeout, completion polled\n",
                         req->tag, nvmeq->qid);
 -              return BLK_EH_HANDLED;
 +              return BLK_EH_DONE;
        }
  
        /*
         * Shutdown immediately if controller times out while starting. The
         * reset work will see the pci device disabled when it gets the forced
         * cancellation error. All outstanding requests are completed on
 -       * shutdown, so we return BLK_EH_HANDLED.
 +       * shutdown, so we return BLK_EH_DONE.
         */
        switch (dev->ctrl.state) {
        case NVME_CTRL_CONNECTING:
        case NVME_CTRL_RESETTING:
 -              dev_warn(dev->ctrl.device,
 +              dev_warn_ratelimited(dev->ctrl.device,
                         "I/O %d QID %d timeout, disable controller\n",
                         req->tag, nvmeq->qid);
                nvme_dev_disable(dev, false);
                nvme_req(req)->flags |= NVME_REQ_CANCELLED;
 -              return BLK_EH_HANDLED;
 +              return BLK_EH_DONE;
        default:
                break;
        }
                nvme_dev_disable(dev, false);
                nvme_reset_ctrl(&dev->ctrl);
  
 -              /*
 -               * Mark the request as handled, since the inline shutdown
 -               * forces all outstanding requests to complete.
 -               */
                nvme_req(req)->flags |= NVME_REQ_CANCELLED;
 -              return BLK_EH_HANDLED;
 +              return BLK_EH_DONE;
        }
  
        if (atomic_dec_return(&dev->ctrl.abort_limit) < 0) {
@@@ -1314,21 -1312,15 +1314,21 @@@ static int nvme_suspend_queue(struct nv
  {
        int vector;
  
 -      spin_lock_irq(&nvmeq->q_lock);
 +      spin_lock_irq(&nvmeq->cq_lock);
        if (nvmeq->cq_vector == -1) {
 -              spin_unlock_irq(&nvmeq->q_lock);
 +              spin_unlock_irq(&nvmeq->cq_lock);
                return 1;
        }
        vector = nvmeq->cq_vector;
        nvmeq->dev->online_queues--;
        nvmeq->cq_vector = -1;
 -      spin_unlock_irq(&nvmeq->q_lock);
 +      spin_unlock_irq(&nvmeq->cq_lock);
 +
 +      /*
 +       * Ensure that nvme_queue_rq() sees it ->cq_vector == -1 without
 +       * having to grab the lock.
 +       */
 +      mb();
  
        if (!nvmeq->qid && nvmeq->dev->ctrl.admin_q)
                blk_mq_quiesce_queue(nvmeq->dev->ctrl.admin_q);
  static void nvme_disable_admin_queue(struct nvme_dev *dev, bool shutdown)
  {
        struct nvme_queue *nvmeq = &dev->queues[0];
 +      u16 start, end;
  
        if (shutdown)
                nvme_shutdown_ctrl(&dev->ctrl);
        else
                nvme_disable_ctrl(&dev->ctrl, dev->ctrl.cap);
  
 -      spin_lock_irq(&nvmeq->q_lock);
 -      nvme_process_cq(nvmeq);
 -      spin_unlock_irq(&nvmeq->q_lock);
 +      spin_lock_irq(&nvmeq->cq_lock);
 +      nvme_process_cq(nvmeq, &start, &end, -1);
 +      spin_unlock_irq(&nvmeq->cq_lock);
 +
 +      nvme_complete_cqes(nvmeq, start, end);
  }
  
  static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues,
@@@ -1410,8 -1399,7 +1410,8 @@@ static int nvme_alloc_queue(struct nvme
  
        nvmeq->q_dmadev = dev->dev;
        nvmeq->dev = dev;
 -      spin_lock_init(&nvmeq->q_lock);
 +      spin_lock_init(&nvmeq->sq_lock);
 +      spin_lock_init(&nvmeq->cq_lock);
        nvmeq->cq_head = 0;
        nvmeq->cq_phase = 1;
        nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
@@@ -1447,7 -1435,7 +1447,7 @@@ static void nvme_init_queue(struct nvme
  {
        struct nvme_dev *dev = nvmeq->dev;
  
 -      spin_lock_irq(&nvmeq->q_lock);
 +      spin_lock_irq(&nvmeq->cq_lock);
        nvmeq->sq_tail = 0;
        nvmeq->cq_head = 0;
        nvmeq->cq_phase = 1;
        memset((void *)nvmeq->cqes, 0, CQ_SIZE(nvmeq->q_depth));
        nvme_dbbuf_init(dev, nvmeq, qid);
        dev->online_queues++;
 -      spin_unlock_irq(&nvmeq->q_lock);
 +      spin_unlock_irq(&nvmeq->cq_lock);
  }
  
  static int nvme_create_queue(struct nvme_queue *nvmeq, int qid)
  {
        struct nvme_dev *dev = nvmeq->dev;
        int result;
 +      s16 vector;
  
        if (dev->cmb && use_cmb_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) {
                unsigned offset = (qid - 1) * roundup(SQ_SIZE(nvmeq->q_depth),
         * A queue's vector matches the queue identifier unless the controller
         * has only one vector available.
         */
 -      nvmeq->cq_vector = dev->num_vecs == 1 ? 0 : qid;
 -      result = adapter_alloc_cq(dev, qid, nvmeq);
 +      vector = dev->num_vecs == 1 ? 0 : qid;
 +      result = adapter_alloc_cq(dev, qid, nvmeq, vector);
        if (result < 0)
 -              goto release_vector;
 +              goto out;
  
        result = adapter_alloc_sq(dev, qid, nvmeq);
        if (result < 0)
                goto release_cq;
  
 +      /*
 +       * Set cq_vector after alloc cq/sq, otherwise nvme_suspend_queue will
 +       * invoke free_irq for it and cause a 'Trying to free already-free IRQ
 +       * xxx' warning if the create CQ/SQ command times out.
 +       */
 +      nvmeq->cq_vector = vector;
        nvme_init_queue(nvmeq, qid);
        result = queue_request_irq(nvmeq);
        if (result < 0)
  
        return result;
  
 - release_sq:
 +release_sq:
 +      nvmeq->cq_vector = -1;
        dev->online_queues--;
        adapter_delete_sq(dev, qid);
 - release_cq:
 +release_cq:
        adapter_delete_cq(dev, qid);
 - release_vector:
 -      nvmeq->cq_vector = -1;
 +out:
        return result;
  }
  
@@@ -2007,22 -1988,19 +2007,22 @@@ static void nvme_del_queue_end(struct r
  static void nvme_del_cq_end(struct request *req, blk_status_t error)
  {
        struct nvme_queue *nvmeq = req->end_io_data;
 +      u16 start, end;
  
        if (!error) {
                unsigned long flags;
  
                /*
 -               * We might be called with the AQ q_lock held
 -               * and the I/O queue q_lock should always
 +               * We might be called with the AQ cq_lock held
 +               * and the I/O queue cq_lock should always
                 * nest inside the AQ one.
                 */
 -              spin_lock_irqsave_nested(&nvmeq->q_lock, flags,
 +              spin_lock_irqsave_nested(&nvmeq->cq_lock, flags,
                                        SINGLE_DEPTH_NESTING);
 -              nvme_process_cq(nvmeq);
 -              spin_unlock_irqrestore(&nvmeq->q_lock, flags);
 +              nvme_process_cq(nvmeq, &start, &end, -1);
 +              spin_unlock_irqrestore(&nvmeq->cq_lock, flags);
 +
 +              nvme_complete_cqes(nvmeq, start, end);
        }
  
        nvme_del_queue_end(req, error);
@@@ -2510,15 -2488,6 +2510,15 @@@ static unsigned long check_vendor_combi
        return 0;
  }
  
 +static void nvme_async_probe(void *data, async_cookie_t cookie)
 +{
 +      struct nvme_dev *dev = data;
 +
 +      nvme_reset_ctrl_sync(&dev->ctrl);
 +      flush_work(&dev->ctrl.scan_work);
 +      nvme_put_ctrl(&dev->ctrl);
 +}
 +
  static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  {
        int node, result = -ENOMEM;
  
        dev_info(dev->ctrl.device, "pci function %s\n", dev_name(&pdev->dev));
  
 -      nvme_reset_ctrl(&dev->ctrl);
 +      nvme_get_ctrl(&dev->ctrl);
 +      async_schedule(nvme_async_probe, dev);
  
        return 0;
  
@@@ -2630,24 -2598,6 +2630,6 @@@ static void nvme_remove(struct pci_dev 
        nvme_put_ctrl(&dev->ctrl);
  }
  
- static int nvme_pci_sriov_configure(struct pci_dev *pdev, int numvfs)
- {
-       int ret = 0;
-       if (numvfs == 0) {
-               if (pci_vfs_assigned(pdev)) {
-                       dev_warn(&pdev->dev,
-                               "Cannot disable SR-IOV VFs while assigned\n");
-                       return -EPERM;
-               }
-               pci_disable_sriov(pdev);
-               return 0;
-       }
-       ret = pci_enable_sriov(pdev, numvfs);
-       return ret ? ret : numvfs;
- }
  #ifdef CONFIG_PM_SLEEP
  static int nvme_suspend(struct device *dev)
  {
@@@ -2708,9 -2658,6 +2690,9 @@@ static pci_ers_result_t nvme_slot_reset
  
  static void nvme_error_resume(struct pci_dev *pdev)
  {
 +      struct nvme_dev *dev = pci_get_drvdata(pdev);
 +
 +      flush_work(&dev->ctrl.reset_work);
        pci_cleanup_aer_uncorrect_error_status(pdev);
  }
  
@@@ -2736,12 -2683,9 +2718,12 @@@ static const struct pci_device_id nvme_
                .driver_data = NVME_QUIRK_STRIPE_SIZE |
                                NVME_QUIRK_DEALLOCATE_ZEROES, },
        { PCI_VDEVICE(INTEL, 0xf1a5),   /* Intel 600P/P3100 */
 -              .driver_data = NVME_QUIRK_NO_DEEPEST_PS },
 +              .driver_data = NVME_QUIRK_NO_DEEPEST_PS |
 +                              NVME_QUIRK_MEDIUM_PRIO_SQ },
        { PCI_VDEVICE(INTEL, 0x5845),   /* Qemu emulated controller */
                .driver_data = NVME_QUIRK_IDENTIFY_CNS, },
 +      { PCI_DEVICE(0x1bb1, 0x0100),   /* Seagate Nytro Flash Storage */
 +              .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
        { PCI_DEVICE(0x1c58, 0x0003),   /* HGST adapter */
                .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
        { PCI_DEVICE(0x1c58, 0x0023),   /* WDC SN200 adapter */
                .driver_data = NVME_QUIRK_LIGHTNVM, },
        { PCI_DEVICE(0x1d1d, 0x2807),   /* CNEX WL */
                .driver_data = NVME_QUIRK_LIGHTNVM, },
 +      { PCI_DEVICE(0x1d1d, 0x2601),   /* CNEX Granby */
 +              .driver_data = NVME_QUIRK_LIGHTNVM, },
        { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
        { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
        { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
@@@ -2774,7 -2716,7 +2756,7 @@@ static struct pci_driver nvme_driver = 
        .driver         = {
                .pm     = &nvme_dev_pm_ops,
        },
-       .sriov_configure = nvme_pci_sriov_configure,
+       .sriov_configure = pci_sriov_configure_simple,
        .err_handler    = &nvme_err_handler,
  };
  
diff --combined drivers/pci/Kconfig
index 29a487f31daea764755f7cf0e7150aac4448c85b,cdef2a2a9bc5c3d35a963d56ea0363d981087505..b2f07635e94d4970b15b28f75d3e5afe3e5697f1
@@@ -5,6 -5,10 +5,6 @@@
  
  source "drivers/pci/pcie/Kconfig"
  
 -config PCI_BUS_ADDR_T_64BIT
 -      def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT)
 -      depends on PCI
 -
  config PCI_MSI
        bool "Message Signaled Interrupts (MSI and MSI-X)"
        depends on PCI
@@@ -67,6 -71,18 +67,18 @@@ config PCI_STU
  
          When in doubt, say N.
  
+ config PCI_PF_STUB
+       tristate "PCI PF Stub driver"
+       depends on PCI
+       depends on PCI_IOV
+       help
+         Say Y or M here if you want to enable support for devices that
+         require SR-IOV support, while at the same time the PF itself is
+         not providing any actual services on the host itself such as
+         storage or networking.
+         When in doubt, say N.
  config XEN_PCIDEV_FRONTEND
          tristate "Xen PCI Frontend"
          depends on PCI && X86 && XEN
index 9abf549631b4d4ebed2ef0207225658150c3c151,bac37d22b2b642a4b9927db6d9cadf96fd9fa384..d3172d5d3d352f3ff665f753718e63534b99230d
@@@ -19,6 -19,8 +19,8 @@@
  #include <linux/of_address.h>
  #include <linux/of_pci.h>
  
+ #include "../pci.h"
  /* PCIe core registers */
  #define PCIE_CORE_CMD_STATUS_REG                              0x4
  #define     PCIE_CORE_CMD_IO_ACCESS_EN                                BIT(0)
@@@ -29,7 -31,6 +31,7 @@@
  #define     PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT     5
  #define     PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE            (0 << 11)
  #define     PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT    12
 +#define     PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ            0x2
  #define PCIE_CORE_LINK_CTRL_STAT_REG                          0xd0
  #define     PCIE_CORE_LINK_L0S_ENTRY                          BIT(0)
  #define     PCIE_CORE_LINK_TRAINING                           BIT(5)
  #define PCIE_ISR1_MASK_REG                    (CONTROL_BASE_ADDR + 0x4C)
  #define     PCIE_ISR1_POWER_STATE_CHANGE      BIT(4)
  #define     PCIE_ISR1_FLUSH                   BIT(5)
 -#define     PCIE_ISR1_ALL_MASK                        GENMASK(5, 4)
 +#define     PCIE_ISR1_INTX_ASSERT(val)                BIT(8 + (val))
 +#define     PCIE_ISR1_ALL_MASK                        GENMASK(11, 4)
  #define PCIE_MSI_ADDR_LOW_REG                 (CONTROL_BASE_ADDR + 0x50)
  #define PCIE_MSI_ADDR_HIGH_REG                        (CONTROL_BASE_ADDR + 0x54)
  #define PCIE_MSI_STATUS_REG                   (CONTROL_BASE_ADDR + 0x58)
  #define PCIE_CONFIG_WR_TYPE0                  0xa
  #define PCIE_CONFIG_WR_TYPE1                  0xb
  
 -/* PCI_BDF shifts 8bit, so we need extra 4bit shift */
 -#define PCIE_BDF(dev)                         (dev << 4)
  #define PCIE_CONF_BUS(bus)                    (((bus) & 0xff) << 20)
  #define PCIE_CONF_DEV(dev)                    (((dev) & 0x1f) << 15)
  #define PCIE_CONF_FUNC(fun)                   (((fun) & 0x7)  << 12)
@@@ -296,8 -298,7 +298,8 @@@ static void advk_pcie_setup_hw(struct a
        reg = PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE |
                (7 << PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) |
                PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE |
 -              PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT;
 +              (PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ <<
 +               PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT);
        advk_writel(pcie, reg, PCIE_CORE_DEV_CTRL_STATS_REG);
  
        /* Program PCIe Control 2 to disable strict ordering */
@@@ -438,7 -439,7 +440,7 @@@ static int advk_pcie_rd_conf(struct pci
        u32 reg;
        int ret;
  
 -      if (PCI_SLOT(devfn) != 0) {
 +      if ((bus->number == pcie->root_bus_nr) && PCI_SLOT(devfn) != 0) {
                *val = 0xffffffff;
                return PCIBIOS_DEVICE_NOT_FOUND;
        }
        advk_writel(pcie, reg, PIO_CTRL);
  
        /* Program the address registers */
 -      reg = PCIE_BDF(devfn) | PCIE_CONF_REG(where);
 +      reg = PCIE_CONF_ADDR(bus->number, devfn, where);
        advk_writel(pcie, reg, PIO_ADDR_LS);
        advk_writel(pcie, 0, PIO_ADDR_MS);
  
@@@ -492,7 -493,7 +494,7 @@@ static int advk_pcie_wr_conf(struct pci
        int offset;
        int ret;
  
 -      if (PCI_SLOT(devfn) != 0)
 +      if ((bus->number == pcie->root_bus_nr) && PCI_SLOT(devfn) != 0)
                return PCIBIOS_DEVICE_NOT_FOUND;
  
        if (where % size)
@@@ -610,9 -611,9 +612,9 @@@ static void advk_pcie_irq_mask(struct i
        irq_hw_number_t hwirq = irqd_to_hwirq(d);
        u32 mask;
  
 -      mask = advk_readl(pcie, PCIE_ISR0_MASK_REG);
 -      mask |= PCIE_ISR0_INTX_ASSERT(hwirq);
 -      advk_writel(pcie, mask, PCIE_ISR0_MASK_REG);
 +      mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
 +      mask |= PCIE_ISR1_INTX_ASSERT(hwirq);
 +      advk_writel(pcie, mask, PCIE_ISR1_MASK_REG);
  }
  
  static void advk_pcie_irq_unmask(struct irq_data *d)
        irq_hw_number_t hwirq = irqd_to_hwirq(d);
        u32 mask;
  
 -      mask = advk_readl(pcie, PCIE_ISR0_MASK_REG);
 -      mask &= ~PCIE_ISR0_INTX_ASSERT(hwirq);
 -      advk_writel(pcie, mask, PCIE_ISR0_MASK_REG);
 +      mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
 +      mask &= ~PCIE_ISR1_INTX_ASSERT(hwirq);
 +      advk_writel(pcie, mask, PCIE_ISR1_MASK_REG);
  }
  
  static int advk_pcie_irq_map(struct irq_domain *h,
@@@ -766,35 -767,29 +768,35 @@@ static void advk_pcie_handle_msi(struc
  
  static void advk_pcie_handle_int(struct advk_pcie *pcie)
  {
 -      u32 val, mask, status;
 +      u32 isr0_val, isr0_mask, isr0_status;
 +      u32 isr1_val, isr1_mask, isr1_status;
        int i, virq;
  
 -      val = advk_readl(pcie, PCIE_ISR0_REG);
 -      mask = advk_readl(pcie, PCIE_ISR0_MASK_REG);
 -      status = val & ((~mask) & PCIE_ISR0_ALL_MASK);
 +      isr0_val = advk_readl(pcie, PCIE_ISR0_REG);
 +      isr0_mask = advk_readl(pcie, PCIE_ISR0_MASK_REG);
 +      isr0_status = isr0_val & ((~isr0_mask) & PCIE_ISR0_ALL_MASK);
 +
 +      isr1_val = advk_readl(pcie, PCIE_ISR1_REG);
 +      isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
 +      isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
  
 -      if (!status) {
 -              advk_writel(pcie, val, PCIE_ISR0_REG);
 +      if (!isr0_status && !isr1_status) {
 +              advk_writel(pcie, isr0_val, PCIE_ISR0_REG);
 +              advk_writel(pcie, isr1_val, PCIE_ISR1_REG);
                return;
        }
  
        /* Process MSI interrupts */
 -      if (status & PCIE_ISR0_MSI_INT_PENDING)
 +      if (isr0_status & PCIE_ISR0_MSI_INT_PENDING)
                advk_pcie_handle_msi(pcie);
  
        /* Process legacy interrupts */
        for (i = 0; i < PCI_NUM_INTX; i++) {
 -              if (!(status & PCIE_ISR0_INTX_ASSERT(i)))
 +              if (!(isr1_status & PCIE_ISR1_INTX_ASSERT(i)))
                        continue;
  
 -              advk_writel(pcie, PCIE_ISR0_INTX_ASSERT(i),
 -                          PCIE_ISR0_REG);
 +              advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i),
 +                          PCIE_ISR1_REG);
  
                virq = irq_find_mapping(pcie->irq_domain, i);
                generic_handle_irq(virq);
@@@ -822,14 -817,13 +824,13 @@@ static int advk_pcie_parse_request_of_p
  {
        int err, res_valid = 0;
        struct device *dev = &pcie->pdev->dev;
-       struct device_node *np = dev->of_node;
        struct resource_entry *win, *tmp;
        resource_size_t iobase;
  
        INIT_LIST_HEAD(&pcie->resources);
  
-       err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pcie->resources,
-                                              &iobase);
+       err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff,
+                                                   &pcie->resources, &iobase);
        if (err)
                return err;
  
diff --combined drivers/pci/pci-driver.c
index 18ba62c76480590c810853a2c869897d2ee8f8a1,ffb956457b4aa09102d7be7e9aa3c4af217c732b..c125d53033c69cafe42734c32935561547abbdba
@@@ -16,8 -16,6 +16,8 @@@
  #include <linux/pm_runtime.h>
  #include <linux/suspend.h>
  #include <linux/kexec.h>
 +#include <linux/of_device.h>
 +#include <linux/acpi.h>
  #include "pci.h"
  #include "pcie/portdrv.h"
  
@@@ -755,11 -753,10 +755,11 @@@ static int pci_pm_suspend(struct devic
         * better to resume the device from runtime suspend here.
         */
        if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND) ||
 -          !pci_dev_keep_suspended(pci_dev))
 +          !pci_dev_keep_suspended(pci_dev)) {
                pm_runtime_resume(dev);
 +              pci_dev->state_saved = false;
 +      }
  
 -      pci_dev->state_saved = false;
        if (pm->suspend) {
                pci_power_t prev = pci_dev->current_state;
                int error;
@@@ -961,11 -958,10 +961,11 @@@ static int pci_pm_freeze(struct device 
         * devices should not be touched during freeze/thaw transitions,
         * however.
         */
 -      if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND))
 +      if (!dev_pm_smart_suspend_and_suspended(dev)) {
                pm_runtime_resume(dev);
 +              pci_dev->state_saved = false;
 +      }
  
 -      pci_dev->state_saved = false;
        if (pm->freeze) {
                int error;
  
@@@ -1539,7 -1535,7 +1539,7 @@@ static int pci_uevent(struct device *de
        return 0;
  }
  
- #if defined(CONFIG_PCIEAER) || defined(CONFIG_EEH)
+ #if defined(CONFIG_PCIEPORTBUS) || defined(CONFIG_EEH)
  /**
   * pci_uevent_ers - emit a uevent during recovery path of PCI device
   * @pdev: PCI device undergoing error recovery
@@@ -1580,35 -1576,6 +1580,35 @@@ static int pci_bus_num_vf(struct devic
        return pci_num_vf(to_pci_dev(dev));
  }
  
 +/**
 + * pci_dma_configure - Setup DMA configuration
 + * @dev: ptr to dev structure
 + *
 + * Function to update PCI devices's DMA configuration using the same
 + * info from the OF node or ACPI node of host bridge's parent (if any).
 + */
 +static int pci_dma_configure(struct device *dev)
 +{
 +      struct device *bridge;
 +      int ret = 0;
 +
 +      bridge = pci_get_host_bridge_device(to_pci_dev(dev));
 +
 +      if (IS_ENABLED(CONFIG_OF) && bridge->parent &&
 +          bridge->parent->of_node) {
 +              ret = of_dma_configure(dev, bridge->parent->of_node, true);
 +      } else if (has_acpi_companion(bridge)) {
 +              struct acpi_device *adev = to_acpi_device_node(bridge->fwnode);
 +              enum dev_dma_attr attr = acpi_get_dma_attr(adev);
 +
 +              if (attr != DEV_DMA_NOT_SUPPORTED)
 +                      ret = acpi_dma_configure(dev, attr);
 +      }
 +
 +      pci_put_host_bridge_device(bridge);
 +      return ret;
 +}
 +
  struct bus_type pci_bus_type = {
        .name           = "pci",
        .match          = pci_bus_match,
        .drv_groups     = pci_drv_groups,
        .pm             = PCI_PM_OPS_PTR,
        .num_vf         = pci_bus_num_vf,
 -      .force_dma      = true,
 +      .dma_configure  = pci_dma_configure,
  };
  EXPORT_SYMBOL(pci_bus_type);
  
diff --combined drivers/pci/pci.c
index e90cf5c32e1432d378692d8392e9d07fe55a46b2,b345d20227b80fc64fe2283961246ebee34bbcb3..97acba712e4e7f7191df5fd7ae7800597dc94fd5
@@@ -112,6 -112,14 +112,14 @@@ unsigned int pcibios_max_latency = 255
  /* If set, the PCIe ARI capability will not be used. */
  static bool pcie_ari_disabled;
  
+ /* If set, the PCIe ATS capability will not be used. */
+ static bool pcie_ats_disabled;
+ bool pci_ats_disabled(void)
+ {
+       return pcie_ats_disabled;
+ }
  /* Disable bridge_d3 for all PCIe ports */
  static bool pci_bridge_d3_disable;
  /* Force bridge_d3 for all PCIe ports */
@@@ -1910,7 -1918,7 +1918,7 @@@ void pci_pme_active(struct pci_dev *dev
  EXPORT_SYMBOL(pci_pme_active);
  
  /**
 - * pci_enable_wake - enable PCI device as wakeup event source
 + * __pci_enable_wake - enable PCI device as wakeup event source
   * @dev: PCI device affected
   * @state: PCI state from which device will issue wakeup events
   * @enable: True to enable event generation; false to disable
   * Error code depending on the platform is returned if both the platform and
   * the native mechanism fail to enable the generation of wake-up events
   */
 -int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable)
 +static int __pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable)
  {
        int ret = 0;
  
  
        return ret;
  }
 +
 +/**
 + * pci_enable_wake - change wakeup settings for a PCI device
 + * @pci_dev: Target device
 + * @state: PCI state from which device will issue wakeup events
 + * @enable: Whether or not to enable event generation
 + *
 + * If @enable is set, check device_may_wakeup() for the device before calling
 + * __pci_enable_wake() for it.
 + */
 +int pci_enable_wake(struct pci_dev *pci_dev, pci_power_t state, bool enable)
 +{
 +      if (enable && !device_may_wakeup(&pci_dev->dev))
 +              return -EINVAL;
 +
 +      return __pci_enable_wake(pci_dev, state, enable);
 +}
  EXPORT_SYMBOL(pci_enable_wake);
  
  /**
   * should not be called twice in a row to enable wake-up due to PCI PM vs ACPI
   * ordering constraints.
   *
 - * This function only returns error code if the device is not capable of
 - * generating PME# from both D3_hot and D3_cold, and the platform is unable to
 - * enable wake-up power for it.
 + * This function only returns error code if the device is not allowed to wake
 + * up the system from sleep or it is not capable of generating PME# from both
 + * D3_hot and D3_cold and the platform is unable to enable wake-up power for it.
   */
  int pci_wake_from_d3(struct pci_dev *dev, bool enable)
  {
@@@ -2025,7 -2016,8 +2033,7 @@@ static pci_power_t pci_target_state(str
  
        if (platform_pci_power_manageable(dev)) {
                /*
 -               * Call the platform to choose the target state of the device
 -               * and enable wake-up from this state if supported.
 +               * Call the platform to find the target state for the device.
                 */
                pci_power_t state = platform_pci_choose_state(dev);
  
        if (wakeup) {
                /*
                 * Find the deepest state from which the device can generate
 -               * wake-up events, make it the target state and enable device
 -               * to generate PME#.
 +               * PME#.
                 */
                if (dev->pme_support) {
                        while (target_state
@@@ -2129,7 -2122,7 +2137,7 @@@ int pci_finish_runtime_suspend(struct p
  
        dev->runtime_d3cold = target_state == PCI_D3cold;
  
 -      pci_enable_wake(dev, target_state, pci_dev_run_wake(dev));
 +      __pci_enable_wake(dev, target_state, pci_dev_run_wake(dev));
  
        error = pci_set_power_state(dev, target_state);
  
@@@ -2153,16 -2146,16 +2161,16 @@@ bool pci_dev_run_wake(struct pci_dev *d
  {
        struct pci_bus *bus = dev->bus;
  
 -      if (device_can_wakeup(&dev->dev))
 -              return true;
 -
        if (!dev->pme_support)
                return false;
  
        /* PME-capable in principle, but not from the target power state */
 -      if (!pci_pme_capable(dev, pci_target_state(dev, false)))
 +      if (!pci_pme_capable(dev, pci_target_state(dev, true)))
                return false;
  
 +      if (device_can_wakeup(&dev->dev))
 +              return true;
 +
        while (bus->parent) {
                struct pci_dev *bridge = bus->self;
  
@@@ -4153,6 -4146,35 +4161,35 @@@ static int pci_pm_reset(struct pci_dev 
  
        return pci_dev_wait(dev, "PM D3->D0", PCIE_RESET_READY_POLL_MS);
  }
+ /**
+  * pcie_wait_for_link - Wait until link is active or inactive
+  * @pdev: Bridge device
+  * @active: waiting for active or inactive?
+  *
+  * Use this to wait till link becomes active or inactive.
+  */
+ bool pcie_wait_for_link(struct pci_dev *pdev, bool active)
+ {
+       int timeout = 1000;
+       bool ret;
+       u16 lnk_status;
+       for (;;) {
+               pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status);
+               ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA);
+               if (ret == active)
+                       return true;
+               if (timeout <= 0)
+                       break;
+               msleep(10);
+               timeout -= 10;
+       }
+       pci_info(pdev, "Data Link Layer Link Active not %s in 1000 msec\n",
+                active ? "set" : "cleared");
+       return false;
+ }
  
  void pci_reset_secondary_bus(struct pci_dev *dev)
  {
@@@ -5084,49 -5106,6 +5121,6 @@@ int pcie_set_mps(struct pci_dev *dev, i
  }
  EXPORT_SYMBOL(pcie_set_mps);
  
- /**
-  * pcie_get_minimum_link - determine minimum link settings of a PCI device
-  * @dev: PCI device to query
-  * @speed: storage for minimum speed
-  * @width: storage for minimum width
-  *
-  * This function will walk up the PCI device chain and determine the minimum
-  * link width and speed of the device.
-  */
- int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
-                         enum pcie_link_width *width)
- {
-       int ret;
-       *speed = PCI_SPEED_UNKNOWN;
-       *width = PCIE_LNK_WIDTH_UNKNOWN;
-       while (dev) {
-               u16 lnksta;
-               enum pci_bus_speed next_speed;
-               enum pcie_link_width next_width;
-               ret = pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);
-               if (ret)
-                       return ret;
-               next_speed = pcie_link_speed[lnksta & PCI_EXP_LNKSTA_CLS];
-               next_width = (lnksta & PCI_EXP_LNKSTA_NLW) >>
-                       PCI_EXP_LNKSTA_NLW_SHIFT;
-               if (next_speed < *speed)
-                       *speed = next_speed;
-               if (next_width < *width)
-                       *width = next_width;
-               dev = dev->bus->self;
-       }
-       return 0;
- }
- EXPORT_SYMBOL(pcie_get_minimum_link);
  /**
   * pcie_bandwidth_available - determine minimum link settings of a PCIe
   *                          device and its bandwidth limitation
@@@ -5288,11 -5267,11 +5282,11 @@@ void pcie_print_link_status(struct pci_
        bw_avail = pcie_bandwidth_available(dev, &limiting_dev, &speed, &width);
  
        if (bw_avail >= bw_cap)
 -              pci_info(dev, "%u.%03u Gb/s available bandwidth (%s x%d link)\n",
 +              pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth (%s x%d link)\n",
                         bw_cap / 1000, bw_cap % 1000,
                         PCIE_SPEED2STR(speed_cap), width_cap);
        else
 -              pci_info(dev, "%u.%03u Gb/s available bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)\n",
 +              pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)\n",
                         bw_avail / 1000, bw_avail % 1000,
                         PCIE_SPEED2STR(speed), width,
                         limiting_dev ? pci_name(limiting_dev) : "<unknown>",
@@@ -5717,15 -5696,14 +5711,14 @@@ static void pci_no_domains(void
  #endif
  }
  
- #ifdef CONFIG_PCI_DOMAINS
+ #ifdef CONFIG_PCI_DOMAINS_GENERIC
  static atomic_t __domain_nr = ATOMIC_INIT(-1);
  
- int pci_get_new_domain_nr(void)
static int pci_get_new_domain_nr(void)
  {
        return atomic_inc_return(&__domain_nr);
  }
  
- #ifdef CONFIG_PCI_DOMAINS_GENERIC
  static int of_pci_bus_find_domain_nr(struct device *parent)
  {
        static int use_dt_domains = -1;
@@@ -5780,7 -5758,6 +5773,6 @@@ int pci_bus_find_domain_nr(struct pci_b
                               acpi_pci_bus_find_domain_nr(bus);
  }
  #endif
- #endif
  
  /**
   * pci_ext_cfg_avail - can we access extended PCI config space?
@@@ -5808,6 -5785,9 +5800,9 @@@ static int __init pci_setup(char *str
                if (*str && (str = pcibios_setup(str)) && *str) {
                        if (!strcmp(str, "nomsi")) {
                                pci_no_msi();
+                       } else if (!strncmp(str, "noats", 5)) {
+                               pr_info("PCIe: ATS is disabled\n");
+                               pcie_ats_disabled = true;
                        } else if (!strcmp(str, "noaer")) {
                                pci_no_aer();
                        } else if (!strncmp(str, "realloc=", 8)) {
diff --combined include/linux/acpi.h
index fd0ea6af9e36c47ab2eee9cf3f44c4759da258f3,49f63c67a9d140e1dbc2b1b1be60b25982cc8958..8758a2a9e6c11f1e555b40805ce3079e0be74b41
@@@ -506,7 -506,8 +506,8 @@@ extern bool osc_pc_lpi_support_confirme
  #define OSC_PCI_EXPRESS_PME_CONTROL           0x00000004
  #define OSC_PCI_EXPRESS_AER_CONTROL           0x00000008
  #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL    0x00000010
- #define OSC_PCI_CONTROL_MASKS                 0x0000001f
+ #define OSC_PCI_EXPRESS_LTR_CONTROL           0x00000020
+ #define OSC_PCI_CONTROL_MASKS                 0x0000003f
  
  #define ACPI_GSB_ACCESS_ATTRIB_QUICK          0x00000002
  #define ACPI_GSB_ACCESS_ATTRIB_SEND_RCV         0x00000004
@@@ -578,7 -579,6 +579,7 @@@ int acpi_match_platform_list(const stru
  
  extern void acpi_early_init(void);
  extern void acpi_subsystem_init(void);
 +extern void arch_post_acpi_subsys_init(void);
  
  extern int acpi_nvs_register(__u64 start, __u64 size);
  
@@@ -900,7 -900,7 +901,7 @@@ static inline int acpi_subsys_runtime_s
  static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
  static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
  {
 -      return -ENODEV;
 +      return 0;
  }
  #endif
  
diff --combined include/linux/pci.h
index 55371cb827adc06db6b4a7f1b50f8c22b39441f5,fb1a42251d17781946c4b82c20d8ecb05f5ea15e..340029b2fb382cc15888d72fde0bf5a069a6467c
@@@ -217,6 -217,7 +217,7 @@@ enum pci_bus_flags 
        PCI_BUS_FLAGS_NO_MSI    = (__force pci_bus_flags_t) 1,
        PCI_BUS_FLAGS_NO_MMRBC  = (__force pci_bus_flags_t) 2,
        PCI_BUS_FLAGS_NO_AERSID = (__force pci_bus_flags_t) 4,
+       PCI_BUS_FLAGS_NO_EXTCFG = (__force pci_bus_flags_t) 8,
  };
  
  /* Values from Link Status register, PCIe r3.1, sec 7.8.8 */
@@@ -406,6 -407,9 +407,9 @@@ struct pci_dev 
        struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
        struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
  
+ #ifdef CONFIG_HOTPLUG_PCI_PCIE
+       unsigned int    broken_cmd_compl:1;     /* No compl for some cmds */
+ #endif
  #ifdef CONFIG_PCIE_PTM
        unsigned int    ptm_root:1;
        unsigned int    ptm_enabled:1;
@@@ -471,8 -475,10 +475,10 @@@ struct pci_host_bridge 
        unsigned int    ignore_reset_delay:1;   /* For entire hierarchy */
        unsigned int    no_ext_tags:1;          /* No Extended Tags */
        unsigned int    native_aer:1;           /* OS may use PCIe AER */
-       unsigned int    native_hotplug:1;       /* OS may use PCIe hotplug */
+       unsigned int    native_pcie_hotplug:1;  /* OS may use PCIe hotplug */
+       unsigned int    native_shpc_hotplug:1;  /* OS may use SHPC hotplug */
        unsigned int    native_pme:1;           /* OS may use PCIe PME */
+       unsigned int    native_ltr:1;           /* OS may use PCIe LTR */
        /* Resource alignment requirements */
        resource_size_t (*align_resource)(struct pci_dev *dev,
                        const struct resource *res,
@@@ -670,7 -676,7 +676,7 @@@ int raw_pci_read(unsigned int domain, u
  int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn,
                  int reg, int len, u32 val);
  
 -#ifdef CONFIG_PCI_BUS_ADDR_T_64BIT
 +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
  typedef u64 pci_bus_addr_t;
  #else
  typedef u32 pci_bus_addr_t;
@@@ -1079,8 -1085,6 +1085,6 @@@ int pcie_get_readrq(struct pci_dev *dev
  int pcie_set_readrq(struct pci_dev *dev, int rq);
  int pcie_get_mps(struct pci_dev *dev);
  int pcie_set_mps(struct pci_dev *dev, int mps);
- int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
-                         enum pcie_link_width *width);
  u32 pcie_bandwidth_available(struct pci_dev *dev, struct pci_dev **limiting_dev,
                             enum pci_bus_speed *speed,
                             enum pcie_link_width *width);
@@@ -1451,8 -1455,10 +1455,10 @@@ static inline int pci_irqd_intx_xlate(s
  
  #ifdef CONFIG_PCIEPORTBUS
  extern bool pcie_ports_disabled;
+ extern bool pcie_ports_native;
  #else
  #define pcie_ports_disabled   true
+ #define pcie_ports_native     false
  #endif
  
  #ifdef CONFIG_PCIEASPM
@@@ -1479,6 -1485,8 +1485,8 @@@ static inline void pcie_set_ecrc_checki
  static inline void pcie_ecrc_get_policy(char *str) { }
  #endif
  
+ bool pci_ats_disabled(void);
  #ifdef CONFIG_PCI_ATS
  /* Address Translation Service */
  void pci_ats_init(struct pci_dev *dev);
@@@ -1510,12 -1518,10 +1518,10 @@@ void pci_cfg_access_unlock(struct pci_d
   */
  #ifdef CONFIG_PCI_DOMAINS
  extern int pci_domains_supported;
- int pci_get_new_domain_nr(void);
  #else
  enum { pci_domains_supported = 0 };
  static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
  static inline int pci_proc_domain(struct pci_bus *bus) { return 0; }
- static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
  #endif /* CONFIG_PCI_DOMAINS */
  
  /*
@@@ -1670,7 -1676,6 +1676,6 @@@ static inline struct pci_dev *pci_get_d
  
  static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
  static inline struct pci_dev *pci_dev_get(struct pci_dev *dev) { return NULL; }
- static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
  
  #define dev_is_pci(d) (false)
  #define dev_is_pf(d) (false)
@@@ -1954,6 -1959,7 +1959,7 @@@ int pci_num_vf(struct pci_dev *dev)
  int pci_vfs_assigned(struct pci_dev *dev);
  int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);
  int pci_sriov_get_totalvfs(struct pci_dev *dev);
+ int pci_sriov_configure_simple(struct pci_dev *dev, int nr_virtfn);
  resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno);
  void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool probe);
  
@@@ -1986,6 -1992,7 +1992,7 @@@ static inline int pci_sriov_set_totalvf
  { return 0; }
  static inline int pci_sriov_get_totalvfs(struct pci_dev *dev)
  { return 0; }
+ #define pci_sriov_configure_simple    NULL
  static inline resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno)
  { return 0; }
  static inline void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool probe) { }
@@@ -2284,7 -2291,7 +2291,7 @@@ static inline bool pci_is_thunderbolt_a
        return false;
  }
  
- #if defined(CONFIG_PCIEAER) || defined(CONFIG_EEH)
+ #if defined(CONFIG_PCIEPORTBUS) || defined(CONFIG_EEH)
  void pci_uevent_ers(struct pci_dev *pdev, enum  pci_ers_result err_type);
  #endif
  
index 83ade9b5cf9507266cbe673156be340b120a61c2,362de237ad7da59424ee32c28593d80369a274af..4da87e2ef8a8440d21911545f7c8fa8f30eb9ee1
  #define  PCI_EXP_DEVCTL_READRQ_256B  0x1000 /* 256 Bytes */
  #define  PCI_EXP_DEVCTL_READRQ_512B  0x2000 /* 512 Bytes */
  #define  PCI_EXP_DEVCTL_READRQ_1024B 0x3000 /* 1024 Bytes */
 +#define  PCI_EXP_DEVCTL_READRQ_2048B 0x4000 /* 2048 Bytes */
 +#define  PCI_EXP_DEVCTL_READRQ_4096B 0x5000 /* 4096 Bytes */
  #define  PCI_EXP_DEVCTL_BCR_FLR 0x8000  /* Bridge Configuration Retry / FLR */
  #define PCI_EXP_DEVSTA                10      /* Device Status */
  #define  PCI_EXP_DEVSTA_CED   0x0001  /* Correctable Error Detected */
  #define  PCI_EXP_LNKCAP2_SLS_16_0GB   0x00000010 /* Supported Speed 16GT/s */
  #define  PCI_EXP_LNKCAP2_CROSSLINK    0x00000100 /* Crosslink supported */
  #define PCI_EXP_LNKCTL2               48      /* Link Control 2 */
+ #define PCI_EXP_LNKCTL2_TLS           0x000f
+ #define PCI_EXP_LNKCTL2_TLS_2_5GT     0x0001 /* Supported Speed 2.5GT/s */
+ #define PCI_EXP_LNKCTL2_TLS_5_0GT     0x0002 /* Supported Speed 5GT/s */
+ #define PCI_EXP_LNKCTL2_TLS_8_0GT     0x0003 /* Supported Speed 8GT/s */
+ #define PCI_EXP_LNKCTL2_TLS_16_0GT    0x0004 /* Supported Speed 16GT/s */
  #define PCI_EXP_LNKSTA2               50      /* Link Status 2 */
  #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2        52      /* v2 endpoints with link end here */
  #define PCI_EXP_SLTCAP2               52      /* Slot Capabilities 2 */
  #define  PCI_EXP_DPC_CAP_DL_ACTIVE    0x1000  /* ERR_COR signal on DL_Active supported */
  
  #define PCI_EXP_DPC_CTL                       6       /* DPC control */
+ #define  PCI_EXP_DPC_CTL_EN_FATAL     0x0001  /* Enable trigger on ERR_FATAL message */
  #define  PCI_EXP_DPC_CTL_EN_NONFATAL  0x0002  /* Enable trigger on ERR_NONFATAL message */
  #define  PCI_EXP_DPC_CTL_INT_EN       0x0008  /* DPC Interrupt Enable */