net/txgbe: add PF module init and uninit for SRIOV
[dpdk.git] / drivers / net / txgbe / base / txgbe_mbx.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015-2020
3  */
4
5 #include "txgbe_type.h"
6
7 #include "txgbe_mbx.h"
8
9 /**
10  *  txgbe_init_mbx_params_pf - set initial values for pf mailbox
11  *  @hw: pointer to the HW structure
12  *
13  *  Initializes the hw->mbx struct to correct values for pf mailbox
14  */
15 void txgbe_init_mbx_params_pf(struct txgbe_hw *hw)
16 {
17         struct txgbe_mbx_info *mbx = &hw->mbx;
18
19         mbx->timeout = 0;
20         mbx->usec_delay = 0;
21
22         mbx->size = TXGBE_P2VMBX_SIZE;
23
24         mbx->stats.msgs_tx = 0;
25         mbx->stats.msgs_rx = 0;
26         mbx->stats.reqs = 0;
27         mbx->stats.acks = 0;
28         mbx->stats.rsts = 0;
29 }