#define NIC_MBOX_MSG_ALLOC_SQS 0x12 /* Allocate secondary Qset */
#define NIC_MBOX_MSG_LOOPBACK 0x16 /* Set interface in loopback */
#define NIC_MBOX_MSG_RESET_STAT_COUNTER 0x17 /* Reset statistics counters */
+#define NIC_MBOX_MSG_SET_LINK 0x21 /* Set link up/down */
#define NIC_MBOX_MSG_CFG_DONE 0xF0 /* VF configuration done */
#define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */
#define NIC_MBOX_MSG_MAX 0x100 /* Maximum number of messages */
uint16_t sq_stat_mask;
};
+/* Set link up/down */
+struct set_link_state {
+ uint8_t msg;
+ uint8_t vf_id;
+ bool enable;
+};
+
struct nic_mbx {
/* 128 bit shared memory between PF and each VF */
union {
struct sqs_alloc sqs_alloc;
struct set_loopback lbk;
struct reset_stat_cfg reset_stat;
+ struct set_link_state set_link;
};
};
int nicvf_mbox_loopback_config(struct nicvf *nic, bool enable);
int nicvf_mbox_reset_stat_counters(struct nicvf *nic, uint16_t rx_stat_mask,
uint8_t tx_stat_mask, uint16_t rq_stat_mask, uint16_t sq_stat_mask);
+int nicvf_mbox_set_link_up_down(struct nicvf *nic, bool enable);
void nicvf_mbox_shutdown(struct nicvf *nic);
void nicvf_mbox_cfg_done(struct nicvf *nic);