mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
Implement the doorbell feature by mapping the EP's MSI interrupt controller message address to a dedicated BAR. The EPF driver should pass the actual message data to be written to the message address by the host through implementation-specific logic. Signed-off-by: Frank Li <[email protected]> [mani: minor code cleanups and reworded commit message] Signed-off-by: Manivannan Sadhasivam <[email protected]> [bhelgaas: fix kernel-doc] Signed-off-by: Bjorn Helgaas <[email protected]> Tested-by: Niklas Cassel <[email protected]> Link: https://patch.msgid.link/[email protected]
29 lines
607 B
C
29 lines
607 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* PCI Endpoint *Function* side MSI header file
|
|
*
|
|
* Copyright (C) 2024 NXP
|
|
* Author: Frank Li <[email protected]>
|
|
*/
|
|
|
|
#ifndef __PCI_EP_MSI__
|
|
#define __PCI_EP_MSI__
|
|
|
|
struct pci_epf;
|
|
|
|
#ifdef CONFIG_PCI_ENDPOINT_MSI_DOORBELL
|
|
int pci_epf_alloc_doorbell(struct pci_epf *epf, u16 nums);
|
|
void pci_epf_free_doorbell(struct pci_epf *epf);
|
|
#else
|
|
static inline int pci_epf_alloc_doorbell(struct pci_epf *epf, u16 nums)
|
|
{
|
|
return -ENODATA;
|
|
}
|
|
|
|
static inline void pci_epf_free_doorbell(struct pci_epf *epf)
|
|
{
|
|
}
|
|
#endif /* CONFIG_GENERIC_MSI_IRQ */
|
|
|
|
#endif /* __PCI_EP_MSI__ */
|