From 760318e2e69857214314e94ac477219f0c89106b Mon Sep 17 00:00:00 2001 From: Pengpeng Hou Date: Tue, 16 Jun 2026 08:43:48 +0800 Subject: [PATCH 1/4] hsi: omap_ssi: remove debugfs on port creation failure ssi_probe() creates the controller debugfs tree before creating the SSI port child devices. If a port device cannot be created, the error path removes any children and tears down the controller, but leaves the debugfs tree behind. Remove the controller debugfs tree on the port creation failure path, matching the normal remove path. Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260616004348.97684-1-pengpeng@iscas.ac.cn Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index eeacc427fd65..d9be0c3ea351 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -529,6 +529,9 @@ static int ssi_probe(struct platform_device *pd) return err; out3: device_for_each_child(&pd->dev, NULL, ssi_remove_ports); +#ifdef CONFIG_DEBUG_FS + ssi_debug_remove_ctrl(ssi); +#endif out2: ssi_remove_controller(ssi); pm_runtime_disable(&pd->dev); From 7c5c46b52f05e87ef2e0984bcb377c20b2ab4e4b Mon Sep 17 00:00:00 2001 From: Pan Chuang Date: Mon, 13 Jul 2026 21:27:38 +0800 Subject: [PATCH 2/4] HSI: nokia-modem: Remove redundant dev_err() Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_irq() automatically logs detailed error messages on failure. Remove the now-redundant driver-specific dev_err() calls. Signed-off-by: Pan Chuang Link: https://patch.msgid.link/20260713132747.394970-2-panchuang@vivo.com Signed-off-by: Sebastian Reichel --- drivers/hsi/clients/nokia-modem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c index 97ba59e60663..88924d757616 100644 --- a/drivers/hsi/clients/nokia-modem.c +++ b/drivers/hsi/clients/nokia-modem.c @@ -157,11 +157,8 @@ static int nokia_modem_probe(struct device *dev) do_nokia_modem_rst_ind_tasklet, (unsigned long)modem); err = devm_request_irq(dev, irq, nokia_modem_rst_ind_isr, pflags, "modem_rst_ind", modem); - if (err < 0) { - dev_err(dev, "Request rst_ind irq(%d) failed (flags %d)\n", - irq, pflags); + if (err < 0) return err; - } enable_irq_wake(irq); if (pm) { From 659287caa77a73873ecd71f27b5f3d967a85fd3f Mon Sep 17 00:00:00 2001 From: Pan Chuang Date: Mon, 13 Jul 2026 21:27:39 +0800 Subject: [PATCH 3/4] HSI: omap_ssi: Remove redundant dev_err() Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_irq() and devm_request_threaded_irq() automatically log detailed error messages on failure. Remove the now-redundant driver-specific dev_err() calls. Signed-off-by: Pan Chuang Link: https://patch.msgid.link/20260713132747.394970-3-panchuang@vivo.com Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi_core.c | 5 +---- drivers/hsi/controllers/omap_ssi_port.c | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index d9be0c3ea351..138c703495c9 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -370,11 +370,8 @@ static int ssi_add_controller(struct hsi_controller *ssi, (unsigned long)ssi); err = devm_request_irq(&ssi->device, omap_ssi->gdd_irq, ssi_gdd_isr, 0, "gdd_mpu", ssi); - if (err < 0) { - dev_err(&ssi->device, "Request GDD IRQ %d failed (%d)", - omap_ssi->gdd_irq, err); + if (err < 0) goto out_err; - } omap_ssi->port = devm_kcalloc(&ssi->device, ssi->num_ports, sizeof(*omap_ssi->port), GFP_KERNEL); diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 99904312879b..155b4f04bbca 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -1025,9 +1025,6 @@ static int ssi_port_irq(struct hsi_port *port, struct platform_device *pd) omap_port->irq = err; err = devm_request_threaded_irq(&port->device, omap_port->irq, NULL, ssi_pio_thread, IRQF_ONESHOT, "SSI PORT", port); - if (err < 0) - dev_err(&port->device, "Request IRQ %d failed (%d)\n", - omap_port->irq, err); return err; } @@ -1049,9 +1046,6 @@ static int ssi_wake_irq(struct hsi_port *port, struct platform_device *pd) ssi_wake_thread, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "SSI cawake", port); - if (err < 0) - dev_err(&port->device, "Request Wake in IRQ %d failed %d\n", - cawake_irq, err); err = enable_irq_wake(cawake_irq); if (err < 0) dev_err(&port->device, "Enable wake on the wakeline in irq %d failed %d\n", From e81250ec6b69248b00d38c523dc6a13efaf38aab Mon Sep 17 00:00:00 2001 From: Ivaylo Dimitrov Date: Fri, 24 Jul 2026 16:05:22 +0300 Subject: [PATCH 4/4] hsi: omap_ssi_core: fix missing DMA mask setup for SSI controller device The OMAP SSI driver uses a synthetic HSI controller device allocated via hsi_alloc_controller(), which does not go through the normal OF/platform device initialization path. As a result, the embedded struct device does not have a DMA mask initialized by default. After recent DMA API hardening changes, dma_map_sg() and related helpers now require a valid dma_mask to be present, otherwise the driver may crash or trigger warnings when attempting DMA mapping operations. Fix this by explicitly initializing the DMA mask for the SSI controller device and setting a 32-bit DMA mask, which matches the hardware capabilities. Cc: stable@vger.kernel.org Fixes: f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference") Reported-by: Merlijn Wajer Closes: https://lore.kernel.org/linux-omap/4ed95c71-2066-6b4c-ad1b-53ef02d79d53@wizzup.org/ Signed-off-by: Ivaylo Dimitrov Link: https://patch.msgid.link/20260724130522.706480-1-ivo.g.dimitrov.75@gmail.com Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index 138c703495c9..0f5a6f7522ad 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -499,6 +499,12 @@ static int ssi_probe(struct platform_device *pd) pm_runtime_enable(&pd->dev); + ssi->device.dma_mask = &ssi->device.coherent_dma_mask; + + err = dma_set_mask_and_coherent(&ssi->device, DMA_BIT_MASK(32)); + if (err) + goto out2; + err = ssi_hw_init(ssi); if (err < 0) goto out2;