#include <linux/interrupt.h>
#include <linux/module.h>
#include "otx_cptvf.h"
#include "otx_cptvf_algs.h"
#include "otx_cptvf_reqmgr.h"
#define DRV_NAME …
#define DRV_VERSION …
static void vq_work_handler(unsigned long data)
{ … }
static int init_worker_threads(struct otx_cptvf *cptvf)
{ … }
static void cleanup_worker_threads(struct otx_cptvf *cptvf)
{ … }
static void free_pending_queues(struct otx_cpt_pending_qinfo *pqinfo)
{ … }
static int alloc_pending_queues(struct otx_cpt_pending_qinfo *pqinfo, u32 qlen,
u32 num_queues)
{ … }
static int init_pending_queues(struct otx_cptvf *cptvf, u32 qlen,
u32 num_queues)
{ … }
static void cleanup_pending_queues(struct otx_cptvf *cptvf)
{ … }
static void free_command_queues(struct otx_cptvf *cptvf,
struct otx_cpt_cmd_qinfo *cqinfo)
{ … }
static int alloc_command_queues(struct otx_cptvf *cptvf,
struct otx_cpt_cmd_qinfo *cqinfo,
u32 qlen)
{ … }
static int init_command_queues(struct otx_cptvf *cptvf, u32 qlen)
{ … }
static void cleanup_command_queues(struct otx_cptvf *cptvf)
{ … }
static void cptvf_sw_cleanup(struct otx_cptvf *cptvf)
{ … }
static int cptvf_sw_init(struct otx_cptvf *cptvf, u32 qlen, u32 num_queues)
{ … }
static void cptvf_free_irq_affinity(struct otx_cptvf *cptvf, int vec)
{ … }
static void cptvf_write_vq_ctl(struct otx_cptvf *cptvf, bool val)
{ … }
void otx_cptvf_write_vq_doorbell(struct otx_cptvf *cptvf, u32 val)
{ … }
static void cptvf_write_vq_inprog(struct otx_cptvf *cptvf, u8 val)
{ … }
static void cptvf_write_vq_done_numwait(struct otx_cptvf *cptvf, u32 val)
{ … }
static u32 cptvf_read_vq_done_numwait(struct otx_cptvf *cptvf)
{ … }
static void cptvf_write_vq_done_timewait(struct otx_cptvf *cptvf, u16 time)
{ … }
static u16 cptvf_read_vq_done_timewait(struct otx_cptvf *cptvf)
{ … }
static void cptvf_enable_swerr_interrupts(struct otx_cptvf *cptvf)
{ … }
static void cptvf_enable_mbox_interrupts(struct otx_cptvf *cptvf)
{ … }
static void cptvf_enable_done_interrupts(struct otx_cptvf *cptvf)
{ … }
static void cptvf_clear_dovf_intr(struct otx_cptvf *cptvf)
{ … }
static void cptvf_clear_irde_intr(struct otx_cptvf *cptvf)
{ … }
static void cptvf_clear_nwrp_intr(struct otx_cptvf *cptvf)
{ … }
static void cptvf_clear_mbox_intr(struct otx_cptvf *cptvf)
{ … }
static void cptvf_clear_swerr_intr(struct otx_cptvf *cptvf)
{ … }
static u64 cptvf_read_vf_misc_intr_status(struct otx_cptvf *cptvf)
{ … }
static irqreturn_t cptvf_misc_intr_handler(int __always_unused irq,
void *arg)
{ … }
static inline struct otx_cptvf_wqe *get_cptvf_vq_wqe(struct otx_cptvf *cptvf,
int qno)
{ … }
static inline u32 cptvf_read_vq_done_count(struct otx_cptvf *cptvf)
{ … }
static inline void cptvf_write_vq_done_ack(struct otx_cptvf *cptvf,
u32 ackcnt)
{ … }
static irqreturn_t cptvf_done_intr_handler(int __always_unused irq,
void *cptvf_dev)
{ … }
static void cptvf_set_irq_affinity(struct otx_cptvf *cptvf, int vec)
{ … }
static void cptvf_write_vq_saddr(struct otx_cptvf *cptvf, u64 val)
{ … }
static void cptvf_device_init(struct otx_cptvf *cptvf)
{ … }
static ssize_t vf_type_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t vf_engine_group_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t vf_engine_group_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t vf_coalesc_time_wait_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t vf_coalesc_num_wait_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t vf_coalesc_time_wait_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t vf_coalesc_num_wait_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RO(vf_type);
static DEVICE_ATTR_RW(vf_engine_group);
static DEVICE_ATTR_RW(vf_coalesc_time_wait);
static DEVICE_ATTR_RW(vf_coalesc_num_wait);
static struct attribute *otx_cptvf_attrs[] = …;
static const struct attribute_group otx_cptvf_sysfs_group = …;
static int otx_cptvf_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ … }
static void otx_cptvf_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id otx_cptvf_id_table[] = …;
static struct pci_driver otx_cptvf_pci_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…);
MODULE_DEVICE_TABLE(pci, otx_cptvf_id_table);