Skip to contentSkip to conversation

Linux 5.14.7

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Sep 22, 2021 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.14.7 kernel.

All users of the 5.14 kernel series must upgrade.

The updated 5.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

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

 Documentation/devicetree/bindings/arm/tegra.yaml            |    2 
 Documentation/devicetree/bindings/mtd/gpmc-nand.txt         |    2 
 Makefile                                                    |    2 
 arch/arc/mm/cache.c                                         |    2 
 arch/arm64/kernel/fpsimd.c                                  |    2 
 arch/arm64/kvm/arm.c                                        |    8 
 arch/arm64/kvm/handle_exit.c                                |   23 +-
 arch/arm64/kvm/hyp/nvhe/host.S                              |   21 +-
 arch/arm64/kvm/reset.c                                      |   24 +-
 arch/powerpc/kernel/interrupt.c                             |   43 ++++
 arch/powerpc/kernel/interrupt_64.S                          |   41 ----
 arch/powerpc/kernel/mce.c                                   |   17 +
 arch/powerpc/kvm/book3s_hv_rmhandlers.S                     |   36 +++
 arch/riscv/include/asm/page.h                               |    4 
 arch/riscv/mm/init.c                                        |    6 
 arch/s390/net/bpf_jit_comp.c                                |   70 +++----
 arch/s390/pci/pci_mmio.c                                    |    4 
 arch/x86/include/asm/uaccess.h                              |    4 
 arch/x86/kernel/cpu/mce/core.c                              |   43 +++-
 arch/x86/mm/init_64.c                                       |    6 
 arch/x86/mm/pat/memtype.c                                   |    7 
 arch/x86/xen/enlighten_pv.c                                 |    7 
 arch/x86/xen/mmu_pv.c                                       |    7 
 block/bfq-iosched.c                                         |   16 +
 block/blk-cgroup.c                                          |   10 -
 drivers/base/power/trace.c                                  |   10 +
 drivers/block/loop.c                                        |   75 ++++---
 drivers/block/loop.h                                        |    1 
 drivers/gpio/gpio-mpc8xxx.c                                 |   13 -
 drivers/gpu/drm/amd/amdgpu/amdgpu.h                         |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c                  |   10 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h                  |    7 
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c                 |   10 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c                  |   12 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c                    |    4 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c                     |   18 -
 drivers/gpu/drm/amd/amdkfd/kfd_device.c                     |   12 -
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c           |   24 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c |   18 -
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h |   11 +
 drivers/gpu/drm/amd/display/dc/core/dc_link.c               |   16 +
 drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c         |   10 -
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c                   |    2 
 drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c             |   24 ++
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c     |    4 
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c                      |   21 ++
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h                      |    2 
 drivers/gpu/drm/etnaviv/etnaviv_buffer.c                    |    3 
 drivers/gpu/drm/etnaviv/etnaviv_gem.c                       |    3 
 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c                |    3 
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c                       |   43 ++--
 drivers/gpu/drm/etnaviv/etnaviv_gpu.h                       |    1 
 drivers/gpu/drm/etnaviv/etnaviv_iommu.c                     |    4 
 drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c                  |    8 
 drivers/gpu/drm/etnaviv/etnaviv_mmu.c                       |    1 
 drivers/gpu/drm/etnaviv/etnaviv_mmu.h                       |    4 
 drivers/gpu/drm/i915/display/intel_dp.c                     |    5 
 drivers/gpu/drm/i915/display/intel_dp_link_training.c       |    2 
 drivers/gpu/drm/radeon/radeon_kms.c                         |    2 
 drivers/gpu/drm/rockchip/cdn-dp-core.c                      |    2 
 drivers/hv/ring_buffer.c                                    |    1 
 drivers/mfd/ab8500-core.c                                   |    2 
 drivers/mfd/axp20x.c                                        |    3 
 drivers/mfd/db8500-prcmu.c                                  |   14 -
 drivers/mfd/lpc_sch.c                                       |    4 
 drivers/mfd/stmpe.c                                         |    4 
 drivers/mfd/tc3589x.c                                       |    2 
 drivers/mfd/tqmx86.c                                        |    2 
 drivers/mfd/wm8994-irq.c                                    |    2 
 drivers/mtd/mtdconcat.c                                     |   33 ++-
 drivers/mtd/nand/raw/cafe_nand.c                            |    4 
 drivers/net/dsa/b53/b53_common.c                            |   34 ++-
 drivers/net/dsa/b53/b53_priv.h                              |    1 
 drivers/net/dsa/bcm_sf2.c                                   |    2 
 drivers/net/dsa/lantiq_gswip.c                              |    6 
 drivers/net/dsa/qca8k.c                                     |   30 ++-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c           |    2 
 drivers/net/ethernet/broadcom/bnxt/bnxt.c                   |   38 +++
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c           |    6 
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c                |    3 
 drivers/net/ethernet/chelsio/cxgb/cxgb2.c                   |    1 
 drivers/net/ethernet/chelsio/cxgb3/sge.c                    |    3 
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c             |    8 
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c  |    4 
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c     |   19 +
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c   |    6 
 drivers/net/ethernet/ibm/ibmvnic.c                          |    8 
 drivers/net/ethernet/intel/ice/ice.h                        |    2 
 drivers/net/ethernet/intel/ice/ice_idc.c                    |    6 
 drivers/net/ethernet/intel/igc/igc_main.c                   |    4 
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c             |   12 +
 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c    |    3 
 drivers/net/ethernet/mellanox/mlx5/core/en.h                |    2 
 drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c         |    3 
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c        |   11 -
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c           |    4 
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c           |    5 
 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c  |    7 
 drivers/net/ethernet/netronome/nfp/flower/offload.c         |    3 
 drivers/net/ethernet/qlogic/qed/qed_mcp.c                   |    6 
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c            |    1 
 drivers/net/ethernet/rdc/r6040.c                            |    9 
 drivers/net/ethernet/renesas/sh_eth.c                       |    1 
 drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c        |    4 
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c           |   50 +----
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c       |   44 ++++
 drivers/net/ipa/ipa_table.c                                 |    3 
 drivers/net/phy/dp83640_reg.h                               |    2 
 drivers/net/phy/phylink.c                                   |   82 ++++++++
 drivers/net/usb/cdc_mbim.c                                  |    5 
 drivers/net/usb/hso.c                                       |   11 -
 drivers/net/wireless/intel/iwlwifi/fw/pnvm.c                |   19 -
 drivers/net/wireless/intel/iwlwifi/fw/pnvm.h                |   20 ++
 drivers/ntb/test/ntb_msi_test.c                             |    4 
 drivers/ntb/test/ntb_perf.c                                 |    1 
 drivers/nvme/host/core.c                                    |   15 -
 drivers/nvme/host/tcp.c                                     |   20 +-
 drivers/pci/controller/Kconfig                              |    1 
 drivers/pci/controller/cadence/pci-j721e.c                  |   61 +++++-
 drivers/pci/controller/cadence/pcie-cadence-ep.c            |    4 
 drivers/pci/controller/cadence/pcie-cadence-host.c          |    3 
 drivers/pci/controller/cadence/pcie-cadence.c               |   16 +
 drivers/pci/controller/cadence/pcie-cadence.h               |   17 +
 drivers/pci/controller/dwc/pcie-tegra194.c                  |   32 +--
 drivers/pci/controller/pci-tegra.c                          |   13 -
 drivers/pci/controller/pcie-iproc-bcma.c                    |   16 -
 drivers/pci/controller/pcie-rcar-ep.c                       |    4 
 drivers/pci/hotplug/TODO                                    |    3 
 drivers/pci/hotplug/ibmphp_ebda.c                           |    5 
 drivers/pci/of.c                                            |    2 
 drivers/pci/pci.c                                           |    2 
 drivers/pci/pcie/ptm.c                                      |    4 
 drivers/pci/quirks.c                                        |   58 +++++
 drivers/remoteproc/qcom_wcnss.c                             |   49 +---
 drivers/remoteproc/qcom_wcnss.h                             |    4 
 drivers/remoteproc/qcom_wcnss_iris.c                        |  120 +++++++-----
 drivers/rtc/rtc-cmos.c                                      |    2 
 drivers/s390/char/sclp_early.c                              |    3 
 drivers/vhost/net.c                                         |   11 +
 drivers/video/backlight/ktd253-backlight.c                  |   75 +++++--
 drivers/watchdog/watchdog_dev.c                             |    8 
 drivers/xen/swiotlb-xen.c                                   |    5 
 fs/fuse/dev.c                                               |    4 
 fs/io_uring.c                                               |   33 ++-
 include/linux/pci.h                                         |    5 
 include/linux/pci_ids.h                                     |    3 
 include/linux/phylink.h                                     |    3 
 include/linux/sched.h                                       |    1 
 include/linux/skbuff.h                                      |    2 
 include/net/dsa.h                                           |    5 
 include/net/flow.h                                          |    4 
 include/uapi/linux/pkt_sched.h                              |    2 
 kernel/events/core.c                                        |    2 
 kernel/trace/trace_boot.c                                   |   15 -
 kernel/trace/trace_kprobe.c                                 |    6 
 kernel/trace/trace_probe.c                                  |   25 ++
 kernel/trace/trace_probe.h                                  |    1 
 kernel/trace/trace_uprobe.c                                 |    6 
 net/caif/chnl_net.c                                         |   19 -
 net/dccp/minisocks.c                                        |    2 
 net/dsa/dsa.c                                               |    5 
 net/dsa/dsa2.c                                              |   46 +++-
 net/dsa/dsa_priv.h                                          |    1 
 net/dsa/slave.c                                             |   12 -
 net/dsa/tag_rtl4_a.c                                        |    7 
 net/ethtool/ioctl.c                                         |    2 
 net/ipv4/cipso_ipv4.c                                       |   18 -
 net/ipv4/ip_gre.c                                           |    9 
 net/ipv4/nexthop.c                                          |    2 
 net/ipv4/tcp_input.c                                        |    2 
 net/ipv4/udp_tunnel_nic.c                                   |    2 
 net/ipv6/ip6_gre.c                                          |    2 
 net/ipv6/netfilter/nf_socket_ipv6.c                         |    4 
 net/l2tp/l2tp_core.c                                        |    4 
 net/mptcp/pm_netlink.c                                      |   10 -
 net/mptcp/protocol.c                                        |   97 ++++-----
 net/mptcp/protocol.h                                        |    1 
 net/netfilter/nft_ct.c                                      |    9 
 net/qrtr/qrtr.c                                             |    2 
 net/sched/sch_fq_codel.c                                    |   12 +
 net/tipc/socket.c                                           |   10 -
 net/unix/af_unix.c                                          |    2 
 scripts/clang-tools/gen_compile_commands.py                 |    1 
 tools/build/Makefile                                        |    2 
 tools/perf/Makefile.config                                  |    8 
 tools/perf/bench/inject-buildid.c                           |   52 +++--
 tools/perf/util/config.c                                    |    5 
 tools/perf/util/machine.c                                   |    1 
 tools/testing/selftests/net/altnames.sh                     |    2 
 tools/testing/selftests/net/mptcp/simult_flows.sh           |    4 
 190 files changed, 1620 insertions(+), 765 deletions(-)

Adrian Bunk (1):
bnx2x: Fix enabling network interfaces without VFs

Aleksander Jan Bajkowski (1):
net: dsa: lantiq_gswip: Add 200ms assert delay

Alex Elder (1):
net: ipa: initialize all filter table slots

Alexander Egorenkov (1):
s390/sclp: fix Secure-IPL facility detection

Andrea Claudi (1):
selftest: net: fix typo in altname test

Andy Shevchenko (1):
PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n

Anshuman Khandual (1):
KVM: arm64: Restrict IPA size to maximum 48 bits on 4K and 16K page size

Ansuel Smith (1):
net: dsa: qca8k: fix kernel panic with legacy mdio mapping

Arnaldo Carvalho de Melo (2):
perf config: Fix caching and memory leak in perf_home_perfconfig() perf bench inject-buildid: Handle writen() errors

Arnd Bergmann (1):
drm/rockchip: cdn-dp-core: Make cdn_dp_core_resume __maybe_unused

Aya Levin (2):
udp_tunnel: Fix udp_tunnel_nic work-queue type net/mlx5e: Fix mutual exclusion between CQE compression and HW TS

Baptiste Lepers (1):
events: Reuse value read using READ_ONCE instead of re-reading it

Benjamin Hesmans (1):
netfilter: socket: icmp6: fix use-after-scope

Bjorn Andersson (1):
remoteproc: qcom: wcnss: Fix race with iris probe

Chris Wilson (1):
rtc: cmos: Disable irq around direct invocation of cmos_interrupt()

Christian König (1):
drm/amdgpu: fix use after free during BO move

Christophe JAILLET (6):
PCI: tegra: Fix OF node reference leak
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'
gpio: mpc8xxx: Fix a potential double iounmap call in 'mpc8xxx_probe()'
gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak
iwlwifi: pnvm: Fix a memory leak in 'iwl_pnvm_get_from_fs()'

Curtis Klein (1):
watchdog: Fix NULL pointer dereference when releasing cdev

Dan Carpenter (2):
net: qrtr: revert check in qrtr_endpoint_post()
PCI: Fix pci_dev_str_match_path() alloc while atomic bug

Daniel Wagner (1):
nvme: avoid race in shutdown namespace removal

Daniele Palmas (1):
net: usb: cdc_mbim: avoid altsetting toggling for Telit LN920

Dave Ertman (1):
ice: Correctly deal with PFs that do not support RDMA

David Heidelberg (1):
dt-bindings: arm: Fix Toradex compatible typo

David Hildenbrand (1):
s390/pci_mmio: fully validate the VMA before calling follow_pte()

David Thompson (1):
mlxbf_gige: clear valid_polarity upon open

Dinghao Liu (2):
PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe()
qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom

Dror Moshe (1):
iwlwifi: move get pnvm file name to a separate function

Edwin Peer (2):
bnxt_en: make bnxt_free_skbs() safe to call after bnxt_free_mem()
bnxt_en: fix stored FW_PSID version masks

Eli Cohen (1):
net/{mlx5|nfp|bnxt}: Remove unnecessary RTNL lock assert

Eric Dumazet (3):
net-caif: avoid user-triggerable WARN_ON(1) net/af_unix: fix a data-race in unix_dgram_poll
fq_codel: reject silly quantum parameters

Ernst Sjöstrand (1):
drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10

Evan Quan (2):
PCI: Add AMD GPU multi-function power dependencies drm/amd/pm: fix runpm hang when amdgpu loaded prior to sound driver

Florian Fainelli (2):
r6040: Restore MDIO clock frequency after MAC reset
net: dsa: bcm_sf2: Fix array overrun in bcm_sf2_num_active_ports()

Ganesh Goudar (1):
powerpc/mce: Fix access error in mce handler

Geert Uytterhoeven (1):
PCI: controller: PCI_IXP4XX should depend on ARCH_IXP4XX

George Cherian (1):
PCI: Add ACS quirks for Cavium multi-function devices

Greg Kroah-Hartman (1):

      Linux 5.14.7

Hans de Goede (1):

      mfd: axp20x: Update AXP288 volatile ranges

Harry Wentland (1):
drm/amd/display: Get backlight from PWM if DMCU is not initialized

Heiner Kallweit (1):
cxgb3: fix oops on module removal

Hersen Wu (1):
drm/amd/display: dsc mst 2 4K displays go dark with 2 lane HBR3

Hoang Le (1):
tipc: increase timeout in tipc_sk_enqueue()

Ilya Leoshkevich (3):
s390/bpf: Fix optimizing out zero-extensions s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant s390/bpf: Fix branch shortening during codegen pass

Jakub Kicinski (1):
PCI/PTM: Remove error message at boot

James Clark (1):
tools build: Fix feature detect clean for out of source builds

James Zhu (3):
drm/amdgpu: add amdgpu_amdkfd_resume_iommu drm/amdgpu: move iommu_resume before ip init/resume drm/amdkfd: separate kfd_iommu_resume from kfd_resume

Jan Beulich (2):
swiotlb-xen: avoid double free
swiotlb-xen: fix late init retry

Jan Kiszka (1):
watchdog: Start watchdog in watchdog_set_last_hw_keepalive only if appropriate

Jeff Moyer (1):
x86/pat: Pass valid address to sanitize_phys()

Jens Axboe (2):
io_uring: ensure symmetry in handling iter types in loop_rw_iter()
io_uring: allow retry for O_NONBLOCK if async is supported

Jiaran Zhang (2):
net: hns3: fix the timing issue of VF clearing interrupt sources
net: hns3: fix the exception when query imp info

Joakim Zhang (3):
net: stmmac: fix MAC not working when system resume back with WoL active
net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume
net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP

Juergen Gross (3):
xen: reset legacy rtc flag for PV domU
xen: fix usage of pmd_populate in mremap for pv guests
PM: base: power: don't try to use non-existing RTC for storing data

Kai-Heng Feng (1):
drm/i915/dp: Use max params for panels < eDP 1.4

Keith Busch (1):
nvme-tcp: fix io_work priority inversion

