#include <linux/types.h>
#include <asm/byteorder.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include "qed.h"
#include "qed_cxt.h"
#include "qed_dev_api.h"
#include "qed_hsi.h"
#include "qed_iro_hsi.h"
#include "qed_hw.h"
#include "qed_int.h"
#include "qed_iscsi.h"
#include "qed_mcp.h"
#include "qed_ooo.h"
#include "qed_reg_addr.h"
#include "qed_sp.h"
#include "qed_sriov.h"
#include "qed_rdma.h"
#define SPQ_HIGH_PRI_RESERVE_DEFAULT …
#define SPQ_BLOCK_DELAY_MAX_ITER …
#define SPQ_BLOCK_DELAY_US …
#define SPQ_BLOCK_SLEEP_MAX_ITER …
#define SPQ_BLOCK_SLEEP_MS …
static void qed_spq_blocking_cb(struct qed_hwfn *p_hwfn,
void *cookie,
union event_ring_data *data, u8 fw_return_code)
{ … }
static int __qed_spq_block(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent,
u8 *p_fw_ret, bool sleep_between_iter)
{ … }
static int qed_spq_block(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent,
u8 *p_fw_ret, bool skip_quick_poll)
{ … }
static int qed_spq_fill_entry(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent)
{ … }
static void qed_spq_hw_initialize(struct qed_hwfn *p_hwfn,
struct qed_spq *p_spq)
{ … }
static int qed_spq_hw_post(struct qed_hwfn *p_hwfn,
struct qed_spq *p_spq, struct qed_spq_entry *p_ent)
{ … }
static int
qed_async_event_completion(struct qed_hwfn *p_hwfn,
struct event_ring_entry *p_eqe)
{ … }
int
qed_spq_register_async_cb(struct qed_hwfn *p_hwfn,
enum protocol_type protocol_id,
qed_spq_async_comp_cb cb)
{ … }
void
qed_spq_unregister_async_cb(struct qed_hwfn *p_hwfn,
enum protocol_type protocol_id)
{ … }
void qed_eq_prod_update(struct qed_hwfn *p_hwfn, u16 prod)
{ … }
int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie)
{ … }
int qed_eq_alloc(struct qed_hwfn *p_hwfn, u16 num_elem)
{ … }
void qed_eq_setup(struct qed_hwfn *p_hwfn)
{ … }
void qed_eq_free(struct qed_hwfn *p_hwfn)
{ … }
static int qed_cqe_completion(struct qed_hwfn *p_hwfn,
struct eth_slow_path_rx_cqe *cqe,
enum protocol_type protocol)
{ … }
int qed_eth_cqe_completion(struct qed_hwfn *p_hwfn,
struct eth_slow_path_rx_cqe *cqe)
{ … }
void qed_spq_setup(struct qed_hwfn *p_hwfn)
{ … }
int qed_spq_alloc(struct qed_hwfn *p_hwfn)
{ … }
void qed_spq_free(struct qed_hwfn *p_hwfn)
{ … }
int qed_spq_get_entry(struct qed_hwfn *p_hwfn, struct qed_spq_entry **pp_ent)
{ … }
static void __qed_spq_return_entry(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent)
{ … }
void qed_spq_return_entry(struct qed_hwfn *p_hwfn, struct qed_spq_entry *p_ent)
{ … }
static int qed_spq_add_entry(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent,
enum spq_priority priority)
{ … }
u32 qed_spq_get_cid(struct qed_hwfn *p_hwfn)
{ … }
static int qed_spq_post_list(struct qed_hwfn *p_hwfn,
struct list_head *head, u32 keep_reserve)
{ … }
int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
{ … }
static void qed_spq_recov_set_ret_code(struct qed_spq_entry *p_ent,
u8 *fw_return_code)
{ … }
static void qed_spq_comp_bmap_update(struct qed_hwfn *p_hwfn, __le16 echo)
{ … }
int qed_spq_post(struct qed_hwfn *p_hwfn,
struct qed_spq_entry *p_ent, u8 *fw_return_code)
{ … }
int qed_spq_completion(struct qed_hwfn *p_hwfn,
__le16 echo,
u8 fw_return_code,
union event_ring_data *p_data)
{ … }
#define QED_SPQ_CONSQ_ELEM_SIZE …
int qed_consq_alloc(struct qed_hwfn *p_hwfn)
{ … }
void qed_consq_setup(struct qed_hwfn *p_hwfn)
{ … }
void qed_consq_free(struct qed_hwfn *p_hwfn)
{ … }