]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
7 weeks agospi: imx: Fix UAF on package-1 prepare failure in spi_imx_dma_data_prepare()
John Madieu [Fri, 1 May 2026 13:59:50 +0000 (13:59 +0000)] 
spi: imx: Fix UAF on package-1 prepare failure in spi_imx_dma_data_prepare()

When transfer->len exceeds MX51_ECSPI_CTRL_MAX_BURST and is not a
multiple of it, spi_imx_dma_data_prepare() splits the transfer into
two DMA packages. If preparing the second package fails:

ret = spi_imx_dma_tx_data_handle(spi_imx, &spi_imx->dma_data[1],
 transfer->tx_buf + spi_imx->dma_data[0].data_len,
 false);
if (ret) {
kfree(spi_imx->dma_data[0].dma_tx_buf);
kfree(spi_imx->dma_data[0].dma_rx_buf);
kfree(spi_imx->dma_data);
}
}

return 0;

the function frees the package-0 buffers and the dma_data array,
then falls through to `return 0`, telling the caller the prepare
succeeded. The caller then dereferences the freed dma_data array,
producing a use-after-free.

Return the error from the failure path so the caller takes its
existing failure branch.

Fixes: faa8e404ad8e ("spi: imx: support dynamic burst length for ECSPI DMA mode")
Signed-off-by: John Madieu <john.madieu@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260501135951.2416527-3-john.madieu@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: imx: Fix precedence bug in spi_imx_dma_max_wml_find()
John Madieu [Fri, 1 May 2026 13:59:49 +0000 (13:59 +0000)] 
spi: imx: Fix precedence bug in spi_imx_dma_max_wml_find()

The watermark search in spi_imx_dma_max_wml_find() reads:

if (!dma_data->dma_len % (i * bytes_per_word))
break;

The unary ! binds tighter than %, so this parses as:

if ((!dma_data->dma_len) % (i * bytes_per_word))
break;

!dma_data->dma_len is 0 or 1, and `0 % x == 0` for any x; `1 % x` is
0 unless x == 1. The condition is therefore false in every case
except dma_len != 0 with i * bytes_per_word == 1, i.e. i == 1 and
bytes_per_word == 1.

The loop almost always falls through to its end, leaving i == 0,
which the post-loop fallback rewrites to 1:

if (i == 0)
i = 1;

So spi_imx->wml ends up at 1 for essentially every DMA transfer,
defeating the entire purpose of the function. The DMA engine then
requests service after every single FIFO word instead of using
multi-word bursts, hurting throughput on every DMA-capable variant.

Add the missing parentheses so the modulo is computed first, then
negated:

if (!(dma_data->dma_len % (i * bytes_per_word)))
break;

Fixes: faa8e404ad8e ("spi: imx: support dynamic burst length for ECSPI DMA mode")
Signed-off-by: John Madieu <john.madieu@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260501135951.2416527-2-john.madieu@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: fsl_xcvr: Fix event generation for cached controls
Cássio Gabriel [Tue, 28 Apr 2026 03:07:08 +0000 (00:07 -0300)] 
ASoC: fsl_xcvr: Fix event generation for cached controls

ALSA controls should return 1 from a put callback when the control
value changes. fsl_xcvr_capds_put() and fsl_xcvr_tx_cs_put() both
update cached control data but always return 0, so ALSA suppresses
change notifications for the Capabilities Data Structure and playback
IEC958 channel status controls.

Compare the old and new cached values before copying the new data,
and return whether the control value changed.

Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260428-asoc-fsl-xcvr-event-generation-v1-1-f21cf0812c4f@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: spacemit: introduce SpacemiT K1 SPI controller driver
Alex Elder [Sun, 3 May 2026 01:30:52 +0000 (21:30 -0400)] 
spi: spacemit: introduce SpacemiT K1 SPI controller driver

This patch introduces the driver for the SPI controller found in the
SpacemiT K1 SoC.  Currently the driver supports master mode only.
The SPI hardware implements RX and TX FIFOs, 32 entries each, and
supports both PIO and DMA mode transfers.

Signed-off-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Link: https://patch.msgid.link/20260502-spi-spacemit-k1-v10-2-f412e1ae8a34@riscstar.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: dt-bindings: add SpacemiT K1 SPI support
Alex Elder [Sun, 3 May 2026 01:30:51 +0000 (21:30 -0400)] 
spi: dt-bindings: add SpacemiT K1 SPI support

Add support for the SPI controller implemented by the SpacemiT K1 SoC.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Link: https://patch.msgid.link/20260502-spi-spacemit-k1-v10-1-f412e1ae8a34@riscstar.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agomtd: spinand: Use secondary ops for continuous reads
Miquel Raynal [Wed, 29 Apr 2026 17:56:43 +0000 (19:56 +0200)] 
mtd: spinand: Use secondary ops for continuous reads

In case a chip supports continuous reads, but uses a slightly different
cache operation for these, it may provide a secondary operation template
which will be used only during continuous cache read operations.

From a vendor driver point of view, enabling this feature implies
providing a new set of templates for these continuous read
operations. The core will automatically pick the fastest variant,
depending on the hardware capabilities.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agospi: spi-qcom-qspi: Add interconnect support for memory path
Viken Dadhaniya [Wed, 29 Apr 2026 17:01:38 +0000 (22:31 +0530)] 
spi: spi-qcom-qspi: Add interconnect support for memory path

The QSPI controller has two interconnect paths:
1. qspi-config: CPU to QSPI controller for register access
2. qspi-memory: QSPI controller to memory for DMA operations

Currently, the driver only manages the qspi-config path. Add support for
the qspi-memory path to ensure proper bandwidth allocation for QSPI data
transfers to/from memory. Enable and disable both paths during runtime PM
transitions.

Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Link: https://patch.msgid.link/20260429-spi-nor-v5-3-993016c9711e@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: spi-qcom-qspi: Fix incomplete error handling in runtime PM
Viken Dadhaniya [Wed, 29 Apr 2026 17:01:37 +0000 (22:31 +0530)] 
spi: spi-qcom-qspi: Fix incomplete error handling in runtime PM

The runtime PM functions had incomplete error handling that could leave the
system in an inconsistent state. If any operation failed midway through
suspend or resume, some resources would be left in the wrong state while
others were already changed, leading to potential clock/power imbalances.

Reorder the suspend/resume sequences to avoid brownout risk by ensuring the
performance state is set appropriately before clocks are enabled and clocks
are disabled before dropping the performance state.

Fix by adding proper error checking for all operations and using goto-based
cleanup to ensure all successfully acquired resources are properly released
on any error.

Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Link: https://patch.msgid.link/20260429-spi-nor-v5-2-993016c9711e@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: dt-bindings: qcom,spi-qcom-qspi: Add qcom,qcs615-qspi compatible
Viken Dadhaniya [Wed, 29 Apr 2026 17:01:36 +0000 (22:31 +0530)] 
spi: dt-bindings: qcom,spi-qcom-qspi: Add qcom,qcs615-qspi compatible

