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 7285537CD45 for ; Fri, 1 May 2026 09:19: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=1777627180; cv=none; b=Vvm71ObNslO9AJmHEv7kfnP3GUklwcK2P136xuYyfzrZzwtF/ZOcysv6UARi3fXOQVyWGq+W/+M8R1OJ2k0NFKYrb2+9wKJywxqv9IayeBivyHify6Feg+a6ub29d2HKVSy1wegtX/YwyaltW/BU2eZSG+Dl7i1ZmHjr6n7RUWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777627180; c=relaxed/simple; bh=RV/JecY3zOiKkrJ1A2cyBhc8Wtr5FGcZqi+9DxO3508=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=k6f5bPhbs1N10sWYQ7Z3i9kw4IaupiVJkH/3w8AmXcv4iZ6Wj08+BetMrb1debKlB891mU00lmbLE4PL5NCfkctrcjfF9u9u9GkN7xFXeSSepnsPeYyLVSKOuy2EYDHUHh7FpcXqbSQHk0dZJD9jQODdijFrBM6xdFZco0+yXBg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qb4X4nKp; 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="qb4X4nKp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E79DFC2BCB4; Fri, 1 May 2026 09:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777627180; bh=RV/JecY3zOiKkrJ1A2cyBhc8Wtr5FGcZqi+9DxO3508=; h=Subject:To:Cc:From:Date:From; b=qb4X4nKphhaRYNWJhsAEtyFxIc/7VdAgGHTpnnX+XGrbSBLwESWbOlhR5dFDMhzj6 jNa7YH8RJStXgmlLB7hlFXZ3+0cjFZ5A/6Qn1ESPBbRHu/W1JYU5AVd6nufkl/ogqS Ahu7FoiV1EC9WERBomm+OBDtGqxCAXee7SPDM+cY= Subject: FAILED: patch "[PATCH] PCI: epf-mhi: Return 0, not remaining timeout, when eDMA ops" failed to apply to 6.6-stable tree To: git@danielhodges.dev,krishna.chundru@oss.qualcomm.com,mani@kernel.org Cc: From: Date: Fri, 01 May 2026 11:19:37 +0200 Message-ID: <2026050137-lesser-shaping-0e62@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x 36bfc3642b19a98f1302aed4437c331df9b481f0 # git commit -s git send-email --to '' --in-reply-to '2026050137-lesser-shaping-0e62@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 36bfc3642b19a98f1302aed4437c331df9b481f0 Mon Sep 17 00:00:00 2001 From: Daniel Hodges Date: Fri, 6 Feb 2026 15:05:29 -0500 Subject: [PATCH] PCI: epf-mhi: Return 0, not remaining timeout, when eDMA ops complete pci_epf_mhi_edma_read() and pci_epf_mhi_edma_write() start DMA operations and wait for completion with a timeout. On successful completion, they previously returned the remaining timeout, which callers may treat as an error. In particular, mhi_ep_ring_add_element(), which calls pci_epf_mhi_edma_write() via mhi_cntrl->write_sync(), interprets any non-zero return value as failure. Return 0 on success instead of the remaining timeout to prevent mhi_ep_ring_add_element() from treating successful completion as an error. Fixes: 7b99aaaddabb ("PCI: epf-mhi: Add eDMA support") Signed-off-by: Daniel Hodges [mani: changed commit log as per https://lore.kernel.org/linux-pci/20260227191510.GA3904799@bhelgaas] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krishna Chaitanya Chundru Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260206200529.10784-1-git@danielhodges.dev diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index f9cf18aa5b34..7f5326925ed5 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -367,6 +367,8 @@ static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl *mhi_cntrl, dev_err(dev, "DMA transfer timeout\n"); dmaengine_terminate_sync(chan); ret = -ETIMEDOUT; + } else { + ret = 0; } err_unmap: @@ -438,6 +440,8 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl, dev_err(dev, "DMA transfer timeout\n"); dmaengine_terminate_sync(chan); ret = -ETIMEDOUT; + } else { + ret = 0; } err_unmap: