linux/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 1999 - 2018 Intel Corporation. */

#ifndef _IXGBE_MBX_H_
#define _IXGBE_MBX_H_

#include "ixgbe_type.h"

#define IXGBE_VFMAILBOX_SIZE

#define IXGBE_VFMAILBOX
#define IXGBE_VFMBMEM

#define IXGBE_PFMAILBOX_STS
#define IXGBE_PFMAILBOX_ACK
#define IXGBE_PFMAILBOX_VFU
#define IXGBE_PFMAILBOX_PFU
#define IXGBE_PFMAILBOX_RVFU

#define IXGBE_MBVFICR_VFREQ_MASK
#define IXGBE_MBVFICR_VFREQ_VF1
#define IXGBE_MBVFICR_VFACK_MASK
#define IXGBE_MBVFICR_VFACK_VF1


/* If it's a IXGBE_VF_* msg then it originates in the VF and is sent to the
 * PF.  The reverse is true if it is IXGBE_PF_*.
 * Message ACK's are the value or'd with 0xF0000000
 */
#define IXGBE_VT_MSGTYPE_ACK
#define IXGBE_VT_MSGTYPE_NACK
#define IXGBE_VT_MSGTYPE_CTS
#define IXGBE_VT_MSGINFO_SHIFT
/* bits 23:16 are used for exra info for certain messages */
#define IXGBE_VT_MSGINFO_MASK

/* definitions to support mailbox API version negotiation */

/*
 * Each element denotes a version of the API; existing numbers may not
 * change; any additions must go at the end
 */
enum ixgbe_pfvf_api_rev {};

/* mailbox API, legacy requests */
#define IXGBE_VF_RESET
#define IXGBE_VF_SET_MAC_ADDR
#define IXGBE_VF_SET_MULTICAST
#define IXGBE_VF_SET_VLAN

/* mailbox API, version 1.0 VF requests */
#define IXGBE_VF_SET_LPE
#define IXGBE_VF_SET_MACVLAN
#define IXGBE_VF_API_NEGOTIATE

/* mailbox API, version 1.1 VF requests */
#define IXGBE_VF_GET_QUEUES

/* GET_QUEUES return data indices within the mailbox */
#define IXGBE_VF_TX_QUEUES
#define IXGBE_VF_RX_QUEUES
#define IXGBE_VF_TRANS_VLAN
#define IXGBE_VF_DEF_QUEUE

/* mailbox API, version 1.2 VF requests */
#define IXGBE_VF_GET_RETA
#define IXGBE_VF_GET_RSS_KEY

#define IXGBE_VF_UPDATE_XCAST_MODE

/* mailbox API, version 1.4 VF requests */
#define IXGBE_VF_IPSEC_ADD
#define IXGBE_VF_IPSEC_DEL

#define IXGBE_VF_GET_LINK_STATE

/* length of permanent address message returned from PF */
#define IXGBE_VF_PERMADDR_MSG_LEN
/* word in permanent address message with the current multicast type */
#define IXGBE_VF_MC_TYPE_WORD

#define IXGBE_PF_CONTROL_MSG

#define IXGBE_VF_MBX_INIT_TIMEOUT
#define IXGBE_VF_MBX_INIT_DELAY

int ixgbe_read_mbx(struct ixgbe_hw *, u32 *, u16, u16);
int ixgbe_write_mbx(struct ixgbe_hw *, u32 *, u16, u16);
int ixgbe_check_for_msg(struct ixgbe_hw *, u16);
int ixgbe_check_for_ack(struct ixgbe_hw *, u16);
int ixgbe_check_for_rst(struct ixgbe_hw *, u16);
#ifdef CONFIG_PCI_IOV
void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);
#endif /* CONFIG_PCI_IOV */

extern const struct ixgbe_mbx_operations mbx_ops_generic;

#endif /* _IXGBE_MBX_H_ */