Add support for the QSPI controller on QCS615 SoC.

Move allOf section after required properties and add if:then constraint
to require minimum 2 interconnects for qcs615 variant.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Link: https://patch.msgid.link/20260429-spi-nor-v5-1-993016c9711e@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoMerge tag 'mtd/spi-mem-cont-read-for-7.2' into nand/next
Miquel Raynal [Mon, 4 May 2026 13:14:36 +0000 (15:14 +0200)] 
Merge tag 'mtd/spi-mem-cont-read-for-7.2' into nand/next

Aside from preparation changes in the SPI NAND core, the changes carried
here focus on the shared spi-mem layer which is enhanced in order to
bring two new features:

- The possibility to fill a primary and a secondary operation template
  in the direct mapping structure in order to support continuous reads
  in SPI NAND, which may require two different read operations.

- SPI controllers may indicate possible CS instabilities over long
  transfers by setting a boolean. This capability is related to the
  previous one, the need for it has arised while testing SPI NAND
  continuous reads with the Cadence QSPI controller which cannot, under
  certain conditions, keep the CS asserted for the length of
  an eraseblock-large transfer.

7 weeks agospi: omap2-mcspi: switch to managed controller allocation
Mark Brown [Mon, 4 May 2026 13:12:02 +0000 (22:12 +0900)] 
spi: omap2-mcspi: switch to managed controller allocation

Johan Hovold <johan@kernel.org> says:

This series supersedes the omap2-mcspi patch in the managed controller
allocation series. [1]

Included are also two related cleanups.

[1] https://lore.kernel.org/lkml/20260429091333.165363-1-johan@kernel.org/

7 weeks agospi: omap2-mcspi: clean up probe return value
Johan Hovold [Thu, 30 Apr 2026 12:02:00 +0000 (14:02 +0200)] 
spi: omap2-mcspi: clean up probe return value

Return explicit zero on successful probe to clearly separate the success
and error paths and make the code more readable.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260430120200.249323-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: omap2-mcspi: clean up error labels
Johan Hovold [Thu, 30 Apr 2026 12:01:59 +0000 (14:01 +0200)] 
spi: omap2-mcspi: clean up error labels

Clean up the error labels by adding a common prefix and naming them
after what they do.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260430120200.249323-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: omap2-mcspi: switch to managed controller allocation
Johan Hovold [Thu, 30 Apr 2026 12:01:58 +0000 (14:01 +0200)] 
spi: omap2-mcspi: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260430120200.249323-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: orion: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:33 +0000 (11:13 +0200)] 
spi: orion: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-20-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: npcm-pspi: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:31 +0000 (11:13 +0200)] 
spi: npcm-pspi: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-18-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: mxs: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:30 +0000 (11:13 +0200)] 
spi: mxs: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-17-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: meson-spicc: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:29 +0000 (11:13 +0200)] 
spi: meson-spicc: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-16-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: lantiq-ssc: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:28 +0000 (11:13 +0200)] 
spi: lantiq-ssc: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-15-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: img-spfi: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:27 +0000 (11:13 +0200)] 
spi: img-spfi: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-14-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: fsl-espi: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:26 +0000 (11:13 +0200)] 
spi: fsl-espi: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-13-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: fsl: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:25 +0000 (11:13 +0200)] 
spi: fsl: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-12-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: ep93xx: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:24 +0000 (11:13 +0200)] 
spi: ep93xx: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-11-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: dln2: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:23 +0000 (11:13 +0200)] 
spi: dln2: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-10-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: coldfire-qspi: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:22 +0000 (11:13 +0200)] 
spi: coldfire-qspi: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-9-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: cavium-thunderx: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:21 +0000 (11:13 +0200)] 
spi: cavium-thunderx: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: octeon: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:20 +0000 (11:13 +0200)] 
spi: octeon: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-7-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: cadence: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:19 +0000 (11:13 +0200)] 
spi: cadence: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: bcm63xx-hsspi: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:18 +0000 (11:13 +0200)] 
spi: bcm63xx-hsspi: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: William Zhang <william.zhang@broadcom.com>
Link: https://patch.msgid.link/20260429091333.165363-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: bcm63xx: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:17 +0000 (11:13 +0200)] 
spi: bcm63xx: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: atmel: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:16 +0000 (11:13 +0200)] 
spi: atmel: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: at91-usart: switch to managed controller allocation
Johan Hovold [Wed, 29 Apr 2026 09:13:15 +0000 (11:13 +0200)] 
spi: at91-usart: switch to managed controller allocation

Switch to device managed controller allocation to simplify error
handling and to avoid having to take another reference during
deregistration.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429091333.165363-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: uniphier: Use guard() for spin locks
Mark Brown [Mon, 4 May 2026 13:08:23 +0000 (22:08 +0900)] 
ASoC: uniphier: Use guard() for spin locks

phucduc.bui@gmail.com <phucduc.bui@gmail.com> says:

This series converts spin lock handling in UniPhier AIO drivers
to use guard() helpers.
The changes are purely code cleanups with no functional impact.

7 weeks agoASoC: uniphier: aio-dma: Use guard() for spin locks
bui duc phuc [Wed, 29 Apr 2026 09:16:14 +0000 (16:16 +0700)] 
ASoC: uniphier: aio-dma: Use guard() for spin locks

Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260429091614.96667-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: uniphier: aio-compress: Use guard() for spin locks
bui duc phuc [Wed, 29 Apr 2026 09:16:13 +0000 (16:16 +0700)] 
ASoC: uniphier: aio-compress: Use guard() for spin locks

Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260429091614.96667-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: spi-mem: Add a no_cs_assertion capability
Miquel Raynal [Thu, 26 Mar 2026 16:47:15 +0000 (17:47 +0100)] 
spi: spi-mem: Add a no_cs_assertion capability

Some controllers are 'smart', and that's a problem.

For instance, the Cadence quadspi controller is capable of deasserting
the CS automatically whenever a too long period of time without any data
to transfer elapses.

This 'feature' combined with a loaded interconnect with arbitration, a
"long" transfer may be split into smaller DMA transfers. In this case
the controller may allow itself to deassert the CS between chunks.

Deasserting the CS stops any ongoing continuous read. Reasserting it
later to continue the reading will only result in the host getting
garbage.

In this case, the host controller driver has no control over the CS
state, so we cannot reliably enable continuous reads. Flag this
limitation through a spi-mem controller capability.

