Linux 4.19.92
Greg KH
maintainerI'm announcing the release of the 4.19.92 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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/psci.c | 15 +- arch/arm64/kvm/sys_regs.c | 5 arch/mips/include/asm/pgtable-64.h | 9 - arch/powerpc/include/asm/spinlock.h | 4 arch/powerpc/kernel/irq.c | 4 arch/powerpc/platforms/pseries/setup.c | 7 arch/s390/include/asm/pgalloc.h | 16 +- arch/s390/include/asm/timex.h | 16 +- arch/s390/kernel/dis.c | 13 - arch/sh/include/cpu-sh4/cpu/sh7734.h | 2 arch/x86/include/asm/crash.h | 2 arch/x86/include/asm/fixmap.h | 2 arch/x86/include/asm/syscall_wrapper.h | 23 +-- arch/x86/kernel/apic/io_apic.c | 9 - arch/x86/kernel/cpu/mcheck/mce_amd.c | 4 arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 arch/x86/lib/x86-opcode-map.txt | 18 +- arch/x86/mm/pgtable.c | 4 drivers/acpi/button.c | 11 + drivers/ata/libata-core.c | 3 drivers/block/loop.c | 26 ++- drivers/block/nbd.c | 6 drivers/char/hw_random/omap3-rom-rng.c | 3 drivers/char/ipmi/ipmi_msghandler.c | 23 ++- drivers/cpufreq/cpufreq.c | 7 drivers/crypto/atmel-aes.c | 18 +- drivers/crypto/atmel-authenc.h | 2 drivers/crypto/atmel-sha.c | 2 drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 22 +-- drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 12 - drivers/crypto/virtio/virtio_crypto_algs.c | 12 + drivers/crypto/vmx/Makefile | 6 drivers/edac/ghes_edac.c | 10 + drivers/extcon/extcon-sm5502.c | 4 drivers/extcon/extcon-sm5502.h | 2 drivers/fsi/fsi-core.c | 31 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 drivers/gpu/drm/amd/amdgpu/si_ih.c | 3 drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 5 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 + drivers/gpu/drm/drm_vblank.c | 6 drivers/gpu/drm/gma500/oaktrail_crtc.c | 2 drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 1 drivers/gpu/drm/tegra/sor.c | 5 drivers/gpu/host1x/job.c | 11 - drivers/hwtracing/intel_th/pci.c | 10 + drivers/iio/adc/dln2-adc.c | 20 +- drivers/iio/adc/max1027.c | 8 + drivers/iio/dac/Kconfig | 4 drivers/iio/dac/ad5446.c | 6 drivers/iio/light/bh1750.c | 4 drivers/infiniband/hw/qedr/verbs.c | 12 + drivers/infiniband/ulp/iser/iscsi_iser.c | 1 drivers/md/bcache/alloc.c | 5 drivers/md/bcache/bcache.h | 2 drivers/md/bcache/super.c | 51 +++++-- drivers/md/md-bitmap.c | 2 drivers/media/i2c/ov2659.c | 18 +- drivers/media/i2c/ov6650.c | 42 +++-- drivers/media/i2c/smiapp/smiapp-core.c | 12 + drivers/media/pci/cx88/cx88-video.c | 11 - drivers/media/platform/am437x/am437x-vpfe.c | 4 drivers/media/platform/qcom/venus/core.c | 9 - drivers/media/platform/qcom/venus/hfi_venus.c | 6 drivers/media/platform/rcar_drif.c | 1 drivers/media/platform/ti-vpe/vpdma.h | 1 drivers/media/platform/ti-vpe/vpe.c | 52 +++++-- drivers/media/radio/si470x/radio-si470x-i2c.c | 2 drivers/media/usb/b2c2/flexcop-usb.c | 8 - drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 9 - drivers/media/v4l2-core/v4l2-ioctl.c | 33 ++-- drivers/mmc/host/mtk-sd.c | 2 drivers/mmc/host/sdhci-msm.c | 28 ++- drivers/mmc/host/sdhci-of-esdhc.c | 7 drivers/mmc/host/sdhci-pci-core.c | 10 + drivers/mmc/host/sdhci.c | 11 - drivers/mmc/host/sdhci.h | 2 drivers/mmc/host/tmio_mmc_core.c | 2 drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 6 drivers/net/dsa/Kconfig | 1 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 16 +- drivers/net/ethernet/cortina/gemini.c | 2 drivers/net/ethernet/hisilicon/hip04_eth.c | 2 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 drivers/net/ethernet/intel/i40e/i40e_main.c | 10 - drivers/net/ethernet/intel/ice/ice_controlq.c | 2 drivers/net/ethernet/intel/ice/ice_controlq.h | 5 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 drivers/net/ethernet/qlogic/qede/qede_filter.c | 2 drivers/net/ethernet/qlogic/qede/qede_main.c | 4 drivers/net/ethernet/qlogic/qla3xxx.c | 8 - drivers/net/ethernet/ti/cpsw_ale.c | 2 drivers/net/fjes/fjes_main.c | 3 drivers/net/phy/dp83867.c | 15 +- drivers/net/phy/phy_device.c | 4 drivers/net/tun.c | 4 drivers/net/usb/lan78xx.c | 1 drivers/net/wireless/ath/ath10k/coredump.c | 11 + drivers/net/wireless/ath/ath10k/mac.c | 26 +-- drivers/net/wireless/ath/ath10k/txrx.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 drivers/net/wireless/intel/iwlwifi/dvm/led.c | 3 drivers/net/wireless/intel/iwlwifi/mvm/led.c | 3 drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 3 drivers/net/wireless/marvell/libertas/if_sdio.c | 5 drivers/net/wireless/marvell/mwifiex/pcie.c | 5 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 2 drivers/net/wireless/realtek/rtlwifi/usb.c | 5 drivers/nvme/host/core.c | 12 + drivers/nvmem/imx-ocotp.c | 4 drivers/parport/share.c | 21 ++ drivers/phy/qualcomm/phy-qcom-usb-hs.c | 7 drivers/pinctrl/devicetree.c | 25 ++- drivers/pinctrl/pinctrl-amd.c | 3 drivers/pinctrl/sh-pfc/pfc-sh7734.c | 4 drivers/platform/x86/hp-wmi.c | 2 drivers/regulator/max8907-regulator.c | 15 +- drivers/soundwire/intel.c | 10 + drivers/spi/spi-img-spfi.c | 2 drivers/spi/spi-pxa2xx.c | 6 drivers/spi/spi-sprd-adi.c | 3 drivers/spi/spi-st-ssc4.c | 3 drivers/spi/spi-tegra20-slink.c | 5 drivers/spi/spidev.c | 3 drivers/staging/comedi/drivers/gsc_hpdi.c | 10 + drivers/staging/fbtft/fbtft-core.c | 2 drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 drivers/staging/rtl8192u/r8192U_core.c | 17 +- drivers/usb/core/devio.c | 15 +- drivers/usb/host/ehci-q.c | 13 + drivers/usb/host/xhci-pci.c | 2 drivers/usb/renesas_usbhs/common.h | 3 drivers/usb/renesas_usbhs/mod_gadget.c | 12 + drivers/usb/usbip/usbip_common.c | 3 drivers/usb/usbip/vhci_rx.c | 13 + drivers/xen/Kconfig | 3 fs/btrfs/async-thread.c | 56 ++++++- fs/btrfs/ctree.c | 2 fs/btrfs/ctree.h | 2 fs/btrfs/disk-io.c | 2 fs/btrfs/extent-tree.c | 7 fs/btrfs/extent_io.c | 6 fs/btrfs/file-item.c | 7 fs/btrfs/inode.c | 12 - fs/btrfs/ioctl.c | 10 + fs/btrfs/reada.c | 10 - fs/btrfs/relocation.c | 1 fs/btrfs/scrub.c | 3 fs/btrfs/send.c | 6 fs/btrfs/tests/free-space-tree-tests.c | 4 fs/btrfs/tests/qgroup-tests.c | 4 fs/btrfs/tree-log.c | 52 ++++++- fs/btrfs/uuid-tree.c | 2 fs/ext4/dir.c | 5 fs/ext4/inode.c | 4 fs/ext4/namei.c | 32 ++-- include/drm/drm_dp_mst_helper.h | 2 include/linux/cpufreq.h | 11 - include/linux/ipmi_smi.h | 12 + include/linux/miscdevice.h | 1 include/linux/mod_devicetable.h | 4 include/linux/sched/cpufreq.h | 3 include/net/dst.h | 2 include/trace/events/wbt.h | 12 + include/uapi/linux/cec-funcs.h | 6 kernel/bpf/stackmap.c | 7 kernel/sched/cpufreq.c | 18 ++ kernel/sched/cpufreq_schedutil.c | 8 - kernel/trace/trace.c | 2 kernel/trace/trace_kprobe.c | 27 +++ net/bluetooth/hci_conn.c | 8 + net/bluetooth/hci_core.c | 13 + net/bluetooth/hci_request.c | 9 + net/mac80211/status.c | 3 net/nfc/nci/uart.c | 2 net/packet/af_packet.c | 3 net/rfkill/core.c | 9 - net/sctp/protocol.c | 5 samples/pktgen/functions.sh | 17 +- sound/core/pcm_native.c | 4 sound/core/timer.c | 10 + sound/pci/hda/patch_ca0132.c | 23 ++- sound/soc/codecs/rt5677.c | 1 sound/soc/codecs/wm2200.c | 5 sound/soc/codecs/wm5100.c | 2 sound/soc/codecs/wm8904.c | 1 sound/soc/intel/boards/bytcr_rt5640.c | 10 - sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 tools/lib/bpf/libbpf.c | 14 + tools/lib/subcmd/Makefile | 4 tools/lib/traceevent/parse-filter.c | 9 - tools/objtool/arch/x86/lib/x86-opcode-map.txt | 18 +- tools/perf/builtin-report.c | 7 tools/perf/pmu-events/jevents.c | 13 + tools/perf/tests/bp_signal.c | 15 -- tools/perf/tests/task-exit.c | 1 tools/perf/util/dwarf-aux.c | 80 +++++++++-- tools/perf/util/dwarf-aux.h | 3 tools/perf/util/parse-events.c | 26 ++- tools/perf/util/probe-finder.c | 45 +++++- tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c | 1 tools/testing/selftests/bpf/cgroup_helpers.c | 2 tools/testing/selftests/net/forwarding/router_bridge_vlan.sh | 2 213 files changed, 1407 insertions(+), 519 deletions(-)
Adrian Hunter (3):
x86/insn: Add some Intel instructions to the opcode map
mmc: sdhci: Workaround broken command queuing on Intel GLK
mmc: sdhci: Add a quirk for broken command queuing
Alexander Shishkin (2):
intel_th: pci: Add Comet Lake PCH-V support
intel_th: pci: Add Elkhart Lake SOC support
Alexandru Ardelean (1):
iio: dln2-adc: fix iio_triggered_buffer_postenable() position
Allen Pais (2):
libertas: fix a potential NULL pointer dereference drm/amdkfd: fix a potential NULL pointer dereference (v2)
Anand Jain (1):
btrfs: send: remove WARN_ON for readonly mount
Andrea Righi (1):
bcache: fix deadlock in bcache_allocator
Andrew Jeffery (1):
fsi: core: Fix small accesses and unaligned offsets via sysfs
Andy Shevchenko (1):
fbtft: Make sure string is NULL terminated
Anilkumar Kolli (1):
ath10k: fix backtrace on coredump
Ard Biesheuvel (1):
crypto: virtio - deal with unsupported input sizes
Bart Van Assche (1):
block: Fix writeback throttling W=1 compiler warnings
Ben Dooks (Codethink) (2):
Bluetooth: missed cpu_to_le16 conversion in hci_init4_req
pinctrl: amd: fix __iomem annotation in amd_gpio_irq_handler()
Ben Greear (1):
ath10k: fix offchannel tx failure when no ath10k_mac_tx_frm_has_freq
Ben Hutchings (1):
net: qlogic: Fix error paths in ql_alloc_large_buffers()
Ben Zhang (1):
ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile
Benjamin Berg (1):
x86/mce: Lower throttling MCE messages' priority to warning
Benoit Parrot (10):
media: am437x-vpfe: Setting STD to current value is not an error
media: i2c: ov2659: fix s_stream return value
media: i2c: ov2659: Fix missing 720p register config
media: ti-vpe: vpe: Fix Motion Vector vpdma stride
media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format
media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number
media: ti-vpe: vpe: Make sure YUYV is set as default format
media: ti-vpe: vpe: fix a v4l2-compliance failure causing a kernel panic
media: ti-vpe: vpe: ensure buffers are cleaned up properly in abort cases
media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage
Bjorn Andersson (1):
ath10k: Correct error handling of dma_map_single()
Brian Masney (1):
drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings
Chaotian Jing (1):
mmc: mediatek: fix CMD_TA to 2 for MT8173 HS200/HS400 mode
Chris Chiu (1):
rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
Christian König (1):
drm/amdgpu: grab the id mgr lock while accessing passid_mapping
Christophe JAILLET (1):
media: cx88: Fix some error handling path in 'cx8800_initdev()'
Christophe Leroy (1):
powerpc/irq: fix stack overflow verification
Chuhong Yuan (7):
fjes: fix missed check in fjes_acpi_add
media: si470x-i2c: add missed operations in remove
spi: pxa2xx: Add missed security checks
spi: tegra20-slink: add missed clk_unprepare
ASoC: wm2200: add missed operations in remove and probe failure
spi: st-ssc4: add missed pm_runtime_disable
ASoC: wm5100: add missed pm_runtime_disable
Colin Ian King (1):
drm/amdgpu: fix uninitialized variable pasid_mapping_needed
Coly Li (1):
bcache: fix static checker warning in bcache_device_free()
Connor Kuehl (1):
staging: rtl8188eu: fix possible null dereference
Corentin Labbe (1):
crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
Corey Minyard (1):
ipmi: Don't allow device module unload when in use
Cristian Birsan (1):
net: usb: lan78xx: Fix suspend/resume PHY register access error
Dan Carpenter (2):
btrfs: return error pointer from alloc_test_extent_buffer
ext4: unlock on error in ext4_expand_extra_isize()
Daniel Kurtz (1):
drm/bridge: dw-hdmi: Restore audio when setting a mode
Daniel T. Lee (1):
samples: pktgen: fix proc_cmd command result check logic
Darrick J. Wong (1):
loop: fix no-unmap write-zeroes request behavior
David Galiffi (1):
drm/amd/display: Fix dongle_caps containing stale information.
Eduard Hasenleithner (1):
nvme: Discard workaround for non-conformant devices
Erkka Talvitie (1):
USB: EHCI: Do not return -EPIPE when hub is disconnected
Eugeniu Rosca (1):
mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
Faiz Abbas (2):
Revert "mmc: sdhci: Fix incorrect switch to HS mode"
mmc: sdhci: Update the tuning failed messages to pr_debug level
Filipe Manana (2):
Btrfs: fix missing data checksums after replaying a log tree
Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues
Geert Uytterhoeven (2):
net: dst: Force 4-byte alignment of dst_metrics
pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B
Gerald Schaefer (1):
s390/mm: add mm_pxd_folded() checks to pxd_free()
Greg Kroah-Hartman (1):
Linux 4.19.92
Grygorii Strashko (2):
net: phy: dp83867: enable robust auto-mdix
net: ethernet: ti: ale: clean ale tbl on init and intf restart
Guenter Roeck (1):
usb: xhci: Fix build warning seen with CONFIG_PM=n
Guoqing Jiang (1):
md/bitmap: avoid race window between md_bitmap_resize and bitmap_file_clear_bit
Hans Verkuil (1):
media: cec-funcs.h: add status_req checks
Hans de Goede (3):
ACPI: button: Add DMI quirk for Medion Akoya E2215T
ASoC: Intel: bytcr_rt5640: Update quirk for Acer Switch 10 SW5-012 2-in-1 platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
Hawking Zhang (1):
drm/amdgpu: disallow direct upload save restore list from gfx driver
Heiko Carstens (1):
s390/time: ensure get_clock_monotonic() returns monotonic values
Herbert Xu (2):
crypto: atmel - Fix authenc support when it is set to m
crypto: sun4i-ss - Fix 64-bit size_t warnings
Hewenliang (1):
libtraceevent: Fix memory leakage in copy_filter_type
Ian Abbott (1):
staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value
Ian Rogers (2):
perf tools: Splice events onto evlist even on error perf parse: If pmu configuration fails free terms
Ido Schimmel (1):
selftests: forwarding: Delete IPv6 address at the end
Ilya Leoshkevich (1):
s390/disassembler: don't hide instruction addresses
Ingo Rohloff (1):
usb: usbfs: Suppress problematic bind and unbind uevents.
Ivan Khoronzhuk (1):
selftests/bpf: Correct path to include msg + path
James Clark (1):
libsubcmd: Use -O0 with DEBUG=1
Jan Kara (2):
ext4: fix ext4_empty_dir() for directories with holes
ext4: check for directory entries too close to block end
Janusz Krzysztofik (3):
media: ov6650: Fix crop rectangle alignment not passed back
media: ov6650: Fix stored frame format not in sync with hardware
media: ov6650: Fix stored crop rectangle not in sync with hardware
Jason Gunthorpe (1):
xen/gntdev: Use select for DMA_SHARED_BUFFER
Jia-Ju Bai (1):
net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive()
Jiangfeng Xiao (1):
net: hisilicon: Fix a BUG trigered by wrong bytes_compl
Jin Yao (1):
perf report: Add warning when libunwind not compiled in
Johannes Berg (1):
iwlwifi: check kasprintf() return value
John Garry (1):
libata: Ensure ata_port probe has completed before detach
Josef Bacik (6):
btrfs: don't double lock the subvol_sem for rename exchange
btrfs: do not call synchronize_srcu() in inode_tree_del
btrfs: abort transaction after failed inode updates in create_subvol
btrfs: skip log replay on orphaned roots
btrfs: do not leak reloc root if we fail to read the fs root
btrfs: handle ENOENT in btrfs_uuid_tree_iterate
Kangjie Lu (2):
drm/gma500: fix memory disclosures due to uninitialized bytes
media: rcar_drif: fix a memory disclosure
Konstantin Khlebnikov (1):
x86/MCE/AMD: Do not use rdmsr_safe_on_cpu() in smca_configure()
Krzysztof Wilczynski (1):
iio: light: bh1750: Resolve compiler warning and make code more readable
Laurent Pinchart (1):
drm/panel: Add missing drm_panel_init() in panel drivers
Leo Yan (2):
perf test: Report failure for mmap events perf tests: Disable bp_signal testing for arm64
Lianbo Jiang (1):
x86/crash: Add a forward declaration of struct kimage
Lingling Xu (1):
spi: sprd: adi: Add missing lock protection when rebooting
Loic Poulain (1):
media: venus: core: Fix msm8996 frequency table
Lucas Stach (1):
nvmem: imx-ocotp: reset error status on probe
Luiz Augusto von Dentz (1):
Bluetooth: Fix advertising duplicated flags
Lukasz Majewski (1):
spi: Add call to spi_slave_abort() function when spidev driver is released
Manish Chopra (3):
qede: Disable hardware gro when xdp prog is installed
qede: Fix multicast mac configuration
bnx2x: Fix PF-VF communication over multi-cos queues.
Manjunath Patil (1):
ixgbe: protect TX timestamping from API misuse
Mao Wenan (2):
af_packet: set defaule value for tmo
net: dsa: LAN9303: select REGMAP when LAN9303 enable
Marcel Holtmann (1):
rfkill: allocate static minor
Masami Hiramatsu (14):
perf probe: Fix to find range-only function instance
perf probe: Fix to list probe event with correct line number perf probe: Walk function lines in lexical blocks
perf probe: Fix to probe an inline function which has no entry pc perf probe: Fix to show ranges of variables in functions without entry_pc perf probe: Fix to show inlined function callsite without entry_pc perf probe: Fix to probe a function which has no entry pc
perf probe: Skip overlapped location on searching variables
perf probe: Return a better scope DIE if there is no best scope perf probe: Fix to show calling lines of inlined functions
perf probe: Skip end-of-sequence and non statement lines
perf probe: Filter out instances except for inlined subroutine and subprogram tracing/kprobe: Check whether the non-suffixed symbol is notrace perf probe: Fix to show function entry line as probe-able
Matthias Kaehlcke (1):
drm/bridge: dw-hdmi: Refuse DDC/CI transfers on the internal I2C controller
Mattijs Korpershoek (1):
Bluetooth: hci_core: fix init for HCI_USER_CHANNEL
Max Gurtovoy (1):
IB/iser: bound protection_sg size by data_sg size
Miaoqing Pan (1):
ath10k: fix get invalid tx rate for Mesh metric
Michael Ellerman (1):
crypto: vmx - Avoid weird build failures
Michael Walle (1):
ASoC: wm8904: fix regcache handling
Michal Kalderon (1):
RDMA/qedr: Fix memory leak in user qp and mr
Mike Christie (1):
nbd: fix shutdown and recv work deadlock v2
Mike Isely (1):
media: pvrusb2: Fix oops on tear-down when radio support is not present
Mike Rapoport (1):
mips: fix build when "48 bits virtual memory" is enabled
Miquel Raynal (1):
iio: adc: max1027: Reset the device at probe time
Mitch Williams (1):
ice: delay less
Nathan Chancellor (1):
tools/power/cpupower: Fix initializer override in hsw_ext_cstates
Navid Emamdoost (4):
net: gemini: Fix memory leak in gmac_setup_txqs
staging: rtl8192u: fix multiple memory leaks on error path
rtlwifi: prevent memory leak in rtl_usb_probe
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
Nicholas Nunley (1):
i40e: initialize ITRN registers with correct values
Omar Sandoval (4):
btrfs: don't prematurely free work in end_workqueue_fn()
btrfs: don't prematurely free work in run_ordered_work()
btrfs: don't prematurely free work in reada_start_machine_worker()
btrfs: don't prematurely free work in scrub_missing_raid56_worker()
Pan Bian (2):
spi: img-spfi: fix potential double release drm/amdgpu: fix potential double drop fence reference
Petar Penkov (1):
tun: fix data-race in gro_normal_list()
Pierre-Louis Bossart (1):
soundwire: intel: fix PDI/stream mapping for Bulk
Ping-Ke Shih (1):
rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt()
Rafael J. Wysocki (1):
cpufreq: Avoid leaving stale IRQ work items during CPU offline
Rafał Miłecki (1):
brcmfmac: remove monitor interface when detaching
Rasmus Villemoes (1):
mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support"
Robert Richter (1):
EDAC/ghes: Fix grain calculation
Rodrigo Siqueira (1):
drm/drm_vblank: Change EINVAL by the correct errno
Russell King (2):
mod_devicetable: fix PHY module format
net: phy: initialise phydev speed and duplex sanely
Sakari Ailus (1):
media: smiapp: Register sensor after enabling runtime PM on the device
Sam Bobroff (1):
drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2
Sami Tolvanen (2):
syscalls/x86: Use the correct function type in SYSCALL_DEFINE0 x86/mm: Use the correct function type for native_set_fixmap()
Sean Paul (1):
drm: mst: Fix query_payload ack reply struct
Song Liu (1):
bpf/stackmap: Fix deadlock with rq_lock in bpf_get_stack()
Srikar Dronamraju (1):
powerpc/vcpu: Assume dedicated processors as non-preempt
Stanimir Varbanov (1):
media: venus: Fix occasionally failures to suspend
Stefan Popa (1):
iio: dac: ad5446: Add support for new AD5600 DAC
Stephan Gerhold (2):
extcon: sm5502: Reset registers during initialization
phy: qcom-usb-hs: Fix extcon double register after power cycle
Sudip Mukherjee (1):
parport: load lowlevel driver if ports not found
Suwan Kim (2):
usbip: Fix receive error in vhci-hcd when using scatter-gather
usbip: Fix error path of vhci_recv_ret_submit()
Sven Schnelle (1):
s390/ftrace: fix endless recursion in function_graph tracer
Szymon Janc (1):
Bluetooth: Workaround directed advertising bug in Broadcom controllers
Takashi Iwai (5):
ALSA: pcm: Avoid possible info leaks from PCM stream buffers
ALSA: hda/ca0132 - Keep power on during processing DSP response
ALSA: hda/ca0132 - Avoid endless loop
ALSA: hda/ca0132 - Fix work handling in delayed HP detection
ALSA: timer: Limit max amount of slave instances
Thierry Reding (2):
drm/tegra: sor: Use correct SOR index on Tegra210
gpu: host1x: Allocate gather copy for host1x
Thomas Gleixner (1):
x86/ioapic: Prevent inconsistent state when moving an interrupt
Thomas Pedersen (1):
mac80211: consider QoS Null frames for STA_NULLFUNC_ACKED
Toke Høiland-Jørgensen (1):
libbpf: Fix error handling in bpf_map__reuse_fd()
Tony Lindgren (1):
hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled
Vandana BN (1):
media: v4l2-core: fix touch support in v4l_g_fmt
Veerabhadrarao Badiganti (1):
mmc: sdhci-msm: Correct the offset and value for DDR_CONFIG register
Veeraiyan Chidambaram (1):
usb: renesas_usbhs: add suspend event support in gadget mode
Viresh Kumar (1):
cpufreq: Register drivers only after CPU devices have been registered
Wang Xuerui (1):
iwlwifi: mvm: fix unaligned read of rx_pkt_status
Will Deacon (2):
pinctrl: devicetree: Avoid taking direct reference to device name string
KVM: arm64: Ensure 'params' is initialised when looking up sys register
Xiaolong Huang (1):
can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
Xin Long (1):
sctp: fully initialize v4 addr in some functions
Yang Yingliang (1):
media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init()
Yangbo Lu (1):
mmc: sdhci-of-esdhc: fix P2020 errata handling
Yazen Ghannam (1):
x86/MCE/AMD: Allow Reserved types to be overwritten in smca_banks[]
Yizhuo (1):
regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe()
Yu-Hsuan Hsu (1):
ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
Yuming Han (1):
tracing: use kvcalloc for tgid_map array allocation
Yunfeng Ye (2):
arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill() perf jevents: Fix resource leak in process_mapfile() and main()
Yunsheng Lin (1):
net: hns3: add struct netdev_queue debug info for TX timeout
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 91 +SUBLEVEL = 92 EXTRAVERSION = NAME = "People's Front"
arch/arm64/kernel/psci.c +9 -6
@@ -84,7 +84,8 @@ static void cpu_psci_cpu_die(unsigned int cpu)static int cpu_psci_cpu_kill (unsigned int cpu) { -int err, i; +int err; +unsigned long start, end;if (!psci_ops.affinity_info)return 0 ;
@@ -94,16 +95,18 @@ static int cpu_psci_cpu_kill(unsigned int cpu)* while it is dying. So, try again a few times. */ -for (i =0 ; i <10 ; i++) { + start = jiffies; + end = start +msecs_to_jiffies (100 ); +do { err = psci_ops.affinity_info (cpu_logical_map (cpu),0 );if (err ==PSCI_0_2_AFFINITY_LEVEL_OFF ) { -pr_info ("CPU%d killed.\n" , cpu); +pr_info ("CPU%d killed (polled %d ms)\n" , cpu, +jiffies_to_msecs (jiffies - start));return 0 ; } -msleep (10 ); -pr_info ("Retrying again to check for CPU kill\n" ); - } +usleep_range (100 ,1000 ); + }while (time_before (jiffies, end));pr_warn ("CPU%d may not have shut down cleanly (AFFINITY_INFO reports %d)\n" , cpu, err);
arch/arm64/kvm/sys_regs.c +4 -1
@@ -2174,8 +2174,11 @@ static const struct sys_reg_desc *index_to_sys_reg_desc(struct kvm_vcpu *vcpu,if ((id &KVM_REG_ARM_COPROC_MASK ) !=KVM_REG_ARM64_SYSREG )return NULL ; +if (!index_to_params (id, ¶ms)) +return NULL ; + table =get_target_table (vcpu->arch.target, true, &num); - r =find_reg_by_id (id, ¶ms, table, num); + r =find_reg (¶ms, table, num);if (!r) r =find_reg (¶ms, sys_reg_descs,ARRAY_SIZE (sys_reg_descs));
arch/mips/include/asm/pgtable-64.h +7 -2
@@ -18,10 +18,12 @@#include <asm/fixmap.h> #define __ARCH_USE_5LEVEL_HACK -#if defined(CONFIG_PAGE_SIZE_64KB ) && !defined(CONFIG_MIPS_VA_BITS_48 ) +#if CONFIG_PGTABLE_LEVELS ==2 #include <asm-generic/pgtable-nopmd.h> -#elif !(defined(CONFIG_PAGE_SIZE_4KB ) && defined(CONFIG_MIPS_VA_BITS_48 )) +#elif CONFIG_PGTABLE_LEVELS ==3 #include <asm-generic/pgtable-nopud.h> +#else +#include <asm-generic/5level-fixup.h> #endif /*
@@ -216,6 +218,9 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)return pgd_val (pgd); } +#define pgd_phys (pgd) virt_to_phys((void *)pgd_val(pgd)) +#define pgd_page (pgd) (pfn_to_page(pgd_phys(pgd) >> PAGE_SHIFT)) +static inline pud_t *pud_offset (pgd_t *pgd,unsigned long address) {return (pud_t *)pgd_page_vaddr (*pgd) +pud_index (address);
arch/powerpc/include/asm/spinlock.h +3 -1
@@ -53,10 +53,12 @@#endif #ifdef CONFIG_PPC_PSERIES +DECLARE_STATIC_KEY_FALSE (shared_processor); +#define vcpu_is_preempted vcpu_is_preemptedstatic inline bool vcpu_is_preempted (int cpu) { -if (!firmware_has_feature (FW_FEATURE_SPLPAR )) +if (!static_branch_unlikely (&shared_processor))return false;return !!(be32_to_cpu (lppaca_of (cpu).yield_count) &1 ); }
arch/powerpc/kernel/irq.c +2 -2
@@ -634,8 +634,6 @@ void __do_irq(struct pt_regs *regs)trace_irq_entry (regs); -check_stack_overflow (); -/* * Query the platform PIC for the interrupt & ack it. *
@@ -667,6 +665,8 @@ void do_IRQ(struct pt_regs *regs) irqtp = hardirq_ctx[raw_smp_processor_id ()]; sirqtp = softirq_ctx[raw_smp_processor_id ()]; +check_stack_overflow (); +/* Already there ? */ if (unlikely (curtp == irqtp || curtp == sirqtp)) {__do_irq (regs);
arch/powerpc/platforms/pseries/setup.c +7 -0
@@ -75,6 +75,9 @@#include "pseries.h" #include "../../../../drivers/pci/pci.h" +DEFINE_STATIC_KEY_FALSE (shared_processor); +EXPORT_SYMBOL_GPL (shared_processor); +int CMO_PrPSP =-1 ;int CMO_SecPSP =-1 ;unsigned long CMO_PageSize = (ASM_CONST (1 ) <<IOMMU_PAGE_SHIFT_4K );
@@ -761,6 +764,10 @@ static void __init pSeries_setup_arch(void)if (firmware_has_feature (FW_FEATURE_LPAR )) {vpa_init (boot_cpuid); + +if (lppaca_shared_proc (get_lppaca ())) +static_branch_enable (&shared_processor); + ppc_md.power_save = pseries_lpar_idle; ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;#ifdef CONFIG_PCI_IOV
arch/s390/include/asm/pgalloc.h +14 -2
@@ -56,7 +56,12 @@ static inline p4d_t *p4d_alloc_one(struct mm_struct *mm, unsigned long address)crst_table_init (table, _REGION2_ENTRY_EMPTY);return (p4d_t *) table; } -#define p4d_free (mm, p4d) crst_table_free(mm, (unsigned long *) p4d) + +static inline void p4d_free (struct mm_struct *mm,p4d_t *p4d) +{ +if (!mm_p4d_folded (mm)) +crst_table_free (mm, (unsigned long *) p4d); +}static inline pud_t *pud_alloc_one (struct mm_struct *mm,unsigned long address) {
@@ -65,7 +70,12 @@ static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)crst_table_init (table, _REGION3_ENTRY_EMPTY);return (pud_t *) table; } -#define pud_free (mm, pud) crst_table_free(mm, (unsigned long *) pud) + +static inline void pud_free (struct mm_struct *mm,pud_t *pud) +{ +if (!mm_pud_folded (mm)) +crst_table_free (mm, (unsigned long *) pud); +}static inline pmd_t *pmd_alloc_one (struct mm_struct *mm,unsigned long vmaddr) {
@@ -83,6 +93,8 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)static inline void pmd_free (struct mm_struct *mm,pmd_t *pmd) { +if (mm_pmd_folded (mm)) +return ;pgtable_pmd_page_dtor (virt_to_page (pmd));crst_table_free (mm, (unsigned long *) pmd); }
arch/s390/include/asm/timex.h +10 -6
@@ -10,8 +10,9 @@#ifndef _ASM_S390_TIMEX_H#define _ASM_S390_TIMEX_H -#include <asm/lowcore.h> +#include <linux/preempt.h> #include <linux/time64.h> +#include <asm/lowcore.h> /* The value of the TOD clock for 1.1.1970. */ #define TOD_UNIX_EPOCH 0x7d91048bca000000ULL
@@ -186,15 +187,18 @@ extern unsigned char tod_clock_base[16] __aligned(8);/** * get_clock_monotonic - returns current time in clock rate units * -* The caller must ensure that preemption is disabled. * The clock and tod_clock_base get changed via stop_machine. -* Therefore preemption must be disabled when calling this -* function, otherwise the returned value is not guaranteed to -* be monotonic. +* Therefore preemption must be disabled, otherwise the returned +* value is not guaranteed to be monotonic. */ static inline unsigned long long get_tod_clock_monotonic (void ) { -return get_tod_clock () - *(unsigned long long *) &tod_clock_base[1 ]; +unsigned long long tod; + +preempt_disable_notrace (); + tod =get_tod_clock () - *(unsigned long long *) &tod_clock_base[1 ]; +preempt_enable_notrace (); +return tod; }/**
arch/s390/kernel/dis.c +7 -6
@@ -462,10 +462,11 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr) ptr +=sprintf (ptr,"%%c%i" , value); else if (operand->flags & OPERAND_VR) ptr += sprintf(ptr, "%%v%i", value); - else if (operand->flags & OPERAND_PCREL) - ptr += sprintf(ptr, "%lx", (signed int) value - + addr); - else if (operand->flags & OPERAND_SIGNED) + else if (operand->flags & OPERAND_PCREL) { +void *pcrel = (void *)((int )value + addr); + + ptr +=sprintf (ptr,"%px" , pcrel); + } else if (operand->flags & OPERAND_SIGNED) ptr += sprintf(ptr, "%i", value); else ptr += sprintf(ptr, "%u", value);
@@ -537,7 +538,7 @@ void show_code(struct pt_regs *regs)else *ptr++ =' ' ; addr = regs->psw.addr + start -32 ; - ptr +=sprintf (ptr,"%016lx: " , addr); + ptr +=sprintf (ptr,"%px: " , (void *)addr);if (start + opsize >= end)break ;for (i =0 ; i < opsize; i++)
@@ -565,7 +566,7 @@ void print_fn_code(unsigned char *code, unsigned long len) opsize =insn_length (*code);if (opsize > len)break ; - ptr +=sprintf (ptr,"%p: " , code); + ptr +=sprintf (ptr,"%px: " , code);for (i =0 ; i < opsize; i++) ptr +=sprintf (ptr,"%02x" , code[i]); *ptr++ ='\t' ;
arch/sh/include/cpu-sh4/cpu/sh7734.h +1 -1
@@ -134,7 +134,7 @@ enum {GPIO_FN_EX_WAIT1 ,GPIO_FN_SD1_DAT0_A ,GPIO_FN_DREQ2 ,GPIO_FN_CAN1_TX_C ,GPIO_FN_ET0_LINK_C ,GPIO_FN_ET0_ETXD5_A ,GPIO_FN_EX_WAIT0 ,GPIO_FN_TCLK1_B , -GPIO_FN_RD_WR ,GPIO_FN_TCLK0 , +GPIO_FN_RD_WR ,GPIO_FN_TCLK0 ,GPIO_FN_CAN_CLK_B ,GPIO_FN_ET0_ETXD4 ,GPIO_FN_EX_CS5 ,GPIO_FN_SD1_CMD_A ,GPIO_FN_ATADIR ,GPIO_FN_QSSL_B ,GPIO_FN_ET0_ETXD3_A , GPIO_FN_EX_CS4, GPIO_FN_SD1_WP_A, GPIO_FN_ATAWR, GPIO_FN_QMI_QIO1_B,
arch/x86/include/asm/crash.h +2 -0
@@ -2,6 +2,8 @@#ifndef _ASM_X86_CRASH_H#define _ASM_X86_CRASH_H +struct kimage ; +int crash_load_segments (struct kimage *image);int crash_copy_backup_region (struct kimage *image); int crash_setup_memmap_entries(struct kimage *image,
arch/x86/include/asm/fixmap.h +1 -1
@@ -159,7 +159,7 @@ extern pte_t *kmap_pte;extern pte_t *pkmap_page_table;void __native_set_fixmap (enum fixed_addresses idx,pte_t pte); -void native_set_fixmap (enum fixed_addresses idx, +void native_set_fixmap (unsigned /* enum fixed_addresses */ idx,phys_addr_t phys,pgprot_t flags);#ifndef CONFIG_PARAVIRT
arch/x86/include/asm/syscall_wrapper.h +12 -11
@@ -48,12 +48,13 @@* To keep the naming coherent, re-define SYSCALL_DEFINE0 to create an alias * named __ia32_sys_*() */ -#define SYSCALL_DEFINE0 (sname) \ - SYSCALL_METADATA(_##sname, 0); \ - asmlinkage long __x64_sys_##sname(void); \ - ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \ - SYSCALL_ALIAS(__ia32_sys_##sname, __x64_sys_##sname); \ - asmlinkage long __x64_sys_##sname(void) + +#define SYSCALL_DEFINE0 (sname) \ + SYSCALL_METADATA(_##sname, 0); \ + asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused);\ + ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \ + SYSCALL_ALIAS(__ia32_sys_##sname, __x64_sys_##sname); \ + asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused)#define COND_SYSCALL (name) \ cond_syscall(__x64_sys_##name); \
@@ -181,11 +182,11 @@* macros to work correctly. */ #ifndef SYSCALL_DEFINE0 -#define SYSCALL_DEFINE0 (sname) \ - SYSCALL_METADATA(_##sname, 0); \ - asmlinkage long __x64_sys_##sname(void); \ - ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \ - asmlinkage long __x64_sys_##sname(void) +#define SYSCALL_DEFINE0 (sname) \ + SYSCALL_METADATA(_##sname, 0); \ + asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused);\ + ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \ + asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused)#endif #ifndef COND_SYSCALL
arch/x86/kernel/apic/io_apic.c +6 -3
@@ -1724,9 +1724,10 @@ static bool io_apic_level_ack_pending(struct mp_chip_data *data)static inline bool ioapic_irqd_mask (struct irq_data *data) { -/* If we are moving the irq we need to mask it */ +/* If we are moving the IRQ we need to mask it */ if (unlikely (irqd_is_setaffinity_pending (data))) { -mask_ioapic_irq (data); +if (!irqd_irq_masked (data)) +mask_ioapic_irq (data);return true; }return false;
@@ -1763,7 +1764,9 @@ static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)*/ if (!io_apic_level_ack_pending (data->chip_data))irq_move_masked_irq (data); - unmask_ioapic_irq(data); +/* If the IRQ is masked in the core, leave it: */ +if (!irqd_irq_masked (data)) + unmask_ioapic_irq(data); } }#else
arch/x86/kernel/cpu/mcheck/mce_amd.c +2 -2
@@ -228,10 +228,10 @@ static void smca_configure(unsigned int bank, unsigned int cpu) }/* Return early if this bank was already initialized. */ -if (smca_banks[bank].hwid) +if (smca_banks[bank].hwid && smca_banks[bank].hwid->hwid_mcatype !=0 )return ; -if (rdmsr_safe_on_cpu (cpu,MSR_AMD64_SMCA_MCx_IPID (bank), &low, &high)) { +if (rdmsr_safe (MSR_AMD64_SMCA_MCx_IPID (bank), &low, &high)) {pr_warn ("Failed to read MCA_IPID for bank %d\n" , bank);return ; }
arch/x86/kernel/cpu/mcheck/therm_throt.c +1 -1
@@ -185,7 +185,7 @@ static void therm_throt_process(bool new_event, int event, int level)/* if we just entered the thermal event */ if (new_event) {if (event ==THERMAL_THROTTLING_EVENT ) -pr_crit ("CPU%d: %s temperature above threshold, cpu clock throttled (total events = %lu)\n" , +pr_warn ("CPU%d: %s temperature above threshold, cpu clock throttled (total events = %lu)\n" , this_cpu, level ==CORE_LEVEL ?"Core" :"Package" , state->count);
arch/x86/lib/x86-opcode-map.txt +12 -6
@@ -333,7 +333,7 @@ AVXcode: 1 06: CLTS 07: SYSRET (o64) 08: INVD -09: WBINVD +09: WBINVD | WBNOINVD (F3) 0a: 0b: UD2 (1B) 0c:
@@ -364,7 +364,7 @@ AVXcode: 1 # a ModR/M byte. 1a: BNDCL Gv,Ev (F3) | BNDCU Gv,Ev (F2) | BNDMOV Gv,Ev (66) | BNDLDX Gv,Ev 1b: BNDCN Gv,Ev (F2) | BNDMOV Ev,Gv (66) | BNDMK Gv,Ev (F3) | BNDSTX Ev,Gv -1c: +1c: Grp20 (1A),(1C) 1d: 1e: 1f: NOP Ev
@@ -792,6 +792,8 @@ f3: Grp17 (1A) f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v) f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v) f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v) +f8: MOVDIR64B Gv,Mdqq (66) | ENQCMD Gv,Mdqq (F2) | ENQCMDS Gv,Mdqq (F3) +f9: MOVDIRI My,Gy EndTable Table: 3-byte opcode 2 (0x0f 0x3a)
@@ -943,9 +945,9 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) -2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv 5: rdpkru (110),(11B) | wrpkru (111),(11B)
@@ -1020,7 +1022,7 @@ GrpTable: Grp15 3: vstmxcsr Md (v1) | WRGSBASE Ry (F3),(11B) 4: XSAVE | ptwrite Ey (F3),(11B) 5: XRSTOR | lfence (11B) -6: XSAVEOPT | clwb (66) | mfence (11B) +6: XSAVEOPT | clwb (66) | mfence (11B) | TPAUSE Rd (66),(11B) | UMONITOR Rv (F3),(11B) | UMWAIT Rd (F2),(11B) 7: clflush | clflushopt (66) | sfence (11B) EndTable
@@ -1051,6 +1053,10 @@ GrpTable: Grp19 6: vscatterpf1qps/d Wx (66),(ev) EndTable +GrpTable: Grp20 +0: cldemote Mb +EndTable + # AMD's Prefetch Group GrpTable: GrpP 0: PREFETCH
arch/x86/mm/pgtable.c +2 -2
@@ -660,8 +660,8 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte) fixmaps_set++; } -void native_set_fixmap (enum fixed_addresses idx,phys_addr_t phys, -pgprot_t flags) +void native_set_fixmap (unsigned /* enum fixed_addresses */ idx, +phys_addr_t phys,pgprot_t flags) {/* Sanitize 'prot' against any unsupported bits: */ pgprot_val (flags) &= __default_kernel_pte_mask;
drivers/acpi/button.c +11 -0
@@ -91,6 +91,17 @@ static const struct dmi_system_id lid_blacklst[] = { DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"), }, }, + { + /* + * Medion Akoya E2215T, notification of the LID device only + * happens on close, not on open and _LID always returns closed. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), + DMI_MATCH(DMI_PRODUCT_NAME, "E2215T MD60198"), + }, + .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN, + }, {} };
drivers/ata/libata-core.c +3 -0
@@ -6726,6 +6726,9 @@ void ata_host_detach(struct ata_host *host) {int i; +/* Ensure ata_port probe has completed */ +async_synchronize_full (); +for (i =0 ; i < host->n_ports; i++)ata_port_detach (host->ports[i]);
drivers/block/loop.c +18 -8
@@ -416,18 +416,20 @@ static int lo_read_transfer(struct loop_device *lo, struct request *rq,return ret; } -static int lo_discard (struct loop_device *lo,struct request *rq,loff_t pos) +static int lo_fallocate (struct loop_device *lo,struct request *rq,loff_t pos, +int mode) {/* -* We use punch hole to reclaim the free space used by the -* image a.k.a. discard. However we do not support discard if -* encryption is enabled, because it may give an attacker -* useful information. +* We use fallocate to manipulate the space mappings used by the image +* a.k.a. discard/zerorange. However we do not support this if +* encryption is enabled, because it may give an attacker useful +* information. */ struct file *file = lo->lo_backing_file; -int mode =FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE ;int ret; + mode |=FALLOC_FL_KEEP_SIZE ; +if ((!file->f_op->fallocate) || lo->lo_encrypt_key_size) { ret = -EOPNOTSUPP ; goto out;
@@ -596,9 +598,17 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)switch (req_op (rq)) {case REQ_OP_FLUSH :return lo_req_flush (lo, rq); -case REQ_OP_DISCARD :case REQ_OP_WRITE_ZEROES : -return lo_discard (lo, rq, pos); +/* +* If the caller doesn't want deallocation, call zeroout to +* write zeroes the range. Otherwise, punch them out. +*/ +return lo_fallocate (lo, rq, pos, + (rq->cmd_flags &REQ_NOUNMAP ) ? +FALLOC_FL_ZERO_RANGE : +FALLOC_FL_PUNCH_HOLE ); +case REQ_OP_DISCARD : +return lo_fallocate (lo, rq, pos,FALLOC_FL_PUNCH_HOLE );case REQ_OP_WRITE :if (lo->transfer)return lo_write_transfer (lo, rq, pos);
drivers/block/nbd.c +3 -3
@@ -1247,10 +1247,10 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd, struct block_device *bmutex_unlock (&nbd->config_lock); ret =wait_event_interruptible (config->recv_wq,atomic_read (&config->recv_threads) ==0 ); -if (ret) { +if (ret)sock_shutdown (nbd); -flush_workqueue (nbd->recv_workq); - } +flush_workqueue (nbd->recv_workq); +mutex_lock (&nbd->config_lock);nbd_bdev_reset (bdev);/* user requested, ignore socket errors */
drivers/char/hw_random/omap3-rom-rng.c +2 -1
@@ -121,7 +121,8 @@ static int omap3_rom_rng_remove(struct platform_device *pdev) {cancel_delayed_work_sync (&idle_work);hwrng_unregister (&omap3_rom_rng_ops); -clk_disable_unprepare (rng_clk); +if (!rng_idle) +clk_disable_unprepare (rng_clk);return 0 ; }
drivers/char/ipmi/ipmi_msghandler.c +16 -7
@@ -447,6 +447,8 @@ enum ipmi_stat_indexes {#define IPMI_IPMB_NUM_SEQ 64struct ipmi_smi { +struct module *owner; +/* What interface number are we? */ int intf_num;
@@ -1139,6 +1141,11 @@ int ipmi_create_user(unsigned int if_num,if (rv) goto out_kfree; +if (!try_module_get (intf->owner)) { + rv = -ENODEV ; + goto out_kfree; + } +/* Note that each existing user holds a refcount to the interface. */ kref_get (&intf->refcount);
@@ -1269,6 +1276,7 @@ static void _ipmi_destroy_user(struct ipmi_user *user) }kref_put (&intf->refcount, intf_free); +module_put (intf->owner); }int ipmi_destroy_user (struct ipmi_user *user)
@@ -2384,7 +2392,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc)* been recently fetched, this will just use the cached data. Otherwise * it will run a new fetch. * -* Except for the first time this is called (in ipmi_register_smi()), +* Except for the first time this is called (in ipmi_add_smi()), * this will always return good data; */ static int __bmc_get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc,
@@ -3304,10 +3312,11 @@ static void redo_bmc_reg(struct work_struct *work)kref_put (&intf->refcount, intf_free); } -int ipmi_register_smi (const struct ipmi_smi_handlers *handlers, -void *send_info, -struct device *si_dev, -unsigned char slave_addr) +int ipmi_add_smi (struct module *owner, +const struct ipmi_smi_handlers *handlers, +void *send_info, +struct device *si_dev, +unsigned char slave_addr) {int i, j;int rv;
@@ -3333,7 +3342,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,return rv; } - + intf->owner = owner; intf->bmc = &intf->tmp_bmc;INIT_LIST_HEAD (&intf->bmc->intfs);mutex_init (&intf->bmc->dyn_mutex);
@@ -3440,7 +3449,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,return rv; } -EXPORT_SYMBOL (ipmi_register_smi); +EXPORT_SYMBOL (ipmi_add_smi); static void deliver_smi_err_response(struct ipmi_smi *intf, struct ipmi_smi_msg *msg,
drivers/cpufreq/cpufreq.c +7 -0
@@ -2480,6 +2480,13 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)if (cpufreq_disabled ())return -ENODEV ; +/* +* The cpufreq core depends heavily on the availability of device +* structure, make sure they are available before proceeding further. +*/ +if (!get_cpu_device (0 )) +return -EPROBE_DEFER ; + if (!driver_data || !driver_data->verify || !driver_data->init || !(driver_data->setpolicy || driver_data->target_index || driver_data->target) ||
drivers/crypto/atmel-aes.c +9 -9
@@ -148,7 +148,7 @@ struct atmel_aes_xts_ctx {u32 key2[AES_KEYSIZE_256 /sizeof (u32)]; }; -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED(CONFIG_CRYPTO_DEV_ATMEL_AUTHENC) struct atmel_aes_authenc_ctx { struct atmel_aes_base_ctx base; struct atmel_sha_authenc_ctx *auth;
@@ -160,7 +160,7 @@ struct atmel_aes_reqctx {u32 lastc[AES_BLOCK_SIZE /sizeof (u32)]; }; -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED(CONFIG_CRYPTO_DEV_ATMEL_AUTHENC) struct atmel_aes_authenc_reqctx { struct atmel_aes_reqctx base;
@@ -489,7 +489,7 @@ static inline bool atmel_aes_is_encrypt(const struct atmel_aes_dev *dd)return (dd->flags &AES_FLAGS_ENCRYPT ); } -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )static void atmel_aes_authenc_complete (struct atmel_aes_dev *dd,int err);#endif
@@ -518,7 +518,7 @@ static void atmel_aes_set_iv_as_last_ciphertext_block(struct atmel_aes_dev *dd)static inline int atmel_aes_complete (struct atmel_aes_dev *dd,int err) { -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )if (dd->ctx->is_aead)atmel_aes_authenc_complete (dd, err);#endif
@@ -1983,7 +1983,7 @@ static struct crypto_alg aes_xts_alg = { } }; -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )/* authenc aead functions */ static int atmel_aes_authenc_start (struct atmel_aes_dev *dd);
@@ -2470,7 +2470,7 @@ static void atmel_aes_unregister_algs(struct atmel_aes_dev *dd) {int i; -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )if (dd->caps.has_authenc)for (i =0 ; i <ARRAY_SIZE (aes_authenc_algs); i++)crypto_unregister_aead (&aes_authenc_algs[i]);
@@ -2517,7 +2517,7 @@ static int atmel_aes_register_algs(struct atmel_aes_dev *dd) goto err_aes_xts_alg; } -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )if (dd->caps.has_authenc) {for (i =0 ; i <ARRAY_SIZE (aes_authenc_algs); i++) { err =crypto_register_aead (&aes_authenc_algs[i]);
@@ -2529,7 +2529,7 @@ static int atmel_aes_register_algs(struct atmel_aes_dev *dd)return 0 ; -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )/* i = ARRAY_SIZE(aes_authenc_algs); */ err_aes_authenc_alg:for (j =0 ; j < i; j++)
@@ -2720,7 +2720,7 @@ static int atmel_aes_probe(struct platform_device *pdev)atmel_aes_get_cap (aes_dd); -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )if (aes_dd->caps.has_authenc && !atmel_sha_authenc_is_ready ()) { err = -EPROBE_DEFER ; goto iclk_unprepare;
drivers/crypto/atmel-authenc.h +1 -1
@@ -23,7 +23,7 @@#ifndef __ATMEL_AUTHENC_H__#define __ATMEL_AUTHENC_H__ -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )#include <crypto/authenc.h> #include <crypto/hash.h>
drivers/crypto/atmel-sha.c +1 -1
@@ -2215,7 +2215,7 @@ static struct ahash_alg sha_hmac_algs[] = { }, }; -#ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC +#if IS_ENABLED (CONFIG_CRYPTO_DEV_ATMEL_AUTHENC )/* authenc functions */ static int atmel_sha_authenc_init2 (struct atmel_sha_dev *dd);
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +14 -8
@@ -81,7 +81,8 @@ static int sun4i_ss_opti_poll(struct skcipher_request *areq) oi =0 ; oo =0 ; do { - todo = min3(rx_cnt, ileft, (mi.length - oi) / 4); + todo = min(rx_cnt, ileft); + todo = min_t(size_t, todo, (mi.length - oi) / 4); if (todo) { ileft -= todo; writesl(ss->base + SS_RXFIFO, mi.addr + oi, todo);
@@ -96,7 +97,8 @@ static int sun4i_ss_opti_poll(struct skcipher_request *areq) rx_cnt =SS_RXFIFO_SPACES (spaces); tx_cnt =SS_TXFIFO_SPACES (spaces); - todo =min3 (tx_cnt, oleft, (mo.length - oo) /4 ); + todo =min (tx_cnt, oleft); + todo =min_t (size_t, todo, (mo.length - oo) /4 );if (todo) { oleft -= todo;readsl (ss->base +SS_TXFIFO , mo.addr + oo, todo);
@@ -220,7 +222,8 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq)* todo is the number of consecutive 4byte word that we * can read from current SG */ - todo =min3 (rx_cnt, ileft /4 , (mi.length - oi) /4 ); + todo =min (rx_cnt, ileft /4 ); + todo =min_t (size_t, todo, (mi.length - oi) /4 );if (todo && !ob) {writesl (ss->base +SS_RXFIFO , mi.addr + oi, todo);
@@ -234,8 +237,8 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq)* we need to be able to write all buf in one * pass, so it is why we min() with rx_cnt */ - todo =min3 (rx_cnt *4 - ob, ileft, - mi.length - oi); + todo =min (rx_cnt *4 - ob, ileft); + todo =min_t (size_t, todo, mi.length - oi);memcpy (buf + ob, mi.addr + oi, todo); ileft -= todo; oi += todo;
@@ -255,7 +258,8 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq) spaces =readl (ss->base +SS_FCSR ); rx_cnt =SS_RXFIFO_SPACES (spaces); tx_cnt =SS_TXFIFO_SPACES (spaces); -dev_dbg (ss->dev,"%x %u/%u %u/%u cnt=%u %u/%u %u/%u cnt=%u %u\n" , +dev_dbg (ss->dev, +"%x %u/%zu %u/%u cnt=%u %u/%zu %u/%u cnt=%u %u\n" , mode, oi, mi.length, ileft, areq->cryptlen, rx_cnt, oo, mo.length, oleft, areq->cryptlen, tx_cnt, ob);
@@ -263,7 +267,8 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq)if (!tx_cnt)continue ;/* todo in 4bytes word */ - todo =min3 (tx_cnt, oleft /4 , (mo.length - oo) /4 ); + todo =min (tx_cnt, oleft /4 ); + todo =min_t (size_t, todo, (mo.length - oo) /4 );if (todo) {readsl (ss->base +SS_TXFIFO , mo.addr + oo, todo); oleft -= todo *4 ;
@@ -287,7 +292,8 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq)* no more than remaining buffer * no need to test against oleft */ - todo =min (mo.length - oo, obl - obo); + todo =min_t (size_t, + mo.length - oo, obl - obo);memcpy (mo.addr + oo, bufo + obo, todo); oleft -= todo; obo += todo;
drivers/crypto/sunxi-ss/sun4i-ss-hash.c +6 -6
@@ -276,8 +276,8 @@ static int sun4i_hash(struct ahash_request *areq)*/ while (op->len <64 && i < end) {/* how many bytes we can read from current SG */ - in_r =min3 (mi.length - in_i, end - i, -64 - op->len); + in_r =min (end - i,64 - op->len); + in_r =min_t (size_t, mi.length - in_i, in_r);memcpy (op->buf + op->len, mi.addr + in_i, in_r); op->len += in_r; i += in_r;
@@ -297,8 +297,8 @@ static int sun4i_hash(struct ahash_request *areq) }if (mi.length - in_i >3 && i < end) {/* how many bytes we can read from current SG */ - in_r =min3 (mi.length - in_i, areq->nbytes - i, - ((mi.length - in_i) /4 ) *4 ); + in_r =min_t (size_t, mi.length - in_i, areq->nbytes - i); + in_r =min_t (size_t, ((mi.length - in_i) /4 ) *4 , in_r);/* how many bytes we can write in the device*/ todo =min3 ((u32)(end - i) /4 , rx_cnt, (u32 )in_r /4 );writesl (ss->base +SS_RXFIFO , mi.addr + in_i, todo);
@@ -324,8 +324,8 @@ static int sun4i_hash(struct ahash_request *areq)if ((areq->nbytes - i) <64 ) {while (i < areq->nbytes && in_i < mi.length && op->len <64 ) {/* how many bytes we can read from current SG */ - in_r =min3 (mi.length - in_i, areq->nbytes - i, -64 - op->len); + in_r =min (areq->nbytes - i,64 - op->len); + in_r =min_t (size_t, mi.length - in_i, in_r);memcpy (op->buf + op->len, mi.addr + in_i, in_r); op->len += in_r; i += in_r;
drivers/crypto/virtio/virtio_crypto_algs.c +10 -2
@@ -117,8 +117,6 @@ virtio_crypto_alg_validate_key(int key_len, uint32_t *alg) *alg =VIRTIO_CRYPTO_CIPHER_AES_CBC ;break ;default : -pr_err ("virtio_crypto: Unsupported key length: %d\n" , - key_len);return -EINVAL ; }return 0 ;
@@ -498,6 +496,11 @@ static int virtio_crypto_ablkcipher_encrypt(struct ablkcipher_request *req)/* Use the first data virtqueue as default */ struct data_queue *data_vq = &vcrypto->data_vq[0 ]; +if (!req->nbytes) +return 0 ; +if (req->nbytes %AES_BLOCK_SIZE ) +return -EINVAL ; + vc_req->dataq = data_vq; vc_req->alg_cb = virtio_crypto_dataq_sym_callback; vc_sym_req->ablkcipher_ctx = ctx;
@@ -518,6 +521,11 @@ static int virtio_crypto_ablkcipher_decrypt(struct ablkcipher_request *req)/* Use the first data virtqueue as default */ struct data_queue *data_vq = &vcrypto->data_vq[0 ]; +if (!req->nbytes) +return 0 ; +if (req->nbytes %AES_BLOCK_SIZE ) +return -EINVAL ; + vc_req->dataq = data_vq; vc_req->alg_cb = virtio_crypto_dataq_sym_callback; vc_sym_req->ablkcipher_ctx = ctx;
drivers/crypto/vmx/Makefile +3 -3
@@ -3,13 +3,13 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y) -TARGET := linux-ppc64le +override flavour := linux-ppc64le else -TARGET := linux-ppc64 +override flavour := linux-ppc64 endif quiet_cmd_perl = PERL $@ - cmd_perl = $(PERL) $(<) $(TARGET) > $(@) + cmd_perl = $(PERL) $(<) $(flavour) > $(@) targets += aesp8-ppc.S ghashp8-ppc.S
drivers/edac/ghes_edac.c +8 -2
@@ -210,6 +210,7 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)/* Cleans the error report buffer */ memset (e,0 ,sizeof (*e)); e->error_count =1 ; + e->grain =1 ;strcpy (e->label,"unknown label" ); e->msg = pvt->msg; e->other_detail = pvt->other_detail;
@@ -305,7 +306,7 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)/* Error grain */ if (mem_err->validation_bits &CPER_MEM_VALID_PA_MASK ) - e->grain = ~(mem_err->physical_addr_mask & ~PAGE_MASK ); + e->grain = ~mem_err->physical_addr_mask +1 ;/* Memory error location, mapped on e->location */ p = e->location;
@@ -412,8 +413,13 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)if (p > pvt->other_detail) *(p -1 ) ='\0' ; +/* Sanity-check driver-supplied grain value. */ +if (WARN_ON_ONCE (!e->grain)) + e->grain =1 ; + + grain_bits =fls_long (e->grain -1 ); +/* Generate the trace event */ - grain_bits =fls_long (e->grain);snprintf (pvt->detail_location,sizeof (pvt->detail_location),"APEI location: %s %s" , e->location, e->other_detail); trace_mc_event(type, e->msg, e->label, e->error_count,
drivers/extcon/extcon-sm5502.c +4 -0
@@ -69,6 +69,10 @@ struct sm5502_muic_info {/* Default value of SM5502 register to bring up MUIC device. */ static struct reg_data sm5502_reg_data[] = { { + .reg =SM5502_REG_RESET , + .val =SM5502_REG_RESET_MASK , + .invert = true, + }, { .reg =SM5502_REG_CONTROL , .val =SM5502_REG_CONTROL_MASK_INT_MASK , .invert = false,
drivers/extcon/extcon-sm5502.h +2 -0
@@ -241,6 +241,8 @@ enum sm5502_reg {#define DM_DP_SWITCH_UART ((DM_DP_CON_SWITCH_UART <<SM5502_REG_MANUAL_SW1_DP_SHIFT) \ | (DM_DP_CON_SWITCH_UART <<SM5502_REG_MANUAL_SW1_DM_SHIFT)) +#define SM5502_REG_RESET_MASK (0x1) +/* SM5502 Interrupts */ enum sm5502_irq {/* INT1 */
drivers/fsi/fsi-core.c +27 -4
@@ -552,6 +552,31 @@ static int fsi_slave_scan(struct fsi_slave *slave)return 0 ; } +static unsigned long aligned_access_size (size_t offset,size_t count) +{ +unsigned long offset_unit, count_unit; + +/* Criteria: +* +* 1. Access size must be less than or equal to the maximum access +* width or the highest power-of-two factor of offset +* 2. Access size must be less than or equal to the amount specified by +* count +* +* The access width is optimal if we can calculate 1 to be strictly +* equal while still satisfying 2. +*/ + +/* Find 1 by the bottom bit of offset (with a 4 byte access cap) */ + offset_unit =BIT (__builtin_ctzl (offset |4 )); + +/* Find 2 by the top bit of count */ + count_unit =BIT (8 *sizeof (unsigned long ) -1 -__builtin_clzl (count)); + +/* Constrain the maximum access width to the minimum of both criteria */ +return BIT (__builtin_ctzl (offset_unit | count_unit)); +} +static ssize_t fsi_slave_sysfs_raw_read (struct file *file,struct kobject *kobj,struct bin_attribute *attr,char *buf,loff_t off,size_t count)
@@ -567,8 +592,7 @@ static ssize_t fsi_slave_sysfs_raw_read(struct file *file,return -EINVAL ;for (total_len =0 ; total_len < count; total_len += read_len) { - read_len =min_t (size_t, count,4 ); - read_len -= off &0x3 ; + read_len =aligned_access_size (off, count - total_len); rc =fsi_slave_read (slave, off, buf + total_len, read_len);if (rc)
@@ -595,8 +619,7 @@ static ssize_t fsi_slave_sysfs_raw_write(struct file *file,return -EINVAL ;for (total_len =0 ; total_len < count; total_len += write_len) { - write_len =min_t (size_t, count,4 ); - write_len -= off &0x3 ; + write_len =aligned_access_size (off, count - total_len); rc =fsi_slave_write (slave, off, buf + total_len, write_len);if (rc)
drivers/gpu/drm/amd/amdgpu/amdgpu_test.c +2 -0
@@ -138,6 +138,7 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev) }dma_fence_put (fence); + fence =NULL ; r =amdgpu_bo_kmap (vram_obj, &vram_map);if (r) {
@@ -183,6 +184,7 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev) }dma_fence_put (fence); + fence =NULL ; r =amdgpu_bo_kmap (gtt_obj[i], >t_map);if (r) {
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +9 -3
@@ -700,10 +700,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job, bool need_ id->oa_base != job->oa_base || id->oa_size != job->oa_size);bool vm_flush_needed = job->vm_needs_flush; -bool pasid_mapping_needed = id->pasid != job->pasid || - !id->pasid_mapping || - !dma_fence_is_signaled (id->pasid_mapping);struct dma_fence *fence =NULL ; +bool pasid_mapping_needed = false;unsigned patch_offset =0 ;int r;
@@ -713,6 +711,12 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job, bool need_ pasid_mapping_needed = true; } +mutex_lock (&id_mgr->lock); +if (id->pasid != job->pasid || !id->pasid_mapping || + !dma_fence_is_signaled (id->pasid_mapping)) + pasid_mapping_needed = true; +mutex_unlock (&id_mgr->lock); + gds_switch_needed &= !!ring->funcs->emit_gds_switch; vm_flush_needed &= !!ring->funcs->emit_vm_flush && job->vm_pd_addr !=AMDGPU_BO_INVALID_OFFSET ;
@@ -752,9 +756,11 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job, bool need_ }if (pasid_mapping_needed) { +mutex_lock (&id_mgr->lock); id->pasid = job->pasid;dma_fence_put (id->pasid_mapping); id->pasid_mapping =dma_fence_get (fence); +mutex_unlock (&id_mgr->lock); }dma_fence_put (fence);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
@@ -2187,7 +2187,8 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)* And it's needed by gfxoff feature. */ if (adev->gfx.rlc.is_rlc_v2_1) { -gfx_v9_1_init_rlc_save_restore_list (adev); +if (adev->asic_type ==CHIP_VEGA12 ) +gfx_v9_1_init_rlc_save_restore_list (adev);gfx_v9_0_enable_save_restore_machine (adev); }
drivers/gpu/drm/amd/amdgpu/si_ih.c +2 -1
@@ -62,7 +62,8 @@ static int si_ih_irq_init(struct amdgpu_device *adev)u64 wptr_off;si_ih_disable_interrupts (adev); -WREG32 (INTERRUPT_CNTL2 , adev->irq.ih.gpu_addr >>8 ); +/* set dummy read address to dummy page address */ +WREG32 (INTERRUPT_CNTL2 , adev->dummy_page_addr >>8 ); interrupt_cntl =RREG32 (INTERRUPT_CNTL ); interrupt_cntl &= ~IH_DUMMY_RD_OVERRIDE ; interrupt_cntl &= ~IH_REQ_NONSNOOP_EN ;
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +5 -0
@@ -62,6 +62,11 @@ int kfd_interrupt_init(struct kfd_dev *kfd) } kfd->ih_wq =alloc_workqueue ("KFD IH" ,WQ_HIGHPRI ,1 ); +if (unlikely (!kfd->ih_wq)) { +kfifo_free (&kfd->ih_fifo); +dev_err (kfd_chardev (),"Failed to allocate KFD IH workqueue\n" ); +return -ENOMEM ; + }spin_lock_init (&kfd->interrupt_lock);INIT_WORK (&kfd->interrupt_work, interrupt_wq);
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
@@ -1950,7 +1950,7 @@ static bool dp_active_dongle_validate_timing(break ; } -if (dongle_caps->dongle_type !=DISPLAY_DONGLE_DP_HDMI_CONVERTER || +if (dpcd_caps->dongle_type !=DISPLAY_DONGLE_DP_HDMI_CONVERTER || dongle_caps->extendedCapValid == false)return true;
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -0
@@ -2172,6 +2172,7 @@ static void get_active_converter_info( uint8_t data, struct dc_link *link) { union dp_downstream_port_present ds_port = { .byte = data }; +memset (&link->dpcd_caps.dongle_caps,0 ,sizeof (link->dpcd_caps.dongle_caps));/* decode converter info*/ if (!ds_port.fields.PORT_PRESENT) {
drivers/gpu/drm/bridge/analogix-anx78xx.c +6 -2
@@ -725,7 +725,9 @@ static int anx78xx_init_pdata(struct anx78xx *anx78xx)/* 1.0V digital core power regulator */ pdata->dvdd10 =devm_regulator_get (dev,"dvdd10" );if (IS_ERR (pdata->dvdd10)) { -DRM_ERROR ("DVDD10 regulator not found\n" ); +if (PTR_ERR (pdata->dvdd10) != -EPROBE_DEFER ) +DRM_ERROR ("DVDD10 regulator not found\n" ); +return PTR_ERR (pdata->dvdd10); }
@@ -1341,7 +1343,9 @@ static int anx78xx_i2c_probe(struct i2c_client *client, err =anx78xx_init_pdata (anx78xx);if (err) { -DRM_ERROR ("Failed to initialize pdata: %d\n" , err); +if (err != -EPROBE_DEFER ) +DRM_ERROR ("Failed to initialize pdata: %d\n" , err); +return err; }
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +11 -1
@@ -39,6 +39,7 @@#include <media/cec-notifier.h> +#define DDC_CI_ADDR 0x37#define DDC_SEGMENT_ADDR 0x30#define HDMI_EDID_LEN 512
@@ -320,6 +321,15 @@ static int dw_hdmi_i2c_xfer(struct i2c_adapter *adap,u8 addr = msgs[0 ].addr;int i, ret =0 ; +if (addr ==DDC_CI_ADDR ) +/* +* The internal I2C controller does not support the multi-byte +* read and write operations needed for DDC/CI. +* TOFIX: Blacklist the DDC/CI address until we filter out +* unsupported I2C operations. +*/ +return -EOPNOTSUPP ; +dev_dbg (hdmi->dev,"xfer: num: %d, addr: %#x\n" , num, addr);for (i =0 ; i < num; i++) {
@@ -1747,7 +1757,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)/* HDMI Initialization Step E - Configure audio */ hdmi_clk_regenerator_update_pixel_clock (hdmi); -hdmi_enable_audio_clk (hdmi, true); +hdmi_enable_audio_clk (hdmi, hdmi->audio_enable); }/* not for DVI mode */
drivers/gpu/drm/drm_vblank.c +3 -3
@@ -1572,7 +1572,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,unsigned int flags, pipe, high_pipe;if (!dev->irq_enabled) -return -EINVAL ; +return -EOPNOTSUPP ;if (vblwait->request.type & _DRM_VBLANK_SIGNAL)return -EINVAL ;
@@ -1813,7 +1813,7 @@ int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data,return -EINVAL ;if (!dev->irq_enabled) -return -EINVAL ; +return -EOPNOTSUPP ; crtc =drm_crtc_find (dev, file_priv, get_seq->crtc_id);if (!crtc)
@@ -1871,7 +1871,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,return -EINVAL ;if (!dev->irq_enabled) -return -EINVAL ; +return -EOPNOTSUPP ; crtc =drm_crtc_find (dev, file_priv, queue_seq->crtc_id);if (!crtc)
drivers/gpu/drm/gma500/oaktrail_crtc.c +2 -0
@@ -139,6 +139,7 @@ static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit,s32 freq_error, min_error =100000 ;memset (best_clock,0 ,sizeof (*best_clock)); +memset (&clock,0 ,sizeof (clock));for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) { for (clock.n = limit->n.min; clock.n <= limit->n.max;
@@ -195,6 +196,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,int err = target;memset (best_clock,0 ,sizeof (*best_clock)); +memset (&clock,0 ,sizeof (clock));for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) { for (clock.p1 = limit->p1.min; clock.p1 <= limit->p1.max;
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +1 -0
@@ -427,6 +427,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c,return PTR_ERR (ts->dsi); } +drm_panel_init (&ts->base); ts->base.dev = dev; ts->base.funcs = &rpi_touchscreen_funcs;
drivers/gpu/drm/panel/panel-sitronix-st7789v.c +1 -0
@@ -380,6 +380,7 @@ static int st7789v_probe(struct spi_device *spi)spi_set_drvdata (spi, ctx); ctx->spi = spi; +drm_panel_init (&ctx->panel); ctx->panel.dev = &spi->dev; ctx->panel.funcs = &st7789v_drm_funcs;
drivers/gpu/drm/tegra/sor.c +5 -0
@@ -2922,6 +2922,11 @@ static int tegra_sor_parse_dt(struct tegra_sor *sor)* earlier */ sor->pad =TEGRA_IO_PAD_HDMI_DP0 + sor->index; + }else { +if (sor->soc->supports_edp) + sor->index =0 ; +else + sor->index =1 ; }return 0 ;
drivers/gpu/host1x/job.c +6 -5
@@ -447,7 +447,8 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)return err; } -static inline int copy_gathers (struct host1x_job *job,struct device *dev) +static inline int copy_gathers (struct device *host,struct host1x_job *job, +struct device *dev) {struct host1x_firewall fw;size_t size =0 ;
@@ -470,12 +471,12 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)* Try a non-blocking allocation from a higher priority pools first, * as awaiting for the allocation here is a major performance hit. */ - job->gather_copy_mapped =dma_alloc_wc (dev, size, &job->gather_copy, + job->gather_copy_mapped =dma_alloc_wc (host, size, &job->gather_copy,GFP_NOWAIT );/* the higher priority allocation failed, try the generic-blocking */ if (!job->gather_copy_mapped) - job->gather_copy_mapped =dma_alloc_wc (dev, size, + job->gather_copy_mapped =dma_alloc_wc (host, size, &job->gather_copy,GFP_KERNEL );if (!job->gather_copy_mapped)
@@ -523,7 +524,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev) goto out;if (IS_ENABLED (CONFIG_TEGRA_HOST1X_FIREWALL )) { - err =copy_gathers (job, dev); + err =copy_gathers (host->dev, job, dev);if (err) goto out; }
@@ -584,7 +585,7 @@ void host1x_job_unpin(struct host1x_job *job) job->num_unpins =0 ;if (job->gather_copy_size) -dma_free_wc (job->channel->dev, job->gather_copy_size, +dma_free_wc (host->dev, job->gather_copy_size, job->gather_copy_mapped, job->gather_copy); }EXPORT_SYMBOL (host1x_job_unpin);
drivers/hwtracing/intel_th/pci.c +10 -0
@@ -180,6 +180,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x06a6), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Comet Lake PCH-V */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0xa3a6 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Ice Lake NNPI */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x45c5),
@@ -205,6 +210,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Elkhart Lake */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, { 0 }, };
drivers/iio/adc/dln2-adc.c +14 -6
@@ -527,6 +527,10 @@ static int dln2_adc_triggered_buffer_postenable(struct iio_dev *indio_dev)u16 conflict;unsigned int trigger_chan; + ret =iio_triggered_buffer_postenable (indio_dev); +if (ret) +return ret; +mutex_lock (&dln2->mutex);/* Enable ADC */
@@ -540,6 +544,7 @@ static int dln2_adc_triggered_buffer_postenable(struct iio_dev *indio_dev) (int)conflict); ret = -EBUSY ; } +iio_triggered_buffer_predisable (indio_dev);return ret; }
@@ -553,6 +558,7 @@ static int dln2_adc_triggered_buffer_postenable(struct iio_dev *indio_dev)mutex_unlock (&dln2->mutex);if (ret <0 ) {dev_dbg (&dln2->pdev->dev,"Problem in %s\n" , __func__); +iio_triggered_buffer_predisable (indio_dev);return ret; } }else {
@@ -560,12 +566,12 @@ static int dln2_adc_triggered_buffer_postenable(struct iio_dev *indio_dev)mutex_unlock (&dln2->mutex); } -return iio_triggered_buffer_postenable (indio_dev); +return 0 ; }static int dln2_adc_triggered_buffer_predisable (struct iio_dev *indio_dev) { -int ret; +int ret, ret2;struct dln2_adc *dln2 =iio_priv (indio_dev);mutex_lock (&dln2->mutex);
@@ -580,12 +586,14 @@ static int dln2_adc_triggered_buffer_predisable(struct iio_dev *indio_dev) ret =dln2_adc_set_port_enabled (dln2, false,NULL );mutex_unlock (&dln2->mutex); -if (ret <0 ) { +if (ret <0 )dev_dbg (&dln2->pdev->dev,"Problem in %s\n" , __func__); -return ret; - } -return iio_triggered_buffer_predisable (indio_dev); + ret2 =iio_triggered_buffer_predisable (indio_dev); +if (ret ==0 ) + ret = ret2; + +return ret; }static const struct iio_buffer_setup_ops dln2_adc_buffer_setup_ops = {
drivers/iio/adc/max1027.c +8 -0
@@ -460,6 +460,14 @@ static int max1027_probe(struct spi_device *spi) goto fail_dev_register; } +/* Internal reset */ + st->reg =MAX1027_RST_REG ; + ret =spi_write (st->spi, &st->reg,1 ); +if (ret <0 ) { +dev_err (&indio_dev->dev,"Failed to reset the ADC\n" ); +return ret; + } +/* Disable averaging */ st->reg =MAX1027_AVG_REG ; ret =spi_write (st->spi, &st->reg,1 );
drivers/iio/dac/Kconfig +2 -2
@@ -59,8 +59,8 @@ config AD5446 help Say yes here to build support for Analog Devices AD5300, AD5301, AD5310, AD5311, AD5320, AD5321, AD5444, AD5446, AD5450, AD5451, AD5452, AD5453, - AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5601, AD5602, AD5611, AD5612, - AD5620, AD5621, AD5622, AD5640, AD5641, AD5660, AD5662 DACs + AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5600, AD5601, AD5602, AD5611, + AD5612, AD5620, AD5621, AD5622, AD5640, AD5641, AD5660, AD5662 DACs as well as Texas Instruments DAC081S101, DAC101S101, DAC121S101. To compile this driver as a module, choose M here: the
drivers/iio/dac/ad5446.c +6 -0
@@ -328,6 +328,7 @@ enum ad5446_supported_spi_device_ids {ID_AD5541A ,ID_AD5512A ,ID_AD5553 , +ID_AD5600 ,ID_AD5601 ,ID_AD5611 , ID_AD5621,
@@ -382,6 +383,10 @@ static const struct ad5446_chip_info ad5446_spi_chip_info[] = { .channel = AD5446_CHANNEL(14, 16, 0), .write = ad5446_write, }, + [ID_AD5600] = { + .channel = AD5446_CHANNEL(16, 16, 0), + .write = ad5446_write, + }, [ID_AD5601] = { .channel = AD5446_CHANNEL_POWERDOWN(8, 16, 6), .write = ad5446_write,
@@ -449,6 +454,7 @@ static const struct spi_device_id ad5446_spi_ids[] = { {"ad5542a", ID_AD5541A}, /* ad5541a and ad5542a are compatible */ {"ad5543", ID_AD5541A}, /* ad5541a and ad5543 are compatible */ {"ad5553", ID_AD5553}, + {"ad5600", ID_AD5600}, {"ad5601", ID_AD5601}, {"ad5611", ID_AD5611}, {"ad5621", ID_AD5621},
drivers/iio/light/bh1750.c +2 -2
@@ -62,9 +62,9 @@ struct bh1750_chip_info {u16 int_time_low_mask;u16 int_time_high_mask; -} +}; -static const bh1750_chip_info_tbl[] = { +static const struct bh1750_chip_info bh1750_chip_info_tbl[] = { [BH1710 ] = {140 ,1022 ,300 ,400 ,250000000 ,2 ,0x001F ,0x03E0 }, [BH1721 ] = {140 ,1020 ,300 ,400 ,250000000 ,2 ,0x0010 ,0x03E0 }, [BH1750 ] = {31 ,254 ,69 ,1740 ,57500000 ,1 ,0x001F ,0x00E0 },
drivers/infiniband/hw/qedr/verbs.c +10 -2
@@ -1701,6 +1701,14 @@ static void qedr_cleanup_user(struct qedr_dev *dev, struct qedr_qp *qp)if (qp->urq.umem)ib_umem_release (qp->urq.umem); qp->urq.umem =NULL ; + +if (rdma_protocol_roce (&dev->ibdev,1 )) { +qedr_free_pbl (dev, &qp->usq.pbl_info, qp->usq.pbl_tbl); +qedr_free_pbl (dev, &qp->urq.pbl_info, qp->urq.pbl_tbl); + }else { +kfree (qp->usq.pbl_tbl); +kfree (qp->urq.pbl_tbl); + } } static int qedr_create_user_qp(struct qedr_dev *dev,
@@ -2809,8 +2817,8 @@ int qedr_dereg_mr(struct ib_mr *ib_mr) dev->ops->rdma_free_tid (dev->rdma_ctx, mr->hw_mr.itid); -if ((mr->type !=QEDR_MR_DMA ) && (mr->type !=QEDR_MR_FRMR )) -qedr_free_pbl (dev, &mr->info.pbl_info, mr->info.pbl_table); +if (mr->type !=QEDR_MR_DMA ) +free_mr_info (dev, &mr->info);/* it could be user registered memory. */ if (mr->umem)
drivers/infiniband/ulp/iser/iscsi_iser.c +1 -0
@@ -646,6 +646,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,if (ib_conn->pi_support) {u32 sig_caps = ib_conn->device->ib_device->attrs.sig_prot_cap; + shost->sg_prot_tablesize = shost->sg_tablesize;scsi_host_set_prot (shost,iser_dif_prot_caps (sig_caps));scsi_host_set_guard (shost,SHOST_DIX_GUARD_IP |SHOST_DIX_GUARD_CRC );
drivers/md/bcache/alloc.c +4 -1
@@ -377,7 +377,10 @@ static int bch_allocator_thread(void *arg)if (!fifo_full (&ca->free_inc)) goto retry_invalidate; -bch_prio_write (ca); +if (bch_prio_write (ca, false) <0 ) { + ca->invalidate_needs_gc =1 ; +wake_up_gc (ca->set); + } } } out:
drivers/md/bcache/bcache.h +1 -1
@@ -959,7 +959,7 @@ bool bch_cached_dev_error(struct cached_dev *dc); __printf(2, 3)bool bch_cache_set_error (struct cache_set *c,const char *fmt, ...); -void bch_prio_write (struct cache *ca); +int bch_prio_write (struct cache *ca,bool wait);void bch_write_bdev_super (struct cached_dev *dc,struct closure *parent);extern struct workqueue_struct *bcache_wq;
drivers/md/bcache/super.c +37 -14
98 lines not on this page · raw message
drivers/md/md-bitmap.c +1 -1
@@ -2132,6 +2132,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,memcpy (page_address (store.sb_page),page_address (bitmap->storage.sb_page),sizeof (bitmap_super_t)); +spin_lock_irq (&bitmap->counts.lock);md_bitmap_file_unmap (&bitmap->storage); bitmap->storage = store;
@@ -2147,7 +2148,6 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, blocks =min (old_counts.chunks << old_counts.chunkshift, chunks << chunkshift); -spin_lock_irq (&bitmap->counts.lock);/* For cluster raid, need to pre-allocate bitmap */ if (mddev_is_clustered (bitmap->mddev)) {unsigned long page;
drivers/media/i2c/ov2659.c +13 -5
@@ -419,10 +419,14 @@ static struct sensor_register ov2659_720p[] = { { REG_TIMING_YINC, 0x11 }, { REG_TIMING_VERT_FORMAT, 0x80 }, { REG_TIMING_HORIZ_FORMAT, 0x00 }, + { 0x370a, 0x12 }, { 0x3a03, 0xe8 }, { 0x3a09, 0x6f }, { 0x3a0b, 0x5d }, { 0x3a15, 0x9a }, + { REG_VFIFO_READ_START_H, 0x00 }, + { REG_VFIFO_READ_START_L, 0x80 }, + { REG_ISP_CTRL02, 0x00 }, { REG_NULL, 0x00 }, };
@@ -1203,11 +1207,15 @@ static int ov2659_s_stream(struct v4l2_subdev *sd, int on) goto unlock; } -ov2659_set_pixel_clock (ov2659); -ov2659_set_frame_size (ov2659); -ov2659_set_format (ov2659); -ov2659_set_streaming (ov2659,1 ); - ov2659->streaming = on; + ret =ov2659_set_pixel_clock (ov2659); +if (!ret) + ret =ov2659_set_frame_size (ov2659); +if (!ret) + ret =ov2659_set_format (ov2659); +if (!ret) { +ov2659_set_streaming (ov2659,1 ); + ov2659->streaming = on; + } unlock:mutex_unlock (&ov2659->lock);
drivers/media/i2c/ov6650.c +23 -19
83 lines not on this page · raw message
drivers/media/i2c/smiapp/smiapp-core.c +8 -4
@@ -3108,19 +3108,23 @@ static int smiapp_probe(struct i2c_client *client,if (rval <0 ) goto out_media_entity_cleanup; - rval =v4l2_async_register_subdev_sensor_common (&sensor->src->sd); -if (rval <0 ) - goto out_media_entity_cleanup; -pm_runtime_set_active (&client->dev);pm_runtime_get_noresume (&client->dev);pm_runtime_enable (&client->dev); + + rval =v4l2_async_register_subdev_sensor_common (&sensor->src->sd); +if (rval <0 ) + goto out_disable_runtime_pm; +pm_runtime_set_autosuspend_delay (&client->dev,1000 );pm_runtime_use_autosuspend (&client->dev);pm_runtime_put_autosuspend (&client->dev);return 0 ; +out_disable_runtime_pm: +pm_runtime_disable (&client->dev); + out_media_entity_cleanup:media_entity_cleanup (&sensor->src->sd.entity);
drivers/media/pci/cx88/cx88-video.c +7 -4
@@ -1312,7 +1312,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev, core =cx88_core_get (dev->pci);if (!core) { err = -EINVAL ; - goto fail_free; + goto fail_disable; } dev->core = core;
@@ -1358,7 +1358,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev, cc->step, cc->default_value);if (!vc) { err = core->audio_hdl.error; - goto fail_core; + goto fail_irq; } vc->priv = (void *)cc; }
@@ -1372,7 +1372,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev, cc->step, cc->default_value);if (!vc) { err = core->video_hdl.error; - goto fail_core; + goto fail_irq; } vc->priv = (void *)cc;if (vc->id ==V4L2_CID_CHROMA_AGC )
@@ -1535,11 +1535,14 @@ static int cx8800_initdev(struct pci_dev *pci_dev, fail_unreg:cx8800_unregister_video (dev); -free_irq (pci_dev->irq, dev);mutex_unlock (&core->lock); +fail_irq: +free_irq (pci_dev->irq, dev); fail_core: core->v4ldev =NULL ;cx88_core_put (core, dev->pci); +fail_disable: +pci_disable_device (pci_dev); fail_free:kfree (dev);return err;
drivers/media/platform/am437x/am437x-vpfe.c +4 -0
@@ -1848,6 +1848,10 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id)if (!(sdinfo->inputs[0 ].capabilities &V4L2_IN_CAP_STD ))return -ENODATA ; +/* if trying to set the same std then nothing to do */ +if (vpfe_standards[vpfe->std_index].std_id == std_id) +return 0 ; +/* If streaming is started, return error */ if (vb2_is_busy (&vpfe->buffer_queue)) {vpfe_err (vpfe,"%s device busy\n" , __func__);
drivers/media/platform/qcom/venus/core.c +5 -4
@@ -430,10 +430,11 @@ static const struct venus_resources msm8916_res = { };static const struct freq_tbl msm8996_freq_table[] = { - {1944000 ,490000000 },/* 4k UHD @ 60 */ - {972000 ,320000000 },/* 4k UHD @ 30 */ - {489600 ,150000000 },/* 1080p @ 60 */ - {244800 ,75000000 },/* 1080p @ 30 */ + {1944000 ,520000000 },/* 4k UHD @ 60 (decode only) */ + {972000 ,520000000 },/* 4k UHD @ 30 */ + {489600 ,346666667 },/* 1080p @ 60 */ + {244800 ,150000000 },/* 1080p @ 30 */ + {108000 ,75000000 },/* 720p @ 30 */ };static const struct reg_val msm8996_reg_preset[] = {
drivers/media/platform/qcom/venus/hfi_venus.c +6 -0
@@ -1484,6 +1484,7 @@ static int venus_suspend_3xx(struct venus_core *core) {struct venus_hfi_device *hdev =to_hfi_priv (core);struct device *dev = core->dev; +u32 ctrl_status;bool val;int ret;
@@ -1499,6 +1500,10 @@ static int venus_suspend_3xx(struct venus_core *core)return -EINVAL ; } + ctrl_status =venus_readl (hdev,CPU_CS_SCIACMDARG0 ); +if (ctrl_status &CPU_CS_SCIACMDARG0_PC_READY ) + goto power_off; +/* * Power collapse sequence for Venus 3xx and 4xx versions: * 1. Check for ARM9 and video core to be idle by checking WFI bit
@@ -1523,6 +1528,7 @@ static int venus_suspend_3xx(struct venus_core *core)if (ret)return ret; +power_off:mutex_lock (&hdev->lock); ret =venus_power_off (hdev);
drivers/media/platform/rcar_drif.c +1 -0
@@ -912,6 +912,7 @@ static int rcar_drif_g_fmt_sdr_cap(struct file *file, void *priv, {struct rcar_drif_sdr *sdr =video_drvdata (file); +memset (f->fmt.sdr.reserved,0 ,sizeof (f->fmt.sdr.reserved)); f->fmt.sdr.pixelformat = sdr->fmt->pixelformat; f->fmt.sdr.buffersize = sdr->fmt->buffersize;
drivers/media/platform/ti-vpe/vpdma.h +1 -0
@@ -60,6 +60,7 @@ struct vpdma_data_format {* line stride of source and dest * buffers should be 16 byte aligned */ +#define VPDMA_MAX_STRIDE 65520/* Max line stride 16 byte aligned */ #define VPDMA_DTD_DESC_SIZE 32/* 8 words */ #define VPDMA_CFD_CTD_DESC_SIZE 16/* 4 words */
drivers/media/platform/ti-vpe/vpe.c +38 -14
164 lines not on this page · raw message
drivers/media/radio/si470x/radio-si470x-i2c.c +2 -0
@@ -485,6 +485,8 @@ static int si470x_i2c_remove(struct i2c_client *client)video_unregister_device (&radio->videodev);kfree (radio); +v4l2_ctrl_handler_free (&radio->hdl); +v4l2_device_unregister (&radio->v4l2_dev);return 0 ; }
drivers/media/usb/b2c2/flexcop-usb.c +7 -1
@@ -503,7 +503,13 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)static int flexcop_usb_init (struct flexcop_usb *fc_usb) {/* use the alternate setting with the larges buffer */ -usb_set_interface (fc_usb->udev,0 ,1 ); +int ret =usb_set_interface (fc_usb->udev,0 ,1 ); + +if (ret) { +err ("set interface failed." ); +return ret; + } +switch (fc_usb->udev->speed) {case USB_SPEED_LOW :err ("cannot handle USB speed because it is too slow." );
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +7 -2
@@ -916,8 +916,12 @@ static void pvr2_v4l2_internal_check(struct pvr2_channel *chp)pvr2_v4l2_dev_disassociate_parent (vp->dev_video);pvr2_v4l2_dev_disassociate_parent (vp->dev_radio);if (!list_empty (&vp->dev_video->devbase.fh_list) || - !list_empty (&vp->dev_radio->devbase.fh_list)) + (vp->dev_radio && + !list_empty (&vp->dev_radio->devbase.fh_list))) { +pvr2_trace (PVR2_TRACE_STRUCT , +"pvr2_v4l2 internal_check exit-empty id=%p" , vp);return ; + }pvr2_v4l2_destroy_no_lock (vp); }
@@ -953,7 +957,8 @@ static int pvr2_v4l2_release(struct file *file)kfree (fhp);if (vp->channel.mc_head->disconnect_flag &&list_empty (&vp->dev_video->devbase.fh_list) && -list_empty (&vp->dev_radio->devbase.fh_list)) { + (!vp->dev_radio || +list_empty (&vp->dev_radio->devbase.fh_list))) {pvr2_v4l2_destroy_no_lock (vp); }return 0 ;
drivers/media/v4l2-core/v4l2-ioctl.c +18 -15
@@ -1415,10 +1415,26 @@ static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,return ret; } +static void v4l_pix_format_touch (struct v4l2_pix_format *p) +{ +/* +* The v4l2_pix_format structure contains fields that make no sense for +* touch. Set them to default values in this case. +*/ + + p->field =V4L2_FIELD_NONE ; + p->colorspace =V4L2_COLORSPACE_RAW ; + p->flags =0 ; + p->ycbcr_enc =0 ; + p->quantization =0 ; + p->xfer_func =0 ; +} +static int v4l_g_fmt (const struct v4l2_ioctl_ops *ops,struct file *file,void *fh,void *arg) {struct v4l2_format *p = arg; +struct video_device *vfd =video_devdata (file);int ret =check_fmt (file, p->type);if (ret)
@@ -1456,6 +1472,8 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, ret = ops->vidioc_g_fmt_vid_cap (file, fh, arg);/* just in case the driver zeroed it again */ p->fmt.pix.priv =V4L2_PIX_FMT_PRIV_MAGIC ; +if (vfd->vfl_type ==VFL_TYPE_TOUCH ) +v4l_pix_format_touch (&p->fmt.pix);return ret;case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :return ops->vidioc_g_fmt_vid_cap_mplane (file, fh, arg);
@@ -1491,21 +1509,6 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops,return -EINVAL ; } -static void v4l_pix_format_touch (struct v4l2_pix_format *p) -{ -/* -* The v4l2_pix_format structure contains fields that make no sense for -* touch. Set them to default values in this case. -*/ - - p->field =V4L2_FIELD_NONE ; - p->colorspace =V4L2_COLORSPACE_RAW ; - p->flags =0 ; - p->ycbcr_enc =0 ; - p->quantization =0 ; - p->xfer_func =0 ; -} -static int v4l_s_fmt (const struct v4l2_ioctl_ops *ops,struct file *file,void *fh,void *arg) {
drivers/mmc/host/mtk-sd.c +2 -0
@@ -228,6 +228,7 @@#define MSDC_PATCH_BIT_SPCPUSH (0x1 << 29)/* RW */ #define MSDC_PATCH_BIT_DECRCTMO (0x1 << 30)/* RW */ +#define MSDC_PATCH_BIT1_CMDTA (0x7 << 3)/* RW */ #define MSDC_PATCH_BIT1_STOP_DLY (0xf << 8)/* RW */ #define MSDC_PATCH_BIT2_CFGRESP (0x1 << 15)/* RW */
@@ -1673,6 +1674,7 @@ static int hs400_tune_response(struct mmc_host *mmc, u32 opcode)/* select EMMC50 PAD CMD tune */ sdr_set_bits (host->base +PAD_CMD_TUNE ,BIT (0 )); +sdr_set_field (host->base +MSDC_PATCH_BIT1 ,MSDC_PATCH_BIT1_CMDTA ,2 );if (mmc->ios.timing ==MMC_TIMING_MMC_HS200 || mmc->ios.timing ==MMC_TIMING_UHS_SDR104 )
drivers/mmc/host/sdhci-msm.c +19 -9
@@ -108,7 +108,7 @@#define CORE_PWRSAVE_DLL BIT(3) -#define DDR_CONFIG_POR_VAL 0x80040853 +#define DDR_CONFIG_POR_VAL 0x80040873#define INVALID_TUNING_PHASE -1
@@ -157,8 +157,9 @@ struct sdhci_msm_offset {u32 core_ddr_200_cfg;u32 core_vendor_spec3;u32 core_dll_config_2; +u32 core_dll_config_3; +u32 core_ddr_config_old;/* Applicable to sdcc minor ver < 0x49 */ u32 core_ddr_config; -u32 core_ddr_config_2; };static const struct sdhci_msm_offset sdhci_msm_v5_offset = {
@@ -186,8 +187,8 @@ static const struct sdhci_msm_offset sdhci_msm_v5_offset = { .core_ddr_200_cfg = 0x224, .core_vendor_spec3 = 0x250, .core_dll_config_2 = 0x254, - .core_ddr_config = 0x258, - .core_ddr_config_2 = 0x25c, + .core_dll_config_3 = 0x258, + .core_ddr_config = 0x25c, };static const struct sdhci_msm_offset sdhci_msm_mci_offset = {
@@ -216,8 +217,8 @@ static const struct sdhci_msm_offset sdhci_msm_mci_offset = { .core_ddr_200_cfg = 0x184, .core_vendor_spec3 = 0x1b0, .core_dll_config_2 = 0x1b4, - .core_ddr_config = 0x1b8, - .core_ddr_config_2 = 0x1bc, + .core_ddr_config_old = 0x1b8, + .core_ddr_config = 0x1bc, };struct sdhci_msm_variant_ops {
@@ -260,6 +261,7 @@ struct sdhci_msm_host {const struct sdhci_msm_offset *offset;bool use_cdr;u32 transfer_mode; +bool updated_ddr_cfg; };static const struct sdhci_msm_offset *sdhci_priv_msm_offset (struct sdhci_host *host)
@@ -931,8 +933,10 @@ static int sdhci_msm_cdclp533_calibration(struct sdhci_host *host)static int sdhci_msm_cm_dll_sdc4_calibration (struct sdhci_host *host) {struct mmc_host *mmc = host->mmc; -u32 dll_status, config; +u32 dll_status, config, ddr_cfg_offset;int ret; +struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); +struct sdhci_msm_host *msm_host =sdhci_pltfm_priv (pltfm_host);const struct sdhci_msm_offset *msm_offset =sdhci_priv_msm_offset (host);
@@ -945,8 +949,11 @@ static int sdhci_msm_cm_dll_sdc4_calibration(struct sdhci_host *host)* bootloaders. In the future, if this changes, then the desired * values will need to be programmed appropriately. */ -writel_relaxed (DDR_CONFIG_POR_VAL , host->ioaddr + - msm_offset->core_ddr_config); +if (msm_host->updated_ddr_cfg) + ddr_cfg_offset = msm_offset->core_ddr_config; +else + ddr_cfg_offset = msm_offset->core_ddr_config_old; +writel_relaxed (DDR_CONFIG_POR_VAL , host->ioaddr + ddr_cfg_offset);if (mmc->ios.enhanced_strobe) { config = readl_relaxed(host->ioaddr +
@@ -1862,6 +1869,9 @@ static int sdhci_msm_probe(struct platform_device *pdev) msm_offset->core_vendor_spec_capabilities0); } +if (core_major ==1 && core_minor >=0x49 ) + msm_host->updated_ddr_cfg = true; +/* * Power on reset state may trigger power irq if previous status of * PWRCTL was either BUS_ON or IO_HIGH_V. So before enabling pwr irq
drivers/mmc/host/sdhci-of-esdhc.c +2 -5
@@ -648,9 +648,6 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask)sdhci_writel (host, host->ier,SDHCI_INT_ENABLE );sdhci_writel (host, host->ier,SDHCI_SIGNAL_ENABLE ); -if (of_find_compatible_node (NULL ,NULL ,"fsl,p2020-esdhc" )) -mdelay (5 ); -if (mask &SDHCI_RESET_ALL ) { val =sdhci_readl (host,ESDHC_TBCTL ); val &= ~ESDHC_TB_EN ;
@@ -926,8 +923,8 @@ static int sdhci_esdhc_probe(struct platform_device *pdev) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ ;if (of_find_compatible_node (NULL ,NULL ,"fsl,p2020-esdhc" )) { - host->quirks2 |=SDHCI_QUIRK_RESET_AFTER_REQUEST ; - host->quirks2 |=SDHCI_QUIRK_BROKEN_TIMEOUT_VAL ; + host->quirks |=SDHCI_QUIRK_RESET_AFTER_REQUEST ; + host->quirks |=SDHCI_QUIRK_BROKEN_TIMEOUT_VAL ; } if (of_device_is_compatible(np, "fsl,p5040-esdhc") ||
drivers/mmc/host/sdhci-pci-core.c +9 -1
@@ -30,6 +30,7 @@#include <linux/mmc/slot-gpio.h> #include <linux/mmc/sdhci-pci-data.h> #include <linux/acpi.h> +#include <linux/dmi.h> #include "cqhci.h"
@@ -732,11 +733,18 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)return 0 ; } +static bool glk_broken_cqhci (struct sdhci_pci_slot *slot) +{ +return slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_GLK_EMMC && +dmi_match (DMI_BIOS_VENDOR ,"LENOVO" ); +} +static int glk_emmc_probe_slot (struct sdhci_pci_slot *slot) {int ret =byt_emmc_probe_slot (slot); - slot->host->mmc->caps2 |=MMC_CAP2_CQE ; +if (!glk_broken_cqhci (slot)) + slot->host->mmc->caps2 |=MMC_CAP2_CQE ;if (slot->chip->pdev->device !=PCI_DEVICE_ID_INTEL_GLK_EMMC ) { slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES,
drivers/mmc/host/sdhci.c +6 -5
@@ -1713,9 +1713,7 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing) ctrl_2 |=SDHCI_CTRL_UHS_SDR104 ; else if (timing == MMC_TIMING_UHS_SDR12) ctrl_2 |= SDHCI_CTRL_UHS_SDR12; - else if (timing == MMC_TIMING_SD_HS || - timing == MMC_TIMING_MMC_HS || - timing == MMC_TIMING_UHS_SDR25) + else if (timing == MMC_TIMING_UHS_SDR25) ctrl_2 |= SDHCI_CTRL_UHS_SDR25; else if (timing == MMC_TIMING_UHS_SDR50) ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
@@ -2246,8 +2244,8 @@ static void __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)sdhci_send_tuning (host, opcode);if (!host->tuning_done) { -pr_info ("%s: Tuning timeout, falling back to fixed sampling clock\n" , -mmc_hostname (host->mmc)); +pr_debug ("%s: Tuning timeout, falling back to fixed sampling clock\n" , +mmc_hostname (host->mmc));sdhci_abort_tuning (host, opcode);return ; }
@@ -3551,6 +3549,9 @@ int sdhci_setup_host(struct sdhci_host *host) mmc_hostname(mmc), host->version); } +if (host->quirks &SDHCI_QUIRK_BROKEN_CQE ) + mmc->caps2 &= ~MMC_CAP2_CQE ; +if (host->quirks &SDHCI_QUIRK_FORCE_DMA ) host->flags |=SDHCI_USE_SDMA ;else if (!(host->caps &SDHCI_CAN_DO_SDMA ))
drivers/mmc/host/sdhci.h +2 -0
@@ -391,6 +391,8 @@ struct sdhci_host {#define SDHCI_QUIRK_BROKEN_CARD_DETECTION (1<<15)/* Controller reports inverted write-protect state */ #define SDHCI_QUIRK_INVERTED_WRITE_PROTECT (1<<16) +/* Controller has unusable command queue engine */ +#define SDHCI_QUIRK_BROKEN_CQE (1<<17)/* Controller does not like fast PIO transfers */ #define SDHCI_QUIRK_PIO_NEEDS_DELAY (1<<18)/* Controller has to be forced to use block size of 2048 bytes */
drivers/mmc/host/tmio_mmc_core.c +1 -1
@@ -1267,7 +1267,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)return ret; } - mmc->caps |=MMC_CAP_4_BIT_DATA | pdata->capabilities; + mmc->caps |=MMC_CAP_ERASE |MMC_CAP_4_BIT_DATA | pdata->capabilities; mmc->caps2 |= pdata->capabilities2; mmc->max_segs = pdata->max_segs ? :32 ; mmc->max_blk_size =512 ;
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +3 -3
@@ -608,7 +608,7 @@ static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv,struct kvaser_cmd *cmd;int err; - cmd =kmalloc (sizeof (*cmd),GFP_ATOMIC ); + cmd =kzalloc (sizeof (*cmd),GFP_ATOMIC );if (!cmd)return -ENOMEM ;
@@ -1140,7 +1140,7 @@ static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv)struct kvaser_cmd *cmd;int rc; - cmd =kmalloc (sizeof (*cmd),GFP_KERNEL ); + cmd =kzalloc (sizeof (*cmd),GFP_KERNEL );if (!cmd)return -ENOMEM ;
@@ -1206,7 +1206,7 @@ static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv)struct kvaser_cmd *cmd;int rc; - cmd =kmalloc (sizeof (*cmd),GFP_KERNEL ); + cmd =kzalloc (sizeof (*cmd),GFP_KERNEL );if (!cmd)return -ENOMEM ;
drivers/net/dsa/Kconfig +1 -0
@@ -66,6 +66,7 @@ config NET_DSA_REALTEK_SMI config NET_DSA_SMSC_LAN9303 tristate select NET_DSA_TAG_LAN9303 + select REGMAP ---help--- This enables support for the SMSC/Microchip LAN9303 3 port ethernet switch chips.
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +11 -5
@@ -2394,15 +2394,21 @@ static int bnx2x_set_pf_tx_switching(struct bnx2x *bp, bool enable)/* send the ramrod on all the queues of the PF */ for_each_eth_queue (bp, i) {struct bnx2x_fastpath *fp = &bp->fp[i]; +int tx_idx;/* Set the appropriate Queue object */ q_params.q_obj = &bnx2x_sp_obj (bp, fp).q_obj; -/* Update the Queue state */ - rc =bnx2x_queue_state_change (bp, &q_params); -if (rc) { -BNX2X_ERR ("Failed to configure Tx switching\n" ); -return rc; +for (tx_idx =FIRST_TX_COS_INDEX ; + tx_idx < fp->max_cos; tx_idx++) { + q_params.params.update.cid_index = tx_idx; + +/* Update the Queue state */ + rc =bnx2x_queue_state_change (bp, &q_params); +if (rc) { +BNX2X_ERR ("Failed to configure Tx switching\n" ); +return rc; + } } }
drivers/net/ethernet/cortina/gemini.c +2 -0
@@ -577,6 +577,8 @@ static int gmac_setup_txqs(struct net_device *netdev)if (port->txq_dma_base & ~DMA_Q_BASE_MASK ) {dev_warn (geth->dev,"TX queue base is not aligned\n" ); +dma_free_coherent (geth->dev, len *sizeof (*desc_ring), + desc_ring, port->txq_dma_base);kfree (skb_tab);return -ENOMEM ; }
drivers/net/ethernet/hisilicon/hip04_eth.c +1 -1
@@ -456,9 +456,9 @@ hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)skb_tx_timestamp (skb);hip04_set_xmit_desc (priv, phys); - priv->tx_head =TX_NEXT (tx_head); count++;netdev_sent_queue (ndev, skb->len); + priv->tx_head =TX_NEXT (tx_head); stats->tx_bytes += skb->len; stats->tx_packets++;
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +3 -0
@@ -1474,6 +1474,9 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) time_after(jiffies, (trans_start + ndev->watchdog_timeo))) { timeout_queue = i; +netdev_info (ndev,"queue state: 0x%lx, delta msecs: %u\n" , + q->state, +jiffies_to_msecs (jiffies - trans_start));break ; } }
drivers/net/ethernet/intel/i40e/i40e_main.c +5 -5
@@ -3441,14 +3441,14 @@ static void i40e_vsi_configure_msix(struct i40e_vsi *vsi) q_vector->rx.target_itr =ITR_TO_REG (vsi->rx_rings[i]->itr_setting);wr32 (hw,I40E_PFINT_ITRN (I40E_RX_ITR , vector -1 ), - q_vector->rx.target_itr); + q_vector->rx.target_itr >>1 ); q_vector->rx.current_itr = q_vector->rx.target_itr; q_vector->tx.next_update = jiffies +1 ; q_vector->tx.target_itr =ITR_TO_REG (vsi->tx_rings[i]->itr_setting);wr32 (hw,I40E_PFINT_ITRN (I40E_TX_ITR , vector -1 ), - q_vector->tx.target_itr); + q_vector->tx.target_itr >>1 ); q_vector->tx.current_itr = q_vector->tx.target_itr; wr32(hw, I40E_PFINT_RATEN(vector - 1),
@@ -3553,11 +3553,11 @@ static void i40e_configure_msi_and_legacy(struct i40e_vsi *vsi)/* set the ITR configuration */ q_vector->rx.next_update = jiffies +1 ; q_vector->rx.target_itr =ITR_TO_REG (vsi->rx_rings[0 ]->itr_setting); -wr32 (hw,I40E_PFINT_ITR0 (I40E_RX_ITR ), q_vector->rx.target_itr); +wr32 (hw,I40E_PFINT_ITR0 (I40E_RX_ITR ), q_vector->rx.target_itr >>1 ); q_vector->rx.current_itr = q_vector->rx.target_itr; q_vector->tx.next_update = jiffies +1 ; q_vector->tx.target_itr =ITR_TO_REG (vsi->tx_rings[0 ]->itr_setting); -wr32 (hw,I40E_PFINT_ITR0 (I40E_TX_ITR ), q_vector->tx.target_itr); +wr32 (hw,I40E_PFINT_ITR0 (I40E_TX_ITR ), q_vector->tx.target_itr >>1 ); q_vector->tx.current_itr = q_vector->tx.target_itr;i40e_enable_misc_int_causes (pf);
@@ -10735,7 +10735,7 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf)/* associate no queues to the misc vector */ wr32 (hw,I40E_PFINT_LNKLST0 ,I40E_QUEUE_END_OF_LIST ); -wr32 (hw,I40E_PFINT_ITR0 (I40E_RX_ITR ),I40E_ITR_8K ); +wr32 (hw,I40E_PFINT_ITR0 (I40E_RX_ITR ),I40E_ITR_8K >>1 );i40e_flush (hw);
drivers/net/ethernet/intel/ice/ice_controlq.c +1 -1
@@ -911,7 +911,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,if (ice_sq_done (hw, cq))break ; -mdelay (1 ); +udelay (ICE_CTL_Q_SQ_CMD_USEC ); total_delay++; }while (total_delay < cq->sq_cmd_timeout);
drivers/net/ethernet/intel/ice/ice_controlq.h +3 -2
@@ -30,8 +30,9 @@ enum ice_ctl_q { ICE_CTL_Q_ADMIN, }; -/* Control Queue default settings */ -#define ICE_CTL_Q_SQ_CMD_TIMEOUT 250/* msecs */ +/* Control Queue timeout settings - max delay 250ms */ +#define ICE_CTL_Q_SQ_CMD_TIMEOUT 2500/* Count 2500 times */ +#define ICE_CTL_Q_SQ_CMD_USEC 100/* Check every 100usec */ struct ice_ctl_q_ring {void *dma_head;/* Virtual address to dma head */
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
@@ -8551,7 +8551,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,if (unlikely (skb_shinfo (skb)->tx_flags &SKBTX_HW_TSTAMP ) && adapter->ptp_clock) { -if (!test_and_set_bit_lock (__IXGBE_PTP_TX_IN_PROGRESS, +if (adapter->tstamp_config.tx_type ==HWTSTAMP_TX_ON && + !test_and_set_bit_lock (__IXGBE_PTP_TX_IN_PROGRESS, &adapter->state)) {skb_shinfo (skb)->tx_flags |=SKBTX_IN_PROGRESS ; tx_flags |=IXGBE_TX_FLAGS_TSTAMP ;
drivers/net/ethernet/qlogic/qede/qede_filter.c +1 -1
@@ -1230,7 +1230,7 @@ qede_configure_mcast_filtering(struct net_device *ndev,netif_addr_lock_bh (ndev); mc_count =netdev_mc_count (ndev); -if (mc_count <64 ) { +if (mc_count <=64 ) {netdev_for_each_mc_addr (ha, ndev) {ether_addr_copy (temp, ha->addr); temp +=ETH_ALEN ;
drivers/net/ethernet/qlogic/qede/qede_main.c +2 -2
@@ -1362,6 +1362,7 @@ static int qede_alloc_mem_rxq(struct qede_dev *edev, struct qede_rx_queue *rxq) rxq->rx_buf_seg_size =roundup_pow_of_two (size); }else { rxq->rx_buf_seg_size =PAGE_SIZE ; + edev->ndev->features &= ~NETIF_F_GRO_HW ; }/* Allocate the parallel driver ring for Rx buffers */
@@ -1406,6 +1407,7 @@ static int qede_alloc_mem_rxq(struct qede_dev *edev, struct qede_rx_queue *rxq) } } + edev->gro_disable = !(edev->ndev->features &NETIF_F_GRO_HW );if (!edev->gro_disable)qede_set_tpa_param (rxq); err:
@@ -1606,8 +1608,6 @@ static void qede_init_fp(struct qede_dev *edev)snprintf (fp->name,sizeof (fp->name),"%s-fp-%d" , edev->ndev->name, queue_id); } - - edev->gro_disable = !(edev->ndev->features &NETIF_F_GRO_HW ); }static int qede_set_real_num_queues (struct qede_dev *edev)
drivers/net/ethernet/qlogic/qla3xxx.c +4 -4
@@ -2757,6 +2757,9 @@ static int ql_alloc_large_buffers(struct ql3_adapter *qdev)int err;for (i =0 ; i < qdev->num_large_buffers; i++) { + lrg_buf_cb = &qdev->lrg_buf[i]; +memset (lrg_buf_cb,0 ,sizeof (struct ql_rcv_buf_cb )); + skb =netdev_alloc_skb (qdev->ndev, qdev->lrg_buffer_len);if (unlikely (!skb)) {
@@ -2767,11 +2770,7 @@ static int ql_alloc_large_buffers(struct ql3_adapter *qdev)ql_free_large_buffers (qdev);return -ENOMEM ; }else { - - lrg_buf_cb = &qdev->lrg_buf[i]; -memset (lrg_buf_cb,0 ,sizeof (struct ql_rcv_buf_cb )); lrg_buf_cb->index = i; - lrg_buf_cb->skb = skb;/* * We save some space to copy the ethhdr from first * buffer
@@ -2793,6 +2792,7 @@ static int ql_alloc_large_buffers(struct ql3_adapter *qdev)return -ENOMEM ; } + lrg_buf_cb->skb = skb;dma_unmap_addr_set (lrg_buf_cb, mapaddr, map); dma_unmap_len_set(lrg_buf_cb, maplen, qdev->lrg_buffer_len -
drivers/net/ethernet/ti/cpsw_ale.c +2 -0
@@ -793,6 +793,7 @@ EXPORT_SYMBOL_GPL(cpsw_ale_start);void cpsw_ale_stop (struct cpsw_ale *ale) {del_timer_sync (&ale->timer); +cpsw_ale_control_set (ale,0 ,ALE_CLEAR ,1 );cpsw_ale_control_set (ale,0 ,ALE_ENABLE ,0 ); }EXPORT_SYMBOL_GPL (cpsw_ale_stop);
@@ -877,6 +878,7 @@ struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params)ALE_UNKNOWNVLAN_FORCE_UNTAG_EGRESS ; } +cpsw_ale_control_set (ale,0 ,ALE_CLEAR ,1 );return ale; }EXPORT_SYMBOL_GPL (cpsw_ale_create);
drivers/net/fjes/fjes_main.c +3 -0
@@ -181,6 +181,9 @@ static int fjes_acpi_add(struct acpi_device *device)/* create platform_device */ plat_dev =platform_device_register_simple (DRV_NAME ,0 , fjes_resource,ARRAY_SIZE (fjes_resource)); +if (IS_ERR (plat_dev)) +return PTR_ERR (plat_dev); + device->driver_data = plat_dev;return 0 ;
drivers/net/phy/dp83867.c +10 -5
@@ -86,6 +86,10 @@#define DP83867_IO_MUX_CFG_CLK_O_SEL_MASK (0x1f << 8)#define DP83867_IO_MUX_CFG_CLK_O_SEL_SHIFT 8 +/* CFG3 bits */ +#define DP83867_CFG3_INT_OE BIT(7) +#define DP83867_CFG3_ROBUST_AUTO_MDIX BIT(9) +/* CFG4 bits */ #define DP83867_CFG4_PORT_MIRROR_EN BIT(0)
@@ -331,12 +335,13 @@ static int dp83867_config_init(struct phy_device *phydev)return ret; } + val =phy_read (phydev,DP83867_CFG3 );/* Enable Interrupt output INT_OE in CFG3 register */ -if (phy_interrupt_is_valid (phydev)) { - val =phy_read (phydev,DP83867_CFG3 ); - val |=BIT (7 ); -phy_write (phydev,DP83867_CFG3 , val); - } +if (phy_interrupt_is_valid (phydev)) + val |=DP83867_CFG3_INT_OE ; + + val |=DP83867_CFG3_ROBUST_AUTO_MDIX ; +phy_write (phydev,DP83867_CFG3 , val);if (dp83867->port_mirroring !=DP83867_PORT_MIRROING_KEEP )dp83867_config_port_mirroring (phydev);
drivers/net/phy/phy_device.c +2 -2
@@ -420,8 +420,8 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, mdiodev->device_free = phy_mdio_device_free; mdiodev->device_remove = phy_mdio_device_remove; - dev->speed =0 ; - dev->duplex =-1 ; + dev->speed =SPEED_UNKNOWN ; + dev->duplex =DUPLEX_UNKNOWN ; dev->pause =0 ; dev->asym_pause =0 ; dev->link =0 ;
drivers/net/tun.c +2 -2
@@ -319,8 +319,8 @@ static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile, tfile->napi_enabled = napi_en; tfile->napi_frags_enabled = napi_en && napi_frags;if (napi_en) { -netif_napi_add (tun->dev, &tfile->napi, tun_napi_poll, -NAPI_POLL_WEIGHT ); +netif_tx_napi_add (tun->dev, &tfile->napi, tun_napi_poll, +NAPI_POLL_WEIGHT );napi_enable (&tfile->napi); } }
drivers/net/usb/lan78xx.c +1 -0
@@ -1823,6 +1823,7 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev) dev->mdiobus->read = lan78xx_mdiobus_read; dev->mdiobus->write = lan78xx_mdiobus_write; dev->mdiobus->name ="lan78xx-mdiobus" ; + dev->mdiobus->parent = &dev->udev->dev;snprintf (dev->mdiobus->id,MII_BUS_ID_SIZE ,"usb-%03d:%03d" , dev->udev->bus->busnum, dev->udev->devnum);
drivers/net/wireless/ath/ath10k/coredump.c +8 -3
@@ -1105,9 +1105,11 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar) dump_tlv = (struct ath10k_tlv_dump_data *)(buf + sofar); dump_tlv->type =cpu_to_le32 (ATH10K_FW_CRASH_DUMP_RAM_DATA ); dump_tlv->tlv_len =cpu_to_le32 (crash_data->ramdump_buf_len); -memcpy (dump_tlv->tlv_data, crash_data->ramdump_buf, - crash_data->ramdump_buf_len); - sofar +=sizeof (*dump_tlv) + crash_data->ramdump_buf_len; +if (crash_data->ramdump_buf_len) { +memcpy (dump_tlv->tlv_data, crash_data->ramdump_buf, + crash_data->ramdump_buf_len); + sofar +=sizeof (*dump_tlv) + crash_data->ramdump_buf_len; + } }spin_unlock_bh (&ar->data_lock);
@@ -1154,6 +1156,9 @@ int ath10k_coredump_register(struct ath10k *ar)if (test_bit (ATH10K_FW_CRASH_DUMP_RAM_DATA , &ath10k_coredump_mask)) { crash_data->ramdump_buf_len =ath10k_coredump_get_ramdump_size (ar); +if (!crash_data->ramdump_buf_len) +return 0 ; + crash_data->ramdump_buf =vzalloc (crash_data->ramdump_buf_len);if (!crash_data->ramdump_buf)return -ENOMEM ;
drivers/net/wireless/ath/ath10k/mac.c +14 -12
@@ -3651,7 +3651,7 @@ static int ath10k_mac_tx(struct ath10k *ar,struct ieee80211_vif *vif, enum ath10k_hw_txrx_mode txmode, enum ath10k_mac_tx_path txpath, - struct sk_buff *skb) + struct sk_buff *skb, bool noque_offchan) { struct ieee80211_hw *hw = ar->hw;struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);
@@ -3679,10 +3679,10 @@ static int ath10k_mac_tx(struct ath10k *ar, } } -if (info->flags &IEEE80211_TX_CTL_TX_OFFCHAN ) { +if (!noque_offchan && info->flags &IEEE80211_TX_CTL_TX_OFFCHAN ) {if (!ath10k_mac_tx_frm_has_freq (ar)) { -ath10k_dbg (ar,ATH10K_DBG_MAC ,"queued offchannel skb %pK\n" , - skb); +ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac queued offchannel skb %pK len %d\n" , + skb, skb->len);skb_queue_tail (&ar->offchan_tx_queue, skb);ieee80211_queue_work (hw, &ar->offchan_tx_work);
@@ -3744,8 +3744,8 @@ void ath10k_offchan_tx_work(struct work_struct *work)mutex_lock (&ar->conf_mutex); -ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac offchannel skb %pK\n" , - skb); +ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac offchannel skb %pK len %d\n" , + skb, skb->len); hdr = (struct ieee80211_hdr *)skb->data; peer_addr =ieee80211_get_DA (hdr);
@@ -3791,7 +3791,7 @@ void ath10k_offchan_tx_work(struct work_struct *work) txmode =ath10k_mac_tx_h_get_txmode (ar, vif, sta, skb); txpath =ath10k_mac_tx_h_get_txpath (ar, skb, txmode); - ret =ath10k_mac_tx (ar, vif, txmode, txpath, skb); + ret =ath10k_mac_tx (ar, vif, txmode, txpath, skb, true);if (ret) {ath10k_warn (ar,"failed to transmit offchannel frame: %d\n" , ret);
@@ -3801,8 +3801,8 @@ void ath10k_offchan_tx_work(struct work_struct *work) time_left =wait_for_completion_timeout (&ar->offchan_tx_completed,3 *HZ );if (time_left ==0 ) -ath10k_warn (ar,"timed out waiting for offchannel skb %pK\n" , - skb); +ath10k_warn (ar,"timed out waiting for offchannel skb %pK, len: %d\n" , + skb, skb->len);if (!peer && tmp_peer_created) { ret =ath10k_peer_delete (ar, vdev_id, peer_addr);
@@ -3844,8 +3844,10 @@ void ath10k_mgmt_over_wmi_tx_work(struct work_struct *work) ar->running_fw->fw_file.fw_features)) { paddr =dma_map_single (ar->dev, skb->data, skb->len,DMA_TO_DEVICE ); -if (!paddr) +if (dma_mapping_error (ar->dev, paddr)) { +ieee80211_free_txskb (ar->hw, skb);continue ; + } ret =ath10k_wmi_mgmt_tx_send (ar, skb, paddr);if (ret) { ath10k_warn(ar, "failed to transmit management frame by ref via WMI: %d\n",
@@ -3998,7 +4000,7 @@ int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw,spin_unlock_bh (&ar->htt.tx_lock); } - ret =ath10k_mac_tx (ar, vif, txmode, txpath, skb); + ret =ath10k_mac_tx (ar, vif, txmode, txpath, skb, false);if (unlikely (ret)) {ath10k_warn (ar,"failed to push frame: %d\n" , ret);
@@ -4280,7 +4282,7 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,spin_unlock_bh (&ar->htt.tx_lock); } - ret =ath10k_mac_tx (ar, vif, txmode, txpath, skb); + ret =ath10k_mac_tx (ar, vif, txmode, txpath, skb, false);if (ret) {ath10k_warn (ar,"failed to transmit frame: %d\n" , ret);if (is_htt) {
drivers/net/wireless/ath/ath10k/txrx.c +2 -0
@@ -101,6 +101,8 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, info =IEEE80211_SKB_CB (msdu);memset (&info->status,0 ,sizeof (info->status)); + info->status.rates[0 ].idx =-1 ; +trace_ath10k_txrx_tx_unref (ar, tx_done->msdu_id);if (!(info->flags &IEEE80211_TX_CTL_NO_ACK ))
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +5 -0
@@ -1246,6 +1246,11 @@ void brcmf_detach(struct device *dev)brcmf_proto_detach_pre_delif (drvr); +if (drvr->mon_if) { +brcmf_net_detach (drvr->mon_if->ndev, false); + drvr->mon_if =NULL ; + } +/* make sure primary interface removed last */ for (i =BRCMF_MAX_IFS -1 ; i >-1 ; i--)brcmf_remove_interface (drvr->iflist[i], false);
drivers/net/wireless/intel/iwlwifi/dvm/led.c +3 -0
@@ -185,6 +185,9 @@ void iwl_leds_init(struct iwl_priv *priv) priv->led.name =kasprintf (GFP_KERNEL ,"%s-led" ,wiphy_name (priv->hw->wiphy)); +if (!priv->led.name) +return ; + priv->led.brightness_set = iwl_led_brightness_set; priv->led.blink_set = iwl_led_blink_set; priv->led.max_brightness =1 ;
drivers/net/wireless/intel/iwlwifi/mvm/led.c +3 -0
@@ -131,6 +131,9 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm) mvm->led.name =kasprintf (GFP_KERNEL ,"%s-led" ,wiphy_name (mvm->hw->wiphy)); +if (!mvm->led.name) +return -ENOMEM ; + mvm->led.brightness_set = iwl_led_brightness_set; mvm->led.max_brightness =1 ;
drivers/net/wireless/intel/iwlwifi/mvm/rx.c +2 -1
@@ -62,6 +62,7 @@* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ +#include <asm/unaligned.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> #include "iwl-trans.h"
@@ -360,7 +361,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, rx_res = (struct iwl_rx_mpdu_res_start *)pkt->data; hdr = (struct ieee80211_hdr *)(pkt->data +sizeof (*rx_res)); len =le16_to_cpu (rx_res->byte_count); - rx_pkt_status =le32_to_cpup ((__le32 *) + rx_pkt_status =get_unaligned_le32 ((__le32 *) (pkt->data +sizeof (*rx_res) + len));/* Dont use dev_alloc_skb(), we'll have enough headroom once
drivers/net/wireless/marvell/libertas/if_sdio.c +5 -0
@@ -1183,6 +1183,10 @@ static int if_sdio_probe(struct sdio_func *func,spin_lock_init (&card->lock); card->workqueue =alloc_workqueue ("libertas_sdio" ,WQ_MEM_RECLAIM ,0 ); +if (unlikely (!card->workqueue)) { + ret = -ENOMEM ; + goto err_queue; + }INIT_WORK (&card->packet_worker, if_sdio_host_to_card_worker);init_waitqueue_head (&card->pwron_waitq);
@@ -1234,6 +1238,7 @@ static int if_sdio_probe(struct sdio_func *func,lbs_remove_card (priv); free:destroy_workqueue (card->workqueue); +err_queue:while (card->packets) { packet = card->packets; card->packets = card->packets->next;
drivers/net/wireless/marvell/mwifiex/pcie.c +4 -1
@@ -691,8 +691,11 @@ static int mwifiex_pcie_init_evt_ring(struct mwifiex_adapter *adapter)skb_put (skb,MAX_EVENT_SIZE );if (mwifiex_map_pci_memory (adapter, skb,MAX_EVENT_SIZE , -PCI_DMA_FROMDEVICE )) +PCI_DMA_FROMDEVICE )) { +kfree_skb (skb); +kfree (card->evtbd_ring_vbase);return -1 ; + } buf_pa =MWIFIEX_SKB_DMA_ADDR (skb);
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +1 -0
@@ -1349,6 +1349,7 @@ struct rtl8xxxu_fileops { u8 has_s0s1:1; u8 has_tx_report:1; u8 gen2_thermal_meter:1; + u8 needs_full_init:1;u32 adda_1t_init;u32 adda_1t_path_on;u32 adda_2t_path_on_a;
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c +1 -0
@@ -1673,6 +1673,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops = { .has_s0s1 = 1, .has_tx_report = 1, .gen2_thermal_meter = 1, + .needs_full_init = 1, .adda_1t_init = 0x01c00014, .adda_1t_path_on = 0x01c00014, .adda_2t_path_on_a = 0x01c00014,
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +3 -0
@@ -3905,6 +3905,9 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)else macpower = true; +if (fops->needs_full_init) + macpower = false; + ret = fops->power_on (priv);if (ret <0 ) {dev_warn (dev,"%s: Failed power on\n" , __func__);
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c +2 -0
@@ -1556,6 +1556,8 @@ static bool usb_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb)* This is maybe necessary: * rtlpriv->cfg->ops->fill_tx_cmddesc(hw, buffer, 1, 1, skb); */ +dev_kfree_skb (skb); +return true; }
drivers/net/wireless/realtek/rtlwifi/usb.c +4 -1
@@ -1050,8 +1050,10 @@ int rtl_usb_probe(struct usb_interface *intf, rtlpriv->hw = hw; rtlpriv->usb_data =kcalloc (RTL_USB_MAX_RX_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!rtlpriv->usb_data) +if (!rtlpriv->usb_data) { +ieee80211_free_hw (hw);return -ENOMEM ; + }/* this spin lock must be initialized early */ spin_lock_init (&rtlpriv->locks.usb_lock);
@@ -1112,6 +1114,7 @@ int rtl_usb_probe(struct usb_interface *intf,_rtl_usb_io_handler_release (hw);usb_put_dev (udev);complete (&rtlpriv->firmware_loading_complete); +kfree (rtlpriv->usb_data);return -ENODEV ; }EXPORT_SYMBOL (rtl_usb_probe);
drivers/nvme/host/core.c +9 -3
@@ -551,8 +551,14 @@ static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req,struct nvme_dsm_range *range;struct bio *bio; - range =kmalloc_array (segments,sizeof (*range), -GFP_ATOMIC | __GFP_NOWARN); +/* +* Some devices do not consider the DSM 'Number of Ranges' field when +* determining how much data to DMA. Always allocate memory for maximum +* number of segments to prevent device reading beyond end of buffer. +*/ +static const size_t alloc_size =sizeof (*range) *NVME_DSM_MAX_RANGES ; + + range =kzalloc (alloc_size,GFP_ATOMIC | __GFP_NOWARN);if (!range) {/* * If we fail allocation our range, fallback to the controller
@@ -593,7 +599,7 @@ static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req, req->special_vec.bv_page =virt_to_page (range); req->special_vec.bv_offset =offset_in_page (range); - req->special_vec.bv_len =sizeof (*range) * segments; + req->special_vec.bv_len = alloc_size; req->rq_flags |=RQF_SPECIAL_PAYLOAD ;return BLK_STS_OK ;
drivers/nvmem/imx-ocotp.c +4 -0
@@ -466,6 +466,10 @@ static int imx_ocotp_probe(struct platform_device *pdev)if (IS_ERR (priv->clk))return PTR_ERR (priv->clk); +clk_prepare_enable (priv->clk); +imx_ocotp_clr_err_if_set (priv->base); +clk_disable_unprepare (priv->clk); + priv->params =of_device_get_match_data (&pdev->dev); imx_ocotp_nvmem_config.size =4 * priv->params->nregs; imx_ocotp_nvmem_config.dev = dev;
drivers/parport/share.c +21 -0
@@ -230,6 +230,18 @@ static int port_check(struct device *dev, void *dev_drv)return 0 ; } +/* +* Iterates through all the devices connected to the bus and return 1 +* if the device is a parallel port. +*/ + +static int port_detect (struct device *dev,void *dev_drv) +{ +if (is_parport (dev)) +return 1 ; +return 0 ; +} +/** * parport_register_driver - register a parallel port device driver * @drv: structure describing the driver
@@ -282,6 +294,15 @@ int __parport_register_driver(struct parport_driver *drv, struct module *owner,if (ret)return ret; +/* +* check if bus has any parallel port registered, if +* none is found then load the lowlevel driver. +*/ + ret =bus_for_each_dev (&parport_bus_type,NULL ,NULL , + port_detect); +if (!ret) +get_lowlevel_driver (); +mutex_lock (®istration_lock);if (drv->match_port) bus_for_each_dev(&parport_bus_type, NULL, drv,
drivers/phy/qualcomm/phy-qcom-usb-hs.c +5 -2
@@ -160,8 +160,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy)/* setup initial state */ qcom_usb_hs_phy_vbus_notifier (&uphy->vbus_notify, state, uphy->vbus_edev); - ret =devm_extcon_register_notifier (&ulpi->dev, uphy->vbus_edev, -EXTCON_USB , &uphy->vbus_notify); + ret =extcon_register_notifier (uphy->vbus_edev,EXTCON_USB , + &uphy->vbus_notify);if (ret) goto err_ulpi; }
@@ -182,6 +182,9 @@ static int qcom_usb_hs_phy_power_off(struct phy *phy) {struct qcom_usb_hs_phy *uphy =phy_get_drvdata (phy); +if (uphy->vbus_edev) +extcon_unregister_notifier (uphy->vbus_edev,EXTCON_USB , + &uphy->vbus_notify);regulator_disable (uphy->v3p3);regulator_disable (uphy->v1p8);clk_disable_unprepare (uphy->sleep_clk);
drivers/pinctrl/devicetree.c +20 -5
@@ -40,6 +40,13 @@ struct pinctrl_dt_map {static void dt_free_map (struct pinctrl_dev *pctldev,struct pinctrl_map *map,unsigned num_maps) { +int i; + +for (i =0 ; i < num_maps; ++i) { +kfree_const (map[i].dev_name); + map[i].dev_name =NULL ; + } +if (pctldev) {const struct pinctrl_ops *ops = pctldev->desc->pctlops;if (ops->dt_free_map)
@@ -74,7 +81,13 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,/* Initialize common mapping table entry fields */ for (i =0 ; i < num_maps; i++) { - map[i].dev_name =dev_name (p->dev); +const char *devname; + + devname =kstrdup_const (dev_name (p->dev),GFP_KERNEL ); +if (!devname) + goto err_free_map; + + map[i].dev_name = devname; map[i].name = statename;if (pctldev) map[i].ctrl_dev_name =dev_name (pctldev->dev);
@@ -82,10 +95,8 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,/* Remember the converted mapping table entries */ dt_map =kzalloc (sizeof (*dt_map),GFP_KERNEL ); -if (!dt_map) { -dt_free_map (pctldev, map, num_maps); -return -ENOMEM ; - } +if (!dt_map) + goto err_free_map; dt_map->pctldev = pctldev; dt_map->map = map;
@@ -93,6 +104,10 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,list_add_tail (&dt_map->node, &p->dt_maps);return pinctrl_register_map (map, num_maps, false); + +err_free_map: +dt_free_map (pctldev, map, num_maps); +return -ENOMEM ; }struct pinctrl_dev *of_pinctrl_get (struct device_node *np)
drivers/pinctrl/pinctrl-amd.c +2 -1
@@ -544,7 +544,8 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)irqreturn_t ret =IRQ_NONE ;unsigned int i, irqnr;unsigned long flags; -u32 *regs, regval; +u32 __iomem *regs; +u32 regval;u64 status, mask;/* Read the wake status */
drivers/pinctrl/sh-pfc/pfc-sh7734.c +2 -2
@@ -1453,7 +1453,7 @@ static const struct pinmux_func pinmux_func_gpios[] = {GPIO_FN (ET0_ETXD2_A ),GPIO_FN (EX_CS5 ),GPIO_FN (SD1_CMD_A ),GPIO_FN (ATADIR ),GPIO_FN (QSSL_B ),GPIO_FN (ET0_ETXD3_A ), -GPIO_FN (RD_WR ),GPIO_FN (TCLK1_B ), +GPIO_FN (RD_WR ),GPIO_FN (TCLK0 ),GPIO_FN (CAN_CLK_B ),GPIO_FN (ET0_ETXD4 ),GPIO_FN (EX_WAIT0 ),GPIO_FN (TCLK1_B ),GPIO_FN (EX_WAIT1 ),GPIO_FN (SD1_DAT0_A ),GPIO_FN (DREQ2 ), GPIO_FN(CAN1_TX_C), GPIO_FN(ET0_LINK_C), GPIO_FN(ET0_ETXD5_A),
@@ -1949,7 +1949,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {/* IP3_20 [1] */ FN_EX_WAIT0 ,FN_TCLK1_B ,/* IP3_19_18 [2] */ -FN_RD_WR ,FN_TCLK1_B ,0 ,0 , +FN_RD_WR ,FN_TCLK0 ,FN_CAN_CLK_B ,FN_ET0_ETXD4 ,/* IP3_17_15 [3] */ FN_EX_CS5 ,FN_SD1_CMD_A ,FN_ATADIR ,FN_QSSL_B , FN_ET0_ETXD3_A, 0, 0, 0,
drivers/platform/x86/hp-wmi.c +1 -1
@@ -313,7 +313,7 @@ static int __init hp_wmi_bios_2008_later(void)static int __init hp_wmi_bios_2009_later (void ) { -int state =0 ; +u8 state[128 ];int ret =hp_wmi_perform_query (HPWMI_FEATURE2_QUERY ,HPWMI_READ , &state,sizeof (state),sizeof (state));if (!ret)
drivers/regulator/max8907-regulator.c +12 -3
@@ -299,7 +299,10 @@ static int max8907_regulator_probe(struct platform_device *pdev)memcpy (pmic->desc, max8907_regulators,sizeof (pmic->desc));/* Backwards compatibility with MAX8907B; SD1 uses different voltages */ -regmap_read (max8907->regmap_gen,MAX8907_REG_II2RR , &val); + ret =regmap_read (max8907->regmap_gen,MAX8907_REG_II2RR , &val); +if (ret) +return ret; +if ((val &MAX8907_II2RR_VERSION_MASK ) ==MAX8907_II2RR_VERSION_REV_B ) { pmic->desc[MAX8907_SD1 ].min_uV =637500 ;
@@ -336,14 +339,20 @@ static int max8907_regulator_probe(struct platform_device *pdev) }if (pmic->desc[i].ops == &max8907_ldo_ops) { -regmap_read (config.regmap, pmic->desc[i].enable_reg, + ret =regmap_read (config.regmap, pmic->desc[i].enable_reg, &val); +if (ret) +return ret; +if ((val &MAX8907_MASK_LDO_SEQ ) !=MAX8907_MASK_LDO_SEQ ) pmic->desc[i].ops = &max8907_ldo_hwctl_ops; }else if (pmic->desc[i].ops == &max8907_out5v_ops) { -regmap_read (config.regmap, pmic->desc[i].enable_reg, + ret =regmap_read (config.regmap, pmic->desc[i].enable_reg, &val); +if (ret) +return ret; +if ((val & (MAX8907_MASK_OUT5V_VINEN |MAX8907_MASK_OUT5V_ENSRC )) !=MAX8907_MASK_OUT5V_ENSRC )
drivers/soundwire/intel.c +8 -2
@@ -352,7 +352,10 @@ intel_pdi_shim_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)unsigned int link_id = sdw->instance;int pdi_conf =0 ; - pdi->intel_alh_id = (link_id *16 ) + pdi->num +5 ; +/* the Bulk and PCM streams are not contiguous */ + pdi->intel_alh_id = (link_id *16 ) + pdi->num +3 ; +if (pdi->num >=2 ) + pdi->intel_alh_id +=2 ;/* * Program stream parameters to stream SHIM register
@@ -381,7 +384,10 @@ intel_pdi_alh_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)unsigned int link_id = sdw->instance;unsigned int conf; - pdi->intel_alh_id = (link_id *16 ) + pdi->num +5 ; +/* the Bulk and PCM streams are not contiguous */ + pdi->intel_alh_id = (link_id *16 ) + pdi->num +3 ; +if (pdi->num >=2 ) + pdi->intel_alh_id +=2 ;/* Program Stream config ALH register */ conf =intel_readl (alh,SDW_ALH_STRMZCFG (pdi->intel_alh_id));
drivers/spi/spi-img-spfi.c +2 -0
@@ -676,6 +676,8 @@ static int img_spfi_probe(struct platform_device *pdev)dma_release_channel (spfi->tx_ch);if (spfi->rx_ch)dma_release_channel (spfi->rx_ch); + spfi->tx_ch =NULL ; + spfi->rx_ch =NULL ;dev_warn (spfi->dev,"Failed to get DMA channels, falling back to PIO mode\n" ); }else { master->dma_tx = spfi->tx_ch;
drivers/spi/spi-pxa2xx.c +6 -0
@@ -1470,7 +1470,13 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) } ssp->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (ssp->clk)) +return NULL ; + ssp->irq =platform_get_irq (pdev,0 ); +if (ssp->irq <0 ) +return NULL ; + ssp->type = type; ssp->pdev = pdev; ssp->port_id =pxa2xx_spi_get_port_id (adev);
drivers/spi/spi-sprd-adi.c +3 -0
@@ -367,6 +367,9 @@ static int sprd_adi_restart_handler(struct notifier_block *this, val |=BIT_WDG_RUN |BIT_WDG_RST ;sprd_adi_write (sadi, sadi->slave_pbase +REG_WDG_CTRL , val); +/* Lock the watchdog */ +sprd_adi_write (sadi, sadi->slave_pbase +REG_WDG_LOCK , ~WDG_UNLOCK_KEY ); +mdelay (1000 );dev_emerg (sadi->dev,"Unable to restart system\n" );
drivers/spi/spi-st-ssc4.c +3 -0
@@ -385,6 +385,7 @@ static int spi_st_probe(struct platform_device *pdev)return 0 ; clk_disable: +pm_runtime_disable (&pdev->dev);clk_disable_unprepare (spi_st->clk); put_master:spi_master_put (master);
@@ -396,6 +397,8 @@ static int spi_st_remove(struct platform_device *pdev)struct spi_master *master =platform_get_drvdata (pdev);struct spi_st *spi_st =spi_master_get_devdata (master); +pm_runtime_disable (&pdev->dev); +clk_disable_unprepare (spi_st->clk);pinctrl_pm_select_sleep_state (&pdev->dev);
drivers/spi/spi-tegra20-slink.c +4 -1
@@ -1078,7 +1078,7 @@ static int tegra_slink_probe(struct platform_device *pdev) ret =clk_enable (tspi->clk);if (ret <0 ) {dev_err (&pdev->dev,"Clock enable failed %d\n" , ret); - goto exit_free_master; + goto exit_clk_unprepare; } spi_irq =platform_get_irq (pdev,0 );
@@ -1151,6 +1151,8 @@ static int tegra_slink_probe(struct platform_device *pdev)free_irq (spi_irq, tspi); exit_clk_disable:clk_disable (tspi->clk); +exit_clk_unprepare: +clk_unprepare (tspi->clk); exit_free_master:spi_master_put (master);return ret;
@@ -1164,6 +1166,7 @@ static int tegra_slink_remove(struct platform_device *pdev)free_irq (tspi->irq, tspi);clk_disable (tspi->clk); +clk_unprepare (tspi->clk);if (tspi->tx_dma_chan)tegra_slink_deinit_dma_param (tspi, false);
drivers/spi/spidev.c +3 -0
@@ -634,6 +634,9 @@ static int spidev_release(struct inode *inode, struct file *filp)if (dofree)kfree (spidev); } +#ifdef CONFIG_SPI_SLAVE +spi_slave_abort (spidev->spi); +#endif mutex_unlock (&device_list_lock);return 0 ;
drivers/staging/comedi/drivers/gsc_hpdi.c +10 -0
@@ -623,6 +623,11 @@ static int gsc_hpdi_auto_attach(struct comedi_device *dev,dma_alloc_coherent (&pcidev->dev,DMA_BUFFER_SIZE , &devpriv->dio_buffer_phys_addr[i],GFP_KERNEL ); +if (!devpriv->dio_buffer[i]) { +dev_warn (dev->class_dev, +"failed to allocate DMA buffer\n" ); +return -ENOMEM ; + } }/* allocate dma descriptors */ devpriv->dma_desc = dma_alloc_coherent(&pcidev->dev,
@@ -630,6 +635,11 @@ static int gsc_hpdi_auto_attach(struct comedi_device *dev,NUM_DMA_DESCRIPTORS , &devpriv->dma_desc_phys_addr, GFP_KERNEL); +if (!devpriv->dma_desc) { +dev_warn (dev->class_dev, +"failed to allocate DMA descriptors\n" ); +return -ENOMEM ; + }if (devpriv->dma_desc_phys_addr &0xf ) {dev_warn (dev->class_dev," dma descriptors not quad-word aligned (bug)\n" );
drivers/staging/fbtft/fbtft-core.c +1 -1
@@ -771,7 +771,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, fbdefio->deferred_io = fbtft_deferred_io;fb_deferred_io_init (info); -strncpy (info->fix.id, dev->driver->name,16 ); +snprintf (info->fix.id,sizeof (info->fix.id),"%s" , dev->driver->name); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_TRUECOLOR ; info->fix.xpanstep =0 ;
drivers/staging/rtl8188eu/core/rtw_xmit.c +2 -2
@@ -778,7 +778,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrmemcpy (pwlanhdr->addr2,get_bssid (pmlmepriv),ETH_ALEN );memcpy (pwlanhdr->addr3, pattrib->src,ETH_ALEN ); -if (psta->qos_option) +if (psta && psta->qos_option) qos_option = true; }else if (check_fwstate (pmlmepriv,WIFI_ADHOC_STATE ) ||check_fwstate (pmlmepriv,WIFI_ADHOC_MASTER_STATE )) {
@@ -786,7 +786,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrmemcpy (pwlanhdr->addr2, pattrib->src,ETH_ALEN );memcpy (pwlanhdr->addr3,get_bssid (pmlmepriv),ETH_ALEN ); -if (psta->qos_option) +if (psta && psta->qos_option) qos_option = true; }else {RT_TRACE (_module_rtl871x_xmit_c_, _drv_err_, ("fw_state:%x is not allowed to xmit frame\n" ,get_fwstate (pmlmepriv)));
drivers/staging/rtl8192u/r8192U_core.c +12 -5
@@ -1467,7 +1467,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) (struct tx_fwinfo_819x_usb *)(skb->data +USB_HWDESC_HEADER_LEN );struct usb_device *udev = priv->udev;int pend; -int status; +int status, rt =-1 ;struct urb *tx_urb =NULL , *tx_urb_zero =NULL ;unsigned int idx_pipe;
@@ -1611,8 +1611,10 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) }if (bSend0Byte) { tx_urb_zero =usb_alloc_urb (0 ,GFP_ATOMIC ); -if (!tx_urb_zero) -return -ENOMEM ; +if (!tx_urb_zero) { + rt = -ENOMEM ; + goto error; + }usb_fill_bulk_urb (tx_urb_zero, udev,usb_sndbulkpipe (udev, idx_pipe), &zero,0 , tx_zero_isr, dev);
@@ -1622,7 +1624,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)"Error TX URB for zero byte %d, error %d" ,atomic_read (&priv->tx_pending[tcb_desc->queue_index]), status); -return -1 ; + goto error; }
Lines of this file are not shown. View the raw message.
fs/btrfs/async-thread.c +44 -12
56 lines not on this page · raw message
fs/btrfs/tree-log.c +47 -5
52 lines not on this page · raw message
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +3 -0
Lines of this file are not shown. View the raw message.
tools/objtool/arch/x86/lib/x86-opcode-map.txt +12 -6
Lines of this file are not shown. View the raw message.
tools/perf/util/dwarf-aux.c +66 -14
80 lines not on this page · raw message
tools/perf/util/probe-finder.c +40 -5
45 lines not on this page · raw message
tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c +0 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/cgroup_helpers.c +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/forwarding/router_bridge_vlan.sh +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.