From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571AE2DE702; Sat, 12 Sep 2026 13:35:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789220115; cv=none; b=m6UM7AEJeDmV+5+OLfc2Tyyv4IwLE7aSdV8w0Zd3U+sKO4HqEvKzR9qXCED+hV0s48Nd09gHyBKkbKK/PdhUkP5EH6uHeeINc59BQqvQe5vQ+vf+CuivrmSCSc++PtcMYdIxtS5aNx5CzPKayFDO5Dx/of3tGQNfGAjvISUxJ9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789220115; c=relaxed/simple; bh=KlX+4vS8pbGZhdeweAN+zajNaSfCMSuKxWFsAELTQOc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CpEYuCtaMoY8pMqldXNpBx3O7cCjr5UKh6W1OG8vqz4BRH/6VMY5dgld/M5HfmhBWZ97ITE5Trl7LH/csYamAeQ2Ot71EV/QULBxaq8VMj/3XMiDWMag8ItU1pJF74cc0sqIfo4lep6KUugi/IC7cVP7gj4dVa5bwgLroUFWLxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fPmoGpS1; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fPmoGpS1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7F841F00893; Sat, 12 Sep 2026 13:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789220113; bh=gVYGk1OnTzbD/bHyyLuOSSdeMPm10DLEcJL0kcJ/ZIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fPmoGpS1ntpg4ge0JqJYrDpeRnl8B/GCkLiAiYVwJfchIyuHG/CdAyoSR5HZk4QWq uTDwi6sdISldXrRw0vqy2eM6584zGCaNcylx3BI3QwcJFrHwnrI7V0IocuZG8vNHuZ mM6+99Rz5qh3tI5vKJccg0cqzOkjiBe9R2zxyyl0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Merlijn Wajer , Ivaylo Dimitrov , Sebastian Reichel Subject: [PATCH 6.6 0109/1424] hsi: omap_ssi_core: fix missing DMA mask setup for SSI controller device Date: Sat, 12 Sep 2026 08:42:21 +0200 Message-ID: <20260912065609.748232168@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ivaylo Dimitrov commit e81250ec6b69248b00d38c523dc6a13efaf38aab upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/hsi/controllers/omap_ssi_core.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -511,6 +511,12 @@ static int ssi_probe(struct platform_dev 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;