The inversion in the flag name (starting with 'no_') is voluntary, in
order to avoid the need to set this flag in all controller drivers. Only
the broken controllers shall set this bit, the default being that the
controller masters its CS fully.

Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agoASoC: tegra: Use guard() for mutex locks
bui duc phuc [Wed, 29 Apr 2026 10:27:43 +0000 (17:27 +0700)] 
ASoC: tegra: Use guard() for mutex locks

Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260429102743.103197-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: sdw_utils: avoid the SDCA companion function not supported failure
Derek Fang [Thu, 30 Apr 2026 12:10:43 +0000 (20:10 +0800)] 
ASoC: sdw_utils: avoid the SDCA companion function not supported failure

Treat the companion amp as generic AMP until full support for companion
amp is added.

Signed-off-by: Derek Fang <derek.fang@realtek.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260430121043.552241-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: amd: yc: Add HP OMEN Gaming Laptop 16-ap0xxx product line in quirk table
Tommaso Soncin [Wed, 29 Apr 2026 16:08:57 +0000 (18:08 +0200)] 
ASoC: amd: yc: Add HP OMEN Gaming Laptop 16-ap0xxx product line in quirk table

Add a DMI quirk for the HP OMEN Gaming Laptop 16-ap0xxx line fixing the
issue where the internal microphone was not detected.

Cc: stable@vger.kernel.org
Signed-off-by: Tommaso Soncin <soncintommaso@gmail.com>
Link: https://patch.msgid.link/20260429160858.538986-1-soncintommaso@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: cs35l56: Fix out-of-bounds in dev_err() in cs35l56_read_onchip_spkid()
Richard Fitzgerald [Thu, 30 Apr 2026 10:11:34 +0000 (11:11 +0100)] 
ASoC: cs35l56: Fix out-of-bounds in dev_err() in cs35l56_read_onchip_spkid()

Remove the incorrect use of onchip_spkid_gpios[i] in the dev_err() after
regmap_read() of CS35L56_GPIO_STATUS1 returns an error.

This dev_err() was incorrectly copy-pasted from one inside the for-loop,
where i was valid. The read of CS35L56_GPIO_STATUS1 isn't for a specific
GPIO register, so the use of onchip_spkid_gpios[i] in the error message is
both irrelevant and out-of-bounds here.

Fixes: 4d1e3e2c404d ("ASoC: cs35l56: Support for reading speaker ID from on-chip GPIOs")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260430101134.2655938-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: at91-usart: drop dead runtime pm support
Johan Hovold [Wed, 29 Apr 2026 09:20:05 +0000 (11:20 +0200)] 
spi: at91-usart: drop dead runtime pm support

Drop the dead runtime PM support which has never been enabled.

Fixes: 96ed3ecde2c0 ("spi: at91-usart: add power management support")
Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429092005.166128-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VE
Bob Song [Thu, 30 Apr 2026 01:49:20 +0000 (09:49 +0800)] 
ASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VE

The laptop requires a quirk ID to enable its internal microphone. Add
it to the DMI quirk table.

Reported-by: gannovera <gannovera@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218402
Signed-off-by: Bob Song <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260430014920.141276-1-songxiebing@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: cs35l56: Fix hibernate write in runtime resume error path
Richard Fitzgerald [Wed, 29 Apr 2026 10:53:15 +0000 (11:53 +0100)] 
ASoC: cs35l56: Fix hibernate write in runtime resume error path

The error path of cs35l56_runtime_resume_common() should only write
the hibernation sequence if can_hibernate is true.

Something has already gone badly wrong if we ever reach the error
path. But triggering hibernate on hardware that does not support it
is likely to make the situation unrecoverable without a full reboot
because there might not be any hardware signal to exit hibernate.

Fixes: a47cf4dac7dc ("ASoC: cs35l56: Change hibernate sequence to use allow auto hibernate")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260429105315.2438298-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: spacemit: fix RX DMA params not set when TX is running
Troy Mitchell [Wed, 29 Apr 2026 09:00:50 +0000 (17:00 +0800)] 
ASoC: spacemit: fix RX DMA params not set when TX is running

When TX is already running (SSCR_SSE is set), the hw_params callback
returns early before setting up DMA parameters for the RX stream. This
prevents the capture path from configuring its DMA data properly.

Move the SSCR_SSE check after DMA parameter setup and format
constraints, so both TX and RX streams get their DMA configuration
regardless of whether the hardware is already enabled. The early return
now only skips the register writes that would disrupt an active stream.

Fixes: fce217449075 ("ASoC: spacemit: add i2s support for K1 SoC")
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/20260429-k1-i2s-fix-v2-1-8d67835aaddc@linux.spacemit.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agodm vdo: use GFP_NOIO for blkdev_issue_zeroout on format path
Bruce Johnston [Tue, 28 Apr 2026 18:39:31 +0000 (14:39 -0400)] 
dm vdo: use GFP_NOIO for blkdev_issue_zeroout on format path

GFP_NOWAIT is inappropriate when blkdev_issue_zeroout may sleep and
bio_alloc can fail under pressure; use GFP_NOIO for clear_partition and
vdo_clear_layout zeroout calls.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: fc1d43826702 ("dm vdo: save the formatted metadata to disk")
7 weeks agoASoC: ux500: Use guard() for mutex locks
bui duc phuc [Wed, 29 Apr 2026 07:52:21 +0000 (14:52 +0700)] 
ASoC: ux500: Use guard() for mutex locks

Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260429075221.73989-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agospi: spi-mem: Create a secondary read operation
Miquel Raynal [Wed, 29 Apr 2026 17:56:42 +0000 (19:56 +0200)] 
spi: spi-mem: Create a secondary read operation

In some situations, direct mappings may need to use different
operation templates.

For instance, when enabling continuous reads, Winbond SPI NANDs no
longer expect address cycles because they would be ignoring them
otherwise. Hence, right after the command opcode, they start counting
dummy cycles, followed by the data cycles as usual.

This breaks the assumptions of "reads from cache" always being done
identically once the best variant has been picked up, across the
lifetime of the system.

In order to support this feature, we must give direct mapping more than
a single operation template to use, in order to switch to using
secondary operations upon request by the upper layer.

Create the concept of optional secondary operation template, which may
or may not be fulfilled by the SPI NAND and SPI NOR cores. If the
underlying SPI controller does not leverage any kind of direct mapping
acceleration, the feature has no impact and can be freely
used. Otherwise, the controller driver needs to opt-in for using this
feature, if supported.

The condition checked to know whether a secondary operation has been
provided or not is to look for a non zero opcode to limit the creation
of extra variables. In practice, the opcode 0x00 exist, but is not
related to any cache related operation.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agospi: spi-mem: Transform the read operation template
Miquel Raynal [Wed, 29 Apr 2026 17:56:41 +0000 (19:56 +0200)] 
spi: spi-mem: Transform the read operation template