Kenneth Feng (1):
drm/amd/pm: fix the issue of uploading powerplay table

Kenneth Lee (1):
riscv: fix the global name pfn_base confliction error

Kishon Vijay Abraham I (3):
PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool
PCI: j721e: Add PCIe support for J7200
PCI: j721e: Add PCIe support for AM64

Kortan (1):
gen_compile_commands: fix missing 'sys' package

Lee Shawn C (1):
drm/i915/dp: return proper DPRX link training result

Li Huafei (1):

      perf unwind: Do not overwrite FEATURE_CHECK_LDFLAGS-libunwind-{x86,aarch64}

Lin, Zhenpeng (1):
dccp: don't duplicate ccid when cloning dccp sock

Linus Walleij (3):
mfd: db8500-prcmu: Adjust map to reality
backlight: ktd253: Stabilize backlight
net: dsa: tag_rtl4_a: Fix egress tags

Lucas Stach (8):
drm/etnaviv: return context from etnaviv_iommu_context_get drm/etnaviv: put submit prev MMU context when it exists drm/etnaviv: stop abusing mmu_context as FE running marker drm/etnaviv: keep MMU context across runtime suspend/resume drm/etnaviv: exec and MMU state is lost when resetting the GPU drm/etnaviv: fix MMU context leak on GPU reset drm/etnaviv: reference MMU context when setting up hardware state drm/etnaviv: add missing MMU context put when reaping MMU mapping

Maor Gottlieb (1):
net/mlx5: Fix potential sleeping in atomic context

Marc Zyngier (1):
mfd: Don't use irq_create_mapping() to resolve a mapping

Mark Brown (1):
arm64/sve: Use correct size when reinitialising SVE state

Masami Hiramatsu (2):
tracing/probes: Reject events which have the same name of existing one tracing/boot: Fix a hist trigger dependency for boot time tracing

Mat Martineau (1):
mptcp: Only send extra TCP acks in eligible socket states

Matthias Schiffer (1):
mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set

Matthieu Baerts (1):
selftests: mptcp: clean tmp files in simult_flows

Michael Chan (3):
bnxt_en: Fix asic.rev in devlink dev info command
bnxt_en: Fix possible unintended driver initiated error recovery
bnxt_en: Fix error recovery regression

Michael Petlan (1):
perf machine: Initialize srcline string member in add_location struct

Mike Rapoport (1):
x86/mm: Fix kern_addr_valid() to cope with existing but not present entries

Miklos Szeredi (1):
fuse: fix use after free in fuse_read_interrupt()

Ming Lei (1):
io_uring: retry in case of short read on block device

Miquel Raynal (1):
dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation

Nadeem Athani (1):
PCI: cadence: Add quirk flag to set minimum delay in LTSSM Detect.Quiet state

Nicholas Kazlauskas (1):
drm/amd/display: Fix white screen page fault for gpuvm

Nicholas Piggin (3):
powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state
KVM: PPC: Book3S HV: Tolerate treclaim. in fake-suspend mode changing registers powerpc/64s: system call rfscv workaround for TM bugs

Nirmoy Das (2):
drm/amdgpu: use IS_ERR for debugfs APIs drm/radeon: pass drm dev radeon_agp_head_init directly

Oliver Upton (2):
KVM: arm64: Fix read-side race on updates to vcpu reset state
KVM: arm64: Handle PSCI resets before userspace touches vCPU state

Om Prakash Singh (2):
PCI: tegra194: Fix handling BME_CHGED event
PCI: tegra194: Fix MSI-X programming

Paolo Abeni (3):
igc: fix tunnel offloading
vhost_net: fix OoB on sendmsg() failure.
mptcp: fix possible divide by zero

Paolo Valente (1):
block, bfq: honor already-setup queue merges

Pavel Skripkin (1):
netfilter: nft_ct: protect nft_ct_pcpu_template_refcnt with mutex

Rafał Miłecki (3):
net: dsa: b53: Fix calculating number of switch ports
net: dsa: b53: Set correct number of ports in the DSA struct
net: dsa: b53: Fix IMP port setup on BCM5301x

Randy Dunlap (3):
ptp: dp83640: don't define PAGE0
ARC: export clear_user_page() for modules
mfd: lpc_sch: Rename GPIOBASE to prevent build error

Rob Herring (2):
PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'
PCI: iproc: Fix BCMA probe resource handling

Russell King (Oracle) (1):
net: phylink: add suspend/resume support

Ryoga Saito (1):
Set fc_nlinfo in nh_create_ipv4, nh_create_ipv6

Saeed Mahameed (2):
ethtool: Fix rxnfc copy to user buffer overflow net/mlx5: FWTrace, cancel work on alloc pd error flow

Shai Malin (1):
qed: Handle management FW error

Smadar Fuks (1):
octeontx2-af: Add additional register check to rvu_poll_reg()

Sukadev Bhattiprolu (1):
ibmvnic: check failover_pending in login response

Tetsuo Handa (2):
flow: fix object-size-mismatch warning in flowi{4,6}_to_flowi_common()
loop: reduce the loop_ctl_mutex scope

Tony Luck (1):
x86/mce: Avoid infinite loop for copy from user recovery

Vishal Aslot (1):
PCI: ibmphp: Fix double unmap of io_mem

Vitaly Kuznetsov (1):
Drivers: hv: vmbus: Fix kernel crash upon unbinding a device from uio_hv_generic driver

Vladimir Oltean (2):
net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup
net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports

Wasim Khan (1):
PCI: Add ACS quirks for NXP LX2xx0 and LX2xx2 platforms

Will Deacon (2):
x86/uaccess: Fix 32-bit __get_user_asm_u64() when CC_HAS_ASM_GOTO_OUTPUT=y
KVM: arm64: Make hyp_panic() more robust when protected mode is enabled

Willem de Bruijn (2):
ip_gre: validate csum_start only on pull
ip6_gre: Revert "ip6_gre: add validation for csum_start"

Xin Long (1):
tipc: fix an use-after-free issue in tipc_recvmsg

Xiyu Yang (1):
net/l2tp: Fix reference count leak in l2tp_udp_recv_core

Yanfei Xu (1):
blkcg: fix memory leak in blk_iolatency_init

Yang Li (3):
ethtool: Fix an error code in cxgb2.c
NTB: Fix an error code in ntb_msit_probe()
NTB: perf: Fix an error code in perf_setup_inbuf()

Yoshihiro Shimoda (1):
net: renesas: sh_eth: Fix freeing wrong tx descriptor

Yufeng Mo (3):
net: hns3: pad the short tunnel frame before sending to hardware
net: hns3: change affinity_mask to numa node range
net: hns3: disable mac in flr process

Zhihao Cheng (2):
mtd: mtdconcat: Judge callback existence based on the master
mtd: mtdconcat: Check _read, _write callbacks existence before assignment

Ziyang Xuan (1):
net: hso: add failure handler for add_net_device

zhaoxiao (1):
stmmac: dwmac-loongson:Fix missing return value

zhenggy (1):

      tcp: fix tp->undo_retrans accounting in tcp_sacktag_one()

王贇 (1):
net: remove the unnecessary check in cipso_v4_doi_free

author maintainer
#1 lore raw
Documentation/devicetree/bindings/arm/tegra.yaml +1 -1
index b9f75e20fef5..b2a645740ffe 100644
@@ -54,7 +54,7 @@ properties:
           - const: toradex,apalis_t30
           - const: nvidia,tegra30
       - items:
-          - const: toradex,apalis_t30-eval-v1.1
+          - const: toradex,apalis_t30-v1.1-eval
           - const: toradex,apalis_t30-eval
           - const: toradex,apalis_t30-v1.1
           - const: toradex,apalis_t30
Documentation/devicetree/bindings/mtd/gpmc-nand.txt +1 -1
index 44919d48d241..c459f169a904 100644
@@ -122,7 +122,7 @@ on various other factors also like;
 	so the device should have enough free bytes available its OOB/Spare
 	area to accommodate ECC for entire page. In general following expression
 	helps in determining if given device can accommodate ECC syndrome:
-	"2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
+	"2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE"
 	where
 		OOBSIZE		number of bytes in OOB/spare area
 		PAGESIZE	number of bytes in main-area of device page
Makefile +1 -1
index f9c8bbf8cf71..efb603f06e71 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 14
-SUBLEVEL = 6
+SUBLEVEL = 7
 EXTRAVERSION =
 NAME = Opossums on Parade
 
arch/arc/mm/cache.c +1 -1
index a2fbea3ee07c..102418ac5ff4 100644
@@ -1123,7 +1123,7 @@ void clear_user_page(void *to, unsigned long u_vaddr, struct page *page)
 	clear_page(to);
 	clear_bit(PG_dc_clean, &page->flags);
 }
-
+EXPORT_SYMBOL(clear_user_page);
 
 /**********************************************************************
  * Explicit Cache flush request from user space via syscall
arch/arm64/kernel/fpsimd.c +1 -1
index e57b23f95284..3599b9a2f1df 100644
@@ -511,7 +511,7 @@ size_t sve_state_size(struct task_struct const *task)
 void sve_alloc(struct task_struct *task)
 {
 	if (task->thread.sve_state) {
-		memset(task->thread.sve_state, 0, sve_state_size(current));
+		memset(task->thread.sve_state, 0, sve_state_size(task));
 		return;
 	}
 
arch/arm64/kvm/arm.c +8 -0
index 5d1fc9c4bca5..45ee8abcf202 100644
@@ -1220,6 +1220,14 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 		if (copy_from_user(&reg, argp, sizeof(reg)))
 			break;
 
+		/*
+		 * We could owe a reset due to PSCI. Handle the pending reset
+		 * here to ensure userspace register accesses are ordered after
+		 * the reset.
+		 */
+		if (kvm_check_request(KVM_REQ_VCPU_RESET, vcpu))
+			kvm_reset_vcpu(vcpu);
+
 		if (ioctl == KVM_SET_ONE_REG)
 			r = kvm_arm_set_reg(vcpu, &reg);
 		else
arch/arm64/kvm/handle_exit.c +14 -9
index 6f48336b1d86..04ebab299aa4 100644
@@ -292,11 +292,12 @@ void handle_exit_early(struct kvm_vcpu *vcpu, int exception_index)
 		kvm_handle_guest_serror(vcpu, kvm_vcpu_get_esr(vcpu));
 }
 
-void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
+void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr,
+					      u64 elr_virt, u64 elr_phys,
 					      u64 par, uintptr_t vcpu,
 					      u64 far, u64 hpfar) {
-	u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
-	u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
+	u64 elr_in_kimg = __phys_to_kimg(elr_phys);
+	u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr_virt;
 	u64 mode = spsr & PSR_MODE_MASK;
 
 	/*
@@ -309,20 +310,24 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
 		kvm_err("Invalid host exception to nVHE hyp!\n");
 	} else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
 		   (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
-		struct bug_entry *bug = find_bug(elr_in_kimg);
 		const char *file = NULL;
 		unsigned int line = 0;
 
 		/* All hyp bugs, including warnings, are treated as fatal. */
-		if (bug)
-			bug_get_file_line(bug, &file, &line);
+		if (!is_protected_kvm_enabled() ||
+		    IS_ENABLED(CONFIG_NVHE_EL2_DEBUG)) {
+			struct bug_entry *bug = find_bug(elr_in_kimg);
+
+			if (bug)
+				bug_get_file_line(bug, &file, &line);
+		}
 
 		if (file)
 			kvm_err("nVHE hyp BUG at: %s:%u!\n", file, line);
 		else
-			kvm_err("nVHE hyp BUG at: %016llx!\n", elr + hyp_offset);
+			kvm_err("nVHE hyp BUG at: %016llx!\n", elr_virt + hyp_offset);
 	} else {
-		kvm_err("nVHE hyp panic at: %016llx!\n", elr + hyp_offset);
+		kvm_err("nVHE hyp panic at: %016llx!\n", elr_virt + hyp_offset);
 	}
 
 	/*
@@ -334,5 +339,5 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
 	kvm_err("Hyp Offset: 0x%llx\n", hyp_offset);
 
 	panic("HYP panic:\nPS:%08llx PC:%016llx ESR:%08llx\nFAR:%016llx HPFAR:%016llx PAR:%016llx\nVCPU:%016lx\n",
-	      spsr, elr, esr, far, hpfar, par, vcpu);
+	      spsr, elr_virt, esr, far, hpfar, par, vcpu);
 }
arch/arm64/kvm/hyp/nvhe/host.S +17 -4
index 2b23400e0fb3..4b652ffb591d 100644
@@ -7,6 +7,7 @@
 #include <linux/linkage.h>
 
 #include <asm/assembler.h>
+#include <asm/kvm_arm.h>
 #include <asm/kvm_asm.h>
 #include <asm/kvm_mmu.h>
 
@@ -85,12 +86,24 @@ SYM_FUNC_START(__hyp_do_panic)
 
 	mov	x29, x0
 
+#ifdef CONFIG_NVHE_EL2_DEBUG
+	/* Ensure host stage-2 is disabled */
+	mrs	x0, hcr_el2
+	bic	x0, x0, #HCR_VM
+	msr	hcr_el2, x0
+	isb
+	tlbi	vmalls12e1
+	dsb	nsh
+#endif
+
 	/* Load the panic arguments into x0-7 */
 	mrs	x0, esr_el2
-	get_vcpu_ptr x4, x5
-	mrs	x5, far_el2
-	mrs	x6, hpfar_el2
-	mov	x7, xzr			// Unused argument
+	mov	x4, x3
+	mov	x3, x2
+	hyp_pa	x3, x6
+	get_vcpu_ptr x5, x6
+	mrs	x6, far_el2
+	mrs	x7, hpfar_el2
 
 	/* Enter the host, conditionally restoring the host context. */
 	cbz	x29, __host_enter_without_restoring
arch/arm64/kvm/reset.c +18 -6
index cba7872d69a8..d010778b93ff 100644
@@ -210,10 +210,16 @@ static bool vcpu_allowed_register_width(struct kvm_vcpu *vcpu)
  */
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
 {
+	struct vcpu_reset_state reset_state;
 	int ret;
 	bool loaded;
 	u32 pstate;
 
+	mutex_lock(&vcpu->kvm->lock);
+	reset_state = vcpu->arch.reset_state;
+	WRITE_ONCE(vcpu->arch.reset_state.reset, false);
+	mutex_unlock(&vcpu->kvm->lock);
+
 	/* Reset PMU outside of the non-preemptible section */
 	kvm_pmu_vcpu_reset(vcpu);
 
@@ -276,8 +282,8 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
 	 * Additional reset state handling that PSCI may have imposed on us.
 	 * Must be done after all the sys_reg reset.
 	 */
-	if (vcpu->arch.reset_state.reset) {
-		unsigned long target_pc = vcpu->arch.reset_state.pc;
+	if (reset_state.reset) {
+		unsigned long target_pc = reset_state.pc;
 
 		/* Gracefully handle Thumb2 entry point */
 		if (vcpu_mode_is_32bit(vcpu) && (target_pc & 1)) {
@@ -286,13 +292,11 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
 		}
 
 		/* Propagate caller endianness */
-		if (vcpu->arch.reset_state.be)
+		if (reset_state.be)
 			kvm_vcpu_set_be(vcpu);
 
 		*vcpu_pc(vcpu) = target_pc;
-		vcpu_set_reg(vcpu, 0, vcpu->arch.reset_state.r0);
-
-		vcpu->arch.reset_state.reset = false;
+		vcpu_set_reg(vcpu, 0, reset_state.r0);
 	}
 
 	/* Reset timer */
@@ -317,6 +321,14 @@ int kvm_set_ipa_limit(void)
 	mmfr0 = read_sanitised_ftr_reg(SYS_ID_AA64MMFR0_EL1);
 	parange = cpuid_feature_extract_unsigned_field(mmfr0,
 				ID_AA64MMFR0_PARANGE_SHIFT);
+	/*
+	 * IPA size beyond 48 bits could not be supported
+	 * on either 4K or 16K page size. Hence let's cap
+	 * it to 48 bits, in case it's reported as larger
+	 * on the system.
+	 */
+	if (PAGE_SIZE != SZ_64K)
+		parange = min(parange, (unsigned int)ID_AA64MMFR0_PARANGE_48);
 
 	/*
 	 * Check with ARMv8.5-GTG that our PAGE_SIZE is supported at
arch/powerpc/kernel/interrupt.c +43 -0

55 lines not on this page · raw message

arch/powerpc/kernel/interrupt_64.S +0 -41

65 lines not on this page · raw message

arch/powerpc/kernel/mce.c +15 -2
index 47a683cd00d2..fd829f7f25a4 100644
@@ -249,6 +249,7 @@ void machine_check_queue_event(void)
 {
 	int index;
 	struct machine_check_event evt;
+	unsigned long msr;
 
 	if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
 		return;
@@ -262,8 +263,20 @@ void machine_check_queue_event(void)
 	memcpy(&local_paca->mce_info->mce_event_queue[index],
 	       &evt, sizeof(evt));
 
-	/* Queue irq work to process this event later. */
-	irq_work_queue(&mce_event_process_work);
+	/*
+	 * Queue irq work to process this event later. Before
+	 * queuing the work enable translation for non radix LPAR,
+	 * as irq_work_queue may try to access memory outside RMO
+	 * region.
+	 */
+	if (!radix_enabled() && firmware_has_feature(FW_FEATURE_LPAR)) {
+		msr = mfmsr();
+		mtmsr(msr | MSR_IR | MSR_DR);
+		irq_work_queue(&mce_event_process_work);
+		mtmsr(msr);
+	} else {
+		irq_work_queue(&mce_event_process_work);
+	}
 }
 
 void mce_common_process_ue(struct pt_regs *regs,
arch/powerpc/kvm/book3s_hv_rmhandlers.S +34 -2
index 8dd437d7a2c6..dd18e1c44751 100644
@@ -2578,7 +2578,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_P9_TM_HV_ASSIST)
 	/* The following code handles the fake_suspend = 1 case */
 	mflr	r0
 	std	r0, PPC_LR_STKOFF(r1)
-	stdu	r1, -PPC_MIN_STKFRM(r1)
+	stdu	r1, -TM_FRAME_SIZE(r1)
 
 	/* Turn on TM. */
 	mfmsr	r8
@@ -2593,10 +2593,42 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_P9_TM_XER_SO_BUG)
 	nop
 
