Patch "PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single()" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single()

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-epf-mhi-fix-the-dma-data-direction-of-dma_unmap_.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 919e1c85c5f3239c47900c0d4cc85780d5496f83
Author: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Date:   Thu Dec 14 12:03:28 2023 +0530

    PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single()
    
    [ Upstream commit 327ec5f70609cf00c6f961073c01857555c6a8eb ]
    
    In the error path of pci_epf_mhi_edma_write() function, the DMA data
    direction passed (DMA_FROM_DEVICE) doesn't match the actual direction used
    for the data transfer. Fix it by passing the correct one (DMA_TO_DEVICE).
    
    Fixes: 7b99aaaddabb ("PCI: epf-mhi: Add eDMA support")
    Reviewed-by: Krzysztof Wilczyński <kw@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231214063328.40657-1-manivannan.sadhasivam@xxxxxxxxxx
    Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index ec5f4a38178b..6dc918a8a023 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -405,7 +405,7 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl,
 	}
 
 err_unmap:
-	dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_FROM_DEVICE);
+	dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_TO_DEVICE);
 err_unlock:
 	mutex_unlock(&epf_mhi->lock);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux