Linux 5.4.118
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.118 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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 | 10 arch/arm/boot/compressed/Makefile | 4 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 3 arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 arch/arm64/kernel/vdso/vdso.lds.S | 8 arch/powerpc/include/uapi/asm/errno.h | 1 arch/powerpc/kernel/eeh.c | 11 arch/s390/crypto/arch_random.c | 4 arch/s390/kernel/dis.c | 2 arch/x86/Makefile | 1 arch/x86/kernel/cpu/common.c | 2 crypto/api.c | 2 crypto/rng.c | 10 drivers/acpi/arm64/gtdt.c | 10 drivers/acpi/custom_method.c | 4 drivers/ata/ahci.c | 5 drivers/ata/ahci.h | 1 drivers/ata/libahci.c | 5 drivers/bus/ti-sysc.c | 49 ++ drivers/char/tpm/eventlog/common.c | 3 drivers/char/tpm/eventlog/efi.c | 29 + drivers/clk/socfpga/clk-gate-a10.c | 1 drivers/crypto/omap-aes.c | 6 drivers/crypto/qat/qat_common/qat_algs.c | 11 drivers/crypto/stm32/stm32-cryp.c | 4 drivers/crypto/stm32/stm32-hash.c | 8 drivers/extcon/extcon-arizona.c | 57 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 9 drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c | 7 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 17 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 1 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c | 1 drivers/gpu/drm/drm_panel_orientation_quirks.c | 14 drivers/gpu/drm/i915/intel_pm.c | 2 drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c | 18 - drivers/gpu/drm/qxl/qxl_display.c | 4 drivers/gpu/drm/vkms/vkms_crtc.c | 3 drivers/hwtracing/intel_th/gth.c | 4 drivers/hwtracing/intel_th/pci.c | 10 drivers/input/touchscreen/ili210x.c | 2 drivers/irqchip/irq-gic-v3.c | 8 drivers/md/dm-integrity.c | 1 drivers/md/dm-raid.c | 34 + drivers/md/dm-rq.c | 2 drivers/md/persistent-data/dm-btree-internal.h | 4 drivers/md/persistent-data/dm-space-map-common.c | 2 drivers/md/persistent-data/dm-space-map-common.h | 8 drivers/md/raid1.c | 2 drivers/media/dvb-core/dvbdev.c | 1 drivers/media/i2c/adv7511-v4l2.c | 2 drivers/media/i2c/adv7604.c | 2 drivers/media/i2c/adv7842.c | 2 drivers/media/i2c/tc358743.c | 2 drivers/media/i2c/tda1997x.c | 2 drivers/media/pci/saa7164/saa7164-encoder.c | 20 - drivers/media/pci/sta2x11/Kconfig | 1 drivers/media/platform/sti/bdisp/bdisp-debug.c | 2 drivers/media/platform/vivid/vivid-core.c | 6 drivers/media/rc/ite-cir.c | 8 drivers/media/usb/dvb-usb/dvb-usb-init.c | 90 +++-- drivers/media/usb/dvb-usb/dvb-usb.h | 2 drivers/media/usb/em28xx/em28xx-dvb.c | 1 drivers/media/usb/gspca/gspca.c | 2 drivers/media/usb/gspca/gspca.h | 1 drivers/media/usb/gspca/sq905.c | 2 drivers/media/usb/gspca/stv06xx/stv06xx.c | 9 drivers/mfd/arizona-irq.c | 2 drivers/mmc/core/block.c | 16 drivers/mmc/core/core.c | 76 ---- drivers/mmc/core/core.h | 17 drivers/mmc/core/host.c | 40 ++ drivers/mmc/core/mmc.c | 7 drivers/mmc/core/mmc_ops.c | 4 drivers/mmc/core/sd.c | 6 drivers/mmc/core/sdio.c | 28 + drivers/mmc/host/sdhci-pci-core.c | 29 + drivers/mmc/host/sdhci-pci.h | 2 drivers/mmc/host/sdhci.c | 60 +-- drivers/mmc/host/uniphier-sd.c | 5 drivers/mtd/nand/raw/atmel/nand-controller.c | 6 drivers/mtd/nand/spi/core.c | 2 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 30 - drivers/net/wimax/i2400m/op-rfkill.c | 2 drivers/net/wireless/rsi/rsi_91x_sdio.c | 2 drivers/pci/pci.c | 16 drivers/perf/arm_pmu_platform.c | 2 drivers/phy/ti/phy-twl4030-usb.c | 2 drivers/platform/x86/intel_pmc_core.c | 19 - drivers/power/supply/bq27xxx_battery.c | 51 +- drivers/power/supply/generic-adc-battery.c | 2 drivers/power/supply/lp8788-charger.c | 2 drivers/power/supply/pm2301_charger.c | 2 drivers/power/supply/s3c_adc_battery.c | 2 drivers/power/supply/tps65090-charger.c | 2 drivers/power/supply/tps65217_charger.c | 2 drivers/scsi/device_handler/scsi_dh_alua.c | 5 drivers/scsi/libfc/fc_lport.c | 2 drivers/scsi/lpfc/lpfc_attr.c | 75 ++-- drivers/scsi/lpfc/lpfc_crtn.h | 3 drivers/scsi/lpfc/lpfc_hw4.h | 174 ---------- drivers/scsi/lpfc/lpfc_init.c | 112 ------ drivers/scsi/lpfc/lpfc_mbox.c | 36 -- drivers/scsi/lpfc/lpfc_nportdisc.c | 11 drivers/scsi/lpfc/lpfc_nvmet.c | 1 drivers/scsi/lpfc/lpfc_sli.c | 43 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 drivers/scsi/qla2xxx/qla_attr.c | 8 drivers/scsi/qla2xxx/qla_bsg.c | 3 drivers/scsi/qla2xxx/qla_os.c | 7 drivers/scsi/smartpqi/smartpqi_init.c | 160 +++++++++ drivers/spi/spi-ath79.c | 3 drivers/spi/spi-dln2.c | 2 drivers/spi/spi-omap-100k.c | 6 drivers/spi/spi-qup.c | 2 drivers/spi/spi-ti-qspi.c | 20 - drivers/staging/media/imx/imx-media-capture.c | 2 drivers/staging/media/ipu3/ipu3-v4l2.c | 36 +- drivers/target/target_core_pscsi.c | 3 drivers/tee/optee/core.c | 10 drivers/tty/n_gsm.c | 14 drivers/tty/vt/vt.c | 1 drivers/usb/core/hub.c | 2 drivers/usb/dwc2/core_intr.c | 8 drivers/usb/dwc3/gadget.c | 22 - drivers/usb/gadget/config.c | 4 drivers/usb/gadget/function/f_fs.c | 3 drivers/usb/gadget/function/f_uac1.c | 43 ++ drivers/usb/gadget/function/f_uac2.c | 39 ++ drivers/usb/gadget/function/f_uvc.c | 8 drivers/usb/gadget/legacy/webcam.c | 1 drivers/usb/gadget/udc/dummy_hcd.c | 23 - drivers/usb/host/xhci-mem.c | 9 drivers/usb/host/xhci-mtk.c | 3 drivers/usb/host/xhci-mtk.h | 1 drivers/usb/host/xhci.c | 14 drivers/usb/musb/musb_core.c | 2 drivers/video/fbdev/core/fbcmap.c | 8 fs/btrfs/ctree.c | 20 + fs/btrfs/ioctl.c | 18 - fs/btrfs/relocation.c | 6 fs/cifs/smb2ops.c | 2 fs/ecryptfs/main.c | 6 fs/erofs/erofs_fs.h | 3 fs/erofs/inode.c | 7 fs/ext4/ialloc.c | 48 +- fs/ext4/super.c | 9 fs/f2fs/node.c | 3 fs/fuse/file.c | 41 +- fs/fuse/fuse_i.h | 1 fs/fuse/virtio_fs.c | 1 fs/jffs2/compr_rtime.c | 3 fs/jffs2/scan.c | 2 fs/nfs/pnfs.c | 7 fs/ubifs/replay.c | 3 include/crypto/acompress.h | 2 include/crypto/aead.h | 2 include/crypto/akcipher.h | 2 include/crypto/hash.h | 4 include/crypto/kpp.h | 2 include/crypto/rng.h | 2 include/crypto/skcipher.h | 2 include/linux/mmc/host.h | 3 include/linux/module.h | 26 - include/linux/power/bq27xxx_battery.h | 1 include/scsi/libfcoe.h | 2 include/uapi/linux/usb/video.h | 3 kernel/.gitignore | 1 kernel/Makefile | 9 kernel/futex.c | 3 kernel/irq/matrix.c | 4 kernel/module.c | 60 ++- kernel/sched/fair.c | 4 kernel/time/posix-timers.c | 4 kernel/trace/ftrace.c | 5 kernel/trace/trace.c | 41 -- kernel/trace/trace_clock.c | 44 +- net/bluetooth/ecdh_helper.h | 2 net/openvswitch/actions.c | 8 security/commoncap.c | 2 sound/isa/sb/emu8000.c | 4 sound/isa/sb/sb16_csp.c | 8 sound/pci/hda/patch_conexant.c | 14 sound/pci/hda/patch_realtek.c | 25 + sound/usb/clock.c | 18 - sound/usb/mixer.c | 60 +-- sound/usb/mixer_maps.c | 68 ++- sound/usb/mixer_quirks.c | 6 sound/usb/mixer_scarlett.c | 14 sound/usb/proc.c | 2 sound/usb/stream.c | 4 sound/usb/validate.c | 4 196 files changed, 1541 insertions(+), 1051 deletions(-)
Adrian Hunter (2):
mmc: sdhci-pci: Fix initialization of some SD cards for Intel BYT-based controllers
mmc: sdhci-pci: Add PCI IDs for Intel LKF
Alexander Lobakin (1):
mtd: spinand: core: add missing MODULE_DEVICE_TABLE()
Alexander Shishkin (2):
intel_th: pci: Add Rocket Lake CPU support
intel_th: pci: Add Alder Lake-M support
Anirudh Rayabharam (1):
usb: gadget: dummy_hcd: fix gpf in gadget_setup
Anson Jacob (2):
drm/amdkfd: Fix UBSAN shift-out-of-bounds warning drm/amd/display: Fix UBSAN warning for not a valid value for type '_Bool'
Ard Biesheuvel (2):
ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld
crypto: api - check for ERR pointers in crypto_destroy_tfm()
Aric Cyr (1):
drm/amd/display: Don't optimize bandwidth before disabling planes
Arnd Bergmann (2):
amdgpu: avoid incorrect %hu format string
security: commoncap: fix -Wstringop-overread warning
Artur Petrosyan (1):
usb: dwc2: Fix session request interrupt handler
Arun Easi (1):
scsi: qla2xxx: Fix crash in qla2xxx_mqueuecommand()
Avri Altman (2):
mmc: block: Update ext_csd.cache_ctrl if it was written
mmc: block: Issue a cache flush only when it's enabled
Bart Van Assche (2):
scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats()
scsi: libfc: Fix a format specifier
Benjamin Block (1):
dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails
Bill Wendling (1):
arm64/vdso: Discard .note.gnu.property sections in vDSO
Bixuan Cui (2):
usb: musb: fix PM reference leak in musb_irq_work()
usb: core: hub: Fix PM reference leak in usb_port_resume()
Chaitanya Kulkarni (1):
scsi: target: pscsi: Fix warning in pscsi_complete_cmd()
Chao Yu (1):
f2fs: fix to avoid out-of-bounds memory access
Chen Jun (1):
posix-timers: Preserve return value in clock_adjtime32()
Christoph Hellwig (8):
modules: mark ref_module static
modules: mark find_symbol static
modules: mark each_symbol_section static
modules: unexport __module_text_address
modules: unexport __module_address
modules: rename the licence field in struct symsearch to license
modules: return licensing information from find_symbol
modules: inherit TAINT_PROPRIETARY_MODULE
Christophe JAILLET (2):
mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe()
mmc: uniphier-sd: Fix a resource leak in the remove function
Chunfeng Yun (2):
arm64: dts: mt8173: fix property typo of 'phys' in dsi node
usb: xhci-mtk: support quirk to disable usb2 lpm
Colin Ian King (1):
clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return
Daniel Niv (1):
media: media/saa7164: fix saa7164_encoder_register() memory leak bugs
David Bauer (2):
spi: ath79: always call chipselect function
spi: ath79: remove spi-master setup and cleanup assignment
David E. Box (1):
platform/x86: intel_pmc_core: Don't use global pmcdev in quirks
Davide Caratti (1):
openvswitch: fix stack OOB read while fragmenting IPv4 packets
Dean Anderson (1):
usb: gadget/function/f_fs string table fix for multiple languages
Dinghao Liu (2):
media: platform: sti: Fix runtime PM imbalance in regs_show
mfd: arizona: Fix rumtime PM imbalance on error
Dmitry Vyukov (1):
drm/vkms: fix misuse of WARN_ON
Dmytro Laktyushkin (1):
drm/amd/display: fix dml prefetch validation
DooHyun Hwang (1):
mmc: core: Do a power cycle when the CMD11 fails
Eckhart Mohr (1):
ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx
Eric Biggers (1):
crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS
Eryk Brol (1):
drm/amd/display: Check for DSC support instead of ASIC revision
Ewan D. Milne (1):
scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg()
Fengnan Chang (1):
ext4: fix error code in ext4_commit_super
Filipe Manana (2):
btrfs: fix metadata extent leak after failure to create subvolume
btrfs: fix race when picking most recent mod log operation for an old root
Gao Xiang (1):
erofs: add unsupported inode i_format check
Gerd Hoffmann (1):
drm/qxl: release shadow on shutdown
Greg Kroah-Hartman (1):
Linux 5.4.118
Guchun Chen (1):
drm/amdgpu: fix NULL pointer dereference
Guochun Mao (1):
ubifs: Only check replay with inode type to judge if inode linked
Hans Verkuil (3):
media: gspca/sq905.c: fix uninitialized variable
media: vivid: update EDID
media: gscpa/stv06xx: fix memory leak
Hans de Goede (2):
extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged
extcon: arizona: Fix various races on driver unbind
Hansem Ro (1):
Input: ili210x - add missing negation for touch indication on ili210x
Harald Freudenberger (1):
s390/archrandom: add parameter check for s390_arch_random_generate
He Ying (1):
irqchip/gic-v3: Do not enable irqs when handling spurious interrups
Heinz Mauelshagen (1):
dm raid: fix inconclusive reshape layout on fast raid4/5/6 table reload sequences
Hemant Kumar (1):
usb: gadget: Fix double free of device descriptor pointers
Hillf Danton (1):
tty: n_gsm: check error while registering tty devices
Hui Tang (1):
crypto: qat - fix unmap invalid dma address
Ido Schimmel (1):
mlxsw: spectrum_mr: Update egress RIF list before route's action
James Smart (5):
scsi: lpfc: Fix incorrect dbde assignment when building target abts wqe
scsi: lpfc: Fix pt2pt connection does not recover after LOGO
scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response
scsi: lpfc: Fix error handling for mailboxes completed in MBX_POLL mode
scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic
Jared Baldridge (1):
drm: Added orientation quirk for OneGX1 Pro
Jeffrey Mitchell (1):
ecryptfs: fix kernel panic with null dev_name
Jerome Forissier (1):
tee: optee: do not check memref size on return from Secure World
Joe Thornber (2):
dm persistent data: packed struct should have an aligned() attribute too dm space map common: fix division bug in sm_ll_find_free_block()
John Millikin (1):
x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS)
Jonathan Kim (1):
drm/amdgpu: mask the xgmi number of hops reported from psp to kfd
Josef Bacik (1):
btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s
Julian Braha (1):
media: drivers: media: pci: sta2x11: fix Kconfig dependency on GPIOLIB
Kai Stuhlemmer (ebee Engineering) (1):
mtd: rawnand: atmel: Update ecc_stats.corrected counter
Kevin Barnett (1):
scsi: smartpqi: Add new PCI IDs
Laurent Pinchart (1):
media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt()
Lingutla Chandrasekhar (1):
sched/fair: Ignore percpu threads for imbalance pulls
Linus Torvalds (1):
Fix misc new gcc warnings
Luis Henriques (1):
virtiofs: fix memory leak in virtio_fs_probe()
Luke D Jones (1):
ALSA: hda/realtek: GA503 use same quirks as GA401
Lv Yunlong (2):
ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer
ALSA: sb: Fix two use after free in snd_sb_qsound_build
Mahesh Salgaonkar (1):
powerpc/eeh: Fix EEH handling for hugepages in ioremap space.
Marc Zyngier (1):
ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure
Marek Behún (1):
arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node
Marek Vasut (1):
rsi: Use resume_noirq for SDIO
Marijn Suijten (2):
drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal drm/msm/mdp5: Do not multiply vclk line count by 100
Mark Langsdorf (2):
ACPI: custom_method: fix potential use-after-free issue
ACPI: custom_method: fix a possible memory leak
Masahiro Yamada (1):
kbuild: update config_data.gz only when the content of .config is changed
Mathias Nyman (2):
xhci: check control context is valid before dereferencing it.
xhci: fix potential array out of bounds with several interrupters
Matthias Schiffer (1):
power: supply: bq27xxx: fix power_avg for newer ICs
Muhammad Usama Anjum (1):
media: em28xx: fix memory leak
Murthy Bhat (1):
scsi: smartpqi: Correct request leakage during reset operations
Nathan Chancellor (1):
Makefile: Move -Wno-unused-but-set-variable out of GCC only block
Paul Aurich (1):
cifs: Return correct error code from smb2_get_enc_key
Paul Clements (1):
md/raid1: properly indicate failure when ending a failed write request
Pavel Machek (1):
intel_th: Consistency and off-by-one fix
Pavel Skripkin (2):
media: dvb-usb: fix memory leak in dvb_usb_adapter_init
tty: fix memory leak in vc_deallocate
Pawel Laszczak (2):
usb: gadget: uvc: add bInterval checking for HS mode
usb: webcam: Invalid size of Processing Unit Descriptor
Peilin Ye (1):
media: dvbdev: Fix memory leak in dvb_media_device_free()
Phil Calvin (1):
ALSA: hda/realtek: fix mic boost on Intel NUC 8
Phillip Potter (1):
fbdev: zero-fill colormap in fbcmap.c
Pradeep P V K (1):
mmc: sdhci: Check for reset prior to DMA address unmap
Qu Huang (1):
drm/amdkfd: Fix cat debugfs hang_hws file causes system crash bug
Quinn Tran (1):
scsi: qla2xxx: Fix use after free in bsg
Rafael J. Wysocki (1):
PCI: PM: Do not read power state in pci_enable_device_flags()
Ricardo Ribalda (3):
media: staging/intel-ipu3: Fix memory leak in imu_fmt
media: staging/intel-ipu3: Fix set_fmt error handling
media: staging/intel-ipu3: Fix race condition during set_fmt
Robin Murphy (1):
perf/arm_pmu_platform: Fix error handling
Ruslan Bilovol (2):
usb: gadget: f_uac2: validate input parameters
usb: gadget: f_uac1: validate input parameters
Sami Loone (1):
ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops
Sean Christopherson (1):
x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported
Sean Young (1):
media: ite-cir: check for receive overflow
Seunghui Lee (1):
mmc: core: Set read only for SD cards with permanent write protect bit
Shixin Liu (3):
crypto: stm32/hash - Fix PM reference leak on stm32-hash.c
crypto: stm32/cryp - Fix PM reference leak on stm32-cryp.c
crypto: omap-aes - Fix PM reference leak on omap-aes.c
Sreekanth Reddy (1):
scsi: mpt3sas: Block PCI config access from userspace during reset
Stefan Berger (2):
tpm: efi: Use local variable for calculating final log size
tpm: vtpm_proxy: Avoid reading host log when using a virtual device
Steven Rostedt (VMware) (3):
ftrace: Handle commands when closing set_ftrace_filter file
tracing: Map all PIDs to command lines
tracing: Restructure trace_clock_global() to never block
Takashi Iwai (5):
ALSA: hda/conexant: Re-order CX5066 quirk table entries
ALSA: usb-audio: Explicitly set up the clock selector
ALSA: usb-audio: More constifications
media: dvb-usb: Fix use-after-free access
media: dvb-usb: Fix memory leak at error in dvb_usb_device_init()
Thinh Nguyen (2):
usb: xhci: Fix port minor revision
usb: dwc3: gadget: Fix START_TRANSFER link state check
Thomas Gleixner (1):
Revert 337f13046ff0 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op")
Tian Tao (1):
dm integrity: fix missing goto in bitmap_flush_interval error handling
Timo Gurr (1):
ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8
Tony Ambardar (1):
powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h
Tony Lindgren (1):
bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first
Trond Myklebust (2):
NFS: Don't discard pNFS layout segments that are marked for return
NFSv4: Don't discard segments marked for return in _pnfs_return_layout()
Tudor Ambarus (1):
spi: spi-ti-qspi: Free DMA resources
Ulf Hansson (1):
mmc: core: Fix hanging on I/O during system suspend for removable cards
Vasily Gorbik (1):
s390/disassembler: increase ebpf disasm buffer size
Vitaly Kuznetsov (1):
genirq/matrix: Prevent allocation counter corruption
Vivek Goyal (1):
fuse: fix write deadlock
Wang Li (1):
spi: qup: fix PM reference leak in spi_qup_remove()
Wei Yongjun (2):
spi: dln2: Fix reference leak to master
spi: omap-100k: Fix reference leak to master
Wesley Cheng (1):
usb: dwc3: gadget: Ignore EP queue requests during bus reset
Xingui Yang (1):
ata: ahci: Disable SXS for Hisilicon Kunpeng920
Yang Yang (1):
jffs2: check the validity of dstlen in jffs2_zlib_compress()
Yang Yingliang (8):
phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()
power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
media: tc358743: fix possible use-after-free in tc358743_remove()
media: adv7604: fix possible use-after-free in adv76xx_remove()
media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove()
media: i2c: tda1997: Fix possible use-after-free in tda1997x_remove()
media: i2c: adv7842: fix possible use-after-free in adv7842_remove()
Zhang Yi (2):
ext4: fix check to prevent false positive report of incorrect used inodes
ext4: do not set SB_ACTIVE in ext4_orphan_cleanup()
dongjian (1):
power: supply: Use IRQF_ONESHOT
karthik alapati (1):
staging: wimax/i2400m: fix byte-order issue
lizhe (1):
jffs2: Fix kasan slab-out-of-bounds problem
shaoyunl (1):
drm/amdgpu : Fix asic reset regression issue introduce by 8f211fe8ac7c4f
Greg Kroah-Hartman
maintainerMakefile +5 -5
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 117 +SUBLEVEL = 118 EXTRAVERSION = NAME = Kleptomaniac Octopus
@@ -765,16 +765,16 @@ KBUILD_CFLAGS += -Wno-tautological-compare KBUILD_CFLAGS += -mno-global-merge else -# These warnings generated too much noise in a regular build. -# Use make W=1 to enable them (see scripts/Makefile.extrawarn) -KBUILD_CFLAGS += -Wno-unused-but-set-variable - # Warn about unmarked fall-throughs in switch statement. # Disabled for clang while comment to attribute conversion happens and # https://github.com/ClangBuiltLinux/linux/issues/636 is discussed. KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,) endif +# These warnings generated too much noise in a regular build. +# Use make W=1 to enable them (see scripts/Makefile.extrawarn) +KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) + KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
arch/arm/boot/compressed/Makefile +2 -2
@@ -122,8 +122,8 @@ asflags-y := -DZIMAGE # Supply kernel BSS size to the decompressor via a linker symbol. KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \ - sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \ - -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) ) + sed -n -e 's/^\([^ ]*\) [ABD] __bss_start$$/-0x\1/p' \ + -e 's/^\([^ ]*\) [ABD] __bss_stop$$/+0x\1/p') )) ) LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ) # Supply ZRELADDR to the decompressor via a linker symbol. ifneq ($(CONFIG_AUTO_ZRELADDR),y)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +2 -1
@@ -156,7 +156,8 @@ }; nb_periph_clk: nb-periph-clk@13000 { - compatible = "marvell,armada-3700-periph-clock-nb"; + compatible = "marvell,armada-3700-periph-clock-nb", + "syscon"; reg = <0x13000 0x100>; clocks = <&tbg 0>, <&tbg 1>, <&tbg 2>, <&tbg 3>, <&xtalclk>;
arch/arm64/boot/dts/mediatek/mt8173.dtsi +1 -1
@@ -1137,7 +1137,7 @@ <&mmsys CLK_MM_DSI1_DIGITAL>, <&mipi_tx1>; clock-names = "engine", "digital", "hs"; - phy = <&mipi_tx1>; + phys = <&mipi_tx1>; phy-names = "dphy"; status = "disabled"; };
arch/arm64/kernel/vdso/vdso.lds.S +7 -1
@@ -28,6 +28,13 @@ SECTIONS .gnu.version_d : { *(.gnu.version_d) } .gnu.version_r : { *(.gnu.version_r) } + /* + * Discard .note.gnu.property sections which are unused and have + * different alignment requirement from vDSO note sections. + */ + /DISCARD/ : { + *(.note.GNU-stack .note.gnu.property) + } .note : { *(.note.*) } :text :note . = ALIGN(16);
@@ -48,7 +55,6 @@ SECTIONS PROVIDE(end = .); /DISCARD/ : { - *(.note.GNU-stack) *(.data .data.* .gnu.linkonce.d.* .sdata*) *(.bss .sbss .dynbss .dynsbss) }
arch/powerpc/include/uapi/asm/errno.h +1 -0
@@ -2,6 +2,7 @@#ifndef _ASM_POWERPC_ERRNO_H#define _ASM_POWERPC_ERRNO_H +#undef EDEADLOCK#include <asm-generic/errno.h> #undef EDEADLOCK
arch/powerpc/kernel/eeh.c +4 -7
@@ -368,14 +368,11 @@ static inline unsigned long eeh_token_to_phys(unsigned long token) pa =pte_pfn (*ptep);/* On radix we can do hugepage mappings for io, so handle that */ -if (hugepage_shift) { - pa <<= hugepage_shift; - pa |= token & ((1ul << hugepage_shift) -1 ); - }else { - pa <<=PAGE_SHIFT ; - pa |= token & (PAGE_SIZE -1 ); - } +if (!hugepage_shift) + hugepage_shift =PAGE_SHIFT ; + pa <<=PAGE_SHIFT ; + pa |= token & ((1ul << hugepage_shift) -1 );return pa; }
arch/s390/crypto/arch_random.c +4 -0
@@ -53,6 +53,10 @@ static DECLARE_DELAYED_WORK(arch_rng_work, arch_rng_refill_buffer);bool s390_arch_random_generate (u8 *buf,unsigned int nbytes) { +/* max hunk is ARCH_RNG_BUF_SIZE */ +if (nbytes >ARCH_RNG_BUF_SIZE ) +return false; +/* lock rng buffer */ if (!spin_trylock (&arch_rng_lock))return false;
arch/s390/kernel/dis.c +1 -1
@@ -557,7 +557,7 @@ void show_code(struct pt_regs *regs)void print_fn_code (unsigned char *code,unsigned long len) { -char buffer[64 ], *ptr; +char buffer[128 ], *ptr;int opsize, i;while (len) {
arch/x86/Makefile +1 -0
@@ -40,6 +40,7 @@ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector) REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member) REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4)) +REALMODE_CFLAGS += $(CLANG_FLAGS) export REALMODE_CFLAGS # BITS is used as extension for files which are available in a 32 bit
arch/x86/kernel/cpu/common.c +1 -1
@@ -1826,7 +1826,7 @@ static void setup_getcpu(int cpu)unsigned long cpudata =vdso_encode_cpunode (cpu,early_cpu_to_node (cpu));struct desc_struct d = { }; -if (boot_cpu_has (X86_FEATURE_RDTSCP )) +if (boot_cpu_has (X86_FEATURE_RDTSCP ) ||boot_cpu_has (X86_FEATURE_RDPID ))write_rdtscp_aux (cpudata);/* Store CPU and node number in limit. */
crypto/api.c +1 -1
@@ -568,7 +568,7 @@ void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm) {struct crypto_alg *alg; -if (unlikely (!mem)) +if (IS_ERR_OR_NULL (mem))return ; alg = tfm->__crt_alg;
crypto/rng.c +3 -7
@@ -34,22 +34,18 @@ int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)u8 *buf =NULL ;int err; -crypto_stats_get (alg);if (!seed && slen) { buf =kmalloc (slen,GFP_KERNEL ); -if (!buf) { -crypto_alg_put (alg); +if (!buf)return -ENOMEM ; - } err =get_random_bytes_wait (buf, slen); -if (err) { -crypto_alg_put (alg); +if (err) goto out; - } seed = buf; } +crypto_stats_get (alg); err =crypto_rng_alg (tfm)->seed (tfm, seed, slen);crypto_stats_rng_seed (alg, err); out:
drivers/acpi/arm64/gtdt.c +6 -4
@@ -329,7 +329,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd, int index) {struct platform_device *pdev; -int irq =map_gt_gsi (wd->timer_interrupt, wd->timer_flags); +int irq;/* * According to SBSA specification the size of refresh and control
@@ -338,7 +338,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,struct resource res[] = {DEFINE_RES_MEM (wd->control_frame_address,SZ_4K ),DEFINE_RES_MEM (wd->refresh_frame_address,SZ_4K ), -DEFINE_RES_IRQ (irq), + {}, };int nr_res =ARRAY_SIZE (res);
@@ -348,10 +348,11 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,if (!(wd->refresh_frame_address && wd->control_frame_address)) {pr_err (FW_BUG "failed to get the Watchdog base address.\n" ); -acpi_unregister_gsi (wd->timer_interrupt);return -EINVAL ; } + irq =map_gt_gsi (wd->timer_interrupt, wd->timer_flags); + res[2 ] = (struct resource )DEFINE_RES_IRQ (irq);if (irq <=0 ) {pr_warn ("failed to map the Watchdog interrupt.\n" ); nr_res--;
@@ -364,7 +365,8 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,*/ pdev =platform_device_register_simple ("sbsa-gwdt" , index, res, nr_res);if (IS_ERR (pdev)) { -acpi_unregister_gsi (wd->timer_interrupt); +if (irq >0 ) +acpi_unregister_gsi (wd->timer_interrupt);return PTR_ERR (pdev); }
drivers/acpi/custom_method.c +3 -1
@@ -44,6 +44,8 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf, sizeof(struct acpi_table_header)))return -EFAULT ; uncopied_bytes = max_size = table.length; +/* make sure the buf is not allocated */ +kfree (buf); buf =kzalloc (max_size,GFP_KERNEL );if (!buf)return -ENOMEM ;
@@ -57,6 +59,7 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf, (*ppos + count < count) || (count > uncopied_bytes)) {kfree (buf); + buf =NULL ;return -EINVAL ; }
@@ -78,7 +81,6 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,add_taint (TAINT_OVERRIDDEN_ACPI_TABLE ,LOCKDEP_NOW_UNRELIABLE ); } -kfree (buf);return count; }
drivers/ata/ahci.c +5 -0
@@ -1728,6 +1728,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) hpriv->flags |=AHCI_HFLAG_NO_DEVSLP ;#ifdef CONFIG_ARM64 +if (pdev->vendor ==PCI_VENDOR_ID_HUAWEI && + pdev->device ==0xa235 && + pdev->revision <0x30 ) + hpriv->flags |=AHCI_HFLAG_NO_SXS ; +if (pdev->vendor ==0x177d && pdev->device ==0xa01c ) hpriv->irq_handler = ahci_thunderx_irq_handler;#endif
drivers/ata/ahci.h +1 -0
@@ -242,6 +242,7 @@ enum {suspend/resume */ AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 <<27 ),/* ignore -EOPNOTSUPP from phy_power_on() */ + AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported *//* ap->flags bits */
drivers/ata/libahci.c +5 -0
@@ -493,6 +493,11 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv) cap |=HOST_CAP_ALPM ; } +if ((cap &HOST_CAP_SXS ) && (hpriv->flags &AHCI_HFLAG_NO_SXS )) { +dev_info (dev,"controller does not support SXS, disabling CAP_SXS\n" ); + cap &= ~HOST_CAP_SXS ; + } +if (hpriv->force_port_map && port_map != hpriv->force_port_map) {dev_info (dev,"forcing port_map 0x%x -> 0x%x\n" , port_map, hpriv->force_port_map);
drivers/bus/ti-sysc.c +49 -0
61 lines not on this page · raw message
drivers/char/tpm/eventlog/common.c +3 -0
@@ -107,6 +107,9 @@ void tpm_bios_log_setup(struct tpm_chip *chip)int log_version;int rc =0 ; +if (chip->flags &TPM_CHIP_FLAG_VIRTUAL ) +return ; + rc =tpm_read_log (chip);if (rc <0 )return ;
drivers/char/tpm/eventlog/efi.c +21 -8
@@ -17,6 +17,7 @@ int tpm_read_log_efi(struct tpm_chip *chip) {struct efi_tcg2_final_events_table *final_tbl =NULL ; +int final_events_log_size = efi_tpm_final_log_size;struct linux_efi_tpm_eventlog *log_tbl;struct tpm_bios_log *log;u32 log_size;
@@ -66,12 +67,12 @@ int tpm_read_log_efi(struct tpm_chip *chip) ret = tpm_log_version;if (efi.tpm_final_log ==EFI_INVALID_TABLE_ADDR || - efi_tpm_final_log_size ==0 || + final_events_log_size ==0 || tpm_log_version !=EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 ) goto out; final_tbl =memremap (efi.tpm_final_log, -sizeof (*final_tbl) + efi_tpm_final_log_size, +sizeof (*final_tbl) + final_events_log_size,MEMREMAP_WB );if (!final_tbl) {pr_err ("Could not map UEFI TPM final log\n" );
@@ -80,10 +81,18 @@ int tpm_read_log_efi(struct tpm_chip *chip) goto out; } - efi_tpm_final_log_size -= log_tbl->final_events_preboot_size; +/* +* The 'final events log' size excludes the 'final events preboot log' +* at its beginning. +*/ + final_events_log_size -= log_tbl->final_events_preboot_size; +/* +* Allocate memory for the 'combined log' where we will append the +* 'final events log' to. +*/ tmp =krealloc (log->bios_event_log, - log_size + efi_tpm_final_log_size, + log_size + final_events_log_size,GFP_KERNEL );if (!tmp) {kfree (log->bios_event_log);
@@ -94,15 +103,19 @@ int tpm_read_log_efi(struct tpm_chip *chip) log->bios_event_log = tmp;/* -* Copy any of the final events log that didn't also end up in the -* main log. Events can be logged in both if events are generated +* Append any of the 'final events log' that didn't also end up in the +* 'main log'. Events can be logged in both if events are generated * between GetEventLog() and ExitBootServices(). */ memcpy ((void *)log->bios_event_log + log_size, final_tbl->events + log_tbl->final_events_preboot_size, - efi_tpm_final_log_size); + final_events_log_size); +/* +* The size of the 'combined log' is the size of the 'main log' plus +* the size of the 'final events log'. +*/ log->bios_event_log_end = log->bios_event_log + - log_size + efi_tpm_final_log_size; + log_size + final_events_log_size; out:memunmap (final_tbl);
drivers/clk/socfpga/clk-gate-a10.c +1 -0
@@ -146,6 +146,7 @@ static void __init __socfpga_gate_init(struct device_node *node,if (IS_ERR (socfpga_clk->sys_mgr_base_addr)) {pr_err ("%s: failed to find altr,sys-mgr regmap!\n" , __func__); +kfree (socfpga_clk);return ; } }
drivers/crypto/omap-aes.c +3 -3
@@ -103,7 +103,7 @@ static int omap_aes_hw_init(struct omap_aes_dev *dd) dd->err =0 ; } - err =pm_runtime_get_sync (dd->dev); + err =pm_runtime_resume_and_get (dd->dev);if (err <0 ) {dev_err (dd->dev,"failed to get sync: %d\n" , err);return err;
@@ -1153,7 +1153,7 @@ static int omap_aes_probe(struct platform_device *pdev)pm_runtime_set_autosuspend_delay (dev,DEFAULT_AUTOSUSPEND_DELAY );pm_runtime_enable (dev); - err =pm_runtime_get_sync (dev); + err =pm_runtime_resume_and_get (dev);if (err <0 ) {dev_err (dev,"%s: failed to get_sync(%d)\n" , __func__, err);
@@ -1318,7 +1318,7 @@ static int omap_aes_suspend(struct device *dev)static int omap_aes_resume (struct device *dev) { -pm_runtime_get_sync (dev); +pm_runtime_resume_and_get (dev);return 0 ; }#endif
drivers/crypto/qat/qat_common/qat_algs.c +9 -2
@@ -715,7 +715,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,struct qat_alg_buf_list *bufl;struct qat_alg_buf_list *buflout =NULL ;dma_addr_t blp; -dma_addr_t bloutp =0 ; +dma_addr_t bloutp;struct scatterlist *sg;size_t sz_out, sz =struct_size (bufl, bufers, n +1 );
@@ -727,6 +727,9 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,if (unlikely (!bufl))return -ENOMEM ; +for_each_sg (sgl, sg, n, i) + bufl->bufers[i].addr =DMA_MAPPING_ERROR ; + blp =dma_map_single (dev, bufl, sz,DMA_TO_DEVICE );if (unlikely (dma_mapping_error (dev, blp))) goto err_in;
@@ -760,10 +763,14 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, dev_to_node(&GET_DEV(inst->accel_dev)));if (unlikely (!buflout)) goto err_in; + + bufers = buflout->bufers; +for_each_sg (sglout, sg, n, i) + bufers[i].addr =DMA_MAPPING_ERROR ; + bloutp =dma_map_single (dev, buflout, sz_out,DMA_TO_DEVICE );if (unlikely (dma_mapping_error (dev, bloutp))) goto err_out; - bufers = buflout->bufers;for_each_sg (sglout, sg, n, i) {int y = sg_nctr;
drivers/crypto/stm32/stm32-cryp.c +2 -2
@@ -537,7 +537,7 @@ static int stm32_cryp_hw_init(struct stm32_cryp *cryp)int ret;u32 cfg, hw_mode; -pm_runtime_get_sync (cryp->dev); +pm_runtime_resume_and_get (cryp->dev);/* Disable interrupt */ stm32_cryp_write (cryp,CRYP_IMSCR ,0 );
@@ -2054,7 +2054,7 @@ static int stm32_cryp_remove(struct platform_device *pdev)if (!cryp)return -ENODEV ; - ret =pm_runtime_get_sync (cryp->dev); + ret =pm_runtime_resume_and_get (cryp->dev);if (ret <0 )return ret;
drivers/crypto/stm32/stm32-hash.c +4 -4
@@ -810,7 +810,7 @@ static void stm32_hash_finish_req(struct ahash_request *req, int err)static int stm32_hash_hw_init (struct stm32_hash_dev *hdev,struct stm32_hash_request_ctx *rctx) { -pm_runtime_get_sync (hdev->dev); +pm_runtime_resume_and_get (hdev->dev);if (!(HASH_FLAGS_INIT & hdev->flags)) {stm32_hash_write (hdev,HASH_CR ,HASH_CR_INIT );
@@ -959,7 +959,7 @@ static int stm32_hash_export(struct ahash_request *req, void *out)u32 *preg;unsigned int i; -pm_runtime_get_sync (hdev->dev); +pm_runtime_resume_and_get (hdev->dev);while ((stm32_hash_read (hdev,HASH_SR ) &HASH_SR_BUSY ))cpu_relax ();
@@ -997,7 +997,7 @@ static int stm32_hash_import(struct ahash_request *req, const void *in) preg = rctx->hw_context; -pm_runtime_get_sync (hdev->dev); +pm_runtime_resume_and_get (hdev->dev);stm32_hash_write (hdev,HASH_IMR , *preg++);stm32_hash_write (hdev,HASH_STR , *preg++);
@@ -1553,7 +1553,7 @@ static int stm32_hash_remove(struct platform_device *pdev)if (!hdev)return -ENODEV ; - ret =pm_runtime_get_sync (hdev->dev); + ret =pm_runtime_resume_and_get (hdev->dev);if (ret <0 )return ret;
drivers/extcon/extcon-arizona.c +30 -27
98 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +1 -1
@@ -469,7 +469,7 @@ void amdgpu_irq_gpu_reset_resume_helper(struct amdgpu_device *adev)for (j =0 ; j <AMDGPU_MAX_IRQ_SRC_ID ; ++j) {struct amdgpu_irq_src *src = adev->irq.client[i].sources[j]; -if (!src) +if (!src || !src->funcs || !src->funcs->set)continue ;for (k =0 ; k < src->num_types; k++)amdgpu_irq_update (adev, src, k);
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
@@ -984,7 +984,7 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm) DMA_BIDIRECTIONAL :DMA_TO_DEVICE ;/* double check that we don't free the table twice */ -if (!ttm->sg->sgl) +if (!ttm->sg || !ttm->sg->sgl)return ;/* unmap the pages mapped to the device */
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +1 -1
@@ -231,7 +231,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)if ((adev->asic_type ==CHIP_POLARIS10 || adev->asic_type ==CHIP_POLARIS11 ) && (adev->uvd.fw_version <FW_1_66_16 )) -DRM_ERROR ("POLARIS10/11 UVD firmware version %hu.%hu is too old.\n" , +DRM_ERROR ("POLARIS10/11 UVD firmware version %u.%u is too old.\n" , version_major, version_minor); }else {unsigned int enc_major, enc_minor, dec_minor;
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +8 -1
@@ -311,15 +311,22 @@ int amdgpu_xgmi_update_topology(struct amdgpu_hive_info *hive, struct amdgpu_dev } +/* +* NOTE psp_xgmi_node_info.num_hops layout is as follows: +* num_hops[7:6] = link type (0 = xGMI2, 1 = xGMI3, 2/3 = reserved) +* num_hops[5:3] = reserved +* num_hops[2:0] = number of hops +*/ int amdgpu_xgmi_get_hops_count (struct amdgpu_device *adev,struct amdgpu_device *peer_adev) {struct psp_xgmi_topology_info *top = &adev->psp.xgmi_context.top_info; +uint8_t num_hops_mask =0x7 ;int i;for (i =0 ; i < top->num_nodes; ++i)if (top->nodes[i].node_id == peer_adev->gmc.xgmi.node_id) -return top->nodes[i].num_hops; +return top->nodes[i].num_hops & num_hops_mask;return -EINVAL ; }
drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c +6 -1
@@ -33,6 +33,11 @@ static int kfd_debugfs_open(struct inode *inode, struct file *file)return single_open (file, show,NULL ); } +static int kfd_debugfs_hang_hws_read (struct seq_file *m,void *data) +{ +seq_printf (m,"echo gpu_id > hang_hws\n" ); +return 0 ; +}static ssize_t kfd_debugfs_hang_hws_write (struct file *file,const char __user *user_buf,size_t size,loff_t *ppos)
@@ -94,7 +99,7 @@ void kfd_debugfs_init(void)debugfs_create_file ("rls" ,S_IFREG |0444 , debugfs_root, kfd_debugfs_rls_by_device, &kfd_debugfs_fops);debugfs_create_file ("hang_hws" ,S_IFREG |0200 , debugfs_root, -NULL , &kfd_debugfs_hang_hws_fops); + kfd_debugfs_hang_hws_read, &kfd_debugfs_hang_hws_fops); }void kfd_debugfs_fini (void )
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +15 -2
@@ -1011,6 +1011,9 @@ static int set_sched_resources(struct device_queue_manager *dqm)static int initialize_cpsch (struct device_queue_manager *dqm) { +uint64_t num_sdma_queues; +uint64_t num_xgmi_sdma_queues; +pr_debug ("num of pipes: %d\n" ,get_pipes_per_mec (dqm));mutex_init (&dqm->lock_hidden);
@@ -1019,8 +1022,18 @@ static int initialize_cpsch(struct device_queue_manager *dqm) dqm->sdma_queue_count =0 ; dqm->xgmi_sdma_queue_count =0 ; dqm->active_runlist = false; - dqm->sdma_bitmap = ~0ULL >> (64 -get_num_sdma_queues (dqm)); - dqm->xgmi_sdma_bitmap = ~0ULL >> (64 -get_num_xgmi_sdma_queues (dqm)); + + num_sdma_queues =get_num_sdma_queues (dqm); +if (num_sdma_queues >=BITS_PER_TYPE (dqm->sdma_bitmap)) + dqm->sdma_bitmap =ULLONG_MAX ; +else + dqm->sdma_bitmap = (BIT_ULL (num_sdma_queues) -1 ); + + num_xgmi_sdma_queues =get_num_xgmi_sdma_queues (dqm); +if (num_xgmi_sdma_queues >=BITS_PER_TYPE (dqm->xgmi_sdma_bitmap)) + dqm->xgmi_sdma_bitmap =ULLONG_MAX ; +else + dqm->xgmi_sdma_bitmap = (BIT_ULL (num_xgmi_sdma_queues) -1 );INIT_WORK (&dqm->hw_exception_work, kfd_process_hw_exception);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -6
@@ -5372,10 +5372,6 @@ static int get_cursor_position(struct drm_plane *plane, struct drm_crtc *crtc,int x, y;int xorigin =0 , yorigin =0 ; - position->enable = false; - position->x =0 ; - position->y =0 ; -if (!crtc || !plane->state->fb)return 0 ;
@@ -5427,7 +5423,7 @@ static void handle_cursor_update(struct drm_plane *plane,struct dm_crtc_state *crtc_state = crtc ?to_dm_crtc_state (crtc->state) :NULL ;struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc);uint64_t address = afb ? afb->address :0 ; -struct dc_cursor_position position; +struct dc_cursor_position position = {0 };struct dc_cursor_attributes attributes;int ret;
@@ -7330,7 +7326,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, }#if defined(CONFIG_DRM_AMD_DC_DCN ) -if (adev->asic_type >=CHIP_NAVI10 ) { +if (dc_resource_is_dsc_encoding_supported (dc)) {for_each_oldnew_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) {if (drm_atomic_crtc_needs_modeset (new_crtc_state)) { ret =add_affected_mst_dsc_crtcs (state, crtc);
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
@@ -1961,7 +1961,8 @@ static void commit_planes_do_stream_update(struct dc *dc,if (pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only) pipe_ctx->stream_res.audio->funcs->az_disable (pipe_ctx->stream_res.audio); - dc->hwss.optimize_bandwidth (dc, dc->current_state); + dc->optimized_required = true; + }else {if (!dc->optimize_seamless_boot) dc->hwss.prepare_bandwidth (dc, dc->current_state);
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c +1 -0
@@ -3435,6 +3435,7 @@ void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l mode_lib->vba.DCCEnabledInAnyPlane = true; } } + mode_lib->vba.UrgentLatency = mode_lib->vba.UrgentLatencyPixelDataOnly;for (i =0 ; i <= mode_lib->vba.soc.num_states; i++) { locals->FabricAndDRAMBandwidthPerState[i] =dml_min ( mode_lib->vba.DRAMSpeedPerState[i] * mode_lib->vba.NumberOfChannels
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c +1 -0
@@ -3467,6 +3467,7 @@ void dml20v2_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode mode_lib->vba.DCCEnabledInAnyPlane = true; } } + mode_lib->vba.UrgentLatency = mode_lib->vba.UrgentLatencyPixelDataOnly;for (i =0 ; i <= mode_lib->vba.soc.num_states; i++) { locals->FabricAndDRAMBandwidthPerState[i] =dml_min ( mode_lib->vba.DRAMSpeedPerState[i] * mode_lib->vba.NumberOfChannels
drivers/gpu/drm/drm_panel_orientation_quirks.c +14 -0
@@ -84,6 +84,13 @@ static const struct drm_dmi_panel_orientation_data itworks_tw891 = { .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, }; +static const struct drm_dmi_panel_orientation_data onegx1_pro = { + .width =1200 , + .height =1920 , + .bios_dates = (const char *const []){"12/17/2020" ,NULL }, + .orientation =DRM_MODE_PANEL_ORIENTATION_RIGHT_UP , +}; +static const struct drm_dmi_panel_orientation_data lcd720x1280_rightside_up = { .width =720 , .height =1280 ,
@@ -211,6 +218,13 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"), }, .driver_data = (void *)&lcd1200x1920_rightside_up, + }, { /* OneGX1 Pro */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"SYSTEM_MANUFACTURER" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"SYSTEM_PRODUCT_NAME" ), + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Default string"), + }, + .driver_data = (void *)&onegx1_pro, }, { /* VIOS LTH17 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -2966,7 +2966,7 @@ int ilk_wm_max_level(const struct drm_i915_private *dev_priv)static void intel_print_wm_latency (struct drm_i915_private *dev_priv,const char *name, -const u16 wm[8 ]) +const u16 wm[]) {int level, max_level =ilk_wm_max_level (dev_priv);
drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c +13 -5
@@ -41,7 +41,7 @@ static int pingpong_tearcheck_setup(struct drm_encoder *encoder, {struct mdp5_kms *mdp5_kms =get_kms (encoder);struct device *dev = encoder->dev->dev; -u32 total_lines_x100, vclks_line, cfg; +u32 total_lines, vclks_line, cfg;long vsync_clk_speed;struct mdp5_hw_mixer *mixer =mdp5_crtc_get_mixer (encoder->crtc);int pp_id = mixer->pp;
@@ -51,8 +51,8 @@ static int pingpong_tearcheck_setup(struct drm_encoder *encoder,return -EINVAL ; } - total_lines_x100 = mode->vtotal *drm_mode_vrefresh (mode); -if (!total_lines_x100) { + total_lines = mode->vtotal *drm_mode_vrefresh (mode); +if (!total_lines) {DRM_DEV_ERROR (dev,"%s: vtotal(%d) or vrefresh(%d) is 0\n" , __func__, mode->vtotal,drm_mode_vrefresh (mode));return -EINVAL ;
@@ -64,15 +64,23 @@ static int pingpong_tearcheck_setup(struct drm_encoder *encoder, vsync_clk_speed);return -EINVAL ; } - vclks_line = vsync_clk_speed *100 / total_lines_x100; + vclks_line = vsync_clk_speed / total_lines; cfg =MDP5_PP_SYNC_CONFIG_VSYNC_COUNTER_EN |MDP5_PP_SYNC_CONFIG_VSYNC_IN_EN ; cfg |=MDP5_PP_SYNC_CONFIG_VSYNC_COUNT (vclks_line); +/* +* Tearcheck emits a blanking signal every vclks_line * vtotal * 2 ticks on +* the vsync_clk equating to roughly half the desired panel refresh rate. +* This is only necessary as stability fallback if interrupts from the +* panel arrive too late or not at all, but is currently used by default +* because these panel interrupts are not wired up yet. +*/ mdp5_write (mdp5_kms,REG_MDP5_PP_SYNC_CONFIG_VSYNC (pp_id), cfg);mdp5_write (mdp5_kms, -REG_MDP5_PP_SYNC_CONFIG_HEIGHT (pp_id),0xfff0 ); +REG_MDP5_PP_SYNC_CONFIG_HEIGHT (pp_id), (2 * mode->vtotal)); +mdp5_write (mdp5_kms,REG_MDP5_PP_VSYNC_INIT_VAL (pp_id), mode->vdisplay);mdp5_write (mdp5_kms,REG_MDP5_PP_RD_PTR_IRQ (pp_id), mode->vdisplay +1 );
drivers/gpu/drm/qxl/qxl_display.c +4 -0
@@ -1237,6 +1237,10 @@ int qxl_modeset_init(struct qxl_device *qdev)void qxl_modeset_fini (struct qxl_device *qdev) { +if (qdev->dumb_shadow_bo) { +drm_gem_object_put (&qdev->dumb_shadow_bo->tbo.base); + qdev->dumb_shadow_bo =NULL ; + }qxl_destroy_monitors_object (qdev);drm_mode_config_cleanup (&qdev->ddev); }
drivers/gpu/drm/vkms/vkms_crtc.c +2 -1
@@ -20,7 +20,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) ret_overrun =hrtimer_forward_now (&output->vblank_hrtimer, output->period_ns); -WARN_ON (ret_overrun !=1 ); +if (ret_overrun !=1 ) +pr_warn ("%s: vblank timer overrun\n" , __func__); ret =drm_crtc_handle_vblank (crtc);if (!ret)
drivers/hwtracing/intel_th/gth.c +2 -2
@@ -543,7 +543,7 @@ static void intel_th_gth_disable(struct intel_th_device *thdev, output->active = false;for_each_set_bit (master, gth->output[output->port].master, -TH_CONFIGURABLE_MASTERS ) { +TH_CONFIGURABLE_MASTERS +1 ) {gth_master_set (gth, master,-1 ); }spin_unlock (>h->gth_lock);
@@ -697,7 +697,7 @@ static void intel_th_gth_unassign(struct intel_th_device *thdev, othdev->output.port =-1 ; othdev->output.active = false; gth->output[port].output =NULL ; -for (master =0 ; master <=TH_CONFIGURABLE_MASTERS ; master++) +for (master =0 ; master <TH_CONFIGURABLE_MASTERS +1 ; master++)if (gth->master[master] == port) gth->master[master] =-1 ;spin_unlock (>h->gth_lock);
drivers/hwtracing/intel_th/pci.c +10 -0
@@ -268,6 +268,16 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Alder Lake-M */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x54a6), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, + { +/* Rocket Lake CPU */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x4c19 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, { 0 }, };
drivers/input/touchscreen/ili210x.c +1 -1
@@ -109,7 +109,7 @@ static bool ili210x_touchdata_to_coords(struct ili210x *priv, u8 *touchdata,if (finger >=ILI210X_TOUCHES )return false; -if (touchdata[0 ] &BIT (finger)) +if (!(touchdata[0 ] &BIT (finger)))return false; *x =get_unaligned_be16 (touchdata +1 + (finger *4 ) +0 );
drivers/irqchip/irq-gic-v3.c +4 -4
@@ -621,6 +621,10 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs irqnr =gic_read_iar (); +/* Check for special IDs first */ +if ((irqnr >=1020 && irqnr <=1023 )) +return ; +if (gic_supports_nmi () &&unlikely (gic_read_rpr () ==GICD_INT_NMI_PRI )) {gic_handle_nmi (irqnr, regs);
@@ -632,10 +636,6 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regsgic_arch_enable_irqs (); } -/* Check for special IDs first */ -if ((irqnr >=1020 && irqnr <=1023 )) -return ; -/* Treat anything but SGIs in a uniform way */ if (likely (irqnr >15 )) {int err;
drivers/md/dm-integrity.c +1 -0
@@ -3762,6 +3762,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)if (val >= (uint64_t )UINT_MAX *1000 /HZ ) { r = -EINVAL ; ti->error ="Invalid bitmap_flush_interval argument" ; + goto bad; } ic->bitmap_flush_interval =msecs_to_jiffies (val); }else if (!strncmp (opt_string,"internal_hash:" ,strlen ("internal_hash:" ))) {
drivers/md/dm-raid.c +28 -6
@@ -1892,6 +1892,14 @@ static bool rs_takeover_requested(struct raid_set *rs)return rs->md.new_level != rs->md.level; } +/* True if layout is set to reshape. */ +static bool rs_is_layout_change (struct raid_set *rs,bool use_mddev) +{ +return (use_mddev ? rs->md.delta_disks : rs->delta_disks) || + rs->md.new_layout != rs->md.layout || + rs->md.new_chunk_sectors != rs->md.chunk_sectors; +} +/* True if @rs is requested to reshape by ctr */ static bool rs_reshape_requested (struct raid_set *rs) {
@@ -1904,9 +1912,7 @@ static bool rs_reshape_requested(struct raid_set *rs)if (rs_is_raid0 (rs))return false; - change = mddev->new_layout != mddev->layout || - mddev->new_chunk_sectors != mddev->chunk_sectors || - rs->delta_disks; + change =rs_is_layout_change (rs, false);/* Historical case to support raid1 reshape without delta disks */ if (rs_is_raid1 (rs)) {
@@ -2843,7 +2849,7 @@ static sector_t _get_reshape_sectors(struct raid_set *rs) }/* -* +* Reshape: * - change raid layout * - change chunk size * - add disks
@@ -2952,6 +2958,20 @@ static int rs_setup_reshape(struct raid_set *rs)return r; } +/* +* If the md resync thread has updated superblock with max reshape position +* at the end of a reshape but not (yet) reset the layout configuration +* changes -> reset the latter. +*/ +static void rs_reset_inconclusive_reshape (struct raid_set *rs) +{ +if (!rs_is_reshaping (rs) &&rs_is_layout_change (rs, true)) { +rs_set_cur (rs); + rs->md.delta_disks =0 ; + rs->md.reshape_backwards =0 ; + } +} +/* * Enable/disable discard support on RAID set depending on * RAID level and discard properties of underlying RAID members.
@@ -3216,11 +3236,14 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)if (r) goto bad; +/* Catch any inconclusive reshape superblock content. */ +rs_reset_inconclusive_reshape (rs); +/* Start raid set read-only and assumed clean to change in raid_resume() */ rs->md.ro =1 ; rs->md.in_sync =1 ; -/* Keep array frozen */ +/* Keep array frozen until resume. */ set_bit (MD_RECOVERY_FROZEN , &rs->md.recovery);/* Has to be held on running the array */
@@ -3234,7 +3257,6 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv) } r =md_start (&rs->md); -if (r) { ti->error ="Failed to start raid array" ;mddev_unlock (&rs->md);
drivers/md/dm-rq.c +2 -0
@@ -572,6 +572,7 @@ int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t)blk_mq_free_tag_set (md->tag_set); out_kfree_tag_set:kfree (md->tag_set); + md->tag_set =NULL ;return err; }
@@ -581,6 +582,7 @@ void dm_mq_cleanup_mapped_device(struct mapped_device *md)if (md->tag_set) {blk_mq_free_tag_set (md->tag_set);kfree (md->tag_set); + md->tag_set =NULL ; } }
drivers/md/persistent-data/dm-btree-internal.h +2 -2
@@ -34,12 +34,12 @@ struct node_header {__le32 max_entries;__le32 value_size;__le32 padding; -} __packed; +} __attribute__((packed, aligned(8)));struct btree_node {struct node_header header;__le64 keys[0 ]; -} __packed; +} __attribute__((packed,aligned (8 )));/*
drivers/md/persistent-data/dm-space-map-common.c +2 -0
@@ -339,6 +339,8 @@ int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin,*/ begin =do_div (index_begin, ll->entries_per_block); end =do_div (end, ll->entries_per_block); +if (end ==0 ) + end = ll->entries_per_block;for (i = index_begin; i < index_end; i++, begin =0 ) {struct dm_block *blk;
drivers/md/persistent-data/dm-space-map-common.h +4 -4
@@ -33,7 +33,7 @@ struct disk_index_entry {__le64 blocknr;__le32 nr_free;__le32 none_free_before; -} __packed; +} __attribute__ ((packed, aligned(8)));#define MAX_METADATA_BITMAPS 255
@@ -43,7 +43,7 @@ struct disk_metadata_index {__le64 blocknr;struct disk_index_entry index[MAX_METADATA_BITMAPS ]; -} __packed; +} __attribute__ ((packed, aligned(8)));struct ll_disk ;
@@ -86,7 +86,7 @@ struct disk_sm_root {__le64 nr_allocated;__le64 bitmap_root;__le64 ref_count_root; -} __packed; +} __attribute__ ((packed, aligned(8)));#define ENTRIES_PER_BYTE 4
@@ -94,7 +94,7 @@ struct disk_bitmap_header {__le32 csum;__le32 not_used;__le64 blocknr; -} __packed; +} __attribute__ ((packed, aligned(8)));enum allocation_event {SM_NONE ,
drivers/md/raid1.c +2 -0
@@ -458,6 +458,8 @@ static void raid1_end_write_request(struct bio *bio)if (!test_bit (Faulty, &rdev->flags))set_bit (R1BIO_WriteError, &r1_bio->state);else { +/* Fail the request */ +set_bit (R1BIO_Degraded, &r1_bio->state);/* Finished with this branch */ r1_bio->bios[mirror] =NULL ; to_put = bio;
drivers/media/dvb-core/dvbdev.c +1 -0
@@ -241,6 +241,7 @@ static void dvb_media_device_free(struct dvb_device *dvbdev)if (dvbdev->adapter->conn) {media_device_unregister_entity (dvbdev->adapter->conn); +kfree (dvbdev->adapter->conn); dvbdev->adapter->conn =NULL ;kfree (dvbdev->adapter->conn_pads); dvbdev->adapter->conn_pads =NULL ;
drivers/media/i2c/adv7511-v4l2.c +1 -1
@@ -1964,7 +1964,7 @@ static int adv7511_remove(struct i2c_client *client)adv7511_set_isr (sd, false);adv7511_init_setup (sd); -cancel_delayed_work (&state->edid_handler); +cancel_delayed_work_sync (&state->edid_handler);i2c_unregister_device (state->i2c_edid);i2c_unregister_device (state->i2c_cec);i2c_unregister_device (state->i2c_pktmem);
drivers/media/i2c/adv7604.c +1 -1
@@ -3606,7 +3606,7 @@ static int adv76xx_remove(struct i2c_client *client)io_write (sd,0x6e ,0 );io_write (sd,0x73 ,0 ); -cancel_delayed_work (&state->delayed_work_enable_hotplug); +cancel_delayed_work_sync (&state->delayed_work_enable_hotplug);v4l2_async_unregister_subdev (sd);media_entity_cleanup (&sd->entity);adv76xx_unregister_clients (to_state (sd));
drivers/media/i2c/adv7842.c +1 -1
@@ -3586,7 +3586,7 @@ static int adv7842_remove(struct i2c_client *client)struct adv7842_state *state =to_state (sd);adv7842_irq_enable (sd, false); -cancel_delayed_work (&state->delayed_work_enable_hotplug); +cancel_delayed_work_sync (&state->delayed_work_enable_hotplug);v4l2_device_unregister_subdev (sd);media_entity_cleanup (&sd->entity);adv7842_unregister_clients (sd);
drivers/media/i2c/tc358743.c +1 -1
@@ -2192,7 +2192,7 @@ static int tc358743_remove(struct i2c_client *client)del_timer_sync (&state->timer);flush_work (&state->work_i2c_poll); } -cancel_delayed_work (&state->delayed_work_enable_hotplug); +cancel_delayed_work_sync (&state->delayed_work_enable_hotplug);cec_unregister_adapter (state->cec_adap);v4l2_async_unregister_subdev (sd);v4l2_device_unregister_subdev (sd);
drivers/media/i2c/tda1997x.c +1 -1
@@ -2804,7 +2804,7 @@ static int tda1997x_remove(struct i2c_client *client)media_entity_cleanup (&sd->entity);v4l2_ctrl_handler_free (&state->hdl);regulator_bulk_disable (TDA1997X_NUM_SUPPLIES , state->supplies); -cancel_delayed_work (&state->delayed_work_enable_hpd); +cancel_delayed_work_sync (&state->delayed_work_enable_hpd);mutex_destroy (&state->page_lock);mutex_destroy (&state->lock);
drivers/media/pci/saa7164/saa7164-encoder.c +11 -9
@@ -1008,7 +1008,7 @@ int saa7164_encoder_register(struct saa7164_port *port)printk (KERN_ERR "%s() failed (errno = %d), NO PCI configuration\n" , __func__, result); result = -ENOMEM ; - goto failed; + goto fail_pci; }/* Establish encoder defaults here */
@@ -1062,7 +1062,7 @@ int saa7164_encoder_register(struct saa7164_port *port) 100000, ENCODER_DEF_BITRATE);if (hdl->error) { result = hdl->error; - goto failed; + goto fail_hdl; } port->std =V4L2_STD_NTSC_M ;
@@ -1080,7 +1080,7 @@ int saa7164_encoder_register(struct saa7164_port *port)printk (KERN_INFO "%s: can't allocate mpeg device\n" , dev->name); result = -ENOMEM ; - goto failed; + goto fail_hdl; } port->v4l_device->ctrl_handler = hdl;
@@ -1091,10 +1091,7 @@ int saa7164_encoder_register(struct saa7164_port *port)if (result <0 ) {printk (KERN_INFO "%s: can't register mpeg device\n" , dev->name); -/* TODO: We're going to leak here if we don't dealloc -The buffers above. The unreg function can't deal wit it. -*/ - goto failed; + goto fail_reg; } printk(KERN_INFO "%s: registered device video%d [mpeg]\n",
@@ -1116,9 +1113,14 @@ int saa7164_encoder_register(struct saa7164_port *port)saa7164_api_set_encoder (port);saa7164_api_get_encoder (port); +return 0 ; - result =0 ; -failed: +fail_reg: +video_device_release (port->v4l_device); + port->v4l_device =NULL ; +fail_hdl: +v4l2_ctrl_handler_free (hdl); +fail_pci:return result; }
drivers/media/pci/sta2x11/Kconfig +1 -0
@@ -2,6 +2,7 @@ config STA2X11_VIP tristate "STA2X11 VIP Video For Linux" depends on STA2X11 || COMPILE_TEST + select GPIOLIB if MEDIA_SUBDRV_AUTOSELECT select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT select VIDEOBUF2_DMA_CONTIG depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
drivers/media/platform/sti/bdisp/bdisp-debug.c +1 -1
@@ -480,7 +480,7 @@ static int regs_show(struct seq_file *s, void *data)int ret;unsigned int i; - ret =pm_runtime_get_sync (bdisp->dev); + ret =pm_runtime_resume_and_get (bdisp->dev);if (ret <0 ) {seq_puts (s,"Cannot wake up IP\n" );return 0 ;
drivers/media/platform/vivid/vivid-core.c +3 -3
@@ -174,13 +174,13 @@ static const u8 vivid_hdmi_edid[256] = {0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x7b , -0x02 ,0x03 ,0x3f ,0xf0 ,0x51 ,0x61 ,0x60 ,0x5f , +0x02 ,0x03 ,0x3f ,0xf1 ,0x51 ,0x61 ,0x60 ,0x5f ,0x5e ,0x5d ,0x10 ,0x1f ,0x04 ,0x13 ,0x22 ,0x21 ,0x20 ,0x05 ,0x14 ,0x02 ,0x11 ,0x01 ,0x23 ,0x09 ,0x07 ,0x07 ,0x83 ,0x01 ,0x00 ,0x00 ,0x6d ,0x03 ,0x0c ,0x00 ,0x10 ,0x00 ,0x00 ,0x3c ,0x21 ,0x00 ,0x60 ,0x01 ,0x02 ,0x03 ,0x67 ,0xd8 ,0x5d ,0xc4 , -0x01 ,0x78 ,0x00 ,0x00 ,0xe2 ,0x00 ,0xea ,0xe3 , +0x01 ,0x78 ,0x00 ,0x00 ,0xe2 ,0x00 ,0xca ,0xe3 ,0x05 ,0x00 ,0x00 ,0xe3 ,0x06 ,0x01 ,0x00 ,0x4d ,0xd0 ,0x00 ,0xa0 ,0xf0 ,0x70 ,0x3e ,0x80 ,0x30 , 0x20, 0x35, 0x00, 0xc0, 0x1c, 0x32, 0x00, 0x00,
@@ -189,7 +189,7 @@ static const u8 vivid_hdmi_edid[256] = {0x00 ,0x00 ,0x1a ,0x1a ,0x1d ,0x00 ,0x80 ,0x51 ,0xd0 ,0x1c ,0x20 ,0x40 ,0x80 ,0x35 ,0x00 ,0xc0 ,0x1c ,0x32 ,0x00 ,0x00 ,0x1c ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, }; static int vidioc_querycap(struct file *file, void *priv,
drivers/media/rc/ite-cir.c +7 -1
@@ -276,8 +276,14 @@ static irqreturn_t ite_cir_isr(int irq, void *data)/* read the interrupt flags */ iflags = dev->params.get_irq_causes (dev); +/* Check for RX overflow */ +if (iflags &ITE_IRQ_RX_FIFO_OVERRUN ) { +dev_warn (&dev->rdev->dev,"receive overflow\n" ); +ir_raw_event_reset (dev->rdev); + } +/* check for the receive interrupt */ -if (iflags & (ITE_IRQ_RX_FIFO |ITE_IRQ_RX_FIFO_OVERRUN )) { +if (iflags &ITE_IRQ_RX_FIFO ) {/* read the FIFO bytes */ rx_bytes = dev->params.get_rx_bytes(dev, rx_buf,
drivers/media/usb/dvb-usb/dvb-usb-init.c +60 -30
146 lines not on this page · raw message
drivers/media/usb/dvb-usb/dvb-usb.h +1 -1
@@ -485,7 +485,7 @@ extern int __must_check dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16);/* commonly used remote control parsing */ -extern int dvb_usb_nec_rc_key_to_event (struct dvb_usb_device *,u8 [],u32 *,int *); +extern int dvb_usb_nec_rc_key_to_event (struct dvb_usb_device *,u8 [5 ],u32 *,int *);/* commonly used firmware download types and function */ struct hexline {
drivers/media/usb/em28xx/em28xx-dvb.c +1 -0
@@ -1924,6 +1924,7 @@ static int em28xx_dvb_init(struct em28xx *dev)return result; out_free: +em28xx_uninit_usb_xfer (dev,EM28XX_DIGITAL_MODE );kfree (dvb); dev->dvb =NULL ; goto ret;
drivers/media/usb/gspca/gspca.c +2 -0
@@ -1576,6 +1576,8 @@ int gspca_dev_probe2(struct usb_interface *intf,#endif v4l2_ctrl_handler_free (gspca_dev->vdev.ctrl_handler);v4l2_device_unregister (&gspca_dev->v4l2_dev); +if (sd_desc->probe_error) + sd_desc->probe_error (gspca_dev);kfree (gspca_dev->usb_buf);kfree (gspca_dev);return ret;
drivers/media/usb/gspca/gspca.h +1 -0
@@ -105,6 +105,7 @@ struct sd_desc {cam_cf_op config;/* called on probe */ cam_op init;/* called on probe and resume */ cam_op init_controls;/* called on probe */ +cam_v_op probe_error;/* called if probe failed, do cleanup here */ cam_op start;/* called on stream on after URBs creation */ cam_pkt_op pkt_scan;/* optional operations */
drivers/media/usb/gspca/sq905.c +1 -1
@@ -158,7 +158,7 @@ static int sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) { int ret; -int act_len; +int act_len =0 ; gspca_dev->usb_buf[0 ] ='\0' ;if (need_lock)
drivers/media/usb/gspca/stv06xx/stv06xx.c +9 -0
@@ -529,12 +529,21 @@ static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,static int stv06xx_config (struct gspca_dev *gspca_dev,const struct usb_device_id *id); +static void stv06xx_probe_error (struct gspca_dev *gspca_dev) +{ +struct sd *sd = (struct sd *)gspca_dev; + +kfree (sd->sensor_priv); + sd->sensor_priv =NULL ; +} +/* sub-driver description */ static const struct sd_desc sd_desc = { .name =MODULE_NAME , .config = stv06xx_config, .init = stv06xx_init, .init_controls = stv06xx_init_controls, + .probe_error = stv06xx_probe_error, .start = stv06xx_start, .stopN = stv06xx_stopN, .pkt_scan = stv06xx_pkt_scan,
drivers/mfd/arizona-irq.c +1 -1
@@ -100,7 +100,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)unsigned int val;int ret; - ret =pm_runtime_get_sync (arizona->dev); + ret =pm_runtime_resume_and_get (arizona->dev);if (ret <0 ) {dev_err (arizona->dev,"Failed to resume device: %d\n" , ret);return IRQ_NONE ;
drivers/mmc/core/block.c +16 -0
@@ -621,6 +621,18 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md, main_md->part_curr = value &EXT_CSD_PART_CONFIG_ACC_MASK ; } +/* +* Make sure to update CACHE_CTRL in case it was changed. The cache +* will get turned back on if the card is re-initialized, e.g. +* suspend/resume or hw reset in recovery. +*/ +if ((MMC_EXTRACT_INDEX_FROM_ARG (cmd.arg) ==EXT_CSD_CACHE_CTRL ) && + (cmd.opcode ==MMC_SWITCH )) { +u8 value =MMC_EXTRACT_VALUE_FROM_ARG (cmd.arg) &1 ; + + card->ext_csd.cache_ctrl = value; + } +/* * According to the SD specs, some commands require a delay after * issuing the command.
@@ -2215,6 +2227,10 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue *mq, struct request *req)case MMC_ISSUE_ASYNC :switch (req_op (req)) {case REQ_OP_FLUSH : +if (!mmc_cache_enabled (host)) { +blk_mq_end_request (req,BLK_STS_OK ); +return MMC_REQ_FINISHED ; + } ret =mmc_blk_cqe_issue_flush (mq, req);break ;case REQ_OP_READ :
drivers/mmc/core/core.c +1 -75
88 lines not on this page · raw message
drivers/mmc/core/core.h +9 -8
@@ -29,6 +29,7 @@ struct mmc_bus_ops {int (*shutdown)(struct mmc_host *);int (*hw_reset)(struct mmc_host *);int (*sw_reset)(struct mmc_host *); +bool (*cache_enabled)(struct mmc_host *); };void mmc_attach_bus (struct mmc_host *host,const struct mmc_bus_ops *ops);
@@ -93,14 +94,6 @@ int mmc_execute_tuning(struct mmc_card *card);int mmc_hs200_to_hs400 (struct mmc_card *card);int mmc_hs400_to_hs200 (struct mmc_card *card); -#ifdef CONFIG_PM_SLEEP -void mmc_register_pm_notifier (struct mmc_host *host); -void mmc_unregister_pm_notifier (struct mmc_host *host); -#else -static inline void mmc_register_pm_notifier (struct mmc_host *host) { } -static inline void mmc_unregister_pm_notifier (struct mmc_host *host) { } -#endif -void mmc_wait_for_req_done (struct mmc_host *host,struct mmc_request *mrq);bool mmc_is_req_done (struct mmc_host *host,struct mmc_request *mrq);
@@ -171,4 +164,12 @@ static inline void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, host->ops->post_req(host, mrq, err); } +static inline bool mmc_cache_enabled (struct mmc_host *host) +{ +if (host->bus_ops->cache_enabled) +return host->bus_ops->cache_enabled (host); + +return false; +} +#endif
drivers/mmc/core/host.c +37 -3
@@ -33,6 +33,42 @@static DEFINE_IDA (mmc_host_ida); +#ifdef CONFIG_PM_SLEEP +static int mmc_host_class_prepare (struct device *dev) +{ +struct mmc_host *host =cls_dev_to_mmc_host (dev); + +/* +* It's safe to access the bus_ops pointer, as both userspace and the +* workqueue for detecting cards are frozen at this point. +*/ +if (!host->bus_ops) +return 0 ; + +/* Validate conditions for system suspend. */ +if (host->bus_ops->pre_suspend) +return host->bus_ops->pre_suspend (host); + +return 0 ; +} + +static void mmc_host_class_complete (struct device *dev) +{ +struct mmc_host *host =cls_dev_to_mmc_host (dev); + +_mmc_detect_change (host,0 , false); +} + +static const struct dev_pm_ops mmc_host_class_dev_pm_ops = { + .prepare = mmc_host_class_prepare, + .complete = mmc_host_class_complete, +}; + +#define MMC_HOST_CLASS_DEV_PM_OPS (&mmc_host_class_dev_pm_ops) +#else +#define MMC_HOST_CLASS_DEV_PM_OPS NULL +#endif +static void mmc_host_classdev_release (struct device *dev) {struct mmc_host *host =cls_dev_to_mmc_host (dev);
@@ -43,6 +79,7 @@ static void mmc_host_classdev_release(struct device *dev)static struct class mmc_host_class = { .name ="mmc_host" , .dev_release = mmc_host_classdev_release, + .pm =MMC_HOST_CLASS_DEV_PM_OPS , };int mmc_register_host_class (void )
@@ -477,8 +514,6 @@ int mmc_add_host(struct mmc_host *host)#endif mmc_start_host (host); -mmc_register_pm_notifier (host); -return 0 ; }
@@ -494,7 +529,6 @@ EXPORT_SYMBOL(mmc_add_host);*/ void mmc_remove_host (struct mmc_host *host) { -mmc_unregister_pm_notifier (host);mmc_stop_host (host);#ifdef CONFIG_DEBUG_FS
drivers/mmc/core/mmc.c +7 -0
@@ -2019,6 +2019,12 @@ static void mmc_detect(struct mmc_host *host) } } +static bool _mmc_cache_enabled (struct mmc_host *host) +{ +return host->card->ext_csd.cache_size >0 && + host->card->ext_csd.cache_ctrl &1 ; +} +static int _mmc_suspend (struct mmc_host *host,bool is_suspend) {int err =0 ;
@@ -2197,6 +2203,7 @@ static const struct mmc_bus_ops mmc_ops = { .alive = mmc_alive, .shutdown = mmc_shutdown, .hw_reset = _mmc_hw_reset, + .cache_enabled = _mmc_cache_enabled, };/*
drivers/mmc/core/mmc_ops.c +1 -3
@@ -959,9 +959,7 @@ int mmc_flush_cache(struct mmc_card *card) {int err =0 ; -if (mmc_card_mmc (card) && - (card->ext_csd.cache_size >0 ) && - (card->ext_csd.cache_ctrl &1 )) { +if (mmc_cache_enabled (card->host)) { err =mmc_switch (card,EXT_CSD_CMD_SET_NORMAL ,EXT_CSD_FLUSH_CACHE ,1 ,0 );if (err)
drivers/mmc/core/sd.c +6 -0
@@ -135,6 +135,9 @@ static int mmc_decode_csd(struct mmc_card *card) csd->erase_size =UNSTUFF_BITS (resp,39 ,7 ) +1 ; csd->erase_size <<= csd->write_blkbits -9 ; } + +if (UNSTUFF_BITS (resp,13 ,1 )) +mmc_card_set_readonly (card);break ;case 1 :/*
@@ -169,6 +172,9 @@ static int mmc_decode_csd(struct mmc_card *card) csd->write_blkbits =9 ; csd->write_partial =0 ; csd->erase_size =1 ; + +if (UNSTUFF_BITS (resp,13 ,1 )) +mmc_card_set_readonly (card);break ;default : pr_err("%s: unrecognised CSD structure version %d\n",
drivers/mmc/core/sdio.c +22 -6
@@ -924,21 +924,37 @@ static void mmc_sdio_detect(struct mmc_host *host)*/ static int mmc_sdio_pre_suspend (struct mmc_host *host) { -int i, err =0 ; +int i;for (i =0 ; i < host->card->sdio_funcs; i++) {struct sdio_func *func = host->card->sdio_func[i];if (func &&sdio_func_present (func) && func->dev.driver) {const struct dev_pm_ops *pmops = func->dev.driver->pm; -if (!pmops || !pmops->suspend || !pmops->resume) { +if (!pmops || !pmops->suspend || !pmops->resume)/* force removal of entire card in that case */ - err = -ENOSYS ; -break ; - } + goto remove; } } -return err; +return 0 ; + +remove: +if (!mmc_card_is_removable (host)) { +dev_warn (mmc_dev (host), +"missing suspend/resume ops for non-removable SDIO card\n" ); +/* Don't remove a non-removable card - we can't re-detect it. */ +return 0 ; + } + +/* Remove the SDIO card and let it be re-detected later on. */ +mmc_sdio_remove (host); +mmc_claim_host (host); +mmc_detach_bus (host); +mmc_power_off (host); +mmc_release_host (host); + host->pm_flags =0 ; + +return 0 ; }/*
drivers/mmc/host/sdhci-pci-core.c +29 -0
@@ -520,6 +520,7 @@ struct intel_host {int drv_strength;bool d3_retune;bool rpm_retune_ok; +bool needs_pwr_off;u32 glk_rx_ctrl1;u32 glk_tun_val;u32 active_ltr;
@@ -647,9 +648,25 @@ static int bxt_get_cd(struct mmc_host *mmc)static void sdhci_intel_set_power (struct sdhci_host *host,unsigned char mode,unsigned short vdd) { +struct sdhci_pci_slot *slot =sdhci_priv (host); +struct intel_host *intel_host =sdhci_pci_priv (slot);int cntr;u8 reg; +/* +* Bus power may control card power, but a full reset still may not +* reset the power, whereas a direct write to SDHCI_POWER_CONTROL can. +* That might be needed to initialize correctly, if the card was left +* powered on previously. +*/ +if (intel_host->needs_pwr_off) { + intel_host->needs_pwr_off = false; +if (mode !=MMC_POWER_OFF ) { +sdhci_writeb (host,0 ,SDHCI_POWER_CONTROL ); +usleep_range (10000 ,12500 ); + } + } +sdhci_set_power (host, mode, vdd);if (mode ==MMC_POWER_OFF )
@@ -1139,6 +1156,14 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)return 0 ; } +static void byt_needs_pwr_off (struct sdhci_pci_slot *slot) +{ +struct intel_host *intel_host =sdhci_pci_priv (slot); +u8 reg =sdhci_readb (slot->host,SDHCI_POWER_CONTROL ); + + intel_host->needs_pwr_off = reg &SDHCI_POWER_ON ; +} +static int byt_sd_probe_slot (struct sdhci_pci_slot *slot) {byt_probe_slot (slot);
@@ -1156,6 +1181,8 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot) slot->chip->pdev->subsystem_device == PCI_SUBDEVICE_ID_NI_78E3) slot->host->mmc->caps2 |= MMC_CAP2_AVOID_3_3V; +byt_needs_pwr_off (slot); +return 0 ; }
@@ -1907,6 +1934,8 @@ static const struct pci_device_id pci_ids[] = {SDHCI_PCI_DEVICE (INTEL ,CMLH_SD , intel_byt_sd),SDHCI_PCI_DEVICE (INTEL ,JSL_EMMC , intel_glk_emmc),SDHCI_PCI_DEVICE (INTEL ,JSL_SD , intel_byt_sd), +SDHCI_PCI_DEVICE (INTEL ,LKF_EMMC , intel_glk_emmc), +SDHCI_PCI_DEVICE (INTEL ,LKF_SD , intel_byt_sd),SDHCI_PCI_DEVICE (O2 ,8120 , o2),SDHCI_PCI_DEVICE (O2 ,8220 , o2), SDHCI_PCI_DEVICE(O2, 8221, o2),
drivers/mmc/host/sdhci-pci.h +2 -0
@@ -57,6 +57,8 @@#define PCI_DEVICE_ID_INTEL_CMLH_SD 0x06f5#define PCI_DEVICE_ID_INTEL_JSL_EMMC 0x4dc4#define PCI_DEVICE_ID_INTEL_JSL_SD 0x4df8 +#define PCI_DEVICE_ID_INTEL_LKF_EMMC 0x98c4 +#define PCI_DEVICE_ID_INTEL_LKF_SD 0x98f8#define PCI_DEVICE_ID_SYSKONNECT_8000 0x8000#define PCI_DEVICE_ID_VIA_95D0 0x95d0
drivers/mmc/host/sdhci.c +31 -29
72 lines not on this page · raw message
drivers/mmc/host/uniphier-sd.c +4 -1
@@ -639,7 +639,7 @@ static int uniphier_sd_probe(struct platform_device *pdev) ret =tmio_mmc_host_probe (host);if (ret) - goto free_host; + goto disable_clk; ret =devm_request_irq (dev, irq, tmio_mmc_irq,IRQF_SHARED ,dev_name (dev), host);
@@ -650,6 +650,8 @@ static int uniphier_sd_probe(struct platform_device *pdev) remove_host:tmio_mmc_host_remove (host); +disable_clk: +uniphier_sd_clk_disable (host); free_host:tmio_mmc_host_free (host);
@@ -662,6 +664,7 @@ static int uniphier_sd_remove(struct platform_device *pdev)tmio_mmc_host_remove (host);uniphier_sd_clk_disable (host); +tmio_mmc_host_free (host);return 0 ; }
drivers/mtd/nand/raw/atmel/nand-controller.c +4 -2
@@ -813,10 +813,12 @@ static int atmel_nand_pmecc_correct_data(struct nand_chip *chip, void *buf,NULL ,0 , chip->ecc.strength); -if (ret >=0 ) +if (ret >=0 ) { + mtd->ecc_stats.corrected += ret; max_bitflips =max (ret, max_bitflips); -else + }else { mtd->ecc_stats.failed++; + } databuf += chip->ecc.size; eccbuf += chip->ecc.bytes;
drivers/mtd/nand/spi/core.c +2 -0
@@ -1133,12 +1133,14 @@ static const struct spi_device_id spinand_ids[] = { { .name = "spi-nand" }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (spi, spinand_ids);#ifdef CONFIG_OF static const struct of_device_id spinand_of_ids[] = { { .compatible ="spi-nand" }, {/* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, spinand_of_ids);#endif static struct spi_mem_driver spinand_drv = {
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c +15 -15
@@ -524,6 +524,16 @@ mlxsw_sp_mr_route_evif_resolve(struct mlxsw_sp_mr_table *mr_table,u16 erif_index =0 ;int err; +/* Add the eRIF */ +if (mlxsw_sp_mr_vif_valid (rve->mr_vif)) { + erif_index =mlxsw_sp_rif_index (rve->mr_vif->rif); + err = mr->mr_ops->route_erif_add (mlxsw_sp, + rve->mr_route->route_priv, + erif_index); +if (err) +return err; + } +/* Update the route action, as the new eVIF can be a tunnel or a pimreg * device which will require updating the action. */
@@ -533,17 +543,7 @@ mlxsw_sp_mr_route_evif_resolve(struct mlxsw_sp_mr_table *mr_table, rve->mr_route->route_priv, route_action);if (err) -return err; - } - -/* Add the eRIF */ -if (mlxsw_sp_mr_vif_valid (rve->mr_vif)) { - erif_index =mlxsw_sp_rif_index (rve->mr_vif->rif); - err = mr->mr_ops->route_erif_add (mlxsw_sp, - rve->mr_route->route_priv, - erif_index); -if (err) - goto err_route_erif_add; + goto err_route_action_update; }/* Update the minimum MTU */
@@ -561,14 +561,14 @@ mlxsw_sp_mr_route_evif_resolve(struct mlxsw_sp_mr_table *mr_table,return 0 ; err_route_min_mtu_update: -if (mlxsw_sp_mr_vif_valid (rve->mr_vif)) - mr->mr_ops->route_erif_del (mlxsw_sp, rve->mr_route->route_priv, - erif_index); -err_route_erif_add:if (route_action != rve->mr_route->route_action) mr->mr_ops->route_action_update (mlxsw_sp, rve->mr_route->route_priv, rve->mr_route->route_action); +err_route_action_update: +if (mlxsw_sp_mr_vif_valid (rve->mr_vif)) + mr->mr_ops->route_erif_del (mlxsw_sp, rve->mr_route->route_priv, + erif_index);return err; }
drivers/net/wimax/i2400m/op-rfkill.c +1 -1
@@ -86,7 +86,7 @@ int i2400m_op_rfkill_sw_toggle(struct wimax_dev *wimax_dev,if (cmd ==NULL ) goto error_alloc; cmd->hdr.type =cpu_to_le16 (I2400M_MT_CMD_RF_CONTROL ); - cmd->hdr.length =sizeof (cmd->sw_rf); + cmd->hdr.length =cpu_to_le16 (sizeof (cmd->sw_rf)); cmd->hdr.version =cpu_to_le16 (I2400M_L3L4_VERSION ); cmd->sw_rf.hdr.type =cpu_to_le16 (I2400M_TLV_RF_OPERATION ); cmd->sw_rf.hdr.length =cpu_to_le16 (sizeof (cmd->sw_rf.status));
drivers/net/wireless/rsi/rsi_91x_sdio.c +1 -1
@@ -1511,7 +1511,7 @@ static int rsi_restore(struct device *dev) }static const struct dev_pm_ops rsi_pm_ops = { .suspend = rsi_suspend, - .resume = rsi_resume, + .resume_noirq = rsi_resume, .freeze = rsi_freeze, .thaw = rsi_thaw, .restore = rsi_restore,
drivers/pci/pci.c +3 -13
@@ -1666,20 +1666,10 @@ static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)int err;int i, bars =0 ; -/* -* Power state could be unknown at this point, either due to a fresh -* boot or a device removal call. So get the current power state -* so that things like MSI message writing will behave as expected -* (e.g. if the device really is in D0 at enable time). -*/ -if (dev->pm_cap) { -u16 pmcsr; -pci_read_config_word (dev, dev->pm_cap +PCI_PM_CTRL , &pmcsr); - dev->current_state = (pmcsr &PCI_PM_CTRL_STATE_MASK ); - } - -if (atomic_inc_return (&dev->enable_cnt) >1 ) +if (atomic_inc_return (&dev->enable_cnt) >1 ) { +pci_update_current_state (dev, dev->current_state);return 0 ;/* already enabled */ + } bridge =pci_upstream_bridge (dev);if (bridge)
drivers/perf/arm_pmu_platform.c +1 -1
@@ -236,7 +236,7 @@ int arm_pmu_device_probe(struct platform_device *pdev, ret =armpmu_register (pmu);if (ret) - goto out_free; + goto out_free_irqs;return 0 ;
drivers/phy/ti/phy-twl4030-usb.c +1 -1
@@ -779,7 +779,7 @@ static int twl4030_usb_remove(struct platform_device *pdev)usb_remove_phy (&twl->phy);pm_runtime_get_sync (twl->dev); -cancel_delayed_work (&twl->id_workaround_work); +cancel_delayed_work_sync (&twl->id_workaround_work);device_remove_file (twl->dev, &dev_attr_vbus);/* set transceiver mode to power on defaults */
drivers/platform/x86/intel_pmc_core.c +16 -3
@@ -831,9 +831,15 @@ static const struct pci_device_id pmc_pci_ids[] = {* the platform BIOS enforces 24Mhx Crystal to shutdown * before PMC can assert SLP_S0#. */ +static bool xtal_ignore;static int quirk_xtal_ignore (const struct dmi_system_id *id) { -struct pmc_dev *pmcdev = &pmc; + xtal_ignore = true; +return 0 ; +} + +static void pmc_core_xtal_ignore (struct pmc_dev *pmcdev) +{u32 value; value =pmc_core_reg_read (pmcdev, pmcdev->map->pm_vric1_offset);
@@ -842,7 +848,6 @@ static int quirk_xtal_ignore(const struct dmi_system_id *id)/* Low Voltage Mode Enable */ value &= ~SPT_PMC_VRIC1_SLPS0LVEN ;pmc_core_reg_write (pmcdev, pmcdev->map->pm_vric1_offset, value); -return 0 ; }static const struct dmi_system_id pmc_core_dmi_table[] = {
@@ -857,6 +862,14 @@ static const struct dmi_system_id pmc_core_dmi_table[] = { {} }; +static void pmc_core_do_dmi_quirks (struct pmc_dev *pmcdev) +{ +dmi_check_system (pmc_core_dmi_table); + +if (xtal_ignore) +pmc_core_xtal_ignore (pmcdev); +} +static int pmc_core_probe (struct platform_device *pdev) {static bool device_initialized;
@@ -898,7 +911,7 @@ static int pmc_core_probe(struct platform_device *pdev)mutex_init (&pmcdev->lock);platform_set_drvdata (pdev, pmcdev); pmcdev->pmc_xram_read_bit =pmc_core_check_read_lock_bit (); -dmi_check_system (pmc_core_dmi_table); +pmc_core_do_dmi_quirks (pmcdev);pmc_core_dbgfs_register (pmcdev);
drivers/power/supply/bq27xxx_battery.c +27 -24
75 lines not on this page · raw message
drivers/power/supply/generic-adc-battery.c +1 -1
@@ -382,7 +382,7 @@ static int gab_remove(struct platform_device *pdev) }kfree (adc_bat->psy_desc.properties); -cancel_delayed_work (&adc_bat->bat_work); +cancel_delayed_work_sync (&adc_bat->bat_work);return 0 ; }
drivers/power/supply/lp8788-charger.c +1 -1
@@ -501,7 +501,7 @@ static int lp8788_set_irqs(struct platform_device *pdev, ret =request_threaded_irq (virq,NULL , lp8788_charger_irq_thread, -0 , name, pchg); +IRQF_ONESHOT , name, pchg);if (ret)break ; }
drivers/power/supply/pm2301_charger.c +1 -1
@@ -1095,7 +1095,7 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client, ret =request_threaded_irq (gpio_to_irq (pm2->pdata->gpio_irq_number),NULL , pm2xxx_charger_irq[0 ].isr, - pm2->pdata->irq_type, + pm2->pdata->irq_type |IRQF_ONESHOT , pm2xxx_charger_irq[0 ].name, pm2);if (ret !=0 ) {
drivers/power/supply/s3c_adc_battery.c +1 -1
@@ -394,7 +394,7 @@ static int s3c_adc_bat_remove(struct platform_device *pdev)gpio_free (pdata->gpio_charge_finished); } -cancel_delayed_work (&bat_work); +cancel_delayed_work_sync (&bat_work);if (pdata->exit) pdata->exit ();
drivers/power/supply/tps65090-charger.c +1 -1
@@ -301,7 +301,7 @@ static int tps65090_charger_probe(struct platform_device *pdev)if (irq != -ENXIO ) { ret =devm_request_threaded_irq (&pdev->dev, irq,NULL , - tps65090_charger_isr,0 ,"tps65090-charger" , cdata); + tps65090_charger_isr,IRQF_ONESHOT ,"tps65090-charger" , cdata);if (ret) { dev_err(cdata->dev, "Unable to register irq %d err %d\n", irq,
drivers/power/supply/tps65217_charger.c +1 -1
@@ -238,7 +238,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)for (i =0 ; i <NUM_CHARGER_IRQS ; i++) { ret =devm_request_threaded_irq (&pdev->dev, irq[i],NULL , tps65217_charger_irq, -0 ,"tps65217-charger" , +IRQF_ONESHOT ,"tps65217-charger" , charger);if (ret) { dev_err(charger->dev,
drivers/scsi/device_handler/scsi_dh_alua.c +3 -2
@@ -565,10 +565,11 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)* even though it shouldn't according to T10. * The retry without rtpg_ext_hdr_req set * handles this. +* Note: some arrays return a sense key of ILLEGAL_REQUEST +* with ASC 00h if they don't support the extended header. */ if (!(pg->flags &ALUA_RTPG_EXT_HDR_UNSUPP ) && - sense_hdr.sense_key ==ILLEGAL_REQUEST && - sense_hdr.asc ==0x24 && sense_hdr.ascq ==0 ) { + sense_hdr.sense_key ==ILLEGAL_REQUEST ) { pg->flags |=ALUA_RTPG_EXT_HDR_UNSUPP ; goto retry; }
drivers/scsi/libfc/fc_lport.c +1 -1
@@ -1729,7 +1729,7 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,if (mfs <FC_SP_MIN_MAX_PAYLOAD || mfs >FC_SP_MAX_MAX_PAYLOAD ) {FC_LPORT_DBG (lport,"FLOGI bad mfs:%hu response, " -"lport->mfs:%hu\n" , mfs, lport->mfs); +"lport->mfs:%u\n" , mfs, lport->mfs);fc_lport_error (lport, fp); goto out; }
drivers/scsi/lpfc/lpfc_attr.c +45 -30
113 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_crtn.h +0 -3
@@ -56,9 +56,6 @@ void lpfc_register_new_vport(struct lpfc_hba *, struct lpfc_vport *,void lpfc_unreg_vpi (struct lpfc_hba *,uint16_t ,LPFC_MBOXQ_t *);void lpfc_init_link (struct lpfc_hba *,LPFC_MBOXQ_t *,uint32_t ,uint32_t );void lpfc_request_features (struct lpfc_hba *,struct lpfcMboxq *); -void lpfc_supported_pages (struct lpfcMboxq *); -void lpfc_pc_sli4_params (struct lpfcMboxq *); -int lpfc_pc_sli4_params_get (struct lpfc_hba *,LPFC_MBOXQ_t *);int lpfc_sli4_mbox_rsrc_extent (struct lpfc_hba *,struct lpfcMboxq *,uint16_t ,uint16_t ,bool );int lpfc_get_sli4_parameters (struct lpfc_hba *,LPFC_MBOXQ_t *);
drivers/scsi/lpfc/lpfc_hw4.h +1 -173
198 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_init.c +5 -107
154 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_mbox.c +0 -36
@@ -2622,39 +2622,3 @@ lpfc_resume_rpi(struct lpfcMboxq *mbox, struct lpfc_nodelist *ndlp) resume_rpi->event_tag = ndlp->phba->fc_eventTag; } -/** -* lpfc_supported_pages - Initialize the PORT_CAPABILITIES supported pages -* mailbox command. -* @mbox: pointer to lpfc mbox command to initialize. -* -* The PORT_CAPABILITIES supported pages mailbox command is issued to -* retrieve the particular feature pages supported by the port. -**/ -void -lpfc_supported_pages (struct lpfcMboxq *mbox) -{ -struct lpfc_mbx_supp_pages *supp_pages; - -memset (mbox,0 ,sizeof (*mbox)); - supp_pages = &mbox->u.mqe.un.supp_pages; -bf_set (lpfc_mqe_command, &mbox->u.mqe,MBX_PORT_CAPABILITIES ); -bf_set (cpn, supp_pages,LPFC_SUPP_PAGES ); -} - -/** -* lpfc_pc_sli4_params - Initialize the PORT_CAPABILITIES SLI4 Params mbox cmd. -* @mbox: pointer to lpfc mbox command to initialize. -* -* The PORT_CAPABILITIES SLI4 parameters mailbox command is issued to -* retrieve the particular SLI4 features supported by the port. -**/ -void -lpfc_pc_sli4_params (struct lpfcMboxq *mbox) -{ -struct lpfc_mbx_pc_sli4_params *sli4_params; - -memset (mbox,0 ,sizeof (*mbox)); - sli4_params = &mbox->u.mqe.un.sli4_params; -bf_set (lpfc_mqe_command, &mbox->u.mqe,MBX_PORT_CAPABILITIES ); -bf_set (cpn, sli4_params,LPFC_SLI4_PARAMETERS ); -}
drivers/scsi/lpfc/lpfc_nportdisc.c +7 -4
@@ -888,9 +888,14 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, } }else if ((!(ndlp->nlp_type &NLP_FABRIC ) && ((ndlp->nlp_type &NLP_FCP_TARGET ) || - !(ndlp->nlp_type &NLP_FCP_INITIATOR ))) || + (ndlp->nlp_type &NLP_NVME_TARGET ) || + (vport->fc_flag &FC_PT2PT ))) || (ndlp->nlp_state ==NLP_STE_ADISC_ISSUE )) { -/* Only try to re-login if this is NOT a Fabric Node */ +/* Only try to re-login if this is NOT a Fabric Node +* AND the remote NPORT is a FCP/NVME Target or we +* are in pt2pt mode. NLP_STE_ADISC_ISSUE is a special +* case for LOGO as a response to ADISC behavior. +*/ mod_timer (&ndlp->nlp_delayfunc, jiffies +msecs_to_jiffies (1000 *1 ));spin_lock_irq (shost->host_lock);
@@ -1956,8 +1961,6 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, ndlp->nlp_last_elscmd =ELS_CMD_PLOGI ;lpfc_issue_els_logo (vport, ndlp,0 ); - ndlp->nlp_prev_state =NLP_STE_REG_LOGIN_ISSUE ; -lpfc_nlp_set_state (vport, ndlp,NLP_STE_NPR_NODE );return ndlp->nlp_state; }
drivers/scsi/lpfc/lpfc_nvmet.c +0 -1
@@ -3204,7 +3204,6 @@ lpfc_nvmet_unsol_issue_abort(struct lpfc_hba *phba,bf_set (wqe_rcvoxid, &wqe_abts->xmit_sequence.wqe_com, xri);/* Word 10 */ -bf_set (wqe_dbde, &wqe_abts->xmit_sequence.wqe_com,1 );bf_set (wqe_iod, &wqe_abts->xmit_sequence.wqe_com,LPFC_WQE_IOD_WRITE );bf_set (wqe_lenloc, &wqe_abts->xmit_sequence.wqe_com,LPFC_WQE_LENLOC_WORD12 );
drivers/scsi/lpfc/lpfc_sli.c +22 -21
97 lines not on this page · raw message
drivers/scsi/mpt3sas/mpt3sas_base.c +4 -0
@@ -6572,6 +6572,8 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc)ioc_info (ioc,"sending diag reset !!\n" ); +pci_cfg_access_lock (ioc->pdev); +drsprintk (ioc,ioc_info (ioc,"clear interrupts\n" )); count =0 ;
@@ -6653,10 +6655,12 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc) goto out; } +pci_cfg_access_unlock (ioc->pdev);ioc_info (ioc,"diag reset: SUCCESS\n" );return 0 ; out: +pci_cfg_access_unlock (ioc->pdev);ioc_err (ioc,"diag reset: FAILED\n" );return -EFAULT ; }
drivers/scsi/qla2xxx/qla_attr.c +7 -1
@@ -2691,6 +2691,8 @@ qla2x00_reset_host_stats(struct Scsi_Host *shost) vha->qla_stats.jiffies_at_last_reset =get_jiffies_64 ();if (IS_FWI2_CAPABLE (ha)) { +int rval; + stats =dma_alloc_coherent (&ha->pdev->dev,sizeof (*stats), &stats_dma,GFP_KERNEL );if (!stats) {
@@ -2700,7 +2702,11 @@ qla2x00_reset_host_stats(struct Scsi_Host *shost) }/* reset firmware statistics */ -qla24xx_get_isp_stats (base_vha, stats, stats_dma,BIT_0 ); + rval =qla24xx_get_isp_stats (base_vha, stats, stats_dma,BIT_0 ); +if (rval !=QLA_SUCCESS ) +ql_log (ql_log_warn, vha,0x70de , +"Resetting ISP statistics failed: rval = %d\n" , + rval);dma_free_coherent (&ha->pdev->dev,sizeof (*stats), stats, stats_dma);
drivers/scsi/qla2xxx/qla_bsg.c +2 -1
@@ -17,10 +17,11 @@ void qla2x00_bsg_job_done(srb_t *sp, int res)struct bsg_job *bsg_job = sp->u.bsg_job;struct fc_bsg_reply *bsg_reply = bsg_job->reply; + sp->free (sp); + bsg_reply->result = res;bsg_job_done (bsg_job, bsg_reply->result, bsg_reply->reply_payload_rcv_len); - sp->free (sp); }void qla2x00_bsg_sp_free (srb_t *sp)
drivers/scsi/qla2xxx/qla_os.c +0 -7
@@ -983,8 +983,6 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,if (rval !=QLA_SUCCESS ) {ql_dbg (ql_dbg_io + ql_dbg_verbose, vha,0x3078 ,"Start scsi failed rval=%d for cmd=%p.\n" , rval, cmd); -if (rval ==QLA_INTERFACE_ERROR ) - goto qc24_free_sp_fail_command; goto qc24_host_busy_free_sp; }
@@ -996,11 +994,6 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, qc24_target_busy:return SCSI_MLQUEUE_TARGET_BUSY ; -qc24_free_sp_fail_command: - sp->free (sp); -CMD_SP (cmd) =NULL ; -qla2xxx_rel_qpair_sp (sp->qpair, sp); - qc24_fail_command: cmd->scsi_done (cmd);
drivers/scsi/smartpqi/smartpqi_init.c +160 -0
78 lines not on this page · raw message
drivers/staging/media/imx/imx-media-capture.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/media/ipu3/ipu3-v4l2.c +21 -15
Lines of this file are not shown. View the raw message.
drivers/usb/gadget/function/f_uac1.c +43 -0
43 lines not on this page · raw message
fs/ext4/ialloc.c +32 -16
48 lines not on this page · raw message
fs/fuse/file.c +29 -12
41 lines not on this page · raw message
kernel/module.c +43 -17
60 lines not on this page · raw message
kernel/trace/trace.c +15 -26
41 lines not on this page · raw message
kernel/trace/trace_clock.c +30 -14
44 lines not on this page · raw message
sound/usb/mixer.c +30 -30
60 lines not on this page · raw message
sound/usb/mixer_maps.c +40 -28
68 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.