mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
A synchronous API for DOE has just been introduced. CXL (the only in-tree DOE user so far) was converted to use it instead of the asynchronous API. Consequently, pci_doe_submit_task() as well as the pci_doe_task struct are only used internally, so make them private. Tested-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Ming Li <ming4.li@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/cc19544068483681e91dfe27545c2180cd09f931.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams <dan.j.williams@intel.com>
38 lines
1018 B
C
38 lines
1018 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Data Object Exchange
|
|
* PCIe r6.0, sec 6.30 DOE
|
|
*
|
|
* Copyright (C) 2021 Huawei
|
|
* Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
|
*
|
|
* Copyright (C) 2022 Intel Corporation
|
|
* Ira Weiny <ira.weiny@intel.com>
|
|
*/
|
|
|
|
#ifndef LINUX_PCI_DOE_H
|
|
#define LINUX_PCI_DOE_H
|
|
|
|
struct pci_doe_mb;
|
|
|
|
/**
|
|
* pci_doe_for_each_off - Iterate each DOE capability
|
|
* @pdev: struct pci_dev to iterate
|
|
* @off: u16 of config space offset of each mailbox capability found
|
|
*/
|
|
#define pci_doe_for_each_off(pdev, off) \
|
|
for (off = pci_find_next_ext_capability(pdev, off, \
|
|
PCI_EXT_CAP_ID_DOE); \
|
|
off > 0; \
|
|
off = pci_find_next_ext_capability(pdev, off, \
|
|
PCI_EXT_CAP_ID_DOE))
|
|
|
|
struct pci_doe_mb *pcim_doe_create_mb(struct pci_dev *pdev, u16 cap_offset);
|
|
bool pci_doe_supports_prot(struct pci_doe_mb *doe_mb, u16 vid, u8 type);
|
|
|
|
int pci_doe(struct pci_doe_mb *doe_mb, u16 vendor, u8 type,
|
|
const void *request, size_t request_sz,
|
|
void *response, size_t response_sz);
|
|
|
|
#endif
|