As of now, we only use a single operation template when creating SPI
memory direct mappings. With the idea to extend this possibility to 2,
rename the template to reflect that we are currently setting the
"primary" operation, and create a pointer in the same structure to point
to it.

From a user point of view, the op_tmpl name remains but becomes a
pointer, leading to minor changes in both the SPI NAND and SPI NOR
cores.

There is no functional change.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agomtd: spinand: Drop ECC dirmaps
Miquel Raynal [Wed, 29 Apr 2026 17:56:40 +0000 (19:56 +0200)] 
mtd: spinand: Drop ECC dirmaps

Direct mappings are very static concepts, which allow us to reuse a
template to perform reads or writes in a very efficient manner after a
single initialization. With the introduction of pipelined ECC engines
for SPI controllers, the need to differentiate between an operation with
and without correction has arised. The chosen solution at that time has
been to create new direct mappings for these operations, jumping from 2
to 4 dirmaps per target. Enabling ECC was done by choosing the correct
dirmap.

Today, we need to further parametrize dirmaps. With the goal to enable
continuous reads on a wider range of devices, we will need more
flexibility regarding the read from cache operation template to pick at
run time, for instance to use shorter "continuous read from cache"
variants.

We could create other direct mappings, but it would increase the matrix
by a power of two, bringing the theoretical number of dirmaps to
8 (read/write, ecc, shorter read variants) per target. This grow is not
sustainable, so let's change how dirmaps work - a little bit.

Operations already carry an ECC parameter, use it to indicate whether
error correction is required or not. In practice this change happens
only at the core level, SPI controller drivers do not care about the
direct mapping structure in this case, they just pick whatever is in the
template as a base. As a result, we allow the core to dynamically change
the content of the templates.

He who can do more can do less, so during the checking steps, make sure
to enable the ECC requirement just for the time of the checks.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agomtd: spinand: Expose spinand_op_is_odtr()
Miquel Raynal [Wed, 29 Apr 2026 17:56:39 +0000 (19:56 +0200)] 
mtd: spinand: Expose spinand_op_is_odtr()

This helper is going to be needed in a vendor driver, so expose it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agomtd: spinand: Drop a too strong limitation
Miquel Raynal [Wed, 29 Apr 2026 17:56:38 +0000 (19:56 +0200)] 
mtd: spinand: Drop a too strong limitation

Since continuous reads may sometimes not be able to go past an erase
block boundary, it has been decided not to attempt longer reads and if
the user request is bigger, it will be split across eraseblocks.

As these request will anyway be handled correctly, there is no reason to
filter out cases where we would go over a target or a die, so drop this
limitation which had a side effect: any request to read more than the
content of an eraseblock would simply not benefit from the continuous
read feature.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
7 weeks agoASoC: tegra: ADMAIF: allocate with a single kzalloc
Rosen Penev [Sun, 3 May 2026 00:30:37 +0000 (17:30 -0700)] 
ASoC: tegra: ADMAIF: allocate with a single kzalloc

Consolidate the allocations for capture_dma_data and playback_dma_data
into a single kzalloc by using a flexible array member at the end of
the tegra_admaif struct. This reduces the number of allocations from
three to one, simplifies error handling, and improves memory locality.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260503003037.11942-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agodrm/fb-helper: Fix clipping when damage area spans a single scanline
Francesco Lavra [Tue, 10 Feb 2026 17:35:45 +0000 (18:35 +0100)] 
drm/fb-helper: Fix clipping when damage area spans a single scanline

When the damage area resulting from a dirty memory range spans a single
scanline, the width of the rectangle is calculated dynamically because it
may not coincide with the framebuffer width.
If the dirty range ends exactly at the end of the scanline, the `bit_end`
variable is incorrectly assigned a 0 value, which results in a bogus clip
rectangle where the x2 coordinate is 0. This prevents the dirty scanline
from being flushed to the hardware.
Change the calculation of the `bit_end` value to fix the x2 coordinate
value in the above edge case.

Fixes: ded74cafeea9 ("drm/fb-helper: Clip damage area horizontally")
Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260210173545.733937-1-flavra@baylibre.com
7 weeks agodrm/qxl: Fix missing KMS poll cleanup
Myeonghun Pak [Fri, 24 Apr 2026 11:25:18 +0000 (20:25 +0900)] 
drm/qxl: Fix missing KMS poll cleanup

drm_kms_helper_poll_init() initializes the output polling work and
enables polling for the DRM device. qxl enables polling before calling
drm_dev_register(), but the drm_dev_register() failure path tears down
the modeset and device state without disabling the polling helper.

The remove path also unregisters and shuts down the DRM device without
first disabling the polling helper. Add matching drm_kms_helper_poll_fini()
calls in both paths so the delayed polling work is cancelled before qxl
tears down the associated modeset/device state.

Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 5ff91e442652 ("qxl: use drm helper hotplug support")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260424112543.57819-1-mhun512@gmail.com
7 weeks agodm-ima: use active table's size if available
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:08 +0000 (16:21 -0400)] 
dm-ima: use active table's size if available

It is possible that the dm_ima_measure_on_* functions run at the same
time as a table is getting swapped, but before the md->ima.active_table
is updated by dm_ima_measure_on_device_resume(). Instead of using the
current device size, use the size of the active table that is being
measured (assuming there is one), so the information is consistent.
Also, don't allocate a separate string to hold the capactiy. Just
print it directly to the measurement buffer.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: Fail more gracefully in dm_ima_measure_on_*
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:07 +0000 (16:21 -0400)] 
dm-ima: Fail more gracefully in dm_ima_measure_on_*

In all the dm_ima_measure_on_* functions besides
dm_ima_measure_on_table_load(), even if measuring the event fails, it's
still possible to update dm->ima, so that it continues to correctly
track the device state. This means that one measurement failure won't
cause future measurements to record the wrong data.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: Handle race between rename and table swap
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:06 +0000 (16:21 -0400)] 
dm-ima: Handle race between rename and table swap

a device rename could happen after do_resume() removed the inactive
table that it was swapping to out of the hash cell, but before it was
made the active table. In this case, the table metadata would still
have the old name. Update the swapped table's metadata to avoid this.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: Fix issues with dm_ima_measure_on_device_rename
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:05 +0000 (16:21 -0400)] 
dm-ima: Fix issues with dm_ima_measure_on_device_rename

dm_ima_measure_on_device_rename() can be called on a device before it
ever loads a table, so it needs to handle the case where there is no
table metadata. Also, it was only updating the table_metadata on the
active table. If there was an inactive table when the device was renamed
and that table was later swapped in as the active table, it would
still have the old name. dm_ima_measure_on_device_rename() was also
needlessly allocating new memory for the updated table metadata, instead
of just reusing the existing memory.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: remove new_map from dm_ima_measure_on_device_clear
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:04 +0000 (16:21 -0400)] 
dm-ima: remove new_map from dm_ima_measure_on_device_clear

