Patch "PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support" has been added to the 5.10-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: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support

to the 5.10-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-dwc-endpoint-fix-dw_pcie_ep_raise_msix_irq-align.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 5663dea8a175b8aececce6151cc6bdead1ac5e23
Author: Niklas Cassel <niklas.cassel@xxxxxxx>
Date:   Tue Nov 28 14:22:30 2023 +0100

    PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support
    
    [ Upstream commit 2217fffcd63f86776c985d42e76daa43a56abdf1 ]
    
    Commit 6f5e193bfb55 ("PCI: dwc: Fix dw_pcie_ep_raise_msix_irq() to get
    correct MSI-X table address") modified dw_pcie_ep_raise_msix_irq() to
    support iATUs which require a specific alignment.
    
    However, this support cannot have been properly tested.
    
    The whole point is for the iATU to map an address that is aligned,
    using dw_pcie_ep_map_addr(), and then let the writel() write to
    ep->msi_mem + aligned_offset.
    
    Thus, modify the address that is mapped such that it is aligned.
    With this change, dw_pcie_ep_raise_msix_irq() matches the logic in
    dw_pcie_ep_raise_msi_irq().
    
    Link: https://lore.kernel.org/linux-pci/20231128132231.2221614-1-nks@xxxxxxxxxxx
    Fixes: 6f5e193bfb55 ("PCI: dwc: Fix dw_pcie_ep_raise_msix_irq() to get correct MSI-X table address")
    Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx>
    Signed-off-by: Krzysztof Wilczyński <kwilczynski@xxxxxxxxxx>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx # 5.7
    Cc: Kishon Vijay Abraham I <kishon@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index 95ed719402d7..e27bac623684 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -593,6 +593,7 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
 	}
 
 	aligned_offset = msg_addr & (epc->mem->window.page_size - 1);
+	msg_addr &= ~aligned_offset;
 	ret = dw_pcie_ep_map_addr(epc, func_no, ep->msi_mem_phys,  msg_addr,
 				  epc->mem->window.page_size);
 	if (ret)




[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