Linux 5.4.54
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.54 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 4 arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 19 +- arch/arm/boot/dts/omap3-n900.dts | 12 + arch/arm64/kernel/debug-monitors.c | 4 arch/mips/pci/pci-xtalk-bridge.c | 5 arch/parisc/include/asm/atomic.h | 2 arch/riscv/include/asm/barrier.h | 10 + arch/x86/kernel/apic/io_apic.c | 10 - arch/x86/kernel/apic/msi.c | 18 +- arch/x86/kernel/apic/vector.c | 1 arch/x86/kernel/vmlinux.lds.S | 1 arch/x86/math-emu/wm_sqrt.S | 2 arch/x86/platform/uv/uv_irq.c | 3 arch/xtensa/kernel/setup.c | 3 arch/xtensa/kernel/xtensa_ksyms.c | 4 drivers/android/binder_alloc.c | 2 drivers/base/regmap/regmap.c | 2 drivers/char/mem.c | 10 - drivers/dma-buf/dma-buf.c | 11 - drivers/dma/fsl-edma-common.c | 26 +-- drivers/dma/ioat/dma.c | 12 + drivers/dma/ioat/dma.h | 2 drivers/dma/tegra210-adma.c | 5 drivers/firmware/psci/psci_checker.c | 5 drivers/fpga/dfl-afu-main.c | 3 drivers/fpga/dfl-pci.c | 3 drivers/gpio/gpio-arizona.c | 7 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 20 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 9 - drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 10 - drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c | 4 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 4 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 drivers/hid/hid-alps.c | 2 drivers/hid/hid-apple.c | 18 ++ drivers/hid/hid-steam.c | 6 drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 8 + drivers/hwmon/aspeed-pwm-tacho.c | 2 drivers/hwmon/nct6775.c | 6 drivers/hwmon/pmbus/adm1275.c | 10 + drivers/hwmon/scmi-hwmon.c | 2 drivers/i2c/busses/i2c-qcom-geni.c | 6 drivers/i2c/busses/i2c-rcar.c | 3 drivers/infiniband/hw/mlx5/srq_cmd.c | 4 drivers/input/mouse/elan_i2c_core.c | 9 - drivers/input/mouse/synaptics.c | 1 drivers/iommu/amd_iommu.c | 5 drivers/iommu/hyperv-iommu.c | 5 drivers/iommu/intel_irq_remapping.c | 2 drivers/md/dm-integrity.c | 4 drivers/md/dm.c | 22 ++- drivers/mmc/host/sdhci-of-aspeed.c | 2 drivers/net/bonding/bond_main.c | 10 - drivers/net/bonding/bond_netlink.c | 3 drivers/net/dsa/microchip/ksz9477.c | 42 +++-- drivers/net/dsa/microchip/ksz_common.c | 2 drivers/net/dsa/microchip/ksz_common.h | 2 drivers/net/ethernet/atheros/ag71xx.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 5 drivers/net/ethernet/freescale/enetc/enetc_pf.c | 1 drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 + drivers/net/ethernet/marvell/sky2.c | 2 drivers/net/ethernet/mellanox/mlxsw/core.c | 3 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 7 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 17 -- drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 5 drivers/net/ethernet/qlogic/qed/qed_cxt.c | 4 drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 drivers/net/ethernet/qlogic/qed/qed_int.c | 50 ++++--- drivers/net/ethernet/qlogic/qed/qed_int.h | 4 drivers/net/ethernet/smsc/smc91x.c | 4 drivers/net/ethernet/socionext/sni_ave.c | 2 drivers/net/geneve.c | 2 drivers/net/hippi/rrunner.c | 2 drivers/net/ieee802154/adf7242.c | 4 drivers/net/netdevsim/netdev.c | 4 drivers/net/phy/dp83640.c | 4 drivers/net/usb/ax88172a.c | 1 drivers/net/wan/lapbether.c | 9 + drivers/net/wireless/ath/ath9k/hif_usb.c | 52 +++++-- drivers/net/wireless/ath/ath9k/hif_usb.h | 5 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 - drivers/pci/controller/vmd.c | 5 drivers/pci/pci.c | 30 +--- drivers/perf/arm-cci.c | 1 drivers/perf/arm-ccn.c | 1 drivers/perf/arm_dsu_pmu.c | 1 drivers/perf/arm_smmuv3_pmu.c | 2 drivers/perf/arm_spe_pmu.c | 1 drivers/perf/fsl_imx8_ddr_perf.c | 2 drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 2 drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 2 drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 2 drivers/perf/qcom_l2_pmu.c | 1 drivers/perf/qcom_l3_pmu.c | 1 drivers/perf/thunderx2_pmu.c | 1 drivers/perf/xgene_pmu.c | 1 drivers/pinctrl/pinctrl-amd.h | 2 drivers/platform/x86/asus-wmi.c | 1 drivers/platform/x86/intel_speed_select_if/isst_if_common.h | 3 drivers/platform/x86/intel_speed_select_if/isst_if_mbox_pci.c | 1 drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c | 1 drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12 - drivers/scsi/scsi_devinfo.c | 1 drivers/scsi/scsi_dh.c | 1 drivers/scsi/scsi_transport_spi.c | 2 drivers/soc/qcom/rpmh.c | 8 - drivers/spi/spi-mt65xx.c | 15 +- drivers/staging/comedi/drivers/addi_apci_1032.c | 20 +- drivers/staging/comedi/drivers/addi_apci_1500.c | 24 ++- drivers/staging/comedi/drivers/addi_apci_1564.c | 20 +- drivers/staging/comedi/drivers/ni_6527.c | 2 drivers/staging/wlan-ng/prism2usb.c | 16 ++ drivers/tty/serial/8250/8250_core.c | 2 drivers/tty/serial/8250/8250_exar.c | 12 + drivers/tty/serial/8250/8250_mtk.c | 18 ++ drivers/tty/serial/serial-tegra.c | 7 drivers/tty/serial/xilinx_uartps.c | 8 - drivers/tty/vt/vt.c | 29 ++-- drivers/usb/cdns3/ep0.c | 30 ++-- drivers/usb/cdns3/trace.h | 6 drivers/usb/dwc3/dwc3-pci.c | 8 + drivers/usb/gadget/udc/gr_udc.c | 7 drivers/usb/host/xhci-mtk-sch.c | 4 drivers/usb/host/xhci-pci.c | 3 drivers/video/fbdev/core/bitblit.c | 4 drivers/video/fbdev/core/fbcon_ccw.c | 4 drivers/video/fbdev/core/fbcon_cw.c | 4 drivers/video/fbdev/core/fbcon_ud.c | 4 fs/btrfs/backref.c | 1 fs/btrfs/extent_io.c | 3 fs/btrfs/relocation.c | 11 + fs/btrfs/volumes.c | 8 + fs/cifs/inode.c | 10 - fs/fuse/dev.c | 3 fs/nfs/direct.c | 13 - fs/nfs/file.c | 1 fs/nfsd/nfs4state.c | 20 ++ include/asm-generic/mmiowb.h | 6 include/asm-generic/vmlinux.lds.h | 5 include/linux/device-mapper.h | 1 include/linux/dma-buf.h | 1 include/linux/io-mapping.h | 5 include/linux/mod_devicetable.h | 2 include/sound/rt5670.h | 1 include/uapi/linux/input-event-codes.h | 3 kernel/events/uprobes.c | 2 mm/khugepaged.c | 3 mm/memcontrol.c | 4 mm/mmap.c | 16 +- mm/slab_common.c | 35 +++- net/mac80211/rx.c | 26 +++ net/netfilter/ipvs/ip_vs_sync.c | 12 + net/vmw_vsock/virtio_transport.c | 2 scripts/decode_stacktrace.sh | 4 scripts/gdb/linux/symbols.py | 2 sound/core/info.c | 4 sound/pci/hda/patch_hdmi.c | 36 +++-- sound/pci/hda/patch_realtek.c | 2 sound/soc/codecs/rt5670.c | 71 +++++++--- sound/soc/codecs/rt5670.h | 2 sound/soc/intel/boards/bytcht_es8316.c | 4 sound/soc/qcom/Kconfig | 2 sound/soc/soc-topology.c | 24 ++- 168 files changed, 919 insertions(+), 406 deletions(-)
Alexander Lobakin (2):
qed: suppress "don't support RoCE & iWARP" flooding on HW init
qed: suppress false-positives interrupt error messages on HW init
Angelo Dureghello (1):
dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu
Arnd Bergmann (1):
x86: math-emu: Fix up 'cmp' insn for clang ias
Ben Skeggs (1):
drm/nouveau/i2c/g94-: increase NV_PMGR_DP_AUXCTL_TRANSACTREQ timeout
Bjorn Helgaas (1):
Revert "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"
Boris Burkov (1):
btrfs: fix mount failure caused by race with umount
Caiyuan Xie (1):
HID: alps: support devices with report id 2
Charan Teja Kalla (1):
dmabuf: use spinlock to access dmabuf->name
Chen-Yu Tsai (1):
drm: sun4i: hdmi: Fix inverted HPD result
Christoph Hellwig (1):
dm: use bio_uninit instead of bio_disassociate_blkg
Christophe JAILLET (1):
hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
Chu Lin (1):
hwmon: (adm1275) Make sure we are reading enough data for different chips
Chunfeng Yun (1):
usb: xhci-mtk: fix the failure of bandwidth allocation
Claudiu Manoil (1):
enetc: Remove the mdio bus on PF probe bailout
Cong Wang (2):
bonding: check return value of register_netdevice() in bond_newlink()
geneve: fix an uninitialized value in geneve_changelink()
Cristian Marussi (1):
hwmon: (scmi) Fix potential buffer overflow in scmi_hwmon_probe()
Damien Le Moal (1):
scsi: mpt3sas: Fix unlock imbalance
Derek Basehore (1):
Input: elan_i2c - only increment wakeup count on touch
Dinghao Liu (1):
dmaengine: tegra210-adma: Fix runtime PM imbalance on error
Douglas Anderson (2):
soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner
i2c: i2c-qcom-geni: Fix DMA transfer race
Eddie James (1):
mmc: sdhci-of-aspeed: Fix clock divider calculation
Eric Biggers (1):
/dev/mem: Add missing memory barriers for devmem_inode
Evgeny Novikov (2):
hwmon: (aspeed-pwm-tacho) Avoid possible buffer overflow
usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()
Fabio Estevam (1):
ARM: dts: imx6qdl-gw551x: Do not use 'simple-audio-card,dai-link'
Fangrui Song (1):
Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation
Federico Ricchiuto (1):
HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override
Filipe Manana (1):
btrfs: fix double free on ulist after backref resolution failure
Forest Crossman (1):
usb: xhci: Fix ASM2142/ASM3142 DMA addressing
Gavin Shan (1):
drivers/firmware/psci: Fix memory leakage in alloc_init_cpu_groups()
Geert Uytterhoeven (1):
ASoC: qcom: Drop HAS_DMA dependency to fix link failure
George Kennedy (1):
ax88172a: fix ax88172a_unbind() failures
Greg Kroah-Hartman (1):
Linux 5.4.54
Guenter Roeck (1):
hwmon: (nct6775) Accept PECI Calibration as temperature source for NCT6798D
Hans de Goede (3):
ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
HID: apple: Disable Fn-key key-re-mapping on clone keyboards
ASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo Miix 2 10
Heikki Krogerus (2):
usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant
usb: dwc3: pci: add support for the Intel Jasper Lake
Helmut Grohne (2):
net: dsa: microchip: call phy_remove_link_mode during probe
tty: xilinx_uartps: Really fix id assignment
Huang Guobin (1):
net: ag71xx: add missed clk_disable_unprepare in error path of probe
Hugh Dickins (1):
mm/memcg: fix refcount error while moving and swapping
Ian Abbott (4):
staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift
staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support
staging: comedi: addi_apci_1500: check INSN_CONFIG_DIGITAL_TRIG shift
staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift
Ilya Katsnelson (1):
Input: synaptics - enable InterTouch for ThinkPad X1E 1st gen
J. Bruce Fields (1):
nfsd4: fix NULL dereference in nfsd/clients display code
Jack Xiao (2):
drm/amdgpu/gfx10: fix race condition for kiq drm/amdgpu: fix preemption unit test
Jacky Hu (1):
pinctrl: amd: fix npins for uart0 in kerncz_groups
Jerry (Fangzhi) Zuo (1):
drm/amd/display: Check DMCU Exists Before Loading
Jing Xiangfeng (1):
ASoC: Intel: bytcht_es8316: Add missed put_device()
Joerg Roedel (1):
x86, vmlinux.lds: Page-align end of ..page_aligned sections
Johan Hovold (1):
serial: tegra: fix CREAD handling for PIO
Johannes Berg (1):
iwlwifi: mvm: don't call iwl_mvm_free_inactive_queue() under RCU
Johannes Thumshirn (1):
scsi: mpt3sas: Fix error returns in BRM_status_show
John David Anglin (1):
parisc: Add atomic64_set_release() define to avoid CPU soft lockups
Joonho Wohn (1):
ALSA: hda/realtek: Fixed ALC298 sound bug by adding quirk for Samsung Notebook Pen S
Kai Vehmanen (1):
ALSA: hda/hdmi: fix failures at PCM open on Intel ICL and later
Kirill A. Shutemov (2):
mm/mmap.c: close race between munmap() and expand_upwards()/downwards()
khugepaged: fix null-pointer dereference due to race
Leonid Ravich (1):
dmaengine: ioat setting ioat timeout as module parameter
Liu Jian (2):
ieee802154: fix one possible memleak in adf7242_probe
mlxsw: destroy workqueue when trap_register in mlxsw_emad_init
Maor Gottlieb (1):
RDMA/mlx5: Use xa_lock_irq when access to SRQ table
Marc Kleine-Budde (1):
regmap: dev_get_regmap_match(): fix string comparison
Mark O'Donovan (1):
ath9k: Fix regression with Atheros 9271
Markus Theil (1):
mac80211: allow rx of mesh eapol frames with default rx key
Matthew Gerlach (1):
fpga: dfl: fix bug in port reset handshake
Matthew Howell (1):
serial: exar: Fix GPIO configuration for Sealevel cards based on XR17V35X
Max Filippov (2):
xtensa: fix __sync_fetch_and_{and,or}_4 declarations
xtensa: update *pos in cpuinfo_op.next
Merlijn Wajer (2):
Input: add SW_MACHINE_COVER
ARM: dts: n900: remove mmc1 card detect gpio
Michael Chan (1):
bnxt_en: Fix completion ring sizing with TPA enabled.
Michael J. Ruhl (1):
io-mapping: indicate mapping failure
Miklos Szeredi (1):
fuse: fix weird page warning
Mikulas Patocka (1):
dm integrity: fix integrity recalculation that is improperly skipped
Muchun Song (1):
mm: memcg/slab: fix memory leak at non-root kmem_cache destroy
Navid Emamdoost (2):
gpio: arizona: handle pm_runtime_get_sync failure case
gpio: arizona: put pm_runtime in case of failure
Oleg Nesterov (1):
uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL, to fix GDB regression
Olga Kornievskaia (1):
SUNRPC reverting d03727b248d0 ("NFSv4 fix CLOSE not waiting for direct IO compeletion")
Palmer Dabbelt (1):
RISC-V: Upgrade smp_mb__after_spinlock() to iorw,iorw
Paweł Gronowski (1):
drm/amdgpu: Fix NULL dereference in dpm sysfs handlers
PeiSen Hou (1):
ALSA: hda/realtek - fixup for yet another Intel reference board
Peter Chen (2):
usb: cdns3: ep0: fix some endian issues
usb: cdns3: trace: fix some endian issues
Pi-Hsun Shih (1):
scripts/decode_stacktrace: strip basepath from all paths
Pierre-Louis Bossart (2):
ASoC: topology: fix kernel oops on route addition error
ASoC: topology: fix tlvs in error handling for widget_dmixer
Qi Liu (2):
drivers/perf: Fix kernel panic when rmmod PMU modules during perf sampling drivers/perf: Prevent forced unbinding of PMU drivers
Qiu Wenbo (1):
drm/amd/powerplay: fix a crash when overclocking Vega M
Qiujun Huang (1):
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
Qu Wenruo (2):
btrfs: reloc: fix reloc root leak and NULL pointer dereference
btrfs: reloc: clear DEAD_RELOC_TREE bit for orphan roots to prevent runaway balance
Robbie Ko (1):
btrfs: fix page leaks after failure to lock page for delalloc
Rodrigo Rivas Costa (1):
HID: steam: fixes race in handling device list.
Rustam Kovhaev (1):
staging: wlan-ng: properly check endpoint types
Serge Semin (1):
serial: 8250_mtk: Fix high-speed baud rates clamping
Sergey Organov (1):
net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration
Shannon Nelson (2):
ionic: use offset for ethtool regs data
ionic: fix up filter locks and debug msgs
Srinivas Pandruvada (1):
platform/x86: ISST: Add new PCI device ids
Stefano Garzarella (2):
vsock/virtio: annotate 'the_virtio_vsock' RCU pointer scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
Steve French (1):
Revert "cifs: Fix the target file was deleted when rename failed."
Steve Schremmer (1):
scsi: dh: Add Fujitsu device to devinfo and dh lists
Taehee Yoo (2):
bonding: check error value of register_netdevice() immediately
netdevsim: fix unbalaced locking in nsim_create()
Takashi Iwai (1):
ALSA: info: Drop WARN_ON() from buffer NULL sanity check
Tetsuo Handa (3):
binder: Don't use mmput() from shrinker function.
fbdev: Detect integer underflow at "struct fbcon_ops"->clear_margins.
vt: Reject zero-sized screen buffer size.
Thomas Gleixner (1):
irqdomain/treewide: Keep firmware node unconditionally allocated
Tim Harvey (1):
ARM: dts: imx6qdl-gw551x: fix audio SSI
Tom Rix (2):
scsi: scsi_transport_spi: Fix function pointer check
net: sky2: initialize return of gm_phy_read
Vasiliy Kupriakov (1):
platform/x86: asus-wmi: allow BAT1 battery name
Vasundhara Volam (1):
bnxt_en: Fix race when modifying pause settings.
Wang Hai (2):
net: smc91x: Fix possible memory leak in smc_drv_probe()
net: ethernet: ave: Fix error returns in ave_init
Will Deacon (2):
arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP asm-generic/mmiowb: Allow mmiowb_set_pending() when preemptible()
Wolfram Sang (1):
i2c: rcar: always clear ICSAR to avoid side effects
Xie He (1):
drivers/net/wan/lapbether: Fixed the value of hard_header_len
Xu Yilun (1):
fpga: dfl: pci: reduce the scope of variable 'ret'
Yang Yingliang (1):
serial: 8250: fix null-ptr-deref in serial8250_start_tx()
Yunsheng Lin (1):
net: hns3: fix error handling for desc filling
guodeqing (1):
ipvs: fix the connection sync failed in some cases
leilk.liu (1):
spi: mediatek: use correct SPI_CFG2_REG MACRO
Greg Kroah-Hartman
maintainerMakefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 53 +SUBLEVEL = 54 EXTRAVERSION = NAME = Kleptomaniac Octopus
@@ -528,7 +528,7 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) ifneq ($(CROSS_COMPILE),) CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) -CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) +CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif ifneq ($(GCC_TOOLCHAIN),)
arch/arm/boot/dts/imx6qdl-gw551x.dtsi +8 -11
@@ -105,19 +105,16 @@ sound-digital { compatible = "simple-audio-card"; simple-audio-card,name = "tda1997x-audio"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&sound_codec>; + simple-audio-card,frame-master = <&sound_codec>; - simple-audio-card,dai-link@0 { - format = "i2s"; - - cpu { - sound-dai = <&ssi2>; - }; + sound_cpu: simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; - codec { - bitclock-master; - frame-master; - sound-dai = <&hdmi_receiver>; - }; + sound_codec: simple-audio-card,codec { + sound-dai = <&hdmi_receiver>; }; }; };
arch/arm/boot/dts/omap3-n900.dts +8 -4
@@ -105,6 +105,14 @@ linux,code = <SW_FRONT_PROXIMITY>; linux,can-disable; }; + + machine_cover { + label = "Machine Cover"; + gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */ + linux,input-type = <EV_SW>; + linux,code = <SW_MACHINE_COVER>; + linux,can-disable; + }; }; isp1707: isp1707 {
@@ -814,10 +822,6 @@ pinctrl-0 = <&mmc1_pins>; vmmc-supply = <&vmmc1>; bus-width = <4>; - /* For debugging, it is often good idea to remove this GPIO. - It means you can remove back cover (to reboot by removing - battery) and still use the MMC card. */ - cd-gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */ }; /* most boards use vaux3, only some old versions use vmmc2 instead */
arch/arm64/kernel/debug-monitors.c +2 -2
@@ -396,14 +396,14 @@ void user_rewind_single_step(struct task_struct *task)* If single step is active for this thread, then set SPSR.SS * to 1 to avoid returning to the active-pending state. */ -if (test_ti_thread_flag (task_thread_info (task),TIF_SINGLESTEP )) +if (test_tsk_thread_flag (task,TIF_SINGLESTEP ))set_regs_spsr_ss (task_pt_regs (task)); }NOKPROBE_SYMBOL (user_rewind_single_step);void user_fastforward_single_step (struct task_struct *task) { -if (test_ti_thread_flag (task_thread_info (task),TIF_SINGLESTEP )) +if (test_tsk_thread_flag (task,TIF_SINGLESTEP ))clear_regs_spsr_ss (task_pt_regs (task)); }
arch/mips/pci/pci-xtalk-bridge.c +3 -2
@@ -444,9 +444,10 @@ static int bridge_probe(struct platform_device *pdev)return -ENOMEM ; domain =irq_domain_create_hierarchy (parent,0 ,8 , fn, &bridge_domain_ops,NULL ); -irq_domain_free_fwnode (fn); -if (!domain) +if (!domain) { +irq_domain_free_fwnode (fn);return -ENOMEM ; + }pci_set_flags (PCI_PROBE_ONLY );
arch/parisc/include/asm/atomic.h +2 -0
@@ -212,6 +212,8 @@ atomic64_set(atomic64_t *v, s64 i)_atomic_spin_unlock_irqrestore (v, flags); } +#define atomic64_set_release (v, i) atomic64_set((v), (i)) +static __inline__s64 atomic64_read (const atomic64_t *v) {
arch/riscv/include/asm/barrier.h +9 -1
@@ -58,8 +58,16 @@ do { \* The AQ/RL pair provides a RCpc critical section, but there's not really any * way we can take advantage of that here because the ordering is only enforced * on that one lock. Thus, we're just doing a full fence. +* +* Since we allow writeX to be called from preemptive regions we need at least +* an "o" in the predecessor set to ensure device writes are visible before the +* task is marked as available for scheduling on a new hart. While I don't see +* any concrete reason we need a full IO fence, it seems safer to just upgrade +* this in order to avoid any IO crossing a scheduling boundary. In both +* instances the scheduler pairs this with an mb(), so nothing is necessary on +* the new hart. */ -#define smp_mb__after_spinlock () RISCV_FENCE(rw,rw) +#define smp_mb__after_spinlock () RISCV_FENCE(iorw,iorw)#include <asm-generic/barrier.h>
arch/x86/kernel/apic/io_apic.c +5 -5
@@ -2329,12 +2329,12 @@ static int mp_irqdomain_create(int ioapic) ip->irqdomain =irq_domain_create_linear (fn, hwirqs, cfg->ops, (void *)(long )ioapic); -/* Release fw handle if it was allocated above */ -if (!cfg->dev) -irq_domain_free_fwnode (fn); - -if (!ip->irqdomain) +if (!ip->irqdomain) { +/* Release fw handle if it was allocated above */ +if (!cfg->dev) +irq_domain_free_fwnode (fn);return -ENOMEM ; + } ip->irqdomain->parent = parent;
arch/x86/kernel/apic/msi.c +12 -6
@@ -262,12 +262,13 @@ void __init arch_init_msi_domain(struct irq_domain *parent) msi_default_domain =pci_msi_create_irq_domain (fn, &pci_msi_domain_info, parent); -irq_domain_free_fwnode (fn); } -if (!msi_default_domain) +if (!msi_default_domain) { +irq_domain_free_fwnode (fn);pr_warn ("failed to initialize irqdomain for MSI/MSI-x.\n" ); -else + }else { msi_default_domain->flags |=IRQ_DOMAIN_MSI_NOMASK_QUIRK ; + } }#ifdef CONFIG_IRQ_REMAP
@@ -300,7 +301,8 @@ struct irq_domain *arch_create_remap_msi_irq_domain(struct irq_domain *parent,if (!fn)return NULL ; d =pci_msi_create_irq_domain (fn, &pci_msi_ir_domain_info, parent); -irq_domain_free_fwnode (fn); +if (!d) +irq_domain_free_fwnode (fn); return d; }#endif
@@ -363,7 +365,8 @@ static struct irq_domain *dmar_get_irq_domain(void)if (fn) { dmar_domain =msi_create_irq_domain (fn, &dmar_msi_domain_info, x86_vector_domain); -irq_domain_free_fwnode (fn); +if (!dmar_domain) +irq_domain_free_fwnode (fn); } out:mutex_unlock (&dmar_lock);
@@ -488,7 +491,10 @@ struct irq_domain *hpet_create_irq_domain(int hpet_id) } d =msi_create_irq_domain (fn, domain_info, parent); -irq_domain_free_fwnode (fn); +if (!d) { +irq_domain_free_fwnode (fn); +kfree (domain_info); + }return d; }
arch/x86/kernel/apic/vector.c +0 -1
@@ -701,7 +701,6 @@ int __init arch_early_irq_init(void) x86_vector_domain =irq_domain_create_tree (fn, &x86_vector_domain_ops,NULL );BUG_ON (x86_vector_domain ==NULL ); -irq_domain_free_fwnode (fn);irq_set_default_host (x86_vector_domain);arch_init_msi_domain (x86_vector_domain);
arch/x86/kernel/vmlinux.lds.S +1 -0
@@ -362,6 +362,7 @@ SECTIONS .bss : AT(ADDR(.bss) - LOAD_OFFSET) { __bss_start = .; *(.bss..page_aligned) + . = ALIGN(PAGE_SIZE); *(BSS_MAIN) BSS_DECRYPTED . = ALIGN(PAGE_SIZE);
arch/x86/math-emu/wm_sqrt.S +1 -1
@@ -209,7 +209,7 @@ sqrt_stage_2_finish: #ifdef PARANOID /* It should be possible to get here only if the arg is ffff....ffff */ - cmp $0xffffffff,FPU_fsqrt_arg_1 + cmpl $0xffffffff,FPU_fsqrt_arg_1 jnz sqrt_stage_2_error #endif /* PARANOID */
arch/x86/platform/uv/uv_irq.c +2 -1
@@ -167,9 +167,10 @@ static struct irq_domain *uv_get_irq_domain(void) goto out; uv_domain =irq_domain_create_tree (fn, &uv_domain_ops,NULL ); -irq_domain_free_fwnode (fn);if (uv_domain) uv_domain->parent = x86_vector_domain; +else +irq_domain_free_fwnode (fn); out:mutex_unlock (&uv_lock);
arch/xtensa/kernel/setup.c +2 -1
@@ -716,7 +716,8 @@ c_start(struct seq_file *f, loff_t *pos)static void *c_next (struct seq_file *f,void *v,loff_t *pos) { -return NULL ; + ++*pos; +return c_start (f, pos); } static void
arch/xtensa/kernel/xtensa_ksyms.c +2 -2
@@ -87,13 +87,13 @@ void __xtensa_libgcc_window_spill(void) }EXPORT_SYMBOL (__xtensa_libgcc_window_spill); -unsigned long __sync_fetch_and_and_4 (unsigned long *p,unsigned long v) +unsigned int __sync_fetch_and_and_4 (volatile void *p,unsigned int v) {BUG (); }EXPORT_SYMBOL (__sync_fetch_and_and_4); -unsigned long __sync_fetch_and_or_4 (unsigned long *p,unsigned long v) +unsigned int __sync_fetch_and_or_4 (volatile void *p,unsigned int v) {BUG (); }
drivers/android/binder_alloc.c +1 -1
@@ -948,7 +948,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,trace_binder_unmap_user_end (alloc, index); }up_read (&mm->mmap_sem); -mmput (mm); +mmput_async (mm);trace_binder_unmap_kernel_start (alloc, index);
drivers/base/regmap/regmap.c +1 -1
@@ -1363,7 +1363,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)/* If the user didn't specify a name match any */ if (data) -return (*r)->name == data; +return !strcmp ((*r)->name, data);else return 1 ; }
drivers/char/mem.c +7 -3
@@ -814,7 +814,8 @@ static struct inode *devmem_inode;#ifdef CONFIG_IO_STRICT_DEVMEM void revoke_devmem (struct resource *res) { -struct inode *inode =READ_ONCE (devmem_inode); +/* pairs with smp_store_release() in devmem_init_inode() */ +struct inode *inode =smp_load_acquire (&devmem_inode);/* * Check that the initialization has completed. Losing the race
@@ -1028,8 +1029,11 @@ static int devmem_init_inode(void)return rc; } -/* publish /dev/mem initialized */ -WRITE_ONCE (devmem_inode, inode); +/* +* Publish /dev/mem initialized. +* Pairs with smp_load_acquire() in revoke_devmem(). +*/ +smp_store_release (&devmem_inode, inode);return 0 ; }
drivers/dma-buf/dma-buf.c +7 -4
@@ -45,10 +45,10 @@ static char *dmabuffs_dname(struct dentry *dentry, char *buffer, int buflen)size_t ret =0 ; dmabuf = dentry->d_fsdata; -mutex_lock (&dmabuf->lock); +spin_lock (&dmabuf->name_lock);if (dmabuf->name) ret =strlcpy (name, dmabuf->name,DMA_BUF_NAME_LEN ); -mutex_unlock (&dmabuf->lock); +spin_unlock (&dmabuf->name_lock);return dynamic_dname (dentry, buffer, buflen,"/%s:%s" , dentry->d_name.name, ret >0 ? name :"" );
@@ -338,8 +338,10 @@ static long dma_buf_set_name(struct dma_buf *dmabuf, const char __user *buf)kfree (name); goto out_unlock; } +spin_lock (&dmabuf->name_lock);kfree (dmabuf->name); dmabuf->name = name; +spin_unlock (&dmabuf->name_lock); out_unlock:mutex_unlock (&dmabuf->lock);
@@ -402,10 +404,10 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file)/* Don't count the temporary reference taken inside procfs seq_show */ seq_printf (m,"count:\t%ld\n" ,file_count (dmabuf->file) -1 );seq_printf (m,"exp_name:\t%s\n" , dmabuf->exp_name); -mutex_lock (&dmabuf->lock); +spin_lock (&dmabuf->name_lock);if (dmabuf->name)seq_printf (m,"name:\t%s\n" , dmabuf->name); -mutex_unlock (&dmabuf->lock); +spin_unlock (&dmabuf->name_lock); }static const struct file_operations dma_buf_fops = {
@@ -537,6 +539,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) dmabuf->size = exp_info->size; dmabuf->exp_name = exp_info->exp_name; dmabuf->owner = exp_info->owner; +spin_lock_init (&dmabuf->name_lock);init_waitqueue_head (&dmabuf->poll); dmabuf->cb_excl.poll = dmabuf->cb_shared.poll = &dmabuf->poll; dmabuf->cb_excl.active = dmabuf->cb_shared.active =0 ;
drivers/dma/fsl-edma-common.c +14 -12
@@ -347,26 +347,28 @@ static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan,/* * TCD parameters are stored in struct fsl_edma_hw_tcd in little * endian format. However, we need to load the TCD registers in -* big- or little-endian obeying the eDMA engine model endian. +* big- or little-endian obeying the eDMA engine model endian, +* and this is performed from specific edma_write functions */ edma_writew (edma,0 , ®s->tcd[ch].csr); -edma_writel (edma,le32_to_cpu (tcd->saddr), ®s->tcd[ch].saddr); -edma_writel (edma,le32_to_cpu (tcd->daddr), ®s->tcd[ch].daddr); -edma_writew (edma,le16_to_cpu (tcd->attr), ®s->tcd[ch].attr); -edma_writew (edma,le16_to_cpu (tcd->soff), ®s->tcd[ch].soff); +edma_writel (edma, (s32 )tcd->saddr, ®s->tcd[ch].saddr); +edma_writel (edma, (s32 )tcd->daddr, ®s->tcd[ch].daddr); -edma_writel (edma,le32_to_cpu (tcd->nbytes), ®s->tcd[ch].nbytes); -edma_writel (edma,le32_to_cpu (tcd->slast), ®s->tcd[ch].slast); +edma_writew (edma, (s16 )tcd->attr, ®s->tcd[ch].attr); +edma_writew (edma, tcd->soff, ®s->tcd[ch].soff); -edma_writew (edma,le16_to_cpu (tcd->citer), ®s->tcd[ch].citer); -edma_writew (edma,le16_to_cpu (tcd->biter), ®s->tcd[ch].biter); -edma_writew (edma,le16_to_cpu (tcd->doff), ®s->tcd[ch].doff); +edma_writel (edma, (s32 )tcd->nbytes, ®s->tcd[ch].nbytes); +edma_writel (edma, (s32 )tcd->slast, ®s->tcd[ch].slast); -edma_writel (edma,le32_to_cpu (tcd->dlast_sga), +edma_writew (edma, (s16 )tcd->citer, ®s->tcd[ch].citer); +edma_writew (edma, (s16 )tcd->biter, ®s->tcd[ch].biter); +edma_writew (edma, (s16 )tcd->doff, ®s->tcd[ch].doff); + +edma_writel (edma, (s32 )tcd->dlast_sga, ®s->tcd[ch].dlast_sga); -edma_writew (edma,le16_to_cpu (tcd->csr), ®s->tcd[ch].csr); +edma_writew (edma, (s16 )tcd->csr, ®s->tcd[ch].csr); } static inline
drivers/dma/ioat/dma.c +12 -0
@@ -26,6 +26,18 @@#include "../dmaengine.h" +int completion_timeout =200 ; +module_param (completion_timeout, int,0644 ); +MODULE_PARM_DESC (completion_timeout, +"set ioat completion timeout [msec] (default 200 [msec])" ); +int idle_timeout =2000 ; +module_param (idle_timeout, int,0644 ); +MODULE_PARM_DESC (idle_timeout, +"set ioat idel timeout [msec] (default 2000 [msec])" ); + +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) +#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout) +static char *chanerr_str[] = {"DMA Transfer Source Address Error" ,"DMA Transfer Destination Address Error" ,
drivers/dma/ioat/dma.h +0 -2
@@ -99,8 +99,6 @@ struct ioatdma_chan {#define IOAT_RUN 5#define IOAT_CHAN_ACTIVE 6struct timer_list timer; -#define COMPLETION_TIMEOUT msecs_to_jiffies(100) -#define IDLE_TIMEOUT msecs_to_jiffies(2000)#define RESET_DELAY msecs_to_jiffies(100)struct ioatdma_device *ioat_dma;dma_addr_t completion_dma;
drivers/dma/tegra210-adma.c +4 -1
@@ -658,6 +658,7 @@ static int tegra_adma_alloc_chan_resources(struct dma_chan *dc) ret =pm_runtime_get_sync (tdc2dev (tdc));if (ret <0 ) { +pm_runtime_put_noidle (tdc2dev (tdc));free_irq (tdc->irq, tdc);return ret; }
@@ -869,8 +870,10 @@ static int tegra_adma_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev); ret =pm_runtime_get_sync (&pdev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (&pdev->dev); goto rpm_disable; + } ret =tegra_adma_init (tdma);if (ret)
drivers/firmware/psci/psci_checker.c +4 -1
@@ -157,8 +157,10 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups) cpu_groups =kcalloc (nb_available_cpus,sizeof (cpu_groups),GFP_KERNEL ); -if (!cpu_groups) +if (!cpu_groups) { +free_cpumask_var (tmp);return -ENOMEM ; + }cpumask_copy (tmp, cpu_online_mask);
@@ -167,6 +169,7 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups)topology_core_cpumask (cpumask_any (tmp));if (!alloc_cpumask_var (&cpu_groups[num_groups],GFP_KERNEL )) { +free_cpumask_var (tmp);free_cpu_groups (num_groups, &cpu_groups);return -ENOMEM ; }
drivers/fpga/dfl-afu-main.c +2 -1
@@ -83,7 +83,8 @@ int __afu_port_disable(struct platform_device *pdev)* on this port and minimum soft reset pulse width has elapsed. * Driver polls port_soft_reset_ack to determine if reset done by HW. */ -if (readq_poll_timeout (base +PORT_HDR_CTRL , v, v &PORT_CTRL_SFTRST , +if (readq_poll_timeout (base +PORT_HDR_CTRL , v, + v &PORT_CTRL_SFTRST_ACK ,RST_POLL_INVL ,RST_POLL_TIMEOUT )) {dev_err (&pdev->dev,"timeout, fail to reset device\n" );return -ETIMEDOUT ;
drivers/fpga/dfl-pci.c +2 -1
@@ -227,7 +227,6 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs) {struct cci_drvdata *drvdata =pci_get_drvdata (pcidev);struct dfl_fpga_cdev *cdev = drvdata->cdev; -int ret =0 ;if (!num_vfs) {/*
@@ -239,6 +238,8 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs)dfl_fpga_cdev_config_ports_pf (cdev); }else { +int ret; +/* * before enable SRIOV, put released ports into VF access mode * first of all.
drivers/gpio/gpio-arizona.c +6 -1
@@ -64,6 +64,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset) ret =pm_runtime_get_sync (chip->parent);if (ret <0 ) {dev_err (chip->parent,"Failed to resume: %d\n" , ret); +pm_runtime_put_autosuspend (chip->parent);return ret; }
@@ -72,12 +73,15 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)if (ret <0 ) {dev_err (chip->parent,"Failed to drop cache: %d\n" , ret); +pm_runtime_put_autosuspend (chip->parent);return ret; } ret =regmap_read (arizona->regmap, reg, &val); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (chip->parent);return ret; + }pm_runtime_mark_last_busy (chip->parent);pm_runtime_put_autosuspend (chip->parent);
@@ -106,6 +110,7 @@ static int arizona_gpio_direction_out(struct gpio_chip *chip, ret =pm_runtime_get_sync (chip->parent);if (ret <0 ) {dev_err (chip->parent,"Failed to resume: %d\n" , ret); +pm_runtime_put (chip->parent);return ret; } }
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +15 -5
@@ -990,27 +990,37 @@ static void amdgpu_ib_preempt_job_recovery(struct drm_gpu_scheduler *sched)static void amdgpu_ib_preempt_mark_partial_job (struct amdgpu_ring *ring) {struct amdgpu_job *job; -struct drm_sched_job *s_job; +struct drm_sched_job *s_job, *tmp;uint32_t preempt_seq;struct dma_fence *fence, **ptr;struct amdgpu_fence_driver *drv = &ring->fence_drv;struct drm_gpu_scheduler *sched = &ring->sched; +bool preempted = true;if (ring->funcs->type !=AMDGPU_RING_TYPE_GFX )return ; preempt_seq =le32_to_cpu (*(drv->cpu_addr +2 )); -if (preempt_seq <=atomic_read (&drv->last_seq)) -return ; +if (preempt_seq <=atomic_read (&drv->last_seq)) { + preempted = false; + goto no_preempt; + } preempt_seq &= drv->num_fences_mask; ptr = &drv->fences[preempt_seq]; fence =rcu_dereference_protected (*ptr,1 ); +no_preempt:spin_lock (&sched->job_list_lock); -list_for_each_entry (s_job, &sched->ring_mirror_list, node) { +list_for_each_entry_safe (s_job, tmp, &sched->ring_mirror_list, node) { +if (dma_fence_is_signaled (&s_job->s_fence->finished)) { +/* remove job from ring_mirror_list */ +list_del_init (&s_job->node); + sched->ops->free_job (s_job); +continue ; + } job =to_amdgpu_job (s_job); -if (job->fence == fence) +if (preempted && job->fence == fence)/* mark the job as preempted */ job->preemption_status |=AMDGPU_IB_PREEMPTED ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +3 -6
@@ -691,8 +691,7 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, tmp_str++;while (isspace (*++tmp_str)); -while (tmp_str[0 ]) { - sub_str =strsep (&tmp_str, delimiter); +while ((sub_str =strsep (&tmp_str, delimiter)) !=NULL ) { ret =kstrtol (sub_str,0 , ¶meter[parameter_size]);if (ret)return -EINVAL ;
@@ -883,8 +882,7 @@ static ssize_t amdgpu_read_mask(const char *buf, size_t count, uint32_t *mask)memcpy (buf_cpy, buf, bytes); buf_cpy[bytes] ='\0' ; tmp = buf_cpy; -while (tmp[0 ]) { - sub_str =strsep (&tmp, delimiter); +while ((sub_str =strsep (&tmp, delimiter)) !=NULL ) {if (strlen (sub_str)) { ret =kstrtol (sub_str,0 , &level);if (ret)
@@ -1300,8 +1298,7 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev, i++;memcpy (buf_cpy, buf, count-i); tmp_str = buf_cpy; -while (tmp_str[0 ]) { - sub_str =strsep (&tmp_str, delimiter); +while ((sub_str =strsep (&tmp_str, delimiter)) !=NULL ) { ret =kstrtol (sub_str,0 , ¶meter[parameter_size]);if (ret) { count = -EINVAL ;
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +8 -1
@@ -4683,12 +4683,17 @@ static int gfx_v10_0_ring_preempt_ib(struct amdgpu_ring *ring)struct amdgpu_device *adev = ring->adev;struct amdgpu_kiq *kiq = &adev->gfx.kiq;struct amdgpu_ring *kiq_ring = &kiq->ring; +unsigned long flags;if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)return -EINVAL ; -if (amdgpu_ring_alloc (kiq_ring, kiq->pmf->unmap_queues_size)) +spin_lock_irqsave (&kiq->ring_lock, flags); + +if (amdgpu_ring_alloc (kiq_ring, kiq->pmf->unmap_queues_size)) { +spin_unlock_irqrestore (&kiq->ring_lock, flags);return -ENOMEM ; + }/* assert preemption condition */ amdgpu_ring_set_preempt_cond_exec (ring, false);
@@ -4699,6 +4704,8 @@ static int gfx_v10_0_ring_preempt_ib(struct amdgpu_ring *ring) ++ring->trail_seq);amdgpu_ring_commit (kiq_ring); +spin_unlock_irqrestore (&kiq->ring_lock, flags); +/* poll the trailing fence */ for (i =0 ; i < adev->usec_timeout; i++) { if (ring->trail_seq ==
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -1
@@ -928,9 +928,14 @@ static int dm_late_init(void *handle)struct dmcu_iram_parameters params;unsigned int linear_lut[16 ];int i; -struct dmcu *dmcu = adev->dm.dc->res_pool->dmcu; +struct dmcu *dmcu =NULL ;bool ret; +if (!adev->dm.fw_dmcu) +return detect_mst_link_for_all_connectors (adev->ddev); + + dmcu = adev->dm.dc->res_pool->dmcu; +for (i =0 ; i <16 ; i++) linear_lut[i] =0xFFFF * i /15 ;
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c +6 -4
@@ -642,9 +642,6 @@ static int vegam_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr,/* sclk is bigger than max sclk in the dependence table */ *voltage |= (dep_table->entries[i -1 ].vddc *VOLTAGE_SCALE ) <<VDDC_SHIFT ; - vddci =phm_find_closest_vddci (&(data->vddci_voltage_table), - (dep_table->entries[i -1 ].vddc - - (uint16_t )VDDC_VDDCI_DELTA ));if (SMU7_VOLTAGE_CONTROL_NONE == data->vddci_control) *voltage |= (data->vbios_boot_state.vddci_bootup_value *
@@ -652,8 +649,13 @@ static int vegam_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr,else if (dep_table->entries[i -1 ].vddci) *voltage |= (dep_table->entries[i -1 ].vddci *VOLTAGE_SCALE ) <<VDDC_SHIFT ; -else +else { + vddci =phm_find_closest_vddci (&(data->vddci_voltage_table), + (dep_table->entries[i -1 ].vddc - + (uint16_t )VDDC_VDDCI_DELTA )); + *voltage |= (vddci *VOLTAGE_SCALE ) <<VDDCI_SHIFT ; + }if (SMU7_VOLTAGE_CONTROL_NONE == data->mvdd_control) *mvdd = data->vbios_boot_state.mvdd_bootup_value *VOLTAGE_SCALE ;
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c +2 -2
@@ -118,10 +118,10 @@ g94_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,if (retries)udelay (400 ); -/* transaction request, wait up to 1ms for it to complete */ +/* transaction request, wait up to 2ms for it to complete */ nvkm_wr32 (device,0x00e4e4 + base,0x00010000 | ctrl); - timeout =1000 ; + timeout =2000 ; do { ctrl = nvkm_rd32(device, 0x00e4e4 + base); udelay(1);
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c +2 -2
@@ -118,10 +118,10 @@ gm200_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,if (retries)udelay (400 ); -/* transaction request, wait up to 1ms for it to complete */ +/* transaction request, wait up to 2ms for it to complete */ nvkm_wr32 (device,0x00d954 + base,0x00010000 | ctrl); - timeout =1000 ; + timeout =2000 ; do { ctrl = nvkm_rd32(device, 0x00d954 + base); udelay(1);
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +1 -1
@@ -263,7 +263,7 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force)unsigned long reg; reg =readl (hdmi->base +SUN4I_HDMI_HPD_REG ); -if (reg &SUN4I_HDMI_HPD_HIGH ) { +if (!(reg &SUN4I_HDMI_HPD_HIGH )) {cec_phys_addr_invalidate (hdmi->cec_adap);return connector_status_disconnected; }
drivers/hid/hid-alps.c +2 -0
@@ -25,6 +25,7 @@#define U1_MOUSE_REPORT_ID 0x01/* Mouse data ReportID */ #define U1_ABSOLUTE_REPORT_ID 0x03/* Absolute data ReportID */ +#define U1_ABSOLUTE_REPORT_ID_SECD 0x02/* FW-PTP Absolute data ReportID */ #define U1_FEATURE_REPORT_ID 0x05/* Feature ReportID */ #define U1_SP_ABSOLUTE_REPORT_ID 0x06/* Feature ReportID */
@@ -368,6 +369,7 @@ static int u1_raw_event(struct alps_dev *hdata, u8 *data, int size)case U1_FEATURE_REPORT_ID :break ;case U1_ABSOLUTE_REPORT_ID : +case U1_ABSOLUTE_REPORT_ID_SECD :for (i =0 ; i < hdata->max_fingers; i++) {u8 *contact = &data[i *5 ];
drivers/hid/hid-apple.c +18 -0
@@ -54,6 +54,7 @@ MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\")struct apple_sc {unsigned long quirks;unsigned int fn_on; +unsigned int fn_found; DECLARE_BITMAP(pressed_numlock, KEY_CNT); };
@@ -339,12 +340,15 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { + struct apple_sc *asc = hid_get_drvdata(hdev); +if (usage->hid == (HID_UP_CUSTOM |0x0003 ) || usage->hid == (HID_UP_MSVENDOR |0x0003 ) || usage->hid == (HID_UP_HPVENDOR2 |0x0003 )) {/* The fn key on Apple USB keyboards */ set_bit (EV_REP , hi->input->evbit);hid_map_usage_clear (hi, usage, bit, max,EV_KEY ,KEY_FN ); + asc->fn_found = true;apple_setup_input (hi->input);return 1 ; }
@@ -371,6 +375,19 @@ static int apple_input_mapped(struct hid_device *hdev, struct hid_input *hi,return 0 ; } +static int apple_input_configured (struct hid_device *hdev, +struct hid_input *hidinput) +{ +struct apple_sc *asc =hid_get_drvdata (hdev); + +if ((asc->quirks &APPLE_HAS_FN ) && !asc->fn_found) { +hid_info (hdev,"Fn key not found (Apple Wireless Keyboard clone?), disabling Fn key handling\n" ); + asc->quirks =0 ; + } + +return 0 ; +} +static int apple_probe (struct hid_device *hdev,const struct hid_device_id *id) {
@@ -585,6 +602,7 @@ static struct hid_driver apple_driver = { .event = apple_event, .input_mapping = apple_input_mapping, .input_mapped = apple_input_mapped, + .input_configured = apple_input_configured, };module_hid_driver (apple_driver);
drivers/hid/hid-steam.c +4 -2
@@ -526,7 +526,8 @@ static int steam_register(struct steam_device *steam)steam_battery_register (steam);mutex_lock (&steam_devices_lock); -list_add (&steam->list, &steam_devices); +if (list_empty (&steam->list)) +list_add (&steam->list, &steam_devices);mutex_unlock (&steam_devices_lock); }
@@ -552,7 +553,7 @@ static void steam_unregister(struct steam_device *steam)hid_info (steam->hdev,"Steam Controller '%s' disconnected" , steam->serial_no);mutex_lock (&steam_devices_lock); -list_del (&steam->list); +list_del_init (&steam->list);mutex_unlock (&steam_devices_lock); steam->serial_no[0 ] =0 ; }
@@ -738,6 +739,7 @@ static int steam_probe(struct hid_device *hdev,mutex_init (&steam->mutex); steam->quirks = id->driver_data;INIT_WORK (&steam->work_connect, steam_work_connect_cb); +INIT_LIST_HEAD (&steam->list); steam->client_hdev =steam_create_client_hid (hdev);if (IS_ERR (steam->client_hdev)) {
drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c +8 -0
@@ -373,6 +373,14 @@ static const struct dmi_system_id i2c_hid_dmi_desc_override_table[] = { }, .driver_data = (void *)&sipodev_desc }, + { + .ident = "Mediacom FlexBook edge 13", + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"MEDIACOM" ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FlexBook_edge13-M-FBE13"), + }, + .driver_data = (void *)&sipodev_desc + }, { .ident ="Odys Winbook 13" , .matches = {
drivers/hwmon/aspeed-pwm-tacho.c +2 -0
@@ -851,6 +851,8 @@ static int aspeed_create_fan(struct device *dev, ret =of_property_read_u32 (child,"reg" , &pwm_port);if (ret)return ret; +if (pwm_port >=ARRAY_SIZE (pwm_port_params)) +return -EINVAL ;aspeed_create_pwm_port (priv, (u8 )pwm_port); ret =of_property_count_u8_elems (child,"cooling-levels" );
drivers/hwmon/nct6775.c +3 -3
@@ -786,13 +786,13 @@ static const char *const nct6798_temp_label[] = {"Agent1 Dimm1" ,"BYTE_TEMP0" ,"BYTE_TEMP1" , -"" , -"" , +"PECI Agent 0 Calibration" ,/* undocumented */ +"PECI Agent 1 Calibration" ,/* undocumented */ "" , "Virtual_TEMP" }; -#define NCT6798_TEMP_MASK 0x8fff0ffe +#define NCT6798_TEMP_MASK 0xbfff0ffe#define NCT6798_VIRT_TEMP_MASK 0x80000c00/* NCT6102D/NCT6106D specific data */
drivers/hwmon/pmbus/adm1275.c +8 -2
@@ -454,6 +454,7 @@ MODULE_DEVICE_TABLE(i2c, adm1275_id);static int adm1275_probe (struct i2c_client *client,const struct i2c_device_id *id) { +s32 (*config_read_fn)(const struct i2c_client *client,u8 reg);u8 block_buffer[I2C_SMBUS_BLOCK_MAX +1 ];int config, device_config;int ret;
@@ -499,11 +500,16 @@ static int adm1275_probe(struct i2c_client *client,"Device mismatch: Configured %s, detected %s\n" , id->name, mid->name); - config =i2c_smbus_read_byte_data (client,ADM1275_PMON_CONFIG ); +if (mid->driver_data == adm1272 || mid->driver_data == adm1278 || + mid->driver_data == adm1293 || mid->driver_data == adm1294) + config_read_fn = i2c_smbus_read_word_data; +else + config_read_fn = i2c_smbus_read_byte_data; + config =config_read_fn (client,ADM1275_PMON_CONFIG );if (config <0 )return config; - device_config =i2c_smbus_read_byte_data (client,ADM1275_DEVICE_CONFIG ); + device_config =config_read_fn (client,ADM1275_DEVICE_CONFIG );if (device_config <0 )return device_config;
drivers/hwmon/scmi-hwmon.c +1 -1
@@ -147,7 +147,7 @@ static enum hwmon_sensor_types scmi_types[] = { [ENERGY] = hwmon_energy, }; -static u32 hwmon_attributes[] = { +static u32 hwmon_attributes[hwmon_max] = { [hwmon_chip] =HWMON_C_REGISTER_TZ , [hwmon_temp] =HWMON_T_INPUT |HWMON_T_LABEL , [hwmon_in] =HWMON_I_INPUT |HWMON_I_LABEL ,
drivers/i2c/busses/i2c-qcom-geni.c +4 -2
@@ -368,7 +368,6 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg,geni_se_select_mode (se,GENI_SE_FIFO );writel_relaxed (len, se->base +SE_I2C_RX_TRANS_LEN ); -geni_se_setup_m_cmd (se,I2C_READ , m_param);if (dma_buf &&geni_se_rx_dma_prep (se, dma_buf, len, &rx_dma)) {geni_se_select_mode (se,GENI_SE_FIFO );
@@ -376,6 +375,8 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, dma_buf =NULL ; } +geni_se_setup_m_cmd (se,I2C_READ , m_param); + time_left =wait_for_completion_timeout (&gi2c->done,XFER_TIMEOUT );if (!time_left)geni_i2c_abort_xfer (gi2c);
@@ -409,7 +410,6 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg,geni_se_select_mode (se,GENI_SE_FIFO );writel_relaxed (len, se->base +SE_I2C_TX_TRANS_LEN ); -geni_se_setup_m_cmd (se,I2C_WRITE , m_param);if (dma_buf &&geni_se_tx_dma_prep (se, dma_buf, len, &tx_dma)) {geni_se_select_mode (se,GENI_SE_FIFO );
@@ -417,6 +417,8 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, dma_buf =NULL ; } +geni_se_setup_m_cmd (se,I2C_WRITE , m_param); +if (!dma_buf)/* Get FIFO IRQ */ writel_relaxed (1 , se->base +SE_GENI_TX_WATERMARK_REG );
drivers/i2c/busses/i2c-rcar.c +3 -0
@@ -865,6 +865,7 @@ static int rcar_unreg_slave(struct i2c_client *slave)/* disable irqs and ensure none is running before clearing ptr */ rcar_i2c_write (priv,ICSIER ,0 );rcar_i2c_write (priv,ICSCR ,0 ); +rcar_i2c_write (priv,ICSAR ,0 );/* Gen2: must be 0 if not using slave */ synchronize_irq (priv->irq); priv->slave =NULL ;
@@ -971,6 +972,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)if (ret <0 ) goto out_pm_put; +rcar_i2c_write (priv,ICSAR ,0 );/* Gen2: must be 0 if not using slave */ +if (priv->devtype ==I2C_RCAR_GEN3 ) { priv->rstc =devm_reset_control_get_exclusive (&pdev->dev,NULL );if (!IS_ERR (priv->rstc)) {
drivers/infiniband/hw/mlx5/srq_cmd.c +2 -2
@@ -83,11 +83,11 @@ struct mlx5_core_srq *mlx5_cmd_get_srq(struct mlx5_ib_dev *dev, u32 srqn)struct mlx5_srq_table *table = &dev->srq_table;struct mlx5_core_srq *srq; -xa_lock (&table->array); +xa_lock_irq (&table->array); srq =xa_load (&table->array, srqn);if (srq)refcount_inc (&srq->common.refcount); -xa_unlock (&table->array); +xa_unlock_irq (&table->array);return srq; }
drivers/input/mouse/elan_i2c_core.c +5 -4
@@ -951,6 +951,8 @@ static void elan_report_absolute(struct elan_tp_data *data, u8 *packet)u8 hover_info = packet[ETP_HOVER_INFO_OFFSET ];bool contact_valid, hover_event; +pm_wakeup_event (&data->client->dev,0 ); + hover_event = hover_info &0x40 ;for (i =0 ; i <ETP_MAX_FINGERS ; i++) { contact_valid = tp_info & (1U << (3 + i));
@@ -974,6 +976,8 @@ static void elan_report_trackpoint(struct elan_tp_data *data, u8 *report)u8 *packet = &report[ETP_REPORT_ID_OFFSET +1 ];int x, y; +pm_wakeup_event (&data->client->dev,0 ); +if (!data->tp_input) {dev_warn_once (&data->client->dev,"received a trackpoint report while no trackpoint device has been created. Please report upstream.\n" );
@@ -998,7 +1002,6 @@ static void elan_report_trackpoint(struct elan_tp_data *data, u8 *report)static irqreturn_t elan_isr (int irq,void *dev_id) {struct elan_tp_data *data = dev_id; -struct device *dev = &data->client->dev;int error;u8 report[ETP_MAX_REPORT_LEN ];
@@ -1016,8 +1019,6 @@ static irqreturn_t elan_isr(int irq, void *dev_id)if (error) goto out; -pm_wakeup_event (dev,0 ); -switch (report[ETP_REPORT_ID_OFFSET ]) {case ETP_REPORT_ID :elan_report_absolute (data, report);
@@ -1026,7 +1027,7 @@ static irqreturn_t elan_isr(int irq, void *dev_id)elan_report_trackpoint (data, report);break ;default : -dev_err (dev,"invalid report id data (%x)\n" , +dev_err (&data->client->dev,"invalid report id data (%x)\n" , report[ETP_REPORT_ID_OFFSET ]); }
drivers/input/mouse/synaptics.c +1 -0
@@ -179,6 +179,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0093" ,/* T480 */ "LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ +"LEN0099" ,/* X1 Extreme 1st */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */
drivers/iommu/amd_iommu.c +3 -2
@@ -4575,9 +4575,10 @@ int amd_iommu_create_irq_domain(struct amd_iommu *iommu)if (!fn)return -ENOMEM ; iommu->ir_domain =irq_domain_create_tree (fn, &amd_ir_domain_ops, iommu); -irq_domain_free_fwnode (fn); -if (!iommu->ir_domain) +if (!iommu->ir_domain) { +irq_domain_free_fwnode (fn);return -ENOMEM ; + } iommu->ir_domain->parent =arch_get_ir_parent_domain (); iommu->msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain,
drivers/iommu/hyperv-iommu.c +4 -1
@@ -155,7 +155,10 @@ static int __init hyperv_prepare_irq_remapping(void)0 ,IOAPIC_REMAPPING_ENTRY , fn, &hyperv_ir_domain_ops, NULL); -irq_domain_free_fwnode (fn); +if (!ioapic_ir_domain) { +irq_domain_free_fwnode (fn); +return -ENOMEM ; + }/* * Hyper-V doesn't provide irq remapping function for
drivers/iommu/intel_irq_remapping.c +1 -1
@@ -563,8 +563,8 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)0 ,INTR_REMAP_TABLE_ENTRIES , fn, &intel_ir_domain_ops, iommu); -irq_domain_free_fwnode (fn);if (!iommu->ir_domain) { +irq_domain_free_fwnode (fn);pr_err ("IR%d: failed to allocate irqdomain\n" , iommu->seq_id); goto out_free_bitmap; }
drivers/md/dm-integrity.c +2 -2
@@ -2298,7 +2298,7 @@ static void integrity_writer(struct work_struct *w)unsigned prev_free_sectors;/* the following test is not needed, but it tests the replay code */ -if (unlikely (dm_suspended (ic->ti)) && !ic->meta_dev) +if (unlikely (dm_post_suspending (ic->ti)) && !ic->meta_dev)return ;spin_lock_irq (&ic->endio_wait.lock);
@@ -2359,7 +2359,7 @@ static void integrity_recalc(struct work_struct *w) next_chunk: -if (unlikely (dm_suspended (ic->ti))) +if (unlikely (dm_post_suspending (ic->ti))) goto unlock_ret; range.logical_sector =le64_to_cpu (ic->sb->recalc_sector);
drivers/md/dm.c +19 -3
@@ -141,6 +141,7 @@ EXPORT_SYMBOL_GPL(dm_bio_get_target_bio_nr);#define DMF_NOFLUSH_SUSPENDING 5#define DMF_DEFERRED_REMOVE 6#define DMF_SUSPENDED_INTERNALLY 7 +#define DMF_POST_SUSPENDING 8#define DM_NUMA_NODE NUMA_NO_NODEstatic int dm_numa_node =DM_NUMA_NODE ;
@@ -1437,9 +1438,6 @@ static int __send_empty_flush(struct clone_info *ci)BUG_ON (bio_has_data (ci->bio));while ((ti =dm_table_get_target (ci->map, target_nr++)))__send_duplicate_bios (ci, ti, ti->num_flush_bios,NULL ); - -bio_disassociate_blkg (ci->bio); -return 0 ; }
@@ -1627,6 +1625,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, ci.bio = &flush_bio; ci.sector_count =0 ; error =__send_empty_flush (&ci); +bio_uninit (ci.bio);/* dec_pending submits any data associated with flush */ }else if (bio_op (bio) ==REQ_OP_ZONE_RESET ) { ci.bio = bio;
@@ -1701,6 +1700,7 @@ static blk_qc_t __process_bio(struct mapped_device *md, struct dm_table *map, ci.bio = &flush_bio; ci.sector_count =0 ; error =__send_empty_flush (&ci); +bio_uninit (ci.bio);/* dec_pending submits any data associated with flush */ }else {struct dm_target_io *tio;
@@ -2391,6 +2391,7 @@ static void __dm_destroy(struct mapped_device *md, bool wait)if (!dm_suspended_md (md)) {dm_table_presuspend_targets (map);set_bit (DMF_SUSPENDED , &md->flags); +set_bit (DMF_POST_SUSPENDING , &md->flags);dm_table_postsuspend_targets (map); }/* dm_put_live_table must be before msleep, otherwise deadlock is possible */
@@ -2713,7 +2714,9 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)if (r) goto out_unlock; +set_bit (DMF_POST_SUSPENDING , &md->flags);dm_table_postsuspend_targets (map); +clear_bit (DMF_POST_SUSPENDING , &md->flags); out_unlock:mutex_unlock (&md->suspend_lock);
@@ -2810,7 +2813,9 @@ static void __dm_internal_suspend(struct mapped_device *md, unsigned suspend_fla (void )__dm_suspend (md, map, suspend_flags,TASK_UNINTERRUPTIBLE ,DMF_SUSPENDED_INTERNALLY ); +set_bit (DMF_POST_SUSPENDING , &md->flags);dm_table_postsuspend_targets (map); +clear_bit (DMF_POST_SUSPENDING , &md->flags); }static void __dm_internal_resume (struct mapped_device *md)
@@ -2971,6 +2976,11 @@ int dm_suspended_md(struct mapped_device *md)return test_bit (DMF_SUSPENDED , &md->flags); } +static int dm_post_suspending_md (struct mapped_device *md) +{ +return test_bit (DMF_POST_SUSPENDING , &md->flags); +} +int dm_suspended_internally_md (struct mapped_device *md) {return test_bit (DMF_SUSPENDED_INTERNALLY , &md->flags);
@@ -2987,6 +2997,12 @@ int dm_suspended(struct dm_target *ti) }EXPORT_SYMBOL_GPL (dm_suspended); +int dm_post_suspending (struct dm_target *ti) +{ +return dm_post_suspending_md (dm_table_get_md (ti->table)); +} +EXPORT_SYMBOL_GPL (dm_post_suspending); +int dm_noflush_suspending (struct dm_target *ti) {return __noflush_suspending (dm_table_get_md (ti->table));
drivers/mmc/host/sdhci-of-aspeed.c +1 -1
@@ -68,7 +68,7 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock)if (WARN_ON (clock > host->max_clk)) clock = host->max_clk; -for (div =1 ; div <256 ; div *=2 ) { +for (div =2 ; div <256 ; div *=2 ) {if ((parent / div) <= clock)break ; }
drivers/net/bonding/bond_main.c +7 -3
@@ -4864,15 +4864,19 @@ int bond_create(struct net *net, const char *name) bond_dev->rtnl_link_ops = &bond_link_ops; res =register_netdevice (bond_dev); +if (res <0 ) { +free_netdev (bond_dev); +rtnl_unlock (); + +return res; + }netif_carrier_off (bond_dev);bond_work_init_all (bond);rtnl_unlock (); -if (res <0 ) -free_netdev (bond_dev); -return res; +return 0 ; }static int __net_init bond_net_init (struct net *net)
drivers/net/bonding/bond_netlink.c +1 -2
@@ -456,11 +456,10 @@ static int bond_newlink(struct net *src_net, struct net_device *bond_dev,return err; err =register_netdevice (bond_dev); - -netif_carrier_off (bond_dev);if (!err) {struct bonding *bond =netdev_priv (bond_dev); +netif_carrier_off (bond_dev);bond_work_init_all (bond); }
drivers/net/dsa/microchip/ksz9477.c +23 -19
60 lines not on this page · raw message
drivers/net/dsa/microchip/ksz_common.c +0 -2
@@ -366,8 +366,6 @@ int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)/* setup slave port */ dev->dev_ops->port_setup (dev, port, false); -if (dev->dev_ops->phy_setup) - dev->dev_ops->phy_setup (dev, port, phy);/* port_stp_state_set() will be called after to enable the port so * there is no need to do anything.
drivers/net/dsa/microchip/ksz_common.h +0 -2
@@ -120,8 +120,6 @@ struct ksz_dev_ops {u32 (*get_port_addr)(int port,int offset);void (*cfg_port_member)(struct ksz_device *dev,int port,u8 member);void (*flush_dyn_mac_table)(struct ksz_device *dev,int port); -void (*phy_setup)(struct ksz_device *dev,int port, -struct phy_device *phy);void (*port_cleanup)(struct ksz_device *dev,int port);void (*port_setup)(struct ksz_device *dev,int port,bool cpu_port);void (*r_phy)(struct ksz_device *dev,u16 phy,u16 reg,u16 *val);
drivers/net/ethernet/atheros/ag71xx.c +2 -1
@@ -553,7 +553,8 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) ag->mdio_reset =of_reset_control_get_exclusive (np,"mdio" );if (IS_ERR (ag->mdio_reset)) {netif_err (ag, probe, ndev,"Failed to get reset mdio.\n" ); -return PTR_ERR (ag->mdio_reset); + err =PTR_ERR (ag->mdio_reset); + goto mdio_err_put_clk; } mii_bus->name ="ag71xx_mdio" ;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +10 -2
@@ -3423,7 +3423,7 @@ void bnxt_set_tpa_flags(struct bnxt *bp)*/ void bnxt_set_ring_params (struct bnxt *bp) { -u32 ring_size, rx_size, rx_space; +u32 ring_size, rx_size, rx_space, max_rx_cmpl;u32 agg_factor =0 , agg_ring_size =0 ;/* 8 for CRC and VLAN */
@@ -3479,7 +3479,15 @@ void bnxt_set_ring_params(struct bnxt *bp) bp->tx_nr_pages =bnxt_calc_nr_ring_pages (ring_size,TX_DESC_CNT ); bp->tx_ring_mask = (bp->tx_nr_pages *TX_DESC_CNT ) -1 ; - ring_size = bp->rx_ring_size * (2 + agg_factor) + bp->tx_ring_size; + max_rx_cmpl = bp->rx_ring_size; +/* MAX TPA needs to be added because TPA_START completions are +* immediately recycled, so the TPA completions are not bound by +* the RX ring size. +*/ +if (bp->flags &BNXT_FLAG_TPA ) + max_rx_cmpl += bp->max_tpa; +/* RX and TPA completions are 32-byte, all others are 16-byte */ + ring_size = max_rx_cmpl *2 + agg_ring_size + bp->tx_ring_size; bp->cp_ring_size = ring_size; bp->cp_nr_pages =bnxt_calc_nr_ring_pages (ring_size,CP_DESC_CNT );
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +4 -1
@@ -1688,8 +1688,11 @@ static int bnxt_set_pauseparam(struct net_device *dev,if (epause->tx_pause) link_info->req_flow_ctrl |=BNXT_LINK_PAUSE_TX ; -if (netif_running (dev)) +if (netif_running (dev)) { +mutex_lock (&bp->link_lock); rc =bnxt_hwrm_set_pause (bp); +mutex_unlock (&bp->link_lock); + }return rc; }
drivers/net/ethernet/freescale/enetc/enetc_pf.c +1 -0
@@ -885,6 +885,7 @@ static int enetc_pf_probe(struct pci_dev *pdev,return 0 ; err_reg_netdev: +enetc_mdio_remove (pf);enetc_of_put_phy (priv);enetc_free_msix (priv); err_alloc_msix:
drivers/net/ethernet/hisilicon/hns3/hnae3.h +1 -0
@@ -77,6 +77,7 @@ ((ring)->p = ((ring)->p - 1 + (ring)->desc_num) % (ring)->desc_num)enum hns_desc_type { +DESC_TYPE_UNKNOWN ,DESC_TYPE_SKB ,DESC_TYPE_PAGE , };
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +8 -0
@@ -1292,6 +1292,10 @@ static void hns3_clear_desc(struct hns3_enet_ring *ring, int next_to_use_orig)unsigned int i;for (i =0 ; i < ring->desc_num; i++) { +struct hns3_desc *desc = &ring->desc[ring->next_to_use]; + +memset (desc,0 ,sizeof (*desc)); +/* check if this is where we started */ if (ring->next_to_use == next_to_use_orig)break ;
@@ -1299,6 +1303,9 @@ static void hns3_clear_desc(struct hns3_enet_ring *ring, int next_to_use_orig)/* rollback one */ ring_ptr_move_bw (ring, next_to_use); +if (!ring->desc_cb[ring->next_to_use].dma) +continue ; +/* unmap the descriptor dma address */ if (ring->desc_cb[ring->next_to_use].type ==DESC_TYPE_SKB ) dma_unmap_single(dev,
@@ -1313,6 +1320,7 @@ static void hns3_clear_desc(struct hns3_enet_ring *ring, int next_to_use_orig) ring->desc_cb[ring->next_to_use].length =0 ; ring->desc_cb[ring->next_to_use].dma =0 ; + ring->desc_cb[ring->next_to_use].type =DESC_TYPE_UNKNOWN ; } }
drivers/net/ethernet/marvell/sky2.c +1 -1
@@ -203,7 +203,7 @@ static int __gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg, u16 *val)static inline u16 gm_phy_read (struct sky2_hw *hw,unsigned port,u16 reg) { -u16 v; +u16 v =0 ;__gm_phy_read (hw, port, reg, &v);return v; }
drivers/net/ethernet/mellanox/mlxsw/core.c +2 -1
@@ -592,7 +592,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core) err =mlxsw_core_trap_register (mlxsw_core, &mlxsw_emad_rx_listener, mlxsw_core);if (err) -return err; + goto err_trap_register; err = mlxsw_core->driver->basic_trap_groups_set (mlxsw_core);if (err)
@@ -604,6 +604,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core) err_emad_trap_set:mlxsw_core_trap_unregister (mlxsw_core, &mlxsw_emad_rx_listener, mlxsw_core); +err_trap_register:destroy_workqueue (mlxsw_core->emad_wq);return err; }
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +5 -2
@@ -102,15 +102,18 @@ static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *p) {struct ionic_lif *lif =netdev_priv (netdev); +unsigned int offset;unsigned int size; regs->version =IONIC_DEV_CMD_REG_VERSION ; + offset =0 ; size =IONIC_DEV_INFO_REG_COUNT *sizeof (u32); -memcpy_fromio (p, lif->ionic->idev.dev_info_regs->words, size); +memcpy_fromio (p + offset, lif->ionic->idev.dev_info_regs->words, size); + offset += size; size =IONIC_DEV_CMD_REG_COUNT *sizeof (u32); -memcpy_fromio (p, lif->ionic->idev.dev_cmd_regs->words, size); +memcpy_fromio (p + offset, lif->ionic->idev.dev_cmd_regs->words, size); } static int ionic_get_link_ksettings(struct net_device *netdev,
drivers/net/ethernet/pensando/ionic/ionic_lif.c +7 -10
@@ -809,8 +809,7 @@ static int ionic_lif_addr_add(struct ionic_lif *lif, const u8 *addr)if (f)return 0 ; -netdev_dbg (lif->netdev,"rx_filter add ADDR %pM (id %d)\n" , addr, - ctx.comp.rx_filter_add.filter_id); +netdev_dbg (lif->netdev,"rx_filter add ADDR %pM\n" , addr);memcpy (ctx.cmd.rx_filter_add.mac.addr, addr,ETH_ALEN ); err =ionic_adminq_post_wait (lif, &ctx);
@@ -839,6 +838,9 @@ static int ionic_lif_addr_del(struct ionic_lif *lif, const u8 *addr)return -ENOENT ; } +netdev_dbg (lif->netdev,"rx_filter del ADDR %pM (id %d)\n" , + addr, f->filter_id); + ctx.cmd.rx_filter_del.filter_id =cpu_to_le32 (f->filter_id);ionic_rx_filter_free (lif, f);spin_unlock_bh (&lif->rx_filters.lock);
@@ -847,9 +849,6 @@ static int ionic_lif_addr_del(struct ionic_lif *lif, const u8 *addr)if (err)return err; -netdev_dbg (lif->netdev,"rx_filter del ADDR %pM (id %d)\n" , addr, - ctx.cmd.rx_filter_del.filter_id); -return 0 ; }
@@ -1291,13 +1290,11 @@ static int ionic_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, };int err; +netdev_dbg (netdev,"rx_filter add VLAN %d\n" , vid); err =ionic_adminq_post_wait (lif, &ctx);if (err)return err; -netdev_dbg (netdev,"rx_filter add VLAN %d (id %d)\n" , vid, - ctx.comp.rx_filter_add.filter_id); -return ionic_rx_filter_save (lif,0 ,IONIC_RXQ_INDEX_ANY ,0 , &ctx); }
@@ -1322,8 +1319,8 @@ static int ionic_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto,return -ENOENT ; } -netdev_dbg (netdev,"rx_filter del VLAN %d (id %d)\n" , vid, -le32_to_cpu (ctx.cmd.rx_filter_del.filter_id)); +netdev_dbg (netdev,"rx_filter del VLAN %d (id %d)\n" , + vid, f->filter_id); ctx.cmd.rx_filter_del.filter_id =cpu_to_le32 (f->filter_id);ionic_rx_filter_free (lif, f);
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +5 -0
@@ -36,10 +36,12 @@ int ionic_rx_filters_init(struct ionic_lif *lif)spin_lock_init (&lif->rx_filters.lock); +spin_lock_bh (&lif->rx_filters.lock);for (i =0 ; i <IONIC_RX_FILTER_HLISTS ; i++) {INIT_HLIST_HEAD (&lif->rx_filters.by_hash[i]);INIT_HLIST_HEAD (&lif->rx_filters.by_id[i]); } +spin_unlock_bh (&lif->rx_filters.lock);return 0 ; }
@@ -51,11 +53,13 @@ void ionic_rx_filters_deinit(struct ionic_lif *lif)struct hlist_node *tmp;unsigned int i; +spin_lock_bh (&lif->rx_filters.lock);for (i =0 ; i <IONIC_RX_FILTER_HLISTS ; i++) { head = &lif->rx_filters.by_id[i];hlist_for_each_entry_safe (f, tmp, head, by_id)ionic_rx_filter_free (lif, f); } +spin_unlock_bh (&lif->rx_filters.lock); } int ionic_rx_filter_save(struct ionic_lif *lif, u32 flow_id, u16 rxq_index,
@@ -91,6 +95,7 @@ int ionic_rx_filter_save(struct ionic_lif *lif, u32 flow_id, u16 rxq_index, f->filter_id =le32_to_cpu (ctx->comp.rx_filter_add.filter_id); f->rxq_index = rxq_index;memcpy (&f->cmd, ac,sizeof (f->cmd)); +netdev_dbg (lif->netdev,"rx_filter add filter_id %d\n" , f->filter_id);INIT_HLIST_NODE (&f->by_hash);INIT_HLIST_NODE (&f->by_id);
drivers/net/ethernet/qlogic/qed/qed_cxt.c +2 -2
@@ -2073,8 +2073,8 @@ static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn, num_srqs =min_t (u32,QED_RDMA_MAX_SRQS , p_params->num_srqs);if (p_hwfn->mcp_info->func_info.protocol ==QED_PCI_ETH_RDMA ) { -DP_NOTICE (p_hwfn, -"Current day drivers don't support RoCE & iWARP simultaneously on the same PF. Default to RoCE-only\n" ); +DP_VERBOSE (p_hwfn,QED_MSG_SP , +"Current day drivers don't support RoCE & iWARP simultaneously on the same PF. Default to RoCE-only\n" ); p_hwfn->hw_info.personality =QED_PCI_ETH_ROCE ; }
drivers/net/ethernet/qlogic/qed/qed_dev.c +1 -1
@@ -3092,7 +3092,7 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params) }/* Log and clear previous pglue_b errors if such exist */ -qed_pglueb_rbc_attn_handler (p_hwfn, p_hwfn->p_main_ptt); +qed_pglueb_rbc_attn_handler (p_hwfn, p_hwfn->p_main_ptt, true);/* Enable the PF's internal FID_enable in the PXP */ rc = qed_pglueb_set_pfid_enable(p_hwfn, p_hwfn->p_main_ptt,
drivers/net/ethernet/qlogic/qed/qed_int.c +29 -21
75 lines not on this page · raw message
drivers/net/ethernet/qlogic/qed/qed_int.h +2 -2
@@ -431,7 +431,7 @@ int qed_int_set_timer_res(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,#define QED_MAPPING_MEMORY_SIZE (dev) (NUM_OF_SBS(dev)) -int qed_pglueb_rbc_attn_handler (struct qed_hwfn *p_hwfn, -struct qed_ptt *p_ptt); +int qed_pglueb_rbc_attn_handler (struct qed_hwfn *p_hwfn,struct qed_ptt *p_ptt, +bool hw_init);#endif
drivers/net/ethernet/smsc/smc91x.c +2 -2
@@ -2274,7 +2274,7 @@ static int smc_drv_probe(struct platform_device *pdev) ret =try_toggle_control_gpio (&pdev->dev, &lp->power_gpio,"power" ,0 ,0 ,100 );if (ret) -return ret; + goto out_free_netdev;/* * Optional reset GPIO configured? Minimum 100 ns reset needed
@@ -2283,7 +2283,7 @@ static int smc_drv_probe(struct platform_device *pdev) ret =try_toggle_control_gpio (&pdev->dev, &lp->reset_gpio,"reset" ,0 ,0 ,100 );if (ret) -return ret; + goto out_free_netdev;/* * Need to wait for optional EEPROM to load, max 750 us according
drivers/net/ethernet/socionext/sni_ave.c +1 -1
@@ -1191,7 +1191,7 @@ static int ave_init(struct net_device *ndev) ret =regmap_update_bits (priv->regmap,SG_ETPINMODE , priv->pinmode_mask, priv->pinmode_val);if (ret) -return ret; + goto out_reset_assert;ave_global_reset (ndev);
drivers/net/geneve.c +1 -1
@@ -1615,11 +1615,11 @@ static int geneve_changelink(struct net_device *dev, struct nlattr *tb[], struct netlink_ext_ack *extack) {struct geneve_dev *geneve =netdev_priv (dev); +enum ifla_geneve_df df = geneve->df;struct geneve_sock *gs4, *gs6;struct ip_tunnel_info info;bool metadata;bool use_udp6_rx_checksums; -enum ifla_geneve_df df;bool ttl_inherit;int err;
drivers/net/hippi/rrunner.c +1 -1
@@ -1242,7 +1242,7 @@ static int rr_open(struct net_device *dev) rrpriv->info =NULL ; }if (rrpriv->rx_ctrl) { -pci_free_consistent (pdev,sizeof (struct ring_ctrl ), +pci_free_consistent (pdev,256 *sizeof (struct ring_ctrl ), rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma); rrpriv->rx_ctrl =NULL ; }
drivers/net/ieee802154/adf7242.c +3 -1
@@ -1262,7 +1262,7 @@ static int adf7242_probe(struct spi_device *spi) WQ_MEM_RECLAIM);if (unlikely (!lp->wqueue)) { ret = -ENOMEM ; - goto err_hw_init; + goto err_alloc_wq; } ret =adf7242_hw_init (lp);
@@ -1294,6 +1294,8 @@ static int adf7242_probe(struct spi_device *spi)return ret; err_hw_init: +destroy_workqueue (lp->wqueue); +err_alloc_wq:mutex_destroy (&lp->bmux);ieee802154_free_hw (lp->hw);
drivers/net/netdevsim/netdev.c +2 -2
@@ -301,7 +301,7 @@ nsim_create(struct nsim_dev *nsim_dev, struct nsim_dev_port *nsim_dev_port)rtnl_lock (); err =nsim_bpf_init (ns);if (err) - goto err_free_netdev; + goto err_rtnl_unlock;nsim_ipsec_init (ns);
@@ -315,8 +315,8 @@ nsim_create(struct nsim_dev *nsim_dev, struct nsim_dev_port *nsim_dev_port) err_ipsec_teardown:nsim_ipsec_teardown (ns);nsim_bpf_uninit (ns); +err_rtnl_unlock:rtnl_unlock (); -err_free_netdev:free_netdev (dev);return ERR_PTR (err); }
drivers/net/phy/dp83640.c +4 -0
@@ -1348,6 +1348,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L4 ; dp83640->version =PTP_CLASS_V1 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V1_L4_EVENT ;break ;case HWTSTAMP_FILTER_PTP_V2_L4_EVENT :case HWTSTAMP_FILTER_PTP_V2_L4_SYNC :
@@ -1355,6 +1356,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L4 ; dp83640->version =PTP_CLASS_V2 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V2_L4_EVENT ;break ;case HWTSTAMP_FILTER_PTP_V2_L2_EVENT :case HWTSTAMP_FILTER_PTP_V2_L2_SYNC :
@@ -1362,6 +1364,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L2 ; dp83640->version =PTP_CLASS_V2 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V2_L2_EVENT ;break ;case HWTSTAMP_FILTER_PTP_V2_EVENT :case HWTSTAMP_FILTER_PTP_V2_SYNC :
@@ -1369,6 +1372,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L4 |PTP_CLASS_L2 ; dp83640->version =PTP_CLASS_V2 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V2_EVENT ;break ;default :return -ERANGE ;
drivers/net/usb/ax88172a.c +1 -0
@@ -198,6 +198,7 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf) ret =asix_read_cmd (dev,AX_CMD_READ_NODE_ID ,0 ,0 ,ETH_ALEN , buf,0 );if (ret <ETH_ALEN ) {netdev_err (dev->net,"Failed to read MAC address: %d\n" , ret); + ret = -EIO ; goto free; }memcpy (dev->net->dev_addr, buf,ETH_ALEN );
drivers/net/wan/lapbether.c +8 -1
@@ -303,7 +303,6 @@ static void lapbeth_setup(struct net_device *dev) dev->netdev_ops = &lapbeth_netdev_ops; dev->needs_free_netdev = true; dev->type =ARPHRD_X25 ; - dev->hard_header_len =3 ; dev->mtu =1000 ; dev->addr_len =0 ; }
@@ -324,6 +323,14 @@ static int lapbeth_new_device(struct net_device *dev)if (!ndev) goto out; +/* When transmitting data: +* first this driver removes a pseudo header of 1 byte, +* then the lapb module prepends an LAPB header of at most 3 bytes, +* then this driver prepends a length field of 2 bytes, +* then the underlying Ethernet device prepends its own header. +*/ + ndev->hard_header_len =-1 +3 +2 + dev->hard_header_len; + lapbeth =netdev_priv (ndev); lapbeth->axdev = ndev;
drivers/net/wireless/ath/ath9k/hif_usb.c +40 -12
149 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/hif_usb.h +5 -0
@@ -86,6 +86,11 @@ struct tx_buf {struct list_head list; }; +struct rx_buf { +struct sk_buff *skb; +struct hif_device_usb *hif_dev; +}; +#define HIF_USB_TX_STOP BIT(0)#define HIF_USB_TX_FLUSH BIT(1)
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +3 -5
@@ -1184,17 +1184,15 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta)for_each_set_bit (i, &changetid_queues,IWL_MAX_HW_QUEUES )iwl_mvm_change_queue_tid (mvm, i); +rcu_read_unlock (); +if (free_queue >=0 && alloc_for_sta !=IWL_MVM_INVALID_STA ) { ret =iwl_mvm_free_inactive_queue (mvm, free_queue, queue_owner, alloc_for_sta); -if (ret) { -rcu_read_unlock (); +if (ret)return ret; - } } -rcu_read_unlock (); -return free_queue; }
drivers/pci/controller/vmd.c +3 -2
@@ -680,9 +680,10 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) vmd->irq_domain =pci_msi_create_irq_domain (fn, &vmd_msi_domain_info, x86_vector_domain); -irq_domain_free_fwnode (fn); -if (!vmd->irq_domain) +if (!vmd->irq_domain) { +irq_domain_free_fwnode (fn);return -ENODEV ; + }pci_add_resource (&resources, &vmd->resources[0 ]);pci_add_resource_offset (&resources, &vmd->resources[1 ], offset[0 ]);
drivers/pci/pci.c +9 -21
@@ -4610,8 +4610,7 @@ static int pci_pm_reset(struct pci_dev *dev, int probe)* pcie_wait_for_link_delay - Wait until link is active or inactive * @pdev: Bridge device * @active: waiting for active or inactive? -* @delay: Delay to wait after link has become active (in ms). Specify %0 -* for no delay. +* @delay: Delay to wait after link has become active (in ms) * * Use this to wait till link becomes active or inactive. */
@@ -4652,7 +4651,7 @@ static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,msleep (10 ); timeout -=10 ; } -if (active && ret && delay) +if (active && ret)msleep (delay);else if (ret != active) pci_info(pdev, "Data Link Layer Link Active not %s in 1000 msec\n",
@@ -4773,28 +4772,17 @@ void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)if (!pcie_downstream_port (dev))return ; -/* -* Per PCIe r5.0, sec 6.6.1, for downstream ports that support -* speeds > 5 GT/s, we must wait for link training to complete -* before the mandatory delay. -* -* We can only tell when link training completes via DLL Link -* Active, which is required for downstream ports that support -* speeds > 5 GT/s (sec 7.5.3.6). Unfortunately some common -* devices do not implement Link Active reporting even when it's -* required, so we'll check for that directly instead of checking -* the supported link speed. We assume devices without Link Active -* reporting can train in 100 ms regardless of speed. -*/ -if (dev->link_active_reporting) { -pci_dbg (dev,"waiting for link to train\n" ); -if (!pcie_wait_for_link_delay (dev, true,0 )) { +if (pcie_get_speed_cap (dev) <=PCIE_SPEED_5_0GT ) { +pci_dbg (dev,"waiting %d ms for downstream link\n" , delay); +msleep (delay); + }else { +pci_dbg (dev,"waiting %d ms for downstream link, after activation\n" , + delay); +if (!pcie_wait_for_link_delay (dev, true, delay)) {/* Did not train, no need to wait any further */ return ; } } -pci_dbg (child,"waiting %d ms to become accessible\n" , delay); -msleep (delay);if (!pci_device_is_present (child)) {pci_dbg (child,"waiting additional %d ms to become accessible\n" , delay);
drivers/perf/arm-cci.c +1 -0
@@ -1720,6 +1720,7 @@ static struct platform_driver cci_pmu_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = arm_cci_pmu_matches, + .suppress_bind_attrs = true, }, .probe = cci_pmu_probe, .remove = cci_pmu_remove,
drivers/perf/arm-ccn.c +1 -0
@@ -1545,6 +1545,7 @@ static struct platform_driver arm_ccn_driver = { .driver = { .name = "arm-ccn", .of_match_table = arm_ccn_match, + .suppress_bind_attrs = true, }, .probe = arm_ccn_probe, .remove = arm_ccn_remove,
drivers/perf/arm_dsu_pmu.c +1 -0
@@ -759,6 +759,7 @@ static struct platform_driver dsu_pmu_driver = { .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(dsu_pmu_of_match), + .suppress_bind_attrs = true, }, .probe = dsu_pmu_device_probe, .remove = dsu_pmu_device_remove,
drivers/perf/arm_smmuv3_pmu.c +2 -0
@@ -742,6 +742,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)platform_set_drvdata (pdev, smmu_pmu); smmu_pmu->pmu = (struct pmu ) { + .module =THIS_MODULE , .task_ctx_nr = perf_invalid_context, .pmu_enable = smmu_pmu_enable, .pmu_disable = smmu_pmu_disable,
@@ -860,6 +861,7 @@ static void smmu_pmu_shutdown(struct platform_device *pdev)static struct platform_driver smmu_pmu_driver = { .driver = { .name ="arm-smmu-v3-pmcg" , + .suppress_bind_attrs = true, }, .probe = smmu_pmu_probe, .remove = smmu_pmu_remove,
drivers/perf/arm_spe_pmu.c +1 -0
@@ -1228,6 +1228,7 @@ static struct platform_driver arm_spe_pmu_driver = { .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(arm_spe_pmu_of_match), + .suppress_bind_attrs = true, }, .probe = arm_spe_pmu_device_probe, .remove = arm_spe_pmu_device_remove,
drivers/perf/fsl_imx8_ddr_perf.c +2 -0
@@ -451,6 +451,7 @@ static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base, { *pmu = (struct ddr_pmu ) { .pmu = (struct pmu ) { + .module =THIS_MODULE , .capabilities =PERF_PMU_CAP_NO_EXCLUDE , .task_ctx_nr = perf_invalid_context, .attr_groups = attr_groups,
@@ -645,6 +646,7 @@ static struct platform_driver imx_ddr_pmu_driver = { .driver = { .name = "imx-ddr-pmu", .of_match_table = imx_ddr_pmu_dt_ids, + .suppress_bind_attrs = true, }, .probe = ddr_perf_probe, .remove = ddr_perf_remove,
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c +2 -0
@@ -381,6 +381,7 @@ static int hisi_ddrc_pmu_probe(struct platform_device *pdev) ddrc_pmu->sccl_id, ddrc_pmu->index_id); ddrc_pmu->pmu = (struct pmu ) { .name = name, + .module =THIS_MODULE , .task_ctx_nr = perf_invalid_context, .event_init = hisi_uncore_pmu_event_init, .pmu_enable = hisi_uncore_pmu_enable,
@@ -419,6 +420,7 @@ static struct platform_driver hisi_ddrc_pmu_driver = { .driver = { .name = "hisi_ddrc_pmu", .acpi_match_table = ACPI_PTR(hisi_ddrc_pmu_acpi_match), + .suppress_bind_attrs = true, }, .probe = hisi_ddrc_pmu_probe, .remove = hisi_ddrc_pmu_remove,
drivers/perf/hisilicon/hisi_uncore_hha_pmu.c +2 -0
@@ -392,6 +392,7 @@ static int hisi_hha_pmu_probe(struct platform_device *pdev) hha_pmu->sccl_id, hha_pmu->index_id); hha_pmu->pmu = (struct pmu ) { .name = name, + .module =THIS_MODULE , .task_ctx_nr = perf_invalid_context, .event_init = hisi_uncore_pmu_event_init, .pmu_enable = hisi_uncore_pmu_enable,
@@ -430,6 +431,7 @@ static struct platform_driver hisi_hha_pmu_driver = { .driver = { .name = "hisi_hha_pmu", .acpi_match_table = ACPI_PTR(hisi_hha_pmu_acpi_match), + .suppress_bind_attrs = true, }, .probe = hisi_hha_pmu_probe, .remove = hisi_hha_pmu_remove,
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +2 -0
@@ -382,6 +382,7 @@ static int hisi_l3c_pmu_probe(struct platform_device *pdev) l3c_pmu->sccl_id, l3c_pmu->index_id); l3c_pmu->pmu = (struct pmu ) { .name = name, + .module =THIS_MODULE , .task_ctx_nr = perf_invalid_context, .event_init = hisi_uncore_pmu_event_init, .pmu_enable = hisi_uncore_pmu_enable,
@@ -420,6 +421,7 @@ static struct platform_driver hisi_l3c_pmu_driver = { .driver = { .name = "hisi_l3c_pmu", .acpi_match_table = ACPI_PTR(hisi_l3c_pmu_acpi_match), + .suppress_bind_attrs = true, }, .probe = hisi_l3c_pmu_probe, .remove = hisi_l3c_pmu_remove,
drivers/perf/qcom_l2_pmu.c +1 -0
@@ -1028,6 +1028,7 @@ static struct platform_driver l2_cache_pmu_driver = { .driver = { .name = "qcom-l2cache-pmu", .acpi_match_table = ACPI_PTR(l2_cache_pmu_acpi_match), + .suppress_bind_attrs = true, }, .probe = l2_cache_pmu_probe, .remove = l2_cache_pmu_remove,
drivers/perf/qcom_l3_pmu.c +1 -0
@@ -814,6 +814,7 @@ static struct platform_driver qcom_l3_cache_pmu_driver = { .driver = { .name = "qcom-l3cache-pmu", .acpi_match_table = ACPI_PTR(qcom_l3_cache_pmu_acpi_match), + .suppress_bind_attrs = true, }, .probe = qcom_l3_cache_pmu_probe, };
drivers/perf/thunderx2_pmu.c +1 -0
@@ -816,6 +816,7 @@ static struct platform_driver tx2_uncore_driver = { .driver = { .name = "tx2-uncore-pmu", .acpi_match_table = ACPI_PTR(tx2_uncore_acpi_match), + .suppress_bind_attrs = true, }, .probe = tx2_uncore_probe, .remove = tx2_uncore_remove,
drivers/perf/xgene_pmu.c +1 -0
@@ -1981,6 +1981,7 @@ static struct platform_driver xgene_pmu_driver = { .name = "xgene-pmu", .of_match_table = xgene_pmu_of_match, .acpi_match_table = ACPI_PTR(xgene_pmu_acpi_match), + .suppress_bind_attrs = true, }, };
drivers/pinctrl/pinctrl-amd.h +1 -1
@@ -252,7 +252,7 @@ static const struct amd_pingroup kerncz_groups[] = { { .name = "uart0", .pins = uart0_pins, - .npins = 9, + .npins = 5, }, { .name = "uart1",
drivers/platform/x86/asus-wmi.c +1 -0
@@ -424,6 +424,7 @@ static int asus_wmi_battery_add(struct power_supply *battery)* battery is named BATT. */ if (strcmp (battery->desc->name,"BAT0" ) !=0 && +strcmp (battery->desc->name,"BAT1" ) !=0 &&strcmp (battery->desc->name,"BATT" ) !=0 )return -ENODEV ;
drivers/platform/x86/intel_speed_select_if/isst_if_common.h +3 -0
@@ -13,6 +13,9 @@#define INTEL_RAPL_PRIO_DEVID_0 0x3451#define INTEL_CFG_MBOX_DEVID_0 0x3459 +#define INTEL_RAPL_PRIO_DEVID_1 0x3251 +#define INTEL_CFG_MBOX_DEVID_1 0x3259 +/* * Validate maximum commands in a single request. * This is enough to handle command to every core in one ioctl, or all
drivers/platform/x86/intel_speed_select_if/isst_if_mbox_pci.c +1 -0
@@ -148,6 +148,7 @@ static long isst_if_mbox_proc_cmd(u8 *cmd_ptr, int *write_only, int resume)static const struct pci_device_id isst_if_mbox_ids[] = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,INTEL_CFG_MBOX_DEVID_0 )}, + {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,INTEL_CFG_MBOX_DEVID_1 )}, {0 }, };MODULE_DEVICE_TABLE (pci, isst_if_mbox_ids);
drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c +1 -0
@@ -72,6 +72,7 @@ static long isst_if_mmio_rd_wr(u8 *cmd_ptr, int *write_only, int resume)static const struct pci_device_id isst_if_ids[] = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,INTEL_RAPL_PRIO_DEVID_0 )}, + {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,INTEL_RAPL_PRIO_DEVID_1 )}, {0 }, };MODULE_DEVICE_TABLE (pci, isst_if_ids);
drivers/scsi/mpt3sas/mpt3sas_ctl.c +7 -5
@@ -2921,19 +2921,18 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,if (!ioc->is_warpdrive) {ioc_err (ioc,"%s: BRM attribute is only for warpdrive\n" , __func__); - goto out; +return 0 ; }/* pci_access_mutex lock acquired by sysfs show path */ mutex_lock (&ioc->pci_access_mutex); -if (ioc->pci_error_recovery || ioc->remove_host) { -mutex_unlock (&ioc->pci_access_mutex); -return 0 ; - } +if (ioc->pci_error_recovery || ioc->remove_host) + goto out;/* allocate upto GPIOVal 36 entries */ sz = offsetof(Mpi2IOUnitPage3_t , GPIOVal) + (sizeof (u16) *36 ); io_unit_pg3 =kzalloc (sz,GFP_KERNEL );if (!io_unit_pg3) { + rc = -ENOMEM ;ioc_err (ioc,"%s: failed allocating memory for iounit_pg3: (%d) bytes\n" , __func__, sz); goto out;
@@ -2943,6 +2942,7 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr, 0) {ioc_err (ioc,"%s: failed reading iounit_pg3\n" , __func__); + rc = -EINVAL ; goto out; }
@@ -2950,12 +2950,14 @@ BRM_status_show(struct device *cdev, struct device_attribute *attr,if (ioc_status !=MPI2_IOCSTATUS_SUCCESS ) {ioc_err (ioc,"%s: iounit_pg3 failed with ioc_status(0x%04x)\n" , __func__, ioc_status); + rc = -EINVAL ; goto out; }if (io_unit_pg3->GPIOCount <25 ) {ioc_err (ioc,"%s: iounit_pg3->GPIOCount less than 25 entries, detected (%d) entries\n" , __func__, io_unit_pg3->GPIOCount); + rc = -EINVAL ; goto out; }
drivers/scsi/scsi_devinfo.c +1 -0
@@ -239,6 +239,7 @@ static struct { {"LSI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"ENGENIO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"LENOVO", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, + {"FUJITSU", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"SanDisk", "Cruzer Blade", NULL, BLIST_TRY_VPD_PAGES | BLIST_INQUIRY_36}, {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36},
drivers/scsi/scsi_dh.c +1 -0
@@ -63,6 +63,7 @@ static const struct scsi_dh_blist scsi_dh_blist[] = { {"LSI", "INF-01-00", "rdac", }, {"ENGENIO", "INF-01-00", "rdac", }, {"LENOVO", "DE_Series", "rdac", }, + {"FUJITSU", "ETERNUS_AHB", "rdac", }, {NULL, NULL, NULL }, };
drivers/scsi/scsi_transport_spi.c +1 -1
@@ -339,7 +339,7 @@ store_spi_transport_##field(struct device *dev, \struct spi_transport_attrs *tp \ = (struct spi_transport_attrs *)&starget->starget_data; \ \ - if (i->f->set_##field) \ + if (!i->f->set_##field) \ return -EINVAL; \ val = simple_strtoul(buf, NULL, 0); \ if (val > tp->max_##field) \
drivers/soc/qcom/rpmh.c +4 -4
@@ -150,10 +150,10 @@ static struct cache_req *cache_rpm_request(struct rpmh_ctrlr *ctrlr,break ; } - ctrlr->dirty = (req->sleep_val != old_sleep_val || - req->wake_val != old_wake_val) && - req->sleep_val !=UINT_MAX && - req->wake_val !=UINT_MAX ; + ctrlr->dirty |= (req->sleep_val != old_sleep_val || + req->wake_val != old_wake_val) && + req->sleep_val !=UINT_MAX && + req->wake_val !=UINT_MAX ; unlock:spin_unlock_irqrestore (&ctrlr->cache_lock, flags);
drivers/spi/spi-mt65xx.c +8 -7
@@ -36,7 +36,6 @@#define SPI_CFG0_SCK_LOW_OFFSET 8#define SPI_CFG0_CS_HOLD_OFFSET 16#define SPI_CFG0_CS_SETUP_OFFSET 24 -#define SPI_ADJUST_CFG0_SCK_LOW_OFFSET 16#define SPI_ADJUST_CFG0_CS_HOLD_OFFSET 0#define SPI_ADJUST_CFG0_CS_SETUP_OFFSET 16
@@ -48,6 +47,8 @@#define SPI_CFG1_CS_IDLE_MASK 0xff#define SPI_CFG1_PACKET_LOOP_MASK 0xff00#define SPI_CFG1_PACKET_LENGTH_MASK 0x3ff0000 +#define SPI_CFG2_SCK_HIGH_OFFSET 0 +#define SPI_CFG2_SCK_LOW_OFFSET 16#define SPI_CMD_ACT BIT(0)#define SPI_CMD_RESUME BIT(1)
@@ -279,7 +280,7 @@ static void mtk_spi_set_cs(struct spi_device *spi, bool enable)static void mtk_spi_prepare_transfer (struct spi_master *master,struct spi_transfer *xfer) { -u32 spi_clk_hz, div, sck_time, cs_time, reg_val =0 ; +u32 spi_clk_hz, div, sck_time, cs_time, reg_val;struct mtk_spi *mdata =spi_master_get_devdata (master); spi_clk_hz =clk_get_rate (mdata->spi_clk);
@@ -292,18 +293,18 @@ static void mtk_spi_prepare_transfer(struct spi_master *master, cs_time = sck_time *2 ;if (mdata->dev_comp->enhance_timing) { + reg_val = (((sck_time -1 ) &0xffff ) + <<SPI_CFG2_SCK_HIGH_OFFSET ); reg_val |= (((sck_time -1 ) &0xffff ) - <<SPI_CFG0_SCK_HIGH_OFFSET ); - reg_val |= (((sck_time -1 ) &0xffff ) - <<SPI_ADJUST_CFG0_SCK_LOW_OFFSET ); + <<SPI_CFG2_SCK_LOW_OFFSET );writel (reg_val, mdata->base +SPI_CFG2_REG ); - reg_val |= (((cs_time -1 ) &0xffff ) + reg_val = (((cs_time -1 ) &0xffff ) <<SPI_ADJUST_CFG0_CS_HOLD_OFFSET ); reg_val |= (((cs_time -1 ) &0xffff ) <<SPI_ADJUST_CFG0_CS_SETUP_OFFSET );writel (reg_val, mdata->base +SPI_CFG0_REG ); }else { - reg_val |= (((sck_time -1 ) &0xff ) + reg_val = (((sck_time -1 ) &0xff ) <<SPI_CFG0_SCK_HIGH_OFFSET ); reg_val |= (((sck_time -1 ) &0xff ) <<SPI_CFG0_SCK_LOW_OFFSET ); reg_val |= (((cs_time -1 ) &0xff ) <<SPI_CFG0_CS_HOLD_OFFSET );
drivers/staging/comedi/drivers/addi_apci_1032.c +14 -6
@@ -106,14 +106,22 @@ static int apci1032_cos_insn_config(struct comedi_device *dev, unsigned int *data) {struct apci1032_private *devpriv = dev->private; -unsigned int shift, oldmask; +unsigned int shift, oldmask, himask, lomask;switch (data[0 ]) {case INSN_CONFIG_DIGITAL_TRIG :if (data[1 ] !=0 )return -EINVAL ; shift = data[3 ]; - oldmask = (1U << shift) -1 ; +if (shift <32 ) { + oldmask = (1U << shift) -1 ; + himask = data[4 ] << shift; + lomask = data[5 ] << shift; + }else { + oldmask =0xffffffffu ; + himask =0 ; + lomask =0 ; + }switch (data[2 ]) {case COMEDI_DIGITAL_TRIG_DISABLE : devpriv->ctrl =0 ;
@@ -136,8 +144,8 @@ static int apci1032_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS : if (devpriv->ctrl != (APCI1032_CTRL_INT_ENA |
@@ -154,8 +162,8 @@ static int apci1032_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;default :return -EINVAL ;
drivers/staging/comedi/drivers/addi_apci_1500.c +19 -5
@@ -452,13 +452,14 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,struct apci1500_private *devpriv = dev->private;unsigned int trig = data[1 ];unsigned int shift = data[3 ]; -unsigned int hi_mask = data[4 ] << shift; -unsigned int lo_mask = data[5 ] << shift; -unsigned int chan_mask = hi_mask | lo_mask; -unsigned int old_mask = (1 << shift) -1 ; +unsigned int hi_mask; +unsigned int lo_mask; +unsigned int chan_mask; +unsigned int old_mask;unsigned int pm;unsigned int pt;unsigned int pp; +unsigned int invalid_chan;if (trig >1 ) { dev_dbg(dev->class_dev,
@@ -466,7 +467,20 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,return -EINVAL ; } -if (chan_mask >0xffff ) { +if (shift <=16 ) { + hi_mask = data[4 ] << shift; + lo_mask = data[5 ] << shift; + old_mask = (1U << shift) -1 ; + invalid_chan = (data[4 ] | data[5 ]) >> (16 - shift); + }else { + hi_mask =0 ; + lo_mask =0 ; + old_mask =0xffff ; + invalid_chan = data[4 ] | data[5 ]; + } + chan_mask = hi_mask | lo_mask; + +if (invalid_chan) {dev_dbg (dev->class_dev,"invalid digital trigger channel\n" );return -EINVAL ; }
drivers/staging/comedi/drivers/addi_apci_1564.c +14 -6
@@ -331,14 +331,22 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, unsigned int *data) {struct apci1564_private *devpriv = dev->private; -unsigned int shift, oldmask; +unsigned int shift, oldmask, himask, lomask;switch (data[0 ]) {case INSN_CONFIG_DIGITAL_TRIG :if (data[1 ] !=0 )return -EINVAL ; shift = data[3 ]; - oldmask = (1U << shift) -1 ; +if (shift <32 ) { + oldmask = (1U << shift) -1 ; + himask = data[4 ] << shift; + lomask = data[5 ] << shift; + }else { + oldmask =0xffffffffu ; + himask =0 ; + lomask =0 ; + }switch (data[2 ]) {case COMEDI_DIGITAL_TRIG_DISABLE : devpriv->ctrl =0 ;
@@ -362,8 +370,8 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS : if (devpriv->ctrl != (APCI1564_DI_IRQ_ENA |
@@ -380,8 +388,8 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;default :return -EINVAL ;
drivers/staging/comedi/drivers/ni_6527.c +1 -1
@@ -332,7 +332,7 @@ static int ni6527_intr_insn_config(struct comedi_device *dev,case COMEDI_DIGITAL_TRIG_ENABLE_EDGES :/* check shift amount */ shift = data[3 ]; -if (shift >= s->n_chan) { +if (shift >=32 ) { mask =0 ; rising =0 ; falling =0 ;
drivers/staging/wlan-ng/prism2usb.c +15 -1
@@ -61,11 +61,25 @@ static int prism2sta_probe_usb(struct usb_interface *interface, const struct usb_device_id *id) {struct usb_device *dev; - +const struct usb_endpoint_descriptor *epd; +const struct usb_host_interface *iface_desc = interface->cur_altsetting;struct wlandevice *wlandev =NULL ;struct hfa384x *hw =NULL ;int result =0 ; +if (iface_desc->desc.bNumEndpoints !=2 ) { + result = -ENODEV ; + goto failed; + } + + result = -EINVAL ; + epd = &iface_desc->endpoint[1 ].desc; +if (!usb_endpoint_is_bulk_in (epd)) + goto failed; + epd = &iface_desc->endpoint[2 ].desc; +if (!usb_endpoint_is_bulk_out (epd)) + goto failed; + dev =interface_to_usbdev (interface); wlandev =create_wlan ();if (!wlandev) {
drivers/tty/serial/8250/8250_core.c +1 -1
@@ -524,6 +524,7 @@ static void __init serial8250_isa_init_ports(void)*/ up->mcr_mask = ~ALPHA_KLUDGE_MCR ; up->mcr_force =ALPHA_KLUDGE_MCR ; +serial8250_set_defaults (up); }/* chain base port ops to support Remote Supervisor Adapter */
@@ -547,7 +548,6 @@ static void __init serial8250_isa_init_ports(void) port->membase = old_serial_port[i].iomem_base; port->iotype = old_serial_port[i].io_type; port->regshift = old_serial_port[i].iomem_reg_shift; -serial8250_set_defaults (up); port->irqflags |= irqflag;if (serial8250_isa_config !=NULL )
drivers/tty/serial/8250/8250_exar.c +11 -1
@@ -307,7 +307,17 @@ static void setup_gpio(struct pci_dev *pcidev, u8 __iomem *p)* devices will export them as GPIOs, so we pre-configure them safely * as inputs. */ -u8 dir = pcidev->vendor ==PCI_VENDOR_ID_EXAR ?0xff :0x00 ; + +u8 dir =0x00 ; + +if ((pcidev->vendor ==PCI_VENDOR_ID_EXAR ) && + (pcidev->subsystem_vendor !=PCI_VENDOR_ID_SEALEVEL )) { +// Configure GPIO as inputs for Commtech adapters + dir =0xff ; + }else { +// Configure GPIO as outputs for SeaLevel adapters + dir =0x00 ; + }writeb (0x00 , p +UART_EXAR_MPIOINT_7_0 );writeb (0x00 , p +UART_EXAR_MPIOLVL_7_0 );
drivers/tty/serial/8250/8250_mtk.c +18 -0
@@ -305,8 +305,21 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, }#endif +/* +* Store the requested baud rate before calling the generic 8250 +* set_termios method. Standard 8250 port expects bauds to be +* no higher than (uartclk / 16) so the baud will be clamped if it +* gets out of that bound. Mediatek 8250 port supports speed +* higher than that, therefore we'll get original baud rate back +* after calling the generic set_termios method and recalculate +* the speed later in this method. +*/ + baud =tty_termios_baud_rate (termios); +serial8250_do_set_termios (port, termios, old); +tty_termios_encode_baud_rate (termios, baud, baud); +/* * Mediatek UARTs use an extra highspeed register (MTK_UART_HIGHS) *
@@ -338,6 +351,11 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,*/ spin_lock_irqsave (&port->lock, flags); +/* +* Update the per-port timeout. +*/ +uart_update_timeout (port, termios->c_cflag, baud); +/* set DLAB we have cval saved in up->lcr from the call to the core */ serial_port_out (port,UART_LCR , up->lcr |UART_LCR_DLAB );serial_dl_write (up, quot);
drivers/tty/serial/serial-tegra.c +5 -2
@@ -651,11 +651,14 @@ static void tegra_uart_handle_rx_pio(struct tegra_uart_port *tup, ch = (unsigned char )tegra_uart_read (tup,UART_RX ); tup->uport.icount.rx++; -if (!uart_handle_sysrq_char (&tup->uport, ch) && tty) -tty_insert_flip_char (tty, ch, flag); +if (uart_handle_sysrq_char (&tup->uport, ch)) +continue ;if (tup->uport.ignore_status_mask &UART_LSR_DR )continue ; + +if (tty) +tty_insert_flip_char (tty, ch, flag); }while (1 ); }
drivers/tty/serial/xilinx_uartps.c +6 -2
@@ -1559,8 +1559,10 @@ static int cdns_uart_probe(struct platform_device *pdev)* If register_console() don't assign value, then console_port pointer * is cleanup. */ -if (!console_port) +if (!console_port) { + cdns_uart_console.index = id; console_port = port; + }#endif rc =uart_add_one_port (&cdns_uart_uart_driver, port);
@@ -1573,8 +1575,10 @@ static int cdns_uart_probe(struct platform_device *pdev)#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE /* This is not port which is used for console that's why clean it up */ if (console_port == port && - !(cdns_uart_uart_driver.cons->flags &CON_ENABLED )) + !(cdns_uart_uart_driver.cons->flags &CON_ENABLED )) { console_port =NULL ; + cdns_uart_console.index =-1 ; + }#endif cdns_uart_data->cts_override = of_property_read_bool(pdev->dev.of_node,
drivers/tty/vt/vt.c +18 -11
@@ -1092,10 +1092,19 @@ static const struct tty_port_operations vc_port_ops = { .destruct = vc_port_destruct, }; +/* +* Change # of rows and columns (0 means unchanged/the size of fg_console) +* [this is to be used together with some user program +* like resize that changes the hardware videomode] +*/ +#define VC_MAXCOL (32767) +#define VC_MAXROW (32767) +int vc_allocate (unsigned int currcons)/* return 0 on success */ {struct vt_notifier_param param;struct vc_data *vc; +int err;WARN_CONSOLE_UNLOCKED ();
@@ -1125,6 +1134,11 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */if (!*vc->vc_uni_pagedir_loc)con_set_default_unimap (vc); + err = -EINVAL ; +if (vc->vc_cols >VC_MAXCOL || vc->vc_rows >VC_MAXROW || + vc->vc_screenbuf_size >KMALLOC_MAX_SIZE || !vc->vc_screenbuf_size) + goto err_free; + err = -ENOMEM ; vc->vc_screenbuf =kzalloc (vc->vc_screenbuf_size,GFP_KERNEL );if (!vc->vc_screenbuf) goto err_free;
@@ -1143,7 +1157,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */visual_deinit (vc);kfree (vc); vc_cons[currcons].d =NULL ; -return -ENOMEM ; +return err; } static inline int resize_screen(struct vc_data *vc, int width, int height,
@@ -1158,14 +1172,6 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,return err; } -/* -* Change # of rows and columns (0 means unchanged/the size of fg_console) -* [this is to be used together with some user program -* like resize that changes the hardware videomode] -*/ -#define VC_RESIZE_MAXCOL (32767) -#define VC_RESIZE_MAXROW (32767) -/** * vc_do_resize - resizing method for the tty * @tty: tty being resized
@@ -1201,7 +1207,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, user = vc->vc_resize_user; vc->vc_resize_user =0 ; -if (cols >VC_RESIZE_MAXCOL || lines >VC_RESIZE_MAXROW ) +if (cols >VC_MAXCOL || lines >VC_MAXROW )return -EINVAL ; new_cols = (cols ? cols : vc->vc_cols);
@@ -1212,7 +1218,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)return 0 ; -if (new_screen_size >KMALLOC_MAX_SIZE ) +if (new_screen_size >KMALLOC_MAX_SIZE || !new_screen_size)return -EINVAL ; newscreen =kzalloc (new_screen_size,GFP_USER );if (!newscreen)
@@ -3396,6 +3402,7 @@ static int __init con_init(void)INIT_WORK (&vc_cons[currcons].SAK_work, vc_SAK);tty_port_init (&vc->port);visual_init (vc, currcons,1 ); +/* Assuming vc->vc_{cols,rows,screenbuf_size} are sane here. */ vc->vc_screenbuf =kzalloc (vc->vc_screenbuf_size,GFP_NOWAIT );vc_init (vc, vc->vc_rows, vc->vc_cols, currcons || !vc->vc_sw->con_save_screen);
drivers/usb/cdns3/ep0.c +15 -15
@@ -37,18 +37,18 @@ static void cdns3_ep0_run_transfer(struct cdns3_device *priv_dev,struct cdns3_usb_regs __iomem *regs = priv_dev->regs;struct cdns3_endpoint *priv_ep = priv_dev->eps[0 ]; - priv_ep->trb_pool[0 ].buffer =TRB_BUFFER (dma_addr); - priv_ep->trb_pool[0 ].length =TRB_LEN (length); + priv_ep->trb_pool[0 ].buffer =cpu_to_le32 (TRB_BUFFER (dma_addr)); + priv_ep->trb_pool[0 ].length =cpu_to_le32 (TRB_LEN (length));if (zlp) { - priv_ep->trb_pool[0 ].control =TRB_CYCLE |TRB_TYPE (TRB_NORMAL ); - priv_ep->trb_pool[1 ].buffer =TRB_BUFFER (dma_addr); - priv_ep->trb_pool[1 ].length =TRB_LEN (0 ); - priv_ep->trb_pool[1 ].control =TRB_CYCLE |TRB_IOC | -TRB_TYPE (TRB_NORMAL ); + priv_ep->trb_pool[0 ].control =cpu_to_le32 (TRB_CYCLE |TRB_TYPE (TRB_NORMAL )); + priv_ep->trb_pool[1 ].buffer =cpu_to_le32 (TRB_BUFFER (dma_addr)); + priv_ep->trb_pool[1 ].length =cpu_to_le32 (TRB_LEN (0 )); + priv_ep->trb_pool[1 ].control =cpu_to_le32 (TRB_CYCLE |TRB_IOC | +TRB_TYPE (TRB_NORMAL )); }else { - priv_ep->trb_pool[0 ].control =TRB_CYCLE |TRB_IOC | -TRB_TYPE (TRB_NORMAL ); + priv_ep->trb_pool[0 ].control =cpu_to_le32 (TRB_CYCLE |TRB_IOC | +TRB_TYPE (TRB_NORMAL )); priv_ep->trb_pool[1 ].control =0 ; }
@@ -264,11 +264,11 @@ static int cdns3_req_ep0_get_status(struct cdns3_device *priv_dev,case USB_RECIP_INTERFACE :return cdns3_ep0_delegate_req (priv_dev, ctrl);case USB_RECIP_ENDPOINT : - index =cdns3_ep_addr_to_index (ctrl->wIndex); + index =cdns3_ep_addr_to_index (le16_to_cpu (ctrl->wIndex)); priv_ep = priv_dev->eps[index];/* check if endpoint is stalled or stall is pending */ -cdns3_select_ep (priv_dev, ctrl->wIndex); +cdns3_select_ep (priv_dev,le16_to_cpu (ctrl->wIndex));if (EP_STS_STALL (readl (&priv_dev->regs->ep_sts)) || (priv_ep->flags &EP_STALL_PENDING )) usb_status =BIT (USB_ENDPOINT_HALT );
@@ -388,10 +388,10 @@ static int cdns3_ep0_feature_handle_endpoint(struct cdns3_device *priv_dev,if (!(ctrl->wIndex & ~USB_DIR_IN ))return 0 ; - index =cdns3_ep_addr_to_index (ctrl->wIndex); + index =cdns3_ep_addr_to_index (le16_to_cpu (ctrl->wIndex)); priv_ep = priv_dev->eps[index]; -cdns3_select_ep (priv_dev, ctrl->wIndex); +cdns3_select_ep (priv_dev,le16_to_cpu (ctrl->wIndex));if (set)__cdns3_gadget_ep_set_halt (priv_ep);
@@ -452,7 +452,7 @@ static int cdns3_req_ep0_set_sel(struct cdns3_device *priv_dev,if (priv_dev->gadget.state <USB_STATE_ADDRESS )return -EINVAL ; -if (ctrl_req->wLength !=6 ) { +if (le16_to_cpu (ctrl_req->wLength) !=6 ) {dev_err (priv_dev->dev,"Set SEL should be 6 bytes, got %d\n" , ctrl_req->wLength);return -EINVAL ;
@@ -476,7 +476,7 @@ static int cdns3_req_ep0_set_isoch_delay(struct cdns3_device *priv_dev,if (ctrl_req->wIndex || ctrl_req->wLength)return -EINVAL ; - priv_dev->isoch_delay = ctrl_req->wValue; + priv_dev->isoch_delay =le16_to_cpu (ctrl_req->wValue);return 0 ; }
drivers/usb/cdns3/trace.h +3 -3
@@ -333,9 +333,9 @@ DECLARE_EVENT_CLASS(cdns3_log_trb,TP_fast_assign ( __assign_str(name, priv_ep->name); __entry->trb = trb; - __entry->buffer = trb->buffer; - __entry->length = trb->length; - __entry->control = trb->control; + __entry->buffer =le32_to_cpu (trb->buffer); + __entry->length =le32_to_cpu (trb->length); + __entry->control =le32_to_cpu (trb->control); __entry->type =usb_endpoint_type (priv_ep->endpoint.desc); ), TP_printk("%s: trb %p, dma buf: 0x%08x, size: %ld, burst: %d ctrl: 0x%08x (%s%s%s%s%s%s%s)",
drivers/usb/dwc3/dwc3-pci.c +8 -0
@@ -38,6 +38,8 @@#define PCI_DEVICE_ID_INTEL_ICLLP 0x34ee#define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e#define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee +#define PCI_DEVICE_ID_INTEL_TGPH 0x43ee +#define PCI_DEVICE_ID_INTEL_JSP 0x4dee#define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"#define PCI_INTEL_BXT_FUNC_PMU_PWR 4
@@ -358,6 +360,12 @@ static const struct pci_device_id dwc3_pci_id_table[] = { {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_TGPLP ), (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGPH), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_JSP), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), (kernel_ulong_t) &dwc3_pci_amd_properties, }, { } /* Terminating Entry */
drivers/usb/gadget/udc/gr_udc.c +5 -2
@@ -1980,9 +1980,12 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit)if (num ==0 ) { _req =gr_alloc_request (&ep->ep,GFP_ATOMIC ); +if (!_req) +return -ENOMEM ; + buf =devm_kzalloc (dev->dev,PAGE_SIZE ,GFP_DMA |GFP_ATOMIC ); -if (!_req || !buf) { -/* possible _req freed by gr_probe via gr_remove */ +if (!buf) { +gr_free_request (&ep->ep, _req);return -ENOMEM ; }
drivers/usb/host/xhci-mtk-sch.c +4 -0
@@ -557,6 +557,10 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,if (is_fs_or_ls (speed) && !has_tt)return false; +/* skip endpoint with zero maxpkt */ +if (usb_endpoint_maxp (&ep->desc) ==0 ) +return false; +return true; }
drivers/usb/host/xhci-pci.c +3 -0
@@ -250,6 +250,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==0x1142 ) xhci->quirks |=XHCI_TRUST_TX_LENGTH ; +if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && + pdev->device ==0x2142 ) + xhci->quirks |=XHCI_NO_64BIT_SUPPORT ;if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==PCI_DEVICE_ID_ASMEDIA_1042A_XHCI )
drivers/video/fbdev/core/bitblit.c +2 -2
@@ -216,7 +216,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx = info->var.xoffset + rs; region.dy =0 ; region.width = rw;
@@ -224,7 +224,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset; region.dy = info->var.yoffset + bs; region.width = rs;
drivers/video/fbdev/core/fbcon_ccw.c +2 -2
@@ -201,7 +201,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx =0 ; region.dy = info->var.yoffset; region.height = rw;
@@ -209,7 +209,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset + bs; region.dy =0 ; region.height = info->var.yres_virtual;
drivers/video/fbdev/core/fbcon_cw.c +2 -2
@@ -184,7 +184,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx =0 ; region.dy = info->var.yoffset + rs; region.height = rw;
@@ -192,7 +192,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset; region.dy = info->var.yoffset; region.height = info->var.yres;
drivers/video/fbdev/core/fbcon_ud.c +2 -2
@@ -231,7 +231,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dy =0 ; region.dx = info->var.xoffset; region.width = rw;
@@ -239,7 +239,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dy = info->var.yoffset; region.dx = info->var.xoffset; region.height = bh;
fs/btrfs/backref.c +1 -0
@@ -1422,6 +1422,7 @@ static int btrfs_find_all_roots_safe(struct btrfs_trans_handle *trans,if (ret <0 && ret != -ENOENT ) {ulist_free (tmp);ulist_free (*roots); + *roots =NULL ;return ret; } node =ulist_next (tmp, &uiter);
fs/btrfs/extent_io.c +2 -1
@@ -1923,7 +1923,8 @@ static int __process_pages_contig(struct address_space *mapping,if (!PageDirty (pages[i]) || pages[i]->mapping != mapping) {unlock_page (pages[i]); -put_page (pages[i]); +for (; i < ret; i++) +put_page (pages[i]); err = -EAGAIN ; goto out; }
fs/btrfs/relocation.c +8 -3
@@ -2525,12 +2525,10 @@ void merge_reloc_roots(struct reloc_control *rc) reloc_root =list_entry (reloc_roots.next, struct btrfs_root, root_list); + root =read_fs_root (fs_info, reloc_root->root_key.offset);if (btrfs_root_refs (&reloc_root->root_item) >0 ) { - root =read_fs_root (fs_info, - reloc_root->root_key.offset);BUG_ON (IS_ERR (root));BUG_ON (root->reloc_root != reloc_root); - ret =merge_reloc_root (rc, root);if (ret) {if (list_empty (&reloc_root->root_list))
@@ -2539,6 +2537,13 @@ void merge_reloc_roots(struct reloc_control *rc) goto out; } }else { +if (!IS_ERR (root)) { +if (root->reloc_root == reloc_root) + root->reloc_root =NULL ; +clear_bit (BTRFS_ROOT_DEAD_RELOC_TREE , + &root->state); + } +list_del_init (&reloc_root->root_list);/* Don't forget to queue this reloc root for cleanup */ list_add_tail(&reloc_root->reloc_dirty_list,
fs/btrfs/volumes.c +8 -0
@@ -7269,6 +7269,14 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)mutex_lock (&uuid_mutex);mutex_lock (&fs_info->chunk_mutex); +/* +* It is possible for mount and umount to race in such a way that +* we execute this code path, but open_fs_devices failed to clear +* total_rw_bytes. We certainly want it cleared before reading the +* device items, so clear it here. +*/ + fs_info->fs_devices->total_rw_bytes =0 ; +/* * Read all device items, and then all the chunk items. All * device items are found before any chunk item (their object id
fs/cifs/inode.c +2 -8
@@ -1791,7 +1791,6 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,FILE_UNIX_BASIC_INFO *info_buf_target;unsigned int xid;int rc, tmprc; -bool new_target =d_really_is_negative (target_dentry);if (flags & ~RENAME_NOREPLACE )return -EINVAL ;
@@ -1868,13 +1867,8 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,*/ unlink_target: -/* -* If the target dentry was created during the rename, try -* unlinking it if it's not negative -*/ -if (new_target && -d_really_is_positive (target_dentry) && - (rc == -EACCES || rc == -EEXIST )) { +/* Try unlinking the target dentry if it's not negative */ +if (d_really_is_positive (target_dentry) && (rc == -EACCES || rc == -EEXIST )) {if (d_is_dir (target_dentry)) tmprc =cifs_rmdir (target_dir, target_dentry);else
fs/fuse/dev.c +2 -1
@@ -771,7 +771,8 @@ static int fuse_check_page(struct page *page) 1 << PG_uptodate | 1 << PG_lru | 1 << PG_active | - 1 << PG_reclaim))) { + 1 << PG_reclaim | + 1 << PG_waiters))) {pr_warn ("trying to steal weird page\n" );pr_warn (" page=%p index=%li flags=%08lx, count=%i, mapcount=%i, mapping=%p\n" , page, page->index, page->flags,page_count (page),page_mapcount (page), page->mapping);return 1 ;
fs/nfs/direct.c +4 -9
@@ -367,6 +367,8 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq) {struct inode *inode = dreq->inode; +inode_dio_end (inode); +if (dreq->iocb) {long res = (long ) dreq->error;if (dreq->count !=0 ) {
@@ -378,10 +380,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)complete (&dreq->completion); -igrab (inode);nfs_direct_req_release (dreq); -inode_dio_end (inode); -iput (inode); }static void nfs_direct_read_completion (struct nfs_pgio_header *hdr)
@@ -511,10 +510,8 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,* generic layer handle the completion. */ if (requested_bytes ==0 ) { -igrab (inode); -nfs_direct_req_release (dreq);inode_dio_end (inode); -iput (inode); +nfs_direct_req_release (dreq);return result <0 ? result : -EIO ; }
@@ -926,10 +923,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,* generic layer handle the completion. */ if (requested_bytes ==0 ) { -igrab (inode); -nfs_direct_req_release (dreq);inode_dio_end (inode); -iput (inode); +nfs_direct_req_release (dreq);return result <0 ? result : -EIO ; }
fs/nfs/file.c +0 -1
@@ -83,7 +83,6 @@ nfs_file_release(struct inode *inode, struct file *filp)dprintk ("NFS: release(%pD2)\n" , filp);nfs_inc_stats (inode,NFSIOS_VFSRELEASE ); -inode_dio_wait (inode);nfs_file_clear_open_context (filp);return 0 ; }
fs/nfsd/nfs4state.c +19 -1
@@ -506,6 +506,17 @@ find_any_file(struct nfs4_file *f)return ret; } +static struct nfsd_file *find_deleg_file (struct nfs4_file *f) +{ +struct nfsd_file *ret =NULL ; + +spin_lock (&f->fi_lock); +if (f->fi_deleg_file) + ret =nfsd_file_get (f->fi_deleg_file); +spin_unlock (&f->fi_lock); +return ret; +} +static atomic_long_t num_delegations;unsigned long max_delegations;
@@ -2378,6 +2389,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st) oo = ols->st_stateowner; nf = st->sc_file; file =find_any_file (nf); +if (!file) +return 0 ;seq_printf (s,"- 0x%16phN: { type: open, " , &st->sc_stateid);
@@ -2411,6 +2424,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st) oo = ols->st_stateowner; nf = st->sc_file; file =find_any_file (nf); +if (!file) +return 0 ;seq_printf (s,"- 0x%16phN: { type: lock, " , &st->sc_stateid);
@@ -2439,7 +2454,9 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st) ds =delegstateid (st); nf = st->sc_file; - file = nf->fi_deleg_file; + file =find_deleg_file (nf); +if (!file) +return 0 ;seq_printf (s,"- 0x%16phN: { type: deleg, " , &st->sc_stateid);
@@ -2451,6 +2468,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)nfs4_show_superblock (s, file);seq_printf (s," }\n" ); +nfsd_file_put (file);return 0 ; }
include/asm-generic/mmiowb.h +4 -2
@@ -27,7 +27,7 @@#include <asm/smp.h> DECLARE_PER_CPU(struct mmiowb_state, __mmiowb_state); -#define __mmiowb_state () this_cpu_ptr(&__mmiowb_state) +#define __mmiowb_state () raw_cpu_ptr(&__mmiowb_state)#else #define __mmiowb_state () arch_mmiowb_state()#endif /* arch_mmiowb_state */
@@ -35,7 +35,9 @@ DECLARE_PER_CPU(struct mmiowb_state, __mmiowb_state);static inline void mmiowb_set_pending (void ) {struct mmiowb_state *ms =__mmiowb_state (); - ms->mmiowb_pending = ms->nesting_count; + +if (likely (ms->nesting_count)) + ms->mmiowb_pending = ms->nesting_count; }static inline void mmiowb_spin_lock (void )
include/asm-generic/vmlinux.lds.h +4 -1
@@ -306,7 +306,8 @@#define PAGE_ALIGNED_DATA (page_align) \ . = ALIGN(page_align); \ - *(.data..page_aligned) + *(.data..page_aligned) \ + . = ALIGN(page_align);#define READ_MOSTLY_DATA (align) \ . = ALIGN(align); \
@@ -695,7 +696,9 @@ . = ALIGN(bss_align); \ .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \BSS_FIRST_SECTIONS \ + . = ALIGN(PAGE_SIZE); \ *(.bss..page_aligned) \ + . = ALIGN(PAGE_SIZE); \ *(.dynbss) \ *(BSS_MAIN ) \ *(COMMON ) \
include/linux/device-mapper.h +1 -0
@@ -420,6 +420,7 @@ const char *dm_device_name(struct mapped_device *md);int dm_copy_name_and_uuid (struct mapped_device *md,char *name,char *uuid);struct gendisk *dm_disk (struct mapped_device *md);int dm_suspended (struct dm_target *ti); +int dm_post_suspending (struct dm_target *ti);int dm_noflush_suspending (struct dm_target *ti);void dm_accept_partial_bio (struct bio *bio,unsigned n_sectors); void dm_remap_zone_report(struct dm_target *ti, sector_t start,
include/linux/dma-buf.h +1 -0
@@ -303,6 +303,7 @@ struct dma_buf {void *vmap_ptr;const char *exp_name;const char *name; +spinlock_t name_lock;/* spinlock to protect name access */ struct module *owner;struct list_head list_node;void *priv;
include/linux/io-mapping.h +4 -1
@@ -108,9 +108,12 @@ io_mapping_init_wc(struct io_mapping *iomap, resource_size_t base, unsigned long size) { + iomap->iomem =ioremap_wc (base, size); +if (!iomap->iomem) +return NULL ; + iomap->base = base; iomap->size = size; - iomap->iomem =ioremap_wc (base, size);#if defined(pgprot_noncached_wc)/* archs can't agree on a name ... */ iomap->prot =pgprot_noncached_wc (PAGE_KERNEL );#elif defined(pgprot_writecombine)
include/linux/mod_devicetable.h +1 -1
@@ -318,7 +318,7 @@ struct pcmcia_device_id {#define INPUT_DEVICE_ID_LED_MAX 0x0f#define INPUT_DEVICE_ID_SND_MAX 0x07#define INPUT_DEVICE_ID_FF_MAX 0x7f -#define INPUT_DEVICE_ID_SW_MAX 0x0f +#define INPUT_DEVICE_ID_SW_MAX 0x10#define INPUT_DEVICE_ID_PROP_MAX 0x1f#define INPUT_DEVICE_ID_MATCH_BUS 1
include/sound/rt5670.h +1 -0
@@ -12,6 +12,7 @@ struct rt5670_platform_data {int jd_mode;bool in2_diff;bool dev_gpio; +bool gpio1_is_ext_spk_en;bool dmic_en;unsigned int dmic1_data_pin;
include/uapi/linux/input-event-codes.h +2 -1
@@ -808,7 +808,8 @@#define SW_LINEIN_INSERT 0x0d/* set = inserted */ #define SW_MUTE_DEVICE 0x0e/* set = device disabled */ #define SW_PEN_INSERTED 0x0f/* set = pen inserted */ -#define SW_MAX 0x0f +#define SW_MACHINE_COVER 0x10/* set = cover closed */ +#define SW_MAX 0x10#define SW_CNT (SW_MAX+1)/*
kernel/events/uprobes.c +1 -1
@@ -2205,7 +2205,7 @@ static void handle_swbp(struct pt_regs *regs)if (!uprobe) {if (is_swbp >0 ) {/* No matching uprobe; signal SIGTRAP. */ -send_sig (SIGTRAP , current,0 ); +force_sig (SIGTRAP ); }else {/* * Either we raced with uprobe_unregister() or we can't
mm/khugepaged.c +3 -0
@@ -876,6 +876,9 @@ static int hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address,return SCAN_ADDRESS_RANGE ;if (!hugepage_vma_check (vma, vma->vm_flags))return SCAN_VMA_CHECK ; +/* Anon VMA expected */ +if (!vma->anon_vma || vma->vm_ops) +return SCAN_VMA_CHECK ;return 0 ; }
mm/memcontrol.c +2 -2
@@ -5770,7 +5770,6 @@ static void __mem_cgroup_clear_mc(void)if (!mem_cgroup_is_root (mc.to))page_counter_uncharge (&mc.to->memory, mc.moved_swap); -mem_cgroup_id_get_many (mc.to, mc.moved_swap);css_put_many (&mc.to->css, mc.moved_swap); mc.moved_swap =0 ;
@@ -5961,7 +5960,8 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd, ent = target.ent;if (!mem_cgroup_move_swap_account (ent, mc.from, mc.to)) { mc.precharge--; -/* we fixup refcnts and charges later. */ +mem_cgroup_id_get_many (mc.to,1 ); +/* we fixup other refcnts and charges later. */ mc.moved_swap++; }break ;
mm/mmap.c +14 -2
@@ -2622,7 +2622,7 @@ static void unmap_region(struct mm_struct *mm,* Create a list of vma's touched by the unmap, removing them from the mm's * vma list as we go.. */ -static void +static bool detach_vmas_to_be_unmapped (struct mm_struct *mm,struct vm_area_struct *vma,struct vm_area_struct *prev,unsigned long end) {
@@ -2647,6 +2647,17 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,/* Kill the cache */ vmacache_invalidate (mm); + +/* +* Do not downgrade mmap_lock if we are next to VM_GROWSDOWN or +* VM_GROWSUP VMA. Such VMAs can change their size under +* down_read(mmap_lock) and collide with the VMA we are about to unmap. +*/ +if (vma && (vma->vm_flags &VM_GROWSDOWN )) +return false; +if (prev && (prev->vm_flags &VM_GROWSUP )) +return false; +return true; }/*
@@ -2827,7 +2838,8 @@ int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len, }/* Detach vmas from rbtree */ -detach_vmas_to_be_unmapped (mm, vma, prev, end); +if (!detach_vmas_to_be_unmapped (mm, vma, prev, end)) + downgrade = false;if (downgrade)downgrade_write (&mm->mmap_sem);
mm/slab_common.c +28 -7
@@ -326,6 +326,14 @@ int slab_unmergeable(struct kmem_cache *s)if (s->refcount <0 )return 1 ;
Lines of this file are not shown. View the raw message.
sound/soc/codecs/rt5670.c +56 -15
71 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.