Now that two processes can't modify md->ima in
dm_ima_measure_on_device_clear() at the same time, there's no need to
track if an inactive table was actually removed. We might as well
clean it up unconditionally, on the off chance that a previous
ima measurement failed and left md->ima.inactive_table behind.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agoASoC: codecs: ab8500: Remove suspicious code
Uwe Kleine-König (The Capable Hub) [Thu, 30 Apr 2026 15:45:24 +0000 (17:45 +0200)] 
ASoC: codecs: ab8500: Remove suspicious code

anc_configure() passed values from drvdata->anc_fir_values[],
drvdata->anc_iir_values[] and drvdata->sid_fir_values[] as register
offset to snd_soc_component_read(). The content of these arrays are user
controllable via the component controls "ANC FIR Coefficients", "ANC
IIR Coefficients" and "Sidetone FIR Coefficients" which I assume are
supposed to hold register values, not register offsets.

Without a datasheet for that component and given that before commit
a201aef1a88b ("ASoC: codecs: ab8500: Fix casting of private data") the
arrays overlapped with driver control structures and thus didn't work
properly since 2012, drop that functionality and let someone repair it
who has an actual need for it.

With the core functionally removed several code parts become essentially
unused and are removed, too.

Reported-by: Sashiko (gemini/gemini-3.1-pro-preview)
Link: https://sashiko.dev/#/patchset/20260428192255.2294705-2-u.kleine-koenig%40baylibre.com
Fixes: 679d7abdc754 ("ASoC: codecs: Add AB8500 codec-driver")
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260430154524.338912-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agodm-ima: Fix UAF errors and measuring incorrect context
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:03 +0000 (16:21 -0400)] 
dm-ima: Fix UAF errors and measuring incorrect context

the dm-ima code did not keep the dm_ima_measure_on_* functions from
running at the same time. This could lead to various errors. If two
processes were updating the device state, one could update the state
first, but the other could measure the state first, causing the the
current device state to appear incorrect. If a table load happened while
a device was resuming, the IMA measurement could report the wrong table
being active. And if two dm_ima_measure_on_* functions ran at the same
time, one of them could free data that the other was accessing, causing
a crash.

All the core dm functions that call a dm_ima_measure_on_* function
update the device state they want to measure under the _hash_lock,
except for do_resume(). But holding the _hash_lock is not a good way to
synchronize these functions. It's a global mutex, that is needed in many
dm operations, and the dm_ima_measure_* functions can sleep, blocking
any dm operation on any device that needs the _hash_lock.

To serialize and order the IMA measurement functions, the
dm_ima_measurements now has two counters, update_idx and measure_idx.
update_idx is incremented while holding the _hash_lock and saved, along
with the device name and uuid, in a dm_ima_context struct. Once the
_hash_lock is dropped, the dm_ima_measure_* function is called. It waits
until measure_idx matches the saved value of update_idx, ensuring that
the updates and measurements happen in the same order if there are
multiple processes changing the device at the same time. Then it
measures the device, updates measure_idx, and wakes up any other
process waiting to do a measurement. This makes sure that the
measurements are serialized and done in the order that the _hash_lock
was acquired in. But they only block other measurements for the same
device, which are unlikely to happen at the same time.

do_resume() is trickier, because it removes the inactive table while
holding the _hash_lock, but doesn't hold it while updating md->map. To
make sure it is also ordered, the IMA code grabs the _hash_lock after
md->map is updated. Then it makes sure that the device isn't being
removed and that another do_resume() hasn't already changed the active
table again, and serializes like the other functions do.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: don't copy the active table to the inactive table
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:02 +0000 (16:21 -0400)] 
dm-ima: don't copy the active table to the inactive table

If an inactive table was cleared, dm_ima_measure_on_table_clear() was
copying the ima.active_table to ima.inactive_table. This is not what
device-mapper does, and it makes the IMA measurements show an inactive
table when there isn't one. Also, once this is removed, the code no
longer needs to keep checking if the active and the inactive table point
to the same memory.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: Remove status_flags from dm_ima_measure_on_table_load()
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:01 +0000 (16:21 -0400)] 
dm-ima: Remove status_flags from dm_ima_measure_on_table_load()

There is no status flag that is is used for STATUSTYPE_IMA type
status() calls, and STATUSTYPE_IMA itself is not a valid
status flag.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: remove broken last_target_measured logic
Benjamin Marzinski [Wed, 29 Apr 2026 20:21:00 +0000 (16:21 -0400)] 
dm-ima: remove broken last_target_measured logic

When it ran out of space for adding more targets to the ima_buf,
dm_ima_measure_on_table_load() would measure the dm device early, and
then add the rest of the targets and measure it again.
last_target_measured was intended to flag the last target measured so
that the device wouldn't get remeasured, if no new targets were added
after the early measurement. But the way to code works, the dm device
will never be measured early unless there is another target to add to
the ima_buf.  Instead, if there is only one more target to add, that
target was getting added to the ima_buf, but it wasn't getting
remeasured, because last_target_measured was set. Since
dm_ima_measure_on_table_load() only measures a device early when there
are more targets to add, the final measurement must always happen, and
last_target_measured is unneeded.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-ima: remove dm_ima_reset_data()
Benjamin Marzinski [Wed, 29 Apr 2026 20:20:59 +0000 (16:20 -0400)] 
dm-ima: remove dm_ima_reset_data()

There's no point in saving the string length of DM_IMA_VERSION_STR. It's
a constant, so the compiler will precompute it. dm_create() will already
zero out the rest of dm->ima.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm-raid: only requeue bios when dm is suspending
Benjamin Marzinski [Tue, 28 Apr 2026 23:20:10 +0000 (19:20 -0400)] 
dm-raid: only requeue bios when dm is suspending

returning DM_MAPIO_REQUEUE from the target map() function only requeues
the bio during noflush suspends. During regular operations or during
flushing suspends, it fails the bio. Failing the bio during flushing
suspends is the correct behavior here. We cannot handle the bio, and we
cannot suspends while it is outstanding. But during normal operations,
we should not push the bio back to dm. Instead, wait for the reshape
to be resumed.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodm vdo: use get_random_u32() where appropriate
David Carlier [Sun, 5 Apr 2026 15:47:13 +0000 (16:47 +0100)] 
dm vdo: use get_random_u32() where appropriate

Use the typed random integer helpers instead of
get_random_bytes() when filling a single integer variable.
The helpers return the value directly, require no pointer
or size argument, and better express intent.

Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
7 weeks agodrm/sysfb: vesadrm: Support power management
Thomas Zimmermann [Wed, 8 Apr 2026 12:03:18 +0000 (14:03 +0200)] 
drm/sysfb: vesadrm: Support power management

