diff options
author | Claudiu Manoil <claudiu.manoil@nxp.com> | 2019-01-22 15:29:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-24 21:55:53 -0800 |
commit | beb74ac878c8defeb5c862f432a524a032ef2609 (patch) | |
tree | 473bc727fe23719eeb1098db9a5eaf1ebd729dfc /drivers/net/ethernet/freescale/enetc/enetc.h | |
parent | 16eb4c85c96417c0ef75a7a2ef50eecb198ac8a6 (diff) |
enetc: Add vf to pf messaging support
VSIs (VFs) may send a message to the PSI (PF) for general notification
or to gain access to hardware resources which requires host inspection.
These messages may vary in size and are handled as a partition copy
between two memory regions owned by the respective participants.
The PSI will respond with fail or success and a 16-bit message code.
The patch implements the vf to pf messaging mechanism above and, as the
first application making use of this support, it enables the VF to
configure its own primary MAC address.
Signed-off-by: Catalin Horghidan <catalin.horghidan@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/enetc/enetc.h')
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/enetc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.h b/drivers/net/ethernet/freescale/enetc/enetc.h index d19bb434bca3..c44e6be24038 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.h +++ b/drivers/net/ethernet/freescale/enetc/enetc.h @@ -103,6 +103,12 @@ struct enetc_cbdr { #define ENETC_TXBD(BDR, i) (&(((union enetc_tx_bd *)((BDR).bd_base))[i])) #define ENETC_RXBD(BDR, i) (&(((union enetc_rx_bd *)((BDR).bd_base))[i])) +struct enetc_msg_swbd { + void *vaddr; + dma_addr_t dma; + int size; +}; + #define ENETC_REV1 0x1 enum enetc_errata { ENETC_ERR_TXCSUM = BIT(0), @@ -173,6 +179,14 @@ struct enetc_ndev_priv { phy_interface_t if_mode; }; +/* Messaging */ + +/* VF-PF set primary MAC address message format */ +struct enetc_msg_cmd_set_primary_mac { + struct enetc_msg_cmd_header header; + struct sockaddr mac; +}; + #define ENETC_CBD(R, i) (&(((struct enetc_cbd *)((R).bd_base))[i])) #define ENETC_CBDR_TIMEOUT 1000 /* usecs */ |