From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 93EB634F250; Wed, 3 Dec 2025 16:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764778480; cv=none; b=u3nv83QnHUwyNPua+K1XMK+C6ezmifmaZ1V6P1EE+jjXqNPNzrpLJjDt1S9YV1JJ4Dp7J+M7FUq4cpPXxR5XZW3IGTrFQFwRffkCZFObPlpFOxWzrTQIbu8uO0DfnNE0nW4749DKir4HHvbHBXcehEEGOlOShLnBnGMQZFqFBvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764778480; c=relaxed/simple; bh=jzq1xZGL3ArOT0YHPQRMh1dPwlPMIN0DlV/hd8gST4s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uiHRXn5NffhvJ2Y8vvq9kriG2Pc4kOuwmVN1Dfl0L/8NR/Wkit46/pSWb6JKulBD6X0Qo0lLHIvntNrqoDooY6sRDpVmyO+G27aev/8waGgdg8VyH2xgaZiUZe4p8tsBeaF4DSIHinQafZK+7sQsdy56tuA8QFs49UXX8MbqK54= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rTNt0tpT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rTNt0tpT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 015B9C4CEF5; Wed, 3 Dec 2025 16:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764778480; bh=jzq1xZGL3ArOT0YHPQRMh1dPwlPMIN0DlV/hd8gST4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rTNt0tpTyXkfOV7ZLnqPpz6QabhObSmizJ9PI+/Z05II8xeE/LMWFifwWErMOk8C2 mu82rBlf+kYBhazDlT9MdmuAcOtEk/PL3ZmCOzLeRNFjsk6CYnN8MHZi3E7VV08qGM 8LSVYq8dEPyA305fAgIf00g3ItnDtkKE/OC2MDoQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Jamie Iles , Punit Agrawal , Thinh Nguyen Subject: [PATCH 5.15 359/392] drivers/usb/dwc3: fix PCI parent check Date: Wed, 3 Dec 2025 16:28:29 +0100 Message-ID: <20251203152427.375681842@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203152414.082328008@linuxfoundation.org> References: <20251203152414.082328008@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jamie Iles commit 40f8d17eed7533ed2bbb5e3cc680049b19411b2e upstream. The sysdev_is_parent check was being used to infer PCI devices that have the DMA mask set from the PCI capabilities, but sysdev_is_parent is also used for non-PCI ACPI devices in which case the DMA mask would be the bus default or as set by the _DMA method. Without this fix the DMA mask would default to 32-bits and so allocation would fail if there was no DRAM below 4GB. Fixes: 47ce45906ca9 ("usb: dwc3: leave default DMA for PCI devices") Cc: stable Signed-off-by: Jamie Iles Signed-off-by: Punit Agrawal Acked-by: Thinh Nguyen Link: https://patch.msgid.link/20251107104437.1602509-1-punit.agrawal@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -1667,7 +1668,7 @@ static int dwc3_probe(struct platform_de platform_set_drvdata(pdev, dwc); dwc3_cache_hwparams(dwc); - if (!dwc->sysdev_is_parent && + if (!dev_is_pci(dwc->sysdev) && DWC3_GHWPARAMS0_AWIDTH(dwc->hwparams.hwparams0) == 64) { ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64)); if (ret)