linux/drivers/net/ethernet/hisilicon/hns/hnae.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2014-2015 Hisilicon Limited.
 */

#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include "hnae.h"

#define cls_to_ae_dev(dev)

static const struct class hnae_class =;

static void
hnae_list_add(spinlock_t *lock, struct list_head *node, struct list_head *head)
{}

static void hnae_list_del(spinlock_t *lock, struct list_head *node)
{}

static int hnae_alloc_buffer(struct hnae_ring *ring, struct hnae_desc_cb *cb)
{}

static void hnae_free_buffer(struct hnae_ring *ring, struct hnae_desc_cb *cb)
{}

static int hnae_map_buffer(struct hnae_ring *ring, struct hnae_desc_cb *cb)
{}

static void hnae_unmap_buffer(struct hnae_ring *ring, struct hnae_desc_cb *cb)
{}

static struct hnae_buf_ops hnae_bops =;

static int __ae_match(struct device *dev, const void *data)
{}

static struct hnae_ae_dev *find_ae(const struct fwnode_handle *fwnode)
{}

static void hnae_free_buffers(struct hnae_ring *ring)
{}

/* Allocate memory for raw pkg, and map with dma */
static int hnae_alloc_buffers(struct hnae_ring *ring)
{}

/* free desc along with its attached buffer */
static void hnae_free_desc(struct hnae_ring *ring)
{}

/* alloc desc, without buffer attached */
static int hnae_alloc_desc(struct hnae_ring *ring)
{}

/* fini ring, also free the buffer for the ring */
static void hnae_fini_ring(struct hnae_ring *ring)
{}

/* init ring, and with buffer for rx ring */
static int
hnae_init_ring(struct hnae_queue *q, struct hnae_ring *ring, int flags)
{}

static int hnae_init_queue(struct hnae_handle *h, struct hnae_queue *q,
			   struct hnae_ae_dev *dev)
{}

static void hnae_fini_queue(struct hnae_queue *q)
{}

/*
 * ae_chain - define ae chain head
 */
static RAW_NOTIFIER_HEAD(ae_chain);

int hnae_register_notifier(struct notifier_block *nb)
{}
EXPORT_SYMBOL();

void hnae_unregister_notifier(struct notifier_block *nb)
{}
EXPORT_SYMBOL();

int hnae_reinit_handle(struct hnae_handle *handle)
{}
EXPORT_SYMBOL();

/* hnae_get_handle - get a handle from the AE
 * @owner_dev: the dev use this handle
 * @ae_id: the id of the ae to be used
 * @ae_opts: the options set for the handle
 * @bops: the callbacks for buffer management
 *
 * return handle ptr or ERR_PTR
 */
struct hnae_handle *hnae_get_handle(struct device *owner_dev,
				    const struct fwnode_handle	*fwnode,
				    u32 port_id,
				    struct hnae_buf_ops *bops)
{}
EXPORT_SYMBOL();

void hnae_put_handle(struct hnae_handle *h)
{}
EXPORT_SYMBOL();

static void hnae_release(struct device *dev)
{}

/**
 * hnae_ae_register - register a AE engine to hnae framework
 * @hdev: the hnae ae engine device
 * @owner:  the module who provides this dev
 * NOTE: the duplicated name will not be checked
 */
int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner)
{}
EXPORT_SYMBOL();

/**
 * hnae_ae_unregister - unregisters a HNAE AE engine
 * @hdev: the device to unregister
 */
void hnae_ae_unregister(struct hnae_ae_dev *hdev)
{}
EXPORT_SYMBOL();

static int __init hnae_init(void)
{}

static void __exit hnae_exit(void)
{}

subsys_initcall(hnae_init);
module_exit(hnae_exit);

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();

/* vi: set tw=78 noet: */