+	/*
+	 * It's possible that treclaim. may modify registers, if we have lost
+	 * track of fake-suspend state in the guest due to it using rfscv.
+	 * Save and restore registers in case this occurs.
+	 */
+	mfspr	r3, SPRN_DSCR
+	mfspr	r4, SPRN_XER
+	mfspr	r5, SPRN_AMR
+	/* SPRN_TAR would need to be saved here if the kernel ever used it */
+	mfcr	r12
+	SAVE_NVGPRS(r1)
+	SAVE_GPR(2, r1)
+	SAVE_GPR(3, r1)
+	SAVE_GPR(4, r1)
+	SAVE_GPR(5, r1)
+	stw	r12, 8(r1)
+	std	r1, HSTATE_HOST_R1(r13)
+
 	/* We have to treclaim here because that's the only way to do S->N */
 	li	r3, TM_CAUSE_KVM_RESCHED
 	TRECLAIM(R3)
 
+	GET_PACA(r13)
+	ld	r1, HSTATE_HOST_R1(r13)
+	REST_GPR(2, r1)
+	REST_GPR(3, r1)
+	REST_GPR(4, r1)
+	REST_GPR(5, r1)
+	lwz	r12, 8(r1)
+	REST_NVGPRS(r1)
+	mtspr	SPRN_DSCR, r3
+	mtspr	SPRN_XER, r4
+	mtspr	SPRN_AMR, r5
+	mtcr	r12
+	HMT_MEDIUM
+
 	/*
 	 * We were in fake suspend, so we are not going to save the
 	 * register state as the guest checkpointed state (since
@@ -2624,7 +2656,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_P9_TM_XER_SO_BUG)
 	std	r5, VCPU_TFHAR(r9)
 	std	r6, VCPU_TFIAR(r9)
 
-	addi	r1, r1, PPC_MIN_STKFRM
+	addi	r1, r1, TM_FRAME_SIZE
 	ld	r0, PPC_LR_STKOFF(r1)
 	mtlr	r0
 	blr
arch/riscv/include/asm/page.h +2 -2
index b0ca5058e7ae..767852ae5e84 100644
@@ -79,8 +79,8 @@ typedef struct page *pgtable_t;
 #endif
 
 #ifdef CONFIG_MMU
-extern unsigned long pfn_base;
-#define ARCH_PFN_OFFSET		(pfn_base)
+extern unsigned long riscv_pfn_base;
+#define ARCH_PFN_OFFSET		(riscv_pfn_base)
 #else
 #define ARCH_PFN_OFFSET		(PAGE_OFFSET >> PAGE_SHIFT)
 #endif /* CONFIG_MMU */
arch/riscv/mm/init.c +3 -3
index 7cb4f391d106..9786100f3a14 100644
@@ -234,8 +234,8 @@ static struct pt_alloc_ops _pt_ops __initdata;
 #define pt_ops _pt_ops
 #endif
 
-unsigned long pfn_base __ro_after_init;
-EXPORT_SYMBOL(pfn_base);
+unsigned long riscv_pfn_base __ro_after_init;
+EXPORT_SYMBOL(riscv_pfn_base);
 
 pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
 pgd_t trampoline_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
@@ -579,7 +579,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
 	kernel_map.va_kernel_pa_offset = kernel_map.virt_addr - kernel_map.phys_addr;
 #endif
 
-	pfn_base = PFN_DOWN(kernel_map.phys_addr);
+	riscv_pfn_base = PFN_DOWN(kernel_map.phys_addr);
 
 	/*
 	 * Enforce boot alignment requirements of RV32 and
arch/s390/net/bpf_jit_comp.c +38 -32

129 lines not on this page · raw message

arch/s390/pci/pci_mmio.c +2 -2
index ae683aa623ac..c5b35ea129cf 100644
@@ -159,7 +159,7 @@ SYSCALL_DEFINE3(s390_pci_mmio_write, unsigned long, mmio_addr,
 
 	mmap_read_lock(current->mm);
 	ret = -EINVAL;
-	vma = find_vma(current->mm, mmio_addr);
+	vma = vma_lookup(current->mm, mmio_addr);
 	if (!vma)
 		goto out_unlock_mmap;
 	if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
@@ -298,7 +298,7 @@ SYSCALL_DEFINE3(s390_pci_mmio_read, unsigned long, mmio_addr,
 
 	mmap_read_lock(current->mm);
 	ret = -EINVAL;
-	vma = find_vma(current->mm, mmio_addr);
+	vma = vma_lookup(current->mm, mmio_addr);
 	if (!vma)
 		goto out_unlock_mmap;
 	if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
arch/x86/include/asm/uaccess.h +2 -2
index c9fa7be3df82..5c95d242f38d 100644
@@ -301,8 +301,8 @@ do {									\
 	unsigned int __gu_low, __gu_high;				\
 	const unsigned int __user *__gu_ptr;				\
 	__gu_ptr = (const void __user *)(ptr);				\
-	__get_user_asm(__gu_low, ptr, "l", "=r", label);		\
-	__get_user_asm(__gu_high, ptr+1, "l", "=r", label);		\
+	__get_user_asm(__gu_low, __gu_ptr, "l", "=r", label);		\
+	__get_user_asm(__gu_high, __gu_ptr+1, "l", "=r", label);	\
 	(x) = ((unsigned long long)__gu_high << 32) | __gu_low;		\
 } while (0)
 #else
arch/x86/kernel/cpu/mce/core.c +32 -11

75 lines not on this page · raw message

arch/x86/mm/init_64.c +3 -3
index ddeaba947eb3..879886c6cc53 100644
@@ -1433,18 +1433,18 @@ int kern_addr_valid(unsigned long addr)
 		return 0;
 
 	p4d = p4d_offset(pgd, addr);
-	if (p4d_none(*p4d))
+	if (!p4d_present(*p4d))
 		return 0;
 
 	pud = pud_offset(p4d, addr);
-	if (pud_none(*pud))
+	if (!pud_present(*pud))
 		return 0;
 
 	if (pud_large(*pud))
 		return pfn_valid(pud_pfn(*pud));
 
 	pmd = pmd_offset(pud, addr);
-	if (pmd_none(*pmd))
+	if (!pmd_present(*pmd))
 		return 0;
 
 	if (pmd_large(*pmd))
arch/x86/mm/pat/memtype.c +6 -1
index 3112ca7786ed..4ba2a3ee4bce 100644
@@ -583,7 +583,12 @@ int memtype_reserve(u64 start, u64 end, enum page_cache_mode req_type,
 	int err = 0;
 
 	start = sanitize_phys(start);
-	end = sanitize_phys(end);
+
+	/*
+	 * The end address passed into this function is exclusive, but
+	 * sanitize_phys() expects an inclusive address.
+	 */
+	end = sanitize_phys(end - 1) + 1;
 	if (start >= end) {
 		WARN(1, "%s failed: [mem %#010Lx-%#010Lx], req %s\n", __func__,
 				start, end - 1, cattr_name(req_type));
arch/x86/xen/enlighten_pv.c +7 -0
index 03149422dce2..475d9c71b171 100644
@@ -1215,6 +1215,11 @@ static void __init xen_dom0_set_legacy_features(void)
 	x86_platform.legacy.rtc = 1;
 }
 