Set PM ops for the vesadrm driver. Suspend and resume the DRM state
on systems that support it.

Many systems lose the hardware's framebuffer settings on suspend,
hence resuming doesn't work there. Yet some systems, most notably
emulators, keep the hardware state across suspend/resume cycles.
There, DRM's suspend and resume helpers bring back the display on
resume.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260408120722.328769-6-tzimmermann@suse.de
7 weeks agodrm/sysfb: simpledrm: Support power management
Thomas Zimmermann [Wed, 8 Apr 2026 12:03:17 +0000 (14:03 +0200)] 
drm/sysfb: simpledrm: Support power management

Set PM ops for the simpledrm driver. Suspend and resume the DRM
state on systems that support it.

Many systems lose the hardware's framebuffer settings on suspend,
hence resuming doesn't work there. Yet some systems, most notably
emulators, keep the hardware state across suspend/resume cycles.
There, DRM's suspend and resume helpers bring back the display on
resume.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260408120722.328769-5-tzimmermann@suse.de
7 weeks agodrm/sysfb: ofdrm: Support power management
Thomas Zimmermann [Wed, 8 Apr 2026 12:03:16 +0000 (14:03 +0200)] 
drm/sysfb: ofdrm: Support power management

Set PM ops for the ofdrm driver. Suspend and resume the DRM state
on systems that support it.

Many systems lose the hardware's framebuffer settings on suspend,
hence resuming doesn't work there. Yet some systems, most notably
emulators, keep the hardware state across suspend/resume cycles.
There, DRM's suspend and resume helpers bring back the display on
resume.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260408120722.328769-4-tzimmermann@suse.de
7 weeks agodrm/sysfb: efidrm: Support power management
Thomas Zimmermann [Wed, 8 Apr 2026 12:03:15 +0000 (14:03 +0200)] 
drm/sysfb: efidrm: Support power management

Set PM ops for the efidrm driver. Suspend and resume the DRM state
on systems that support it.

Many systems lose the hardware's framebuffer settings on suspend,
hence resuming doesn't work there. Yet some systems, most notably
emulators, keep the hardware state across suspend/resume cycles.
There, DRM's suspend and resume helpers bring back the display on
resume.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260408120722.328769-3-tzimmermann@suse.de
7 weeks agodrm/sysfb: corebootdrm: Support power management
Thomas Zimmermann [Wed, 8 Apr 2026 12:03:14 +0000 (14:03 +0200)] 
drm/sysfb: corebootdrm: Support power management

Set PM ops for the corebootdrm driver. Suspend and resume the DRM
state on systems that support it.

Many systems lose the hardware's framebuffer settings on suspend,
hence resuming doesn't work there. Yet some systems, most notably
emulators, keep the hardware state across suspend/resume cycles.
There, DRM's suspend and resume helpers bring back the display on
resume.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260408120722.328769-2-tzimmermann@suse.de
7 weeks agodrm/crc: Fix typo in doc for drm_crtc_crc
Eduardo Vasconcelos [Fri, 24 Apr 2026 18:36:29 +0000 (15:36 -0300)] 
drm/crc: Fix typo in doc for drm_crtc_crc

Fix a typo in the documentation for struct drm_crtc_crc
("occured." -> "occurred").

Signed-off-by: Eduardo Vasconcelos <eduardo@eduardovasconcelos.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260424183630.3764-1-eduardo@eduardovasconcelos.com
7 weeks agox86/boot: Get rid of kstrtoull()
Borislav Petkov (AMD) [Mon, 4 May 2026 12:26:13 +0000 (14:26 +0200)] 
x86/boot: Get rid of kstrtoull()

Fold the '+' check in the single-underscore-prefixed version
_kstrtoull() and remove the function. The arch/x86/boot/ namespace
prefixes everything copied from kernel proper with "boot_" so that
namespace clashes can be avoided.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
7 weeks agox86/boot/compressed: Use boot_kstrtoul() for hugepages= parsing
Thorsten Blum [Thu, 9 Apr 2026 16:15:59 +0000 (18:15 +0200)] 
x86/boot/compressed: Use boot_kstrtoul() for hugepages= parsing

Replace simple_strtoull() with boot_kstrtoul() for parsing the hugepages= boot
parameter.

Unlike simple_strtoull(), boot_kstrtoul() performs strict validation and
returns an error on invalid inputs instead of silently accepting partial
input. Use boot_kstrtoul() to reject and warn about invalid hugepages= values.

boot_kstrtoul() also converts the input directly to an unsigned long and
avoids implicit casting as max_gb_huge_pages *is* an unsigned long.

  [ bp: Massage commit message. ]

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260409161600.152012-2-thorsten.blum@linux.dev
7 weeks agoMerge tag 'clk-renesas-rzg3e-plldsi-tag' into renesas-clk-for-v7.2
Geert Uytterhoeven [Mon, 4 May 2026 12:09:33 +0000 (14:09 +0200)] 
Merge tag 'clk-renesas-rzg3e-plldsi-tag' into renesas-clk-for-v7.2

clk: renesas: rzg3e: Add support for DSI clocks

RZ/G3E Clock Pulse Generator PLLDSI limits, shared by clock and MIPI DSI
driver source files.

