Linux 6.6.134
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.134 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
------------
Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml | 2 Documentation/devicetree/bindings/connector/usb-connector.yaml | 1 Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml | 4 Makefile | 2 arch/arm64/kernel/patch-scs.c | 8 arch/loongarch/include/asm/linkage.h | 36 + arch/loongarch/include/asm/sigframe.h | 9 arch/loongarch/kernel/asm-offsets.c | 2 arch/loongarch/kernel/signal.c | 6 arch/loongarch/vdso/Makefile | 4 arch/loongarch/vdso/sigreturn.S | 6 arch/mips/lib/multi3.c | 6 arch/mips/mm/tlb-r4k.c | 2 arch/mips/ralink/clk.c | 8 arch/riscv/kernel/kgdb.c | 7 arch/x86/kernel/cpu/common.c | 18 crypto/af_alg.c | 4 drivers/accel/qaic/qaic_control.c | 47 + drivers/comedi/drivers.c | 8 drivers/comedi/drivers/dt2815.c | 12 drivers/comedi/drivers/me4000.c | 16 drivers/comedi/drivers/me_daq.c | 35 - drivers/comedi/drivers/ni_atmio16d.c | 3 drivers/counter/rz-mtu3-cnt.c | 67 +- drivers/cpufreq/cpufreq_governor.c | 6 drivers/crypto/caam/caamalg_qi2.c | 3 drivers/crypto/caam/caamhash.c | 3 drivers/dma/fsl-edma-main.c | 31 - drivers/gpio/gpio-mxc.c | 10 drivers/gpu/drm/ast/ast_dp501.c | 2 drivers/gpu/drm/drm_ioc32.c | 2 drivers/gpu/drm/i915/display/g4x_dp.c | 2 drivers/hid/hid-multitouch.c | 7 drivers/hid/wacom_wac.c | 10 drivers/hwmon/occ/common.c | 19 drivers/hwmon/pmbus/pxe1610.c | 5 drivers/hwmon/pmbus/tps53679.c | 4 drivers/i2c/busses/Kconfig | 2 drivers/i2c/busses/i2c-tegra.c | 5 drivers/iio/accel/adxl355_core.c | 2 drivers/iio/adc/ti-adc161s626.c | 41 - drivers/iio/dac/ad5770r.c | 2 drivers/iio/gyro/mpu3050-core.c | 32 - drivers/iio/imu/bmi160/bmi160_core.c | 15 drivers/iio/imu/bno055/bno055.c | 2 drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 3 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 4 drivers/iio/light/vcnl4035.c | 18 drivers/input/joystick/xpad.c | 5 drivers/input/rmi4/rmi_f54.c | 4 drivers/input/serio/i8042-acpipnpio.h | 7 drivers/misc/fastrpc.c | 1 drivers/net/ethernet/broadcom/tg3.c | 13 drivers/net/ethernet/cadence/macb_main.c | 13 drivers/net/ethernet/cadence/macb_pci.c | 10 drivers/net/ethernet/faraday/ftgmac100.c | 28 - drivers/net/ethernet/freescale/fec_ptp.c | 3 drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 4 drivers/net/ethernet/mellanox/mlx5/core/fw.c | 53 + drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c | 3 drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 4 drivers/net/ethernet/microsoft/mana/mana_en.c | 6 drivers/net/ethernet/xilinx/xilinx_axienet.h | 4 drivers/net/phy/sfp.c | 7 drivers/net/vxlan/vxlan_core.c | 6 drivers/net/wireless/ath/ath11k/dp.h | 6 drivers/net/wireless/ath/ath11k/dp_rx.c | 210 ++++--- drivers/net/wireless/ath/ath11k/hal.c | 16 drivers/net/wireless/ath/ath11k/hal.h | 2 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 drivers/net/wireless/microchip/wilc1000/hif.c | 2 drivers/net/wireless/virtual/virt_wifi.c | 1 drivers/nfc/pn533/uart.c | 3 drivers/nvmem/imx-ocotp-ele.c | 1 drivers/nvmem/imx-ocotp.c | 1 drivers/spi/spi-geni-qcom.c | 9 drivers/target/loopback/tcm_loop.c | 52 + drivers/thermal/thermal_core.c | 1 drivers/thunderbolt/nhi.c | 2 drivers/usb/cdns3/cdns3-gadget.c | 4 drivers/usb/class/cdc-acm.c | 9 drivers/usb/class/cdc-acm.h | 1 drivers/usb/class/usbtmc.c | 3 drivers/usb/common/ulpi.c | 5 drivers/usb/core/quirks.c | 3 drivers/usb/dwc2/gadget.c | 2 drivers/usb/gadget/function/f_rndis.c | 9 drivers/usb/gadget/function/f_subset.c | 6 drivers/usb/gadget/function/f_uac1_legacy.c | 47 + drivers/usb/gadget/function/f_uvc.c | 39 + drivers/usb/gadget/function/u_ether.c | 10 drivers/usb/gadget/function/uvc.h | 3 drivers/usb/gadget/function/uvc_v4l2.c | 5 drivers/usb/gadget/udc/dummy_hcd.c | 42 - drivers/usb/host/ehci-brcm.c | 4 drivers/usb/serial/io_edgeport.c | 3 drivers/usb/serial/io_usbvend.h | 1 drivers/usb/serial/option.c | 4 drivers/vfio/device_cdev.c | 7 drivers/vfio/group.c | 7 drivers/vfio/pci/vfio_pci_core.c | 271 ++-------- drivers/vfio/vfio_main.c | 44 + fs/btrfs/inode.c | 6 fs/btrfs/tree-checker.c | 17 fs/btrfs/zoned.c | 6 fs/ext4/fast_commit.c | 4 fs/ext4/inode.c | 15 fs/ext4/mballoc.c | 2 fs/gfs2/dir.c | 37 - fs/gfs2/glops.c | 40 - fs/gfs2/xattr.c | 28 - include/linux/netfilter/ipset/ip_set.h | 2 include/linux/swapops.h | 20 include/linux/vfio.h | 1 include/linux/vfio_pci_core.h | 2 include/net/netfilter/nf_conntrack_expect.h | 20 kernel/bpf/verifier.c | 10 kernel/fork.c | 29 - net/atm/lec.c | 72 +- net/atm/lec.h | 2 net/bluetooth/hci_event.c | 33 - net/bluetooth/hci_sync.c | 11 net/bluetooth/mgmt.c | 17 net/bluetooth/sco.c | 26 net/bluetooth/smp.c | 11 net/bridge/br_arp_nd_proxy.c | 18 net/core/dev.c | 22 net/core/skmsg.c | 13 net/hsr/hsr_device.c | 32 - net/ipv6/addrconf.c | 6 net/ipv6/datagram.c | 10 net/ipv6/icmp.c | 3 net/ipv6/ioam6.c | 4 net/ipv6/ip6_flowlabel.c | 5 net/ipv6/ip6_tunnel.c | 5 net/ipv6/ndisc.c | 3 net/mptcp/pm_netlink.c | 2 net/netfilter/ipset/ip_set_core.c | 4 net/netfilter/ipset/ip_set_hash_gen.h | 2 net/netfilter/ipset/ip_set_list_set.c | 4 net/netfilter/nf_conntrack_broadcast.c | 8 net/netfilter/nf_conntrack_expect.c | 25 net/netfilter/nf_conntrack_h323_main.c | 12 net/netfilter/nf_conntrack_helper.c | 13 net/netfilter/nf_conntrack_netlink.c | 87 +-- net/netfilter/nf_conntrack_sip.c | 4 net/netfilter/nf_flow_table_offload.c | 196 ++++--- net/netfilter/nf_tables_api.c | 7 net/netfilter/nfnetlink_log.c | 2 net/netfilter/x_tables.c | 23 net/netfilter/xt_cgroup.c | 6 net/netfilter/xt_rateest.c | 5 net/qrtr/af_qrtr.c | 31 - net/rds/ib_rdma.c | 7 net/sched/cls_api.c | 1 net/sched/cls_flow.c | 10 net/sched/cls_fw.c | 14 net/sched/sch_hfsc.c | 4 net/sched/sch_netem.c | 5 net/x25/x25_in.c | 9 net/x25/x25_subr.c | 1 sound/pci/ctxfi/ctdaio.c | 1 sound/soc/cirrus/ep93xx-i2s.c | 34 - sound/usb/caiaq/device.c | 2 tools/objtool/check.c | 5 165 files changed, 1664 insertions(+), 943 deletions(-)
Alan Stern (2):
USB: dummy-hcd: Fix locking/synchronization error
USB: dummy-hcd: Fix interrupt synchronization error
Alex Williamson (3):
vfio: Create vfio_fs_type with inode per device vfio/pci: Use unmap_mapping_range() vfio/pci: Insert full vma on mmap'd MMIO fault
Alexander Popov (1):
wifi: virt_wifi: remove SET_NETDEV_DEV to avoid use-after-free
Alexei Starovoitov (1):
bpf: Fix regsafe() for pointers to packet
Alexey Velichayshiy (1):
wifi: iwlwifi: mvm: fix potential out-of-bounds read in iwl_mvm_nd_match_info_handler()
Andrew Price (2):
gfs2: Improve gfs2_consist_inode() usage
gfs2: Validate i_depth for exhash directories
Antoniu Miclaus (1):
iio: dac: ad5770r: fix error return in ad5770r_read_raw()
Bart Van Assche (1):
Input: synaptics-rmi4 - fix a locking bug in an error path
Benoît Sevens (1):
HID: wacom: fix out-of-bounds read in wacom_intuos_bt_irq
Berk Cem Goksel (1):
ALSA: caiaq: fix stack out-of-bounds read in init_card
Buday Csaba (1):
net: fec: fix the PTP periodic output sysfs interface
Cen Zhang (1):
Bluetooth: SCO: fix race conditions in sco_sock_connect()
Christian Eggers (1):
nvmem: imx: assign nvmem_cell_info::raw_len
Christoffer Sandberg (1):
Input: i8042 - add TUXEDO InfinityBook Max 16 Gen10 AMD to i8042 quirk table
Cosmin Tanislav (2):
counter: rz-mtu3-cnt: prevent counter from being toggled multiple times
counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member
David Lechner (4):
iio: imu: bno055: fix BNO055_SCAN_CH_COUNT off by one
iio: adc: ti-adc161s626: fix buffer read on big-endian
iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
iio: light: vcnl4035: fix scan buffer on big-endian
Deepanshu Kartikey (2):
atm: lec: fix use-after-free in sock_def_readable()
comedi: dt2815: add hardware detection to prevent crash
Eric Dumazet (3):
ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach()
ip6_tunnel: clear skb2->cb[] in ip4ip6_err()
ipv6: avoid overflows in ip6_datagram_send_ctl()Ernestas Kulik (1):
USB: serial: option: add MeiG Smart SRM825WN
Ethan Tidmore (4):
iio: gyro: mpu3050: Fix incorrect free_irq() variable
iio: gyro: mpu3050: Fix irq resource leak
iio: gyro: mpu3050: Move iio_device_register() to correct location
iio: gyro: mpu3050: Fix out-of-sequence free_irq()
Fedor Pchelkin (2):
net: macb: fix clk handling on PCI glue driver removal
net: macb: properly unregister fixed rate clocks
Filipe Manana (1):
btrfs: do not free data reservation in fallback from inline due to -ENOSPC
Florian Westphal (3):
netfilter: nfnetlink_log: account for netlink header size
netfilter: x_tables: ensure names are nul-terminated
netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr
Francesco Lavra (1):
iio: imu: st_lsm6dsx: Set FIFO ODR for accelerometer and gyroscope only
Frank Li (1):
dt-bindings: auxdisplay: ht16k33: Use unevaluatedProperties to fix common property warning
Frej Drejhammar (1):
USB: serial: io_edgeport: add support for Blackbox IC135A
Greg Kroah-Hartman (2):
drm/ioc32: stop speculation on the drm_compat_ioctl path Linux 6.6.134
Guangshuo Li (3):
usb: ulpi: fix double free in ulpi_register_interface() error path
cpufreq: governor: fix double free in cpufreq_dbs_governor_init() error path
net: mana: fix use-after-free in add_adev() error path
Heitor Alves de Siqueira (1):
usb: usbtmc: Flush anchored URBs in usbtmc_release
Horia Geantă (2):
crypto: caam - fix DMA corruption on long hmac keys
crypto: caam - fix overflow on long hmac keys
Ian Abbott (4):
comedi: Reinit dev->spinlock between attachments to low-level drivers
comedi: ni_atmio16d: Fix invalid clean-up after failed attach
comedi: me_daq: Fix potential overrun of firmware buffer
comedi: me4000: Fix potential overrun of firmware buffer
JP Hein (1):
USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam
Jamie Gibbons (1):
dt-bindings: gpio: fix microchip #interrupt-cells
Jean-Baptiste Maneyrol (1):
iio: imu: inv_icm42600: fix odr switch when turning buffer off
Jiayuan Chen (1):
net: qrtr: replace qrtr_tx_flow radix_tree with xarray to fix memory leak
Jihed Chaibi (1):
ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on failure
Jimmy Hu (1):
usb: gadget: uvc: fix NULL pointer dereference during unbind race
Jinjiang Tu (1):
mm/huge_memory: fix folio isn't locked in softleaf_to_folio()
Johannes Thumshirn (1):
btrfs: don't take device_list_mutex when querying zone info
Josef Bacik (1):
scsi: target: tcm_loop: Drain commands in target_reset handler
Josh Poimboeuf (2):
objtool: Fix Clang jump table detection
iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin()
Joy Zou (2):
dmaengine: fsl-edma: change to guard(mutex) within fsl_edma3_xlate()
dmaengine: fsl-edma: fix channel parameter config for fixed channel requests
Juno Choi (1):
usb: dwc2: gadget: Fix spin_lock/unlock mismatch in dwc2_hsotg_udc_stop()
Justin Chen (1):
usb: ehci-brcm: fix sleep during atomic
Keenan Dong (2):
Bluetooth: MGMT: validate LTK enc_size on load
Bluetooth: MGMT: validate mesh send advertising payload length
Kevin Hao (1):
net: macb: Move devm_{free,request}_irq() out of spin lock area
Konrad Dybcio (1):
thunderbolt: Fix property read in nhi_wake_supported()
Kuen-Han Tsai (3):
usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop
usb: gadget: f_subset: Fix unbalanced refcnt in geth_free
usb: gadget: f_rndis: Protect RNDIS options with mutex
Kuniyuki Iwashima (1):
bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict_data_ready().
Lee Jones (1):
HID: multitouch: Check to ensure report responses match the request
Li Chen (1):
ext4: publish jinode after initialization
Li Xiasong (1):
MPTCP: fix lock class name family in pm_nl_create_listen_socket
Luka Gejak (1):
net: hsr: fix VLAN add unwind on slave errors
Maciej W. Rozycki (1):
MIPS: Fix the GCC version check for `__multi3' workaround
Marek Behún (1):
net: sfp: Fix Ubiquiti U-Fiber Instant SFP module on mvneta
Martin Schiller (2):
net/x25: Fix potential double free of skb net/x25: Fix overflow when accumulating packets
Miao Li (1):
usb: quirks: add DELAY_INIT quirk for another Silicon Motion flash drive
Miaohe Lin (1):
fork: defer linking file vma until vma is fully initialized
Mikko Perttunen (1):
i2c: tegra: Don't mark devices with pins as IRQ safe
Nikunj A Dadhania (1):
x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling()
Norbert Szetei (1):
crypto: af-alg - fix NULL pointer dereference in scatterwalk
Oleh Konko (2):
Bluetooth: SMP: derive legacy responder STK authentication from MITM state
Bluetooth: SMP: force responder MITM requirements before building the pairing response
Oliver Neukum (1):
cdc-acm: new quirk for EPSON HMD
P Praneesh (1):
wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
Pablo Neira Ayuso (7):
netfilter: flowtable: strictly check for maximum number of actions
netfilter: nf_conntrack_expect: honor expectation helper field
netfilter: nf_conntrack_expect: use expect->helper
netfilter: nf_conntrack_expect: store netns and zone in expectation
netfilter: ctnetlink: ignore explicit helper on new expectations
netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP
netfilter: nf_tables: reject immediate NF_QUEUE verdict
Paolo Abeni (1):
ipv6: prevent possible UaF in addrconf_permanent_addr()
Paul SAGE (1):
tg3: replace placeholder MAC address with device property
Paul Walmsley (1):
riscv: kgdb: fix several debug register assignment bugs
Pauli Virtanen (2):
Bluetooth: hci_sync: call destroy in hci_cmd_sync_run if immediate
Bluetooth: hci_event: fix potential UAF in hci_le_remote_conn_param_req_evt
Pengpeng Hou (2):
net/ipv6: ioam6: prevent schema length wraparound in trace fill
NFC: pn533: bound the UART receive buffer
Pepper Gray (1):
arm64/scs: Fix handling of advance_loc4
Praveen Talari (1):
spi: geni-qcom: Check DMA interrupts early in ISR
Qi Tang (3):
netfilter: nf_conntrack_helper: pass helper to expect cleanup
netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent
bpf: reject direct access to nullable PTR_TO_BUF pointers
Qu Wenruo (1):
btrfs: fix the qgroup data free range for inline data extents
Rafael J. Wysocki (1):
thermal: core: Fix thermal zone device registration error path
Reshma Immaculate Rajkumar (1):
wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session
Saeed Mahameed (1):
net/mlx5: Avoid "No data available" when FW version queries fail
Sanman Pradhan (4):
hwmon: (pxe1610) Check return value of page-select write in probe
hwmon: (tps53679) Fix device ID comparison and printing in tps53676_identify()
hwmon: (occ) Fix missing newline in occ_show_extended()
hwmon: (occ) Fix division by zero in occ_show_power_1()
Sebastian Urban (1):
usb: gadget: dummy_hcd: fix premature URB completion when ZLP follows partial transfer
Shay Drory (1):
net/mlx5: lag: Check for LAG device before creating debugfs
Shengyu Qu (1):
Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode
Shenwei Wang (1):
gpio: mxc: map Both Edge pad wakeup to Rising Edge
Shiji Yang (1):
mips: ralink: update CPU clock index
Stefan Wiehler (1):
mips: mm: Allocate tlb_vpn array atomically
Suraj Gupta (1):
net: xilinx: axienet: Correct BD length masks to match AXIDMA IP spec
Taegu Ha (1):
usb: gadget: f_uac1_legacy: validate control request size
Takashi Iwai (1):
ALSA: ctxfi: Fix missing SPDIFI1 index handling
Theodore Ts'o (1):
ext4: handle wraparound when searching for blocks for indirect mapped blocks
Thomas Bogendoerfer (1):
tg3: Fix race for querying speed/duplex
Thomas Zimmermann (1):
drm/ast: dp501: Fix initialization of SCU2C
Valek Andrej (1):
iio: accel: fix ADXL355 temperature signature value
Venkateswara Naralasetty (1):
wifi: ath11k: skip status ring entry processing
Ville Syrjälä (1):
drm/i915/dp: Use crtc_state->enhanced_framing properly on ivb/hsw CPU eDP
Wanquan Zhong (1):
USB: serial: option: add support for Rolling Wireless RW135R-GL
Weiming Shi (1):
rds: ib: reject FRMR registration before IB connection is established
Willem de Bruijn (1):
net: correctly handle tunneled traffic on IPV6_CSUM GSO fallback
Xi Ruoyao (1):
LoongArch: vDSO: Emit GNU_EH_FRAME correctly
Xiang Mei (3):
net/sched: sch_hfsc: fix divide-by-zero in rtsc_min() net/sched: cls_fw: fix NULL pointer dereference on shared blocks net/sched: cls_flow: fix NULL pointer dereference on shared blocks
Xingjing Deng (1):
misc: fastrpc: possible double-free of cctx->remote_heap
Xu Yang (1):
dt-bindings: connector: add pd-disable dependency
Yang Yang (3):
bridge: br_nd_send: linearize skb before parsing ND options
bridge: br_nd_send: validate ND option lengths
vxlan: validate ND option lengths in vxlan_na_create
Yasuaki Torimaru (1):
wifi: wilc1000: fix u8 overflow in SSID scan buffer size calculation
Yifan Wu (1):
netfilter: ipset: drop logically empty buckets in mtype_del
Yochai Eisenrich (2):
net: ipv6: ndisc: fix ndisc_ra_useropt to initialize nduseropt_padX fields to zero to prevent an info-leak
net: sched: cls_api: fix tc_chain_fill_node to initialize tcm_info to zero to prevent an info-leak
Yongchao Wu (2):
usb: cdns3: gadget: fix NULL pointer dereference in ep_queue
usb: cdns3: gadget: fix state inconsistency on gadget init failure
Youssef Samir (1):
accel/qaic: Handle DBC deactivation if the owner went away
Yucheng Lu (1):
net/sched: sch_netem: fix out-of-bounds access in packet corruption
Yufan Chen (1):
net: ftgmac100: fix ring allocation unwind on open failure
ZhengYuan Huang (1):
btrfs: reject root items with drop_progress and zero drop_level
Zhengchuan Liang (1):
net: ipv6: flowlabel: defer exclusive option free until RCU teardown
Zoltan Illes (1):
Input: xpad - add support for Razer Wolverine V3 Pro
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml +1 -1
@@ -66,7 +66,7 @@ then: required: - refresh-rate-hz -additionalProperties: false +unevaluatedProperties: false examples: - |
Documentation/devicetree/bindings/connector/usb-connector.yaml +1 -0
@@ -232,6 +232,7 @@ properties: type: boolean dependencies: + pd-disable: [typec-power-opmode] sink-vdos-v1: [ sink-vdos ] sink-vdos: [ sink-vdos-v1 ]
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml +2 -2
@@ -33,7 +33,7 @@ properties: const: 2 "#interrupt-cells": - const: 1 + const: 2 ngpios: description:
@@ -84,7 +84,7 @@ examples: gpio-controller; #gpio-cells = <2>; interrupt-controller; - #interrupt-cells = <1>; + #interrupt-cells = <2>; interrupts = <53>, <53>, <53>, <53>, <53>, <53>, <53>, <53>, <53>, <53>, <53>, <53>,
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 133 +SUBLEVEL = 134 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/arm64/kernel/patch-scs.c +8 -0
@@ -171,6 +171,14 @@ static int noinstr scs_handle_fde_frame(const struct eh_frame *frame, size -=2 ;break ; +case DW_CFA_advance_loc4: + loc += *opcode++ * code_alignment_factor; + loc += (*opcode++ <<8 ) * code_alignment_factor; + loc += (*opcode++ <<16 ) * code_alignment_factor; + loc += (*opcode++ <<24 ) * code_alignment_factor; + size -=4 ; +break ; +case DW_CFA_def_cfa:case DW_CFA_offset_extended: size =skip_xleb128 (&opcode, size);
arch/loongarch/include/asm/linkage.h +36 -0
@@ -41,4 +41,40 @@ .cfi_endproc; \SYM_END (name,SYM_T_NONE ) +/* +* This is for the signal handler trampoline, which is used as the return +* address of the signal handlers in userspace instead of called normally. +* The long standing libgcc bug https://gcc.gnu.org/PR124050 requires a +* nop between .cfi_startproc and the actual address of the trampoline, so +* we cannot simply use SYM_FUNC_START. +* +* This wrapper also contains all the .cfi_* directives for recovering +* the content of the GPRs and the "return address" (where the rt_sigreturn +* syscall will jump to), assuming there is a struct rt_sigframe (where +* a struct sigcontext containing those information we need to recover) at +* $sp. The "DWARF for the LoongArch(TM) Architecture" manual states +* column 0 is for $zero, but it does not make too much sense to +* save/restore the hardware zero register. Repurpose this column here +* for the return address (here it's not the content of $ra we cannot use +* the default column 3). + */ +#define SYM_SIGFUNC_START (name) \ + .cfi_startproc; \ + .cfi_signal_frame; \ + .cfi_def_cfa 3, RT_SIGFRAME_SC; \ + .cfi_return_column 0; \ + .cfi_offset 0, SC_PC; \ + \ + .irp num, 1, 2, 3, 4, 5, 6, 7, 8, \ + 9, 10, 11, 12, 13, 14, 15, 16, \ + 17, 18, 19, 20, 21, 22, 23, 24, \ + 25, 26, 27, 28, 29, 30, 31; \ + .cfi_offset \num, SC_REGS + \num * SZREG; \ + .endr; \ + \ + nop; \ + SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) + +#define SYM_SIGFUNC_END (name) SYM_FUNC_END(name) +#endif
arch/loongarch/include/asm/sigframe.h new file +9 -0
@@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#include <asm/siginfo.h> +#include <asm/ucontext.h> + +struct rt_sigframe { +struct siginfo rs_info; +struct ucontext rs_uctx; +};
arch/loongarch/kernel/asm-offsets.c +2 -0
@@ -15,6 +15,7 @@#include <asm/ptrace.h> #include <asm/processor.h> #include <asm/ftrace.h> +#include <asm/sigframe.h> void output_ptreg_defines (void ) {
@@ -218,6 +219,7 @@ void output_sc_defines(void)COMMENT ("Linux sigcontext offsets." );OFFSET (SC_REGS , sigcontext, sc_regs);OFFSET (SC_PC , sigcontext, sc_pc); +OFFSET (RT_SIGFRAME_SC , rt_sigframe, rs_uctx.uc_mcontext);BLANK (); }
arch/loongarch/kernel/signal.c +1 -5
@@ -34,6 +34,7 @@#include <asm/cpu-features.h> #include <asm/fpu.h> #include <asm/lbt.h> +#include <asm/sigframe.h> #include <asm/ucontext.h> #include <asm/vdso.h>
@@ -71,11 +72,6 @@ extern asmlinkage int _save_ftop_context(void __user *ftop); extern asmlinkage int _restore_ftop_context(void __user *ftop);#endif -struct rt_sigframe { -struct siginfo rs_info; -struct ucontext rs_uctx; -}; -struct _ctx_layout {struct sctx_info *addr;unsigned int size;
arch/loongarch/vdso/Makefile +2 -2
@@ -24,7 +24,7 @@ cflags-vdso := $(ccflags-vdso) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ -std=gnu11 -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ - $(call cc-option, -fno-asynchronous-unwind-tables) \ + $(call cc-option, -fasynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ -D__ASSEMBLY__ -Wa,-gdwarf-2
@@ -36,7 +36,7 @@ endif # VDSO linker flags. ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ $(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \ - --hash-style=sysv --build-id -T + --hash-style=sysv --build-id --eh-frame-hdr -T GCOV_PROFILE := n
arch/loongarch/vdso/sigreturn.S +3 -3
@@ -12,13 +12,13 @@ #include <asm/regdef.h> #include <asm/asm.h> +#include <asm/asm-offsets.h> .section .text - .cfi_sections .debug_frame -SYM_FUNC_START(__vdso_rt_sigreturn) +SYM_SIGFUNC_START(__vdso_rt_sigreturn) li.w a7, __NR_rt_sigreturn syscall 0 -SYM_FUNC_END(__vdso_rt_sigreturn) +SYM_SIGFUNC_END(__vdso_rt_sigreturn)
arch/mips/lib/multi3.c +3 -3
@@ -4,12 +4,12 @@#include "libgcc.h" /* -* GCC 7 & older can suboptimally generate __multi3 calls for mips64r6, so for +* GCC 9 & older can suboptimally generate __multi3 calls for mips64r6, so for * that specific case only we implement that intrinsic here. * * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981 */ -#if defined(CONFIG_64BIT ) && defined(CONFIG_CPU_MIPSR6 ) && (__GNUC__ <8 ) +#if defined(CONFIG_64BIT ) && defined(CONFIG_CPU_MIPSR6 ) && (__GNUC__ <10 )/* multiply 64-bit values, low 64-bits returned */ static inline long long notrace dmulu (long long a,long long b)
@@ -51,4 +51,4 @@ ti_type notrace __multi3(ti_type a, ti_type b) }EXPORT_SYMBOL (__multi3); -#endif /* 64BIT && CPU_MIPSR6 && GCC7 */ +#endif /* 64BIT && CPU_MIPSR6 && GCC9 */
arch/mips/mm/tlb-r4k.c +1 -1
@@ -536,7 +536,7 @@ static void __ref r4k_tlb_uniquify(void) tlb_vpn_size = tlbsize *sizeof (*tlb_vpns); tlb_vpns = (use_slab ? -kmalloc (tlb_vpn_size,GFP_KERNEL ) : +kmalloc (tlb_vpn_size,GFP_ATOMIC ) :memblock_alloc_raw (tlb_vpn_size,sizeof (*tlb_vpns)));if (WARN_ON (!tlb_vpns))return ;/* Pray local_flush_tlb_all() is good enough. */
arch/mips/ralink/clk.c +4 -4
@@ -21,16 +21,16 @@ static const char *clk_cpu(int *idx) {switch (ralink_soc) {case RT2880_SOC : - *idx =0 ; + *idx =1 ;return "ralink,rt2880-sysc" ;case RT3883_SOC : - *idx =0 ; + *idx =1 ;return "ralink,rt3883-sysc" ;case RT305X_SOC_RT3050 : - *idx =0 ; + *idx =1 ;return "ralink,rt3050-sysc" ;case RT305X_SOC_RT3052 : - *idx =0 ; + *idx =1 ;return "ralink,rt3052-sysc" ;case RT305X_SOC_RT3350 : *idx =1 ;
arch/riscv/kernel/kgdb.c +4 -3
@@ -175,7 +175,7 @@ struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = { {DBG_REG_T1, GDB_SIZEOF_REG, offsetof(struct pt_regs, t1)}, {DBG_REG_T2, GDB_SIZEOF_REG, offsetof(struct pt_regs, t2)}, {DBG_REG_FP, GDB_SIZEOF_REG, offsetof(struct pt_regs, s0)}, - {DBG_REG_S1, GDB_SIZEOF_REG, offsetof(struct pt_regs, a1)}, + {DBG_REG_S1, GDB_SIZEOF_REG, offsetof(struct pt_regs, s1)}, {DBG_REG_A0, GDB_SIZEOF_REG, offsetof(struct pt_regs, a0)}, {DBG_REG_A1, GDB_SIZEOF_REG, offsetof(struct pt_regs, a1)}, {DBG_REG_A2, GDB_SIZEOF_REG, offsetof(struct pt_regs, a2)},
@@ -244,8 +244,9 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) gdb_regs[DBG_REG_S6_OFF ] = task->thread.s[6 ]; gdb_regs[DBG_REG_S7_OFF ] = task->thread.s[7 ]; gdb_regs[DBG_REG_S8_OFF ] = task->thread.s[8 ]; - gdb_regs[DBG_REG_S9_OFF ] = task->thread.s[10 ]; - gdb_regs[DBG_REG_S10_OFF ] = task->thread.s[11 ]; + gdb_regs[DBG_REG_S9_OFF ] = task->thread.s[9 ]; + gdb_regs[DBG_REG_S10_OFF ] = task->thread.s[10 ]; + gdb_regs[DBG_REG_S11_OFF ] = task->thread.s[11 ]; gdb_regs[DBG_REG_EPC_OFF ] = task->thread.ra; }
arch/x86/kernel/cpu/common.c +12 -6
@@ -2012,12 +2012,6 @@ static void identify_cpu(struct cpuinfo_x86 *c)setup_smap (c);setup_umip (c); -/* Enable FSGSBASE instructions if available. */ -if (cpu_has (c,X86_FEATURE_FSGSBASE )) { -cr4_set_bits (X86_CR4_FSGSBASE ); - elf_hwcap2 |=HWCAP2_FSGSBASE ; - } -/* * The vendor-specific functions might have changed features. * Now we do "generic changes."
@@ -2349,6 +2343,18 @@ void cpu_init_exception_handling(void)/* GHCB needs to be setup to handle #VC. */ setup_ghcb (); +/* +* On CPUs with FSGSBASE support, paranoid_entry() uses +* ALTERNATIVE-patched RDGSBASE/WRGSBASE instructions. Secondary CPUs +* boot after alternatives are patched globally, so early exceptions +* execute patched code that depends on FSGSBASE. Enable the feature +* before any exceptions occur. +*/ +if (cpu_feature_enabled (X86_FEATURE_FSGSBASE )) { +cr4_set_bits (X86_CR4_FSGSBASE ); + elf_hwcap2 |=HWCAP2_FSGSBASE ; + } +/* Finally load the IDT */ load_current_idt (); }
crypto/af_alg.c +3 -1
@@ -622,8 +622,10 @@ static int af_alg_alloc_tsgl(struct sock *sk)sg_init_table (sgl->sg,MAX_SGL_ENTS +1 ); sgl->cur =0 ; -if (sg) +if (sg) { +sg_unmark_end (sg +MAX_SGL_ENTS -1 );sg_chain (sg,MAX_SGL_ENTS +1 , sgl->sg); + }list_add_tail (&sgl->list, &ctx->tsgl_list); }
drivers/accel/qaic/qaic_control.c +45 -2
67 lines not on this page · raw message
drivers/comedi/drivers.c +8 -0
@@ -1000,6 +1000,14 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) ret = -EIO ; goto out; } +if (IS_ENABLED (CONFIG_LOCKDEP )) { +/* +* dev->spinlock is for private use by the attached low-level +* driver. Reinitialize it to stop lock-dependency tracking +* between attachments to different low-level drivers. +*/ +spin_lock_init (&dev->spinlock); + } dev->driver = driv; dev->board_name = dev->board_ptr ? *(const char **)dev->board_ptr : dev->driver->driver_name;
drivers/comedi/drivers/dt2815.c +12 -0
@@ -175,6 +175,18 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) ? current_range_type : voltage_range_type; } +/* +* Check if hardware is present before attempting any I/O operations. +* Reading 0xff from status register typically indicates no hardware +* on the bus (floating bus reads as all 1s). +*/ +if (inb (dev->iobase +DT2815_STATUS ) ==0xff ) { +dev_err (dev->class_dev, +"No hardware detected at I/O base 0x%lx\n" , + dev->iobase); +return -ENODEV ; + } +/* Init the 2815 */ outb (0x00 , dev->iobase +DT2815_STATUS );for (i =0 ; i <100 ; i++) {
drivers/comedi/drivers/me4000.c +12 -4
@@ -315,6 +315,18 @@ static int me4000_xilinx_download(struct comedi_device *dev,unsigned int val;unsigned int i; +/* Get data stream length from header. */ +if (size >=4 ) { + file_length = (((unsigned int )data[0 ] &0xff ) <<24 ) + + (((unsigned int )data[1 ] &0xff ) <<16 ) + + (((unsigned int )data[2 ] &0xff ) <<8 ) + + ((unsigned int )data[3 ] &0xff ); + } +if (size <16 || file_length > size -16 ) { +dev_err (dev->class_dev,"Firmware length inconsistency\n" ); +return -EINVAL ; + } +if (!xilinx_iobase)return -ENODEV ;
@@ -346,10 +358,6 @@ static int me4000_xilinx_download(struct comedi_device *dev,outl (val, devpriv->plx_regbase +PLX9052_CNTRL );/* Download Xilinx firmware */ - file_length = (((unsigned int )data[0 ] &0xff ) <<24 ) + - (((unsigned int )data[1 ] &0xff ) <<16 ) + - (((unsigned int )data[2 ] &0xff ) <<8 ) + - ((unsigned int )data[3 ] &0xff );usleep_range (10 ,1000 );for (i =0 ; i < file_length; i++) {
drivers/comedi/drivers/me_daq.c +19 -16
@@ -344,6 +344,25 @@ static int me2600_xilinx_download(struct comedi_device *dev,unsigned int file_length;unsigned int i; +/* +* Format of the firmware +* Build longs from the byte-wise coded header +* Byte 1-3: length of the array +* Byte 4-7: version +* Byte 8-11: date +* Byte 12-15: reserved +*/ +if (size >=4 ) { + file_length = (((unsigned int )data[0 ] &0xff ) <<24 ) + + (((unsigned int )data[1 ] &0xff ) <<16 ) + + (((unsigned int )data[2 ] &0xff ) <<8 ) + + ((unsigned int )data[3 ] &0xff ); + } +if (size <16 || file_length > size -16 ) { +dev_err (dev->class_dev,"Firmware length inconsistency\n" ); +return -EINVAL ; + } +/* disable irq's on PLX */ writel (0x00 , devpriv->plx_regbase +PLX9052_INTCSR );
@@ -357,22 +376,6 @@ static int me2600_xilinx_download(struct comedi_device *dev,writeb (0x00 , dev->mmio +0x0 );sleep (1 ); -/* -* Format of the firmware -* Build longs from the byte-wise coded header -* Byte 1-3: length of the array -* Byte 4-7: version -* Byte 8-11: date -* Byte 12-15: reserved -*/ -if (size <16 ) -return -EINVAL ; - - file_length = (((unsigned int )data[0 ] &0xff ) <<24 ) + - (((unsigned int )data[1 ] &0xff ) <<16 ) + - (((unsigned int )data[2 ] &0xff ) <<8 ) + - ((unsigned int )data[3 ] &0xff ); -/* * Loop for writing firmware byte by byte to xilinx * Firmware data start at offset 16
drivers/comedi/drivers/ni_atmio16d.c +2 -1
@@ -698,7 +698,8 @@ static int atmio16d_attach(struct comedi_device *dev,static void atmio16d_detach (struct comedi_device *dev) { -reset_atmio16d (dev); +if (dev->private) +reset_atmio16d (dev);comedi_legacy_detach (dev); }
drivers/counter/rz-mtu3-cnt.c +35 -32
192 lines not on this page · raw message
drivers/cpufreq/cpufreq_governor.c +3 -3
@@ -468,13 +468,13 @@ int cpufreq_dbs_governor_init(struct cpufreq_policy *policy)/* Failure, so roll back. */ pr_err ("initialization failed (dbs_data kobject init error %d)\n" , ret); -kobject_put (&dbs_data->attr_set.kobj); - policy->governor_data =NULL ;if (!have_governor_per_policy ()) gov->gdbs_data =NULL ; - gov->exit (dbs_data); + +kobject_put (&dbs_data->attr_set.kobj); + goto free_policy_dbs_info; free_dbs_data:kfree (dbs_data);
drivers/crypto/caam/caamalg_qi2.c +2 -1
@@ -3325,9 +3325,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, const u8 *key,if (aligned_len < keylen)return -EOVERFLOW ; - hashed_key =kmemdup (key, aligned_len,GFP_KERNEL ); + hashed_key =kmalloc (aligned_len,GFP_KERNEL );if (!hashed_key)return -ENOMEM ; +memcpy (hashed_key, key, keylen); ret =hash_digest_key (ctx, &keylen, hashed_key, digestsize);if (ret) goto bad_free_key;
drivers/crypto/caam/caamhash.c +2 -1
@@ -441,9 +441,10 @@ static int ahash_setkey(struct crypto_ahash *ahash,if (aligned_len < keylen)return -EOVERFLOW ; - hashed_key =kmemdup (key, keylen,GFP_KERNEL ); + hashed_key =kmalloc (aligned_len,GFP_KERNEL );if (!hashed_key)return -ENOMEM ; +memcpy (hashed_key, key, keylen); ret =hash_digest_key (ctx, &keylen, hashed_key, digestsize);if (ret) goto bad_free_key;
drivers/dma/fsl-edma-main.c +12 -19
@@ -142,7 +142,7 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec, b_chmux = !!(fsl_edma->drvdata->flags &FSL_EDMA_DRV_HAS_CHMUX ); -mutex_lock (&fsl_edma->fsl_edma_mutex); +guard (mutex)(&fsl_edma->fsl_edma_mutex);list_for_each_entry_safe (chan, _chan, &fsl_edma->dma_dev.channels, device_node) {
@@ -152,10 +152,8 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec, fsl_chan =to_fsl_edma_chan (chan); i = fsl_chan - fsl_edma->chans; - fsl_chan->priority = dma_spec->args[1 ]; - fsl_chan->is_rxchan = dma_spec->args[2 ] &FSL_EDMA_RX ; - fsl_chan->is_remote = dma_spec->args[2 ] &FSL_EDMA_REMOTE ; - fsl_chan->is_multi_fifo = dma_spec->args[2 ] &FSL_EDMA_MULTI_FIFO ; +if (!b_chmux && i != dma_spec->args[0 ]) +continue ;if ((dma_spec->args[2 ] &FSL_EDMA_EVEN_CH ) && (i &0x1 ))continue ;
@@ -163,21 +161,16 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec,if ((dma_spec->args[2 ] &FSL_EDMA_ODD_CH ) && !(i &0x1 ))continue ; -if (!b_chmux && i == dma_spec->args[0 ]) { - chan =dma_get_slave_channel (chan); - chan->device->privatecnt++; -mutex_unlock (&fsl_edma->fsl_edma_mutex); -return chan; - }else if (b_chmux && !fsl_chan->srcid) { -/* if controller support channel mux, choose a free channel */ - chan =dma_get_slave_channel (chan); - chan->device->privatecnt++; - fsl_chan->srcid = dma_spec->args[0 ]; -mutex_unlock (&fsl_edma->fsl_edma_mutex); -return chan; - } + fsl_chan->srcid = dma_spec->args[0 ]; + fsl_chan->priority = dma_spec->args[1 ]; + fsl_chan->is_rxchan = dma_spec->args[2 ] &FSL_EDMA_RX ; + fsl_chan->is_remote = dma_spec->args[2 ] &FSL_EDMA_REMOTE ; + fsl_chan->is_multi_fifo = dma_spec->args[2 ] &FSL_EDMA_MULTI_FIFO ; + + chan =dma_get_slave_channel (chan); + chan->device->privatecnt++; +return chan; } -mutex_unlock (&fsl_edma->fsl_edma_mutex);return NULL ; }
drivers/gpio/gpio-mxc.c +9 -1
@@ -576,12 +576,13 @@ static bool mxc_gpio_set_pad_wakeup(struct mxc_gpio_port *port, bool enable)unsigned long config;bool ret = false;int i, type; +bool is_imx8qm =of_device_is_compatible (port->dev->of_node,"fsl,imx8qm-gpio" );static const u32 pad_type_map[] = {IMX_SCU_WAKEUP_OFF ,/* 0 */ IMX_SCU_WAKEUP_RISE_EDGE ,/* IRQ_TYPE_EDGE_RISING */ IMX_SCU_WAKEUP_FALL_EDGE ,/* IRQ_TYPE_EDGE_FALLING */ -IMX_SCU_WAKEUP_FALL_EDGE ,/* IRQ_TYPE_EDGE_BOTH */ +IMX_SCU_WAKEUP_RISE_EDGE ,/* IRQ_TYPE_EDGE_BOTH */ IMX_SCU_WAKEUP_HIGH_LVL ,/* IRQ_TYPE_LEVEL_HIGH */ IMX_SCU_WAKEUP_OFF ,/* 5 */ IMX_SCU_WAKEUP_OFF ,/* 6 */
@@ -596,6 +597,13 @@ static bool mxc_gpio_set_pad_wakeup(struct mxc_gpio_port *port, bool enable) config = pad_type_map[type]; else config =IMX_SCU_WAKEUP_OFF ; + +if (is_imx8qm && config ==IMX_SCU_WAKEUP_FALL_EDGE ) { +dev_warn_once (port->dev, +"No falling-edge support for wakeup on i.MX8QM\n" ); + config =IMX_SCU_WAKEUP_OFF ; + } + ret |=mxc_gpio_generic_config (port, i, config); } }
drivers/gpu/drm/ast/ast_dp501.c +1 -1
@@ -439,7 +439,7 @@ static void ast_init_analog(struct drm_device *dev)/* Finally, clear bits [17:16] of SCU2c */ data =ast_read32 (ast,0x1202c ); data &=0xfffcffff ; -ast_write32 (ast,0 , data); +ast_write32 (ast,0x1202c , data);/* Disable DVO */ ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xa3 ,0xcf ,0x00 );
drivers/gpu/drm/drm_ioc32.c +2 -0
@@ -28,6 +28,7 @@* IN THE SOFTWARE. */ #include <linux/compat.h> +#include <linux/nospec.h> #include <linux/ratelimit.h> #include <linux/export.h>
@@ -983,6 +984,7 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)if (nr >=ARRAY_SIZE (drm_compat_ioctls))return drm_ioctl (filp, cmd, arg); + nr =array_index_nospec (nr,ARRAY_SIZE (drm_compat_ioctls)); fn = drm_compat_ioctls[nr].fn;if (!fn)return drm_ioctl (filp, cmd, arg);
drivers/gpu/drm/i915/display/g4x_dp.c +1 -1
@@ -132,7 +132,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder, intel_dp->DP |=DP_SYNC_VS_HIGH ; intel_dp->DP |=DP_LINK_TRAIN_OFF_CPT ; -if (drm_dp_enhanced_frame_cap (intel_dp->dpcd)) +if (pipe_config->enhanced_framing) intel_dp->DP |=DP_ENHANCED_FRAMING ; intel_dp->DP |=DP_PIPE_SEL_IVB (crtc->pipe);
drivers/hid/hid-multitouch.c +7 -0
@@ -472,12 +472,19 @@ static void mt_get_feature(struct hid_device *hdev, struct hid_report *report)dev_warn (&hdev->dev,"failed to fetch feature %d\n" , report->id); }else { +/* The report ID in the request and the response should match */ +if (report->id != buf[0 ]) { +hid_err (hdev,"Returned feature report did not match the request\n" ); + goto free; + } + ret =hid_report_raw_event (hdev,HID_FEATURE_REPORT , buf, size,0 );if (ret)dev_warn (&hdev->dev,"failed to report feature\n" ); } +free:kfree (buf); }
drivers/hid/wacom_wac.c +10 -0
@@ -1256,10 +1256,20 @@ static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)switch (data[0 ]) {case 0x04 : +if (len <32 ) { +dev_warn (wacom->pen_input->dev.parent, +"Report 0x04 too short: %zu bytes\n" , len); +break ; + }wacom_intuos_bt_process_data (wacom, data + i); i +=10 ; fallthrough;case 0x03 : +if (i ==1 && len <22 ) { +dev_warn (wacom->pen_input->dev.parent, +"Report 0x03 too short: %zu bytes\n" , len); +break ; + }wacom_intuos_bt_process_data (wacom, data + i); i +=10 ;wacom_intuos_bt_process_data (wacom, data + i);
drivers/hwmon/occ/common.c +9 -10
@@ -420,6 +420,12 @@ static ssize_t occ_show_freq_2(struct device *dev,return sysfs_emit (buf,"%u\n" , val); } +static u64 occ_get_powr_avg (u64 accum,u32 samples) +{ +return (samples ==0 ) ?0 : +mul_u64_u32_div (accum,1000000UL , samples); +} +static ssize_t occ_show_power_1 (struct device *dev,struct device_attribute *attr,char *buf) {
@@ -441,9 +447,8 @@ static ssize_t occ_show_power_1(struct device *dev, val =get_unaligned_be16 (&power->sensor_id);break ;case 1 : - val =get_unaligned_be32 (&power->accumulator) / -get_unaligned_be32 (&power->update_tag); - val *=1000000ULL ; + val =occ_get_powr_avg (get_unaligned_be32 (&power->accumulator), +get_unaligned_be32 (&power->update_tag));break ;case 2 : val = (u64)get_unaligned_be32(&power->update_tag) *
@@ -459,12 +464,6 @@ static ssize_t occ_show_power_1(struct device *dev,return sysfs_emit (buf,"%llu\n" , val); } -static u64 occ_get_powr_avg (u64 accum,u32 samples) -{ -return (samples ==0 ) ?0 : -mul_u64_u32_div (accum,1000000UL , samples); -} -static ssize_t occ_show_power_2 (struct device *dev,struct device_attribute *attr,char *buf) {
@@ -725,7 +724,7 @@ static ssize_t occ_show_extended(struct device *dev,switch (sattr->nr) {case 0 :if (extn->flags &EXTN_FLAG_SENSOR_ID ) { - rc =sysfs_emit (buf,"%u" , + rc =sysfs_emit (buf,"%u\n" ,get_unaligned_be32 (&extn->sensor_id)); }else { rc =sysfs_emit (buf,"%4phN\n" , extn->name);
drivers/hwmon/pmbus/pxe1610.c +4 -1
@@ -104,7 +104,10 @@ static int pxe1610_probe(struct i2c_client *client)* By default this device doesn't boot to page 0, so set page 0 * to access all pmbus registers. */ -i2c_smbus_write_byte_data (client,PMBUS_PAGE ,0 ); + ret =i2c_smbus_write_byte_data (client,PMBUS_PAGE ,0 ); +if (ret <0 ) +return dev_err_probe (&client->dev, ret, +"Failed to set page 0\n" );/* Read Manufacturer id */ ret =i2c_smbus_read_block_data (client,PMBUS_MFR_ID , buf);
drivers/hwmon/pmbus/tps53679.c +2 -2
@@ -156,8 +156,8 @@ static int tps53676_identify(struct i2c_client *client, ret =i2c_smbus_read_block_data (client,PMBUS_IC_DEVICE_ID , buf);if (ret <0 )return ret; -if (strncmp ("TI\x53\x67\x60" , buf,5 )) { -dev_err (&client->dev,"Unexpected device ID: %s\n" , buf); +if (ret !=6 ||memcmp (buf,"TI\x53\x67\x60\x00" ,6 )) { +dev_err (&client->dev,"Unexpected device ID: %*ph\n" , ret, buf);return -ENODEV ; }
drivers/i2c/busses/Kconfig +2 -0
@@ -1139,6 +1139,8 @@ config I2C_TEGRA tristate "NVIDIA Tegra internal I2C controller" depends on ARCH_TEGRA || (COMPILE_TEST && (ARC || ARM || ARM64 || M68K || RISCV || SUPERH || SPARC)) # COMPILE_TEST needs architectures with readsX()/writesX() primitives + depends on PINCTRL + # ARCH_TEGRA implies PINCTRL, but the COMPILE_TEST side doesn't. help If you say yes to this option, support will be included for the I2C controller embedded in NVIDIA Tegra SOCs
drivers/i2c/busses/i2c-tegra.c +4 -1
@@ -1788,8 +1788,11 @@ static int tegra_i2c_probe(struct platform_device *pdev)* * VI I2C device shouldn't be marked as IRQ-safe because VI I2C won't * be used for atomic transfers. ACPI device is not IRQ safe also. +* +* Devices with pinctrl states cannot be marked IRQ-safe as the pinctrl +* state transitions during runtime PM require mutexes. */ -if (!IS_VI (i2c_dev) && !has_acpi_companion (i2c_dev->dev)) +if (!IS_VI (i2c_dev) && !has_acpi_companion (i2c_dev->dev) && !i2c_dev->dev->pins)pm_runtime_irq_safe (i2c_dev->dev);pm_runtime_enable (i2c_dev->dev);
drivers/iio/accel/adxl355_core.c +1 -1
@@ -745,7 +745,7 @@ static const struct iio_chan_spec adxl355_channels[] = {BIT (IIO_CHAN_INFO_OFFSET ), .scan_index = 3, .scan_type = { - .sign ='s' , + .sign ='u' , .realbits =12 , .storagebits =16 , .endianness =IIO_BE ,
drivers/iio/adc/ti-adc161s626.c +20 -21
75 lines not on this page · raw message
drivers/iio/dac/ad5770r.c +1 -1
@@ -323,7 +323,7 @@ static int ad5770r_read_raw(struct iio_dev *indio_dev, chan->address, st->transf_buf, 2);if (ret) -return 0 ; +return ret; buf16 = st->transf_buf[0 ] + (st->transf_buf[1 ] <<8 ); *val = buf16 >>2 ;
drivers/iio/gyro/mpu3050-core.c +21 -11
@@ -1139,11 +1139,16 @@ static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq) ret =iio_trigger_register (mpu3050->trig);if (ret) -return ret; + goto err_iio_trigger; indio_dev->trig =iio_trigger_get (mpu3050->trig);return 0 ; + +err_iio_trigger: +free_irq (mpu3050->irq, mpu3050->trig); + +return ret; } int mpu3050_common_probe(struct device *dev,
@@ -1231,12 +1236,6 @@ int mpu3050_common_probe(struct device *dev, goto err_power_down; } - ret =iio_device_register (indio_dev); -if (ret) { -dev_err (dev,"device register failed\n" ); - goto err_cleanup_buffer; - } -dev_set_drvdata (dev, indio_dev);/* Check if we have an assigned IRQ to use as trigger */
@@ -1259,9 +1258,20 @@ int mpu3050_common_probe(struct device *dev,pm_runtime_use_autosuspend (dev);pm_runtime_put (dev); + ret =iio_device_register (indio_dev); +if (ret) { +dev_err (dev,"device register failed\n" ); + goto err_iio_device_register; + } +return 0 ; -err_cleanup_buffer: +err_iio_device_register: +pm_runtime_get_sync (dev); +pm_runtime_put_noidle (dev); +pm_runtime_disable (dev); +if (irq) +free_irq (mpu3050->irq, mpu3050->trig);iio_triggered_buffer_cleanup (indio_dev); err_power_down:mpu3050_power_down (mpu3050);
@@ -1274,13 +1284,13 @@ void mpu3050_common_remove(struct device *dev)struct iio_dev *indio_dev =dev_get_drvdata (dev);struct mpu3050 *mpu3050 =iio_priv (indio_dev); +iio_device_unregister (indio_dev);pm_runtime_get_sync (dev);pm_runtime_put_noidle (dev);pm_runtime_disable (dev); -iio_triggered_buffer_cleanup (indio_dev);if (mpu3050->irq) -free_irq (mpu3050->irq, mpu3050); -iio_device_unregister (indio_dev); +free_irq (mpu3050->irq, mpu3050->trig); +iio_triggered_buffer_cleanup (indio_dev);mpu3050_power_down (mpu3050); }
drivers/iio/imu/bmi160/bmi160_core.c +5 -10
@@ -568,12 +568,16 @@ static int bmi160_config_pin(struct regmap *regmap, enum bmi160_int_pin pin, int_out_ctrl_shift =BMI160_INT1_OUT_CTRL_SHIFT ; int_latch_mask =BMI160_INT1_LATCH_MASK ; int_map_mask =BMI160_INT1_MAP_DRDY_EN ; + pin_name ="INT1" ;break ;case BMI160_PIN_INT2 : int_out_ctrl_shift =BMI160_INT2_OUT_CTRL_SHIFT ; int_latch_mask =BMI160_INT2_LATCH_MASK ; int_map_mask =BMI160_INT2_MAP_DRDY_EN ; + pin_name ="INT2" ;break ; +default : +return -EINVAL ; } int_out_ctrl_mask =BMI160_INT_OUT_CTRL_MASK << int_out_ctrl_shift;
@@ -607,17 +611,8 @@ static int bmi160_config_pin(struct regmap *regmap, enum bmi160_int_pin pin, ret =bmi160_write_conf_reg (regmap,BMI160_REG_INT_MAP , int_map_mask, int_map_mask, write_usleep); -if (ret) { -switch (pin) { -case BMI160_PIN_INT1 : - pin_name ="INT1" ; -break ; -case BMI160_PIN_INT2 : - pin_name ="INT2" ; -break ; - } +if (ret)dev_err (dev,"Failed to configure %s IRQ pin" , pin_name); - }return ret; }
drivers/iio/imu/bno055/bno055.c +1 -1
@@ -64,7 +64,7 @@#define BNO055_GRAVITY_DATA_X_LSB_REG 0x2E#define BNO055_GRAVITY_DATA_Y_LSB_REG 0x30#define BNO055_GRAVITY_DATA_Z_LSB_REG 0x32 -#define BNO055_SCAN_CH_COUNT ((BNO055_GRAVITY_DATA_Z_LSB_REG - BNO055_ACC_DATA_X_LSB_REG) / 2) +#define BNO055_SCAN_CH_COUNT ((BNO055_GRAVITY_DATA_Z_LSB_REG - BNO055_ACC_DATA_X_LSB_REG) / 2 + 1)#define BNO055_TEMP_REG 0x34#define BNO055_CALIB_STAT_REG 0x35#define BNO055_CALIB_STAT_MAGN_SHIFT 0
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +3 -0
@@ -378,6 +378,7 @@ static int inv_icm42600_buffer_predisable(struct iio_dev *indio_dev)static int inv_icm42600_buffer_postdisable (struct iio_dev *indio_dev) {struct inv_icm42600_state *st =iio_device_get_drvdata (indio_dev); +struct inv_sensors_timestamp *ts =iio_priv (indio_dev);struct device *dev =regmap_get_device (st->map);unsigned int sensor;unsigned int *watermark;
@@ -399,6 +400,8 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)mutex_lock (&st->lock); +inv_sensors_timestamp_apply_odr (ts,0 ,0 ,0 ); + ret =inv_icm42600_buffer_set_fifo_en (st, st->fifo.en & ~sensor);if (ret) goto out_unlock;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +4 -0
@@ -202,6 +202,10 @@ static int st_lsm6dsx_set_fifo_odr(struct st_lsm6dsx_sensor *sensor,const struct st_lsm6dsx_reg *batch_reg;u8 data; +/* Only internal sensors have a FIFO ODR configuration register. */ +if (sensor->id >=ARRAY_SIZE (hw->settings->batch)) +return 0 ; + batch_reg = &hw->settings->batch[sensor->id];if (batch_reg->addr) {int val;
drivers/iio/light/vcnl4035.c +12 -6
@@ -105,17 +105,23 @@ static irqreturn_t vcnl4035_trigger_consumer_handler(int irq, void *p)struct iio_dev *indio_dev = pf->indio_dev;struct vcnl4035_data *data =iio_priv (indio_dev);/* Ensure naturally aligned timestamp */ -u8 buffer[ALIGN (sizeof (u16),sizeof (s64)) +sizeof (s64)]__aligned(8) = { }; +struct { +u16 als_data; +aligned_s64 timestamp; + } buffer = { }; +unsigned int val;int ret; - ret =regmap_read (data->regmap,VCNL4035_ALS_DATA , (int *)buffer); + ret =regmap_read (data->regmap,VCNL4035_ALS_DATA , &val);if (ret <0 ) {dev_err (&data->client->dev,"Trigger consumer can't read from sensor.\n" ); goto fail_read; } -iio_push_to_buffers_with_timestamp (indio_dev, buffer, -iio_get_time_ns (indio_dev)); + + buffer.als_data = val; +iio_push_to_buffers_with_timestamp (indio_dev, &buffer, +iio_get_time_ns (indio_dev)); fail_read:iio_trigger_notify_done (indio_dev->trig);
@@ -378,7 +384,7 @@ static const struct iio_chan_spec vcnl4035_channels[] = { .sign = 'u', .realbits = 16, .storagebits = 16, - .endianness = IIO_LE, + .endianness = IIO_CPU, }, }, {
@@ -392,7 +398,7 @@ static const struct iio_chan_spec vcnl4035_channels[] = { .sign = 'u', .realbits = 16, .storagebits = 16, - .endianness = IIO_LE, + .endianness = IIO_CPU, }, }, };
drivers/input/joystick/xpad.c +5 -0
@@ -307,6 +307,8 @@ static const struct xpad_device { { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE }, { 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE }, + { 0x1532, 0x0a57, "Razer Wolverine V3 Pro (Wired)", 0, XTYPE_XBOX360 }, + { 0x1532, 0x0a59, "Razer Wolverine V3 Pro (2.4 GHz Dongle)", 0, XTYPE_XBOX360 }, { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 }, { 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 }, { 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 },
@@ -354,6 +356,8 @@ static const struct xpad_device { { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 }, { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 }, { 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 }, + { 0x20bc, 0x5134, "BETOP BTP-KP50B Xinput Dongle", 0, XTYPE_XBOX360 }, + { 0x20bc, 0x514a, "BETOP BTP-KP50C Xinput Dongle", 0, XTYPE_XBOX360 }, { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE }, { 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE }, { 0x20d6, 0x2064, "PowerA Wired Controller for Xbox", MAP_SHARE_BUTTON, XTYPE_XBOXONE },
@@ -547,6 +551,7 @@ static const struct usb_device_id xpad_table[] = {XPAD_XBOX360_VENDOR (0x1a86 ),/* Nanjing Qinheng Microelectronics (WCH) */ XPAD_XBOX360_VENDOR (0x1bad ),/* Harmonix Rock Band guitar and drums */ XPAD_XBOX360_VENDOR (0x1ee9 ),/* ZOTAC Technology Limited */ +XPAD_XBOX360_VENDOR (0x20bc ),/* BETOP wireless dongles */ XPAD_XBOX360_VENDOR (0x20d6 ),/* PowerA controllers */ XPAD_XBOXONE_VENDOR (0x20d6 ),/* PowerA controllers */ XPAD_XBOX360_VENDOR(0x24c6), /* PowerA controllers */
drivers/input/rmi4/rmi_f54.c +2 -2
@@ -540,6 +540,8 @@ static void rmi_f54_work(struct work_struct *work)int error;int i; +mutex_lock (&f54->data_mutex); + report_size =rmi_f54_get_report_size (f54);if (report_size ==0 ) { dev_err(&fn->dev, "Bad report size, report type=%d\n",
@@ -548,8 +550,6 @@ static void rmi_f54_work(struct work_struct *work) goto error;/* retry won't help */ } -mutex_lock (&f54->data_mutex); -/* * Need to check if command has completed. * If not try again later.
drivers/input/serio/i8042-acpipnpio.h +7 -0
@@ -1187,6 +1187,13 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "X6KK45xU_X6SP45xU"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX |SERIO_QUIRK_RESET_ALWAYS | +SERIO_QUIRK_NOLOOP |SERIO_QUIRK_NOPNP ) + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "WUJIE Series-X5SP4NAG"),
drivers/misc/fastrpc.c +1 -0
@@ -1374,6 +1374,7 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl, } err_map:fastrpc_buf_free (fl->cctx->remote_heap); + fl->cctx->remote_heap =NULL ; err_name:kfree (name); err:
drivers/net/ethernet/broadcom/tg3.c +12 -1
@@ -12212,7 +12212,7 @@ static int tg3_get_link_ksettings(struct net_device *dev,ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, advertising); -if (netif_running (dev) && tp->link_up) { +if (netif_running (dev) &&netif_carrier_ok (dev)) { cmd->base.speed = tp->link_config.active_speed; cmd->base.duplex = tp->link_config.active_duplex; ethtool_convert_legacy_u32_to_link_mode(
@@ -16945,6 +16945,13 @@ static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent)return err; } +static int tg3_is_default_mac_address (u8 *addr) +{ +static const u8 default_mac_address[ETH_ALEN ] = {0x00 ,0x10 ,0x18 ,0x00 ,0x00 ,0x00 }; + +return ether_addr_equal (default_mac_address, addr); +} +static int tg3_get_device_address (struct tg3 *tp,u8 *addr) {u32 hi, lo, mac_offset;
@@ -17016,6 +17023,10 @@ static int tg3_get_device_address(struct tg3 *tp, u8 *addr)if (!is_valid_ether_addr (addr))return -EINVAL ; + +if (tg3_is_default_mac_address (addr)) +return device_get_mac_address (&tp->pdev->dev, addr); +return 0 ; }
drivers/net/ethernet/cadence/macb_main.c +8 -5
@@ -5384,6 +5384,8 @@ static int __maybe_unused macb_suspend(struct device *dev)macb_writel (bp,TSR ,-1 );macb_writel (bp,RSR ,-1 ); +spin_unlock_irqrestore (&bp->lock, flags); +/* Change interrupt handler and * Enable WoL IRQ on queue 0 */
@@ -5395,11 +5397,12 @@ static int __maybe_unused macb_suspend(struct device *dev)dev_err (dev,"Unable to request IRQ %d (error %d)\n" , bp->queues[0 ].irq, err); -spin_unlock_irqrestore (&bp->lock, flags);return err; } +spin_lock_irqsave (&bp->lock, flags);queue_writel (bp->queues,IER ,GEM_BIT (WOL ));gem_writel (bp,WOL ,MACB_BIT (MAG )); +spin_unlock_irqrestore (&bp->lock, flags); }else { err =devm_request_irq (dev, bp->queues[0 ].irq, macb_wol_interrupt,IRQF_SHARED , netdev->name, bp->queues);
@@ -5407,13 +5410,13 @@ static int __maybe_unused macb_suspend(struct device *dev)dev_err (dev,"Unable to request IRQ %d (error %d)\n" , bp->queues[0 ].irq, err); -spin_unlock_irqrestore (&bp->lock, flags);return err; } +spin_lock_irqsave (&bp->lock, flags);queue_writel (bp->queues,IER ,MACB_BIT (WOL ));macb_writel (bp,WOL ,MACB_BIT (MAG )); +spin_unlock_irqrestore (&bp->lock, flags); } -spin_unlock_irqrestore (&bp->lock, flags);enable_irq_wake (bp->queues[0 ].irq); }
@@ -5480,6 +5483,8 @@ static int __maybe_unused macb_resume(struct device *dev)queue_readl (bp->queues,ISR );if (bp->caps &MACB_CAPS_ISR_CLEAR_ON_WRITE )queue_writel (bp->queues,ISR ,-1 ); +spin_unlock_irqrestore (&bp->lock, flags); +/* Replace interrupt handler on queue 0 */ devm_free_irq (dev, bp->queues[0 ].irq, bp->queues); err = devm_request_irq(dev, bp->queues[0].irq, macb_interrupt,
@@ -5488,10 +5493,8 @@ static int __maybe_unused macb_resume(struct device *dev)dev_err (dev,"Unable to request IRQ %d (error %d)\n" , bp->queues[0 ].irq, err); -spin_unlock_irqrestore (&bp->lock, flags);return err; } -spin_unlock_irqrestore (&bp->lock, flags);disable_irq_wake (bp->queues[0 ].irq);
drivers/net/ethernet/cadence/macb_pci.c +6 -4
@@ -97,10 +97,10 @@ static int macb_probe(struct pci_dev *pdev, const struct pci_device_id *id)return 0 ; err_plat_dev_register: -clk_unregister (plat_data.hclk); +clk_unregister_fixed_rate (plat_data.hclk); err_hclk_register: -clk_unregister (plat_data.pclk); +clk_unregister_fixed_rate (plat_data.pclk); err_pclk_register:return err;
@@ -110,10 +110,12 @@ static void macb_remove(struct pci_dev *pdev) {struct platform_device *plat_dev =pci_get_drvdata (pdev);struct macb_platform_data *plat_data =dev_get_platdata (&plat_dev->dev); +struct clk *pclk = plat_data->pclk; +struct clk *hclk = plat_data->hclk; -clk_unregister (plat_data->pclk); -clk_unregister (plat_data->hclk);platform_device_unregister (plat_dev); +clk_unregister_fixed_rate (pclk); +clk_unregister_fixed_rate (hclk); }static const struct pci_device_id dev_id_table[] = {
drivers/net/ethernet/faraday/ftgmac100.c +24 -4
@@ -934,19 +934,19 @@ static int ftgmac100_alloc_rings(struct ftgmac100 *priv) priv->tx_skbs =kcalloc (MAX_TX_QUEUE_ENTRIES ,sizeof (void *),GFP_KERNEL );if (!priv->tx_skbs) -return -ENOMEM ; + goto err_free_rx_skbs;/* Allocate descriptors */ priv->rxdes =dma_alloc_coherent (priv->dev,MAX_RX_QUEUE_ENTRIES *sizeof (struct ftgmac100_rxdes ), &priv->rxdes_dma,GFP_KERNEL );if (!priv->rxdes) -return -ENOMEM ; + goto err_free_tx_skbs; priv->txdes =dma_alloc_coherent (priv->dev,MAX_TX_QUEUE_ENTRIES *sizeof (struct ftgmac100_txdes ), &priv->txdes_dma,GFP_KERNEL );if (!priv->txdes) -return -ENOMEM ; + goto err_free_rxdes;/* Allocate scratch packet buffer */ priv->rx_scratch = dma_alloc_coherent(priv->dev,
@@ -954,9 +954,29 @@ static int ftgmac100_alloc_rings(struct ftgmac100 *priv) &priv->rx_scratch_dma, GFP_KERNEL);if (!priv->rx_scratch) -return -ENOMEM ; + goto err_free_txdes;return 0 ; + +err_free_txdes: +dma_free_coherent (priv->dev, +MAX_TX_QUEUE_ENTRIES * +sizeof (struct ftgmac100_txdes ), + priv->txdes, priv->txdes_dma); + priv->txdes =NULL ; +err_free_rxdes: +dma_free_coherent (priv->dev, +MAX_RX_QUEUE_ENTRIES * +sizeof (struct ftgmac100_rxdes ), + priv->rxdes, priv->rxdes_dma); + priv->rxdes =NULL ; +err_free_tx_skbs: +kfree (priv->tx_skbs); + priv->tx_skbs =NULL ; +err_free_rx_skbs: +kfree (priv->rx_skbs); + priv->rx_skbs =NULL ; +return -ENOMEM ; }static void ftgmac100_init_rings (struct ftgmac100 *priv)
drivers/net/ethernet/freescale/fec_ptp.c +0 -3
@@ -546,9 +546,6 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp,if (rq->perout.flags)return -EOPNOTSUPP ; -if (rq->perout.index != fep->pps_channel) -return -EOPNOTSUPP ; - period.tv_sec = rq->perout.period.sec; period.tv_nsec = rq->perout.period.nsec; period_ns =timespec64_to_ns (&period);
drivers/net/ethernet/mellanox/mlx5/core/devlink.c +1 -3
@@ -53,9 +53,7 @@ mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,if (err)return err; - err =mlx5_fw_version_query (dev, &running_fw, &stored_fw); -if (err) -return err; +mlx5_fw_version_query (dev, &running_fw, &stored_fw); snprintf(version_str, sizeof(version_str), "%d.%d.%04d", mlx5_fw_ver_major(running_fw), mlx5_fw_ver_minor(running_fw),
drivers/net/ethernet/mellanox/mlx5/core/fw.c +34 -19
82 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c +3 -0
@@ -163,8 +163,11 @@ DEFINE_SHOW_ATTRIBUTE(members);void mlx5_ldev_add_debugfs (struct mlx5_core_dev *dev) { +struct mlx5_lag *ldev =mlx5_lag_dev (dev);struct dentry *dbg; +if (!ldev) +return ; dbg =debugfs_create_dir ("lag" ,mlx5_debugfs_get_dev_root (dev)); dev->priv.dbg.lag_debugfs = dbg;
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +2 -2
@@ -269,8 +269,8 @@ void mlx5_dm_cleanup(struct mlx5_core_dev *dev);int mlx5_firmware_flash (struct mlx5_core_dev *dev,const struct firmware *fw,struct netlink_ext_ack *extack); -int mlx5_fw_version_query (struct mlx5_core_dev *dev, -u32 *running_ver,u32 *stored_ver); +void mlx5_fw_version_query (struct mlx5_core_dev *dev,u32 *running_ver, +u32 *stored_ver);#ifdef CONFIG_MLX5_CORE_EN int mlx5e_init (void );
drivers/net/ethernet/microsoft/mana/mana_en.c +4 -2
@@ -2759,6 +2759,7 @@ static int add_adev(struct gdma_dev *gd)struct auxiliary_device *adev;struct mana_adev *madev;int ret; +int id; madev =kzalloc (sizeof (*madev),GFP_KERNEL );if (!madev)
@@ -2768,7 +2769,8 @@ static int add_adev(struct gdma_dev *gd) ret =mana_adev_idx_alloc ();if (ret <0 ) goto idx_fail; - adev->id = ret; + id = ret; + adev->id = id; adev->name ="rdma" ; adev->dev.parent = gd->gdma_context->dev;
@@ -2792,7 +2794,7 @@ static int add_adev(struct gdma_dev *gd)auxiliary_device_uninit (adev); init_fail: -mana_adev_idx_free (adev->id); +mana_adev_idx_free (id); idx_fail:kfree (madev);
drivers/net/ethernet/xilinx/xilinx_axienet.h +2 -2
@@ -103,7 +103,7 @@#define XAXIDMA_BD_HAS_DRE_MASK 0xF00/* Whether has DRE mask */ #define XAXIDMA_BD_WORDLEN_MASK 0xFF/* Whether has DRE mask */ -#define XAXIDMA_BD_CTRL_LENGTH_MASK 0x007FFFFF/* Requested len */ +#define XAXIDMA_BD_CTRL_LENGTH_MASK GENMASK(25, 0)/* Requested len */ #define XAXIDMA_BD_CTRL_TXSOF_MASK 0x08000000/* First tx packet */ #define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000/* Last tx packet */ #define XAXIDMA_BD_CTRL_ALL_MASK 0x0C000000/* All control bits */
@@ -129,7 +129,7 @@#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000/* Last tx packet */ #define XAXIDMA_BD_CTRL_ALL_MASK 0x0C000000/* All control bits */ -#define XAXIDMA_BD_STS_ACTUAL_LEN_MASK 0x007FFFFF/* Actual len */ +#define XAXIDMA_BD_STS_ACTUAL_LEN_MASK GENMASK(25, 0)/* Actual len */ #define XAXIDMA_BD_STS_COMPLETE_MASK 0x80000000/* Completed */ #define XAXIDMA_BD_STS_DEC_ERR_MASK 0x40000000/* Decode error */ #define XAXIDMA_BD_STS_SLV_ERR_MASK 0x20000000/* Slave error */
drivers/net/phy/sfp.c +6 -1
@@ -465,10 +465,15 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id, {/* Ubiquiti U-Fiber Instant module claims that support all transceiver * types including 10G Ethernet which is not truth. So clear all claimed -* modes and set only one mode which module supports: 1000baseX_Full. +* modes and set only one mode which module supports: 1000baseX_Full, +* along with the Autoneg and pause bits. */ linkmode_zero (modes);linkmode_set_bit (ETHTOOL_LINK_MODE_1000baseX_Full_BIT, modes); +linkmode_set_bit (ETHTOOL_LINK_MODE_Autoneg_BIT, modes); +linkmode_set_bit (ETHTOOL_LINK_MODE_Pause_BIT, modes); +linkmode_set_bit (ETHTOOL_LINK_MODE_Asym_Pause_BIT, modes); +phy_interface_zero (interfaces);__set_bit (PHY_INTERFACE_MODE_1000BASEX , interfaces); }
drivers/net/vxlan/vxlan_core.c +4 -2
@@ -1964,12 +1964,14 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request, ns_olen = request->len -skb_network_offset (request) -sizeof (struct ipv6hdr ) -sizeof (*ns);for (i =0 ; i < ns_olen-1 ; i += (ns->opt[i+1 ]<<3 )) { -if (!ns->opt[i +1 ]) { +if (!ns->opt[i +1 ] || i + (ns->opt[i +1 ] <<3 ) > ns_olen) {kfree_skb (reply);return NULL ; }if (ns->opt[i] ==ND_OPT_SOURCE_LL_ADDR ) { - daddr = ns->opt + i +sizeof (struct nd_opt_hdr ); +if ((ns->opt[i +1 ] <<3 ) >= +sizeof (struct nd_opt_hdr ) +ETH_ALEN ) + daddr = ns->opt + i +sizeof (struct nd_opt_hdr );break ; } }
drivers/net/wireless/ath/ath11k/dp.h +4 -2
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) 2021-2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH11K_DP_H
@@ -20,7 +20,6 @@ struct ath11k_ext_irq_grp;struct dp_rx_tid {u8 tid; -u32 *vaddr;dma_addr_t paddr;u32 size;u32 ba_win_sz;
@@ -37,6 +36,9 @@ struct dp_rx_tid {/* Timer info related to fragments */ struct timer_list frag_timer;struct ath11k_base *ab; +u32 *vaddr_unaligned; +dma_addr_t paddr_unaligned; +u32 unaligned_size; };#define DP_REO_DESC_FREE_THRESHOLD 64
drivers/net/wireless/ath/ath11k/dp_rx.c +132 -78
331 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hal.c +15 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/dma-mapping.h> #include "hal_tx.h"
@@ -783,6 +783,20 @@ u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *ab,return desc; } +u32 *ath11k_hal_srng_src_next_peek (struct ath11k_base *ab,struct hal_srng *srng) +{ +u32 next_hp; + +lockdep_assert_held (&srng->lock); + + next_hp = (srng->u.src_ring.hp + srng->entry_size) % srng->ring_size; + +if (next_hp != srng->u.src_ring.cached_tp) +return srng->ring_base_vaddr + next_hp; + +return NULL ; +} +u32 *ath11k_hal_srng_src_peek (struct ath11k_base *ab,struct hal_srng *srng) {lockdep_assert_held (&srng->lock);
drivers/net/wireless/ath/ath11k/hal.h +2 -0
@@ -946,6 +946,8 @@ u32 *ath11k_hal_srng_dst_peek(struct ath11k_base *ab, struct hal_srng *srng);int ath11k_hal_srng_dst_num_free (struct ath11k_base *ab,struct hal_srng *srng,bool sync_hw_ptr);u32 *ath11k_hal_srng_src_peek (struct ath11k_base *ab,struct hal_srng *srng); +u32 *ath11k_hal_srng_src_next_peek (struct ath11k_base *ab, +struct hal_srng *srng);u32 *ath11k_hal_srng_src_get_next_reaped (struct ath11k_base *ab,struct hal_srng *srng); u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *ab,
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +1 -1
@@ -2863,7 +2863,7 @@ static void iwl_mvm_nd_match_info_handler(struct iwl_mvm *mvm,if (IS_ERR_OR_NULL (vif))return ; -if (len <sizeof (struct iwl_scan_offload_match_info )) { +if (len <sizeof (struct iwl_scan_offload_match_info ) + matches_len) {IWL_ERR (mvm,"Invalid scan match info notification\n" );return ; }
drivers/net/wireless/microchip/wilc1000/hif.c +1 -1
@@ -162,7 +162,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,u32 index =0 ;u32 i, scan_timeout;u8 *buffer; -u8 valuesize =0 ; +u32 valuesize =0 ;u8 *search_ssid_vals =NULL ;struct host_if_drv *hif_drv = vif->hif_drv;
drivers/net/wireless/virtual/virt_wifi.c +0 -1
@@ -555,7 +555,6 @@ static int virt_wifi_newlink(struct net *src_net, struct net_device *dev,eth_hw_addr_inherit (dev, priv->lowerdev);netif_stacked_transfer_operstate (priv->lowerdev, dev); -SET_NETDEV_DEV (dev, &priv->lowerdev->dev); dev->ieee80211_ptr =kzalloc (sizeof (*dev->ieee80211_ptr),GFP_KERNEL );if (!dev->ieee80211_ptr) {
drivers/nfc/pn533/uart.c +3 -0
@@ -211,6 +211,9 @@ static int pn532_receive_buf(struct serdev_device *serdev,del_timer (&dev->cmd_timeout);for (i =0 ; i < count; i++) { +if (unlikely (!skb_tailroom (dev->recv_skb))) +skb_trim (dev->recv_skb,0 ); +skb_put_u8 (dev->recv_skb, *data++);if (!pn532_uart_rx_is_frame (dev->recv_skb))continue ;
drivers/nvmem/imx-ocotp-ele.c +1 -0
@@ -127,6 +127,7 @@ static int imx_ocotp_cell_pp(void *context, const char *id, int index,static void imx_ocotp_fixup_dt_cell_info (struct nvmem_device *nvmem,struct nvmem_cell_info *cell) { + cell->raw_len =round_up (cell->bytes,4 ); cell->read_post_process = imx_ocotp_cell_pp; }
drivers/nvmem/imx-ocotp.c +1 -0
@@ -589,6 +589,7 @@ MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);static void imx_ocotp_fixup_dt_cell_info (struct nvmem_device *nvmem,struct nvmem_cell_info *cell) { + cell->raw_len =round_up (cell->bytes,4 ); cell->read_post_process = imx_ocotp_cell_pp; }
drivers/spi/spi-geni-qcom.c +5 -4
@@ -948,10 +948,13 @@ static irqreturn_t geni_spi_isr(int irq, void *data)struct spi_master *spi = data;struct spi_geni_master *mas =spi_master_get_devdata (spi);struct geni_se *se = &mas->se; -u32 m_irq; +u32 m_irq, dma_tx_status, dma_rx_status; m_irq =readl (se->base +SE_GENI_M_IRQ_STATUS ); -if (!m_irq) + dma_tx_status =readl_relaxed (se->base +SE_DMA_TX_IRQ_STAT ); + dma_rx_status =readl_relaxed (se->base +SE_DMA_RX_IRQ_STAT ); + +if (!m_irq && !dma_tx_status && !dma_rx_status)return IRQ_NONE ; if (m_irq & (M_CMD_OVERRUN_EN | M_ILLEGAL_CMD_EN | M_CMD_FAILURE_EN |
@@ -999,8 +1002,6 @@ static irqreturn_t geni_spi_isr(int irq, void *data) } }else if (mas->cur_xfer_mode ==GENI_SE_DMA ) {const struct spi_transfer *xfer = mas->cur_xfer; -u32 dma_tx_status =readl_relaxed (se->base +SE_DMA_TX_IRQ_STAT ); -u32 dma_rx_status =readl_relaxed (se->base +SE_DMA_RX_IRQ_STAT );if (dma_tx_status)writel (dma_tx_status, se->base +SE_DMA_TX_IRQ_CLR );
drivers/target/loopback/tcm_loop.c +46 -6
78 lines not on this page · raw message
drivers/thermal/thermal_core.c +1 -0
@@ -1394,6 +1394,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *tdevice_del (&tz->device); release_device:put_device (&tz->device); +wait_for_completion (&tz->removal); remove_id:ida_free (&thermal_tz_ida, id); free_tzp:
drivers/thunderbolt/nhi.c +1 -1
@@ -1010,7 +1010,7 @@ static bool nhi_wake_supported(struct pci_dev *pdev)* If power rails are sustainable for wakeup from S4 this * property is set by the BIOS. */ -if (device_property_read_u8 (&pdev->dev,"WAKE_SUPPORTED" , &val)) +if (!device_property_read_u8 (&pdev->dev,"WAKE_SUPPORTED" , &val))return !!val;return true;
drivers/usb/cdns3/cdns3-gadget.c +4 -0
@@ -2588,6 +2588,9 @@ static int __cdns3_gadget_ep_queue(struct usb_ep *ep,struct cdns3_request *priv_req;int ret =0 ; +if (!ep->desc) +return -ESHUTDOWN ; + request->actual =0 ; request->status = -EINPROGRESS ; priv_req =to_cdns3_request (request);
@@ -3428,6 +3431,7 @@ static int __cdns3_gadget_init(struct cdns *cdns) ret =cdns3_gadget_start (cdns);if (ret) {pm_runtime_put_sync (cdns->dev); +cdns_drd_gadget_off (cdns);return ret; }
drivers/usb/class/cdc-acm.c +9 -0
@@ -1225,6 +1225,12 @@ static int acm_probe(struct usb_interface *intf,if (!data_interface || !control_interface)return -ENODEV ; goto skip_normal_probe; + }else if (quirks ==NO_UNION_12 ) { + data_interface =usb_ifnum_to_if (usb_dev,2 ); + control_interface =usb_ifnum_to_if (usb_dev,1 ); +if (!data_interface || !control_interface) +return -ENODEV ; + goto skip_normal_probe; }/* normal probing*/
@@ -1748,6 +1754,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */ .driver_info =DISABLE_ECHO ,/* Don't echo banner */ }, + { USB_DEVICE(0x04b8, 0x0d12), /* EPSON HMD Com&Sens */ + .driver_info = NO_UNION_12, /* union descriptor is garbage */ + }, { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; [email protected] */ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ },
drivers/usb/class/cdc-acm.h +1 -0
@@ -114,3 +114,4 @@ struct acm {#define SEND_ZERO_PACKET BIT(6)#define DISABLE_ECHO BIT(7)#define MISSING_CAP_BRK BIT(8) +#define NO_UNION_12 BIT(9)
drivers/usb/class/usbtmc.c +3 -0
@@ -254,6 +254,9 @@ static int usbtmc_release(struct inode *inode, struct file *file)list_del (&file_data->file_elem);spin_unlock_irq (&file_data->data->dev_lock); + +/* flush anchored URBs */ +usbtmc_draw_down (file_data);mutex_unlock (&file_data->data->io_mutex);kref_put (&file_data->data->kref, usbtmc_delete);
drivers/usb/common/ulpi.c +2 -3
@@ -331,10 +331,9 @@ struct ulpi *ulpi_register_interface(struct device *dev, ulpi->ops = ops; ret =ulpi_register (dev, ulpi); -if (ret) { -kfree (ulpi); +if (ret)return ERR_PTR (ret); - } +return ulpi; }
drivers/usb/core/quirks.c +3 -0
@@ -402,6 +402,7 @@ static const struct usb_device_id usb_quirk_list[] = {/* Silicon Motion Flash Drive */ { USB_DEVICE(0x090c, 0x1000), .driver_info = USB_QUIRK_DELAY_INIT }, + { USB_DEVICE(0x090c, 0x2000), .driver_info = USB_QUIRK_DELAY_INIT }, /* Sound Devices USBPre2 */ { USB_DEVICE(0x0926, 0x0202), .driver_info =
@@ -490,6 +491,8 @@ static const struct usb_device_id usb_quirk_list[] = {/* Razer - Razer Blade Keyboard */ { USB_DEVICE(0x1532, 0x0116), .driver_info = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + /* Razer - Razer Kiyo Pro Webcam */ + { USB_DEVICE(0x1532, 0x0e05), .driver_info = USB_QUIRK_NO_LPM }, /* Lenovo ThinkPad OneLink+ Dock twin hub controllers (VIA Labs VL812) */ { USB_DEVICE(0x17ef, 0x1018), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/dwc2/gadget.c +2 -0
@@ -4604,7 +4604,9 @@ static int dwc2_hsotg_udc_stop(struct usb_gadget *gadget)/* Exit clock gating when driver is stopped. */ if (hsotg->params.power_down ==DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended && !hsotg->params.no_clock_gating) { +spin_lock_irqsave (&hsotg->lock, flags);dwc2_gadget_exit_clock_gating (hsotg,0 ); +spin_unlock_irqrestore (&hsotg->lock, flags); }/* all endpoints should be shutdown */
drivers/usb/gadget/function/f_rndis.c +6 -3
@@ -11,6 +11,7 @@/* #define VERBOSE_DEBUG */ +#include <linux/cleanup.h> #include <linux/slab.h> #include <linux/kernel.h> #include <linux/module.h>
@@ -678,9 +679,11 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)return -ENOMEM ; } - rndis_iad_descriptor.bFunctionClass = rndis_opts->class; - rndis_iad_descriptor.bFunctionSubClass = rndis_opts->subclass; - rndis_iad_descriptor.bFunctionProtocol = rndis_opts->protocol; + scoped_guard(mutex, &rndis_opts->lock) { + rndis_iad_descriptor.bFunctionClass = rndis_opts->class; + rndis_iad_descriptor.bFunctionSubClass = rndis_opts->subclass; + rndis_iad_descriptor.bFunctionProtocol = rndis_opts->protocol; + }/* * in drivers/usb/gadget/configfs.c:configfs_composite_bind()
drivers/usb/gadget/function/f_subset.c +6 -0
@@ -6,6 +6,7 @@* Copyright (C) 2008 Nokia Corporation */ +#include <linux/cleanup.h> #include <linux/slab.h> #include <linux/kernel.h> #include <linux/module.h>
@@ -449,8 +450,13 @@ static struct usb_function_instance *geth_alloc_inst(void)static void geth_free (struct usb_function *f) {struct f_gether *eth; +struct f_gether_opts *opts; + + opts = container_of(f->fi, struct f_gether_opts, func_inst); eth =func_to_geth (f); +scoped_guard (mutex, &opts->lock) + opts->refcnt--;kfree (eth); }
drivers/usb/gadget/function/f_uac1_legacy.c +37 -10
56 lines not on this page · raw message
drivers/usb/gadget/function/f_uvc.c +36 -3
@@ -410,6 +410,12 @@ uvc_function_disconnect(struct uvc_device *uvc) {int ret; +guard (mutex)(&uvc->lock); +if (uvc->func_unbound) { +dev_dbg (&uvc->vdev.dev,"skipping function deactivate (unbound)\n" ); +return ; + } +if ((ret =usb_function_deactivate (&uvc->func)) <0 )uvcg_info (&uvc->func,"UVC disconnect failed with %d\n" , ret); }
@@ -428,6 +434,15 @@ static ssize_t function_name_show(struct device *dev,static DEVICE_ATTR_RO (function_name); +static void uvc_vdev_release (struct video_device *vdev) +{ +struct uvc_device *uvc =video_get_drvdata (vdev); + +/* Signal uvc_function_unbind() that the video device has been released */ +if (uvc->vdev_release_done) +complete (uvc->vdev_release_done); +} +static int uvc_register_video (struct uvc_device *uvc) {
@@ -440,7 +455,7 @@ uvc_register_video(struct uvc_device *uvc) uvc->vdev.v4l2_dev->dev = &cdev->gadget->dev; uvc->vdev.fops = &uvc_v4l2_fops; uvc->vdev.ioctl_ops = &uvc_v4l2_ioctl_ops; - uvc->vdev.release = video_device_release_empty; + uvc->vdev.release = uvc_vdev_release; uvc->vdev.vfl_dir =VFL_DIR_TX ; uvc->vdev.lock = &uvc->video.mutex; uvc->vdev.device_caps =V4L2_CAP_VIDEO_OUTPUT |V4L2_CAP_STREAMING ;
@@ -653,6 +668,8 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)int ret = -EINVAL ;uvcg_info (f,"%s()\n" , __func__); +scoped_guard (mutex, &uvc->lock) + uvc->func_unbound = false; opts =fi_to_f_uvc_opts (f->fi);/* Sanity check the streaming endpoint module parameters. */
@@ -975,12 +992,19 @@ static void uvc_free(struct usb_function *f)static void uvc_function_unbind (struct usb_configuration *c,struct usb_function *f) { +DECLARE_COMPLETION_ONSTACK (vdev_release_done);struct usb_composite_dev *cdev = c->cdev;struct uvc_device *uvc =to_uvc (f);struct uvc_video *video = &uvc->video;long wait_ret =1 ; +bool connected;uvcg_info (f,"%s()\n" , __func__); + scoped_guard(mutex, &uvc->lock) { + uvc->func_unbound = true; + uvc->vdev_release_done = &vdev_release_done; + connected = uvc->func_connected; + }if (video->async_wq)destroy_workqueue (video->async_wq);
@@ -991,7 +1015,7 @@ static void uvc_function_unbind(struct usb_configuration *c,* though the video device removal uevent. Allow some time for the * application to close out before things get deleted. */ -if (uvc->func_connected) { +if (connected) {uvcg_dbg (f,"waiting for clean disconnect\n" ); wait_ret =wait_event_interruptible_timeout (uvc->func_connected_queue, uvc->func_connected == false,msecs_to_jiffies (500 ));
@@ -1002,7 +1026,10 @@ static void uvc_function_unbind(struct usb_configuration *c,video_unregister_device (&uvc->vdev);v4l2_device_unregister (&uvc->v4l2_dev); -if (uvc->func_connected) { +scoped_guard (mutex, &uvc->lock) + connected = uvc->func_connected; + +if (connected) {/* * Wait for the release to occur to ensure there are no longer any * pending operations that may cause panics when resources are cleaned
@@ -1014,6 +1041,10 @@ static void uvc_function_unbind(struct usb_configuration *c,uvcg_dbg (f,"done waiting for release with ret: %ld\n" , wait_ret); } +/* Wait for the video device to be released */ +wait_for_completion (&vdev_release_done); + uvc->vdev_release_done =NULL ; +usb_ep_free_request (cdev->gadget->ep0, uvc->control_req);kfree (uvc->control_buf);
@@ -1032,6 +1063,8 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)return ERR_PTR (-ENOMEM );mutex_init (&uvc->video.mutex); +mutex_init (&uvc->lock); + uvc->func_unbound = true; uvc->state =UVC_STATE_DISCONNECTED ;init_waitqueue_head (&uvc->func_connected_queue); opts =fi_to_f_uvc_opts (fi);
drivers/usb/gadget/function/u_ether.c +5 -5
@@ -1200,6 +1200,11 @@ void gether_disconnect(struct gether *link)DBG (dev,"%s\n" , __func__); +spin_lock (&dev->lock); + dev->port_usb =NULL ; + link->is_suspend = false; +spin_unlock (&dev->lock); +netif_stop_queue (dev->net);netif_carrier_off (dev->net);
@@ -1237,11 +1242,6 @@ void gether_disconnect(struct gether *link) dev->header_len =0 ; dev->unwrap =NULL ; dev->wrap =NULL ; - -spin_lock (&dev->lock); - dev->port_usb =NULL ; - link->is_suspend = false; -spin_unlock (&dev->lock); }EXPORT_SYMBOL_GPL (gether_disconnect);
drivers/usb/gadget/function/uvc.h +3 -0
@@ -131,6 +131,9 @@ struct uvc_device {enum uvc_state state;struct usb_function func;struct uvc_video video; +struct completion *vdev_release_done; +struct mutex lock;/* protects func_unbound and func_connected */ +bool func_unbound;bool func_connected;wait_queue_head_t func_connected_queue;
drivers/usb/gadget/function/uvc_v4l2.c +4 -1
@@ -491,6 +491,8 @@ uvc_v4l2_subscribe_event(struct v4l2_fh *fh,if (sub->type <UVC_EVENT_FIRST || sub->type >UVC_EVENT_LAST )return -EINVAL ; +guard (mutex)(&uvc->lock); +if (sub->type ==UVC_EVENT_SETUP && uvc->func_connected)return -EBUSY ;
@@ -512,7 +514,8 @@ static void uvc_v4l2_disable(struct uvc_device *uvc)uvc_function_disconnect (uvc);uvcg_video_enable (&uvc->video,0 );uvcg_free_buffers (&uvc->video.queue); - uvc->func_connected = false; +scoped_guard (mutex, &uvc->lock) + uvc->func_connected = false;wake_up_interruptible (&uvc->func_connected_queue); }
drivers/usb/gadget/udc/dummy_hcd.c +26 -16
67 lines not on this page · raw message
drivers/usb/host/ehci-brcm.c +2 -2
@@ -31,8 +31,8 @@ static inline void ehci_brcm_wait_for_sof(struct ehci_hcd *ehci, u32 delay)int res;/* Wait for next microframe (every 125 usecs) */ - res =readl_relaxed_poll_timeout (&ehci->regs->frame_index, val, - val != frame_idx,1 ,130 ); + res =readl_relaxed_poll_timeout_atomic (&ehci->regs->frame_index, + val, val != frame_idx,1 ,130 );if (res)ehci_err (ehci,"Error waiting for SOF\n" );udelay (delay);
drivers/usb/serial/io_edgeport.c +3 -0
@@ -73,6 +73,7 @@ static const struct usb_device_id edgeport_4port_id_table[] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BLACKBOX_IC135A) }, { } };
@@ -121,6 +122,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BLACKBOX_IC135A) }, { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0202) }, { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0203) }, { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0310) },
@@ -470,6 +472,7 @@ static void get_product_info(struct edgeport_serial *edge_serial)case ION_DEVICE_ID_EDGEPORT_2_DIN :case ION_DEVICE_ID_EDGEPORT_4_DIN :case ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU : +case ION_DEVICE_ID_BLACKBOX_IC135A : product_info->IsRS232 =1 ;break ;
drivers/usb/serial/io_usbvend.h +1 -0
@@ -211,6 +211,7 @@// // Definitions for other product IDs +#define ION_DEVICE_ID_BLACKBOX_IC135A 0x0801 // OEM device (rebranded Edgeport/4)#define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device#define ION_DEVICE_ID_E5805A 0x1A01 // OEM device (rebranded Edgeport/4)
drivers/usb/serial/option.c +4 -0
@@ -2441,6 +2441,9 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x30) }, /* MeiG Smart SRM815 and SRM825L */ { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x40) }, /* MeiG Smart SRM825L */ { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x60) }, /* MeiG Smart SRM825L */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d38, 0xff, 0xff, 0x30) }, /* MeiG Smart SRM825WN (Diag) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d38, 0xff, 0xff, 0x40) }, /* MeiG Smart SRM825WN (AT) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d38, 0xff, 0xff, 0x60) }, /* MeiG Smart SRM825WN (NMEA) */ { USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
@@ -2461,6 +2464,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0302, 0xff) }, /* Rolling RW101R-GL (laptop MBIM) */ { USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0802, 0xff), /* Rolling RW350-GL (laptop MBIM) */ .driver_info = RSVD(5) }, + { USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x1003, 0xff) }, /* Rolling RW135R-GL (laptop MBIM) */ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for Global */ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0x00, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0100, 0xff, 0xff, 0x40) },
drivers/vfio/device_cdev.c +7 -0
@@ -39,6 +39,13 @@ int vfio_device_fops_cdev_open(struct inode *inode, struct file *filep) filep->private_data = df; +/* +* Use the pseudo fs inode on the device to link all mmaps +* to the same address space, allowing us to unmap all vmas +* associated to this device using unmap_mapping_range(). +*/ + filep->f_mapping = device->inode->i_mapping; +return 0 ; err_put_registration:
drivers/vfio/group.c +7 -0
@@ -285,6 +285,13 @@ static struct file *vfio_device_open_file(struct vfio_device *device)*/ filep->f_mode |= (FMODE_PREAD |FMODE_PWRITE ); +/* +* Use the pseudo fs inode on the device to link all mmaps +* to the same address space, allowing us to unmap all vmas +* associated to this device using unmap_mapping_range(). +*/ + filep->f_mapping = device->inode->i_mapping; +if (device->group->type ==VFIO_NO_IOMMU )dev_warn (device->dev,"vfio-noiommu device opened by user " "(%s:%d)\n" , current->comm,task_pid_nr (current));
drivers/vfio/pci/vfio_pci_core.c +66 -205
371 lines not on this page · raw message
drivers/vfio/vfio_main.c +44 -0
44 lines not on this page · raw message
include/net/netfilter/nf_conntrack_expect.h +18 -2
Lines of this file are not shown. View the raw message.
net/atm/lec.c +47 -25
72 lines not on this page · raw message
net/netfilter/nf_conntrack_netlink.c +29 -58
87 lines not on this page · raw message
net/netfilter/nf_flow_table_offload.c +130 -66
196 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.