+static void __init xen_domu_set_legacy_features(void)
+{
+	x86_platform.legacy.rtc = 0;
+}
+
 /* First C function to be called on Xen boot */
 asmlinkage __visible void __init xen_start_kernel(void)
 {
@@ -1367,6 +1372,8 @@ asmlinkage __visible void __init xen_start_kernel(void)
 		add_preferred_console("xenboot", 0, NULL);
 		if (pci_xen)
 			x86_init.pci.arch_init = pci_xen_init;
+		x86_platform.set_legacy_features =
+				xen_domu_set_legacy_features;
 	} else {
 		const struct dom0_vga_console_info *info =
 			(void *)((char *)xen_start_info +
arch/x86/xen/mmu_pv.c +5 -2
index ade789e73ee4..167c4958cdf4 100644
@@ -1518,14 +1518,17 @@ static inline void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn,
 	if (pinned) {
 		struct page *page = pfn_to_page(pfn);
 
-		if (static_branch_likely(&xen_struct_pages_ready))
+		pinned = false;
+		if (static_branch_likely(&xen_struct_pages_ready)) {
+			pinned = PagePinned(page);
 			SetPagePinned(page);
+		}
 
 		xen_mc_batch();
 
 		__set_pfn_prot(pfn, PAGE_KERNEL_RO);
 
-		if (level == PT_PTE && USE_SPLIT_PTE_PTLOCKS)
+		if (level == PT_PTE && USE_SPLIT_PTE_PTLOCKS && !pinned)
 			__pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn);
 
 		xen_mc_issue(PARAVIRT_LAZY_MMU);
block/bfq-iosched.c +13 -3
index 9360c65169ff..3a1038b6eeb3 100644
@@ -2662,6 +2662,15 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
 	 * are likely to increase the throughput.
 	 */
 	bfqq->new_bfqq = new_bfqq;
+	/*
+	 * The above assignment schedules the following redirections:
+	 * each time some I/O for bfqq arrives, the process that
+	 * generated that I/O is disassociated from bfqq and
+	 * associated with new_bfqq. Here we increases new_bfqq->ref
+	 * in advance, adding the number of processes that are
+	 * expected to be associated with new_bfqq as they happen to
+	 * issue I/O.
+	 */
 	new_bfqq->ref += process_refs;
 	return new_bfqq;
 }
@@ -2724,6 +2733,10 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
 {
 	struct bfq_queue *in_service_bfqq, *new_bfqq;
 
+	/* if a merge has already been setup, then proceed with that first */
+	if (bfqq->new_bfqq)
+		return bfqq->new_bfqq;
+
 	/*
 	 * Check delayed stable merge for rotational or non-queueing
 	 * devs. For this branch to be executed, bfqq must not be
@@ -2825,9 +2838,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
 	if (bfq_too_late_for_merging(bfqq))
 		return NULL;
 
-	if (bfqq->new_bfqq)
-		return bfqq->new_bfqq;
-
 	if (!io_struct || unlikely(bfqq == &bfqd->oom_bfqq))
 		return NULL;
 
block/blk-cgroup.c +6 -4
index 31fe9be179d9..26446f97deee 100644
@@ -1201,10 +1201,6 @@ int blkcg_init_queue(struct request_queue *q)
 	if (preloaded)
 		radix_tree_preload_end();
 
-	ret = blk_iolatency_init(q);
-	if (ret)
-		goto err_destroy_all;
-
 	ret = blk_ioprio_init(q);
 	if (ret)
 		goto err_destroy_all;
@@ -1213,6 +1209,12 @@ int blkcg_init_queue(struct request_queue *q)
 	if (ret)
 		goto err_destroy_all;
 
+	ret = blk_iolatency_init(q);
+	if (ret) {
+		blk_throtl_exit(q);
+		goto err_destroy_all;
+	}
+
 	return 0;
 
 err_destroy_all:
drivers/base/power/trace.c +10 -0
index a97f33d0c59f..94665037f4a3 100644
@@ -13,6 +13,7 @@
 #include <linux/export.h>
 #include <linux/rtc.h>
 #include <linux/suspend.h>
+#include <linux/init.h>
 
 #include <linux/mc146818rtc.h>
 
@@ -165,6 +166,9 @@ void generate_pm_trace(const void *tracedata, unsigned int user)
 	const char *file = *(const char **)(tracedata + 2);
 	unsigned int user_hash_value, file_hash_value;
 
+	if (!x86_platform.legacy.rtc)
+		return;
+
 	user_hash_value = user % USERHASH;
 	file_hash_value = hash_string(lineno, file, FILEHASH);
 	set_magic_time(user_hash_value, file_hash_value, dev_hash_value);
@@ -267,6 +271,9 @@ static struct notifier_block pm_trace_nb = {
 
 static int __init early_resume_init(void)
 {
+	if (!x86_platform.legacy.rtc)
+		return 0;
+
 	hash_value_early_read = read_magic_time();
 	register_pm_notifier(&pm_trace_nb);
 	return 0;
@@ -277,6 +284,9 @@ static int __init late_resume_init(void)
 	unsigned int val = hash_value_early_read;
 	unsigned int user, file, dev;
 
+	if (!x86_platform.legacy.rtc)
+		return 0;
+
 	user = val % USERHASH;
 	val = val / USERHASH;
 	file = val % FILEHASH;
drivers/block/loop.c +49 -26

156 lines not on this page · raw message

drivers/block/loop.h +1 -0
index 1988899db63a..04c88dd6eabd 100644
@@ -68,6 +68,7 @@ struct loop_device {
 	struct blk_mq_tag_set	tag_set;
 	struct gendisk		*lo_disk;
 	struct mutex		lo_mutex;
+	bool			idr_visible;
 };
 
 struct loop_cmd {
drivers/gpio/gpio-mpc8xxx.c +5 -8
index 50b321a1ab1b..d574e8cb6d7c 100644
@@ -332,7 +332,7 @@ static int mpc8xxx_probe(struct platform_device *pdev)
 				 mpc8xxx_gc->regs + GPIO_DIR, NULL,
 				 BGPIOF_BIG_ENDIAN);
 		if (ret)
-			goto err;
+			return ret;
 		dev_dbg(&pdev->dev, "GPIO registers are LITTLE endian\n");
 	} else {
 		ret = bgpio_init(gc, &pdev->dev, 4,
@@ -342,7 +342,7 @@ static int mpc8xxx_probe(struct platform_device *pdev)
 				 BGPIOF_BIG_ENDIAN
 				 | BGPIOF_BIG_ENDIAN_BYTE_ORDER);
 		if (ret)
-			goto err;
+			return ret;
 		dev_dbg(&pdev->dev, "GPIO registers are BIG endian\n");
 	}
 
@@ -380,11 +380,11 @@ static int mpc8xxx_probe(struct platform_device *pdev)
 	    is_acpi_node(fwnode))
 		gc->write_reg(mpc8xxx_gc->regs + GPIO_IBE, 0xffffffff);
 
-	ret = gpiochip_add_data(gc, mpc8xxx_gc);
+	ret = devm_gpiochip_add_data(&pdev->dev, gc, mpc8xxx_gc);
 	if (ret) {
 		dev_err(&pdev->dev,
 			"GPIO chip registration failed with status %d\n", ret);
-		goto err;
+		return ret;
 	}
 
 	mpc8xxx_gc->irqn = platform_get_irq(pdev, 0);
@@ -416,7 +416,7 @@ static int mpc8xxx_probe(struct platform_device *pdev)
 
 	return 0;
 err:
-	iounmap(mpc8xxx_gc->regs);
+	irq_domain_remove(mpc8xxx_gc->irq);
 	return ret;
 }
 
@@ -429,9 +429,6 @@ static int mpc8xxx_remove(struct platform_device *pdev)
 		irq_domain_remove(mpc8xxx_gc->irq);
 	}
 
-	gpiochip_remove(&mpc8xxx_gc->gc);
-	iounmap(mpc8xxx_gc->regs);
-
 	return 0;
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
index 8ac6eb9f1fdb..177a663a6a69 100644
@@ -757,7 +757,7 @@ enum amd_hw_ip_block_type {
 	MAX_HWIP
 };
 
-#define HWIP_MAX_INSTANCE	8
+#define HWIP_MAX_INSTANCE	10
 
 struct amd_powerplay {
 	void *pp_handle;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +10 -0
index f9c01bdc3d4c..ec472c244835 100644
@@ -191,6 +191,16 @@ void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm)
 		kgd2kfd_suspend(adev->kfd.dev, run_pm);
 }
 
+int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev)
+{
+	int r = 0;
+
+	if (adev->kfd.dev)
+		r = kgd2kfd_resume_iommu(adev->kfd.dev);
+
+	return r;
+}
+
 int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm)
 {
 	int r = 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +7 -0
index cf62f43a03da..293dd0d595c7 100644
@@ -137,6 +137,7 @@ int amdgpu_amdkfd_init(void);
 void amdgpu_amdkfd_fini(void);
 
 void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm);
+int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev);
 int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm);
 void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev,
 			const void *ih_ring_entry);
@@ -325,6 +326,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
 			 const struct kgd2kfd_shared_resources *gpu_resources);
 void kgd2kfd_device_exit(struct kfd_dev *kfd);
 void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm);
+int kgd2kfd_resume_iommu(struct kfd_dev *kfd);
 int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm);
 int kgd2kfd_pre_reset(struct kfd_dev *kfd);
 int kgd2kfd_post_reset(struct kfd_dev *kfd);
@@ -363,6 +365,11 @@ static inline void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm)
 {
 }
 
+static int __maybe_unused kgd2kfd_resume_iommu(struct kfd_dev *kfd)
+{
+	return 0;
+}
+
 static inline int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm)
 {
 	return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +4 -6
index 536005bff24a..83db7d8fa150 100644
@@ -1544,20 +1544,18 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
 	struct dentry *ent;
 	int r, i;
 
-
-
 	ent = debugfs_create_file("amdgpu_preempt_ib", 0600, root, adev,
 				  &fops_ib_preempt);
-	if (!ent) {
+	if (IS_ERR(ent)) {
 		DRM_ERROR("unable to create amdgpu_preempt_ib debugsfs file\n");
-		return -EIO;
+		return PTR_ERR(ent);
 	}
 
 	ent = debugfs_create_file("amdgpu_force_sclk", 0200, root, adev,
 				  &fops_sclk_set);
-	if (!ent) {
+	if (IS_ERR(ent)) {
 		DRM_ERROR("unable to create amdgpu_set_sclk debugsfs file\n");
-		return -EIO;
+		return PTR_ERR(ent);
 	}
 
 	/* Register debugfs entries for amdgpu_ttm */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +12 -0
index f944ed858f3e..7b42636fc7dc 100644
@@ -2342,6 +2342,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
 	if (r)
 		goto init_failed;
 
+	r = amdgpu_amdkfd_resume_iommu(adev);
+	if (r)
+		goto init_failed;
+
 	r = amdgpu_device_ip_hw_init_phase1(adev);
 	if (r)
 		goto init_failed;
@@ -3096,6 +3100,10 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
 {
 	int r;
 
+	r = amdgpu_amdkfd_resume_iommu(adev);
+	if (r)
+		return r;
+
 	r = amdgpu_device_ip_resume_phase1(adev);
 	if (r)
 		return r;
@@ -4534,6 +4542,10 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
 				dev_warn(tmp_adev->dev, "asic atom init failed!");
 			} else {
 				dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n");
+				r = amdgpu_amdkfd_resume_iommu(tmp_adev);
+				if (r)
+					goto out;
+
 				r = amdgpu_device_ip_resume_phase1(tmp_adev);
 				if (r)
 					goto out;
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +2 -2
index 7b634a1517f9..0554576d3695 100644
@@ -428,8 +428,8 @@ int amdgpu_debugfs_ring_init(struct amdgpu_device *adev,
 	ent = debugfs_create_file(name,
 				  S_IFREG | S_IRUGO, root,
 				  ring, &amdgpu_debugfs_ring_fops);
-	if (!ent)
-		return -ENOMEM;
+	if (IS_ERR(ent))
+		return PTR_ERR(ent);
 
 	i_size_write(ent->d_inode, ring->ring_size + 12);
 	ring->ent = ent;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +9 -9
index 3a55f08e00e1..2335b596d892 100644
@@ -513,6 +513,15 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
 		goto out;
 	}
 
+	if (bo->type == ttm_bo_type_device &&
+	    new_mem->mem_type == TTM_PL_VRAM &&
+	    old_mem->mem_type != TTM_PL_VRAM) {
+		/* amdgpu_bo_fault_reserve_notify will re-set this if the CPU
+		 * accesses the BO after it's moved.
+		 */
+		abo->flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
+	}
+
 	if (adev->mman.buffer_funcs_enabled) {
 		if (((old_mem->mem_type == TTM_PL_SYSTEM &&
 		      new_mem->mem_type == TTM_PL_VRAM) ||
@@ -543,15 +552,6 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
 			return r;
 	}
 
-	if (bo->type == ttm_bo_type_device &&
-	    new_mem->mem_type == TTM_PL_VRAM &&
-	    old_mem->mem_type != TTM_PL_VRAM) {
-		/* amdgpu_bo_fault_reserve_notify will re-set this if the CPU
-		 * accesses the BO after it's moved.
-		 */
-		abo->flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
-	}
-
 out:
 	/* update statistics */
 	atomic64_add(bo->base.size, &adev->num_bytes_moved);
drivers/gpu/drm/amd/amdkfd/kfd_device.c +8 -4
index 6b57dfd2cd2a..9e52948d4992 100644
@@ -1008,17 +1008,21 @@ int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm)
 	return ret;
 }
 
-static int kfd_resume(struct kfd_dev *kfd)
+int kgd2kfd_resume_iommu(struct kfd_dev *kfd)
 {
 	int err = 0;
 
 	err = kfd_iommu_resume(kfd);
-	if (err) {
+	if (err)
 		dev_err(kfd_device,
 			"Failed to resume IOMMU for device %x:%x\n",
 			kfd->pdev->vendor, kfd->pdev->device);
-		return err;
-	}
+	return err;
+}
+
+static int kfd_resume(struct kfd_dev *kfd)
+{
+	int err = 0;
 
 	err = kfd->dqm->ops.start(kfd->dqm);
 	if (err) {
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +18 -6
index 3f913e4abd49..6a4c6c47dcfa 100644
@@ -998,6 +998,8 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
 	uint32_t agp_base, agp_bot, agp_top;
 	PHYSICAL_ADDRESS_LOC page_table_start, page_table_end, page_table_base;
 
+	memset(pa_config, 0, sizeof(*pa_config));
+
 	logical_addr_low  = min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18;
 	pt_base = amdgpu_gmc_pd_addr(adev->gart.bo);
 
@@ -6778,14 +6780,15 @@ const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs = {
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
-					    struct dc_state *dc_state)
+					    struct dc_state *dc_state,
+					    struct dsc_mst_fairness_vars *vars)
 {
 	struct dc_stream_state *stream = NULL;
 	struct drm_connector *connector;
 	struct drm_connector_state *new_con_state;
 	struct amdgpu_dm_connector *aconnector;
 	struct dm_connector_state *dm_conn_state;
-	int i, j, clock, bpp;
+	int i, j, clock;
 	int vcpi, pbn_div, pbn = 0;
 
 	for_each_new_connector_in_state(state, connector, new_con_state, i) {
@@ -6824,9 +6827,15 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
 		}
 
 		pbn_div = dm_mst_get_pbn_divider(stream->link);
-		bpp = stream->timing.dsc_cfg.bits_per_pixel;
 		clock = stream->timing.pix_clk_100hz / 10;
-		pbn = drm_dp_calc_pbn_mode(clock, bpp, true);
+		/* pbn is calculated by compute_mst_dsc_configs_for_state*/
+		for (j = 0; j < dc_state->stream_count; j++) {
+			if (vars[j].aconnector == aconnector) {
+				pbn = vars[j].pbn;
+				break;
+			}
+		}
+
 		vcpi = drm_dp_mst_atomic_enable_dsc(state,
 						    aconnector->port,
 						    pbn, pbn_div,
@@ -10208,6 +10217,9 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 	int ret, i;
 	bool lock_and_validation_needed = false;
 	struct dm_crtc_state *dm_old_crtc_state;
+#if defined(CONFIG_DRM_AMD_DC_DCN)
+	struct dsc_mst_fairness_vars vars[MAX_PIPES];
+#endif
 
 	trace_amdgpu_dm_atomic_check_begin(state);
 
@@ -10438,10 +10450,10 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 			goto fail;
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
-		if (!compute_mst_dsc_configs_for_state(state, dm_state->context))
+		if (!compute_mst_dsc_configs_for_state(state, dm_state->context, vars))
 			goto fail;
 
-		ret = dm_update_mst_vcpi_slots_for_dsc(state, dm_state->context);
+		ret = dm_update_mst_vcpi_slots_for_dsc(state, dm_state->context, vars);
 		if (ret)
 			goto fail;
 #endif
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +8 -10
index 5568d4e518e6..a2e5ab0bd1a0 100644
@@ -495,12 +495,7 @@ struct dsc_mst_fairness_params {
 	uint32_t num_slices_h;
 	uint32_t num_slices_v;
 	uint32_t bpp_overwrite;
-};
-
-struct dsc_mst_fairness_vars {
-	int pbn;
-	bool dsc_enabled;
-	int bpp_x16;
+	struct amdgpu_dm_connector *aconnector;
 };
 
 static int kbps_to_peak_pbn(int kbps)
@@ -727,12 +722,12 @@ static void try_disable_dsc(struct drm_atomic_state *state,
 
 static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 					     struct dc_state *dc_state,
-					     struct dc_link *dc_link)
+					     struct dc_link *dc_link,
+					     struct dsc_mst_fairness_vars *vars)
 {
 	int i;
 	struct dc_stream_state *stream;
 	struct dsc_mst_fairness_params params[MAX_PIPES];
-	struct dsc_mst_fairness_vars vars[MAX_PIPES];
 	struct amdgpu_dm_connector *aconnector;
 	int count = 0;
 	bool debugfs_overwrite = false;
@@ -753,6 +748,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 		params[count].timing = &stream->timing;
 		params[count].sink = stream->sink;
 		aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
+		params[count].aconnector = aconnector;
 		params[count].port = aconnector->port;
 		params[count].clock_force_enable = aconnector->dsc_settings.dsc_force_enable;
 		if (params[count].clock_force_enable == DSC_CLK_FORCE_ENABLE)
@@ -775,6 +771,7 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 	}
 	/* Try no compression */
 	for (i = 0; i < count; i++) {
+		vars[i].aconnector = params[i].aconnector;
 		vars[i].pbn = kbps_to_peak_pbn(params[i].bw_range.stream_kbps);
 		vars[i].dsc_enabled = false;
 		vars[i].bpp_x16 = 0;
@@ -828,7 +825,8 @@ static bool compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 }
 
 bool compute_mst_dsc_configs_for_state(struct drm_atomic_state *state,
-				       struct dc_state *dc_state)
+				       struct dc_state *dc_state,
+				       struct dsc_mst_fairness_vars *vars)
 {
 	int i, j;
 	struct dc_stream_state *stream;
@@ -859,7 +857,7 @@ bool compute_mst_dsc_configs_for_state(struct drm_atomic_state *state,
 			return false;
 
 		mutex_lock(&aconnector->mst_mgr.lock);
-		if (!compute_mst_dsc_configs_for_link(state, dc_state, stream->link)) {
+		if (!compute_mst_dsc_configs_for_link(state, dc_state, stream->link, vars)) {
 			mutex_unlock(&aconnector->mst_mgr.lock);
 			return false;
 		}
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h +10 -1
index b38bd68121ce..900d3f7a8498 100644
@@ -39,8 +39,17 @@ void
 dm_dp_create_fake_mst_encoders(struct amdgpu_device *adev);
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
+
+struct dsc_mst_fairness_vars {
+	int pbn;
+	bool dsc_enabled;
+	int bpp_x16;
+	struct amdgpu_dm_connector *aconnector;
+};
+
 bool compute_mst_dsc_configs_for_state(struct drm_atomic_state *state,
-				       struct dc_state *dc_state);
+				       struct dc_state *dc_state,
+				       struct dsc_mst_fairness_vars *vars);
 #endif
 
 #endif
drivers/gpu/drm/amd/display/dc/core/dc_link.c +12 -4
index 6132b645bfd1..29c861b54b44 100644
@@ -2578,13 +2578,21 @@ static struct abm *get_abm_from_stream_res(const struct dc_link *link)
 
 int dc_link_get_backlight_level(const struct dc_link *link)
 {
-
 	struct abm *abm = get_abm_from_stream_res(link);
+	struct panel_cntl *panel_cntl = link->panel_cntl;
+	struct dc  *dc = link->ctx->dc;
+	struct dmcu *dmcu = dc->res_pool->dmcu;
+	bool fw_set_brightness = true;
 
-	if (abm == NULL || abm->funcs->get_current_backlight == NULL)
-		return DC_ERROR_UNEXPECTED;
+	if (dmcu)
+		fw_set_brightness = dmcu->funcs->is_dmcu_initialized(dmcu);
 
-	return (int) abm->funcs->get_current_backlight(abm);
+	if (!fw_set_brightness && panel_cntl->funcs->get_current_backlight)
+		return panel_cntl->funcs->get_current_backlight(panel_cntl);
+	else if (abm != NULL && abm->funcs->get_current_backlight != NULL)
+		return (int) abm->funcs->get_current_backlight(abm);
+	else
+		return DC_ERROR_UNEXPECTED;
 }
 
 int dc_link_get_target_backlight_pwm(const struct dc_link *link)
drivers/gpu/drm/amd/display/dc/dce/dce_panel_cntl.c +0 -10
index e92339235863..e8570060d007 100644
@@ -49,7 +49,6 @@
 static unsigned int dce_get_16_bit_backlight_from_pwm(struct panel_cntl *panel_cntl)
 {
 	uint64_t current_backlight;
-	uint32_t round_result;
 	uint32_t bl_period, bl_int_count;
 	uint32_t bl_pwm, fractional_duty_cycle_en;
 	uint32_t bl_period_mask, bl_pwm_mask;
@@ -84,15 +83,6 @@ static unsigned int dce_get_16_bit_backlight_from_pwm(struct panel_cntl *panel_c
 	current_backlight = div_u64(current_backlight, bl_period);
 	current_backlight = (current_backlight + 1) >> 1;
 
-	current_backlight = (uint64_t)(current_backlight) * bl_period;
-
-	round_result = (uint32_t)(current_backlight & 0xFFFFFFFF);
-
-	round_result = (round_result >> (bl_int_count-1)) & 1;
-
-	current_backlight >>= bl_int_count;
-	current_backlight += round_result;
-
 	return (uint32_t)(current_backlight);
 }
 
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -1
index ebe672142808..42e72a16a112 100644
@@ -1381,7 +1381,7 @@ static int smu_disable_dpms(struct smu_context *smu)
 	 */
 	if (smu->uploading_custom_pp_table &&
 	    (adev->asic_type >= CHIP_NAVI10) &&
-	    (adev->asic_type <= CHIP_DIMGREY_CAVEFISH))
+	    (adev->asic_type <= CHIP_BEIGE_GOBY))
 		return smu_disable_all_features_with_exception(smu,
 							       true,
 							       SMU_FEATURE_COUNT);
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +22 -2
index 1ba42b69ce74..23ada41351ad 100644
@@ -2269,7 +2269,27 @@ static int navi10_baco_enter(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	if (adev->in_runpm)
+	/*
+	 * This aims the case below:
+	 *   amdgpu driver loaded -> runpm suspend kicked -> sound driver loaded
+	 *
+	 * For NAVI10 and later ASICs, we rely on PMFW to handle the runpm. To
+	 * make that possible, PMFW needs to acknowledge the dstate transition
+	 * process for both gfx(function 0) and audio(function 1) function of
+	 * the ASIC.
+	 *
+	 * The PCI device's initial runpm status is RUNPM_SUSPENDED. So as the
+	 * device representing the audio function of the ASIC. And that means
+	 * even if the sound driver(snd_hda_intel) was not loaded yet, it's still
+	 * possible runpm suspend kicked on the ASIC. However without the dstate
+	 * transition notification from audio function, pmfw cannot handle the
+	 * BACO in/exit correctly. And that will cause driver hang on runpm
+	 * resuming.
+	 *
+	 * To address this, we revert to legacy message way(driver masters the
+	 * timing for BACO in/exit) on sound driver missing.
+	 */
+	if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
 		return smu_v11_0_baco_set_armd3_sequence(smu, BACO_SEQ_BACO);
 	else
 		return smu_v11_0_baco_enter(smu);
@@ -2279,7 +2299,7 @@ static int navi10_baco_exit(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	if (adev->in_runpm) {
+	if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev)) {
 		/* Wait for PMFW handling for the Dstate change */
 		msleep(10);
 		return smu_v11_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +2 -2
index d92dd2c7448e..9b170bd12c1b 100644
@@ -2133,7 +2133,7 @@ static int sienna_cichlid_baco_enter(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	if (adev->in_runpm)
+	if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
 		return smu_v11_0_baco_set_armd3_sequence(smu, BACO_SEQ_BACO);
 	else
 		return smu_v11_0_baco_enter(smu);
@@ -2143,7 +2143,7 @@ static int sienna_cichlid_baco_exit(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	if (adev->in_runpm) {
+	if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev)) {
 		/* Wait for PMFW handling for the Dstate change */
 		msleep(10);
 		return smu_v11_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +21 -0
index 415be74df28c..54881cce1b06 100644
@@ -1053,3 +1053,24 @@ int smu_cmn_set_mp1_state(struct smu_context *smu,
 
 	return ret;
 }
+
+bool smu_cmn_is_audio_func_enabled(struct amdgpu_device *adev)
+{
+	struct pci_dev *p = NULL;
+	bool snd_driver_loaded;
+
+	/*
+	 * If the ASIC comes with no audio function, we always assume
+	 * it is "enabled".
+	 */
+	p = pci_get_domain_bus_and_slot(pci_domain_nr(adev->pdev->bus),
+			adev->pdev->bus->number, 1);
+	if (!p)
+		return true;
+
+	snd_driver_loaded = pci_is_enabled(p) ? true : false;
+
+	pci_dev_put(p);
+
+	return snd_driver_loaded;
+}
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h +2 -0
index 16993daa2ae0..b1d41360a389 100644
@@ -110,5 +110,7 @@ void smu_cmn_init_soft_gpu_metrics(void *table, uint8_t frev, uint8_t crev);
 int smu_cmn_set_mp1_state(struct smu_context *smu,
 			  enum pp_mp1_state mp1_state);
 
+bool smu_cmn_is_audio_func_enabled(struct amdgpu_device *adev);
+
 #endif
 #endif
drivers/gpu/drm/etnaviv/etnaviv_buffer.c +1 -2
index 76d38561c910..cf741c5c82d2 100644
@@ -397,8 +397,7 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
 		if (switch_mmu_context) {
 			struct etnaviv_iommu_context *old_context = gpu->mmu_context;
 
-			etnaviv_iommu_context_get(mmu_context);
-			gpu->mmu_context = mmu_context;
+			gpu->mmu_context = etnaviv_iommu_context_get(mmu_context);
 			etnaviv_iommu_context_put(old_context);
 		}
 
drivers/gpu/drm/etnaviv/etnaviv_gem.c +1 -2
index b8fa6ed3dd73..fb7a33b88fc0 100644
@@ -303,8 +303,7 @@ struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
 		list_del(&mapping->obj_node);
 	}
 
-	etnaviv_iommu_context_get(mmu_context);
-	mapping->context = mmu_context;
+	mapping->context = etnaviv_iommu_context_get(mmu_context);
 	mapping->use = 1;
 
 	ret = etnaviv_iommu_map_gem(mmu_context, etnaviv_obj,
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c +1 -2
index 4dd7d9d541c0..486259e154af 100644
@@ -532,8 +532,7 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
 		goto err_submit_objects;
 
 	submit->ctx = file->driver_priv;
-	etnaviv_iommu_context_get(submit->ctx->mmu);
-	submit->mmu_context = submit->ctx->mmu;
+	submit->mmu_context = etnaviv_iommu_context_get(submit->ctx->mmu);
 	submit->exec_state = args->exec_state;
 	submit->flags = args->flags;
 
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +25 -18

100 lines not on this page · raw message

drivers/gpu/drm/etnaviv/etnaviv_gpu.h +1 -0
index 8ea48697d132..1c75c8ed5bce 100644
@@ -101,6 +101,7 @@ struct etnaviv_gpu {
 	struct workqueue_struct *wq;
 	struct drm_gpu_scheduler sched;
 	bool initialized;
+	bool fe_running;
 
 	/* 'ring'-buffer: */
 	struct etnaviv_cmdbuf buffer;
drivers/gpu/drm/etnaviv/etnaviv_iommu.c +4 -0
index 1a7c89a67bea..afe5dd6a9925 100644
@@ -92,6 +92,10 @@ static void etnaviv_iommuv1_restore(struct etnaviv_gpu *gpu,
 	struct etnaviv_iommuv1_context *v1_context = to_v1_context(context);
 	u32 pgtable;
 
+	if (gpu->mmu_context)
+		etnaviv_iommu_context_put(gpu->mmu_context);
+	gpu->mmu_context = etnaviv_iommu_context_get(context);
+
 	/* set base addresses */
 	gpu_write(gpu, VIVS_MC_MEMORY_BASE_ADDR_RA, context->global->memory_base);
 	gpu_write(gpu, VIVS_MC_MEMORY_BASE_ADDR_FE, context->global->memory_base);
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c +8 -0
index f8bf488e9d71..d664ae29ae20 100644
@@ -172,6 +172,10 @@ static void etnaviv_iommuv2_restore_nonsec(struct etnaviv_gpu *gpu,
 	if (gpu_read(gpu, VIVS_MMUv2_CONTROL) & VIVS_MMUv2_CONTROL_ENABLE)
 		return;
 
+	if (gpu->mmu_context)
+		etnaviv_iommu_context_put(gpu->mmu_context);
+	gpu->mmu_context = etnaviv_iommu_context_get(context);
+
 	prefetch = etnaviv_buffer_config_mmuv2(gpu,
 				(u32)v2_context->mtlb_dma,
 				(u32)context->global->bad_page_dma);
@@ -192,6 +196,10 @@ static void etnaviv_iommuv2_restore_sec(struct etnaviv_gpu *gpu,
 	if (gpu_read(gpu, VIVS_MMUv2_SEC_CONTROL) & VIVS_MMUv2_SEC_CONTROL_ENABLE)
 		return;
 
+	if (gpu->mmu_context)
+		etnaviv_iommu_context_put(gpu->mmu_context);
+	gpu->mmu_context = etnaviv_iommu_context_get(context);
+
 	gpu_write(gpu, VIVS_MMUv2_PTA_ADDRESS_LOW,
 		  lower_32_bits(context->global->v2.pta_dma));
 	gpu_write(gpu, VIVS_MMUv2_PTA_ADDRESS_HIGH,
drivers/gpu/drm/etnaviv/etnaviv_mmu.c +1 -0
index dab1b58006d8..9fb1a2aadbcb 100644
@@ -199,6 +199,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,
 		 */
 		list_for_each_entry_safe(m, n, &list, scan_node) {
 			etnaviv_iommu_remove_mapping(context, m);
+			etnaviv_iommu_context_put(m->context);
 			m->context = NULL;
 			list_del_init(&m->mmu_node);
 			list_del_init(&m->scan_node);
drivers/gpu/drm/etnaviv/etnaviv_mmu.h +3 -1
index d1d6902fd13b..e4a0b7d09c2e 100644
@@ -105,9 +105,11 @@ void etnaviv_iommu_dump(struct etnaviv_iommu_context *ctx, void *buf);
 struct etnaviv_iommu_context *
 etnaviv_iommu_context_init(struct etnaviv_iommu_global *global,
 			   struct etnaviv_cmdbuf_suballoc *suballoc);
-static inline void etnaviv_iommu_context_get(struct etnaviv_iommu_context *ctx)
+static inline struct etnaviv_iommu_context *
+etnaviv_iommu_context_get(struct etnaviv_iommu_context *ctx)
 {
 	kref_get(&ctx->refcount);
+	return ctx;
 }
 void etnaviv_iommu_context_put(struct etnaviv_iommu_context *ctx);
 void etnaviv_iommu_restore(struct etnaviv_gpu *gpu,
drivers/gpu/drm/i915/display/intel_dp.c +4 -1
index 862c1df69cc2..d511e578ba79 100644
@@ -2453,11 +2453,14 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
 	 */
 	if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
 			     intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
-			     sizeof(intel_dp->edp_dpcd))
+			     sizeof(intel_dp->edp_dpcd)) {
 		drm_dbg_kms(&dev_priv->drm, "eDP DPCD: %*ph\n",
 			    (int)sizeof(intel_dp->edp_dpcd),
 			    intel_dp->edp_dpcd);
 
+		intel_dp->use_max_params = intel_dp->edp_dpcd[0] < DP_EDP_14;
+	}
+
 	/*
 	 * This has to be called after intel_dp->edp_dpcd is filled, PSR checks
 	 * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]
drivers/gpu/drm/i915/display/intel_dp_link_training.c +1 -1
index 053a3c2f7267..508a514c5e37 100644
@@ -848,7 +848,7 @@ intel_dp_link_train_all_phys(struct intel_dp *intel_dp,
 	}
 
 	if (ret)
-		intel_dp_link_train_phy(intel_dp, crtc_state, DP_PHY_DPRX);
+		ret = intel_dp_link_train_phy(intel_dp, crtc_state, DP_PHY_DPRX);
 
 	if (intel_dp->set_idle_link_train)
 		intel_dp->set_idle_link_train(intel_dp, crtc_state);
drivers/gpu/drm/radeon/radeon_kms.c +1 -1
index 0473583dcdac..482fb0ae6cb5 100644
@@ -119,7 +119,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 #endif
 
 	if (pci_find_capability(pdev, PCI_CAP_ID_AGP))
-		rdev->agp = radeon_agp_head_init(rdev->ddev);
+		rdev->agp = radeon_agp_head_init(dev);
 	if (rdev->agp) {
 		rdev->agp->agp_mtrr = arch_phys_wc_add(
 			rdev->agp->agp_info.aper_base,
drivers/gpu/drm/rockchip/cdn-dp-core.c +1 -1
index 8ab3247dbc4a..13c6b857158f 100644
@@ -1123,7 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
 	return ret;
 }
 
-static int cdn_dp_resume(struct device *dev)
+static __maybe_unused int cdn_dp_resume(struct device *dev)
 {
 	struct cdn_dp_device *dp = dev_get_drvdata(dev);
 
drivers/hv/ring_buffer.c +1 -0
index 2aee356840a2..314015d9e912 100644
@@ -245,6 +245,7 @@ void hv_ringbuffer_cleanup(struct hv_ring_buffer_info *ring_info)
 	mutex_unlock(&ring_info->ring_buffer_mutex);
 
 	kfree(ring_info->pkt_buffer);
+	ring_info->pkt_buffer = NULL;
 	ring_info->pkt_buffer_size = 0;
 }
 
drivers/mfd/ab8500-core.c +1 -1
index 30489670ea52..cca0aac26148 100644
@@ -485,7 +485,7 @@ static int ab8500_handle_hierarchical_line(struct ab8500 *ab8500,
 		if (line == AB8540_INT_GPIO43F || line == AB8540_INT_GPIO44F)
 			line += 1;
 
-		handle_nested_irq(irq_create_mapping(ab8500->domain, line));
+		handle_nested_irq(irq_find_mapping(ab8500->domain, line));
 	}
 
 	return 0;
drivers/mfd/axp20x.c +2 -1
index 4145a38b3890..d0ac019850d1 100644
@@ -125,12 +125,13 @@ static const struct regmap_range axp288_writeable_ranges[] = {
 
 static const struct regmap_range axp288_volatile_ranges[] = {
 	regmap_reg_range(AXP20X_PWR_INPUT_STATUS, AXP288_POWER_REASON),
+	regmap_reg_range(AXP22X_PWR_OUT_CTRL1, AXP22X_ALDO3_V_OUT),
 	regmap_reg_range(AXP288_BC_GLOBAL, AXP288_BC_GLOBAL),
 	regmap_reg_range(AXP288_BC_DET_STAT, AXP20X_VBUS_IPSOUT_MGMT),
 	regmap_reg_range(AXP20X_CHRG_BAK_CTRL, AXP20X_CHRG_BAK_CTRL),
 	regmap_reg_range(AXP20X_IRQ1_EN, AXP20X_IPSOUT_V_HIGH_L),
 	regmap_reg_range(AXP20X_TIMER_CTRL, AXP20X_TIMER_CTRL),
-	regmap_reg_range(AXP22X_GPIO_STATE, AXP22X_GPIO_STATE),
+	regmap_reg_range(AXP20X_GPIO1_CTRL, AXP22X_GPIO_STATE),
 	regmap_reg_range(AXP288_RT_BATT_V_H, AXP288_RT_BATT_V_L),
 	regmap_reg_range(AXP20X_FG_RES, AXP288_FG_CC_CAP_REG),
 };
drivers/mfd/db8500-prcmu.c +6 -8
index 3bde7fda755f..dea4e4e8bed5 100644
@@ -1622,22 +1622,20 @@ static long round_clock_rate(u8 clock, unsigned long rate)
 }
 
 static const unsigned long db8500_armss_freqs[] = {
-	200000000,
-	400000000,
-	800000000,
+	199680000,
+	399360000,
+	798720000,
 	998400000
 };
 
 /* The DB8520 has slightly higher ARMSS max frequency */
 static const unsigned long db8520_armss_freqs[] = {
-	200000000,
-	400000000,
-	800000000,
+	199680000,
+	399360000,
+	798720000,
 	1152000000
 };
 
-
-
 static long round_armss_rate(unsigned long rate)
 {
 	unsigned long freq = 0;
drivers/mfd/lpc_sch.c +2 -2
index 428a526cbe86..9ab9adce06fd 100644
@@ -22,7 +22,7 @@
 #define SMBASE		0x40
 #define SMBUS_IO_SIZE	64
 
-#define GPIOBASE	0x44
+#define GPIO_BASE	0x44
 #define GPIO_IO_SIZE	64
 #define GPIO_IO_SIZE_CENTERTON	128
 
@@ -145,7 +145,7 @@ static int lpc_sch_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	if (ret == 0)
 		cells++;
 
-	ret = lpc_sch_populate_cell(dev, GPIOBASE, "sch_gpio",
+	ret = lpc_sch_populate_cell(dev, GPIO_BASE, "sch_gpio",
 				    info->io_size_gpio,
 				    id->device, &lpc_sch_cells[cells]);
 	if (ret < 0)
drivers/mfd/stmpe.c +2 -2
index 1dd39483e7c1..58d09c615e67 100644
@@ -1095,7 +1095,7 @@ static irqreturn_t stmpe_irq(int irq, void *data)
 
 	if (variant->id_val == STMPE801_ID ||
 	    variant->id_val == STMPE1600_ID) {
-		int base = irq_create_mapping(stmpe->domain, 0);
+		int base = irq_find_mapping(stmpe->domain, 0);
 
 		handle_nested_irq(base);
 		return IRQ_HANDLED;
@@ -1123,7 +1123,7 @@ static irqreturn_t stmpe_irq(int irq, void *data)
 		while (status) {
 			int bit = __ffs(status);
 			int line = bank * 8 + bit;
-			int nestedirq = irq_create_mapping(stmpe->domain, line);
+			int nestedirq = irq_find_mapping(stmpe->domain, line);
 
 			handle_nested_irq(nestedirq);
 			status &= ~(1 << bit);
drivers/mfd/tc3589x.c +1 -1
index 7614f8fe0e91..13583cdb93b6 100644
@@ -187,7 +187,7 @@ static irqreturn_t tc3589x_irq(int irq, void *data)
 
 	while (status) {
 		int bit = __ffs(status);
-		int virq = irq_create_mapping(tc3589x->domain, bit);
+		int virq = irq_find_mapping(tc3589x->domain, bit);
 
 		handle_nested_irq(virq);
 		status &= ~(1 << bit);
drivers/mfd/tqmx86.c +2 -0
index ddddf08b6a4c..732013f40e4e 100644
@@ -209,6 +209,8 @@ static int tqmx86_probe(struct platform_device *pdev)
 
 		/* Assumes the IRQ resource is first. */
 		tqmx_gpio_resources[0].start = gpio_irq;
+	} else {
+		tqmx_gpio_resources[0].flags = 0;
 	}
 
 	ocores_platfom_data.clock_khz = tqmx86_board_id_to_clk_rate(board_id);
drivers/mfd/wm8994-irq.c +1 -1
index 6c3a619e2628..651a028bc519 100644
@@ -154,7 +154,7 @@ static irqreturn_t wm8994_edge_irq(int irq, void *data)
 	struct wm8994 *wm8994 = data;
 
 	while (gpio_get_value_cansleep(wm8994->pdata.irq_gpio))
-		handle_nested_irq(irq_create_mapping(wm8994->edge_irq, 0));
+		handle_nested_irq(irq_find_mapping(wm8994->edge_irq, 0));
 
 	return IRQ_HANDLED;
 }
drivers/mtd/mtdconcat.c +23 -10
index 6e4d0017c0bd..f685a581df48 100644
@@ -641,6 +641,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to c
 	int i;
 	size_t size;
 	struct mtd_concat *concat;
+	struct mtd_info *subdev_master = NULL;
 	uint32_t max_erasesize, curr_erasesize;
 	int num_erase_region;
 	int max_writebufsize = 0;
@@ -679,18 +680,24 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to c
 	concat->mtd.subpage_sft = subdev[0]->subpage_sft;
 	concat->mtd.oobsize = subdev[0]->oobsize;
 	concat->mtd.oobavail = subdev[0]->oobavail;
-	if (subdev[0]->_writev)
+
+	subdev_master = mtd_get_master(subdev[0]);
+	if (subdev_master->_writev)
 		concat->mtd._writev = concat_writev;
-	if (subdev[0]->_read_oob)
+	if (subdev_master->_read_oob)
 		concat->mtd._read_oob = concat_read_oob;
-	if (subdev[0]->_write_oob)
+	if (subdev_master->_write_oob)
 		concat->mtd._write_oob = concat_write_oob;
-	if (subdev[0]->_block_isbad)
+	if (subdev_master->_block_isbad)
 		concat->mtd._block_isbad = concat_block_isbad;
-	if (subdev[0]->_block_markbad)
+	if (subdev_master->_block_markbad)
 		concat->mtd._block_markbad = concat_block_markbad;
-	if (subdev[0]->_panic_write)
+	if (subdev_master->_panic_write)
 		concat->mtd._panic_write = concat_panic_write;
+	if (subdev_master->_read)
+		concat->mtd._read = concat_read;
+	if (subdev_master->_write)
+		concat->mtd._write = concat_write;
 
 	concat->mtd.ecc_stats.badblocks = subdev[0]->ecc_stats.badblocks;
 
@@ -721,14 +728,22 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to c
 				    subdev[i]->flags & MTD_WRITEABLE;
 		}
 
+		subdev_master = mtd_get_master(subdev[i]);
 		concat->mtd.size += subdev[i]->size;
 		concat->mtd.ecc_stats.badblocks +=
 			subdev[i]->ecc_stats.badblocks;
 		if (concat->mtd.writesize   !=  subdev[i]->writesize ||
 		    concat->mtd.subpage_sft != subdev[i]->subpage_sft ||
 		    concat->mtd.oobsize    !=  subdev[i]->oobsize ||
-		    !concat->mtd._read_oob  != !subdev[i]->_read_oob ||
-		    !concat->mtd._write_oob != !subdev[i]->_write_oob) {
+		    !concat->mtd._read_oob  != !subdev_master->_read_oob ||
+		    !concat->mtd._write_oob != !subdev_master->_write_oob) {
+			/*
+			 * Check against subdev[i] for data members, because
+			 * subdev's attributes may be different from master
+			 * mtd device. Check against subdev's master mtd
+			 * device for callbacks, because the existence of
+			 * subdev's callbacks is decided by master mtd device.
+			 */
 			kfree(concat);
 			printk("Incompatible OOB or ECC data on \"%s\"\n",
 			       subdev[i]->name);
@@ -744,8 +759,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to c
 	concat->mtd.name = name;
 
 	concat->mtd._erase = concat_erase;
-	concat->mtd._read = concat_read;
-	concat->mtd._write = concat_write;
 	concat->mtd._sync = concat_sync;
 	concat->mtd._lock = concat_lock;
 	concat->mtd._unlock = concat_unlock;
drivers/mtd/nand/raw/cafe_nand.c +3 -1
index d0e8ffd55c22..9dbf031716a6 100644
@@ -751,7 +751,7 @@ static int cafe_nand_probe(struct pci_dev *pdev,
 			  "CAFE NAND", mtd);
 	if (err) {
 		dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq);
-		goto out_ior;
+		goto out_free_rs;
 	}
 
 	/* Disable master reset, enable NAND clock */
@@ -795,6 +795,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,
 	/* Disable NAND IRQ in global IRQ mask register */
 	cafe_writel(cafe, ~1 & cafe_readl(cafe, GLOBAL_IRQ_MASK), GLOBAL_IRQ_MASK);
 	free_irq(pdev->irq, mtd);
+ out_free_rs:
+	free_rs(cafe->rs);
  out_ior:
 	pci_iounmap(pdev, cafe->mmio);
  out_free_mtd:
drivers/net/dsa/b53/b53_common.c +28 -6
index bd1417a66cbf..604f54112665 100644
@@ -1144,7 +1144,7 @@ static void b53_force_link(struct b53_device *dev, int port, int link)
 	u8 reg, val, off;
 
 	/* Override the port settings */
-	if (port == dev->cpu_port) {
+	if (port == dev->imp_port) {
 		off = B53_PORT_OVERRIDE_CTRL;
 		val = PORT_OVERRIDE_EN;
 	} else {
@@ -1168,7 +1168,7 @@ static void b53_force_port_config(struct b53_device *dev, int port,
 	u8 reg, val, off;
 
 	/* Override the port settings */
-	if (port == dev->cpu_port) {
+	if (port == dev->imp_port) {
 		off = B53_PORT_OVERRIDE_CTRL;
 		val = PORT_OVERRIDE_EN;
 	} else {
@@ -1236,7 +1236,7 @@ static void b53_adjust_link(struct dsa_switch *ds, int port,
 	b53_force_link(dev, port, phydev->link);
 
 	if (is531x5(dev) && phy_interface_is_rgmii(phydev)) {
-		if (port == 8)
+		if (port == dev->imp_port)
 			off = B53_RGMII_CTRL_IMP;
 		else
 			off = B53_RGMII_CTRL_P(port);
@@ -2280,6 +2280,7 @@ struct b53_chip_data {
 	const char *dev_name;
 	u16 vlans;
 	u16 enabled_ports;
+	u8 imp_port;
 	u8 cpu_port;
 	u8 vta_regs[3];
 	u8 arl_bins;
@@ -2304,6 +2305,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 2,
 		.arl_buckets = 1024,
+		.imp_port = 5,
 		.cpu_port = B53_CPU_PORT_25,
 		.duplex_reg = B53_DUPLEX_STAT_FE,
 	},
@@ -2314,6 +2316,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 2,
 		.arl_buckets = 1024,
+		.imp_port = 5,
 		.cpu_port = B53_CPU_PORT_25,
 		.duplex_reg = B53_DUPLEX_STAT_FE,
 	},
@@ -2324,6 +2327,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2337,6 +2341,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2350,6 +2355,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS_9798,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2363,6 +2369,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x7f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS_9798,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2377,6 +2384,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.arl_bins = 4,
 		.arl_buckets = 1024,
 		.vta_regs = B53_VTA_REGS,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
 		.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2389,6 +2397,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0xff,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2402,6 +2411,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1ff,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2415,6 +2425,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0, /* pdata must provide them */
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS_63XX,
 		.duplex_reg = B53_DUPLEX_STAT_63XX,
@@ -2428,6 +2439,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2441,6 +2453,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1bf,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2454,6 +2467,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1bf,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2467,6 +2481,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2480,6 +2495,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1f,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2493,6 +2509,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1ff,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2506,6 +2523,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x103,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2520,6 +2538,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1bf,
 		.arl_bins = 4,
 		.arl_buckets = 256,
+		.imp_port = 8,
 		.cpu_port = 8, /* TODO: ports 4, 5, 8 */
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2533,6 +2552,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1ff,
 		.arl_bins = 4,
 		.arl_buckets = 1024,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2546,6 +2566,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.enabled_ports = 0x1ff,
 		.arl_bins = 4,
 		.arl_buckets = 256,
+		.imp_port = 8,
 		.cpu_port = B53_CPU_PORT,
 		.vta_regs = B53_VTA_REGS,
 		.duplex_reg = B53_DUPLEX_STAT_GE,
@@ -2571,6 +2592,7 @@ static int b53_switch_init(struct b53_device *dev)
 			dev->vta_regs[1] = chip->vta_regs[1];
 			dev->vta_regs[2] = chip->vta_regs[2];
 			dev->jumbo_pm_reg = chip->jumbo_pm_reg;
+			dev->imp_port = chip->imp_port;
 			dev->cpu_port = chip->cpu_port;
 			dev->num_vlans = chip->vlans;
 			dev->num_arl_bins = chip->arl_bins;
@@ -2612,9 +2634,10 @@ static int b53_switch_init(struct b53_device *dev)
 			dev->cpu_port = 5;
 	}
 
-	/* cpu port is always last */
-	dev->num_ports = dev->cpu_port + 1;
 	dev->enabled_ports |= BIT(dev->cpu_port);
+	dev->num_ports = fls(dev->enabled_ports);
+
+	dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS);
 
 	/* Include non standard CPU port built-in PHYs to be probed */
 	if (is539x(dev) || is531x5(dev)) {
@@ -2660,7 +2683,6 @@ struct b53_device *b53_switch_alloc(struct device *base,
 		return NULL;
 
 	ds->dev = base;
-	ds->num_ports = DSA_MAX_PORTS;
 
 	dev = devm_kzalloc(base, sizeof(*dev), GFP_KERNEL);
 	if (!dev)
drivers/net/dsa/b53/b53_priv.h +1 -0
index 9bf8319342b0..5d068acf7cf8 100644
@@ -123,6 +123,7 @@ struct b53_device {
 
 	/* used ports mask */
 	u16 enabled_ports;
+	unsigned int imp_port;
 	unsigned int cpu_port;
 
 	/* connect specific data */
drivers/net/dsa/bcm_sf2.c +1 -1
index 6ce9ec1283e0..b6c4b3adb171 100644
@@ -68,7 +68,7 @@ static unsigned int bcm_sf2_num_active_ports(struct dsa_switch *ds)
 	struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
 	unsigned int port, count = 0;
 
-	for (port = 0; port < ARRAY_SIZE(priv->port_sts); port++) {
+	for (port = 0; port < ds->num_ports; port++) {
 		if (dsa_is_cpu_port(ds, port))
 			continue;
 		if (priv->port_sts[port].enabled)
drivers/net/dsa/lantiq_gswip.c +6 -0
index 64d6dfa83122..267324889dd6 100644
@@ -1885,6 +1885,12 @@ static int gswip_gphy_fw_load(struct gswip_priv *priv, struct gswip_gphy_fw *gph
 
 	reset_control_assert(gphy_fw->reset);
 
+	/* The vendor BSP uses a 200ms delay after asserting the reset line.
+	 * Without this some users are observing that the PHY is not coming up
+	 * on the MDIO bus.
+	 */
+	msleep(200);
+
 	ret = request_firmware(&fw, gphy_fw->fw_name, dev);
 	if (ret) {
 		dev_err(dev, "failed to load firmware: %s, error: %i\n",
drivers/net/dsa/qca8k.c +22 -8
index 1f63f50f73f1..bda5a9bf4f52 100644
@@ -643,10 +643,8 @@ qca8k_mdio_busy_wait(struct mii_bus *bus, u32 reg, u32 mask)
 }
 
 static int
-qca8k_mdio_write(struct mii_bus *salve_bus, int phy, int regnum, u16 data)
+qca8k_mdio_write(struct mii_bus *bus, int phy, int regnum, u16 data)
 {
-	struct qca8k_priv *priv = salve_bus->priv;
-	struct mii_bus *bus = priv->bus;
 	u16 r1, r2, page;
 	u32 val;
 	int ret;
@@ -682,10 +680,8 @@ qca8k_mdio_write(struct mii_bus *salve_bus, int phy, int regnum, u16 data)
 }
 
 static int
-qca8k_mdio_read(struct mii_bus *salve_bus, int phy, int regnum)
+qca8k_mdio_read(struct mii_bus *bus, int phy, int regnum)
 {
-	struct qca8k_priv *priv = salve_bus->priv;
-	struct mii_bus *bus = priv->bus;
 	u16 r1, r2, page;
 	u32 val;
 	int ret;
@@ -726,6 +722,24 @@ qca8k_mdio_read(struct mii_bus *salve_bus, int phy, int regnum)
 	return ret;
 }
 
+static int
+qca8k_internal_mdio_write(struct mii_bus *slave_bus, int phy, int regnum, u16 data)
+{
+	struct qca8k_priv *priv = slave_bus->priv;
+	struct mii_bus *bus = priv->bus;
+
+	return qca8k_mdio_write(bus, phy, regnum, data);
+}
+
+static int
+qca8k_internal_mdio_read(struct mii_bus *slave_bus, int phy, int regnum)
+{
+	struct qca8k_priv *priv = slave_bus->priv;
+	struct mii_bus *bus = priv->bus;
+
+	return qca8k_mdio_read(bus, phy, regnum);
+}
+
 static int
 qca8k_phy_write(struct dsa_switch *ds, int port, int regnum, u16 data)
 {
@@ -775,8 +789,8 @@ qca8k_mdio_register(struct qca8k_priv *priv, struct device_node *mdio)
 
 	bus->priv = (void *)priv;
 	bus->name = "qca8k slave mii";
-	bus->read = qca8k_mdio_read;
-	bus->write = qca8k_mdio_write;
+	bus->read = qca8k_internal_mdio_read;
+	bus->write = qca8k_internal_mdio_write;
 	snprintf(bus->id, MII_BUS_ID_SIZE, "qca8k-%d",
 		 ds->index);
 
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -1
index 27943b0446c2..a207c36246b6 100644
@@ -1224,7 +1224,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
 
 	/* SR-IOV capability was enabled but there are no VFs*/
 	if (iov->total == 0) {
-		err = -EINVAL;
+		err = 0;
 		goto failed;
 	}
 
drivers/net/ethernet/broadcom/bnxt/bnxt.c +33 -5
index 8a97640cdfe7..fdbf47446a99 100644
@@ -2172,25 +2172,33 @@ static int bnxt_async_event_process(struct bnxt *bp,
 		if (!fw_health)
 			goto async_event_process_exit;
 
-		fw_health->enabled = EVENT_DATA1_RECOVERY_ENABLED(data1);
-		fw_health->master = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1);
-		if (!fw_health->enabled) {
+		if (!EVENT_DATA1_RECOVERY_ENABLED(data1)) {
+			fw_health->enabled = false;
 			netif_info(bp, drv, bp->dev,
 				   "Error recovery info: error recovery[0]\n");
 			break;
 		}
+		fw_health->master = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1);
 		fw_health->tmr_multiplier =
 			DIV_ROUND_UP(fw_health->polling_dsecs * HZ,
 				     bp->current_interval * 10);
 		fw_health->tmr_counter = fw_health->tmr_multiplier;
-		fw_health->last_fw_heartbeat =
-			bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
+		if (!fw_health->enabled)
+			fw_health->last_fw_heartbeat =
+				bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
 		fw_health->last_fw_reset_cnt =
 			bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
 		netif_info(bp, drv, bp->dev,
 			   "Error recovery info: error recovery[1], master[%d], reset count[%u], health status: 0x%x\n",
 			   fw_health->master, fw_health->last_fw_reset_cnt,
 			   bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG));
+		if (!fw_health->enabled) {
+			/* Make sure tmr_counter is set and visible to
+			 * bnxt_health_check() before setting enabled to true.
+			 */
+			smp_wmb();
+			fw_health->enabled = true;
+		}
 		goto async_event_process_exit;
 	}
 	case ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION:
@@ -2680,6 +2688,9 @@ static void bnxt_free_tx_skbs(struct bnxt *bp)
 		struct bnxt_tx_ring_info *txr = &bp->tx_ring[i];
 		int j;
 
+		if (!txr->tx_buf_ring)
+			continue;
+
 		for (j = 0; j < max_idx;) {
 			struct bnxt_sw_tx_bd *tx_buf = &txr->tx_buf_ring[j];
 			struct sk_buff *skb;
@@ -2764,6 +2775,9 @@ static void bnxt_free_one_rx_ring_skbs(struct bnxt *bp, int ring_nr)
 	}
 
 skip_rx_tpa_free:
+	if (!rxr->rx_buf_ring)
+		goto skip_rx_buf_free;
+
 	for (i = 0; i < max_idx; i++) {
 		struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[i];
 		dma_addr_t mapping = rx_buf->mapping;
@@ -2786,6 +2800,11 @@ static void bnxt_free_one_rx_ring_skbs(struct bnxt *bp, int ring_nr)
 			kfree(data);
 		}
 	}
+
+skip_rx_buf_free:
+	if (!rxr->rx_agg_ring)
+		goto skip_rx_agg_free;
+
 	for (i = 0; i < max_agg_idx; i++) {
 		struct bnxt_sw_rx_agg_bd *rx_agg_buf = &rxr->rx_agg_ring[i];
 		struct page *page = rx_agg_buf->page;
@@ -2802,6 +2821,8 @@ static void bnxt_free_one_rx_ring_skbs(struct bnxt *bp, int ring_nr)
 
 		__free_page(page);
 	}
+
+skip_rx_agg_free:
 	if (rxr->rx_page) {
 		__free_page(rxr->rx_page);
 		rxr->rx_page = NULL;
@@ -11237,6 +11258,8 @@ static void bnxt_fw_health_check(struct bnxt *bp)
 	if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
 		return;
 
+	/* Make sure it is enabled before checking the tmr_counter. */
+	smp_rmb();
 	if (fw_health->tmr_counter) {
 		fw_health->tmr_counter--;
 		return;
@@ -12169,6 +12192,11 @@ static void bnxt_fw_reset_task(struct work_struct *work)
 			return;
 		}
 
+		if ((bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY) &&
+		    bp->fw_health->enabled) {
+			bp->fw_health->last_fw_reset_cnt =
+				bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
+		}
 		bp->fw_reset_state = 0;
 		/* Make sure fw_reset_state is 0 before clearing the flag */
 		smp_mb__before_atomic();
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +3 -3
index 64381be935a8..bb228619ec64 100644
@@ -449,7 +449,7 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
 		return rc;
 
 	ver_resp = &bp->ver_resp;
-	sprintf(buf, "%X", ver_resp->chip_rev);
+	sprintf(buf, "%c%d", 'A' + ver_resp->chip_rev, ver_resp->chip_metal);
 	rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED,
 			      DEVLINK_INFO_VERSION_GENERIC_ASIC_REV, buf);
 	if (rc)
@@ -471,8 +471,8 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
 	if (BNXT_PF(bp) && !bnxt_hwrm_get_nvm_cfg_ver(bp, &nvm_cfg_ver)) {
 		u32 ver = nvm_cfg_ver.vu32;
 
-		sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xf, (ver >> 8) & 0xf,
-			ver & 0xf);
+		sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xff, (ver >> 8) & 0xff,
+			ver & 0xff);
 		rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED,
 				      DEVLINK_INFO_VERSION_GENERIC_FW_PSID,
 				      buf);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +0 -3
index 5e4429b14b8c..2186706cf913 100644
@@ -1870,9 +1870,6 @@ bnxt_tc_indr_block_cb_lookup(struct bnxt *bp, struct net_device *netdev)
 {
 	struct bnxt_flower_indr_block_cb_priv *cb_priv;
 
-	/* All callback list access should be protected by RTNL. */
-	ASSERT_RTNL();
-
 	list_for_each_entry(cb_priv, &bp->tc_indr_block_list, list)
 		if (cb_priv->tunnel_netdev == netdev)
 			return cb_priv;
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +1 -0
index 512da98019c6..2a28a38da036 100644
@@ -1107,6 +1107,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (!adapter->registered_device_map) {
 		pr_err("%s: could not register any net devices\n",
 		       pci_name(pdev));
+		err = -EINVAL;
 		goto out_release_adapter_res;
 	}
 
drivers/net/ethernet/chelsio/cxgb3/sge.c +3 -0
index cb5c79c43bc9..7bb81e08f953 100644
@@ -3306,6 +3306,9 @@ void t3_sge_stop(struct adapter *adap)
 
 	t3_sge_stop_dma(adap);
 
+	/* workqueues aren't initialized otherwise */
+	if (!(adap->flags & FULL_INIT_DONE))
+		return;
 	for (i = 0; i < SGE_QSETS; ++i) {
 		struct sge_qset *qs = &adap->sge.qs[i];
 
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +6 -2
index cdb5f14fb6bc..9faa3712ea5b 100644
@@ -73,6 +73,7 @@ MODULE_PARM_DESC(tx_sgl, "Minimum number of frags when using dma_map_sg() to opt
 #define HNS3_OUTER_VLAN_TAG	2
 
 #define HNS3_MIN_TX_LEN		33U
+#define HNS3_MIN_TUN_PKT_LEN	65U
 
 /* hns3_pci_tbl - PCI Device ID Table
  *
@@ -1425,8 +1426,11 @@ static int hns3_set_l2l3l4(struct sk_buff *skb, u8 ol4_proto,
 			       l4.tcp->doff);
 		break;
 	case IPPROTO_UDP:
-		if (hns3_tunnel_csum_bug(skb))
-			return skb_checksum_help(skb);
+		if (hns3_tunnel_csum_bug(skb)) {
+			int ret = skb_put_padto(skb, HNS3_MIN_TUN_PKT_LEN);
+
+			return ret ? ret : skb_checksum_help(skb);
+		}
 
 		hns3_set_field(*type_cs_vlan_tso, HNS3_TXD_L4CS_B, 1);
 		hns3_set_field(*type_cs_vlan_tso, HNS3_TXD_L4T_S,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c +4 -0
index 288788186ecc..e6e617aba2a4 100644
@@ -1710,6 +1710,10 @@ hclge_dbg_get_imp_stats_info(struct hclge_dev *hdev, char *buf, int len)
 	}
 
 	bd_num = le32_to_cpu(req->bd_num);
+	if (!bd_num) {
+		dev_err(&hdev->pdev->dev, "imp statistics bd number is 0!\n");
+		return -EINVAL;
+	}
 
 	desc_src = kcalloc(bd_num, sizeof(struct hclge_desc), GFP_KERNEL);
 	if (!desc_src)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +11 -8
index 03ae122f1c9a..72d55c028ac4 100644
@@ -1528,9 +1528,10 @@ static void hclge_init_kdump_kernel_config(struct hclge_dev *hdev)
 static int hclge_configure(struct hclge_dev *hdev)
 {
 	struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev);
+	const struct cpumask *cpumask = cpu_online_mask;
 	struct hclge_cfg cfg;
 	unsigned int i;
-	int ret;
+	int node, ret;
 
 	ret = hclge_get_cfg(hdev, &cfg);
 	if (ret)
@@ -1595,11 +1596,12 @@ static int hclge_configure(struct hclge_dev *hdev)
 
 	hclge_init_kdump_kernel_config(hdev);
 
-	/* Set the init affinity based on pci func number */
-	i = cpumask_weight(cpumask_of_node(dev_to_node(&hdev->pdev->dev)));
-	i = i ? PCI_FUNC(hdev->pdev->devfn) % i : 0;
-	cpumask_set_cpu(cpumask_local_spread(i, dev_to_node(&hdev->pdev->dev)),
-			&hdev->affinity_mask);
+	/* Set the affinity based on numa node */
+	node = dev_to_node(&hdev->pdev->dev);
+	if (node != NUMA_NO_NODE)
+		cpumask = cpumask_of_node(node);
+
+	cpumask_copy(&hdev->affinity_mask, cpumask);
 
 	return ret;
 }
@@ -8118,11 +8120,12 @@ static void hclge_ae_stop(struct hnae3_handle *handle)
 	hclge_clear_arfs_rules(hdev);
 	spin_unlock_bh(&hdev->fd_rule_lock);
 
-	/* If it is not PF reset, the firmware will disable the MAC,
+	/* If it is not PF reset or FLR, the firmware will disable the MAC,
 	 * so it only need to stop phy here.
 	 */
 	if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) &&
-	    hdev->reset_type != HNAE3_FUNC_RESET) {
+	    hdev->reset_type != HNAE3_FUNC_RESET &&
+	    hdev->reset_type != HNAE3_FLR_RESET) {
 		hclge_mac_stop_phy(hdev);
 		hclge_update_link_status(hdev);
 		return;
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +3 -3
index 938654778979..be3ea7023ed8 100644
@@ -2463,6 +2463,8 @@ static irqreturn_t hclgevf_misc_irq_handle(int irq, void *data)
 
 	hclgevf_enable_vector(&hdev->misc_vector, false);
 	event_cause = hclgevf_check_evt_cause(hdev, &clearval);
+	if (event_cause != HCLGEVF_VECTOR0_EVENT_OTHER)
+		hclgevf_clear_event_cause(hdev, clearval);
 
 	switch (event_cause) {
 	case HCLGEVF_VECTOR0_EVENT_RST:
@@ -2475,10 +2477,8 @@ static irqreturn_t hclgevf_misc_irq_handle(int irq, void *data)
 		break;
 	}
 
-	if (event_cause != HCLGEVF_VECTOR0_EVENT_OTHER) {
-		hclgevf_clear_event_cause(hdev, clearval);
+	if (event_cause != HCLGEVF_VECTOR0_EVENT_OTHER)
 		hclgevf_enable_vector(&hdev->misc_vector, true);
-	}
 
 	return IRQ_HANDLED;
 }
drivers/net/ethernet/ibm/ibmvnic.c +8 -0
index a775c69e4fd7..6aa6ff89a765 100644
@@ -4700,6 +4700,14 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
 		return 0;
 	}
 
+	if (adapter->failover_pending) {
+		adapter->init_done_rc = -EAGAIN;
+		netdev_dbg(netdev, "Failover pending, ignoring login response\n");
+		complete(&adapter->init_done);
+		/* login response buffer will be released on reset */
+		return 0;
+	}
+
 	netdev->mtu = adapter->req_mtu - ETH_HLEN;
 
 	netdev_dbg(adapter->netdev, "Login Response Buffer:\n");
drivers/net/ethernet/intel/ice/ice.h +2 -0
index eadcb9958346..3c4f08d20414 100644
@@ -695,6 +695,7 @@ static inline void ice_set_rdma_cap(struct ice_pf *pf)
 {
 	if (pf->hw.func_caps.common_cap.rdma && pf->num_rdma_msix) {
 		set_bit(ICE_FLAG_RDMA_ENA, pf->flags);
+		set_bit(ICE_FLAG_AUX_ENA, pf->flags);
 		ice_plug_aux_dev(pf);
 	}
 }
@@ -707,5 +708,6 @@ static inline void ice_clear_rdma_cap(struct ice_pf *pf)
 {
 	ice_unplug_aux_dev(pf);
 	clear_bit(ICE_FLAG_RDMA_ENA, pf->flags);
+	clear_bit(ICE_FLAG_AUX_ENA, pf->flags);
 }
 #endif /* _ICE_H_ */
drivers/net/ethernet/intel/ice/ice_idc.c +6 -0
index 1f2afdf6cd48..adcc9a251595 100644
@@ -271,6 +271,12 @@ int ice_plug_aux_dev(struct ice_pf *pf)
 	struct auxiliary_device *adev;
 	int ret;
 
+	/* if this PF doesn't support a technology that requires auxiliary
+	 * devices, then gracefully exit
+	 */
+	if (!ice_is_aux_ena(pf))
+		return 0;
+
 	iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
 	if (!iadev)
 		return -ENOMEM;
drivers/net/ethernet/intel/igc/igc_main.c +3 -1
index f62982c4d933..78114e625ffd 100644
@@ -5962,7 +5962,9 @@ static int igc_probe(struct pci_dev *pdev,
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;
 
-	netdev->vlan_features |= netdev->features;
+	netdev->vlan_features |= netdev->features | NETIF_F_TSO_MANGLEID;
+	netdev->mpls_features |= NETIF_F_HW_CSUM;
+	netdev->hw_enc_features |= netdev->vlan_features;
 
 	/* MTU range: 68 - 9216 */
 	netdev->min_mtu = ETH_MIN_MTU;
drivers/net/ethernet/marvell/octeontx2/af/rvu.c +11 -1
index 5fe277e354f7..c10cae78e79f 100644
@@ -92,7 +92,8 @@ static void rvu_setup_hw_capabilities(struct rvu *rvu)
  */
 int rvu_poll_reg(struct rvu *rvu, u64 block, u64 offset, u64 mask, bool zero)
 {
-	unsigned long timeout = jiffies + usecs_to_jiffies(10000);
+	unsigned long timeout = jiffies + usecs_to_jiffies(20000);
+	bool twice = false;
 	void __iomem *reg;
 	u64 reg_val;
 
@@ -107,6 +108,15 @@ int rvu_poll_reg(struct rvu *rvu, u64 block, u64 offset, u64 mask, bool zero)
 		usleep_range(1, 5);
 		goto again;
 	}
+	/* In scenarios where CPU is scheduled out before checking
+	 * 'time_before' (above) and gets scheduled in such that
+	 * jiffies are beyond timeout value, then check again if HW is
+	 * done with the operation in the meantime.
+	 */
+	if (!twice) {
+		twice = true;
+		goto again;
+	}
 	return -EBUSY;
 }
 
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +2 -1
index 3f8a98093f8c..f9cf9fb31547 100644
@@ -1007,7 +1007,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer)
 	err = mlx5_core_alloc_pd(dev, &tracer->buff.pdn);
 	if (err) {
 		mlx5_core_warn(dev, "FWTracer: Failed to allocate PD %d\n", err);
-		return err;
+		goto err_cancel_work;
 	}
 
 	err = mlx5_fw_tracer_create_mkey(tracer);
@@ -1031,6 +1031,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer)
 	mlx5_core_destroy_mkey(dev, &tracer->buff.mkey);
 err_dealloc_pd:
 	mlx5_core_dealloc_pd(dev, tracer->buff.pdn);
+err_cancel_work:
 	cancel_work_sync(&tracer->read_fw_strings_work);
 	return err;
 }
drivers/net/ethernet/mellanox/mlx5/core/en.h +1 -1
index b1b51bbba054..3f67efbe12fc 100644
@@ -940,7 +940,7 @@ void mlx5e_set_rx_mode_work(struct work_struct *work);
 
 int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr);
 int mlx5e_hwstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr);
-int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool val);
+int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool val, bool rx_filter);
 
 int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 proto,
 			  u16 vid);
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c +0 -3
index 059799e4f483..ef271b97fe5e 100644
@@ -300,9 +300,6 @@ mlx5e_rep_indr_block_priv_lookup(struct mlx5e_rep_priv *rpriv,
 {
 	struct mlx5e_rep_indr_block_priv *cb_priv;
 
-	/* All callback list access should be protected by RTNL. */
-	ASSERT_RTNL();
-
 	list_for_each_entry(cb_priv,
 			    &rpriv->uplink_priv.tc_indr_block_priv_list,
 			    list)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +6 -5
index bd72572e03d1..1cc279d389d6 100644
@@ -1882,7 +1882,7 @@ static int set_pflag_rx_cqe_based_moder(struct net_device *netdev, bool enable)
 	return set_pflag_cqe_based_moder(netdev, enable, true);
 }
 
-int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_val)
+int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_val, bool rx_filter)
 {
 	bool curr_val = MLX5E_GET_PFLAG(&priv->channels.params, MLX5E_PFLAG_RX_CQE_COMPRESS);
 	struct mlx5e_params new_params;
@@ -1894,8 +1894,7 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_val
 	if (curr_val == new_val)
 		return 0;
 
-	if (new_val && !priv->profile->rx_ptp_support &&
-	    priv->tstamp.rx_filter != HWTSTAMP_FILTER_NONE) {
+	if (new_val && !priv->profile->rx_ptp_support && rx_filter) {
 		netdev_err(priv->netdev,
 			   "Profile doesn't support enabling of CQE compression while hardware time-stamping is enabled.\n");
 		return -EINVAL;
@@ -1903,7 +1902,7 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_val
 
 	new_params = priv->channels.params;
 	MLX5E_SET_PFLAG(&new_params, MLX5E_PFLAG_RX_CQE_COMPRESS, new_val);
-	if (priv->tstamp.rx_filter != HWTSTAMP_FILTER_NONE)
+	if (rx_filter)
 		new_params.ptp_rx = new_val;
 
 	if (new_params.ptp_rx == priv->channels.params.ptp_rx)
@@ -1926,12 +1925,14 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,
 {
 	struct mlx5e_priv *priv = netdev_priv(netdev);
 	struct mlx5_core_dev *mdev = priv->mdev;
+	bool rx_filter;
 	int err;
 
 	if (!MLX5_CAP_GEN(mdev, cqe_compression))
 		return -EOPNOTSUPP;
 
-	err = mlx5e_modify_rx_cqe_compression_locked(priv, enable);
+	rx_filter = priv->tstamp.rx_filter != HWTSTAMP_FILTER_NONE;
+	err = mlx5e_modify_rx_cqe_compression_locked(priv, enable, rx_filter);
 	if (err)
 		return err;
 
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -2
index 2d53eaf3b924..fa718e71db2d 100644
@@ -4004,14 +4004,14 @@ static int mlx5e_hwstamp_config_no_ptp_rx(struct mlx5e_priv *priv, bool rx_filte
 
 	if (!rx_filter)
 		/* Reset CQE compression to Admin default */
-		return mlx5e_modify_rx_cqe_compression_locked(priv, rx_cqe_compress_def);
+		return mlx5e_modify_rx_cqe_compression_locked(priv, rx_cqe_compress_def, false);
 
 	if (!MLX5E_GET_PFLAG(&priv->channels.params, MLX5E_PFLAG_RX_CQE_COMPRESS))
 		return 0;
 
 	/* Disable CQE compression */
 	netdev_warn(priv->netdev, "Disabling RX cqe compression\n");
-	err = mlx5e_modify_rx_cqe_compression_locked(priv, false);
+	err = mlx5e_modify_rx_cqe_compression_locked(priv, false, true);
 	if (err)
 		netdev_err(priv->netdev, "Failed disabling cqe compression err=%d\n", err);
 
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +2 -3
index c0697e1b7118..938ef5afe505 100644
@@ -1682,14 +1682,13 @@ static int build_match_list(struct match_list *match_head,
 
 		curr_match = kmalloc(sizeof(*curr_match), GFP_ATOMIC);
 		if (!curr_match) {
+			rcu_read_unlock();
 			free_match_list(match_head, ft_locked);
-			err = -ENOMEM;
-			goto out;
+			return -ENOMEM;
 		}
 		curr_match->g = g;
 		list_add_tail(&curr_match->list, &match_head->list);
 	}
-out:
 	rcu_read_unlock();
 	return err;
 }
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +7 -0
index a0a059e0154f..04c7dc224eff 100644
@@ -142,6 +142,13 @@ static int mlxbf_gige_open(struct net_device *netdev)
 	err = mlxbf_gige_clean_port(priv);
 	if (err)
 		goto free_irqs;
+
+	/* Clear driver's valid_polarity to match hardware,
+	 * since the above call to clean_port() resets the
+	 * receive polarity used by hardware.
+	 */
+	priv->valid_polarity = 0;
+
 	err = mlxbf_gige_rx_init(priv);
 	if (err)
 		goto free_irqs;
drivers/net/ethernet/netronome/nfp/flower/offload.c +0 -3
index 2406d33356ad..d87a9eab25a7 100644
@@ -1766,9 +1766,6 @@ nfp_flower_indr_block_cb_priv_lookup(struct nfp_app *app,
 	struct nfp_flower_indr_block_cb_priv *cb_priv;
 	struct nfp_flower_priv *priv = app->priv;
 
-	/* All callback list access should be protected by RTNL. */
-	ASSERT_RTNL();
-
 	list_for_each_entry(cb_priv, &priv->indr_block_cb_priv, list)
 		if (cb_priv->netdev == netdev)
 			return cb_priv;
drivers/net/ethernet/qlogic/qed/qed_mcp.c +5 -1
index 4387292c37e2..e8e17bfc41c5 100644
@@ -3368,6 +3368,7 @@ qed_mcp_get_nvm_image_att(struct qed_hwfn *p_hwfn,
 			  struct qed_nvm_image_att *p_image_att)
 {
 	enum nvm_image_type type;
+	int rc;
 	u32 i;
 
 	/* Translate image_id into MFW definitions */
@@ -3396,7 +3397,10 @@ qed_mcp_get_nvm_image_att(struct qed_hwfn *p_hwfn,
 		return -EINVAL;
 	}
 
-	qed_mcp_nvm_info_populate(p_hwfn);
+	rc = qed_mcp_nvm_info_populate(p_hwfn);
+	if (rc)
+		return rc;
+
 	for (i = 0; i < p_hwfn->nvm_info.num_images; i++)
 		if (type == p_hwfn->nvm_info.image_att[i].image_type)
 			break;
drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c +0 -1
index e6784023bce4..aa7ee43f9252 100644
@@ -439,7 +439,6 @@ int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter)
 	QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x3c, 1);
 	msleep(20);
 
-	qlcnic_rom_unlock(adapter);
 	/* big hammer don't reset CAM block on reset */
 	QLCWR32(adapter, QLCNIC_ROMUSB_GLB_SW_RESET, 0xfeffffff);
 
drivers/net/ethernet/rdc/r6040.c +8 -1
index 47e9998b62f0..6a2416bec7dd 100644
@@ -119,6 +119,8 @@
 #define PHY_ST		0x8A	/* PHY status register */
 #define MAC_SM		0xAC	/* MAC status machine */
 #define  MAC_SM_RST	0x0002	/* MAC status machine reset */
+#define MD_CSC		0xb6	/* MDC speed control register */
+#define  MD_CSC_DEFAULT	0x0030
 #define MAC_ID		0xBE	/* Identifier register */
 
 #define TX_DCNT		0x80	/* TX descriptor count */
@@ -355,8 +357,9 @@ static void r6040_reset_mac(struct r6040_private *lp)
 {
 	void __iomem *ioaddr = lp->base;
 	int limit = MAC_DEF_TIMEOUT;
-	u16 cmd;
+	u16 cmd, md_csc;
 
+	md_csc = ioread16(ioaddr + MD_CSC);
 	iowrite16(MAC_RST, ioaddr + MCR1);
 	while (limit--) {
 		cmd = ioread16(ioaddr + MCR1);
@@ -368,6 +371,10 @@ static void r6040_reset_mac(struct r6040_private *lp)
 	iowrite16(MAC_SM_RST, ioaddr + MAC_SM);
 	iowrite16(0, ioaddr + MAC_SM);
 	mdelay(5);
+
+	/* Restore MDIO clock frequency */
+	if (md_csc != MD_CSC_DEFAULT)
+		iowrite16(md_csc, ioaddr + MD_CSC);
 }
 
 static void r6040_init_mac_regs(struct net_device *dev)
drivers/net/ethernet/renesas/sh_eth.c +1 -0
index 840478692a37..dfd439eadd49 100644
@@ -2533,6 +2533,7 @@ static netdev_tx_t sh_eth_start_xmit(struct sk_buff *skb,
 	else
 		txdesc->status |= cpu_to_le32(TD_TACT);
 
+	wmb(); /* cur_tx must be incremented after TACT bit was set */
 	mdp->cur_tx++;
 
 	if (!(sh_eth_read(ndev, EDTRR) & mdp->cd->edtrr_trns))
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +3 -1
index 4c9a37dd0d3f..ecf759ee1c9f 100644
@@ -109,8 +109,10 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id
 		plat->bus_id = pci_dev_id(pdev);
 
 	phy_mode = device_get_phy_mode(&pdev->dev);
-	if (phy_mode < 0)
+	if (phy_mode < 0) {
 		dev_err(&pdev->dev, "phy_mode not found\n");
+		return phy_mode;
+	}
 
 	plat->phy_interface = phy_mode;
 	plat->interface = PHY_INTERFACE_MODE_GMII;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +18 -32

91 lines not on this page · raw message

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +44 -0

59 lines not on this page · raw message

drivers/net/ipa/ipa_table.c +2 -1
index c607ebec7456..656f6ef31b19 100644
@@ -430,7 +430,8 @@ static void ipa_table_init_add(struct gsi_trans *trans, bool filter,
 	 * table region determines the number of entries it has.
 	 */
 	if (filter) {
-		count = hweight32(ipa->filter_map);
+		/* Include one extra "slot" to hold the filter map itself */
+		count = 1 + hweight32(ipa->filter_map);
 		hash_count = hash_mem->size ? count : 0;
 	} else {
 		count = mem->size / sizeof(__le64);
drivers/net/phy/dp83640_reg.h +1 -1
index 21aa24c741b9..daae7fa58fb8 100644
@@ -5,7 +5,7 @@
 #ifndef HAVE_DP83640_REGISTERS
 #define HAVE_DP83640_REGISTERS
 
-#define PAGE0                     0x0000
+/* #define PAGE0                  0x0000 */
 #define PHYCR2                    0x001c /* PHY Control Register 2 */
 
 #define PAGE4                     0x0004
drivers/net/phy/phylink.c +82 -0

100 lines not on this page · raw message

drivers/net/usb/cdc_mbim.c +5 -0
index 4c4ab7b38d78..82bb5ed94c48 100644
@@ -654,6 +654,11 @@ static const struct usb_device_id mbim_devs[] = {
 	  .driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle,
 	},
 
+	/* Telit LN920 */
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x1bc7, 0x1061, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
+	  .driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle,
+	},
+
 	/* default entry */
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
 	  .driver_info = (unsigned long)&cdc_mbim_info_zlp,
drivers/net/usb/hso.c +8 -3
index dec96e8ab567..18e0ca85f653 100644
@@ -2536,13 +2536,17 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface,
 	if (!hso_net->mux_bulk_tx_buf)
 		goto err_free_tx_urb;
 
-	add_net_device(hso_dev);
+	result = add_net_device(hso_dev);
+	if (result) {
+		dev_err(&interface->dev, "Failed to add net device\n");
+		goto err_free_tx_buf;
+	}
 
 	/* registering our net device */
 	result = register_netdev(net);
 	if (result) {
 		dev_err(&interface->dev, "Failed to register device\n");
-		goto err_free_tx_buf;
+		goto err_rmv_ndev;
 	}
 
 	hso_log_port(hso_dev);
@@ -2551,8 +2555,9 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface,
 
 	return hso_dev;
 
-err_free_tx_buf:
+err_rmv_ndev:
 	remove_net_device(hso_dev);
+err_free_tx_buf:
 	kfree(hso_net->mux_bulk_tx_buf);
 err_free_tx_urb:
 	usb_free_urb(hso_net->mux_bulk_tx_urb);
drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +7 -12
index b4b1f75b9c2a..513f9e538729 100644
@@ -230,19 +230,11 @@ static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data,
 static int iwl_pnvm_get_from_fs(struct iwl_trans *trans, u8 **data, size_t *len)
 {
 	const struct firmware *pnvm;
-	char pnvm_name[64];
+	char pnvm_name[MAX_PNVM_NAME];
+	size_t new_len;
 	int ret;
 
-	/*
-	 * The prefix unfortunately includes a hyphen at the end, so
-	 * don't add the dot here...
-	 */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/fw/pnvm.h +20 -0
index 61d3d4e0b7d9..203c367dd4de 100644

Lines of this file are not shown. View the raw message.

drivers/ntb/test/ntb_msi_test.c +3 -1
index 7095ecd6223a..4e18e08776c9 100644

Lines of this file are not shown. View the raw message.

drivers/ntb/test/ntb_perf.c +1 -0
index 89df1350fefd..65e1e5cf1b29 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/core.c +7 -8
index 2f0cbaba12ac..84e7cb9f1968 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/tcp.c +10 -10
index 48b70e5235a3..19a711395cdc 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/Kconfig +1 -0
index 5e1e3796efa4..326f7d13024f 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/cadence/pci-j721e.c +56 -5

61 lines not on this page · raw message

drivers/pci/controller/cadence/pcie-cadence-ep.c +4 -0
index 897cdde02bd8..dd7df1ac7fda 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/cadence/pcie-cadence-host.c +3 -0
index ae1c55503513..fb96d37a135c 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/cadence/pcie-cadence.c +16 -0
index 3c3646502d05..52767f26048f 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/cadence/pcie-cadence.h +16 -1
index 30db2d68c17a..4bde99b74135 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/dwc/pcie-tegra194.c +16 -16
index 3ec7b29d5dc7..55c8afb9a899 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/pci-tegra.c +8 -5
index c979229a6d0d..b358212d71ab 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/pcie-iproc-bcma.c +6 -10
index 56b8ee7bf330..f918c713afb0 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/pcie-rcar-ep.c +2 -2
index b4a288e24aaf..c91d85b15129 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/TODO +0 -3
index a32070be5adf..cc6194aa24c1 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/ibmphp_ebda.c +1 -4
index 11a2661dc062..7fb75401ad8a 100644

Lines of this file are not shown. View the raw message.

drivers/pci/of.c +1 -1
index a143b02b2dcd..d84381ce82b5 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pci.c +1 -1
index a5e6759c407b..a4eb0c042ca3 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pcie/ptm.c +1 -3
index 95d4eef2c9e8..4810faa67f52 100644

Lines of this file are not shown. View the raw message.

drivers/pci/quirks.c +56 -2

58 lines not on this page · raw message

drivers/remoteproc/qcom_wcnss.c +12 -37

49 lines not on this page · raw message

drivers/remoteproc/qcom_wcnss.h +2 -2
index 62c8682d0a92..6d01ee6afa7f 100644

Lines of this file are not shown. View the raw message.

drivers/remoteproc/qcom_wcnss_iris.c +75 -45

120 lines not on this page · raw message

drivers/rtc/rtc-cmos.c +2 -0
index 670fd8a2970e..6545afb2f20e 100644

Lines of this file are not shown. View the raw message.

drivers/s390/char/sclp_early.c +2 -1
index 2f3515fa242a..f3d5c7f4c13d 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/net.c +10 -1
index 6414bd5741b8..a38b0c39ea4b 100644

Lines of this file are not shown. View the raw message.

drivers/video/backlight/ktd253-backlight.c +55 -20

75 lines not on this page · raw message

drivers/watchdog/watchdog_dev.c +6 -2
index 3bab32485273..0cc07d957b64 100644

Lines of this file are not shown. View the raw message.

drivers/xen/swiotlb-xen.c +2 -3
index 24d11861ac7d..dbb18dc956f3 100644

Lines of this file are not shown. View the raw message.

fs/fuse/dev.c +2 -2
index 1c8f79b3dd06..dde341a6388a 100644

Lines of this file are not shown. View the raw message.

fs/io_uring.c +24 -9
index c5d4638f6d7f..43aaa3566431 100644

Lines of this file are not shown. View the raw message.

include/linux/pci.h +3 -2
index 540b377ca8f6..acbed2ecf6e8 100644

Lines of this file are not shown. View the raw message.

include/linux/pci_ids.h +2 -1
index 4bac1831de80..1a9b8589391c 100644

Lines of this file are not shown. View the raw message.

include/linux/phylink.h +3 -0
index afb3ded0b691..237291196ce2 100644

Lines of this file are not shown. View the raw message.

include/linux/sched.h +1 -0
index ec8d07d88641..f6935787e7e8 100644

Lines of this file are not shown. View the raw message.

include/linux/skbuff.h +1 -1
index b2db9cd9a73f..4f7478c48273 100644

Lines of this file are not shown. View the raw message.

include/net/dsa.h +5 -0
index 048d297623c9..d833f717e802 100644

Lines of this file are not shown. View the raw message.

include/net/flow.h +2 -2
index 6f5e70240071..58beb16a49b8 100644

Lines of this file are not shown. View the raw message.

include/uapi/linux/pkt_sched.h +2 -0
index 79a699f106b1..ec88590b3198 100644

Lines of this file are not shown. View the raw message.

kernel/events/core.c +1 -1
index 1cb1f9b8392e..e5c4aca620c5 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_boot.c +9 -6
index 94ef2d099e32..d713714cba67 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_kprobe.c +5 -1
index ea6178cb5e33..032191977e34 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_probe.c +25 -0
index 15413ad7cef2..0e29bb14fc8b 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_probe.h +1 -0
index 227d518e5ba5..9f14186d132e 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_uprobe.c +5 -1
index 9b50869a5ddb..957244ee07c8 100644

Lines of this file are not shown. View the raw message.

net/caif/chnl_net.c +3 -16
index 37b67194c0df..414dc5671c45 100644

Lines of this file are not shown. View the raw message.

net/dccp/minisocks.c +2 -0
index c5c74a34d139..91e7a2202697 100644

Lines of this file are not shown. View the raw message.

net/dsa/dsa.c +5 -0
index 84cad1be9ce4..e058a2e320e3 100644

Lines of this file are not shown. View the raw message.

net/dsa/dsa2.c +31 -15

46 lines not on this page · raw message

net/dsa/dsa_priv.h +1 -0
index cddf7cb0f398..6c00557ca9bf 100644

Lines of this file are not shown. View the raw message.

net/dsa/slave.c +5 -7
index b34116b15d43..527fc20d47ad 100644

Lines of this file are not shown. View the raw message.

net/dsa/tag_rtl4_a.c +4 -3
index 57c46b4ab2b3..e34b80fa52e1 100644

Lines of this file are not shown. View the raw message.

net/ethtool/ioctl.c +1 -1
index 6134b180f59f..af011534bcb2 100644

Lines of this file are not shown. View the raw message.

net/ipv4/cipso_ipv4.c +8 -10
index 7fbd0b532f52..099259fc826a 100644

Lines of this file are not shown. View the raw message.

net/ipv4/ip_gre.c +6 -3
index 95419b7adf5c..6480c6dfe1bf 100644

Lines of this file are not shown. View the raw message.

net/ipv4/nexthop.c +2 -0
index 4075230b14c6..75ca4b6e484f 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_input.c +1 -1
index 149ceb5c94ff..66d9085da87e 100644

Lines of this file are not shown. View the raw message.

net/ipv4/udp_tunnel_nic.c +1 -1
index 0d122edc368d..b91003538d87 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ip6_gre.c +0 -2
index 7a5e90e09363..bc224f917bbd 100644

Lines of this file are not shown. View the raw message.

net/ipv6/netfilter/nf_socket_ipv6.c +1 -3
index 6fd54744cbc3..aa5bb8789ba0 100644

Lines of this file are not shown. View the raw message.

net/l2tp/l2tp_core.c +3 -1
index 53486b162f01..93271a2632b8 100644

Lines of this file are not shown. View the raw message.

net/mptcp/pm_netlink.c +2 -8
index 7b3794459783..89251cbe9f1a 100644

Lines of this file are not shown. View the raw message.

net/mptcp/protocol.c +47 -50

97 lines not on this page · raw message

net/mptcp/protocol.h +1 -0
index 0f0c026c5f8b..6ac564d584c1 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nft_ct.c +8 -1
index 337e22d8b40b..99b1de14ff7e 100644

Lines of this file are not shown. View the raw message.

net/qrtr/qrtr.c +1 -1
index bdbda61db8b9..d3c0cae813c6 100644

Lines of this file are not shown. View the raw message.

net/sched/sch_fq_codel.c +10 -2
index bbd5f8753600..99e8db262198 100644

Lines of this file are not shown. View the raw message.

net/tipc/socket.c +6 -4
index a155cfaf01f2..50762be9c115 100644

Lines of this file are not shown. View the raw message.

net/unix/af_unix.c +1 -1
index ba7ced947e51..91ff09d833e8 100644

Lines of this file are not shown. View the raw message.

scripts/clang-tools/gen_compile_commands.py +1 -0
index b7e9ecf16e56..a70cd064bfc4 100755

Lines of this file are not shown. View the raw message.

tools/build/Makefile +1 -1
index 5ed41b96fcde..6f11e6fc9ffe 100644

Lines of this file are not shown. View the raw message.

tools/perf/Makefile.config +4 -4
index eb8e487ef90b..29ffd57f5cd8 100644

Lines of this file are not shown. View the raw message.

tools/perf/bench/inject-buildid.c +30 -22

52 lines not on this page · raw message

tools/perf/util/config.c +4 -1
index 63d472b336de..4fb5e90d7a57 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/machine.c +1 -0
index da19be7da284..44e40bad0e33 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/altnames.sh +1 -1
index 4254ddc3f70b..1ef9e4159bba 100755

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/mptcp/simult_flows.sh +2 -2
index fd63ebfe9a2b..910d8126af8f 100755

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.