7 weeks agoclk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resets
Tommaso Merciai [Wed, 8 Apr 2026 10:36:53 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add support for LCDC{0,1} clocks and resets

Add LCDC{0,1} clocks and resets entries to the r9a09g047 CPG driver.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/c1b5afcef8068d4d074aff97e30b4d64b7c38eaf.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: r9a09g047: Add support for DSI clocks and resets
Tommaso Merciai [Wed, 8 Apr 2026 10:36:52 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add support for DSI clocks and resets

Add definitions for DSI clocks and resets on the R9A09G047 cpg driver
to enable proper initialization and control of the DSI hardware.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/21ac6da825e8fad0b0a9d37d6daa955b0d23ce07.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK
Tommaso Merciai [Wed, 8 Apr 2026 10:36:51 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK

Add support for the SMUX2_DSI0_CLK and SMUX2_DSI1_CLK clock muxes
present on the r9a09g047 SoC.

These muxes select between CDIV7_DSI{0,1}_CLK and CSDIV_2to16_PLLDSI{0,1}
using the CPG_SSEL3 register (SELCTL0 and SELCTL1 bits).

According to the hardware manual, when LVDS0 or LVDS1 outputs are used,
SELCTL0 or SELCTL1 must be set accordingly.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/9595f56ce8ab120477bfc11eaafb0f2b655d049a.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks
Tommaso Merciai [Wed, 8 Apr 2026 10:36:50 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks

Add the CLK_PLLDSI0_CSDIV and CLK_PLLDSI1_CSDIV fixed-factor clocks to
the r9a09g047 SoC clock driver.

These clocks are required to enable DSI and RGB output support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/4d5b4ddad89770447b3818381d5353f5065b72b5.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocks
Tommaso Merciai [Wed, 8 Apr 2026 10:36:49 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocks

Add the CLK_PLLDSI0_DIV7 and CLK_PLLDSI1_DIV7 fixed-factor clocks to
the r9a09g047 SoC clock driver.

These clocks are required to enable LVDS0 and LVDS1 output support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/e50c1721e1dc160e8b4518e8c5172f10cba4b58b.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks
Tommaso Merciai [Wed, 8 Apr 2026 10:36:48 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks

Add support for the PLLDSI{0,1} clocks in the r9a09g047 CPG driver.

Introduce CLK_PLLDSI{0,1} also, introduce the
rzg3e_cpg_pll_dsi{0,1}_limits structures to describe the frequency
constraints specific to the RZ/G3E SoC.

On Renesas RZ/G3E:

 - PLLDSI0 maximum output frequency: 1218 MHz
 - PLLDSI1 maximum output frequency: 609 MHz

These limits are enforced through the newly added
RZG3E_CPG_PLL_DSI{0,1}_LIMITS().

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/d26ec5349b0eb7ddb7d244fc53d1111a8530328f.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support
Tommaso Merciai [Wed, 8 Apr 2026 10:36:47 +0000 (12:36 +0200)] 
clk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support

Add CLK_PLLETH_LPCLK clock support.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/dcb0cab96e2ff3e23eafac061b2952c74622d1f8.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agoclk: renesas: rzv2h: Add PLLDSI clk mux support
Tommaso Merciai [Wed, 8 Apr 2026 10:36:46 +0000 (12:36 +0200)] 
clk: renesas: rzv2h: Add PLLDSI clk mux support

Add PLLDSI clk mux support to select PLLDSI clock from different clock
sources.

Introduce the DEF_PLLDSI_SMUX() macro to define these muxes and register
them in the clock driver.

Extend the determine_rate callback to calculate and propagate PLL
parameters via rzv2h_get_pll_dtable_pars() when LVDS output is selected,
using a new helper function rzv2h_cpg_plldsi_smux_lvds_determine_rate().

The CLK_SMUX2_DSI{0,1}_CLK clock multiplexers select between two paths
with different duty cycles:

- CDIV7_DSIx_CLK (LVDS path, parent index 0): asymmetric H/L=4/3 duty (4/7)
- CSDIV_DSIx (DSI/RGB path, parent index 1): symmetric 50% duty (1/2)

Implement rzv2h_cpg_plldsi_smux_{get,set}_duty_cycle clock operations to
allow the DRM driver to query and configure the appropriate clock path
based on the required output duty cycle.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/24d3853ca2522df21e6a071a23e23ba4ca4b7276.1775636898.git.tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
7 weeks agodrm/vmwgfx: Convert to DRM vblank timers
Thomas Zimmermann [Mon, 27 Apr 2026 15:00:40 +0000 (17:00 +0200)] 
drm/vmwgfx: Convert to DRM vblank timers

Replace vmwgfx's vblank timer with DRM's common implementation. The
timer handling is almost identical with a few additional bug fixes in
the common code.

Replace most of vmwgfx's vmw_vkms_get_vblank_timestamp() with the
shared helper drm_crtc_vblank_get_vblank_timeout(). The common helper
also works in the presence of delayed vblank timeouts that modify the
vblank counter concurrently.

Set the timeout handler to vmw_vkms_handle_vblank_timeout(). In addition
to handling vblank events, this function also controls CRC generation.

Remove all the hrtimer-related code from vmwgfx. DRM vblank timers
provides this.

v2:
- only cancel vblank timer in CRTC cleanup if vkms_enabled (Zack)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260427150250.699768-4-tzimmermann@suse.de
7 weeks agodrm/vmwgfx: Move vblank handling into separate helper
Thomas Zimmermann [Mon, 27 Apr 2026 15:00:39 +0000 (17:00 +0200)] 
drm/vmwgfx: Move vblank handling into separate helper

Decouple vblank handling from the underlying hrtimer. This will be
helpful for replacing vmwgfx's vblank timer with DRM's common
implementation.

The new helper vmw_vkms_handle_vblank_timeout() can later be used as
callback for DRM's handle_vblank call as-is. The helper also keeps the
current semantics for restarting the timer. It returns true to restart
the next vblank timeout even if it could not acquire vmwgfx's vblank
lock.

The remaining code in vmw_vkms_vblank_simulate() will be replaced by
the DRM implementation in a later patch.

v2:
- clarify return-value semantics in commit message (Zack)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260427150250.699768-3-tzimmermann@suse.de
7 weeks agodrm/vmwgfx: Determine lock-waiting timeout from vblank state
Thomas Zimmermann [Mon, 27 Apr 2026 15:00:38 +0000 (17:00 +0200)] 
drm/vmwgfx: Determine lock-waiting timeout from vblank state

Use the calculated duration of a frame as stored in the vblank state
for the lock-waiting timeout. Decouples the waiting from the details
of the vblank implementation. Both values should be equal.

This will be helpful for replacing vmwgfx's vblank timer with DRM's
common implementation.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260427150250.699768-2-tzimmermann@suse.de
7 weeks agogfs2: fix use-after-free in gfs2_qd_dealloc
Tristan Madani [Fri, 1 May 2026 11:02:03 +0000 (11:02 +0000)] 
gfs2: fix use-after-free in gfs2_qd_dealloc

gfs2_qd_dealloc(), called as an RCU callback from gfs2_qd_dispose(),
accesses the superblock object sdp through qd->qd_sbd after freeing qd.
It does so to decrement sd_quota_count and wake up sd_kill_wait.

However, by the time the RCU callback runs, gfs2_put_super() may have
already freed sdp via free_sbd().  This can happen when
gfs2_quota_cleanup() is called during unmount: it disposes of quota
objects via call_rcu() and then waits on sd_kill_wait with a 60-second
timeout.  If the timeout expires, or if gfs2_gl_hash_clear() triggers
additional qd_put() calls that schedule more RCU callbacks after the
wait completes, gfs2_put_super() will proceed to free the superblock
while RCU callbacks referencing it are still pending.

Add an rcu_barrier() before free_sbd() in gfs2_put_super() to ensure
all pending RCU callbacks (including gfs2_qd_dealloc) have completed
before the superblock is freed.

Fixes: a475c5dd16e5 ("gfs2: Free quota data objects synchronously")
Reported-by: syzbot+42a37bf8045847d8f9d2@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=42a37bf8045847d8f9d2
Tested-by: syzbot+42a37bf8045847d8f9d2@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
7 weeks agodrm: verisilicon: fill plane's vs_format in atomic_check
Icenowy Zheng [Tue, 31 Mar 2026 06:01:26 +0000 (14:01 +0800)] 
drm: verisilicon: fill plane's vs_format in atomic_check

Move the conversion from drm_format to vs_format to atomic_check, which
is before the point of no return and can properly bail out.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260331060126.1291966-5-zhengxingda@iscas.ac.cn
7 weeks agodrm: verisilicon: call atomic helper's plane state check even if no CRTC
Icenowy Zheng [Tue, 31 Mar 2026 06:01:25 +0000 (14:01 +0800)] 
drm: verisilicon: call atomic helper's plane state check even if no CRTC

The `drm_atomic_helper_check_plane_state()` helper function needs to be
called even if the plane is bound to no CRTCs.

Remove the early return in the primary plane's atomic_check, and use
NULL for crtc_state in this situation.

Fixes: dbf21777caa8 ("drm: verisilicon: add a driver for Verisilicon display controllers")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260331060126.1291966-4-zhengxingda@iscas.ac.cn
7 weeks agodrm: verisilicon: subclass drm_plane_state
Icenowy Zheng [Tue, 31 Mar 2026 06:01:24 +0000 (14:01 +0800)] 
drm: verisilicon: subclass drm_plane_state

Create a subclass of drm_plane_state to store hardware-specific state
information (e.g. hardware plane format settings) in the future.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260331060126.1291966-3-zhengxingda@iscas.ac.cn
7 weeks agodrm: verisilicon: make vs_format conversion function return int
Icenowy Zheng [Tue, 31 Mar 2026 06:01:23 +0000 (14:01 +0800)] 
drm: verisilicon: make vs_format conversion function return int

This is for further proper invalid drm_format handling before committing
the plane state change.

The return value is not yet checked yet, and will be checked in
atomic_check in the future.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260331060126.1291966-2-zhengxingda@iscas.ac.cn
7 weeks agofpga-mgr: Add Efinix SPI programming driver
Ian Dannapel [Thu, 16 Apr 2026 14:42:36 +0000 (16:42 +0200)] 
fpga-mgr: Add Efinix SPI programming driver

Add a new driver for loading binary firmware to configuration
RAM using "SPI passive mode" on Efinix FPGAs.

Efinix passive SPI configuration requires chip select to remain asserted
from reset until the complete bitstream and trailing idle clocks have
been transferred, so the driver keeps CS active with cs_change and locks
the SPI bus for the duration of configuration.

Signed-off-by: Ian Dannapel <iansdannapel@gmail.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20260416144237.373852-4-iansdannapel@gmail.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
7 weeks agodt-bindings: fpga: Add Efinix SPI programming bindings
Ian Dannapel [Thu, 16 Apr 2026 14:42:35 +0000 (16:42 +0200)] 
dt-bindings: fpga: Add Efinix SPI programming bindings

Add device tree bindings documentation for configuring Efinix FPGA
using serial SPI passive programming mode.

Signed-off-by: Ian Dannapel <iansdannapel@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20260416144237.373852-3-iansdannapel@gmail.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
7 weeks agodt-bindings: vendor-prefix: Add prefix for Efinix, Inc.
Ian Dannapel [Thu, 16 Apr 2026 14:42:34 +0000 (16:42 +0200)] 
dt-bindings: vendor-prefix: Add prefix for Efinix, Inc.

Add entry for Efinix, Inc. (https://www.efinixinc.com/)

Signed-off-by: Ian Dannapel <iansdannapel@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Alexander Dahl <ada@thorsis.com>
Link: https://lore.kernel.org/r/20260416144237.373852-2-iansdannapel@gmail.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
7 weeks agoALSA: jack: use scnprintf to improve parse_mask_bits
Thorsten Blum [Sun, 3 May 2026 10:11:02 +0000 (12:11 +0200)] 
ALSA: jack: use scnprintf to improve parse_mask_bits

Use the return value of scnprintf() to keep track of the current string
length and also replace strlcat() with scnprintf(). Return the string
length directly instead of calling strlen(buf).

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260503101102.298782-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agofpga: ts73xx-fpga: add OF match table for device tree probing
Phil Pemberton [Thu, 9 Apr 2026 12:20:16 +0000 (13:20 +0100)] 
fpga: ts73xx-fpga: add OF match table for device tree probing

The ts73xx-fpga driver currently only matches by platform device name,
which prevents it from being probed when the device is described in a
device tree. Add an of_device_id table so the driver can match against
the "technologic,ts7300-fpga" compatible string.

The TS-7350 and TS-7390 use different FPGAs with a different programming
interface, so while the driver is named "ts73xx-fpga", it doesn't apply
to them.

Signed-off-by: Phil Pemberton <philpem@philpem.me.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20260409122016.3940462-3-philpem@philpem.me.uk
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
7 weeks agodt-bindings: fpga: Add Technologic Systems TS-7300 FPGA Manager
Phil Pemberton [Thu, 9 Apr 2026 12:20:15 +0000 (13:20 +0100)] 
dt-bindings: fpga: Add Technologic Systems TS-7300 FPGA Manager

Add device tree binding documentation for the Altera Cyclone II FPGA
found on Technologic Systems (now EmbeddedTS) TS-7300 boards, programmed
via the memory-mapped interface in the CPLD.

Signed-off-by: Phil Pemberton <philpem@philpem.me.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260409122016.3940462-2-philpem@philpem.me.uk
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
7 weeks agofpga: region: fix use-after-free in child_regions_with_firmware()
Wentao Liang [Wed, 8 Apr 2026 15:45:34 +0000 (15:45 +0000)] 
fpga: region: fix use-after-free in child_regions_with_firmware()

Move of_node_put(child_region) after the error print to avoid accessing
freed memory when pr_err() references child_region.

Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
[ Yilun: Fix the Fixes tag ]
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20260408154534.404327-1-vulab@iscas.ac.cn
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
7 weeks agoALSA: pcmtest: Return -EFAULT on pattern read copy failure
Cássio Gabriel [Fri, 1 May 2026 17:45:14 +0000 (14:45 -0300)] 
ALSA: pcmtest: Return -EFAULT on pattern read copy failure

pattern_write() reports -EFAULT when copy_from_user() fails, but
pattern_read() converts copy_to_user() failures into a zero-length read.
That makes a userspace buffer fault look like EOF instead of reporting the
actual error.

Return -EFAULT from pattern_read() when copying the pattern data to
userspace fails, and update the file offset only after a successful copy.

Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260501-alsa-pcmtest-pattern-read-efault-v1-1-53e1e8c11dda@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>