Linux 5.2.12
Greg KH
maintainerI'm announcing the release of the 5.2.12 kernel.
All users of the 5.2 kernel series must upgrade.
The updated 5.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.2.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
------------
Makefile | 2 arch/arm64/kernel/cpufeature.c | 14 - arch/powerpc/kvm/book3s_64_vio.c | 6 arch/powerpc/kvm/book3s_64_vio_hv.c | 6 arch/riscv/include/asm/tlbflush.h | 11 arch/x86/kernel/apic/apic.c | 4 arch/x86/kernel/apic/bigsmp_32.c | 24 - arch/x86/kernel/ptrace.c | 3 arch/x86/kernel/uprobes.c | 17 - arch/x86/kvm/hyperv.c | 5 arch/x86/kvm/lapic.c | 5 arch/x86/kvm/svm.c | 8 arch/x86/kvm/vmx/vmx.c | 1 arch/x86/kvm/x86.c | 9 arch/x86/mm/pageattr.c | 26 + drivers/auxdisplay/panel.c | 2 drivers/block/xen-blkback/xenbus.c | 6 drivers/bus/hisi_lpc.c | 47 +++ drivers/crypto/ccp/ccp-dev.c | 8 drivers/dma/ste_dma40.c | 4 drivers/dma/stm32-mdma.c | 2 drivers/dma/ti/omap-dma.c | 4 drivers/fsi/fsi-scom.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 1 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 - drivers/gpu/drm/ast/ast_main.c | 5 drivers/gpu/drm/ast/ast_mode.c | 2 drivers/gpu/drm/ast/ast_post.c | 2 drivers/gpu/drm/bridge/ti-tfp410.c | 7 drivers/gpu/drm/i915/i915_drv.c | 6 drivers/gpu/drm/i915/i915_vgpu.c | 3 drivers/gpu/drm/i915/intel_dp_mst.c | 10 drivers/gpu/drm/i915/intel_vdsc.c | 2 drivers/gpu/drm/scheduler/sched_entity.c | 4 drivers/hid/hid-logitech-hidpp.c | 2 drivers/hwtracing/intel_th/pci.c | 10 drivers/hwtracing/stm/core.c | 1 drivers/i2c/busses/i2c-emev2.c | 16 - drivers/i2c/busses/i2c-piix4.c | 12 drivers/i2c/busses/i2c-rcar.c | 11 drivers/infiniband/core/umem_odp.c | 4 drivers/infiniband/hw/mlx5/odp.c | 24 - drivers/iommu/dma-iommu.c | 2 drivers/media/platform/omap/omap_vout_vrfb.c | 3 drivers/misc/habanalabs/goya/goya.c | 72 +++-- drivers/misc/habanalabs/goya/goyaP.h | 2 drivers/misc/habanalabs/habanalabs.h | 9 drivers/misc/habanalabs/hw_queue.c | 14 - drivers/misc/habanalabs/include/goya/goya_packets.h | 13 drivers/misc/habanalabs/irq.c | 27 -- drivers/misc/habanalabs/memory.c | 2 drivers/misc/lkdtm/bugs.c | 4 drivers/misc/mei/hw-me-regs.h | 2 drivers/misc/mei/pci-me.c | 2 drivers/misc/vmw_vmci/vmci_doorbell.c | 6 drivers/mmc/core/sd.c | 6 drivers/mmc/host/sdhci-cadence.c | 1 drivers/mmc/host/sdhci-of-at91.c | 3 drivers/mmc/host/sdhci-sprd.c | 37 ++ drivers/mmc/host/sdhci-tegra.c | 14 + drivers/net/ethernet/ti/cpsw.c | 2 drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 221 ++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 23 + drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 2 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 268 +++++++++++--------- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 drivers/net/wireless/mediatek/mt76/mt76.h | 1 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 8 drivers/net/wireless/mediatek/mt76/usb.c | 46 ++- drivers/nvme/host/core.c | 15 + drivers/nvme/host/multipath.c | 76 +++++ drivers/nvme/host/nvme.h | 21 + drivers/nvme/host/pci.c | 3 drivers/nvme/host/rdma.c | 16 - drivers/nvme/target/configfs.c | 1 drivers/nvme/target/core.c | 15 + drivers/nvme/target/loop.c | 8 drivers/nvme/target/nvmet.h | 3 drivers/soundwire/cadence_master.c | 8 drivers/usb/chipidea/udc.c | 32 +- drivers/usb/class/cdc-wdm.c | 16 - drivers/usb/class/usbtmc.c | 3 drivers/usb/core/hcd-pci.c | 30 -- drivers/usb/gadget/composite.c | 1 drivers/usb/gadget/function/f_mass_storage.c | 28 +- drivers/usb/host/fotg210-hcd.c | 4 drivers/usb/host/ohci-hcd.c | 15 - drivers/usb/host/xhci-rcar.c | 2 drivers/usb/storage/realtek_cr.c | 15 - drivers/usb/storage/unusual_devs.h | 2 drivers/usb/typec/tcpm/tcpm.c | 2 drivers/watchdog/bcm2835_wdt.c | 1 fs/afs/cmservice.c | 10 fs/afs/dir.c | 89 +++++- fs/afs/file.c | 12 fs/afs/vlclient.c | 11 fs/btrfs/extent-tree.c | 14 - fs/nfs/direct.c | 27 +- fs/nfs/flexfilelayout/flexfilelayout.c | 17 - fs/nfs/pagelist.c | 17 - include/linux/logic_pio.h | 1 include/linux/sunrpc/sched.h | 1 include/net/addrconf.h | 2 kernel/bpf/syscall.c | 30 +- kernel/dma/direct.c | 3 kernel/locking/rwsem-xadd.c | 6 kernel/trace/ftrace.c | 17 + lib/logic_pio.c | 73 ++++- mm/memcontrol.c | 18 - mm/zsmalloc.c | 2 net/core/stream.c | 16 - net/hsr/hsr_device.c | 15 - net/hsr/hsr_framereg.c | 11 net/hsr/hsr_framereg.h | 3 net/ipv4/icmp.c | 8 net/ipv4/igmp.c | 4 net/ipv6/addrconf.c | 3 net/mac80211/cfg.c | 9 net/mac80211/rx.c | 6 net/mpls/mpls_iptunnel.c | 8 net/openvswitch/conntrack.c | 13 net/smc/smc_tx.c | 6 net/sunrpc/clnt.c | 35 +- net/sunrpc/xprt.c | 7 net/wireless/reg.c | 2 net/wireless/util.c | 23 + net/xfrm/xfrm_policy.c | 4 sound/core/seq/seq_clientmgr.c | 3 sound/core/seq/seq_fifo.c | 17 + sound/core/seq/seq_fifo.h | 2 sound/pci/hda/patch_ca0132.c | 1 sound/pci/hda/patch_conexant.c | 17 - sound/soc/soc-core.c | 7 sound/usb/line6/pcm.c | 18 - sound/usb/mixer.c | 36 ++ sound/usb/mixer_quirks.c | 8 sound/usb/pcm.c | 1 tools/hv/hv_kvp_daemon.c | 2 tools/hv/hv_vss_daemon.c | 2 tools/hv/lsvmbus | 75 +++-- tools/power/x86/turbostat/turbostat.c | 2 tools/testing/selftests/bpf/Makefile | 3 virt/kvm/arm/vgic/vgic-mmio.c | 18 + virt/kvm/arm/vgic/vgic-v2.c | 5 virt/kvm/arm/vgic/vgic-v3.c | 5 virt/kvm/arm/vgic/vgic.c | 7 146 files changed, 1557 insertions(+), 669 deletions(-)
Aaron Liu (1):
drm/amdgpu: fix GFXOFF on Picasso and Raven2
Adrian Vladu (2):
tools: hv: fixed Python pep8/flake8 warnings for lsvmbus
tools: hv: fix KVP and VSS daemons exit code
Alexander Shishkin (2):
intel_th: pci: Add support for another Lewisburg PCH
intel_th: pci: Add Tiger Lake support
Alexander Wetzel (1):
cfg80211: Fix Extended Key ID key install checks
Alexey Kardashevskiy (1):
KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling
Alexey Kodanev (1):
ipv4: mpls: fix mpls_xmit for iptunnel
Anders Roxell (1):
selftests/bpf: install files test_xdp_vlan.sh
Andrew Cooks (1):
i2c: piix4: Fix port selection for AMD Family 16h Model 30h
Andrew Morton (1):
mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n
Anthony Iliopoulos (1):
nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns
Antoine Tenart (1):
net: cpsw: fix NULL pointer exception in the probe error path
Arnd Bergmann (1):
dmaengine: ste_dma40: fix unneeded variable warning
Bandan Das (2):
x86/apic: Do not initialize LDR and DFR for bigsmp x86/apic: Include the LDR when clearing out APIC registers
Baolin Wang (1):
mmc: sdhci-sprd: Implement the get_max_timeout_count() interface
Ben Segal (3):
habanalabs: fix endianness handling for packets from user
habanalabs: fix completion queue handling when host is BE
habanalabs: fix device IRQ unmasking for BE host
Benjamin Herrenschmidt (2):
usb: gadget: composite: Clear "suspended" on reset/disconnect
usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt
Benjamin Tissoires (1):
HID: logitech-hidpp: remove support for the G700 over USB
Christian König (1):
drm/scheduler: use job count instead of peek
Chunyan Zhang (5):
mmc: sdhci-sprd: fixed incorrect clock divider
mmc: sdhci-sprd: add SDHCI_QUIRK2_PRESET_VALUE_BROKEN
mms: sdhci-sprd: add SDHCI_QUIRK_BROKEN_CARD_DETECTION
mmc: sdhci-sprd: clear the UHS-I modes read from registers
mmc: sdhci-sprd: add get_ro hook function
Colin Ian King (1):
typec: tcpm: fix a typo in the comparison of pdo_max_voltage
Cong Wang (3):
hsr: implement dellink to clean up resources
hsr: fix a NULL pointer deref in hsr_dev_xmit()
hsr: switch ->dellink() to ->ndo_uninit()
Daniel Borkmann (1):
bpf: fix use after free in prog symbol exposure
David Howells (4):
afs: Fix the CB.ProbeUuid service handler to reply correctly
afs: Fix off-by-one in afs_rename() expected data version calculation
afs: Only update d_fsdata if different in afs_d_revalidate()
afs: Fix missing dentry data version updating
Denis Kenzior (2):
mac80211: Don't memset RXCB prior to PAE intercept
mac80211: Correctly set noencrypt for PAE frames
Ding Xiang (1):
stm class: Fix a double free of stm_source_device
Dmitry Osipenko (1):
Revert "mmc: sdhci-tegra: drop ->get_ro() implementation"
Eddie James (1):
fsi: scom: Don't abort operations for minor errors
Eric Dumazet (1):
tcp: make sure EPOLLOUT wont be missed
Eugen Hristev (1):
mmc: sdhci-of-at91: add quirk for broken HS200
Gary R Hook (1):
crypto: ccp - Ignore unconfigured CCP device on suspend/resume
Geert Uytterhoeven (1):
usb: host: xhci: rcar: Fix typo in compatible string matching
Greg Kroah-Hartman (3):
x86/ptrace: fix up botched merge of spectrev1 fix Revert "ASoC: Fail card instantiation if DAI format setup fails" Linux 5.2.12
Hangbin Liu (3):
ipv6/addrconf: allow adding multicast addr if IFA_F_MCAUTOJOIN is set ipv4/icmp: fix rt dst dev null pointer dereference xfrm/xfrm_policy: fix dst dev null pointer dereference in collect_md mode
Hans Ulli Kroll (1):
usb: host: fotg2: restart hcd after port reset
Hans Verkuil (1):
omap-dma/omap_vout_vrfb: fix off-by-one fi value
Henk van der Laan (1):
usb-storage: Add new JMS567 revision to unusual_devs
Heyi Guo (1):
KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long
Hodaszi, Robert (1):
Revert "cfg80211: fix processing world regdomain when non modular"
Ihab Zhaika (4):
iwlwifi: add new cards for 22000 and fix struct name
iwlwifi: add new cards for 22000 and change wrong structs
iwlwifi: add new cards for 9000 and 20000 series
iwlwifi: change 0x02F0 fw from qu to quz
Jan Stancek (1):
locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty
Jason Baron (1):
net/smc: make sure EPOLLOUT is raised
Jeronimo Borque (1):
ALSA: hda - Fixes inverted Conexant GPIO mic mute led
Jia-Ju Bai (2):
fs: afs: Fix a possible null-pointer dereference in afs_put_read()
dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler()
Johannes Berg (1):
mac80211: fix possible sta leak
John Garry (5):
lib: logic_pio: Fix RCU usage
lib: logic_pio: Avoid possible overlap for unregistering regions
lib: logic_pio: Add logic_pio_unregister_range()
bus: hisi_lpc: Unregister logical PIO range to avoid potential use-after-free
bus: hisi_lpc: Add .remove method to avoid driver unbind crash
Kai-Heng Feng (3):
USB: storage: ums-realtek: Update module parameter description for auto_delink_en
USB: storage: ums-realtek: Whitelist auto-delink support drm/amdgpu: Add APTX quirk for Dell Latitude 5495
Keith Busch (1):
nvme-pci: Fix async probe remove race
Li RongQing (1):
net: fix __ip_mc_inc_group usage
Logan Gunthorpe (4):
nvmet: Fix use-after-free bug when a port is removed
nvmet-loop: Flush nvme_delete_wq when removing the port
nvmet-file: fix nvmet_file_flush() always returning an error
nvme-core: Fix extra device_put() call on error path
Lorenzo Bianconi (1):
mt76: usb: fix rx A-MSDU support
Luca Coelho (3):
iwlwifi: pcie: add support for qu c-step devices
iwlwifi: pcie: don't switch FW to qnj when ax201 is detected
iwlwifi: pcie: handle switching killer Qu B0 NICs to C0
Lucas Stach (1):
dma-direct: don't truncate dma_required_mask to bus addressing capabilities
Lyude Paul (1):
drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe()
Manasi Navare (1):
drm/i915/dp: Fix DSC enable code to use cpu_transcoder instead of encoder->type
Marc Dionne (1):
afs: Fix loop index mixup in afs_deliver_vl_get_entry_by_name_u()
Marc Zyngier (1):
KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI
Masahiro Yamada (1):
mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing
Nadav Amit (1):
VMCI: Release resource if the work is already queued
Naveen N. Rao (2):
ftrace: Fix NULL pointer dereference in t_probe_next()
ftrace: Check for successful allocation of hash
Oded Gabbay (1):
habanalabs: fix endianness handling for internal QMAN submission
Oliver Neukum (2):
usbtmc: more sanity checking for packet size
USB: cdc-wdm: fix race between write and disconnect due to flag abuse
Paul Walmsley (1):
riscv: fix flush_tlb_range() end address for flush_tlb_page()
Paweł Rekowski (1):
ALSA: hda/ca0132 - Add new SBZ quirk
Peter Chen (1):
usb: chipidea: udc: don't do hardware access if gadget has stopped
Peter Zijlstra (1):
lcoking/rwsem: Add missing ACQUIRE to read_slowpath sleep loop
Pierre-Louis Bossart (2):
soundwire: cadence_master: fix register definition for SLAVE_STATE
soundwire: cadence_master: fix definitions for INTSTAT0/1
Pu Wen (1):
tools/power turbostat: Fix caller parameter of get_tdp_amd()
Qu Wenruo (1):
btrfs: trim: Check the range passed into to prevent overflow
Radim Krcmar (1):
kvm: x86: skip populating logical dest map if apic is not sw enabled
Raul E Rangel (1):
lkdtm/bugs: fix build error in lkdtm_EXHAUST_STACK
Robin Murphy (1):
iommu/dma: Handle SG length overflow better
Roman Gushchin (1):
mm, memcg: partially revert "mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones"
Sagi Grimberg (3):
nvme: fix a possible deadlock when passthru commands sent to a multipath device
nvme-rdma: fix possible use-after-free in connect error flow
nvme: fix controller removal race with scan work
Schmid, Carsten (1):
usb: hcd: use managed device resources
Sean Christopherson (1):
KVM: x86: Don't update RIP or do single-step on faulting emulation
Sebastian Mayr (1):
uprobes/x86: Fix detection of 32-bit user mode
Shakeel Butt (1):
mm: memcontrol: fix percpu vmstats and vmevents flush
Stanislaw Gruszka (1):
mt76: mt76x0u: do not reset radio on resume
Stefan Wahren (1):
watchdog: bcm2835_wdt: Fix module autoload
Stefano Brivio (1):
ipv6: Fix return value of ipv6_mc_may_pull() for malformed packets
Steven Rostedt (VMware) (1):
ftrace: Check for empty hash and comment the race with registering probes
Takashi Iwai (5):
ALSA: usb-audio: Check mixer unit bitmap yet more strictly
ALSA: line6: Fix memory leak at line6_init_pcm() error path
ALSA: seq: Fix potential concurrent access to the deleted pool
ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate()
ALSA: usb-audio: Add implicit fb quirk for Behringer UFX1604
Thomas Gleixner (1):
x86/mm/cpa: Prevent large page split when ftrace flips RW on kernel text
Tomas Winkler (1):
mei: me: add Tiger Lake point LP device ID
Tomer Tayar (1):
habanalabs: fix DRAM usage accounting on context tear down
Tomi Valkeinen (1):
drm/bridge: tfp410: fix memleak in get_modes()
Trond Myklebust (4):
NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()
NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0 Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated"
SUNRPC: Don't handle errors if the bind/connect succeeded
Ulf Hansson (1):
mmc: core: Fix init of SD cards reporting an invalid VDD range
Ville Syrjälä (1):
drm/i915: Do not create a new max_bpc prop for MST connectors
Vitaly Kuznetsov (1):
KVM: x86: hyper-v: don't crash on KVM_GET_SUPPORTED_HV_CPUID when kvm_intel.nested is disabled
Wenwen Wang (1):
xen/blkback: fix memory leaks
Will Deacon (1):
arm64: cpufeature: Don't treat granule sizes as strict
Wolfram Sang (2):
i2c: rcar: avoid race when unregistering slave client
i2c: emev2: avoid race when unregistering slave client
Xiong Zhang (1):
drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
Y.C. Chen (1):
drm/ast: Fixed reboot test may cause system hanged
Yi-Hung Wei (1):
openvswitch: Fix conntrack cache with timeout
Yishai Hadas (1):
IB/mlx5: Fix implicit MR release flow
Yoshihiro Shimoda (1):
usb: host: ohci: fix a race condition between shutdown and irq
zhengbin (1):
auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 2 -SUBLEVEL = 11 +SUBLEVEL = 12 EXTRAVERSION = NAME = Bobtail Squid
arch/arm64/kernel/cpufeature.c +11 -3
@@ -184,9 +184,17 @@ static const struct arm64_ftr_bits ftr_id_aa64zfr0[] = { };static const struct arm64_ftr_bits ftr_id_aa64mmfr0[] = { -S_ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_TGRAN4_SHIFT ,4 ,ID_AA64MMFR0_TGRAN4_NI ), -S_ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_TGRAN64_SHIFT ,4 ,ID_AA64MMFR0_TGRAN64_NI ), -ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_TGRAN16_SHIFT ,4 ,ID_AA64MMFR0_TGRAN16_NI ), +/* +* We already refuse to boot CPUs that don't support our configured +* page size, so we can only detect mismatches for a page size other +* than the one we're currently using. Unfortunately, SoCs like this +* exist in the wild so, even though we don't like it, we'll have to go +* along with it and treat them as non-strict. +*/ +S_ARM64_FTR_BITS (FTR_HIDDEN ,FTR_NONSTRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_TGRAN4_SHIFT ,4 ,ID_AA64MMFR0_TGRAN4_NI ), +S_ARM64_FTR_BITS (FTR_HIDDEN ,FTR_NONSTRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_TGRAN64_SHIFT ,4 ,ID_AA64MMFR0_TGRAN64_NI ), +ARM64_FTR_BITS (FTR_HIDDEN ,FTR_NONSTRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_TGRAN16_SHIFT ,4 ,ID_AA64MMFR0_TGRAN16_NI ), +ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_BIGENDEL0_SHIFT ,4 ,0 ),/* Linux shouldn't care about secure memory */ ARM64_FTR_BITS (FTR_HIDDEN ,FTR_NONSTRICT ,FTR_LOWER_SAFE ,ID_AA64MMFR0_SNSMEM_SHIFT ,4 ,0 ),
arch/powerpc/kvm/book3s_64_vio.c +4 -2
@@ -696,8 +696,10 @@ long kvmppc_h_put_tce_indirect(struct kvm_vcpu *vcpu, } tce =be64_to_cpu (tce); -if (kvmppc_tce_to_ua (vcpu->kvm, tce, &ua)) -return H_PARAMETER ; +if (kvmppc_tce_to_ua (vcpu->kvm, tce, &ua)) { + ret =H_PARAMETER ; + goto unlock_exit; + }list_for_each_entry_lockless (stit, &stt->iommu_tables, next) { ret = kvmppc_tce_iommu_map(vcpu->kvm, stt,
arch/powerpc/kvm/book3s_64_vio_hv.c +4 -2
@@ -556,8 +556,10 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,unsigned long tce =be64_to_cpu (((u64 *)tces)[i]); ua =0 ; -if (kvmppc_rm_tce_to_ua (vcpu->kvm, tce, &ua,NULL )) -return H_PARAMETER ; +if (kvmppc_rm_tce_to_ua (vcpu->kvm, tce, &ua,NULL )) { + ret =H_PARAMETER ; + goto unlock_exit; + }list_for_each_entry_lockless (stit, &stt->iommu_tables, next) { ret = kvmppc_rm_tce_iommu_map(vcpu->kvm, stt,
arch/riscv/include/asm/tlbflush.h +9 -2
@@ -53,10 +53,17 @@ static inline void remote_sfence_vma(struct cpumask *cmask, unsigned long start, }#define flush_tlb_all () sbi_remote_sfence_vma(NULL, 0, -1) -#define flush_tlb_page (vma, addr) flush_tlb_range(vma, addr, 0) +#define flush_tlb_range (vma, start, end) \ remote_sfence_vma(mm_cpumask((vma)->vm_mm), start, (end) - (start)) -#define flush_tlb_mm (mm) \ + +static inline void flush_tlb_page (struct vm_area_struct *vma, +unsigned long addr) +{ +flush_tlb_range (vma, addr, addr +PAGE_SIZE ); +} + +#define flush_tlb_mm (mm) \ remote_sfence_vma(mm_cpumask(mm), 0, -1)#endif /* CONFIG_SMP */
arch/x86/kernel/apic/apic.c +4 -0
@@ -1152,6 +1152,10 @@ void clear_local_APIC(void)apic_write (APIC_LVT0 , v |APIC_LVT_MASKED ); v =apic_read (APIC_LVT1 );apic_write (APIC_LVT1 , v |APIC_LVT_MASKED ); +if (!x2apic_enabled ()) { + v =apic_read (APIC_LDR ) & ~APIC_LDR_MASK ; +apic_write (APIC_LDR , v); + }if (maxlvt >=4 ) { v =apic_read (APIC_LVTPC );apic_write (APIC_LVTPC , v |APIC_LVT_MASKED );
arch/x86/kernel/apic/bigsmp_32.c +2 -22
@@ -38,32 +38,12 @@ static int bigsmp_early_logical_apicid(int cpu)return early_per_cpu (x86_cpu_to_apicid, cpu); } -static inline unsigned long calculate_ldr (int cpu) -{ -unsigned long val, id; - - val =apic_read (APIC_LDR ) & ~APIC_LDR_MASK ; - id =per_cpu (x86_bios_cpu_apicid, cpu); - val |=SET_APIC_LOGICAL_ID (id); - -return val; -} -/* -* Set up the logical destination ID. -* -* Intel recommends to set DFR, LDR and TPR before enabling -* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel -* document number 292116). So here it goes... +* bigsmp enables physical destination mode +* and doesn't use LDR and DFR */ static void bigsmp_init_apic_ldr (void ) { -unsigned long val; -int cpu =smp_processor_id (); - -apic_write (APIC_DFR ,APIC_DFR_FLAT ); - val =calculate_ldr (cpu); -apic_write (APIC_LDR , val); }static void bigsmp_setup_apic_routing (void )
arch/x86/kernel/ptrace.c +1 -2
@@ -644,11 +644,10 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n) {struct thread_struct *thread = &tsk->thread;unsigned long val =0 ; -int index = n;if (n <HBP_NUM ) { +int index =array_index_nospec (n,HBP_NUM );struct perf_event *bp = thread->ptrace_bps[index]; - index =array_index_nospec (index,HBP_NUM );if (bp) val = bp->hw.info.address;
arch/x86/kernel/uprobes.c +10 -7
@@ -508,9 +508,12 @@ struct uprobe_xol_ops {void (*abort)(struct arch_uprobe *,struct pt_regs *); }; -static inline int sizeof_long (void ) +static inline int sizeof_long (struct pt_regs *regs) { -return in_ia32_syscall () ?4 :8 ; +/* +* Check registers for mode as in_xxx_syscall() does not apply here. +*/ +return user_64bit_mode (regs) ?8 :4 ; }static int default_pre_xol_op (struct arch_uprobe *auprobe,struct pt_regs *regs)
@@ -521,9 +524,9 @@ static int default_pre_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)static int emulate_push_stack (struct pt_regs *regs,unsigned long val) { -unsigned long new_sp = regs->sp -sizeof_long (); +unsigned long new_sp = regs->sp -sizeof_long (regs); -if (copy_to_user ((void __user *)new_sp, &val,sizeof_long ())) +if (copy_to_user ((void __user *)new_sp, &val,sizeof_long (regs)))return -EFAULT ; regs->sp = new_sp;
@@ -556,7 +559,7 @@ static int default_post_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regslong correction = utask->vaddr - utask->xol_vaddr; regs->ip += correction; }else if (auprobe->defparam.fixups &UPROBE_FIX_CALL ) { - regs->sp +=sizeof_long ();/* Pop incorrect return address */ + regs->sp +=sizeof_long (regs);/* Pop incorrect return address */ if (emulate_push_stack (regs, utask->vaddr + auprobe->defparam.ilen))return -ERESTART ; }
@@ -675,7 +678,7 @@ static int branch_post_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)* "call" insn was executed out-of-line. Just restore ->sp and restart. * We could also restore ->ip and try to call branch_emulate_op() again. */ - regs->sp +=sizeof_long (); + regs->sp +=sizeof_long (regs);return -ERESTART ; }
@@ -1056,7 +1059,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)unsigned long arch_uretprobe_hijack_return_addr (unsigned long trampoline_vaddr,struct pt_regs *regs) { -int rasize =sizeof_long (), nleft; +int rasize =sizeof_long (regs), nleft;unsigned long orig_ret_vaddr =0 ;/* clear high bits for 32-bit apps */ if (copy_from_user (&orig_ret_vaddr, (void __user *)regs->sp, rasize))
arch/x86/kvm/hyperv.c +4 -1
@@ -1783,7 +1783,7 @@ int kvm_vm_ioctl_hv_eventfd(struct kvm *kvm, struct kvm_hyperv_eventfd *args)int kvm_vcpu_ioctl_get_hv_cpuid (struct kvm_vcpu *vcpu,struct kvm_cpuid2 *cpuid,struct kvm_cpuid_entry2 __user *entries) { -uint16_t evmcs_ver = kvm_x86_ops->nested_get_evmcs_version (vcpu); +uint16_t evmcs_ver =0 ;struct kvm_cpuid_entry2 cpuid_entries[] = { { .function =HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS }, { .function =HYPERV_CPUID_INTERFACE },
@@ -1795,6 +1795,9 @@ int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, };int i, nent =ARRAY_SIZE (cpuid_entries); +if (kvm_x86_ops->nested_get_evmcs_version) + evmcs_ver = kvm_x86_ops->nested_get_evmcs_version (vcpu); +/* Skip NESTED_FEATURES if eVMCS is not supported */ if (!evmcs_ver) --nent;
arch/x86/kvm/lapic.c +5 -0
@@ -212,6 +212,9 @@ static void recalculate_apic_map(struct kvm *kvm)if (!apic_x2apic_mode (apic) && !new->phys_map[xapic_id]) new->phys_map[xapic_id] = apic; +if (!kvm_apic_sw_enabled (apic)) +continue ; + ldr =kvm_lapic_get_reg (apic,APIC_LDR );if (apic_x2apic_mode (apic)) {
@@ -254,6 +257,8 @@ static inline void apic_set_spiv(struct kvm_lapic *apic, u32 val)static_key_slow_dec_deferred (&apic_sw_disabled); else static_key_slow_inc(&apic_sw_disabled.key); + +recalculate_apic_map (apic->vcpu->kvm); } }
arch/x86/kvm/svm.c +1 -7
@@ -7107,12 +7107,6 @@ static int svm_unregister_enc_region(struct kvm *kvm,return ret; } -static uint16_t nested_get_evmcs_version (struct kvm_vcpu *vcpu) -{ -/* Not supported */ -return 0 ; -} -static int nested_enable_evmcs (struct kvm_vcpu *vcpu,uint16_t *vmcs_version) {
@@ -7283,7 +7277,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = { .mem_enc_unreg_region = svm_unregister_enc_region, .nested_enable_evmcs = nested_enable_evmcs, - .nested_get_evmcs_version = nested_get_evmcs_version, + .nested_get_evmcs_version = NULL, .need_emulation_on_page_fault = svm_need_emulation_on_page_fault, };
arch/x86/kvm/vmx/vmx.c +1 -0
@@ -7733,6 +7733,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = { .set_nested_state = NULL, .get_vmcs12_pages = NULL, .nested_enable_evmcs = NULL, + .nested_get_evmcs_version = NULL, .need_emulation_on_page_fault = vmx_need_emulation_on_page_fault, };
arch/x86/kvm/x86.c +5 -4
@@ -6547,12 +6547,13 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,unsigned long rflags = kvm_x86_ops->get_rflags (vcpu);toggle_interruptibility (vcpu, ctxt->interruptibility); vcpu->arch.emulate_regs_need_sync_to_vcpu = false; -kvm_rip_write (vcpu, ctxt->eip); -if (r ==EMULATE_DONE && ctxt->tf) -kvm_vcpu_do_singlestep (vcpu, &r);if (!ctxt->have_exception || -exception_type (ctxt->exception.vector) ==EXCPT_TRAP ) +exception_type (ctxt->exception.vector) ==EXCPT_TRAP ) { +kvm_rip_write (vcpu, ctxt->eip); +if (r ==EMULATE_DONE && ctxt->tf) +kvm_vcpu_do_singlestep (vcpu, &r);__kvm_set_rflags (vcpu, ctxt->eflags); + }/* * For STI, interrupts are shadowed; so KVM_REQ_EVENT will
arch/x86/mm/pageattr.c +18 -8
@@ -516,7 +516,7 @@ static inline void check_conflict(int warnlvl, pgprot_t prot, pgprotval_t val,*/ static inline pgprot_t static_protections (pgprot_t prot,unsigned long start,unsigned long pfn,unsigned long npg, -int warnlvl) +unsigned long lpsize,int warnlvl) {pgprotval_t forbidden, res;unsigned long end;
@@ -535,9 +535,17 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long start,check_conflict (warnlvl, prot, res, start, end, pfn,"Text NX" ); forbidden = res; - res =protect_kernel_text_ro (start, end); -check_conflict (warnlvl, prot, res, start, end, pfn,"Text RO" ); - forbidden |= res; +/* +* Special case to preserve a large page. If the change spawns the +* full large page mapping then there is no point to split it +* up. Happens with ftrace and is going to be removed once ftrace +* switched to text_poke(). +*/ +if (lpsize != (npg *PAGE_SIZE ) || (start & (lpsize -1 ))) { + res =protect_kernel_text_ro (start, end); +check_conflict (warnlvl, prot, res, start, end, pfn,"Text RO" ); + forbidden |= res; + }/* Check the PFN directly */ res =protect_pci_bios (pfn, pfn + npg -1 );
@@ -819,7 +827,7 @@ static int __should_split_large_page(pte_t *kpte, unsigned long address,* extra conditional required here. */ chk_prot =static_protections (old_prot, lpaddr, old_pfn, numpages, -CPA_CONFLICT ); + psize,CPA_CONFLICT );if (WARN_ON_ONCE (pgprot_val (chk_prot) !=pgprot_val (old_prot))) {/*
@@ -855,7 +863,7 @@ static int __should_split_large_page(pte_t *kpte, unsigned long address,* protection requirement in the large page. */ new_prot =static_protections (req_prot, lpaddr, old_pfn, numpages, -CPA_DETECT ); + psize,CPA_DETECT );/* * If there is a conflict, split the large page.
@@ -906,7 +914,8 @@ static void split_set_pte(struct cpa_data *cpa, pte_t *pte, unsigned long pfn,if (!cpa->force_static_prot) goto set; - prot =static_protections (ref_prot, address, pfn, npg,CPA_PROTECT ); +/* Hand in lpsize = 0 to enforce the protection mechanism */ + prot =static_protections (ref_prot, address, pfn, npg,0 ,CPA_PROTECT );if (pgprot_val (prot) ==pgprot_val (ref_prot)) goto set;
@@ -1503,7 +1512,8 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)pgprot_val (new_prot) |=pgprot_val (cpa->mask_set);cpa_inc_4k_install (); - new_prot =static_protections (new_prot, address, pfn,1 , +/* Hand in lpsize = 0 to enforce the protection mechanism */ + new_prot =static_protections (new_prot, address, pfn,1 ,0 ,CPA_PROTECT ); new_prot =pgprot_clear_protnone_bits (new_prot);
drivers/auxdisplay/panel.c +2 -0
@@ -1617,6 +1617,8 @@ static void panel_attach(struct parport *port)return ; err_lcd_unreg: +if (scan_timer.function) +del_timer_sync (&scan_timer);if (lcd.enabled)charlcd_unregister (lcd.charlcd); err_unreg_device:
drivers/block/xen-blkback/xenbus.c +3 -3
@@ -965,6 +965,7 @@ static int read_per_ring_refs(struct xen_blkif_ring *ring, const char *dir) } } + err = -ENOMEM ;for (i =0 ; i < nr_grefs *XEN_BLKIF_REQS_PER_PAGE ; i++) { req =kzalloc (sizeof (*req),GFP_KERNEL );if (!req)
@@ -987,7 +988,7 @@ static int read_per_ring_refs(struct xen_blkif_ring *ring, const char *dir) err =xen_blkif_map (ring, ring_ref, nr_grefs, evtchn);if (err) {xenbus_dev_fatal (dev, err,"mapping ring-ref port %u" , evtchn); -return err; + goto fail; }return 0 ;
@@ -1007,8 +1008,7 @@ static int read_per_ring_refs(struct xen_blkif_ring *ring, const char *dir) }kfree (req); } -return -ENOMEM ; - +return err; }static int connect_ring (struct backend_info *be)
drivers/bus/hisi_lpc.c +41 -6
96 lines not on this page · raw message
drivers/crypto/ccp/ccp-dev.c +8 -0
@@ -540,6 +540,10 @@ int ccp_dev_suspend(struct sp_device *sp, pm_message_t state)unsigned long flags;unsigned int i; +/* If there's no device there's nothing to do */ +if (!ccp) +return 0 ; +spin_lock_irqsave (&ccp->cmd_lock, flags); ccp->suspending =1 ;
@@ -564,6 +568,10 @@ int ccp_dev_resume(struct sp_device *sp)unsigned long flags;unsigned int i; +/* If there's no device there's nothing to do */ +if (!ccp) +return 0 ; +spin_lock_irqsave (&ccp->cmd_lock, flags); ccp->suspending =0 ;
drivers/dma/ste_dma40.c +2 -2
@@ -142,7 +142,7 @@ enum d40_events {* when the DMA hw is powered off. * TODO: Add save/restore of D40_DREG_GCC on dma40 v3 or later, if that works. */ -static u32 d40_backup_regs[] = { +static __maybe_unused u32 d40_backup_regs[] = {D40_DREG_LCPA ,D40_DREG_LCLA ,D40_DREG_PRMSE ,
@@ -211,7 +211,7 @@ static u32 d40_backup_regs_v4b[] = {#define BACKUP_REGS_SZ_V4B ARRAY_SIZE(d40_backup_regs_v4b) -static u32 d40_backup_regs_chan[] = { +static __maybe_unused u32 d40_backup_regs_chan[] = {D40_CHAN_REG_SSCFG ,D40_CHAN_REG_SSELT ,D40_CHAN_REG_SSPTR ,
drivers/dma/stm32-mdma.c +1 -1
@@ -1366,7 +1366,7 @@ static irqreturn_t stm32_mdma_irq_handler(int irq, void *devid) chan = &dmadev->chan[id];if (!chan) { -dev_err (chan2dev (chan),"MDMA channel not initialized\n" ); +dev_dbg (mdma2dev (dmadev),"MDMA channel not initialized\n" ); goto exit; }
drivers/dma/ti/omap-dma.c +2 -2
@@ -1234,7 +1234,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_interleaved(if (src_icg) { d->ccr |=CCR_SRC_AMODE_DBLIDX ; d->ei =1 ; - d->fi = src_icg; + d->fi = src_icg +1 ; }else if (xt->src_inc) { d->ccr |=CCR_SRC_AMODE_POSTINC ; d->fi =0 ;
@@ -1249,7 +1249,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_interleaved(if (dst_icg) { d->ccr |=CCR_DST_AMODE_DBLIDX ; sg->ei =1 ; - sg->fi = dst_icg; + sg->fi = dst_icg +1 ; }else if (xt->dst_inc) { d->ccr |=CCR_DST_AMODE_POSTINC ; sg->fi =0 ;
drivers/fsi/fsi-scom.c +1 -7
@@ -38,8 +38,7 @@#define SCOM_STATUS_PIB_RESP_MASK 0x00007000#define SCOM_STATUS_PIB_RESP_SHIFT 12 -#define SCOM_STATUS_ANY_ERR (SCOM_STATUS_ERR_SUMMARY | \ - SCOM_STATUS_PROTECTION | \ +#define SCOM_STATUS_ANY_ERR (SCOM_STATUS_PROTECTION | \ SCOM_STATUS_PARITY | \ SCOM_STATUS_PIB_ABORT | \ SCOM_STATUS_PIB_RESP_MASK)
@@ -251,11 +250,6 @@ static int handle_fsi2pib_status(struct scom_device *scom, uint32_t status)/* Return -EBUSY on PIB abort to force a retry */ if (status &SCOM_STATUS_PIB_ABORT )return -EBUSY ; -if (status &SCOM_STATUS_ERR_SUMMARY ) { -fsi_device_write (scom->fsi_dev,SCOM_FSI2PIB_RESET_REG , &dummy, -sizeof (uint32_t )); -return -EIO ; - }return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +1 -0
@@ -574,6 +574,7 @@ static const struct amdgpu_px_quirk amdgpu_px_quirk_list[] = { { 0x1002, 0x6900, 0x1002, 0x0124, AMDGPU_PX_QUIRK_FORCE_ATPX }, { 0x1002, 0x6900, 0x1028, 0x0812, AMDGPU_PX_QUIRK_FORCE_ATPX }, { 0x1002, 0x6900, 0x1028, 0x0813, AMDGPU_PX_QUIRK_FORCE_ATPX }, + { 0x1002, 0x699f, 0x1028, 0x0814, AMDGPU_PX_QUIRK_FORCE_ATPX }, { 0x1002, 0x6900, 0x1025, 0x125A, AMDGPU_PX_QUIRK_FORCE_ATPX }, { 0x1002, 0x6900, 0x17AA, 0x3806, AMDGPU_PX_QUIRK_FORCE_ATPX }, { 0, 0, 0, 0, 0 },
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +7 -7
@@ -588,14 +588,14 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)case CHIP_VEGA20 :break ;case CHIP_RAVEN : -if (adev->rev_id >=0x8 || adev->pdev->device ==0x15d8 ) -break ; -if ((adev->gfx.rlc_fw_version !=106 && - adev->gfx.rlc_fw_version <531 ) || - (adev->gfx.rlc_fw_version ==53815 ) || - (adev->gfx.rlc_feature_version <1 ) || - !adev->gfx.rlc.is_rlc_v2_1) +if (!(adev->rev_id >=0x8 || adev->pdev->device ==0x15d8 ) + &&((adev->gfx.rlc_fw_version !=106 && + adev->gfx.rlc_fw_version <531 ) || + (adev->gfx.rlc_fw_version ==53815 ) || + (adev->gfx.rlc_feature_version <1 ) || + !adev->gfx.rlc.is_rlc_v2_1)) adev->pm.pp_feature &= ~PP_GFXOFF_MASK ; +if (adev->pm.pp_feature &PP_GFXOFF_MASK ) adev->pg_flags |=AMD_PG_SUPPORT_GFX_PG | AMD_PG_SUPPORT_CP |
drivers/gpu/drm/ast/ast_main.c +4 -1
@@ -131,8 +131,8 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)/* Enable extended register access */ -ast_enable_mmio (dev);ast_open_key (ast); +ast_enable_mmio (dev);/* Find out whether P2A works or whether to use device-tree */ ast_detect_config_mode (dev, &scu_rev);
@@ -576,6 +576,9 @@ void ast_driver_unload(struct drm_device *dev) {struct ast_private *ast = dev->dev_private; +/* enable standard VGA decode */ +ast_set_index_reg (ast,AST_IO_CRTC_PORT ,0xa1 ,0x04 ); +ast_release_firmware (dev);kfree (ast->dp501_fw_addr);ast_mode_fini (dev);
drivers/gpu/drm/ast/ast_mode.c +1 -1
@@ -601,7 +601,7 @@ static int ast_crtc_mode_set(struct drm_crtc *crtc,return -EINVAL ;ast_open_key (ast); -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xa1 ,0xff ,0x04 ); +ast_set_index_reg (ast,AST_IO_CRTC_PORT ,0xa1 ,0x06 );ast_set_std_reg (crtc, adjusted_mode, &vbios_mode);ast_set_crtc_reg (crtc, adjusted_mode, &vbios_mode);
drivers/gpu/drm/ast/ast_post.c +1 -1
@@ -46,7 +46,7 @@ void ast_enable_mmio(struct drm_device *dev) {struct ast_private *ast = dev->dev_private; -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xa1 ,0xff ,0x04 ); +ast_set_index_reg (ast,AST_IO_CRTC_PORT ,0xa1 ,0x06 ); }
drivers/gpu/drm/bridge/ti-tfp410.c +6 -1
@@ -66,7 +66,12 @@ static int tfp410_get_modes(struct drm_connector *connector)drm_connector_update_edid_property (connector, edid); -return drm_add_edid_modes (connector, edid); + ret =drm_add_edid_modes (connector, edid); + +kfree (edid); + +return ret; + fallback:/* No EDID, fallback on the XGA standard modes */ ret =drm_add_modes_noedid (connector,1920 ,1200 );
drivers/gpu/drm/i915/i915_drv.c +6 -0
@@ -1569,6 +1569,12 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)pci_set_master (pdev); +/* +* We don't have a max segment size, so set it to the max so sg's +* debugging layer doesn't complain +*/ +dma_set_max_seg_size (&pdev->dev,UINT_MAX ); +/* overlay on gen2 is broken and can't address above 1G */ if (IS_GEN (dev_priv,2 )) { ret =dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (30 ));
drivers/gpu/drm/i915/i915_vgpu.c +3 -0
@@ -101,6 +101,9 @@ static struct _balloon_info_ bl_info;static void vgt_deballoon_space (struct i915_ggtt *ggtt,struct drm_mm_node *node) { +if (!drm_mm_node_allocated (node)) +return ; + DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n", node->start, node->start + node->size,
drivers/gpu/drm/i915/intel_dp_mst.c +9 -1
@@ -535,7 +535,15 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolointel_attach_force_audio_property (connector);intel_attach_broadcast_rgb_property (connector); -drm_connector_attach_max_bpc_property (connector,6 ,12 ); + +/* +* Reuse the prop from the SST connector because we're +* not allowed to create new props after device registration. +*/ + connector->max_bpc_property = + intel_dp->attached_connector->base.max_bpc_property; +if (connector->max_bpc_property) +drm_connector_attach_max_bpc_property (connector,6 ,12 );return connector;
drivers/gpu/drm/i915/intel_vdsc.c +1 -1
@@ -539,7 +539,7 @@ static void intel_configure_pps_for_dsc_encoder(struct intel_encoder *encoder, pps_val |=DSC_PIC_HEIGHT (vdsc_cfg->pic_height) |DSC_PIC_WIDTH (vdsc_cfg->pic_width / num_vdsc_instances);DRM_INFO ("PPS2 = 0x%08x\n" , pps_val); -if (encoder->type ==INTEL_OUTPUT_EDP ) { +if (cpu_transcoder ==TRANSCODER_EDP ) {I915_WRITE (DSCA_PICTURE_PARAMETER_SET_2 , pps_val);/* * If 2 VDSC instances are needed, configure PPS for second
drivers/gpu/drm/scheduler/sched_entity.c +2 -2
@@ -95,7 +95,7 @@ static bool drm_sched_entity_is_idle(struct drm_sched_entity *entity)rmb ();/* for list_empty to work without lock */ if (list_empty (&entity->list) || -spsc_queue_peek (&entity->job_queue) ==NULL ) +spsc_queue_count (&entity->job_queue) ==0 )return true;return false;
@@ -281,7 +281,7 @@ void drm_sched_entity_fini(struct drm_sched_entity *entity)/* Consumption of existing IBs wasn't completed. Forcefully * remove them here. */ -if (spsc_queue_peek (&entity->job_queue)) { +if (spsc_queue_count (&entity->job_queue)) {if (sched) {/* Park the kernel for a moment to make sure it isn't processing * our enity.
drivers/hid/hid-logitech-hidpp.c +0 -2
@@ -3769,8 +3769,6 @@ static const struct hid_device_id hidpp_devices[] = { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC332) }, {/* Logitech G502 Hero Gaming Mouse over USB */ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08B) }, - { /* Logitech G700 Gaming Mouse over USB */ - HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC06B) }, { /* Logitech G700s Gaming Mouse over USB */ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07C) }, { /* Logitech G703 Gaming Mouse over USB */
drivers/hwtracing/intel_th/pci.c +10 -0
@@ -164,6 +164,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa1a6), .driver_data = (kernel_ulong_t )0 , }, + { +/* Lewisburg PCH */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0xa226 ), + .driver_data = (kernel_ulong_t)0, + }, {/* Gemini Lake */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x318e),
@@ -199,6 +204,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x45c5), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Tiger Lake PCH */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa0a6), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, { 0 }, };
drivers/hwtracing/stm/core.c +0 -1
@@ -1276,7 +1276,6 @@ int stm_source_register_device(struct device *parent, err:put_device (&src->dev); -kfree (src);return err; }
drivers/i2c/busses/i2c-emev2.c +12 -4
@@ -69,6 +69,7 @@ struct em_i2c_device {struct completion msg_done;struct clk *sclk;struct i2c_client *slave; +int irq; };static inline void em_clear_set_bit (struct em_i2c_device *priv,u8 clear,u8 set,u8 reg)
@@ -339,6 +340,12 @@ static int em_i2c_unreg_slave(struct i2c_client *slave)writeb (0 , priv->base +I2C_OFS_SVA0 ); +/* +* Wait for interrupt to finish. New slave irqs cannot happen because we +* cleared the slave address and, thus, only extension codes will be +* detected which do not use the slave ptr. +*/ +synchronize_irq (priv->irq); priv->slave =NULL ;return 0 ;
@@ -355,7 +362,7 @@ static int em_i2c_probe(struct platform_device *pdev) {struct em_i2c_device *priv;struct resource *r; -int irq, ret; +int ret; priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL );if (!priv)
@@ -390,8 +397,8 @@ static int em_i2c_probe(struct platform_device *pdev)em_i2c_reset (&priv->adap); - irq =platform_get_irq (pdev,0 ); - ret =devm_request_irq (&pdev->dev, irq, em_i2c_irq_handler,0 , + priv->irq =platform_get_irq (pdev,0 ); + ret =devm_request_irq (&pdev->dev, priv->irq, em_i2c_irq_handler,0 ,"em_i2c" , priv);if (ret) goto err_clk;
@@ -401,7 +408,8 @@ static int em_i2c_probe(struct platform_device *pdev)if (ret) goto err_clk; -dev_info (&pdev->dev,"Added i2c controller %d, irq %d\n" , priv->adap.nr, irq); +dev_info (&pdev->dev,"Added i2c controller %d, irq %d\n" , priv->adap.nr, + priv->irq);return 0 ;
drivers/i2c/busses/i2c-piix4.c +5 -7
@@ -91,7 +91,7 @@#define SB800_PIIX4_PORT_IDX_MASK 0x06#define SB800_PIIX4_PORT_IDX_SHIFT 1 -/* On kerncz, SmBus0Sel is at bit 20:19 of PMx00 DecodeEn */ +/* On kerncz and Hudson2, SmBus0Sel is at bit 20:19 of PMx00 DecodeEn */ #define SB800_PIIX4_PORT_IDX_KERNCZ 0x02#define SB800_PIIX4_PORT_IDX_MASK_KERNCZ 0x18#define SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ 3
@@ -358,18 +358,16 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,/* Find which register is used for port selection */ if (PIIX4_dev->vendor ==PCI_VENDOR_ID_AMD || PIIX4_dev->vendor ==PCI_VENDOR_ID_HYGON ) { -switch (PIIX4_dev->device) { -case PCI_DEVICE_ID_AMD_KERNCZ_SMBUS : +if (PIIX4_dev->device ==PCI_DEVICE_ID_AMD_KERNCZ_SMBUS || + (PIIX4_dev->device ==PCI_DEVICE_ID_AMD_HUDSON2_SMBUS && + PIIX4_dev->revision >=0x1F )) { piix4_port_sel_sb800 =SB800_PIIX4_PORT_IDX_KERNCZ ; piix4_port_mask_sb800 =SB800_PIIX4_PORT_IDX_MASK_KERNCZ ; piix4_port_shift_sb800 =SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ ; -break ; -case PCI_DEVICE_ID_AMD_HUDSON2_SMBUS : -default : + }else { piix4_port_sel_sb800 =SB800_PIIX4_PORT_IDX_ALT ; piix4_port_mask_sb800 =SB800_PIIX4_PORT_IDX_MASK ; piix4_port_shift_sb800 =SB800_PIIX4_PORT_IDX_SHIFT ; -break ; } } else { if (!request_muxed_region(SB800_PIIX4_SMB_IDX, 2,
drivers/i2c/busses/i2c-rcar.c +7 -4
@@ -139,6 +139,7 @@ struct rcar_i2c_priv {enum dma_data_direction dma_direction;struct reset_control *rstc; +int irq; };#define rcar_i2c_priv_to_dev (p) ((p)->adap.dev.parent)
@@ -861,9 +862,11 @@ static int rcar_unreg_slave(struct i2c_client *slave)WARN_ON (!priv->slave); +/* disable irqs and ensure none is running before clearing ptr */ rcar_i2c_write (priv,ICSIER ,0 );rcar_i2c_write (priv,ICSCR ,0 ); +synchronize_irq (priv->irq); priv->slave =NULL ;pm_runtime_put (rcar_i2c_priv_to_dev (priv));
@@ -918,7 +921,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)struct i2c_adapter *adap;struct device *dev = &pdev->dev;struct i2c_timings i2c_t; -int irq, ret; +int ret;/* Otherwise logic will break because some bytes must always use PIO */ BUILD_BUG_ON_MSG (RCAR_MIN_DMA_LEN <3 ,"Invalid min DMA length" );
@@ -984,10 +987,10 @@ static int rcar_i2c_probe(struct platform_device *pdev)pm_runtime_put (dev); - irq =platform_get_irq (pdev,0 ); - ret =devm_request_irq (dev, irq, rcar_i2c_irq,0 ,dev_name (dev), priv); + priv->irq =platform_get_irq (pdev,0 ); + ret =devm_request_irq (dev, priv->irq, rcar_i2c_irq,0 ,dev_name (dev), priv);if (ret <0 ) { -dev_err (dev,"cannot get irq %d\n" , irq); +dev_err (dev,"cannot get irq %d\n" , priv->irq); goto out_pm_disable; }
drivers/infiniband/core/umem_odp.c +0 -4
@@ -114,10 +114,6 @@ static int ib_umem_notifier_release_trampoline(struct ib_umem_odp *umem_odp,* prevent any further fault handling on this MR. */ ib_umem_notifier_start_account (umem_odp); - umem_odp->dying =1 ; -/* Make sure that the fact the umem is dying is out before we release -* all pending page faults. */ -smp_wmb ();complete_all (&umem_odp->notifier_completion); umem->context->invalidate_range (umem_odp,ib_umem_start (umem),ib_umem_end (umem));
drivers/infiniband/hw/mlx5/odp.c +9 -15
@@ -581,7 +581,6 @@ static int pagefault_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr, u32 flags) {int npages =0 , current_seq, page_shift, ret, np; -bool implicit = false;struct ib_umem_odp *odp_mr =to_ib_umem_odp (mr->umem);bool downgrade = flags &MLX5_PF_FLAGS_DOWNGRADE ;bool prefetch = flags &MLX5_PF_FLAGS_PREFETCH ;
@@ -596,7 +595,6 @@ static int pagefault_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr,if (IS_ERR (odp))return PTR_ERR (odp); mr = odp->private; - implicit = true; }else { odp = odp_mr; }
@@ -684,19 +682,15 @@ static int pagefault_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr, out:if (ret == -EAGAIN ) { -if (implicit || !odp->dying) { -unsigned long timeout = -msecs_to_jiffies (MMU_NOTIFIER_TIMEOUT ); - -if (!wait_for_completion_timeout ( - &odp->notifier_completion, - timeout)) { -mlx5_ib_warn (dev,"timeout waiting for mmu notifier. seq %d against %d. notifiers_count=%d\n" , - current_seq, odp->notifiers_seq, odp->notifiers_count); - } - }else { -/* The MR is being killed, kill the QP as well. */ - ret = -EFAULT ; +unsigned long timeout =msecs_to_jiffies (MMU_NOTIFIER_TIMEOUT ); + +if (!wait_for_completion_timeout (&odp->notifier_completion, + timeout)) { +mlx5_ib_warn ( + dev, +"timeout waiting for mmu notifier. seq %d against %d. notifiers_count=%d\n" , + current_seq, odp->notifiers_seq, + odp->notifiers_count); } }
drivers/iommu/dma-iommu.c +1 -1
@@ -710,7 +710,7 @@ static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents,* - and wouldn't make the resulting output segment too long */ if (cur_len && !s_iova_off && (dma_addr & seg_mask) && - (cur_len + s_length <= max_len)) { + (max_len - cur_len >= s_length)) {/* ...then concatenate it with the previous one */ cur_len += s_length; }else {
drivers/media/platform/omap/omap_vout_vrfb.c +1 -2
@@ -253,8 +253,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device *vout,*/ pixsize = vout->bpp * vout->vrfb_bpp; - dst_icg = ((MAX_PIXELS_PER_LINE * pixsize) - - (vout->pix.width * vout->bpp)) +1 ; + dst_icg =MAX_PIXELS_PER_LINE * pixsize - vout->pix.width * vout->bpp; xt->src_start = vout->buf_phy_addr[vb->i]; xt->dst_start = vout->vrfb_context[vb->i].paddr[0 ];
drivers/misc/habanalabs/goya/goya.c +47 -25
161 lines not on this page · raw message
drivers/misc/habanalabs/goya/goyaP.h +1 -1
@@ -170,7 +170,7 @@ int goya_late_init(struct hl_device *hdev);void goya_late_fini (struct hl_device *hdev);void goya_ring_doorbell (struct hl_device *hdev,u32 hw_queue_id,u32 pi); -void goya_flush_pq_write (struct hl_device *hdev,u64 *pq,u64 exp_val); +void goya_pqe_write (struct hl_device *hdev,__le64 *pqe,struct hl_bd *bd);void goya_update_eq_ci (struct hl_device *hdev,u32 val);void goya_restore_phase_topology (struct hl_device *hdev);int goya_context_switch (struct hl_device *hdev,u32 asid);
drivers/misc/habanalabs/habanalabs.h +7 -2
@@ -449,7 +449,11 @@ enum hl_pll_frequency {* @resume: handles IP specific H/W or SW changes for resume. * @cb_mmap: maps a CB. * @ring_doorbell: increment PI on a given QMAN. -* @flush_pq_write: flush PQ entry write if necessary, WARN if flushing failed. +* @pqe_write: Write the PQ entry to the PQ. This is ASIC-specific +* function because the PQs are located in different memory areas +* per ASIC (SRAM, DRAM, Host memory) and therefore, the method of +* writing the PQE must match the destination memory area +* properties. * @asic_dma_alloc_coherent: Allocate coherent DMA memory by calling * dma_alloc_coherent(). This is ASIC function because * its implementation is not trivial when the driver
@@ -518,7 +522,8 @@ struct hl_asic_funcs {int (*cb_mmap)(struct hl_device *hdev,struct vm_area_struct *vma,u64 kaddress,phys_addr_t paddress,u32 size);void (*ring_doorbell)(struct hl_device *hdev,u32 hw_queue_id,u32 pi); -void (*flush_pq_write)(struct hl_device *hdev,u64 *pq,u64 exp_val); +void (*pqe_write)(struct hl_device *hdev,__le64 *pqe, +struct hl_bd *bd);void * (*asic_dma_alloc_coherent)(struct hl_device *hdev,size_t size,dma_addr_t *dma_handle,gfp_t flag); void (*asic_dma_free_coherent)(struct hl_device *hdev, size_t size,
drivers/misc/habanalabs/hw_queue.c +5 -9
@@ -290,23 +290,19 @@ static void int_hw_queue_schedule_job(struct hl_cs_job *job)struct hl_device *hdev = job->cs->ctx->hdev;struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];struct hl_bd bd; -u64 *pi, *pbd = (u64 *) &bd; +__le64 *pi; bd.ctl =0 ; - bd.len =__cpu_to_le32 (job->job_cb_size); - bd.ptr =__cpu_to_le64 ((u64 ) (uintptr_t ) job->user_cb); + bd.len =cpu_to_le32 (job->job_cb_size); + bd.ptr =cpu_to_le64 ((u64 ) (uintptr_t ) job->user_cb); - pi = (u64 *) (uintptr_t ) (q->kernel_address + + pi = (__le64 *) (uintptr_t ) (q->kernel_address + ((q->pi & (q->int_queue_len -1 )) *sizeof (bd))); - pi[0 ] = pbd[0 ]; - pi[1 ] = pbd[1 ]; - q->pi++; q->pi &= ((q->int_queue_len <<1 ) -1 ); -/* Flush PQ entry write. Relevant only for specific ASICs */ - hdev->asic_funcs->flush_pq_write (hdev, pi, pbd[0 ]); + hdev->asic_funcs->pqe_write (hdev, pi, &bd); hdev->asic_funcs->ring_doorbell (hdev, q->hw_queue_id, q->pi); }
drivers/misc/habanalabs/include/goya/goya_packets.h +13 -0
@@ -52,6 +52,19 @@ enum goya_dma_direction {#define GOYA_PKT_CTL_MB_SHIFT 31#define GOYA_PKT_CTL_MB_MASK 0x80000000 +/* All packets have, at least, an 8-byte header, which contains +* the packet type. The kernel driver uses the packet header for packet +* validation and to perform any necessary required preparation before +* sending them off to the hardware. +*/ +struct goya_packet { +__le64 header; +/* The rest of the packet data follows. Use the corresponding +* packet_XXX struct to deference the data, based on packet type +*/ +u8 contents[0 ]; +}; +struct packet_nop {__le32 reserved;__le32 ctl;
drivers/misc/habanalabs/irq.c +13 -14
@@ -80,8 +80,7 @@ irqreturn_t hl_irq_handler_cq(int irq, void *arg)struct hl_cs_job *job;bool shadow_index_valid;u16 shadow_index; -u32 *cq_entry; -u32 *cq_base; +struct hl_cq_entry *cq_entry, *cq_base;if (hdev->disabled) { dev_dbg(hdev->dev,
@@ -90,29 +89,29 @@ irqreturn_t hl_irq_handler_cq(int irq, void *arg)return IRQ_HANDLED ; } - cq_base = (u32 *) (uintptr_t ) cq->kernel_address; + cq_base = (struct hl_cq_entry *) (uintptr_t ) cq->kernel_address;while (1 ) { -bool entry_ready = ((cq_base[cq->ci] &CQ_ENTRY_READY_MASK ) +bool entry_ready = ((le32_to_cpu (cq_base[cq->ci].data) & +CQ_ENTRY_READY_MASK ) >>CQ_ENTRY_READY_SHIFT );if (!entry_ready)break ; - cq_entry = (u32 *) &cq_base[cq->ci]; + cq_entry = (struct hl_cq_entry *) &cq_base[cq->ci]; -/* -* Make sure we read CQ entry contents after we've +/* Make sure we read CQ entry contents after we've * checked the ownership bit. */ dma_rmb (); - shadow_index_valid = - ((*cq_entry &CQ_ENTRY_SHADOW_INDEX_VALID_MASK ) + shadow_index_valid = ((le32_to_cpu (cq_entry->data) & +CQ_ENTRY_SHADOW_INDEX_VALID_MASK ) >>CQ_ENTRY_SHADOW_INDEX_VALID_SHIFT ); - shadow_index = (u16) - ((*cq_entry &CQ_ENTRY_SHADOW_INDEX_MASK ) + shadow_index = (u16) ((le32_to_cpu (cq_entry->data) & +CQ_ENTRY_SHADOW_INDEX_MASK ) >>CQ_ENTRY_SHADOW_INDEX_SHIFT ); queue = &hdev->kernel_queues[cq->hw_queue_id];
@@ -122,8 +121,7 @@ irqreturn_t hl_irq_handler_cq(int irq, void *arg)queue_work (hdev->cq_wq, &job->finish_work); } -/* -* Update ci of the context's queue. There is no +/* Update ci of the context's queue. There is no * need to protect it with spinlock because this update is * done only inside IRQ and there is a different IRQ per * queue
@@ -131,7 +129,8 @@ irqreturn_t hl_irq_handler_cq(int irq, void *arg) queue->ci =hl_queue_inc_ptr (queue->ci);/* Clear CQ entry ready bit */ - cq_base[cq->ci] &= ~CQ_ENTRY_READY_MASK ; + cq_entry->data =cpu_to_le32 (le32_to_cpu (cq_entry->data) & + ~CQ_ENTRY_READY_MASK ); cq->ci =hl_cq_inc_ptr (cq->ci);
drivers/misc/habanalabs/memory.c +2 -0
@@ -1629,6 +1629,8 @@ void hl_vm_ctx_fini(struct hl_ctx *ctx)dev_dbg (hdev->dev,"page list 0x%p of asid %d is still alive\n" , phys_pg_list, ctx->asid); +atomic64_sub (phys_pg_list->total_size, + &hdev->dram_used_mem);free_phys_pg_pack (hdev, phys_pg_list);idr_remove (&vm->phys_pg_pack_handles, i); }
drivers/misc/lkdtm/bugs.c +2 -2
@@ -22,7 +22,7 @@ struct lkdtm_list {* recurse past the end of THREAD_SIZE by default. */ #if defined(CONFIG_FRAME_WARN ) && (CONFIG_FRAME_WARN >0 ) -#define REC_STACK_SIZE (CONFIG_FRAME_WARN / 2) +#define REC_STACK_SIZE (_AC(CONFIG_FRAME_WARN, UL) / 2)#else #define REC_STACK_SIZE (THREAD_SIZE / 8)#endif
@@ -91,7 +91,7 @@ void lkdtm_LOOP(void)void lkdtm_EXHAUST_STACK (void ) { -pr_info ("Calling function with %d frame size to depth %d ...\n" , +pr_info ("Calling function with %lu frame size to depth %d ...\n" ,REC_STACK_SIZE , recur_count);recursive_loop (recur_count);pr_info ("FAIL: survived without exhausting stack?!\n" );
drivers/misc/mei/hw-me-regs.h +2 -0
@@ -81,6 +81,8 @@#define MEI_DEV_ID_ICP_LP 0x34E0/* Ice Lake Point LP */ +#define MEI_DEV_ID_TGP_LP 0xA0E0/* Tiger Lake Point LP */ +#define MEI_DEV_ID_MCC 0x4B70/* Mule Creek Canyon (EHL) */ #define MEI_DEV_ID_MCC_4 0x4B75/* Mule Creek Canyon 4 (EHL) */
drivers/misc/mei/pci-me.c +2 -0
@@ -98,6 +98,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH12_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_MCC, MEI_ME_PCH12_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_MCC_4, MEI_ME_PCH8_CFG)},
drivers/misc/vmw_vmci/vmci_doorbell.c +4 -2
@@ -310,7 +310,8 @@ int vmci_dbell_host_context_notify(u32 src_cid, struct vmci_handle handle) entry = container_of(resource, struct dbell_entry, resource);if (entry->run_delayed) { -schedule_work (&entry->work); +if (!schedule_work (&entry->work)) +vmci_resource_put (resource); }else { entry->notify_cb (entry->client_data);vmci_resource_put (resource);
@@ -361,7 +362,8 @@ static void dbell_fire_entries(u32 notify_idx) atomic_read(&dbell->active) == 1) {if (dbell->run_delayed) {vmci_resource_get (&dbell->resource); -schedule_work (&dbell->work); +if (!schedule_work (&dbell->work)) +vmci_resource_put (&dbell->resource); }else { dbell->notify_cb (dbell->client_data); }
drivers/mmc/core/sd.c +6 -0
@@ -1292,6 +1292,12 @@ int mmc_attach_sd(struct mmc_host *host) goto err; } +/* +* Some SD cards claims an out of spec VDD voltage range. Let's treat +* these bits as being in-valid and especially also bit7. +*/ + ocr &= ~0x7FFF ; + rocr =mmc_select_voltage (host, ocr);/*
drivers/mmc/host/sdhci-cadence.c +1 -0
@@ -369,6 +369,7 @@ static int sdhci_cdns_probe(struct platform_device *pdev) host->mmc_host_ops.execute_tuning = sdhci_cdns_execute_tuning; host->mmc_host_ops.hs400_enhanced_strobe = sdhci_cdns_hs400_enhanced_strobe; +sdhci_enable_v4_mode (host);sdhci_get_of_property (pdev);
drivers/mmc/host/sdhci-of-at91.c +3 -0
@@ -357,6 +357,9 @@ static int sdhci_at91_probe(struct platform_device *pdev)pm_runtime_set_autosuspend_delay (&pdev->dev,50 );pm_runtime_use_autosuspend (&pdev->dev); +/* HS200 is broken at this moment */ + host->quirks2 =SDHCI_QUIRK2_BROKEN_HS200 ; + ret =sdhci_add_host (host);if (ret) goto pm_runtime_disable;
drivers/mmc/host/sdhci-sprd.c +32 -5
@@ -174,10 +174,11 @@ static inline void _sdhci_sprd_set_clock(struct sdhci_host *host,struct sdhci_sprd_host *sprd_host =TO_SPRD_HOST (host);u32 div, val, mask; - div =sdhci_sprd_calc_div (sprd_host->base_rate, clk); +sdhci_writew (host,0 ,SDHCI_CLOCK_CONTROL ); - clk |= ((div &0x300 ) >>2 ) | ((div &0xFF ) <<8 ); -sdhci_enable_clk (host, clk); + div =sdhci_sprd_calc_div (sprd_host->base_rate, clk); + div = ((div &0x300 ) >>2 ) | ((div &0xFF ) <<8 ); +sdhci_enable_clk (host, div);/* enable auto gate sdhc_enable_auto_gate */ val =sdhci_readl (host,SDHCI_SPRD_REG_32_BUSY_POSI );
@@ -284,6 +285,17 @@ static void sdhci_sprd_hw_reset(struct sdhci_host *host)usleep_range (300 ,500 ); } +static unsigned int sdhci_sprd_get_max_timeout_count (struct sdhci_host *host) +{ +/* The Spredtrum controller actual maximum timeout count is 1 << 31 */ +return 1 <<31 ; +} + +static unsigned int sdhci_sprd_get_ro (struct sdhci_host *host) +{ +return 0 ; +} +static struct sdhci_ops sdhci_sprd_ops = { .read_l = sdhci_sprd_readl, .write_l = sdhci_sprd_writel,
@@ -295,6 +307,8 @@ static struct sdhci_ops sdhci_sprd_ops = { .reset = sdhci_reset, .set_uhs_signaling = sdhci_sprd_set_uhs_signaling, .hw_reset = sdhci_sprd_hw_reset, + .get_max_timeout_count = sdhci_sprd_get_max_timeout_count, + .get_ro = sdhci_sprd_get_ro, };static void sdhci_sprd_request (struct mmc_host *mmc,struct mmc_request *mrq)
@@ -318,9 +332,12 @@ static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq) }static const struct sdhci_pltfm_data sdhci_sprd_pdata = { - .quirks =SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK , + .quirks =SDHCI_QUIRK_BROKEN_CARD_DETECTION | +SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | +SDHCI_QUIRK_MISSING_CAPS , .quirks2 =SDHCI_QUIRK2_BROKEN_HS200 | -SDHCI_QUIRK2_USE_32BIT_BLK_CNT , +SDHCI_QUIRK2_USE_32BIT_BLK_CNT | +SDHCI_QUIRK2_PRESET_VALUE_BROKEN , .ops = &sdhci_sprd_ops, };
@@ -386,6 +403,16 @@ static int sdhci_sprd_probe(struct platform_device *pdev)sdhci_enable_v4_mode (host); +/* +* Supply the existing CAPS, but clear the UHS-I modes. This +* will allow these modes to be specified only by device +* tree properties through mmc_of_parse(). +*/ + host->caps =sdhci_readl (host,SDHCI_CAPABILITIES ); + host->caps1 =sdhci_readl (host,SDHCI_CAPABILITIES_1 ); + host->caps1 &= ~(SDHCI_SUPPORT_SDR50 |SDHCI_SUPPORT_SDR104 | +SDHCI_SUPPORT_DDR50 ); + ret =sdhci_setup_host (host);if (ret) goto pm_runtime_disable;
drivers/mmc/host/sdhci-tegra.c +14 -0
@@ -258,6 +258,16 @@ static void tegra210_sdhci_writew(struct sdhci_host *host, u16 val, int reg) } } +static unsigned int tegra_sdhci_get_ro (struct sdhci_host *host) +{ +/* +* Write-enable shall be assumed if GPIO is missing in a board's +* device-tree because SDHCI's WRITE_PROTECT bit doesn't work on +* Tegra. +*/ +return mmc_gpio_get_ro (host->mmc); +} +static bool tegra_sdhci_is_pad_and_regulator_valid (struct sdhci_host *host) {struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host);
@@ -1224,6 +1234,7 @@ static const struct cqhci_host_ops sdhci_tegra_cqhci_ops = { };static const struct sdhci_ops tegra_sdhci_ops = { + .get_ro = tegra_sdhci_get_ro, .read_w = tegra_sdhci_readw, .write_l = tegra_sdhci_writel, .set_clock = tegra_sdhci_set_clock,
@@ -1279,6 +1290,7 @@ static const struct sdhci_tegra_soc_data soc_data_tegra30 = { };static const struct sdhci_ops tegra114_sdhci_ops = { + .get_ro = tegra_sdhci_get_ro, .read_w = tegra_sdhci_readw, .write_w = tegra_sdhci_writew, .write_l = tegra_sdhci_writel,
@@ -1332,6 +1344,7 @@ static const struct sdhci_tegra_soc_data soc_data_tegra124 = { };static const struct sdhci_ops tegra210_sdhci_ops = { + .get_ro = tegra_sdhci_get_ro, .read_w = tegra_sdhci_readw, .write_w = tegra210_sdhci_writew, .write_l = tegra_sdhci_writel,
@@ -1366,6 +1379,7 @@ static const struct sdhci_tegra_soc_data soc_data_tegra210 = { };static const struct sdhci_ops tegra186_sdhci_ops = { + .get_ro = tegra_sdhci_get_ro, .read_w = tegra_sdhci_readw, .write_l = tegra_sdhci_writel, .set_clock = tegra_sdhci_set_clock,
drivers/net/ethernet/ti/cpsw.c +1 -1
@@ -2372,6 +2372,7 @@ static int cpsw_probe(struct platform_device *pdev)if (!cpsw)return -ENOMEM ; +platform_set_drvdata (pdev, cpsw); cpsw->dev = dev; mode =devm_gpiod_get_array_optional (dev,"mode" ,GPIOD_OUT_LOW );
@@ -2476,7 +2477,6 @@ static int cpsw_probe(struct platform_device *pdev) goto clean_cpts; } -platform_set_drvdata (pdev, ndev); priv =netdev_priv (ndev); priv->cpsw = cpsw; priv->ndev = ndev;
drivers/net/wireless/intel/iwlwifi/cfg/22000.c +217 -4
289 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/iwl-config.h +21 -2
@@ -540,14 +540,20 @@ extern const struct iwl_cfg iwl9260_killer_2ac_cfg;extern const struct iwl_cfg iwl9270_2ac_cfg;extern const struct iwl_cfg iwl9460_2ac_cfg;extern const struct iwl_cfg iwl9560_2ac_cfg; +extern const struct iwl_cfg iwl9560_2ac_cfg_quz_a0_jf_b0_soc;extern const struct iwl_cfg iwl9560_2ac_160_cfg; +extern const struct iwl_cfg iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc;extern const struct iwl_cfg iwl9460_2ac_cfg_soc;extern const struct iwl_cfg iwl9461_2ac_cfg_soc; +extern const struct iwl_cfg iwl9461_2ac_cfg_quz_a0_jf_b0_soc;extern const struct iwl_cfg iwl9462_2ac_cfg_soc; +extern const struct iwl_cfg iwl9462_2ac_cfg_quz_a0_jf_b0_soc;extern const struct iwl_cfg iwl9560_2ac_cfg_soc;extern const struct iwl_cfg iwl9560_2ac_160_cfg_soc;extern const struct iwl_cfg iwl9560_killer_2ac_cfg_soc;extern const struct iwl_cfg iwl9560_killer_s_2ac_cfg_soc; +extern const struct iwl_cfg iwl9560_killer_i_2ac_cfg_quz_a0_jf_b0_soc; +extern const struct iwl_cfg iwl9560_killer_s_2ac_cfg_quz_a0_jf_b0_soc;extern const struct iwl_cfg iwl9460_2ac_cfg_shared_clk;extern const struct iwl_cfg iwl9461_2ac_cfg_shared_clk;extern const struct iwl_cfg iwl9462_2ac_cfg_shared_clk;
@@ -559,17 +565,30 @@ extern const struct iwl_cfg iwl22000_2ac_cfg_hr;extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb;extern const struct iwl_cfg iwl22000_2ac_cfg_jf;extern const struct iwl_cfg iwl_ax101_cfg_qu_hr; +extern const struct iwl_cfg iwl_ax101_cfg_qu_c0_hr_b0;extern const struct iwl_cfg iwl_ax101_cfg_quz_hr;extern const struct iwl_cfg iwl22000_2ax_cfg_hr;extern const struct iwl_cfg iwl_ax200_cfg_cc; +extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; +extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; +extern const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0; +extern const struct iwl_cfg iwl_ax201_cfg_quz_hr; +extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr; +extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr;extern const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0;extern const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0; +extern const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0; +extern const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0;extern const struct iwl_cfg killer1650x_2ax_cfg;extern const struct iwl_cfg killer1650w_2ax_cfg;extern const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0;extern const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0;extern const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0;extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0; +extern const struct iwl_cfg iwl9461_2ac_cfg_qu_c0_jf_b0; +extern const struct iwl_cfg iwl9462_2ac_cfg_qu_c0_jf_b0; +extern const struct iwl_cfg iwl9560_2ac_cfg_qu_c0_jf_b0; +extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_c0_jf_b0;extern const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0;extern const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0;extern const struct iwl_cfg iwl22000_2ax_cfg_jf;
@@ -580,9 +599,9 @@ extern const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0;extern const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0;extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_a0;extern const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0; -extern const struct iwl_cfg iwlax210_2ax_cfg_so_gf_a0; +extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0;extern const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0; -extern const struct iwl_cfg iwlax210_2ax_cfg_so_gf4_a0; +extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0;#endif /* CPTCFG_IWLMVM || CPTCFG_IWLFMAC */ #endif /* __IWL_CONFIG_H__ */
drivers/net/wireless/intel/iwlwifi/iwl-csr.h +2 -0
@@ -328,6 +328,8 @@ enum {#define CSR_HW_REV_TYPE_NONE (0x00001F0)#define CSR_HW_REV_TYPE_QNJ (0x0000360)#define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364) +#define CSR_HW_REV_TYPE_QU_B0 (0x0000334) +#define CSR_HW_REV_TYPE_QU_C0 (0x0000338)#define CSR_HW_REV_TYPE_QUZ (0x0000354)#define CSR_HW_REV_TYPE_HR_CDB (0x0000340)#define CSR_HW_REV_TYPE_SO (0x0000370)
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +152 -116
358 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +3 -6
@@ -3569,10 +3569,10 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, trans->cfg = &iwlax210_2ax_cfg_so_jf_a0; }else if (CSR_HW_RF_ID_TYPE_CHIP_ID (trans->hw_rf_id) ==CSR_HW_RF_ID_TYPE_CHIP_ID (CSR_HW_RF_ID_TYPE_GF )) { - trans->cfg = &iwlax210_2ax_cfg_so_gf_a0; + trans->cfg = &iwlax211_2ax_cfg_so_gf_a0; }else if (CSR_HW_RF_ID_TYPE_CHIP_ID (trans->hw_rf_id) ==CSR_HW_RF_ID_TYPE_CHIP_ID (CSR_HW_RF_ID_TYPE_GF4 )) { - trans->cfg = &iwlax210_2ax_cfg_so_gf4_a0; + trans->cfg = &iwlax411_2ax_cfg_so_gf4_a0; } }else if (cfg == &iwl_ax101_cfg_qu_hr) { if ((CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
@@ -3600,10 +3600,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, } }else if (CSR_HW_RF_ID_TYPE_CHIP_ID (trans->hw_rf_id) ==CSR_HW_RF_ID_TYPE_CHIP_ID (CSR_HW_RF_ID_TYPE_HR ) && - ((trans->cfg != &iwl_ax200_cfg_cc && - trans->cfg != &killer1650x_2ax_cfg && - trans->cfg != &killer1650w_2ax_cfg) || - trans->hw_rev ==CSR_HW_REV_TYPE_QNJ_B0 )) { + trans->hw_rev ==CSR_HW_REV_TYPE_QNJ_B0 ) {u32 hw_status; hw_status =iwl_read_prph (trans,UMAG_GEN_HW_STATUS );
drivers/net/wireless/mediatek/mt76/mt76.h +1 -0
@@ -30,6 +30,7 @@#define MT_TX_RING_SIZE 256#define MT_MCU_RING_SIZE 32#define MT_RX_BUF_SIZE 2048 +#define MT_SKB_HEAD_LEN 128struct mt76_dev ;struct mt76_wcid ;
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +4 -4
@@ -136,11 +136,11 @@ static const struct ieee80211_ops mt76x0u_ops = { .release_buffered_frames = mt76_release_buffered_frames, }; -static int mt76x0u_init_hardware (struct mt76x02_dev *dev) +static int mt76x0u_init_hardware (struct mt76x02_dev *dev,bool reset) {int err; -mt76x0_chip_onoff (dev, true, true); +mt76x0_chip_onoff (dev, true, reset);if (!mt76x02_wait_for_mac (&dev->mt76))return -ETIMEDOUT ;
@@ -173,7 +173,7 @@ static int mt76x0u_register_device(struct mt76x02_dev *dev)if (err <0 ) goto out_err; - err =mt76x0u_init_hardware (dev); + err =mt76x0u_init_hardware (dev, true);if (err <0 ) goto out_err;
@@ -309,7 +309,7 @@ static int __maybe_unused mt76x0_resume(struct usb_interface *usb_intf)if (ret <0 ) goto err; - ret =mt76x0u_init_hardware (dev); + ret =mt76x0u_init_hardware (dev, false);if (ret) goto err;
drivers/net/wireless/mediatek/mt76/usb.c +37 -9
62 lines not on this page · raw message
drivers/nvme/host/core.c +14 -1
@@ -1268,6 +1268,9 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,*/ if (effects & (NVME_CMD_EFFECTS_LBCC |NVME_CMD_EFFECTS_CSE_MASK )) {mutex_lock (&ctrl->scan_lock); +mutex_lock (&ctrl->subsys->lock); +nvme_mpath_start_freeze (ctrl->subsys); +nvme_mpath_wait_freeze (ctrl->subsys);nvme_start_freeze (ctrl);nvme_wait_freeze (ctrl); }
@@ -1298,6 +1301,8 @@ static void nvme_passthru_end(struct nvme_ctrl *ctrl, u32 effects)nvme_update_formats (ctrl);if (effects & (NVME_CMD_EFFECTS_LBCC |NVME_CMD_EFFECTS_CSE_MASK )) {nvme_unfreeze (ctrl); +nvme_mpath_unfreeze (ctrl->subsys); +mutex_unlock (&ctrl->subsys->lock);mutex_unlock (&ctrl->scan_lock); }if (effects &NVME_CMD_EFFECTS_CCC )
@@ -1668,6 +1673,7 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)if (ns->head->disk) {nvme_update_disk_info (ns->head->disk, ns, id);blk_queue_stack_limits (ns->head->disk->queue, ns->queue); +revalidate_disk (ns->head->disk); }#endif }
@@ -2439,6 +2445,7 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)if (ret) {dev_err (ctrl->device,"failed to register subsystem device.\n" ); +put_device (&subsys->dev); goto out_unlock; }ida_init (&subsys->ns_ida);
@@ -2461,7 +2468,6 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)nvme_put_subsystem (subsys); out_unlock:mutex_unlock (&nvme_subsystems_lock); -put_device (&subsys->dev);return ret; }
@@ -3523,6 +3529,13 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)struct nvme_ns *ns, *next;LIST_HEAD (ns_list); +/* +* make sure to requeue I/O to all namespaces as these +* might result from the scan itself and must complete +* for the scan_work to make progress +*/ +nvme_mpath_clear_ctrl_paths (ctrl); +/* prevent racing with ns scanning */ flush_work (&ctrl->scan_work);
drivers/nvme/host/multipath.c +70 -6
114 lines not on this page · raw message
drivers/nvme/host/nvme.h +19 -2
@@ -477,6 +477,9 @@ static inline bool nvme_ctrl_use_ana(struct nvme_ctrl *ctrl)return ctrl->ana_log_buf !=NULL ; } +void nvme_mpath_unfreeze (struct nvme_subsystem *subsys); +void nvme_mpath_wait_freeze (struct nvme_subsystem *subsys); +void nvme_mpath_start_freeze (struct nvme_subsystem *subsys);void nvme_set_disk_name (char *disk_name,struct nvme_ns *ns,struct nvme_ctrl *ctrl,int *flags);void nvme_failover_req (struct request *req);
@@ -487,7 +490,8 @@ void nvme_mpath_remove_disk(struct nvme_ns_head *head);int nvme_mpath_init (struct nvme_ctrl *ctrl,struct nvme_id_ctrl *id);void nvme_mpath_uninit (struct nvme_ctrl *ctrl);void nvme_mpath_stop (struct nvme_ctrl *ctrl); -void nvme_mpath_clear_current_path (struct nvme_ns *ns); +bool nvme_mpath_clear_current_path (struct nvme_ns *ns); +void nvme_mpath_clear_ctrl_paths (struct nvme_ctrl *ctrl);struct nvme_ns *nvme_find_path (struct nvme_ns_head *head);static inline void nvme_mpath_check_last_path (struct nvme_ns *ns)
@@ -535,7 +539,11 @@ static inline void nvme_mpath_add_disk(struct nvme_ns *ns,static inline void nvme_mpath_remove_disk (struct nvme_ns_head *head) { } -static inline void nvme_mpath_clear_current_path (struct nvme_ns *ns) +static inline bool nvme_mpath_clear_current_path (struct nvme_ns *ns) +{ +return false; +} +static inline void nvme_mpath_clear_ctrl_paths (struct nvme_ctrl *ctrl) { }static inline void nvme_mpath_check_last_path (struct nvme_ns *ns)
@@ -555,6 +563,15 @@ static inline void nvme_mpath_uninit(struct nvme_ctrl *ctrl)static inline void nvme_mpath_stop (struct nvme_ctrl *ctrl) { } +static inline void nvme_mpath_unfreeze (struct nvme_subsystem *subsys) +{ +} +static inline void nvme_mpath_wait_freeze (struct nvme_subsystem *subsys) +{ +} +static inline void nvme_mpath_start_freeze (struct nvme_subsystem *subsys) +{ +}#endif /* CONFIG_NVME_MULTIPATH */ #ifdef CONFIG_NVM
drivers/nvme/host/pci.c +2 -1
@@ -2712,7 +2712,7 @@ static void nvme_async_probe(void *data, async_cookie_t cookie) {struct nvme_dev *dev = data; -nvme_reset_ctrl_sync (&dev->ctrl); +flush_work (&dev->ctrl.reset_work);flush_work (&dev->ctrl.scan_work);nvme_put_ctrl (&dev->ctrl); }
@@ -2778,6 +2778,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)dev_info (dev->ctrl.device,"pci function %s\n" ,dev_name (&pdev->dev)); +nvme_reset_ctrl (&dev->ctrl);nvme_get_ctrl (&dev->ctrl);async_schedule (nvme_async_probe, dev);
drivers/nvme/host/rdma.c +11 -5
@@ -562,13 +562,17 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl,return ret; } +static void __nvme_rdma_stop_queue (struct nvme_rdma_queue *queue) +{ +rdma_disconnect (queue->cm_id); +ib_drain_qp (queue->qp); +} +static void nvme_rdma_stop_queue (struct nvme_rdma_queue *queue) {if (!test_and_clear_bit (NVME_RDMA_Q_LIVE , &queue->flags))return ; - -rdma_disconnect (queue->cm_id); -ib_drain_qp (queue->qp); +__nvme_rdma_stop_queue (queue); }static void nvme_rdma_free_queue (struct nvme_rdma_queue *queue)
@@ -607,11 +611,13 @@ static int nvme_rdma_start_queue(struct nvme_rdma_ctrl *ctrl, int idx)else ret =nvmf_connect_admin_queue (&ctrl->ctrl); -if (!ret) +if (!ret) {set_bit (NVME_RDMA_Q_LIVE , &queue->flags); -else + }else { +__nvme_rdma_stop_queue (queue);dev_info (ctrl->ctrl.device,"failed to connect queue: %d ret=%d\n" , idx, ret); + }return ret; }
drivers/nvme/target/configfs.c +1 -0
@@ -673,6 +673,7 @@ static void nvmet_port_subsys_drop_link(struct config_item *parent, found:list_del (&p->entry); +nvmet_port_del_ctrls (port, subsys);nvmet_port_disc_changed (port, subsys);if (list_empty (&port->subsystems))
drivers/nvme/target/core.c +15 -0
@@ -43,6 +43,9 @@ inline u16 errno_to_nvme_status(struct nvmet_req *req, int errno)u16 status;switch (errno) { +case 0 : + status =NVME_SC_SUCCESS ; +break ;case -ENOSPC : req->error_loc = offsetof(struct nvme_rw_command , length); status =NVME_SC_CAP_EXCEEDED |NVME_SC_DNR ;
@@ -277,6 +280,18 @@ void nvmet_unregister_transport(const struct nvmet_fabrics_ops *ops) }EXPORT_SYMBOL_GPL (nvmet_unregister_transport); +void nvmet_port_del_ctrls (struct nvmet_port *port,struct nvmet_subsys *subsys) +{ +struct nvmet_ctrl *ctrl; + +mutex_lock (&subsys->lock); +list_for_each_entry (ctrl, &subsys->ctrls, subsys_entry) { +if (ctrl->port == port) + ctrl->ops->delete_ctrl (ctrl); + } +mutex_unlock (&subsys->lock); +} +int nvmet_enable_port (struct nvmet_port *port) {const struct nvmet_fabrics_ops *ops;
drivers/nvme/target/loop.c +8 -0
@@ -654,6 +654,14 @@ static void nvme_loop_remove_port(struct nvmet_port *port)mutex_lock (&nvme_loop_ports_mutex);list_del_init (&port->entry);mutex_unlock (&nvme_loop_ports_mutex); + +/* +* Ensure any ctrls that are in the process of being +* deleted are in fact deleted before we return +* and free the port. This is to prevent active +* ctrls from using a port after it's freed. +*/ +flush_workqueue (nvme_delete_wq); }static const struct nvmet_fabrics_ops nvme_loop_ops = {
drivers/nvme/target/nvmet.h +3 -0
@@ -415,6 +415,9 @@ void nvmet_port_send_ana_event(struct nvmet_port *port);int nvmet_register_transport (const struct nvmet_fabrics_ops *ops);void nvmet_unregister_transport (const struct nvmet_fabrics_ops *ops); +void nvmet_port_del_ctrls (struct nvmet_port *port, +struct nvmet_subsys *subsys); +int nvmet_enable_port (struct nvmet_port *port);void nvmet_disable_port (struct nvmet_port *port);
drivers/soundwire/cadence_master.c +4 -4
@@ -80,8 +80,8 @@#define CDNS_MCP_INTSET 0x4C -#define CDNS_SDW_SLAVE_STAT 0x50 -#define CDNS_MCP_SLAVE_STAT_MASK BIT(1, 0) +#define CDNS_MCP_SLAVE_STAT 0x50 +#define CDNS_MCP_SLAVE_STAT_MASK GENMASK(1, 0)#define CDNS_MCP_SLAVE_INTSTAT0 0x54#define CDNS_MCP_SLAVE_INTSTAT1 0x58
@@ -95,8 +95,8 @@#define CDNS_MCP_SLAVE_INTMASK0 0x5C#define CDNS_MCP_SLAVE_INTMASK1 0x60 -#define CDNS_MCP_SLAVE_INTMASK0_MASK GENMASK(30, 0) -#define CDNS_MCP_SLAVE_INTMASK1_MASK GENMASK(16, 0) +#define CDNS_MCP_SLAVE_INTMASK0_MASK GENMASK(31, 0) +#define CDNS_MCP_SLAVE_INTMASK1_MASK GENMASK(15, 0)#define CDNS_MCP_PORT_INTSTAT 0x64#define CDNS_MCP_PDI_STAT 0x6C
drivers/usb/chipidea/udc.c +24 -8
@@ -709,12 +709,6 @@ static int _gadget_stop_activity(struct usb_gadget *gadget) struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget);unsigned long flags; -spin_lock_irqsave (&ci->lock, flags); - ci->gadget.speed =USB_SPEED_UNKNOWN ; - ci->remote_wakeup =0 ; - ci->suspended =0 ; -spin_unlock_irqrestore (&ci->lock, flags); -/* flush all endpoints */ gadget_for_each_ep (ep, gadget) {usb_ep_fifo_flush (ep);
@@ -732,6 +726,12 @@ static int _gadget_stop_activity(struct usb_gadget *gadget) ci->status =NULL ; } +spin_lock_irqsave (&ci->lock, flags); + ci->gadget.speed =USB_SPEED_UNKNOWN ; + ci->remote_wakeup =0 ; + ci->suspended =0 ; +spin_unlock_irqrestore (&ci->lock, flags); +return 0 ; }
@@ -1303,6 +1303,10 @@ static int ep_disable(struct usb_ep *ep)return -EBUSY ;spin_lock_irqsave (hwep->lock, flags); +if (hwep->ci->gadget.speed ==USB_SPEED_UNKNOWN ) { +spin_unlock_irqrestore (hwep->lock, flags); +return 0 ; + }/* only internal SW should disable ctrl endpts */
@@ -1392,6 +1396,10 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,return -EINVAL ;spin_lock_irqsave (hwep->lock, flags); +if (hwep->ci->gadget.speed ==USB_SPEED_UNKNOWN ) { +spin_unlock_irqrestore (hwep->lock, flags); +return 0 ; + } retval =_ep_queue (ep, req, gfp_flags);spin_unlock_irqrestore (hwep->lock, flags);return retval;
@@ -1415,8 +1423,8 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req)return -EINVAL ;spin_lock_irqsave (hwep->lock, flags); - -hw_ep_flush (hwep->ci, hwep->num, hwep->dir); +if (hwep->ci->gadget.speed !=USB_SPEED_UNKNOWN ) +hw_ep_flush (hwep->ci, hwep->num, hwep->dir);list_for_each_entry_safe (node, tmpnode, &hwreq->tds, td) {dma_pool_free (hwep->td_pool, node->ptr, node->dma);
@@ -1487,6 +1495,10 @@ static void ep_fifo_flush(struct usb_ep *ep) }spin_lock_irqsave (hwep->lock, flags); +if (hwep->ci->gadget.speed ==USB_SPEED_UNKNOWN ) { +spin_unlock_irqrestore (hwep->lock, flags); +return ; + }hw_ep_flush (hwep->ci, hwep->num, hwep->dir);
@@ -1559,6 +1571,10 @@ static int ci_udc_wakeup(struct usb_gadget *_gadget)int ret =0 ;spin_lock_irqsave (&ci->lock, flags); +if (ci->gadget.speed ==USB_SPEED_UNKNOWN ) { +spin_unlock_irqrestore (&ci->lock, flags); +return 0 ; + }if (!ci->remote_wakeup) { ret = -EOPNOTSUPP ; goto out;
drivers/usb/class/cdc-wdm.c +12 -4
@@ -587,10 +587,20 @@ static int wdm_flush(struct file *file, fl_owner_t id) {struct wdm_device *desc = file->private_data; -wait_event (desc->wait, !test_bit (WDM_IN_USE , &desc->flags)); +wait_event (desc->wait, +/* +* needs both flags. We cannot do with one +* because resetting it would cause a race +* with write() yet we need to signal +* a disconnect +*/ + !test_bit (WDM_IN_USE , &desc->flags) || +test_bit (WDM_DISCONNECTING , &desc->flags));/* cannot dereference desc->intf if WDM_DISCONNECTING */ -if (desc->werr <0 && !test_bit (WDM_DISCONNECTING , &desc->flags)) +if (test_bit (WDM_DISCONNECTING , &desc->flags)) +return -ENODEV ; +if (desc->werr <0 )dev_err (&desc->intf->dev,"Error in flush path: %d\n" , desc->werr);
@@ -974,8 +984,6 @@ static void wdm_disconnect(struct usb_interface *intf)spin_lock_irqsave (&desc->iuspin, flags);set_bit (WDM_DISCONNECTING , &desc->flags);set_bit (WDM_READ , &desc->flags); -/* to terminate pending flushes */ -clear_bit (WDM_IN_USE , &desc->flags);spin_unlock_irqrestore (&desc->iuspin, flags);wake_up_all (&desc->wait);mutex_lock (&desc->rlock);
drivers/usb/class/usbtmc.c +3 -0
@@ -2362,8 +2362,11 @@ static int usbtmc_probe(struct usb_interface *intf, goto err_put; } + retcode = -EINVAL ; data->bulk_in = bulk_in->bEndpointAddress; data->wMaxPacketSize =usb_endpoint_maxp (bulk_in); +if (!data->wMaxPacketSize) + goto err_put;dev_dbg (&intf->dev,"Found bulk in endpoint at %u\n" , data->bulk_in); data->bulk_out = bulk_out->bEndpointAddress;
drivers/usb/core/hcd-pci.c +8 -22
@@ -216,17 +216,18 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)/* EHCI, OHCI */ hcd->rsrc_start =pci_resource_start (dev,0 ); hcd->rsrc_len =pci_resource_len (dev,0 ); -if (!request_mem_region (hcd->rsrc_start, hcd->rsrc_len, - driver->description)) { +if (!devm_request_mem_region (&dev->dev, hcd->rsrc_start, + hcd->rsrc_len, driver->description)) {dev_dbg (&dev->dev,"controller already in use\n" ); retval = -EBUSY ; goto put_hcd; } - hcd->regs =ioremap_nocache (hcd->rsrc_start, hcd->rsrc_len); + hcd->regs =devm_ioremap_nocache (&dev->dev, hcd->rsrc_start, + hcd->rsrc_len);if (hcd->regs ==NULL ) {dev_dbg (&dev->dev,"error mapping memory\n" ); retval = -EFAULT ; - goto release_mem_region; + goto put_hcd; } }else {
@@ -240,8 +241,8 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) hcd->rsrc_start =pci_resource_start (dev, region); hcd->rsrc_len =pci_resource_len (dev, region); -if (request_region (hcd->rsrc_start, hcd->rsrc_len, - driver->description)) +if (devm_request_region (&dev->dev, hcd->rsrc_start, + hcd->rsrc_len, driver->description))break ; }if (region ==PCI_ROM_RESOURCE ) {
@@ -275,20 +276,13 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) }if (retval !=0 ) - goto unmap_registers; + goto put_hcd;device_wakeup_enable (hcd->self.controller);if (pci_dev_run_wake (dev))pm_runtime_put_noidle (&dev->dev);return retval; -unmap_registers: -if (driver->flags &HCD_MEMORY ) { -iounmap (hcd->regs); -release_mem_region: -release_mem_region (hcd->rsrc_start, hcd->rsrc_len); - }else -release_region (hcd->rsrc_start, hcd->rsrc_len); put_hcd:usb_put_hcd (hcd); disable_pci:
@@ -347,14 +341,6 @@ void usb_hcd_pci_remove(struct pci_dev *dev)dev_set_drvdata (&dev->dev,NULL );up_read (&companions_rwsem); } - -if (hcd->driver->flags &HCD_MEMORY ) { -iounmap (hcd->regs); -release_mem_region (hcd->rsrc_start, hcd->rsrc_len); - }else { -release_region (hcd->rsrc_start, hcd->rsrc_len); - } -usb_put_hcd (hcd);pci_disable_device (dev); }
drivers/usb/gadget/composite.c +1 -0
@@ -1976,6 +1976,7 @@ void composite_disconnect(struct usb_gadget *gadget)* disconnect callbacks? */ spin_lock_irqsave (&cdev->lock, flags); + cdev->suspended =0 ;if (cdev->config)reset_config (cdev);if (cdev->driver->disconnect)
drivers/usb/gadget/function/f_mass_storage.c +18 -10
@@ -261,7 +261,7 @@ struct fsg_common;struct fsg_common {struct usb_gadget *gadget;struct usb_composite_dev *cdev; -struct fsg_dev *fsg, *new_fsg; +struct fsg_dev *fsg;wait_queue_head_t io_wait;wait_queue_head_t fsg_wait;
@@ -290,6 +290,7 @@ struct fsg_common {unsigned int bulk_out_maxpacket;enum fsg_state state;/* For exception handling */ unsigned int exception_req_tag; +void *exception_arg;enum data_direction data_dir;u32 data_size;
@@ -391,7 +392,8 @@ static int fsg_set_halt(struct fsg_dev *fsg, struct usb_ep *ep)/* These routines may be called in process context or in_irq */ -static void raise_exception (struct fsg_common *common,enum fsg_state new_state) +static void __raise_exception (struct fsg_common *common,enum fsg_state new_state, +void *arg) {unsigned long flags;
@@ -404,6 +406,7 @@ static void raise_exception(struct fsg_common *common, enum fsg_state new_state)if (common->state <= new_state) { common->exception_req_tag = common->ep0_req_tag; common->state = new_state; + common->exception_arg = arg;if (common->thread_task)send_sig_info (SIGUSR1 ,SEND_SIG_PRIV , common->thread_task);
@@ -411,6 +414,10 @@ static void raise_exception(struct fsg_common *common, enum fsg_state new_state)spin_unlock_irqrestore (&common->lock, flags); } +static void raise_exception (struct fsg_common *common,enum fsg_state new_state) +{ +__raise_exception (common, new_state,NULL ); +}/*-------------------------------------------------------------------------*/
@@ -2285,16 +2292,16 @@ static int do_set_interface(struct fsg_common *common, struct fsg_dev *new_fsg)static int fsg_set_alt (struct usb_function *f,unsigned intf,unsigned alt) {struct fsg_dev *fsg =fsg_from_func (f); - fsg->common->new_fsg = fsg; -raise_exception (fsg->common,FSG_STATE_CONFIG_CHANGE ); + +__raise_exception (fsg->common,FSG_STATE_CONFIG_CHANGE , fsg);return USB_GADGET_DELAYED_STATUS ; }static void fsg_disable (struct usb_function *f) {struct fsg_dev *fsg =fsg_from_func (f); - fsg->common->new_fsg =NULL ; -raise_exception (fsg->common,FSG_STATE_CONFIG_CHANGE ); + +__raise_exception (fsg->common,FSG_STATE_CONFIG_CHANGE ,NULL ); }
@@ -2307,6 +2314,7 @@ static void handle_exception(struct fsg_common *common)enum fsg_state old_state;struct fsg_lun *curlun;unsigned int exception_req_tag; +struct fsg_dev *new_fsg;/* * Clear the existing signals. Anything but SIGUSR1 is converted
@@ -2360,6 +2368,7 @@ static void handle_exception(struct fsg_common *common) common->next_buffhd_to_fill = &common->buffhds[0 ]; common->next_buffhd_to_drain = &common->buffhds[0 ]; exception_req_tag = common->exception_req_tag; + new_fsg = common->exception_arg; old_state = common->state; common->state =FSG_STATE_NORMAL ;
@@ -2413,8 +2422,8 @@ static void handle_exception(struct fsg_common *common)break ;case FSG_STATE_CONFIG_CHANGE : -do_set_interface (common, common->new_fsg); -if (common->new_fsg) +do_set_interface (common, new_fsg); +if (new_fsg)usb_composite_setup_continue (common->cdev);break ;
@@ -2989,8 +2998,7 @@ static void fsg_unbind(struct usb_configuration *c, struct usb_function *f)DBG (fsg,"unbind\n" );if (fsg->common->fsg == fsg) { - fsg->common->new_fsg =NULL ; -raise_exception (fsg->common,FSG_STATE_CONFIG_CHANGE ); +__raise_exception (fsg->common,FSG_STATE_CONFIG_CHANGE ,NULL );/* FIXME: make interruptible or killable somehow? */ wait_event (common->fsg_wait, common->fsg != fsg); }
drivers/usb/host/fotg210-hcd.c +4 -0
@@ -1628,6 +1628,10 @@ static int fotg210_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,/* see what we found out */ temp =check_reset_complete (fotg210, wIndex, status_reg,fotg210_readl (fotg210, status_reg)); + +/* restart schedule */ + fotg210->command |=CMD_RUN ; +fotg210_writel (fotg210, fotg210->command, &fotg210->regs->command); }if (!(temp & (PORT_RESUME |PORT_RESET ))) {
drivers/usb/host/ohci-hcd.c +12 -3
@@ -418,8 +418,7 @@ static void ohci_usb_reset (struct ohci_hcd *ohci)* other cases where the next software may expect clean state from the * "firmware". this is bus-neutral, unlike shutdown() methods. */ -static void -ohci_shutdown (struct usb_hcd *hcd) +static void _ohci_shutdown (struct usb_hcd *hcd) {struct ohci_hcd *ohci;
@@ -435,6 +434,16 @@ ohci_shutdown (struct usb_hcd *hcd) ohci->rh_state =OHCI_RH_HALTED ; } +static void ohci_shutdown (struct usb_hcd *hcd) +{ +struct ohci_hcd *ohci =hcd_to_ohci (hcd); +unsigned long flags; + +spin_lock_irqsave (&ohci->lock, flags); +_ohci_shutdown (hcd); +spin_unlock_irqrestore (&ohci->lock, flags); +} +/*-------------------------------------------------------------------------* * HC functions *-------------------------------------------------------------------------*/
@@ -752,7 +761,7 @@ static void io_watchdog_func(struct timer_list *t) died:usb_hc_died (ohci_to_hcd (ohci));ohci_dump (ohci); -ohci_shutdown (ohci_to_hcd (ohci)); +_ohci_shutdown (ohci_to_hcd (ohci)); goto done; }else {/* No write back because the done queue was empty */
drivers/usb/host/xhci-rcar.c +1 -1
@@ -104,7 +104,7 @@ static int xhci_rcar_is_gen2(struct device *dev)return of_device_is_compatible (node,"renesas,xhci-r8a7790" ) ||of_device_is_compatible (node,"renesas,xhci-r8a7791" ) ||of_device_is_compatible (node,"renesas,xhci-r8a7793" ) || -of_device_is_compatible (node,"renensas,rcar-gen2-xhci" ); +of_device_is_compatible (node,"renesas,rcar-gen2-xhci" ); }static int xhci_rcar_is_gen3 (struct device *dev)
drivers/usb/storage/realtek_cr.c +9 -6
@@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");static int auto_delink_en =1 ;module_param (auto_delink_en, int,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (auto_delink_en,"enable auto delink" ); +MODULE_PARM_DESC (auto_delink_en,"auto delink mode (0=firmware, 1=software [default])" );#ifdef CONFIG_REALTEK_AUTOPM static int ss_en =1 ;
@@ -996,12 +996,15 @@ static int init_realtek_cr(struct us_data *us) goto INIT_FAIL; } -if (CHECK_FW_VER (chip,0x5888 ) ||CHECK_FW_VER (chip,0x5889 ) || -CHECK_FW_VER (chip,0x5901 )) -SET_AUTO_DELINK (chip); -if (STATUS_LEN (chip) ==16 ) { -if (SUPPORT_AUTO_DELINK (chip)) +if (CHECK_PID (chip,0x0138 ) ||CHECK_PID (chip,0x0158 ) || +CHECK_PID (chip,0x0159 )) { +if (CHECK_FW_VER (chip,0x5888 ) ||CHECK_FW_VER (chip,0x5889 ) || +CHECK_FW_VER (chip,0x5901 ))SET_AUTO_DELINK (chip); +if (STATUS_LEN (chip) ==16 ) { +if (SUPPORT_AUTO_DELINK (chip)) +SET_AUTO_DELINK (chip); + } }#ifdef CONFIG_REALTEK_AUTOPM if (ss_en)
drivers/usb/storage/unusual_devs.h +1 -1
@@ -2100,7 +2100,7 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, US_FL_IGNORE_RESIDUE ),/* Reported by Michael Büsch <[email protected]> */ -UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116, +UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0117, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL,
drivers/usb/typec/tcpm/tcpm.c +1 -1
@@ -1446,7 +1446,7 @@ static enum pdo_err tcpm_caps_err(struct tcpm_port *port, const u32 *pdo,else if ((pdo_min_voltage (pdo[i]) ==pdo_min_voltage (pdo[i -1 ])) && (pdo_max_voltage (pdo[i]) == -pdo_min_voltage (pdo[i -1 ]))) +pdo_max_voltage (pdo[i -1 ])))return PDO_ERR_DUPE_PDO ;break ;/*
drivers/watchdog/bcm2835_wdt.c +1 -0
@@ -240,6 +240,7 @@ module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +MODULE_ALIAS ("platform:bcm2835-wdt" );MODULE_AUTHOR ("Lubomir Rintel <[email protected]>" );MODULE_DESCRIPTION ("Driver for Broadcom BCM2835 watchdog timer" );MODULE_LICENSE ("GPL" );
fs/afs/cmservice.c +3 -7
@@ -502,18 +502,14 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work) struct afs_call *call = container_of(work, struct afs_call, work);struct afs_uuid *r = call->request; -struct { -__be32 match; - } reply; -_enter ("" );if (memcmp (r, &call->net->uuid,sizeof (call->net->uuid)) ==0 ) - reply.match =htonl (0 ); +afs_send_empty_reply (call);else - reply.match =htonl (1 ); +rxrpc_kernel_abort_call (call->net->socket, call->rxcall, +1 ,1 ,"K-1" ); -afs_send_simple_reply (call, &reply,sizeof (reply));afs_put_call (call);_leave ("" ); }
fs/afs/dir.c +73 -16
24 lines not on this page · raw message
fs/nfs/flexfilelayout/flexfilelayout.c +0 -17
Lines of this file are not shown. View the raw message.
lib/logic_pio.c +54 -19
73 lines not on this page · raw message
tools/hv/lsvmbus +42 -33
75 lines not on this page · 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.