Linux 6.6.27
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.27 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/rockchip/rk322x.dtsi | 16 + arch/arm/boot/dts/rockchip/rk3288.dtsi | 16 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 11 + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 + arch/x86/events/amd/lbr.c | 6 arch/x86/include/asm/xen/hypervisor.h | 5 arch/x86/pci/fixup.c | 48 +++++ arch/x86/platform/pvh/enlighten.c | 3 arch/x86/xen/enlighten.c | 32 +++ arch/x86/xen/enlighten_pvh.c | 68 ++++++++ arch/x86/xen/setup.c | 44 ----- arch/x86/xen/xen-ops.h | 14 + block/blk-stat.c | 2 drivers/accel/habanalabs/common/habanalabs.h | 2 drivers/acpi/sleep.c | 12 - drivers/acpi/x86/utils.c | 18 +- drivers/bluetooth/btintel.c | 2 drivers/bluetooth/btmtk.c | 1 drivers/bluetooth/btmtk.h | 1 drivers/bluetooth/btusb.c | 1 drivers/bus/mhi/host/init.c | 1 drivers/bus/mhi/host/internal.h | 9 - drivers/bus/mhi/host/pm.c | 20 ++ drivers/cpufreq/cpufreq.c | 17 +- drivers/cpuidle/driver.c | 3 drivers/firmware/tegra/bpmp-debugfs.c | 2 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 drivers/gpu/drm/amd/display/modules/inc/mod_stats.h | 4 drivers/gpu/drm/drm_modeset_helper.c | 19 +- drivers/gpu/drm/drm_panel_orientation_quirks.c | 12 + drivers/gpu/drm/drm_probe_helper.c | 21 ++ drivers/gpu/drm/ttm/ttm_bo.c | 7 drivers/gpu/drm/vc4/vc4_plane.c | 5 drivers/hid/hid-ids.h | 1 drivers/hid/hid-input.c | 2 drivers/i2c/busses/i2c-designware-core.h | 2 drivers/infiniband/core/cm.c | 20 ++ drivers/input/joystick/xpad.c | 3 drivers/input/rmi4/rmi_driver.c | 6 drivers/input/touchscreen/imagis.c | 20 -- drivers/media/pci/sta2x11/sta2x11_vip.c | 9 - drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c | 8 drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 5 drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h | 2 drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_hevc_req_multi_if.c | 2 drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 2 drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c | 5 drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h | 2 drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c | 2 drivers/misc/vmw_vmci/vmci_datagram.c | 6 drivers/net/dummy.c | 1 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 9 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 14 - drivers/net/ethernet/intel/ice/ice_virtchnl.c | 9 - drivers/net/ethernet/intel/ice/ice_virtchnl.h | 9 + drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 drivers/net/ethernet/stmicro/stmmac/Kconfig | 6 drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 32 +++ drivers/net/geneve.c | 1 drivers/net/loopback.c | 1 drivers/net/pcs/pcs-xpcs.c | 4 drivers/net/phy/phy_device.c | 13 - drivers/net/veth.c | 1 drivers/net/vxlan/vxlan_core.c | 1 drivers/net/wireless/ath/ath11k/mhi.c | 2 drivers/net/wireless/ath/ath9k/antenna.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c | 9 + drivers/net/wireless/intel/iwlwifi/cfg/ax210.c | 6 drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 45 ++++- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 64 ++++--- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 drivers/net/wireless/realtek/rtw89/mac80211.c | 4 drivers/net/wireless/realtek/rtw89/pci.h | 2 drivers/nvme/host/pci.c | 3 drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 42 ++++ drivers/pinctrl/renesas/core.c | 4 drivers/platform/x86/intel/vbtn.c | 5 drivers/platform/x86/touchscreen_dmi.c | 9 + drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 10 - drivers/pmdomain/ti/omap_prm.c | 2 drivers/scsi/lpfc/lpfc_nportdisc.c | 6 drivers/soundwire/dmi-quirks.c | 8 drivers/thermal/thermal_of.c | 12 - drivers/thunderbolt/quirks.c | 14 + drivers/thunderbolt/tb.c | 49 +++++ drivers/thunderbolt/tb.h | 4 drivers/usb/gadget/function/uvc_video.c | 3 drivers/usb/host/sl811-hcd.c | 2 drivers/usb/typec/tcpm/tcpci.c | 1 drivers/usb/typec/ucsi/ucsi.c | 26 ++- drivers/usb/typec/ucsi/ucsi.h | 11 + drivers/video/fbdev/core/fbmon.c | 7 drivers/video/fbdev/via/accel.c | 4 drivers/xen/balloon.c | 2 fs/btrfs/export.c | 9 - fs/btrfs/send.c | 10 + fs/btrfs/volumes.c | 12 + fs/ext4/mballoc.c | 5 fs/ext4/super.c | 12 + fs/isofs/inode.c | 18 +- fs/kernfs/dir.c | 31 ++- fs/kernfs/kernfs-internal.h | 2 fs/orangefs/super.c | 2 fs/pstore/zone.c | 2 fs/sysv/itree.c | 10 - include/acpi/acpi_bus.h | 14 - include/linux/kernfs.h | 2 include/linux/overflow.h | 12 - include/linux/randomize_kstack.h | 2 include/linux/rcupdate.h | 4 include/linux/skbuff.h | 11 + include/linux/sunrpc/sched.h | 2 include/net/bluetooth/hci.h | 8 include/uapi/linux/input-event-codes.h | 1 io_uring/io_uring.c | 25 +- kernel/dma/direct.c | 9 - kernel/panic.c | 8 kernel/printk/printk.c | 3 kernel/rcu/tree_nocb.h | 2 kernel/trace/ring_buffer.c | 2 net/bluetooth/hci_event.c | 3 net/ipv4/ip_tunnel.c | 1 net/ipv6/ip6_gre.c | 2 net/ipv6/ip6_tunnel.c | 1 net/ipv6/ip6_vti.c | 1 net/ipv6/sit.c | 1 net/mpls/mpls_gso.c | 3 net/smc/smc_pnet.c | 10 + net/wireless/util.c | 14 + scripts/gcc-plugins/stackleak_plugin.c | 2 scripts/mod/modpost.c | 4 sound/firewire/amdtp-stream.c | 12 - sound/firewire/amdtp-stream.h | 4 sound/pci/hda/patch_realtek.c | 12 + sound/soc/amd/yc/acp6x-mach.c | 7 sound/soc/intel/avs/board_selection.c | 85 ++++++++++ sound/soc/intel/boards/sof_sdw.c | 11 + sound/soc/soc-core.c | 3 sound/soc/sof/amd/acp.c | 3 tools/iio/iio_utils.c | 2 tools/lib/perf/evlist.c | 18 +- tools/lib/perf/include/internal/evlist.h | 4 tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 1 tools/testing/ktest/ktest.pl | 1 tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 151 files changed, 1134 insertions(+), 309 deletions(-)
Abhishek Pandit-Subedi (1):
usb: typec: ucsi: Limit read size on v1.2
Adam Ford (1):
pmdomain: imx8mp-blk-ctrl: imx8mp_blk: Add fdcc clock to hdmimix domain
Alban Boyé (1):
platform/x86: touchscreen_dmi: Add an extra entry for a variant of the Chuwi Vi8 tablet
Aleksandr Burakov (1):
fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2
Alex Henrie (1):
isofs: handle CDs with bad root inode but good Joliet root directory
Andre Werner (1):
net: phy: phy_device: Prevent nullptr exceptions on ISR
Ard Biesheuvel (1):
gcc-plugins/stackleak: Avoid .head.text section
Aric Cyr (1):
drm/amd/display: Fix nanosec stat overflow
Arnd Bergmann (1):
media: sta2x11: fix irq handler cast
Baochen Qiang (1):
wifi: ath11k: decrease MHI channel buffer length to 8KB
C Cheng (1):
cpuidle: Avoid potential overflow in integer multiplication
Cezary Rojewski (1):
ASoC: Intel: avs: Populate board selection with new I2S entries
Chancel Liu (1):
ASoC: soc-core.c: Skip dummy codec when adding platforms
Christian König (1):
drm/ttm: return ENOSPC from ttm_bo_mem_space v3
Colin Ian King (1):
usb: sl811-hcd: only defined function checkdone if QUIRK2 is defined
Cristian Ciocaltea (2):
net: stmmac: dwmac-starfive: Add support for JH7100 SoC
ASoC: SOF: amd: Optimize quirk for Valve Galileo
Dai Ngo (1):
SUNRPC: increase size of rpc_wait_queue.qlen from unsigned short to unsigned int
Daniel Drake (2):
PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge
Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default"
Dave Airlie (1):
amdkfd: use calloc instead of kzalloc to avoid integer overflow
David Sterba (3):
btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()
btrfs: export: handle invalid inode or root reference in btrfs_get_parent()
btrfs: send: handle path ref underflow in header iterate_inode_ref()
Dmitry Antipov (1):
wifi: ath9k: fix LNA selection in ath_ant_try_scan()
Dmitry Torokhov (1):
HID: input: avoid polling stylus battery on Chromebook Pompom
Duje Mihanović (1):
Input: imagis - use FIELD_GET where applicable
Edward Adam Davis (1):
Bluetooth: btintel: Fix null ptr deref in btintel_read_version
Eric Dumazet (2):
net: add netdev_lockdep_set_classes() to virtual drivers net/smc: reduce rtnl pressure in smc_pnet_create_pnetids_list()
Florian Westphal (2):
net: skbuff: add overflow debug check to pull/push helpers
net: mpls: error out if inner headers are not set
Geert Uytterhoeven (1):
pinctrl: renesas: checker: Limit cfg reg enum checks to provided IDs
Geliang Tang (1):
selftests: mptcp: display simult in extra_msg
Gergo Koteles (1):
Input: allocate keycode for Display refresh rate toggle
Greg Kroah-Hartman (1):
Linux 6.6.27
Gwendal Grignou (1):
platform/x86: intel-vbtn: Update tablet mode switch at end of probe
Hans de Goede (2):
wifi: brcmfmac: Add DMI nvram filename quirk for ACEPC W5 Pro
ACPI: x86: Move acpi_quirk_skip_serdev_enumeration() out of CONFIG_X86_ANDROID_TABLETS
Harshit Mogalapalli (1):
VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()
Ian Rogers (1):
libperf evlist: Avoid out-of-bounds access
Jacob Keller (1):
ice: use relative VSI index for VFs instead of PF VSI number
Jarkko Nikula (1):
i2c: designware: Fix RX FIFO depth define on Wangxun 10Gb NIC
Jeffrey Hugo (1):
bus: mhi: host: Add MHI_PM_SYS_ERR_FAIL state
Jens Axboe (1):
io_uring: clear opcode specific data for an early failure
Jiawei Fu (iBug) (1):
drivers/nvme: Add quirks for device 126f:2262
Jichi Zhang (1):
ALSA: hda/realtek: Add quirk for Lenovo Yoga 9 14IMH9
Johan Jonker (4):
ARM: dts: rockchip: fix rk3288 hdmi ports node
ARM: dts: rockchip: fix rk322x hdmi ports node
arm64: dts: rockchip: fix rk3328 hdmi ports node
arm64: dts: rockchip: fix rk3399 hdmi ports node
Johannes Berg (1):
wifi: cfg80211: check A-MSDU format more carefully
John Ogness (2):
printk: For @suppress_panic_printk check for other CPU in panic
panic: Flush kernel log buffer at the end
Junhao He (1):
drivers/perf: hisi: Enable HiSilicon Erratum 162700402 quirk for HIP09
Justin Tee (1):
scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc()
Kees Cook (3):
bnx2x: Fix firmware version string character counts
overflow: Allow non-type arg to type_max() and type_min()
randomize_kstack: Improve entropy diffusion
Koby Elbaz (1):
accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warnings
Konrad Dybcio (1):
thermal/of: Assume polling-delay(-passive) 0 when absent
Kunwu Chan (3):
pmdomain: ti: Add a null pointer check to the omap_prm_domain_init pstore/zone: Add a null pointer check to the psz_kmsg_read
Input: synaptics-rmi4 - fail probing if memory allocation for "phys" fails
Luiz Augusto von Dentz (1):
Bluetooth: btintel: Fixe build regression
M Cooley (1):
ASoC: amd: yc: Fix non-functional mic on ASUS M7600RE
Ma Jun (1):
Revert "drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgpu_device_init()"
Manjunath Patil (1):
RDMA/cm: add timeout to cm_destroy_id wait
Marco Felsch (1):
usb: typec: tcpci: add generic tcpci fallback compatible
Markus Elfring (1):
firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()
Markuss Broks (1):
input/touchscreen: imagis: Correct the maximum touch area value
Matt Scialabba (1):
Input: xpad - add support for Snakebyte GAMEPADs
Max Kellermann (1):
modpost: fix null pointer dereference
Maíra Canal (1):
drm/vc4: don't check if plane->state->fb == state->fb
Michael Grzeschik (1):
usb: gadget: uvc: mark incomplete frames with UVC_STREAM_ERR
Mika Westerberg (1):
thunderbolt: Keep the domain powered when USB4 port is in redrive mode
Mike Marshall (1):
Julia Lawall reported this null pointer dereference, this should fix it.
Mukesh Sisodiya (1):
wifi: iwlwifi: pcie: Add the PCI device id for new hardware
Nicolas Dufresne (1):
media: mediatek: vcodec: Fix oops when HEVC init fails
Paul E. McKenney (1):
rcu-tasks: Repair RCU Tasks Trace quiescence check
Peter Chiu (1):
wifi: mt76: mt7996: disable AMSDU for non-data frames
Petre Rodan (1):
tools: iio: replace seekdir() in iio_generic_buffer
Ping-Ke Shih (1):
wifi: rtw89: pci: enlarge RX DMA buffer to consider size of RX descriptor
Po-Hao Huang (1):
wifi: rtw89: fix null pointer access when abort scan
Ricardo B. Marliere (1):
ktest: force $buildonly = 1 for 'make_warnings_file' test type
Rick Edgecombe (1):
dma-direct: Leak pages on dma_set_decrypted() failure
Roger Pau Monne (1):
x86/xen: attempt to inflate the memory balloon on PVH
Roman Smirnov (2):
block: prevent division by zero in blk_rq_stat_sum()
fbmon: prevent division by zero in fb_videomode_from_videomode()
Samasth Norway Ananda (1):
tools/power x86_energy_perf_policy: Fix file leak in get_pkg_num()
Samuel Dionne-Riel (1):
drm: panel-orientation-quirks: Add quirk for GPD Win Mini
Sandipan Das (1):
perf/x86/amd/lbr: Discard erroneous branch entries
Serge Semin (1):
net: pcs: xpcs: Return EINVAL in the internal methods
Shannon Nelson (1):
ionic: set adminq irq affinity
Shayne Chen (2):
wifi: mt76: mt7915: add locking for accessing mapped registers
wifi: mt76: mt7996: add locking for accessing mapped registers
Shradha Gupta (2):
drm: Check output polling initialized before disabling
drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
Srinivasan Shanmugam (1):
drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgpu_device_init()
Takashi Iwai (2):
wifi: iwlwifi: Add missing MODULE_FIRMWARE() for *.pnvm
Bluetooth: btmtk: Add MODULE_FIRMWARE() for MT7922
Takashi Sakamoto (1):
ALSA: firewire-lib: handle quirk to calculate payload quadlets as data block counter
Tejun Heo (1):
kernfs: RCU protect kernfs_nodes and avoid kernfs_idr_lock in kernfs_find_and_get_node_by_id()
Tetsuo Handa (1):
sysv: don't call sb_bread() with pointers_lock held
Tim Crawford (1):
ALSA: hda/realtek: Add quirks for some Clevo laptops
Vasiliy Kovalev (1):
VMCI: Fix possible memcpy() run-time warning in vmci_datagram_invoke_guest_handler()
Vinicius Peixoto (1):
Bluetooth: Add new quirk for broken read key length on ATS2851
Viresh Kumar (1):
cpufreq: Don't unregister cpufreq cooling on CPU hotplug
Ye Bin (1):
ext4: forbid commit inconsistent quota data when errors=remount-ro
Yunfei Dong (2):
media: mediatek: vcodec: adding lock to protect decoder context list
media: mediatek: vcodec: adding lock to protect encoder context list
Zhang Yi (1):
ext4: add a hint for block bitmap corrupt state in mb_groups
Zqiang (1):
rcu/nocb: Fix WARN_ON_ONCE() in the rcu_nocb_bypass_lock()
linke li (1):
ring-buffer: use READ_ONCE() to read cpu_buffer->commit_page in concurrent environment
mosomate (1):
ASoC: Intel: common: DMI remap for rebranded Intel NUC M15 (LAPRC710) laptops
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 26 +SUBLEVEL = 27 EXTRAVERSION = NAME = Hurr durr I'ma ninja sloth
arch/arm/boot/dts/rockchip/rk322x.dtsi +11 -5
@@ -732,14 +732,20 @@ hdmi: hdmi@200a0000 { status = "disabled"; ports { - hdmi_in: port { - #address-cells = <1>; - #size-cells = <0>; - hdmi_in_vop: endpoint@0 { - reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + hdmi_in: port@0 { + reg = <0>; + + hdmi_in_vop: endpoint { remote-endpoint = <&vop_out_hdmi>; }; }; + + hdmi_out: port@1 { + reg = <1>; + }; }; };
arch/arm/boot/dts/rockchip/rk3288.dtsi +13 -3
@@ -1231,27 +1231,37 @@ hdmi: hdmi@ff980000 { compatible = "rockchip,rk3288-dw-hdmi"; reg = <0x0 0xff980000 0x0 0x20000>; reg-io-width = <4>; - #sound-dai-cells = <0>; - rockchip,grf = <&grf>; interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>; clock-names = "iahb", "isfr", "cec"; power-domains = <&power RK3288_PD_VIO>; + rockchip,grf = <&grf>; + #sound-dai-cells = <0>; status = "disabled"; ports { - hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + + hdmi_in: port@0 { + reg = <0>; #address-cells = <1>; #size-cells = <0>; + hdmi_in_vopb: endpoint@0 { reg = <0>; remote-endpoint = <&vopb_out_hdmi>; }; + hdmi_in_vopl: endpoint@1 { reg = <1>; remote-endpoint = <&vopl_out_hdmi>; }; }; + + hdmi_out: port@1 { + reg = <1>; + }; }; };
arch/arm64/boot/dts/rockchip/rk3328.dtsi +10 -1
@@ -743,11 +743,20 @@ hdmi: hdmi@ff3c0000 { status = "disabled"; ports { - hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + + hdmi_in: port@0 { + reg = <0>; + hdmi_in_vop: endpoint { remote-endpoint = <&vop_out_hdmi>; }; }; + + hdmi_out: port@1 { + reg = <1>; + }; }; };
arch/arm64/boot/dts/rockchip/rk3399.dtsi +10 -2
@@ -1953,6 +1953,7 @@ simple-audio-card,codec { hdmi: hdmi@ff940000 { compatible = "rockchip,rk3399-dw-hdmi"; reg = <0x0 0xff940000 0x0 0x20000>; + reg-io-width = <4>; interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>; clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_SFR>,
@@ -1961,13 +1962,16 @@ hdmi: hdmi@ff940000 { <&cru PLL_VPLL>; clock-names = "iahb", "isfr", "cec", "grf", "ref"; power-domains = <&power RK3399_PD_HDCP>; - reg-io-width = <4>; rockchip,grf = <&grf>; #sound-dai-cells = <0>; status = "disabled"; ports { - hdmi_in: port { + #address-cells = <1>; + #size-cells = <0>; + + hdmi_in: port@0 { + reg = <0>; #address-cells = <1>; #size-cells = <0>;
@@ -1980,6 +1984,10 @@ hdmi_in_vopl: endpoint@1 { remote-endpoint = <&vopl_out_hdmi>; }; }; + + hdmi_out: port@1 { + reg = <1>; + }; }; };
arch/x86/events/amd/lbr.c +4 -2
@@ -173,9 +173,11 @@ void amd_pmu_lbr_read(void)/* * Check if a branch has been logged; if valid = 0, spec = 0 -* then no branch was recorded +* then no branch was recorded; if reserved = 1 then an +* erroneous branch was recorded (see Erratum 1452) */ -if (!entry.to.split.valid && !entry.to.split.spec) +if ((!entry.to.split.valid && !entry.to.split.spec) || + entry.to.split.reserved)continue ;perf_clear_branch_entry_bitfields (br + out);
arch/x86/include/asm/xen/hypervisor.h +5 -0
@@ -62,6 +62,11 @@ void xen_arch_unregister_cpu(int num);#ifdef CONFIG_PVH void __init xen_pvh_init (struct boot_params *boot_params);void __init mem_map_via_hcall (struct boot_params *boot_params_p); +#ifdef CONFIG_XEN_PVH +void __init xen_reserve_extra_memory (struct boot_params *bootp); +#else +static inline void xen_reserve_extra_memory (struct boot_params *bootp) { } +#endif #endif /* Lazy mode for batching updates / context switch */
arch/x86/pci/fixup.c +48 -0
54 lines not on this page · raw message
arch/x86/platform/pvh/enlighten.c +3 -0
@@ -74,6 +74,9 @@ static void __init init_pvh_bootparams(bool xen_guest) }else xen_raw_printk ("Warning: Can fit ISA range into e820\n" ); +if (xen_guest) +xen_reserve_extra_memory (&pvh_bootparams); + pvh_bootparams.hdr.cmd_line_ptr = pvh_start_info.cmdline_paddr;
arch/x86/xen/enlighten.c +32 -0
@@ -6,6 +6,7 @@#include <linux/console.h> #include <linux/cpu.h> #include <linux/kexec.h> +#include <linux/memblock.h> #include <linux/slab.h> #include <linux/panic_notifier.h>
@@ -350,3 +351,34 @@ void xen_arch_unregister_cpu(int num) }EXPORT_SYMBOL (xen_arch_unregister_cpu);#endif + +/* Amount of extra memory space we add to the e820 ranges */ +struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS ]__initdata ; + +void __init xen_add_extra_mem (unsigned long start_pfn,unsigned long n_pfns) +{ +unsigned int i; + +/* +* No need to check for zero size, should happen rarely and will only +* write a new entry regarded to be unused due to zero size. +*/ +for (i =0 ; i <XEN_EXTRA_MEM_MAX_REGIONS ; i++) { +/* Add new region. */ +if (xen_extra_mem[i].n_pfns ==0 ) { + xen_extra_mem[i].start_pfn = start_pfn; + xen_extra_mem[i].n_pfns = n_pfns; +break ; + } +/* Append to existing region. */ +if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns == + start_pfn) { + xen_extra_mem[i].n_pfns += n_pfns; +break ; + } + } +if (i ==XEN_EXTRA_MEM_MAX_REGIONS ) +printk (KERN_WARNING "Warning: not enough extra memory regions\n" ); + +memblock_reserve (PFN_PHYS (start_pfn),PFN_PHYS (n_pfns)); +}
arch/x86/xen/enlighten_pvh.c +68 -0
77 lines not on this page · raw message
arch/x86/xen/setup.c +0 -44
62 lines not on this page · raw message
arch/x86/xen/xen-ops.h +14 -0
@@ -163,4 +163,18 @@ void xen_hvm_post_suspend(int suspend_cancelled);static inline void xen_hvm_post_suspend (int suspend_cancelled) {}#endif +/* +* The maximum amount of extra memory compared to the base size. The +* main scaling factor is the size of struct page. At extreme ratios +* of base:extra, all the base memory can be filled with page +* structures for the extra memory, leaving no space for anything +* else. +* +* 10x seems like a reasonable balance between scaling flexibility and +* leaving a practically usable system. +*/ +#define EXTRA_MEM_RATIO (10) + +void xen_add_extra_mem (unsigned long start_pfn,unsigned long n_pfns); +#endif /* XEN_OPS_H */
block/blk-stat.c +1 -1
@@ -27,7 +27,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)/* src is a per-cpu stat, mean isn't initialized */ void blk_rq_stat_sum (struct blk_rq_stat *dst,struct blk_rq_stat *src) { -if (!src->nr_samples) +if (dst->nr_samples + src->nr_samples <= dst->nr_samples)return ; dst->min =min (dst->min, src->min);
drivers/accel/habanalabs/common/habanalabs.h +1 -1
@@ -2508,7 +2508,7 @@ struct hl_state_dump_specs {* DEVICES */ -#define HL_STR_MAX 32 +#define HL_STR_MAX 64#define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)
drivers/acpi/sleep.c +0 -12
@@ -385,18 +385,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"), }, }, -/* -* ASUS B1400CEAE hangs on resume from suspend (see -* https://bugzilla.kernel.org/show_bug.cgi?id=215742). -*/ - { - .callback = init_default_s3, - .ident = "ASUS B1400CEAE", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), - DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"), - }, - }, {}, };
drivers/acpi/x86/utils.c +14 -4
@@ -429,7 +429,7 @@ bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev) }EXPORT_SYMBOL_GPL (acpi_quirk_skip_i2c_client_enumeration); -int acpi_quirk_skip_serdev_enumeration (struct device *controller_parent,bool *skip) +static int acpi_dmi_skip_serdev_enumeration (struct device *controller_parent,bool *skip) {struct acpi_device *adev =ACPI_COMPANION (controller_parent);const struct dmi_system_id *dmi_id;
@@ -437,8 +437,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *su64 uid;int ret; - *skip = false; - ret =acpi_dev_uid_to_integer (adev, &uid);if (ret)return 0 ;
@@ -464,7 +462,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *sreturn 0 ; } -EXPORT_SYMBOL_GPL (acpi_quirk_skip_serdev_enumeration);bool acpi_quirk_skip_gpio_event_handlers (void ) {
@@ -479,8 +476,21 @@ bool acpi_quirk_skip_gpio_event_handlers(void)return (quirks &ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS ); }EXPORT_SYMBOL_GPL (acpi_quirk_skip_gpio_event_handlers); +#else +static int acpi_dmi_skip_serdev_enumeration (struct device *controller_parent,bool *skip) +{ +return 0 ; +}#endif +int acpi_quirk_skip_serdev_enumeration (struct device *controller_parent,bool *skip) +{ + *skip = false; + +return acpi_dmi_skip_serdev_enumeration (controller_parent, skip); +} +EXPORT_SYMBOL_GPL (acpi_quirk_skip_serdev_enumeration); +/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */ static const struct { const char *hid;
drivers/bluetooth/btintel.c +1 -1
@@ -441,7 +441,7 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)return PTR_ERR (skb); } -if (skb->len !=sizeof (*ver)) { +if (!skb || skb->len !=sizeof (*ver)) {bt_dev_err (hdev,"Intel version event size mismatch" );kfree_skb (skb);return -EILSEQ ;
drivers/bluetooth/btmtk.c +1 -0
@@ -422,5 +422,6 @@ MODULE_LICENSE("GPL");MODULE_FIRMWARE (FIRMWARE_MT7622 );MODULE_FIRMWARE (FIRMWARE_MT7663 );MODULE_FIRMWARE (FIRMWARE_MT7668 ); +MODULE_FIRMWARE (FIRMWARE_MT7922 );MODULE_FIRMWARE (FIRMWARE_MT7961 );MODULE_FIRMWARE (FIRMWARE_MT7925 );
drivers/bluetooth/btmtk.h +1 -0
@@ -4,6 +4,7 @@#define FIRMWARE_MT7622 "mediatek/mt7622pr2h.bin"#define FIRMWARE_MT7663 "mediatek/mt7663pr2h.bin"#define FIRMWARE_MT7668 "mediatek/mt7668pr2h.bin" +#define FIRMWARE_MT7922 "mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin"#define FIRMWARE_MT7961 "mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin"#define FIRMWARE_MT7925 "mediatek/mt7925/BT_RAM_CODE_MT7925_1_1_hdr.bin"
drivers/bluetooth/btusb.c +1 -0
@@ -4477,6 +4477,7 @@ static int btusb_probe(struct usb_interface *intf,set_bit (HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER , &hdev->quirks);set_bit (HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT , &hdev->quirks);set_bit (HCI_QUIRK_BROKEN_EXT_SCAN , &hdev->quirks); +set_bit (HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE , &hdev->quirks); }if (!reset)
drivers/bus/mhi/host/init.c +1 -0
@@ -62,6 +62,7 @@ static const char * const mhi_pm_state_str[] = { [MHI_PM_STATE_FW_DL_ERR] = "Firmware Download Error", [MHI_PM_STATE_SYS_ERR_DETECT] = "SYS ERROR Detect", [MHI_PM_STATE_SYS_ERR_PROCESS] = "SYS ERROR Process", + [MHI_PM_STATE_SYS_ERR_FAIL] = "SYS ERROR Failure", [MHI_PM_STATE_SHUTDOWN_PROCESS] = "SHUTDOWN Process", [MHI_PM_STATE_LD_ERR_FATAL_DETECT] = "Linkdown or Error Fatal Detect", };
drivers/bus/mhi/host/internal.h +6 -3
@@ -88,6 +88,7 @@ enum mhi_pm_state {MHI_PM_STATE_FW_DL_ERR ,MHI_PM_STATE_SYS_ERR_DETECT ,MHI_PM_STATE_SYS_ERR_PROCESS , +MHI_PM_STATE_SYS_ERR_FAIL ,MHI_PM_STATE_SHUTDOWN_PROCESS ,MHI_PM_STATE_LD_ERR_FATAL_DETECT ,MHI_PM_STATE_MAX
@@ -104,14 +105,16 @@ enum mhi_pm_state {#define MHI_PM_FW_DL_ERR BIT(7)#define MHI_PM_SYS_ERR_DETECT BIT(8)#define MHI_PM_SYS_ERR_PROCESS BIT(9) -#define MHI_PM_SHUTDOWN_PROCESS BIT(10) +#define MHI_PM_SYS_ERR_FAIL BIT(10) +#define MHI_PM_SHUTDOWN_PROCESS BIT(11)/* link not accessible */ -#define MHI_PM_LD_ERR_FATAL_DETECT BIT(11) +#define MHI_PM_LD_ERR_FATAL_DETECT BIT(12)#define MHI_REG_ACCESS_VALID (pm_state) ((pm_state & (MHI_PM_POR | MHI_PM_M0 | \ MHI_PM_M2 | MHI_PM_M3_ENTER | MHI_PM_M3_EXIT | \ MHI_PM_SYS_ERR_DETECT | MHI_PM_SYS_ERR_PROCESS | \ - MHI_PM_SHUTDOWN_PROCESS | MHI_PM_FW_DL_ERR))) + MHI_PM_SYS_ERR_FAIL | MHI_PM_SHUTDOWN_PROCESS | \ + MHI_PM_FW_DL_ERR)))#define MHI_PM_IN_ERROR_STATE (pm_state) (pm_state >= MHI_PM_FW_DL_ERR)#define MHI_PM_IN_FATAL_STATE (pm_state) (pm_state == MHI_PM_LD_ERR_FATAL_DETECT)#define MHI_DB_ACCESS_VALID (mhi_cntrl) (mhi_cntrl->pm_state & mhi_cntrl->db_access)
drivers/bus/mhi/host/pm.c +17 -3
@@ -36,7 +36,10 @@* M0 <--> M0 * M0 -> FW_DL_ERR * M0 -> M3_ENTER -> M3 -> M3_EXIT --> M0 -* L1: SYS_ERR_DETECT -> SYS_ERR_PROCESS --> POR +* L1: SYS_ERR_DETECT -> SYS_ERR_PROCESS +* SYS_ERR_PROCESS -> SYS_ERR_FAIL +* SYS_ERR_FAIL -> SYS_ERR_DETECT +* SYS_ERR_PROCESS --> POR * L2: SHUTDOWN_PROCESS -> LD_ERR_FATAL_DETECT * SHUTDOWN_PROCESS -> DISABLE * L3: LD_ERR_FATAL_DETECT <--> LD_ERR_FATAL_DETECT
@@ -93,7 +96,12 @@ static const struct mhi_pm_transitions dev_state_transitions[] = { }, {MHI_PM_SYS_ERR_PROCESS , -MHI_PM_POR |MHI_PM_SHUTDOWN_PROCESS | +MHI_PM_POR |MHI_PM_SYS_ERR_FAIL |MHI_PM_SHUTDOWN_PROCESS | +MHI_PM_LD_ERR_FATAL_DETECT + }, + { +MHI_PM_SYS_ERR_FAIL , +MHI_PM_SYS_ERR_DETECT |MHI_PM_SHUTDOWN_PROCESS |MHI_PM_LD_ERR_FATAL_DETECT },/* L2 States */
@@ -624,7 +632,13 @@ static void mhi_pm_sys_error_transition(struct mhi_controller *mhi_cntrl) !in_reset, timeout);if (!ret || in_reset) {dev_err (dev,"Device failed to exit MHI Reset state\n" ); - goto exit_sys_error_transition; +write_lock_irq (&mhi_cntrl->pm_lock); + cur_state =mhi_tryset_pm_state (mhi_cntrl, +MHI_PM_SYS_ERR_FAIL ); +write_unlock_irq (&mhi_cntrl->pm_lock); +/* Shutdown may have occurred, otherwise cleanup now */ +if (cur_state !=MHI_PM_SYS_ERR_FAIL ) + goto exit_sys_error_transition; }/*
drivers/cpufreq/cpufreq.c +11 -6
@@ -1576,7 +1576,8 @@ static int cpufreq_online(unsigned int cpu)if (cpufreq_driver->ready) cpufreq_driver->ready (policy); -if (cpufreq_thermal_control_enabled (cpufreq_driver)) +/* Register cpufreq cooling only for a new policy */ +if (new_policy &&cpufreq_thermal_control_enabled (cpufreq_driver)) policy->cdev =of_cpufreq_cooling_register (policy);pr_debug ("initialization complete\n" );
@@ -1660,11 +1661,6 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)else policy->last_policy = policy->policy; -if (cpufreq_thermal_control_enabled (cpufreq_driver)) { -cpufreq_cooling_unregister (policy->cdev); - policy->cdev =NULL ; - } -if (has_target ())cpufreq_exit_governor (policy);
@@ -1725,6 +1721,15 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)return ; } +/* +* Unregister cpufreq cooling once all the CPUs of the policy are +* removed. +*/ +if (cpufreq_thermal_control_enabled (cpufreq_driver)) { +cpufreq_cooling_unregister (policy->cdev); + policy->cdev =NULL ; + } +/* We did light-weight exit earlier, do full tear down now */ if (cpufreq_driver->offline) cpufreq_driver->exit (policy);
drivers/cpuidle/driver.c +2 -1
@@ -16,6 +16,7 @@#include <linux/cpumask.h> #include <linux/tick.h> #include <linux/cpu.h> +#include <linux/math64.h> #include "cpuidle.h"
@@ -187,7 +188,7 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv) s->target_residency =div_u64 (s->target_residency_ns,NSEC_PER_USEC );if (s->exit_latency >0 ) - s->exit_latency_ns = s->exit_latency *NSEC_PER_USEC ; + s->exit_latency_ns =mul_u32_u32 (s->exit_latency,NSEC_PER_USEC );else if (s->exit_latency_ns <0 ) s->exit_latency_ns =0 ;else
drivers/firmware/tegra/bpmp-debugfs.c +1 -1
@@ -77,7 +77,7 @@ static const char *get_filename(struct tegra_bpmp *bpmp, root_path_buf =kzalloc (root_path_buf_len,GFP_KERNEL );if (!root_path_buf) - goto out; +return NULL ; root_path =dentry_path (bpmp->debugfs_mirror, root_path_buf, root_path_buf_len);
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +2 -2
@@ -778,8 +778,8 @@ static int kfd_ioctl_get_process_apertures_new(struct file *filp,* nodes, but not more than args->num_of_nodes as that is * the amount of memory allocated by user */ - pa =kzalloc ((sizeof (struct kfd_process_device_apertures ) * - args->num_of_nodes),GFP_KERNEL ); + pa =kcalloc (args->num_of_nodes,sizeof (struct kfd_process_device_apertures ), +GFP_KERNEL );if (!pa)return -ENOMEM ;
drivers/gpu/drm/amd/display/modules/inc/mod_stats.h +2 -2
@@ -57,10 +57,10 @@ void mod_stats_update_event(struct mod_stats *mod_stats, unsigned int length);void mod_stats_update_flip (struct mod_stats *mod_stats, -unsigned long timestamp_in_ns); +unsigned long long timestamp_in_ns);void mod_stats_update_vupdate (struct mod_stats *mod_stats, -unsigned long timestamp_in_ns); +unsigned long long timestamp_in_ns); void mod_stats_update_freesync(struct mod_stats *mod_stats, unsigned int v_total_min,
drivers/gpu/drm/drm_modeset_helper.c +16 -3
@@ -193,13 +193,22 @@ int drm_mode_config_helper_suspend(struct drm_device *dev)if (!dev)return 0 ; +/* +* Don't disable polling if it was never initialized +*/ +if (dev->mode_config.poll_enabled) +drm_kms_helper_poll_disable (dev); -drm_kms_helper_poll_disable (dev);drm_fb_helper_set_suspend_unlocked (dev->fb_helper,1 ); state =drm_atomic_helper_suspend (dev);if (IS_ERR (state)) {drm_fb_helper_set_suspend_unlocked (dev->fb_helper,0 ); -drm_kms_helper_poll_enable (dev); +/* +* Don't enable polling if it was never initialized +*/ +if (dev->mode_config.poll_enabled) +drm_kms_helper_poll_enable (dev); +return PTR_ERR (state); }
@@ -239,7 +248,11 @@ int drm_mode_config_helper_resume(struct drm_device *dev) dev->mode_config.suspend_state =NULL ;drm_fb_helper_set_suspend_unlocked (dev->fb_helper,0 ); -drm_kms_helper_poll_enable (dev); +/* +* Don't enable polling if it is not initialized +*/ +if (dev->mode_config.poll_enabled) +drm_kms_helper_poll_enable (dev);return ret; }
drivers/gpu/drm/drm_panel_orientation_quirks.c +12 -0
@@ -117,6 +117,12 @@ static const struct drm_dmi_panel_orientation_data lcd1080x1920_leftside_up = { .orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP, }; +static const struct drm_dmi_panel_orientation_data lcd1080x1920_rightside_up = { + .width =1080 , + .height =1920 , + .orientation =DRM_MODE_PANEL_ORIENTATION_RIGHT_UP , +}; +static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = { .width =1200 , .height =1920 ,
@@ -279,6 +285,12 @@ static const struct dmi_system_id orientation_data[] = {DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"G1618-03" ) }, .driver_data = (void *)&lcd720x1280_rightside_up, + }, { /* GPD Win Mini */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"GPD" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"G1617-01" ) + }, + .driver_data = (void *)&lcd1080x1920_rightside_up, }, { /* I.T.Works TW891 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
drivers/gpu/drm/drm_probe_helper.c +17 -4
@@ -293,14 +293,17 @@ static void reschedule_output_poll_work(struct drm_device *dev)* Drivers can call this helper from their device resume implementation. It is * not an error to call this even when output polling isn't enabled. * +* If device polling was never initialized before, this call will trigger a +* warning and return. +* * Note that calls to enable and disable polling must be strictly ordered, which * is automatically the case when they're only call from suspend/resume * callbacks. */ void drm_kms_helper_poll_enable (struct drm_device *dev) { -if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll || - dev->mode_config.poll_running) +if (drm_WARN_ON_ONCE (dev, !dev->mode_config.poll_enabled) || + !drm_kms_helper_poll || dev->mode_config.poll_running)return ; if (drm_kms_helper_enable_hpd(dev) ||
@@ -626,8 +629,12 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, 0); } -/* Re-enable polling in case the global poll config changed. */ -drm_kms_helper_poll_enable (dev); +/* +* Re-enable polling in case the global poll config changed but polling +* is still initialized. +*/ +if (dev->mode_config.poll_enabled) +drm_kms_helper_poll_enable (dev);if (connector->status == connector_status_disconnected) { DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
@@ -878,12 +885,18 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);* not an error to call this even when output polling isn't enabled or already * disabled. Polling is re-enabled by calling drm_kms_helper_poll_enable(). * +* If however, the polling was never initialized, this call will trigger a +* warning and return +* * Note that calls to enable and disable polling must be strictly ordered, which * is automatically the case when they're only call from suspend/resume * callbacks. */ void drm_kms_helper_poll_disable (struct drm_device *dev) { +if (drm_WARN_ON (dev, !dev->mode_config.poll_enabled)) +return ; +if (dev->mode_config.poll_running)drm_kms_helper_disable_hpd (dev);
drivers/gpu/drm/ttm/ttm_bo.c +5 -2
@@ -764,7 +764,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,* This function may sleep while waiting for space to become available. * Returns: * -EBUSY: No space available (only if no_wait == 1). -* -ENOMEM: Could not allocate memory for the buffer object, either due to +* -ENOSPC: Could not allocate space for the buffer object, either due to * fragmentation or concurrent allocators. * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. */
@@ -824,7 +824,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, goto error; } - ret = -ENOMEM ; + ret = -ENOSPC ;if (!type_found) {pr_err (TTM_PFX "No compatible memory type found\n" ); ret = -EINVAL ;
@@ -910,6 +910,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,return -EINVAL ; ret =ttm_bo_move_buffer (bo, placement, ctx); +/* For backward compatibility with userspace */ +if (ret == -ENOSPC ) +return -ENOMEM ;if (ret)return ret;
drivers/gpu/drm/vc4/vc4_plane.c +1 -4
@@ -1505,9 +1505,6 @@ static int vc4_prepare_fb(struct drm_plane *plane,drm_gem_plane_helper_prepare_fb (plane, state); -if (plane->state->fb == state->fb) -return 0 ; -return vc4_bo_inc_usecnt (bo); }
@@ -1516,7 +1513,7 @@ static void vc4_cleanup_fb(struct drm_plane *plane, {struct vc4_bo *bo; -if (plane->state->fb == state->fb || !state->fb) +if (!state->fb)return ; bo =to_vc4_bo (&drm_fb_dma_get_gem_obj (state->fb,0 )->base);
drivers/hid/hid-ids.h +1 -0
@@ -427,6 +427,7 @@#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1 0x2BED#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2 0x2BEE#define I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG 0x2D02 +#define I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM 0x2F81#define USB_VENDOR_ID_ELECOM 0x056e#define USB_DEVICE_ID_ELECOM_BM084 0x0061
drivers/hid/hid-input.c +2 -0
@@ -411,6 +411,8 @@ static const struct hid_device_id hid_battery_quirks[] = { HID_BATTERY_QUIRK_IGNORE }, {HID_I2C_DEVICE (USB_VENDOR_ID_ELAN ,I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG ), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM), + HID_BATTERY_QUIRK_AVOID_QUERY }, {} };
drivers/i2c/busses/i2c-designware-core.h +1 -1
@@ -318,7 +318,7 @@ struct dw_i2c_dev {#define AMD_UCSI_INTR_EN 0xd#define TXGBE_TX_FIFO_DEPTH 4 -#define TXGBE_RX_FIFO_DEPTH 0 +#define TXGBE_RX_FIFO_DEPTH 1struct i2c_dw_semaphore_callbacks {int (*probe)(struct dw_i2c_dev *dev);
drivers/infiniband/core/cm.c +19 -1
@@ -34,6 +34,7 @@ MODULE_AUTHOR("Sean Hefty");MODULE_DESCRIPTION ("InfiniBand CM" );MODULE_LICENSE ("Dual BSD/GPL" ); +#define CM_DESTROY_ID_WAIT_TIMEOUT 10000/* msecs */ static const char *const ibcm_rej_reason_strs[] = { [IB_CM_REJ_NO_QP ] ="no QP" , [IB_CM_REJ_NO_EEC ] ="no EEC" ,
@@ -1025,10 +1026,20 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv) } } +static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id) +{ +struct cm_id_private *cm_id_priv; + + cm_id_priv = container_of(cm_id, struct cm_id_private, id); +pr_err ("%s: cm_id=%p timed out. state=%d refcnt=%d\n" , __func__, + cm_id, cm_id->state,refcount_read (&cm_id_priv->refcount)); +} +static void cm_destroy_id (struct ib_cm_id *cm_id,int err) {struct cm_id_private *cm_id_priv;struct cm_work *work; +int ret; cm_id_priv = container_of(cm_id, struct cm_id_private, id);spin_lock_irq (&cm_id_priv->lock);
@@ -1135,7 +1146,14 @@ static void cm_destroy_id(struct ib_cm_id *cm_id, int err)xa_erase (&cm.local_id_table,cm_local_id (cm_id->local_id));cm_deref_id (cm_id_priv); -wait_for_completion (&cm_id_priv->comp); +do { + ret =wait_for_completion_timeout (&cm_id_priv->comp, +msecs_to_jiffies ( +CM_DESTROY_ID_WAIT_TIMEOUT )); +if (!ret)/* timeout happened */ +cm_destroy_id_wait_timeout (cm_id); + }while (!ret); +while ((work =cm_dequeue_work (cm_id_priv)) !=NULL )cm_free_work (work);
drivers/input/joystick/xpad.c +3 -0
@@ -366,6 +366,8 @@ static const struct xpad_device { { 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 }, { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 }, + { 0x294b, 0x3303, "Snakebyte GAMEPAD BASE X", 0, XTYPE_XBOXONE }, + { 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE }, { 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE }, { 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
@@ -507,6 +509,7 @@ static const struct usb_device_id xpad_table[] = {XPAD_XBOXONE_VENDOR (0x24c6 ),/* PowerA controllers */ XPAD_XBOX360_VENDOR (0x2563 ),/* OneXPlayer Gamepad */ XPAD_XBOX360_VENDOR (0x260d ),/* Dareu H101 */ +XPAD_XBOXONE_VENDOR (0x294b ),/* Snakebyte */ XPAD_XBOX360_VENDOR (0x2c22 ),/* Qanba Controllers */ XPAD_XBOX360_VENDOR (0x2dc8 ),/* 8BitDo Pro 2 Wired Controller */ XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
drivers/input/rmi4/rmi_driver.c +5 -1
@@ -1196,7 +1196,11 @@ static int rmi_driver_probe(struct device *dev) }rmi_driver_set_input_params (rmi_dev, data->input); data->input->phys =devm_kasprintf (dev,GFP_KERNEL , -"%s/input0" ,dev_name (dev)); +"%s/input0" ,dev_name (dev)); +if (!data->input->phys) { + retval = -ENOMEM ; + goto err; + } } retval =rmi_init_functions (data);
drivers/input/touchscreen/imagis.c +8 -12
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only +#include <linux/bitfield.h> #include <linux/bits.h> #include <linux/delay.h> #include <linux/i2c.h>
@@ -23,12 +24,9 @@#define IST3038C_I2C_RETRY_COUNT 3#define IST3038C_MAX_FINGER_NUM 10#define IST3038C_X_MASK GENMASK(23, 12) -#define IST3038C_X_SHIFT 12#define IST3038C_Y_MASK GENMASK(11, 0)#define IST3038C_AREA_MASK GENMASK(27, 24) -#define IST3038C_AREA_SHIFT 24#define IST3038C_FINGER_COUNT_MASK GENMASK(15, 12) -#define IST3038C_FINGER_COUNT_SHIFT 12#define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0)struct imagis_ts {
@@ -92,8 +90,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) goto out; } - finger_count = (intr_message &IST3038C_FINGER_COUNT_MASK ) >> -IST3038C_FINGER_COUNT_SHIFT ; + finger_count =FIELD_GET (IST3038C_FINGER_COUNT_MASK , intr_message);if (finger_count >IST3038C_MAX_FINGER_NUM ) { dev_err(&ts->client->dev, "finger count %d is more than maximum supported\n",
@@ -101,7 +98,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) goto out; } - finger_pressed = intr_message &IST3038C_FINGER_STATUS_MASK ; + finger_pressed =FIELD_GET (IST3038C_FINGER_STATUS_MASK , intr_message);for (i =0 ; i < finger_count; i++) { error = imagis_i2c_read_reg(ts,
@@ -118,12 +115,11 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)input_mt_report_slot_state (ts->input_dev,MT_TOOL_FINGER , finger_pressed &BIT (i));touchscreen_report_pos (ts->input_dev, &ts->prop, - (finger_status &IST3038C_X_MASK ) >> -IST3038C_X_SHIFT , - finger_status &IST3038C_Y_MASK ,1 ); +FIELD_GET (IST3038C_X_MASK , finger_status), +FIELD_GET (IST3038C_Y_MASK , finger_status), + true);input_report_abs (ts->input_dev,ABS_MT_TOUCH_MAJOR , - (finger_status &IST3038C_AREA_MASK ) >> -IST3038C_AREA_SHIFT ); +FIELD_GET (IST3038C_AREA_MASK , finger_status)); }input_mt_sync_frame (ts->input_dev);
@@ -210,7 +206,7 @@ static int imagis_init_input_dev(struct imagis_ts *ts)input_set_capability (input_dev,EV_ABS ,ABS_MT_POSITION_X );input_set_capability (input_dev,EV_ABS ,ABS_MT_POSITION_Y ); -input_set_abs_params (input_dev,ABS_MT_TOUCH_MAJOR ,0 ,255 ,0 ,0 ); +input_set_abs_params (input_dev,ABS_MT_TOUCH_MAJOR ,0 ,16 ,0 ,0 );touchscreen_parse_properties (input_dev, true, &ts->prop);if (!ts->prop.max_x || !ts->prop.max_y) {
drivers/media/pci/sta2x11/sta2x11_vip.c +4 -5
@@ -757,7 +757,7 @@ static const struct video_device video_dev_template = {/** * vip_irq - interrupt routine * @irq: Number of interrupt ( not used, correct number is assumed ) -* @vip: local data structure containing all information +* @data: local data structure containing all information * * check for both frame interrupts set ( top and bottom ). * check FIFO overflow, but limit number of log messages after open.
@@ -767,8 +767,9 @@ static const struct video_device video_dev_template = {* * IRQ_HANDLED, interrupt done. */ -static irqreturn_t vip_irq (int irq,struct sta2x11_vip *vip) +static irqreturn_t vip_irq (int irq,void *data) { +struct sta2x11_vip *vip = data;unsigned int status; status =reg_read (vip,DVP_ITS );
@@ -1053,9 +1054,7 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev,spin_lock_init (&vip->slock); - ret =request_irq (pdev->irq, - (irq_handler_t ) vip_irq, -IRQF_SHARED ,KBUILD_MODNAME , vip); + ret =request_irq (pdev->irq, vip_irq,IRQF_SHARED ,KBUILD_MODNAME , vip);if (ret) {dev_err (&pdev->dev,"request_irq failed\n" ); ret = -ENODEV ;
drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c +4 -4
@@ -50,12 +50,12 @@ static void mtk_vcodec_vpu_reset_dec_handler(void *priv)dev_err (&dev->plat_dev->dev,"Watchdog timeout!!" ); -mutex_lock (&dev->dev_mutex); +mutex_lock (&dev->dev_ctx_lock);list_for_each_entry (ctx, &dev->ctx_list, list) { ctx->state =MTK_STATE_ABORT ;mtk_v4l2_vdec_dbg (0 , ctx,"[%d] Change to state MTK_STATE_ABORT" , ctx->id); } -mutex_unlock (&dev->dev_mutex); +mutex_unlock (&dev->dev_ctx_lock); }static void mtk_vcodec_vpu_reset_enc_handler (void *priv)
@@ -65,12 +65,12 @@ static void mtk_vcodec_vpu_reset_enc_handler(void *priv)dev_err (&dev->plat_dev->dev,"Watchdog timeout!!" ); -mutex_lock (&dev->dev_mutex); +mutex_lock (&dev->dev_ctx_lock);list_for_each_entry (ctx, &dev->ctx_list, list) { ctx->state =MTK_STATE_ABORT ;mtk_v4l2_vdec_dbg (0 , ctx,"[%d] Change to state MTK_STATE_ABORT" , ctx->id); } -mutex_unlock (&dev->dev_mutex); +mutex_unlock (&dev->dev_ctx_lock); }static const struct mtk_vcodec_fw_ops mtk_vcodec_vpu_msg = {
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c +5 -0
@@ -268,7 +268,9 @@ static int fops_vcodec_open(struct file *file) ctx->dev->vdec_pdata->init_vdec_params (ctx); +mutex_lock (&dev->dev_ctx_lock);list_add (&ctx->list, &dev->ctx_list); +mutex_unlock (&dev->dev_ctx_lock);mtk_vcodec_dbgfs_create (ctx);mutex_unlock (&dev->dev_mutex);
@@ -311,7 +313,9 @@ static int fops_vcodec_release(struct file *file)v4l2_ctrl_handler_free (&ctx->ctrl_hdl);mtk_vcodec_dbgfs_remove (dev, ctx->id); +mutex_lock (&dev->dev_ctx_lock);list_del_init (&ctx->list); +mutex_unlock (&dev->dev_ctx_lock);kfree (ctx);mutex_unlock (&dev->dev_mutex);return 0 ;
@@ -378,6 +382,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)for (i =0 ; i <MTK_VDEC_HW_MAX ; i++)mutex_init (&dev->dec_mutex[i]);mutex_init (&dev->dev_mutex); +mutex_init (&dev->dev_ctx_lock);spin_lock_init (&dev->irqlock); snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h +2 -0
@@ -231,6 +231,7 @@ struct mtk_vcodec_dec_ctx {* * @dec_mutex: decoder hardware lock * @dev_mutex: video_device lock +* @dev_ctx_lock: the lock of context list * @decode_workqueue: decode work queue * * @irqlock: protect data access by irq handler and work thread
@@ -270,6 +271,7 @@ struct mtk_vcodec_dec_dev {/* decoder hardware mutex lock */ struct mutex dec_mutex[MTK_VDEC_HW_MAX ];struct mutex dev_mutex; +struct mutex dev_ctx_lock;struct workqueue_struct *decode_workqueue;spinlock_t irqlock;
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_hevc_req_multi_if.c +1 -1
@@ -869,7 +869,6 @@ static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx) inst->vpu.codec_type = ctx->current_codec; inst->vpu.capture_type = ctx->capture_fourcc; - ctx->drv_handle = inst; err =vpu_dec_init (&inst->vpu);if (err) {mtk_vdec_err (ctx,"vdec_hevc init err=%d" , err);
@@ -898,6 +897,7 @@ static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx)mtk_vdec_debug (ctx,"lat hevc instance >> %p, codec_type = 0x%x" , inst, inst->vpu.codec_type); + ctx->drv_handle = inst;return 0 ; error_free_inst:kfree (inst);
drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c +2 -0
@@ -77,12 +77,14 @@ static bool vpu_dec_check_ap_inst(struct mtk_vcodec_dec_dev *dec_dev, struct vdestruct mtk_vcodec_dec_ctx *ctx;int ret = false; +mutex_lock (&dec_dev->dev_ctx_lock);list_for_each_entry (ctx, &dec_dev->ctx_list, list) {if (!IS_ERR_OR_NULL (ctx) && ctx->vpu_inst == vpu) { ret = true;break ; } } +mutex_unlock (&dec_dev->dev_ctx_lock);return ret; }
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c +5 -0
@@ -177,7 +177,9 @@ static int fops_vcodec_open(struct file *file)mtk_v4l2_venc_dbg (2 , ctx,"Create instance [%d]@%p m2m_ctx=%p " , ctx->id, ctx, ctx->m2m_ctx); +mutex_lock (&dev->dev_ctx_lock);list_add (&ctx->list, &dev->ctx_list); +mutex_unlock (&dev->dev_ctx_lock);mutex_unlock (&dev->dev_mutex); mtk_v4l2_venc_dbg(0, ctx, "%s encoder [%d]", dev_name(&dev->plat_dev->dev),
@@ -212,7 +214,9 @@ static int fops_vcodec_release(struct file *file)v4l2_fh_exit (&ctx->fh);v4l2_ctrl_handler_free (&ctx->ctrl_hdl); +mutex_lock (&dev->dev_ctx_lock);list_del_init (&ctx->list); +mutex_unlock (&dev->dev_ctx_lock);kfree (ctx);mutex_unlock (&dev->dev_mutex);return 0 ;
@@ -294,6 +298,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)mutex_init (&dev->enc_mutex);mutex_init (&dev->dev_mutex); +mutex_init (&dev->dev_ctx_lock);spin_lock_init (&dev->irqlock); snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h +2 -0
@@ -178,6 +178,7 @@ struct mtk_vcodec_enc_ctx {* * @enc_mutex: encoder hardware lock. * @dev_mutex: video_device lock +* @dev_ctx_lock: the lock of context list * @encode_workqueue: encode work queue * * @enc_irq: h264 encoder irq resource
@@ -205,6 +206,7 @@ struct mtk_vcodec_enc_dev {/* encoder hardware mutex lock */ struct mutex enc_mutex;struct mutex dev_mutex; +struct mutex dev_ctx_lock;struct workqueue_struct *encode_workqueue;int enc_irq;
drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c +2 -0
@@ -47,12 +47,14 @@ static bool vpu_enc_check_ap_inst(struct mtk_vcodec_enc_dev *enc_dev, struct venstruct mtk_vcodec_enc_ctx *ctx;int ret = false; +mutex_lock (&enc_dev->dev_ctx_lock);list_for_each_entry (ctx, &enc_dev->ctx_list, list) {if (!IS_ERR_OR_NULL (ctx) && ctx->vpu_inst == vpu) { ret = true;break ; } } +mutex_unlock (&enc_dev->dev_ctx_lock);return ret; }
drivers/misc/vmw_vmci/vmci_datagram.c +4 -2
@@ -234,7 +234,8 @@ static int dg_dispatch_as_host(u32 context_id, struct vmci_datagram *dg) dg_info->in_dg_host_queue = true; dg_info->entry = dst_entry; -memcpy (&dg_info->msg, dg, dg_size); + dg_info->msg = *dg; +memcpy (&dg_info->msg_payload, dg +1 , dg->payload_size);INIT_WORK (&dg_info->work, dg_delayed_dispatch);schedule_work (&dg_info->work);
@@ -377,7 +378,8 @@ int vmci_datagram_invoke_guest_handler(struct vmci_datagram *dg) dg_info->in_dg_host_queue = false; dg_info->entry = dst_entry; -memcpy (&dg_info->msg, dg,VMCI_DG_SIZE (dg)); + dg_info->msg = *dg; +memcpy (&dg_info->msg_payload, dg +1 , dg->payload_size);INIT_WORK (&dg_info->work, dg_delayed_dispatch);schedule_work (&dg_info->work);
drivers/net/dummy.c +1 -0
@@ -71,6 +71,7 @@ static int dummy_dev_init(struct net_device *dev)if (!dev->lstats)return -ENOMEM ; +netdev_lockdep_set_classes (dev);return 0 ; }
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +5 -4
@@ -147,10 +147,11 @@ void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len) phy_fw_ver[0 ] ='\0' ;bnx2x_get_ext_phy_fw_version (&bp->link_params, - phy_fw_ver,PHY_FW_VER_LEN ); -strscpy (buf, bp->fw_ver, buf_len); - snprintf(buf + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver), - "bc %d.%d.%d%s%s", + phy_fw_ver,sizeof (phy_fw_ver)); +/* This may become truncated. */ + scnprintf(buf, buf_len, + "%sbc %d.%d.%d%s%s", + bp->fw_ver, (bp->common.bc_ver & 0xff0000) >> 16, (bp->common.bc_ver & 0xff00) >> 8, (bp->common.bc_ver & 0xff),
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +1 -1
@@ -1132,7 +1132,7 @@ static void bnx2x_get_drvinfo(struct net_device *dev, }memset (version,0 ,sizeof (version)); -bnx2x_fill_fw_str (bp, version,ETHTOOL_FWVERS_LEN ); +bnx2x_fill_fw_str (bp, version,sizeof (version));strlcat (info->fw_version, version,sizeof (info->fw_version));strscpy (info->bus_info,pci_name (bp->pdev),sizeof (info->bus_info));
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +7 -7
@@ -6163,8 +6163,8 @@ static void bnx2x_link_int_ack(struct link_params *params,static int bnx2x_null_format_ver (u32 spirom_ver,u8 *str,u16 *len) { - str[0 ] ='\0' ; - (*len)--; +if (*len) + str[0 ] ='\0' ;return 0 ; }
@@ -6173,7 +6173,7 @@ static int bnx2x_format_ver(u32 num, u8 *str, u16 *len)u16 ret;if (*len <10 ) { -/* Need more than 10chars for this format */ +/* Need more than 10 chars for this format */ bnx2x_null_format_ver (num, str, len);return -EINVAL ; }
@@ -6188,8 +6188,8 @@ static int bnx2x_3_seq_format_ver(u32 num, u8 *str, u16 *len) {u16 ret; -if (*len <10 ) { -/* Need more than 10chars for this format */ +if (*len <9 ) { +/* Need more than 9 chars for this format */ bnx2x_null_format_ver (num, str, len);return -EINVAL ; }
@@ -6208,7 +6208,7 @@ int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,int status =0 ;u8 *ver_p = version;u16 remain_len = len; -if (version ==NULL || params ==NULL ) +if (version ==NULL || params ==NULL || len ==0 )return -EINVAL ; bp = params->bp;
@@ -11546,7 +11546,7 @@ static int bnx2x_7101_format_ver(u32 spirom_ver, u8 *str, u16 *len) str[2 ] = (spirom_ver &0xFF0000 ) >>16 ; str[3 ] = (spirom_ver &0xFF000000 ) >>24 ; str[4 ] ='\0' ; - *len -=5 ; + *len -=4 ;return 0 ; }
drivers/net/ethernet/intel/ice/ice_virtchnl.c +2 -7
@@ -496,7 +496,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg) vfres->rss_lut_size =ICE_LUT_VSI_SIZE ; vfres->max_mtu =ice_vc_get_max_frame_size (vf); - vfres->vsi_res[0 ].vsi_id = vf->lan_vsi_num; + vfres->vsi_res[0 ].vsi_id =ICE_VF_VSI_ID ; vfres->vsi_res[0 ].vsi_type =VIRTCHNL_VSI_SRIOV ; vfres->vsi_res[0 ].num_queue_pairs = vsi->num_txq; ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
@@ -542,12 +542,7 @@ static void ice_vc_reset_vf_msg(struct ice_vf *vf)*/ bool ice_vc_isvalid_vsi_id (struct ice_vf *vf,u16 vsi_id) { -struct ice_pf *pf = vf->pf; -struct ice_vsi *vsi; - - vsi =ice_find_vsi (pf, vsi_id); - -return (vsi && (vsi->vf == vf)); +return vsi_id ==ICE_VF_VSI_ID ; }/**
drivers/net/ethernet/intel/ice/ice_virtchnl.h +9 -0
@@ -19,6 +19,15 @@#define ICE_MAX_MACADDR_PER_VF 18#define ICE_FLEX_DESC_RXDID_MAX_NUM 64 +/* VFs only get a single VSI. For ice hardware, the VF does not need to know +* its VSI index. However, the virtchnl interface requires a VSI number, +* mainly due to legacy hardware. +* +* Since the VF doesn't need this information, report a static value to the VF +* instead of leaking any information about the PF or hardware setup. +*/ +#define ICE_VF_VSI_ID 1 +struct ice_virtchnl_ops {int (*get_ver_msg)(struct ice_vf *vf,u8 *msg);int (*get_vf_res_msg)(struct ice_vf *vf,u8 *msg);
drivers/net/ethernet/pensando/ionic/ionic_lif.c +4 -1
@@ -3468,9 +3468,12 @@ static int ionic_lif_adminq_init(struct ionic_lif *lif)napi_enable (&qcq->napi); -if (qcq->flags &IONIC_QCQ_F_INTR ) +if (qcq->flags &IONIC_QCQ_F_INTR ) { +irq_set_affinity_hint (qcq->intr.vector, + &qcq->intr.affinity_mask);ionic_intr_mask (idev->intr_ctrl, qcq->intr.index,IONIC_INTR_MASK_CLEAR ); + } qcq->flags |=IONIC_QCQ_F_INITED ;
drivers/net/ethernet/stmicro/stmmac/Kconfig +3 -3
@@ -165,9 +165,9 @@ config DWMAC_STARFIVE help Support for ethernet controllers on StarFive RISC-V SoCs - This selects the StarFive platform specific glue layer support for - the stmmac device driver. This driver is used for StarFive JH7110 - ethernet controller. + This selects the StarFive platform specific glue layer support + for the stmmac device driver. This driver is used for the + StarFive JH7100 and JH7110 ethernet controllers. config DWMAC_STI tristate "STi GMAC support"
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c +28 -4
@@ -15,13 +15,20 @@#include "stmmac_platform.h" -#define STARFIVE_DWMAC_PHY_INFT_RGMII 0x1 -#define STARFIVE_DWMAC_PHY_INFT_RMII 0x4 -#define STARFIVE_DWMAC_PHY_INFT_FIELD 0x7U +#define STARFIVE_DWMAC_PHY_INFT_RGMII 0x1 +#define STARFIVE_DWMAC_PHY_INFT_RMII 0x4 +#define STARFIVE_DWMAC_PHY_INFT_FIELD 0x7U + +#define JH7100_SYSMAIN_REGISTER49_DLYCHAIN 0xc8 + +struct starfive_dwmac_data { +unsigned int gtxclk_dlychain; +};struct starfive_dwmac {struct device *dev;struct clk *clk_tx; +const struct starfive_dwmac_data *data; };static void starfive_dwmac_fix_mac_speed (void *priv,unsigned int speed,unsigned int mode)
@@ -67,6 +74,8 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)case PHY_INTERFACE_MODE_RGMII :case PHY_INTERFACE_MODE_RGMII_ID : +case PHY_INTERFACE_MODE_RGMII_RXID : +case PHY_INTERFACE_MODE_RGMII_TXID : mode =STARFIVE_DWMAC_PHY_INFT_RGMII ;break ;
@@ -89,6 +98,14 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)if (err)return dev_err_probe (dwmac->dev, err,"error setting phy mode\n" ); +if (dwmac->data) { + err =regmap_write (regmap,JH7100_SYSMAIN_REGISTER49_DLYCHAIN , + dwmac->data->gtxclk_dlychain); +if (err) +return dev_err_probe (dwmac->dev, err, +"error selecting gtxclk delay chain\n" ); + } +return 0 ; }
@@ -114,6 +131,8 @@ static int starfive_dwmac_probe(struct platform_device *pdev)if (!dwmac)return -ENOMEM ; + dwmac->data =device_get_match_data (&pdev->dev); + dwmac->clk_tx =devm_clk_get_enabled (&pdev->dev,"tx" );if (IS_ERR (dwmac->clk_tx)) return dev_err_probe(&pdev->dev, PTR_ERR(dwmac->clk_tx),
@@ -150,8 +169,13 @@ static int starfive_dwmac_probe(struct platform_device *pdev)return 0 ; } +static const struct starfive_dwmac_data jh7100_data = { + .gtxclk_dlychain =4 , +}; +static const struct of_device_id starfive_dwmac_match[] = { - { .compatible ="starfive,jh7110-dwmac" }, + { .compatible ="starfive,jh7100-dwmac" , .data = &jh7100_data }, + { .compatible ="starfive,jh7110-dwmac" }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, starfive_dwmac_match);
drivers/net/geneve.c +1 -0
@@ -349,6 +349,7 @@ static int geneve_init(struct net_device *dev)gro_cells_destroy (&geneve->gro_cells);return err; } +netdev_lockdep_set_classes (dev);return 0 ; }
drivers/net/loopback.c +1 -0
@@ -144,6 +144,7 @@ static int loopback_dev_init(struct net_device *dev) dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats);if (!dev->lstats)return -ENOMEM ; +netdev_lockdep_set_classes (dev);return 0 ; }
drivers/net/pcs/pcs-xpcs.c +2 -2
@@ -293,7 +293,7 @@ static int xpcs_soft_reset(struct dw_xpcs *xpcs, dev =MDIO_MMD_VEND2 ;break ;default : -return -1 ; +return -EINVAL ; } ret =xpcs_write (xpcs, dev,MDIO_CTRL1 ,MDIO_CTRL1_RESET );
@@ -891,7 +891,7 @@ int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,return ret;break ;default : -return -1 ; +return -EINVAL ; }if (compat->pma_config) {
drivers/net/phy/phy_device.c +8 -5
@@ -1411,6 +1411,11 @@ int phy_sfp_probe(struct phy_device *phydev, }EXPORT_SYMBOL (phy_sfp_probe); +static bool phy_drv_supports_irq (struct phy_driver *phydrv) +{ +return phydrv->config_intr && phydrv->handle_interrupt; +} +/** * phy_attach_direct - attach a network device to a given PHY device pointer * @dev: network device to attach
@@ -1525,6 +1530,9 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,if (phydev->dev_flags &PHY_F_NO_IRQ ) phydev->irq =PHY_POLL ; +if (!phy_drv_supports_irq (phydev->drv) &&phy_interrupt_is_valid (phydev)) + phydev->irq =PHY_POLL ; +/* Port is set to PORT_TP by default and the actual PHY driver will set * it to different value depending on the PHY configuration. If we have * the generic PHY driver we can't figure it out, thus set the old
@@ -2987,11 +2995,6 @@ s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev, }EXPORT_SYMBOL (phy_get_internal_delay); -static bool phy_drv_supports_irq (struct phy_driver *phydrv) -{ -return phydrv->config_intr && phydrv->handle_interrupt; -} -static int phy_led_set_brightness (struct led_classdev *led_cdev,enum led_brightness value) {
drivers/net/veth.c +1 -0
@@ -1475,6 +1475,7 @@ static void veth_free_queues(struct net_device *dev)static int veth_dev_init (struct net_device *dev) { +netdev_lockdep_set_classes (dev);return veth_alloc_queues (dev); }
drivers/net/vxlan/vxlan_core.c +1 -0
@@ -2960,6 +2960,7 @@ static int vxlan_init(struct net_device *dev)if (err) goto err_gro_cells_destroy; +netdev_lockdep_set_classes (dev);return 0 ; err_gro_cells_destroy:
drivers/net/wireless/ath/ath11k/mhi.c +1 -1
@@ -105,7 +105,7 @@ static struct mhi_controller_config ath11k_mhi_config_qca6390 = { .max_channels = 128, .timeout_ms = 2000, .use_bounce_buf = false, - .buf_len = 0, + .buf_len = 8192, .num_channels = ARRAY_SIZE(ath11k_mhi_channels_qca6390), .ch_cfg = ath11k_mhi_channels_qca6390, .num_events = ARRAY_SIZE(ath11k_mhi_events_qca6390),
drivers/net/wireless/ath/ath9k/antenna.c +1 -1
@@ -643,7 +643,7 @@ static void ath_ant_try_scan(struct ath_ant_comb *antcomb, conf->main_lna_conf =ATH_ANT_DIV_COMB_LNA1 ; conf->alt_lna_conf =ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2 ; }else if (antcomb->rssi_sub > - antcomb->rssi_lna1) { + antcomb->rssi_lna2) {/* set to A-B */ conf->main_lna_conf =ATH_ANT_DIV_COMB_LNA1 ; conf->alt_lna_conf =ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2 ;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c +9 -0
@@ -82,6 +82,15 @@ static const struct dmi_system_id dmi_platform_data[] = { }, .driver_data = (void *)&acepc_t8_data, }, + { +/* ACEPC W5 Pro Cherry Trail Z8350 HDMI stick, same wifi as the T8 */ + .matches = { +DMI_MATCH (DMI_BOARD_NAME ,"T3 MRD" ), +DMI_MATCH (DMI_CHASSIS_TYPE ,"3" ), + DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), + }, + .driver_data = (void *)&acepc_t8_data, + }, {/* Chuwi Hi8 Pro with D2D3_Hi8Pro.233 BIOS */ .matches = {
drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +6 -0
@@ -299,3 +299,9 @@ MODULE_FIRMWARE(IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));MODULE_FIRMWARE (IWL_MA_B_GF_A_FW_MODULE_FIRMWARE (IWL_AX210_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE (IWL_AX210_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_MA_B_MR_A_FW_MODULE_FIRMWARE (IWL_AX210_UCODE_API_MAX )); + +MODULE_FIRMWARE ("iwlwifi-so-a0-gf-a0.pnvm" ); +MODULE_FIRMWARE ("iwlwifi-so-a0-gf4-a0.pnvm" ); +MODULE_FIRMWARE ("iwlwifi-ty-a0-gf-a0.pnvm" ); +MODULE_FIRMWARE ("iwlwifi-ma-b0-gf-a0.pnvm" ); +MODULE_FIRMWARE ("iwlwifi-ma-b0-gf4-a0.pnvm" );
drivers/net/wireless/intel/iwlwifi/cfg/bz.c +2 -0
@@ -179,3 +179,5 @@ MODULE_FIRMWARE(IWL_BZ_A_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));MODULE_FIRMWARE (IWL_BZ_A_FM4_B_MODULE_FIRMWARE (IWL_BZ_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_GL_B_FM_B_MODULE_FIRMWARE (IWL_BZ_UCODE_API_MAX ));MODULE_FIRMWARE (IWL_GL_C_FM_C_MODULE_FIRMWARE (IWL_BZ_UCODE_API_MAX )); + +MODULE_FIRMWARE ("iwlwifi-gl-c0-fm-c0.pnvm" );
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +1 -0
@@ -502,6 +502,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {/* Bz devices */ {IWL_PCI_DEVICE(0x2727, PCI_ANY_ID, iwl_bz_trans_cfg)}, + {IWL_PCI_DEVICE(0x272D, PCI_ANY_ID, iwl_bz_trans_cfg)}, {IWL_PCI_DEVICE(0x272b, PCI_ANY_ID, iwl_bz_trans_cfg)}, {IWL_PCI_DEVICE(0xA840, PCI_ANY_ID, iwl_bz_trans_cfg)}, {IWL_PCI_DEVICE(0x7740, PCI_ANY_ID, iwl_bz_trans_cfg)},
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c +40 -5
81 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h +1 -0
@@ -287,6 +287,7 @@ struct mt7915_dev {struct list_head sta_rc_list;struct list_head twt_list; +spinlock_t reg_lock;u32 hw_pattern;
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +3 -2
@@ -757,6 +757,9 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi,FIELD_PREP (MT_TXD2_SUB_TYPE , fc_stype); txwi[2 ] |=cpu_to_le32 (val); + +if (wcid->amsdu) + txwi[3 ] |=cpu_to_le32 (MT_TXD3_HW_AMSDU ); } static void
@@ -887,8 +890,6 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, val |=MT_TXD3_PROTECT_FRAME ;if (info->flags &IEEE80211_TX_CTL_NO_ACK ) val |=MT_TXD3_NO_ACK ; -if (wcid->amsdu) - val |=MT_TXD3_HW_AMSDU ; txwi[3 ] =cpu_to_le32 (val); txwi[4 ] =0 ;
drivers/net/wireless/mediatek/mt76/mt7996/mmio.c +42 -22
122 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +1 -2
@@ -242,8 +242,7 @@ struct mt7996_dev {u8 n_agrt; } twt; -u32 reg_l1_backup; -u32 reg_l2_backup; +spinlock_t reg_lock;u8 wtbl_size_group; };
drivers/net/wireless/realtek/rtw89/mac80211.c +2 -2
@@ -422,7 +422,7 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,* when disconnected by peer */ if (rtwdev->scanning) -rtw89_hw_scan_abort (rtwdev, vif); +rtw89_hw_scan_abort (rtwdev, rtwdev->scan_info.scanning_vif); } }
@@ -971,7 +971,7 @@ static int rtw89_ops_remain_on_channel(struct ieee80211_hw *hw, }if (rtwdev->scanning) -rtw89_hw_scan_abort (rtwdev, vif); +rtw89_hw_scan_abort (rtwdev, rtwdev->scan_info.scanning_vif);if (type ==IEEE80211_ROC_TYPE_MGMT_TX ) roc->state =RTW89_ROC_MGMT ;
drivers/net/wireless/realtek/rtw89/pci.h +1 -1
@@ -559,7 +559,7 @@#define RTW89_PCI_TXWD_NUM_MAX 512#define RTW89_PCI_TXWD_PAGE_SIZE 128#define RTW89_PCI_ADDRINFO_MAX 4 -#define RTW89_PCI_RX_BUF_SIZE 11460 +#define RTW89_PCI_RX_BUF_SIZE (11454 + 40)/* +40 for rtw89_rxdesc_long_v2 */ #define RTW89_PCI_POLL_BDRAM_RST_CNT 100#define RTW89_PCI_MULTITAG 8
drivers/nvme/host/pci.c +3 -0
@@ -3361,6 +3361,9 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_BOGUS_NID, }, { PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */ .driver_data = NVME_QUIRK_BOGUS_NID, }, + { PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */ + .driver_data = NVME_QUIRK_NO_DEEPEST_PS | + NVME_QUIRK_BOGUS_NID, }, { PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST | NVME_QUIRK_BOGUS_NID, },
drivers/perf/hisilicon/hisi_uncore_uc_pmu.c +41 -1
53 lines not on this page · raw message
drivers/pinctrl/renesas/core.c +3 -1
@@ -909,9 +909,11 @@ static void __init sh_pfc_check_cfg_reg(const char *drvname,sh_pfc_err ("reg 0x%x: var_field_width declares %u instead of %u bits\n" , cfg_reg->reg, rw, cfg_reg->reg_width); -if (n != cfg_reg->nr_enum_ids) +if (n != cfg_reg->nr_enum_ids) {sh_pfc_err ("reg 0x%x: enum_ids[] has %u instead of %u values\n" , cfg_reg->reg, cfg_reg->nr_enum_ids, n); + n = cfg_reg->nr_enum_ids; + } check_enum_ids:sh_pfc_check_reg_enums (drvname, cfg_reg->reg, cfg_reg->enum_ids, n);
drivers/platform/x86/intel/vbtn.c +3 -2
@@ -136,8 +136,6 @@ static int intel_vbtn_input_setup(struct platform_device *device) priv->switches_dev->id.bustype =BUS_HOST ;if (priv->has_switches) { -detect_tablet_mode (&device->dev); - ret =input_register_device (priv->switches_dev);if (ret)return ret;
@@ -316,6 +314,9 @@ static int intel_vbtn_probe(struct platform_device *device)if (ACPI_FAILURE (status))dev_err (&device->dev,"Error VBDL failed with ACPI status %d\n" , status); } +// Check switches after buttons since VBDL may have side effects. +if (has_switches) +detect_tablet_mode (&device->dev);device_init_wakeup (&device->dev, true);/*
drivers/platform/x86/touchscreen_dmi.c +9 -0
@@ -1222,6 +1222,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"), }, }, + { +/* Chuwi Vi8 dual-boot (CWI506) */ + .driver_data = (void *)&chuwi_vi8_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Insyde" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"i86" ), + DMI_MATCH(DMI_BIOS_VERSION, "CHUWI2.D86JHBNR02"), + }, + }, {/* Chuwi Vi8 Plus (CWI519) */ .driver_data = (void *)&chuwi_vi8_plus_data,
drivers/pmdomain/imx/imx8mp-blk-ctrl.c +5 -5
@@ -55,7 +55,7 @@ struct imx8mp_blk_ctrl_domain_data {const char *gpc_name; }; -#define DOMAIN_MAX_CLKS 2 +#define DOMAIN_MAX_CLKS 3#define DOMAIN_MAX_PATHS 3struct imx8mp_blk_ctrl_domain {
@@ -457,8 +457,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = { }, [IMX8MP_HDMIBLK_PD_LCDIF] = { .name = "hdmiblk-lcdif", - .clk_names = (const char *[]){ "axi", "apb" }, - .num_clks = 2, + .clk_names = (const char *[]){ "axi", "apb", "fdcc" }, + .num_clks = 3, .gpc_name = "lcdif", .path_names = (const char *[]){"lcdif-hdmi"}, .num_paths = 1,
@@ -483,8 +483,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = { }, [IMX8MP_HDMIBLK_PD_HDMI_TX] = { .name = "hdmiblk-hdmi-tx", - .clk_names = (const char *[]){ "apb", "ref_266m" }, - .num_clks = 2, + .clk_names = (const char *[]){ "apb", "ref_266m", "fdcc" }, + .num_clks = 3, .gpc_name = "hdmi-tx", }, [IMX8MP_HDMIBLK_PD_HDMI_TX_PHY] = {
drivers/pmdomain/ti/omap_prm.c +2 -0
@@ -695,6 +695,8 @@ static int omap_prm_domain_init(struct device *dev, struct omap_prm *prm) data = prm->data; name =devm_kasprintf (dev,GFP_KERNEL ,"prm_%s" , data->name); +if (!name) +return -ENOMEM ; prmd->dev = dev; prmd->prm = prm;
drivers/scsi/lpfc/lpfc_nportdisc.c +4 -2
@@ -748,8 +748,10 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,/* Save the ELS cmd */ elsiocb->drvrTimeout = cmd; -lpfc_sli4_resume_rpi (ndlp, - lpfc_mbx_cmpl_resume_rpi, elsiocb); +if (lpfc_sli4_resume_rpi (ndlp, + lpfc_mbx_cmpl_resume_rpi, + elsiocb)) +kfree (elsiocb); goto out; } }
drivers/soundwire/dmi-quirks.c +8 -0
@@ -130,6 +130,14 @@ static const struct dmi_system_id adr_remap_quirk_table[] = { }, .driver_data = (void *)intel_rooks_county, }, + { +/* quirk used for NUC15 LAPRC710 skew */ + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"Intel Corporation" ), + DMI_MATCH(DMI_BOARD_NAME, "LAPRC710"), + }, + .driver_data = (void *)intel_rooks_county, + }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
drivers/thermal/thermal_of.c +8 -4
@@ -225,14 +225,18 @@ static int thermal_of_monitor_init(struct device_node *np, int *delay, int *pdelint ret; ret =of_property_read_u32 (np,"polling-delay-passive" , pdelay); -if (ret <0 ) { -pr_err ("%pOFn: missing polling-delay-passive property\n" , np); +if (ret == -EINVAL ) { + *pdelay =0 ; + }else if (ret <0 ) { +pr_err ("%pOFn: Couldn't get polling-delay-passive: %d\n" , np, ret);return ret; } ret =of_property_read_u32 (np,"polling-delay" , delay); -if (ret <0 ) { -pr_err ("%pOFn: missing polling-delay property\n" , np); +if (ret == -EINVAL ) { + *delay =0 ; + }else if (ret <0 ) { +pr_err ("%pOFn: Couldn't get polling-delay: %d\n" , np, ret);return ret; }
drivers/thunderbolt/quirks.c +14 -0
@@ -43,6 +43,12 @@ static void quirk_usb3_maximum_bandwidth(struct tb_switch *sw) } } +static void quirk_block_rpm_in_redrive (struct tb_switch *sw) +{ + sw->quirks |=QUIRK_KEEP_POWER_IN_DP_REDRIVE ; +tb_sw_dbg (sw,"preventing runtime PM in DP redrive mode\n" ); +} +struct tb_quirk {u16 hw_vendor_id;u16 hw_device_id;
@@ -86,6 +92,14 @@ static const struct tb_quirk tb_quirks[] = { quirk_usb3_maximum_bandwidth }, {0x8087 ,PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HUB_40G_BRIDGE ,0x0000 ,0x0000 , quirk_usb3_maximum_bandwidth }, +/* +* Block Runtime PM in DP redrive mode for Intel Barlow Ridge host +* controllers. +*/ + { 0x8087, PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HOST_80G_NHI, 0x0000, 0x0000, + quirk_block_rpm_in_redrive }, + { 0x8087, PCI_DEVICE_ID_INTEL_BARLOW_RIDGE_HOST_40G_NHI, 0x0000, 0x0000, + quirk_block_rpm_in_redrive },/* * CLx is not supported on AMD USB4 Yellow Carp and Pink Sardine platforms. */
drivers/thunderbolt/tb.c +48 -1
67 lines not on this page · raw message
drivers/thunderbolt/tb.h +4 -0
@@ -23,6 +23,8 @@#define QUIRK_FORCE_POWER_LINK_CONTROLLER BIT(0)/* Disable CLx if not supported */ #define QUIRK_NO_CLX BIT(1) +/* Need to keep power on while USB4 port is in redrive mode */ +#define QUIRK_KEEP_POWER_IN_DP_REDRIVE BIT(2)/** * struct tb_nvm - Structure holding NVM information
@@ -261,6 +263,7 @@ struct tb_bandwidth_group {* @group_list: The adapter is linked to the group's list of ports through this * @max_bw: Maximum possible bandwidth through this adapter if set to * non-zero. +* @redrive: For DP IN, if true the adapter is in redrive mode. * * In USB4 terminology this structure represents an adapter (protocol or * lane adapter).
@@ -289,6 +292,7 @@ struct tb_port {struct tb_bandwidth_group *group;struct list_head group_list;unsigned int max_bw; +bool redrive; };/**
drivers/usb/gadget/function/uvc_video.c +3 -0
@@ -35,6 +35,9 @@ uvc_video_encode_header(struct uvc_video *video, struct uvc_buffer *buf, data[1 ] =UVC_STREAM_EOH | video->fid; +if (video->queue.flags &UVC_QUEUE_DROP_INCOMPLETE ) + data[1 ] |=UVC_STREAM_ERR ; +if (video->queue.buf_used ==0 && ts.tv_sec) {/* dwClockFrequency is 48 MHz */ u32 pts = ((u64 )ts.tv_sec *USEC_PER_SEC + ts.tv_nsec /NSEC_PER_USEC ) *48 ;
drivers/usb/host/sl811-hcd.c +2 -0
@@ -585,6 +585,7 @@ done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank)finish_request (sl811, ep, urb, urbstat); } +#ifdef QUIRK2 static inline u8 checkdone (struct sl811 *sl811) {u8 ctl;
@@ -616,6 +617,7 @@ static inline u8 checkdone(struct sl811 *sl811)#endif return irqstat; } +#endif static irqreturn_t sl811h_irq (struct usb_hcd *hcd) {
drivers/usb/typec/tcpm/tcpci.c +1 -0
@@ -889,6 +889,7 @@ MODULE_DEVICE_TABLE(i2c, tcpci_id);#ifdef CONFIG_OF static const struct of_device_id tcpci_of_match[] = { { .compatible ="nxp,ptn5110" , }, + { .compatible ="tcpci" , }, {}, };MODULE_DEVICE_TABLE (of, tcpci_of_match);
drivers/usb/typec/ucsi/ucsi.c +24 -2
@@ -36,6 +36,19 @@*/ #define UCSI_SWAP_TIMEOUT_MS 5000 +static int ucsi_read_message_in (struct ucsi *ucsi,void *buf, +size_t buf_size) +{ +/* +* Below UCSI 2.0, MESSAGE_IN was limited to 16 bytes. Truncate the +* reads here. +*/ +if (ucsi->version <=UCSI_VERSION_1_2 ) + buf_size =clamp (buf_size,0 ,16 ); + +return ucsi->ops->read (ucsi,UCSI_MESSAGE_IN , buf, buf_size); +} +static int ucsi_acknowledge_command (struct ucsi *ucsi) {u64 ctrl;
@@ -72,7 +85,7 @@ static int ucsi_read_error(struct ucsi *ucsi)if (ret <0 )return ret; - ret = ucsi->ops->read (ucsi,UCSI_MESSAGE_IN , &error,sizeof (error)); + ret =ucsi_read_message_in (ucsi, &error,sizeof (error));if (ret)return ret;
@@ -174,7 +187,7 @@ int ucsi_send_command(struct ucsi *ucsi, u64 command, length = ret;if (data) { - ret = ucsi->ops->read (ucsi,UCSI_MESSAGE_IN , data, size); + ret =ucsi_read_message_in (ucsi, data, size);if (ret) goto out; }
@@ -1593,6 +1606,15 @@ int ucsi_register(struct ucsi *ucsi)if (!ucsi->version)return -ENODEV ; +/* +* Version format is JJ.M.N (JJ = Major version, M = Minor version, +* N = sub-minor version). +*/ +dev_dbg (ucsi->dev,"Registered UCSI interface with version %x.%x.%x" , +UCSI_BCD_GET_MAJOR (ucsi->version), +UCSI_BCD_GET_MINOR (ucsi->version), +UCSI_BCD_GET_SUBMINOR (ucsi->version)); +queue_delayed_work (system_long_wq, &ucsi->work,0 );ucsi_debugfs_register (ucsi);
drivers/usb/typec/ucsi/ucsi.h +11 -0
@@ -23,6 +23,17 @@ struct dentry;#define UCSI_CONTROL 8#define UCSI_MESSAGE_IN 16#define UCSI_MESSAGE_OUT 32 +#define UCSIv2_MESSAGE_OUT 272 + +/* UCSI versions */ +#define UCSI_VERSION_1_2 0x0120 +#define UCSI_VERSION_2_0 0x0200 +#define UCSI_VERSION_2_1 0x0210 +#define UCSI_VERSION_3_0 0x0300 + +#define UCSI_BCD_GET_MAJOR (_v_) (((_v_) >> 8) & 0xFF) +#define UCSI_BCD_GET_MINOR (_v_) (((_v_) >> 4) & 0x0F) +#define UCSI_BCD_GET_SUBMINOR (_v_) ((_v_) & 0x0F)/* Command Status and Connector Change Indication (CCI) bits */ #define UCSI_CCI_CONNECTOR (_c_) (((_c_) & GENMASK(7, 1)) >> 1)
drivers/video/fbdev/core/fbmon.c +4 -3
@@ -1311,7 +1311,7 @@ int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_infint fb_videomode_from_videomode (const struct videomode *vm,struct fb_videomode *fbmode) { -unsigned int htotal, vtotal; +unsigned int htotal, vtotal, total; fbmode->xres = vm->hactive; fbmode->left_margin = vm->hback_porch;
@@ -1344,8 +1344,9 @@ int fb_videomode_from_videomode(const struct videomode *vm, vtotal = vm->vactive + vm->vfront_porch + vm->vback_porch + vm->vsync_len;/* prevent division by zero */ -if (htotal && vtotal) { - fbmode->refresh = vm->pixelclock / (htotal * vtotal); + total = htotal * vtotal; +if (total) { + fbmode->refresh = vm->pixelclock / total;/* a mode must have htotal and vtotal != 0 or it is invalid */ }else { fbmode->refresh =0 ;
drivers/video/fbdev/via/accel.c +2 -2
@@ -115,7 +115,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height,if (op !=VIA_BITBLT_FILL ) { tmp = src_mem ?0 : src_addr; -if (dst_addr &0xE0000007 ) { +if (tmp &0xE0000007 ) {printk (KERN_WARNING "hw_bitblt_1: Unsupported source " "address %X\n" , tmp);return -EINVAL ;
@@ -260,7 +260,7 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height,writel (tmp, engine +0x18 ); tmp = src_mem ?0 : src_addr; -if (dst_addr &0xE0000007 ) { +if (tmp &0xE0000007 ) {printk (KERN_WARNING "hw_bitblt_2: Unsupported source " "address %X\n" , tmp);return -EINVAL ;
drivers/xen/balloon.c +0 -2
@@ -673,7 +673,6 @@ EXPORT_SYMBOL(xen_free_ballooned_pages);static void __init balloon_add_regions (void ) { -#if defined(CONFIG_XEN_PV )unsigned long start_pfn, pages;unsigned long pfn, extra_pfn_end;unsigned int i;
@@ -697,7 +696,6 @@ static void __init balloon_add_regions(void) balloon_stats.total_pages += extra_pfn_end - start_pfn; } -#endif }static int __init balloon_init (void )
fs/btrfs/export.c +8 -1
@@ -174,8 +174,15 @@ struct dentry *btrfs_get_parent(struct dentry *child) ret =btrfs_search_slot (NULL , root, &key, path,0 ,0 );if (ret <0 ) goto fail; +if (ret ==0 ) { +/* +* Key with offset of -1 found, there would have to exist an +* inode with such number or a root with such id. +*/ + ret = -EUCLEAN ; + goto fail; + } -BUG_ON (ret ==0 );/* Key with offset of -1 found */ if (path->slots[0 ] ==0 ) { ret = -ENOENT ; goto fail;
fs/btrfs/send.c +9 -1
@@ -1070,7 +1070,15 @@ static int iterate_inode_ref(struct btrfs_root *root, struct btrfs_path *path, ret =PTR_ERR (start); goto out; } -BUG_ON (start < p->buf); +if (unlikely (start < p->buf)) { +btrfs_err (root->fs_info, +"send: path ref buffer underflow for key (%llu %u %llu)" , + found_key->objectid, + found_key->type, + found_key->offset); + ret = -EINVAL ; + goto out; + } } p->start = start; }else {
fs/btrfs/volumes.c +11 -1
@@ -3352,7 +3352,17 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info)mutex_unlock (&fs_info->reclaim_bgs_lock); goto error; } -BUG_ON (ret ==0 );/* Corruption */ +if (ret ==0 ) { +/* +* On the first search we would find chunk tree with +* offset -1, which is not possible. On subsequent +* loops this would find an existing item on an invalid +* offset (one less than the previous one, wrong +* alignment and size). +*/ + ret = -EUCLEAN ; + goto error; + } ret =btrfs_previous_item (chunk_root, path, key.objectid, key.type);
fs/ext4/mballoc.c +4 -1
@@ -3060,7 +3060,10 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)for (i =0 ; i <=13 ; i++)seq_printf (seq," %-5u" , i <= blocksize_bits +1 ? sg.info.bb_counters[i] :0 ); -seq_puts (seq," ]\n" ); +seq_puts (seq," ]" ); +if (EXT4_MB_GRP_BBITMAP_CORRUPT (&sg.info)) +seq_puts (seq," Block bitmap corrupted!" ); +seq_puts (seq,"\n" );return 0 ; }
fs/ext4/super.c +12 -0
@@ -6865,6 +6865,10 @@ static int ext4_write_dquot(struct dquot *dquot)if (IS_ERR (handle))return PTR_ERR (handle); ret =dquot_commit (dquot); +if (ret <0 ) +ext4_error_err (dquot->dq_sb, -ret, +"Failed to commit dquot type %d" , + dquot->dq_id.type); err =ext4_journal_stop (handle);if (!ret) ret = err;
@@ -6881,6 +6885,10 @@ static int ext4_acquire_dquot(struct dquot *dquot)if (IS_ERR (handle))return PTR_ERR (handle); ret =dquot_acquire (dquot); +if (ret <0 ) +ext4_error_err (dquot->dq_sb, -ret, +"Failed to acquire dquot type %d" , + dquot->dq_id.type); err =ext4_journal_stop (handle);if (!ret) ret = err;
@@ -6900,6 +6908,10 @@ static int ext4_release_dquot(struct dquot *dquot)return PTR_ERR (handle); } ret =dquot_release (dquot); +if (ret <0 ) +ext4_error_err (dquot->dq_sb, -ret, +"Failed to release dquot type %d" , + dquot->dq_id.type); err =ext4_journal_stop (handle);if (!ret) ret = err;
fs/isofs/inode.c +16 -2
@@ -908,8 +908,22 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)* we then decide whether to use the Joliet descriptor. */ inode =isofs_iget (s, sbi->s_firstdatazone,0 ); -if (IS_ERR (inode)) - goto out_no_root; + +/* +* Fix for broken CDs with a corrupt root inode but a correct Joliet +* root directory. +*/ +if (IS_ERR (inode)) { +if (joliet_level && sbi->s_firstdatazone != first_data_zone) { +printk (KERN_NOTICE +"ISOFS: root inode is unusable. " +"Disabling Rock Ridge and switching to Joliet." ); + sbi->s_rock =0 ; + inode =NULL ; + }else { + goto out_no_root; + } + }/* * Fix for broken CDs with Rock Ridge and empty ISO root directory but
fs/kernfs/dir.c +20 -11
@@ -529,6 +529,20 @@ void kernfs_get(struct kernfs_node *kn) }EXPORT_SYMBOL_GPL (kernfs_get); +static void kernfs_free_rcu (struct rcu_head *rcu) +{ + struct kernfs_node *kn = container_of(rcu, struct kernfs_node, rcu); + +kfree_const (kn->name); + +if (kn->iattr) { +simple_xattrs_free (&kn->iattr->xattrs,NULL ); +kmem_cache_free (kernfs_iattrs_cache, kn->iattr); + } + +kmem_cache_free (kernfs_node_cache, kn); +} +/** * kernfs_put - put a reference count on a kernfs_node * @kn: the target kernfs_node
@@ -557,16 +571,11 @@ void kernfs_put(struct kernfs_node *kn)if (kernfs_type (kn) ==KERNFS_LINK )kernfs_put (kn->symlink.target_kn); -kfree_const (kn->name); - -if (kn->iattr) { -simple_xattrs_free (&kn->iattr->xattrs,NULL ); -kmem_cache_free (kernfs_iattrs_cache, kn->iattr); - }spin_lock (&kernfs_idr_lock);idr_remove (&root->ino_idr, (u32 )kernfs_ino (kn));spin_unlock (&kernfs_idr_lock); -kmem_cache_free (kernfs_node_cache, kn); + +call_rcu (&kn->rcu, kernfs_free_rcu); kn = parent;if (kn) {
@@ -575,7 +584,7 @@ void kernfs_put(struct kernfs_node *kn) }else {/* just released the root kn, free @root too */ idr_destroy (&root->ino_idr); -kfree (root); +kfree_rcu (root, rcu); } }EXPORT_SYMBOL_GPL (kernfs_put);
@@ -715,7 +724,7 @@ struct kernfs_node *kernfs_find_and_get_node_by_id(struct kernfs_root *root,ino_t ino =kernfs_id_ino (id);u32 gen =kernfs_id_gen (id); -spin_lock (&kernfs_idr_lock); +rcu_read_lock (); kn =idr_find (&root->ino_idr, (u32 )ino);if (!kn)
@@ -739,10 +748,10 @@ struct kernfs_node *kernfs_find_and_get_node_by_id(struct kernfs_root *root,if (unlikely (!__kernfs_active (kn) || !atomic_inc_not_zero (&kn->count))) goto err_unlock; -spin_unlock (&kernfs_idr_lock); +rcu_read_unlock ();return kn; err_unlock: -spin_unlock (&kernfs_idr_lock); +rcu_read_unlock ();return NULL ; }
fs/kernfs/kernfs-internal.h +2 -0
@@ -49,6 +49,8 @@ struct kernfs_root {struct rw_semaphore kernfs_rwsem;struct rw_semaphore kernfs_iattr_rwsem;struct rw_semaphore kernfs_supers_rwsem; + +struct rcu_head rcu; };/* +1 to avoid triggering overflow warning when negating it */
fs/orangefs/super.c +1 -1
@@ -527,7 +527,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst, sb->s_fs_info =kzalloc (sizeof (struct orangefs_sb_info_s ),GFP_KERNEL );if (!ORANGEFS_SB (sb)) { d =ERR_PTR (-ENOMEM ); - goto free_sb_and_op; + goto free_op; } ret = orangefs_fill_sb(sb,
fs/pstore/zone.c +2 -0
@@ -973,6 +973,8 @@ static ssize_t psz_kmsg_read(struct pstore_zone *zone,char *buf =kasprintf (GFP_KERNEL ,"%s: Total %d times\n" ,kmsg_dump_reason_str (record->reason), record->count); +if (!buf) +return -ENOMEM ; hlen =strlen (buf); record->buf =krealloc (buf, hlen + size,GFP_KERNEL );if (!record->buf) {
fs/sysv/itree.c +4 -6
@@ -82,9 +82,6 @@ static inline sysv_zone_t *block_end(struct buffer_head *bh)return (sysv_zone_t *)((char *)bh->b_data + bh->b_size); } -/* -* Requires read_lock(&pointers_lock) or write_lock(&pointers_lock) -*/ static Indirect *get_branch(struct inode *inode, int depth, int offsets[],
@@ -104,15 +101,18 @@ static Indirect *get_branch(struct inode *inode, bh =sb_bread (sb, block);if (!bh) goto failure; +read_lock (&pointers_lock);if (!verify_chain (chain, p)) goto changed;add_chain (++p, bh, (sysv_zone_t *)bh->b_data + *++offsets); +read_unlock (&pointers_lock);if (!p->key) goto no_block; }return NULL ; changed: +read_unlock (&pointers_lock);brelse (bh); *err = -EAGAIN ; goto no_block;
@@ -218,9 +218,7 @@ static int get_block(struct inode *inode, sector_t iblock, struct buffer_head *b goto out; reread: -read_lock (&pointers_lock); partial =get_branch (inode, depth, offsets, chain, &err); -read_unlock (&pointers_lock);/* Simplest case - block found, no allocation needed */ if (!partial) {
@@ -290,9 +288,9 @@ static Indirect *find_shared(struct inode *inode, *top =0 ;for (k = depth; k >1 && !offsets[k-1 ]; k--) ; + partial =get_branch (inode, k, offsets, chain, &err);write_lock (&pointers_lock); - partial =get_branch (inode, k, offsets, chain, &err);if (!partial) partial = chain + k-1 ;/*
include/acpi/acpi_bus.h +7 -7
@@ -652,6 +652,7 @@ bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *sbool acpi_quirk_skip_acpi_ac_and_battery (void );int acpi_install_cmos_rtc_space_handler (acpi_handle handle);void acpi_remove_cmos_rtc_space_handler (acpi_handle handle); +int acpi_quirk_skip_serdev_enumeration (struct device *controller_parent,bool *skip);#else static inline bool acpi_device_override_status (struct acpi_device *adev,unsigned long long *status)
@@ -669,23 +670,22 @@ static inline int acpi_install_cmos_rtc_space_handler(acpi_handle handle)static inline void acpi_remove_cmos_rtc_space_handler (acpi_handle handle) { } +static inline int +acpi_quirk_skip_serdev_enumeration (struct device *controller_parent,bool *skip) +{ + *skip = false; +return 0 ; +}#endif #if IS_ENABLED (CONFIG_X86_ANDROID_TABLETS )bool acpi_quirk_skip_i2c_client_enumeration (struct acpi_device *adev); -int acpi_quirk_skip_serdev_enumeration (struct device *controller_parent,bool *skip);bool acpi_quirk_skip_gpio_event_handlers (void );#else static inline bool acpi_quirk_skip_i2c_client_enumeration (struct acpi_device *adev) {return false; } -static inline int -acpi_quirk_skip_serdev_enumeration (struct device *controller_parent,bool *skip) -{ - *skip = false; -return 0 ; -}static inline bool acpi_quirk_skip_gpio_event_handlers (void ) {return false;
include/linux/kernfs.h +2 -0
@@ -223,6 +223,8 @@ struct kernfs_node {unsigned short flags;umode_t mode;struct kernfs_iattrs *iattr; + +struct rcu_head rcu; };/*
include/linux/overflow.h +7 -5
@@ -31,8 +31,10 @@* credit to Christian Biere. */ #define __type_half_max (type) ((type)1 << (8*sizeof(type) - 1 - is_signed_type(type))) -#define type_max (T ) ((T)((__type_half_max(T) - 1) + __type_half_max(T))) -#define type_min (T ) ((T)((T)-type_max(T)-(T)1)) +#define __type_max (T ) ((T)((__type_half_max(T) - 1) + __type_half_max(T))) +#define type_max (t) __type_max(typeof(t)) +#define __type_min (T ) ((T)((T)-type_max(T)-(T)1)) +#define type_min (t) __type_min(typeof(t))/* * Avoids triggering -Wtype-limits compilation warning,
@@ -130,10 +132,10 @@ static inline bool __must_check __must_check_overflow(bool overflow)#define __overflows_type_constexpr (x,T ) ( \ is_unsigned_type(typeof(x)) ? \ - (x) > type_max(typeof(T)) : \ + (x) > type_max(T) : \ is_unsigned_type(typeof(T)) ? \ - (x) < 0 || (x) > type_max(typeof(T)) : \ - (x) < type_min(typeof(T)) || (x) > type_max(typeof(T))) + (x) < 0 || (x) > type_max(T) : \ + (x) < type_min(T) || (x) > type_max(T))#define __overflows_type (x,T ) ({ \ typeof(T) v = 0; \
include/linux/randomize_kstack.h +1 -1
@@ -80,7 +80,7 @@ DECLARE_PER_CPU(u32, kstack_offset);if (static_branch_maybe (CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT , \ &randomize_kstack_offset)) { \u32 offset =raw_cpu_read (kstack_offset); \ - offset ^= (rand); \ + offset =ror32 (offset,5 ) ^ (rand); \raw_cpu_write (kstack_offset, offset); \ } \ }while (0 )
include/linux/rcupdate.h +2 -2
@@ -189,9 +189,9 @@ void rcu_tasks_trace_qs_blkd(struct task_struct *t); do { \ int ___rttq_nesting = READ_ONCE((t)->trc_reader_nesting); \ \ - if (likely(!READ_ONCE((t)->trc_reader_special.b.need_qs)) && \ + if (unlikely(READ_ONCE((t)->trc_reader_special.b.need_qs) == TRC_NEED_QS) && \ likely(!___rttq_nesting)) { \ - rcu_trc_cmpxchg_need_qs((t), 0, TRC_NEED_QS_CHECKED); \ + rcu_trc_cmpxchg_need_qs((t), TRC_NEED_QS, TRC_NEED_QS_CHECKED); \ } else if (___rttq_nesting && ___rttq_nesting != INT_MIN && \ !READ_ONCE((t)->trc_reader_special.b.blocked)) { \ rcu_tasks_trace_qs_blkd(t); \
include/linux/skbuff.h +11 -0
@@ -2627,6 +2627,8 @@ static inline void skb_put_u8(struct sk_buff *skb, u8 val)void *skb_push (struct sk_buff *skb,unsigned int len);static inline void *__skb_push (struct sk_buff *skb,unsigned int len) { +DEBUG_NET_WARN_ON_ONCE (len >INT_MAX ); + skb->data -= len; skb->len += len;return skb->data;
@@ -2635,6 +2637,8 @@ static inline void *__skb_push(struct sk_buff *skb, unsigned int len)void *skb_pull (struct sk_buff *skb,unsigned int len);static inline void *__skb_pull (struct sk_buff *skb,unsigned int len) { +DEBUG_NET_WARN_ON_ONCE (len >INT_MAX ); + skb->len -= len;if (unlikely (skb->len < skb->data_len)) {#if defined(CONFIG_DEBUG_NET )
@@ -2659,6 +2663,8 @@ void *__pskb_pull_tail(struct sk_buff *skb, int delta);static inline enum skb_drop_reason pskb_may_pull_reason (struct sk_buff *skb,unsigned int len) { +DEBUG_NET_WARN_ON_ONCE (len >INT_MAX ); +if (likely (len <=skb_headlen (skb)))return SKB_NOT_DROPPED_YET ;
@@ -2831,6 +2837,11 @@ static inline void skb_set_inner_network_header(struct sk_buff *skb, skb->inner_network_header += offset; } +static inline bool skb_inner_network_header_was_set (const struct sk_buff *skb) +{ +return skb->inner_network_header >0 ; +} +static inline unsigned char *skb_inner_mac_header (const struct sk_buff *skb) {return skb->head + skb->inner_mac_header;
include/linux/sunrpc/sched.h +1 -1
@@ -186,7 +186,7 @@ struct rpc_wait_queue {unsigned char maxpriority;/* maximum priority (0 if queue is not a priority queue) */ unsigned char priority;/* current priority */ unsigned char nr;/* # tasks remaining for cookie */ -unsigned short qlen;/* total # tasks waiting in queue */ +unsigned int qlen;/* total # tasks waiting in queue */ struct rpc_timer timer_list;#if IS_ENABLED (CONFIG_SUNRPC_DEBUG ) ||IS_ENABLED (CONFIG_TRACEPOINTS )const char * name;
include/net/bluetooth/hci.h +8 -0
@@ -339,6 +339,14 @@ enum {* during the hdev->setup vendor callback. */ HCI_QUIRK_BROKEN_LE_CODED , + +/* +* When this quirk is set, the HCI_OP_READ_ENC_KEY_SIZE command is +* skipped during an HCI_EV_ENCRYPT_CHANGE event. This is required +* for Actions Semiconductor ATS2851 based controllers, which erroneously +* claim to support it. +*/ + HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE, };/* HCI device flags */
include/uapi/linux/input-event-codes.h +1 -0
@@ -602,6 +602,7 @@#define KEY_ALS_TOGGLE 0x230/* Ambient light sensor */ #define KEY_ROTATE_LOCK_TOGGLE 0x231/* Display rotation lock */ +#define KEY_REFRESH_RATE_TOGGLE 0x232/* Display refresh rate toggle */ #define KEY_BUTTONCONFIG 0x240/* AL Button Configuration */ #define KEY_TASKMANAGER 0x241/* AL Task/Project Manager */
io_uring/io_uring.c +16 -9
@@ -2117,6 +2117,13 @@ static void io_init_req_drain(struct io_kiocb *req) } } +static __cold int io_init_fail_req (struct io_kiocb *req,int err) +{ +/* ensure per-opcode data is cleared if we fail before prep */ +memset (&req->cmd.data,0 ,sizeof (req->cmd.data)); +return err; +} + static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, const struct io_uring_sqe *sqe) __must_hold(&ctx->uring_lock)
@@ -2137,29 +2144,29 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,if (unlikely (opcode >=IORING_OP_LAST )) { req->opcode =0 ; -return -EINVAL ; +return io_init_fail_req (req, -EINVAL ); } def = &io_issue_defs[opcode];if (unlikely (sqe_flags & ~SQE_COMMON_FLAGS )) {/* enforce forwards compatibility on users */ if (sqe_flags & ~SQE_VALID_FLAGS ) -return -EINVAL ; +return io_init_fail_req (req, -EINVAL );if (sqe_flags &IOSQE_BUFFER_SELECT ) {if (!def->buffer_select) -return -EOPNOTSUPP ; +return io_init_fail_req (req, -EOPNOTSUPP ); req->buf_index =READ_ONCE (sqe->buf_group); }if (sqe_flags &IOSQE_CQE_SKIP_SUCCESS ) ctx->drain_disabled = true;if (sqe_flags &IOSQE_IO_DRAIN ) {if (ctx->drain_disabled) -return -EOPNOTSUPP ; +return io_init_fail_req (req, -EOPNOTSUPP );io_init_req_drain (req); } }if (unlikely (ctx->restricted || ctx->drain_active || ctx->drain_next)) {if (ctx->restricted && !io_check_restriction (ctx, req, sqe_flags)) -return -EACCES ; +return io_init_fail_req (req, -EACCES );/* knock it to the slow queue path, will be drained there */ if (ctx->drain_active) req->flags |=REQ_F_FORCE_ASYNC ;
@@ -2172,9 +2179,9 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, }if (!def->ioprio && sqe->ioprio) -return -EINVAL ; +return io_init_fail_req (req, -EINVAL );if (!def->iopoll && (ctx->flags &IORING_SETUP_IOPOLL )) -return -EINVAL ; +return io_init_fail_req (req, -EINVAL );if (def->needs_file) {struct io_submit_state *state = &ctx->submit_state;
@@ -2198,12 +2205,12 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, req->creds =xa_load (&ctx->personalities, personality);if (!req->creds) -return -EINVAL ; +return io_init_fail_req (req, -EINVAL );get_cred (req->creds); ret =security_uring_override_creds (req->creds);if (ret) {put_cred (req->creds); -return ret; +return io_init_fail_req (req, ret); } req->flags |=REQ_F_CREDS ; }
kernel/dma/direct.c +5 -4
@@ -295,7 +295,7 @@ void *dma_direct_alloc(struct device *dev, size_t size, }else { ret =page_address (page);if (dma_set_decrypted (dev, ret, size)) - goto out_free_pages; + goto out_leak_pages; }memset (ret,0 , size);
@@ -316,6 +316,8 @@ void *dma_direct_alloc(struct device *dev, size_t size, out_free_pages:__dma_direct_free_pages (dev, page, size);return NULL ; +out_leak_pages: +return NULL ; } void dma_direct_free(struct device *dev, size_t size,
@@ -378,12 +380,11 @@ struct page *dma_direct_alloc_pages(struct device *dev, size_t size, ret =page_address (page);if (dma_set_decrypted (dev, ret, size)) - goto out_free_pages; + goto out_leak_pages;memset (ret,0 , size); *dma_handle =phys_to_dma_direct (dev,page_to_phys (page));return page; -out_free_pages: -__dma_direct_free_pages (dev, page, size); +out_leak_pages:return NULL ; }
kernel/panic.c +8 -0
@@ -442,6 +442,14 @@ void panic(const char *fmt, ...)/* Do not scroll important messages printed above */ suppress_printk =1 ; + +/* +* The final messages may not have been printed if in a context that +* defers printing (such as NMI) and irq_work is not available. +* Explicitly flush the kernel log buffer one last time. +*/ +console_flush_on_panic (CONSOLE_FLUSH_PENDING ); +local_irq_enable ();for (i =0 ; ; i +=PANIC_TIMER_STEP ) {touch_softlockup_watchdog ();
kernel/printk/printk.c +1 -2
@@ -2309,8 +2309,7 @@ asmlinkage int vprintk_emit(int facility, int level,if (unlikely (suppress_printk))return 0 ; -if (unlikely (suppress_panic_printk) && -atomic_read (&panic_cpu) !=raw_smp_processor_id ()) +if (unlikely (suppress_panic_printk) &&other_cpu_in_panic ())return 0 ;if (level ==LOGLEVEL_SCHED ) {
kernel/rcu/tree_nocb.h +1 -1
@@ -1383,7 +1383,7 @@ lazy_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)rcu_nocb_unlock_irqrestore (rdp, flags);continue ; } -WARN_ON_ONCE (!rcu_nocb_flush_bypass (rdp,NULL , jiffies, false)); +rcu_nocb_try_flush_bypass (rdp, jiffies);rcu_nocb_unlock_irqrestore (rdp, flags);wake_nocb_gp (rdp, false); sc->nr_to_scan -= _count;
kernel/trace/ring_buffer.c +1 -1
@@ -4436,7 +4436,7 @@ int ring_buffer_iter_empty(struct ring_buffer_iter *iter) cpu_buffer = iter->cpu_buffer; reader = cpu_buffer->reader_page; head_page = cpu_buffer->head_page; - commit_page = cpu_buffer->commit_page; + commit_page =READ_ONCE (cpu_buffer->commit_page); commit_ts = commit_page->page->time_stamp;/*
net/bluetooth/hci_event.c +2 -1
@@ -3679,7 +3679,8 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, void *data,* controller really supports it. If it doesn't, assume * the default size (16). */ -if (!(hdev->commands[20 ] &0x10 )) { +if (!(hdev->commands[20 ] &0x10 ) || +test_bit (HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE , &hdev->quirks)) { conn->enc_key_size =HCI_LINK_KEY_SIZE ; goto notify; }
net/ipv4/ip_tunnel.c +1 -0
@@ -1298,6 +1298,7 @@ int ip_tunnel_init(struct net_device *dev)if (tunnel->collect_md)netif_keep_dst (dev); +netdev_lockdep_set_classes (dev);return 0 ; }EXPORT_SYMBOL_GPL (ip_tunnel_init);
net/ipv6/ip6_gre.c +2 -0
@@ -1514,6 +1514,7 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)ip6gre_tnl_init_features (dev);netdev_hold (dev, &tunnel->dev_tracker,GFP_KERNEL ); +netdev_lockdep_set_classes (dev);return 0 ; cleanup_dst_cache_init:
@@ -1906,6 +1907,7 @@ static int ip6erspan_tap_init(struct net_device *dev)ip6erspan_tnl_link_config (tunnel,1 );netdev_hold (dev, &tunnel->dev_tracker,GFP_KERNEL ); +netdev_lockdep_set_classes (dev);return 0 ; cleanup_dst_cache_init:
net/ipv6/ip6_tunnel.c +1 -0
@@ -1898,6 +1898,7 @@ ip6_tnl_dev_init_gen(struct net_device *dev) dev->max_mtu =IP6_MAX_MTU - dev->hard_header_len;netdev_hold (dev, &t->dev_tracker,GFP_KERNEL ); +netdev_lockdep_set_classes (dev);return 0 ; destroy_dst:
net/ipv6/ip6_vti.c +1 -0
@@ -935,6 +935,7 @@ static inline int vti6_dev_init_gen(struct net_device *dev)if (!dev->tstats)return -ENOMEM ;netdev_hold (dev, &t->dev_tracker,GFP_KERNEL ); +netdev_lockdep_set_classes (dev);return 0 ; }
net/ipv6/sit.c +1 -0
@@ -1460,6 +1460,7 @@ static int ipip6_tunnel_init(struct net_device *dev)return err; }netdev_hold (dev, &tunnel->dev_tracker,GFP_KERNEL ); +netdev_lockdep_set_classes (dev);return 0 ; }
net/mpls/mpls_gso.c +3 -0
@@ -27,6 +27,9 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,__be16 mpls_protocol;unsigned int mpls_hlen; +if (!skb_inner_network_header_was_set (skb)) + goto out; +skb_reset_network_header (skb); mpls_hlen =skb_inner_network_header (skb) -skb_network_header (skb);if (unlikely (!mpls_hlen || mpls_hlen %MPLS_HLEN ))
net/smc/smc_pnet.c +10 -0
@@ -806,6 +806,16 @@ static void smc_pnet_create_pnetids_list(struct net *net)u8 ndev_pnetid[SMC_MAX_PNETID_LEN ];struct net_device *dev; +/* Newly created netns do not have devices. +* Do not even acquire rtnl. +*/ +if (list_empty (&net->dev_base_head)) +return ; + +/* Note: This might not be needed, because smc_pnet_netdev_event() +* is also calling smc_pnet_add_base_pnetid() when handling +* NETDEV_UP event. +*/ rtnl_lock ();for_each_netdev (net, dev)smc_pnet_add_base_pnetid (net, dev, ndev_pnetid);
net/wireless/util.c +10 -4
@@ -797,15 +797,19 @@ ieee80211_amsdu_subframe_length(void *field, u8 mesh_flags, u8 hdr_type)bool ieee80211_is_valid_amsdu (struct sk_buff *skb,u8 mesh_hdr) { -int offset =0 , remaining, subframe_len, padding; +int offset =0 , subframe_len, padding;for (offset =0 ; offset < skb->len; offset += subframe_len + padding) { +int remaining = skb->len - offset;struct {__be16 len;u8 mesh_flags; } hdr;u16 len; +if (sizeof (hdr) > remaining) +return false; +if (skb_copy_bits (skb, offset +2 *ETH_ALEN , &hdr,sizeof (hdr)) <0 )return false;
@@ -813,7 +817,6 @@ bool ieee80211_is_valid_amsdu(struct sk_buff *skb, u8 mesh_hdr) mesh_hdr); subframe_len =sizeof (struct ethhdr ) + len; padding = (4 - subframe_len) &0x3 ; - remaining = skb->len - offset;if (subframe_len > remaining)return false;
@@ -831,7 +834,7 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, {unsigned int hlen =ALIGN (extra_headroom,4 );struct sk_buff *frame =NULL ; -int offset =0 , remaining; +int offset =0 ;struct {struct ethhdr eth;uint8_t flags;
@@ -845,10 +848,14 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, copy_len =sizeof (hdr);while (!last) { +int remaining = skb->len - offset;unsigned int subframe_len;int len, mesh_len =0 ;u8 padding; +if (copy_len > remaining) + goto purge; +skb_copy_bits (skb, offset, &hdr, copy_len);if (iftype ==NL80211_IFTYPE_MESH_POINT ) mesh_len =__ieee80211_get_mesh_hdrlen (hdr.flags);
@@ -858,7 +865,6 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, padding = (4 - subframe_len) &0x3 ;/* the last MSDU has no padding */ - remaining = skb->len - offset;if (subframe_len > remaining) goto purge;/* mitigate A-MSDU aggregation injection attacks */
scripts/gcc-plugins/stackleak_plugin.c +2 -0
@@ -467,6 +467,8 @@ static bool stackleak_gate(void)return false;if (STRING_EQUAL (section,".entry.text" ))return false; +if (STRING_EQUAL (section,".head.text" )) +return false; }return track_frame_size >=0 ;
scripts/mod/modpost.c +3 -1
@@ -1098,7 +1098,9 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, sec_mismatch_count++;warn ("%s: section mismatch in reference: %s+0x%x (section: %s) -> %s (section: %s)\n" , - modname, fromsym, (unsigned int )(faddr - from->st_value), fromsec, tosym, tosec); + modname, fromsym, + (unsigned int )(faddr - (from ? from->st_value :0 )), + fromsec, tosym, tosec);if (mismatch->mismatch ==EXTABLE_TO_NON_TEXT ) {if (match (tosec, mismatch->bad_tosec))
sound/firewire/amdtp-stream.c +8 -4
@@ -773,10 +773,14 @@ static int check_cip_header(struct amdtp_stream *s, const __be32 *buf, }else {unsigned int dbc_interval; -if (*data_blocks >0 && s->ctx_data.tx.dbc_interval >0 ) - dbc_interval = s->ctx_data.tx.dbc_interval; -else - dbc_interval = *data_blocks; +if (!(s->flags &CIP_DBC_IS_PAYLOAD_QUADLETS )) { +if (*data_blocks >0 && s->ctx_data.tx.dbc_interval >0 ) + dbc_interval = s->ctx_data.tx.dbc_interval; +else + dbc_interval = *data_blocks; + }else { + dbc_interval = payload_length /sizeof (__be32); + } lost = dbc != ((*data_block_counter + dbc_interval) &0xff ); }
sound/firewire/amdtp-stream.h +4 -0
@@ -37,6 +37,9 @@* the value of current SYT_INTERVAL; e.g. initial value is not zero. * @CIP_UNAWARE_SYT: For outgoing packet, the value in SYT field of CIP is 0xffff. * For incoming packet, the value in SYT field of CIP is not handled. +* @CIP_DBC_IS_PAYLOAD_QUADLETS: Available for incoming packet, and only effective with +* CIP_DBC_IS_END_EVENT flag. The value of dbc field is the number of accumulated quadlets +* in CIP payload, instead of the number of accumulated data blocks. */ enum cip_flags {CIP_NONBLOCKING =0x00 ,
@@ -51,6 +54,7 @@ enum cip_flags {CIP_NO_HEADER =0x100 ,CIP_UNALIGHED_DBC =0x200 ,CIP_UNAWARE_SYT =0x400 , + CIP_DBC_IS_PAYLOAD_QUADLETS = 0x800, };/**
sound/pci/hda/patch_realtek.c +12 -0
@@ -2645,6 +2645,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {SND_PCI_QUIRK (0x1558 ,0x65f1 ,"Clevo PC50HS" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x65f5 ,"Clevo PD50PN[NRT]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x66a2 ,"Clevo PE60RNE" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x66a6 ,"Clevo PE60SN[CDE]-[GS]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x67d1 ,"Clevo PB71[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x67e1 ,"Clevo PB71[DE][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
@@ -7428,6 +7429,7 @@ enum {ALC287_FIXUP_LEGION_16ITHG6 ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN , +ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN ,ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS ,ALC236_FIXUP_DELL_DUAL_CODECS , ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
@@ -9552,6 +9554,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, }, + [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, + .chained = true, + .chain_id = ALC287_FIXUP_CS35L41_I2C_2, + }, [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { .type = HDA_FIXUP_FUNC, .v.func = alc295_fixup_dell_inspiron_top_speakers,
@@ -10090,12 +10098,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1462 ,0xb120 ,"MSI Cubi MS-B120" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x1462 ,0xb171 ,"Cubi N 8GL (MS-B171)" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x152d ,0x1082 ,"Quanta NL3" ,ALC269_FIXUP_LIFEBOOK ), +SND_PCI_QUIRK (0x1558 ,0x0353 ,"Clevo V35[05]SN[CDE]Q" ,ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x1323 ,"Clevo N130ZU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x1325 ,"Clevo N15[01][CW]U" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x1401 ,"Clevo L140[CZ]U" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x1403 ,"Clevo N140CU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x1404 ,"Clevo N150CU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x14a1 ,"Clevo L141MU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x2624 ,"Clevo L240TU" ,ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x4018 ,"Clevo NV40M[BE]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x4019 ,"Clevo NV40MZ" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
@@ -10257,6 +10267,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x38c3 ,"Y980 DUAL" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x38cb ,"Y790 YG DUAL" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x38cd ,"Y790 VECO DUAL" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x17aa ,0x38d2 ,"Lenovo Yoga 9 14IMH9" ,ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN ), +SND_PCI_QUIRK (0x17aa ,0x38d7 ,"Lenovo Yoga 9 14IMH9" ,ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x3902 ,"Lenovo E50-80" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ),SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ), SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
sound/soc/amd/yc/acp6x-mach.c +7 -0
@@ -311,6 +311,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "E1504FA"), } }, + { + .driver_data = &acp6x_card, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_PRODUCT_NAME, "M7600RE"), + } + }, { .driver_data = &acp6x_card, .matches = {
sound/soc/intel/avs/board_selection.c +85 -0
2 lines not on this page · raw message
tools/lib/perf/include/internal/evlist.h +2 -2
Lines of this file are not shown. View the raw message.
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_join.sh +4 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.