Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v6.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fixes from Bjorn Helgaas:

- Fix an unintentional truncation of DWC MSI-X address to 32 bits and
update similar MSI code to match (Dan Carpenter)

* tag 'pci-v6.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
PCI: dwc: Clean up dw_pcie_ep_raise_msi_irq() alignment
PCI: dwc: Fix a 64bit bug in dw_pcie_ep_raise_msix_irq()

+6 -4
+6 -4
drivers/pci/controller/dwc/pcie-designware-ep.c
··· 6 6 * Author: Kishon Vijay Abraham I <kishon@ti.com> 7 7 */ 8 8 9 + #include <linux/align.h> 9 10 #include <linux/bitfield.h> 10 11 #include <linux/of.h> 11 12 #include <linux/platform_device.h> ··· 483 482 reg = ep_func->msi_cap + PCI_MSI_DATA_32; 484 483 msg_data = dw_pcie_ep_readw_dbi(ep, func_no, reg); 485 484 } 486 - aligned_offset = msg_addr_lower & (epc->mem->window.page_size - 1); 487 - msg_addr = ((u64)msg_addr_upper) << 32 | 488 - (msg_addr_lower & ~aligned_offset); 485 + msg_addr = ((u64)msg_addr_upper) << 32 | msg_addr_lower; 486 + 487 + aligned_offset = msg_addr & (epc->mem->window.page_size - 1); 488 + msg_addr = ALIGN_DOWN(msg_addr, epc->mem->window.page_size); 489 489 ret = dw_pcie_ep_map_addr(epc, func_no, 0, ep->msi_mem_phys, msg_addr, 490 490 epc->mem->window.page_size); 491 491 if (ret) ··· 553 551 } 554 552 555 553 aligned_offset = msg_addr & (epc->mem->window.page_size - 1); 556 - msg_addr &= ~aligned_offset; 554 + msg_addr = ALIGN_DOWN(msg_addr, epc->mem->window.page_size); 557 555 ret = dw_pcie_ep_map_addr(epc, func_no, 0, ep->msi_mem_phys, msg_addr, 558 556 epc->mem->window.page_size); 559 557 if (ret)