linux/drivers/net/ethernet/qlogic/qed/qed_chain.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
/* Copyright (c) 2020 Marvell International Ltd. */

#include <linux/dma-mapping.h>
#include <linux/qed/qed_chain.h>
#include <linux/vmalloc.h>

#include "qed_dev_api.h"

static void qed_chain_init(struct qed_chain *chain,
			   const struct qed_chain_init_params *params,
			   u32 page_cnt)
{}

static void qed_chain_init_next_ptr_elem(const struct qed_chain *chain,
					 void *virt_curr, void *virt_next,
					 dma_addr_t phys_next)
{}

static void qed_chain_init_mem(struct qed_chain *chain, void *virt_addr,
			       dma_addr_t phys_addr)
{}

static void qed_chain_free_next_ptr(struct qed_dev *cdev,
				    struct qed_chain *chain)
{}

static void qed_chain_free_single(struct qed_dev *cdev,
				  struct qed_chain *chain)
{}

static void qed_chain_free_pbl(struct qed_dev *cdev, struct qed_chain *chain)
{}

/**
 * qed_chain_free() - Free chain DMA memory.
 *
 * @cdev: Main device structure.
 * @chain: Chain to free.
 */
void qed_chain_free(struct qed_dev *cdev, struct qed_chain *chain)
{}

static int
qed_chain_alloc_sanity_check(struct qed_dev *cdev,
			     const struct qed_chain_init_params *params,
			     u32 page_cnt)
{}

static int qed_chain_alloc_next_ptr(struct qed_dev *cdev,
				    struct qed_chain *chain)
{}

static int qed_chain_alloc_single(struct qed_dev *cdev,
				  struct qed_chain *chain)
{}

static int qed_chain_alloc_pbl(struct qed_dev *cdev, struct qed_chain *chain)
{}

/**
 * qed_chain_alloc() - Allocate and initialize a chain.
 *
 * @cdev: Main device structure.
 * @chain: Chain to be processed.
 * @params: Chain initialization parameters.
 *
 * Return: 0 on success, negative errno otherwise.
 */
int qed_chain_alloc(struct qed_dev *cdev, struct qed_chain *chain,
		    struct qed_chain_init_params *params)
{}