Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to IXGB...
details: https://anonhg.NetBSD.org/src/rev/401e576db218
branches: trunk
changeset: 1029158:401e576db218
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Dec 24 04:59:23 2021 +0000
description:
Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}.
- Sync with FreeBSD ix-3.3.18.
- No functional change.
diffstat:
sys/dev/pci/ixgbe/if_sriov.c | 14 +++++++-------
sys/dev/pci/ixgbe/ixgbe_mbx.h | 19 +++++++++++--------
sys/dev/pci/ixgbe/ixgbe_vf.c | 28 ++++++++++++++--------------
3 files changed, 32 insertions(+), 29 deletions(-)
diffs (199 lines):
diff -r 389c00b0e685 -r 401e576db218 sys/dev/pci/ixgbe/if_sriov.c
--- a/sys/dev/pci/ixgbe/if_sriov.c Fri Dec 24 04:56:34 2021 +0000
+++ b/sys/dev/pci/ixgbe/if_sriov.c Fri Dec 24 04:59:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sriov.c,v 1.14 2021/12/10 11:39:48 msaitoh Exp $ */
+/* $NetBSD: if_sriov.c,v 1.15 2021/12/24 04:59:23 msaitoh Exp $ */
/******************************************************************************
Copyright (c) 2001-2017, Intel Corporation
@@ -34,7 +34,7 @@
/*$FreeBSD: head/sys/dev/ixgbe/if_sriov.c 327031 2017-12-20 18:15:06Z erj $*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sriov.c,v 1.14 2021/12/10 11:39:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sriov.c,v 1.15 2021/12/24 04:59:23 msaitoh Exp $");
#include "ixgbe.h"
#include "ixgbe_sriov.h"
@@ -106,14 +106,14 @@
ixgbe_send_vf_ack(struct adapter *adapter, struct ixgbe_vf *vf, u32 msg)
{
msg &= IXGBE_VT_MSG_MASK;
- ixgbe_send_vf_msg(adapter, vf, msg | IXGBE_VT_MSGTYPE_ACK);
+ ixgbe_send_vf_msg(adapter, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS);
}
static inline void
ixgbe_send_vf_nack(struct adapter *adapter, struct ixgbe_vf *vf, u32 msg)
{
msg &= IXGBE_VT_MSG_MASK;
- ixgbe_send_vf_msg(adapter, vf, msg | IXGBE_VT_MSGTYPE_NACK);
+ ixgbe_send_vf_msg(adapter, vf, msg | IXGBE_VT_MSGTYPE_FAILURE);
}
static inline void
@@ -378,9 +378,9 @@
if (ixgbe_validate_mac_addr(vf->ether_addr) == 0) {
ixgbe_set_rar(&adapter->hw, vf->rar_index, vf->ether_addr,
vf->pool, TRUE);
- ack = IXGBE_VT_MSGTYPE_ACK;
+ ack = IXGBE_VT_MSGTYPE_SUCCESS;
} else
- ack = IXGBE_VT_MSGTYPE_NACK;
+ ack = IXGBE_VT_MSGTYPE_FAILURE;
ixgbe_vf_enable_transmit(adapter, vf);
ixgbe_vf_enable_receive(adapter, vf);
@@ -572,7 +572,7 @@
return;
}
- resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK |
+ resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_SUCCESS |
IXGBE_VT_MSGTYPE_CTS;
num_queues = ixgbe_vf_queues(adapter->iov_mode);
diff -r 389c00b0e685 -r 401e576db218 sys/dev/pci/ixgbe/ixgbe_mbx.h
--- a/sys/dev/pci/ixgbe/ixgbe_mbx.h Fri Dec 24 04:56:34 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_mbx.h Fri Dec 24 04:59:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_mbx.h,v 1.15 2021/12/24 04:56:34 msaitoh Exp $ */
+/* $NetBSD: ixgbe_mbx.h,v 1.16 2021/12/24 04:59:23 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -100,14 +100,17 @@
/* 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
+ * Message results are the value or'd with 0xF0000000
*/
-#define IXGBE_VT_MSGTYPE_ACK 0x80000000 /* Messages below or'd with
- * this are the ACK */
-#define IXGBE_VT_MSGTYPE_NACK 0x40000000 /* Messages below or'd with
- * this are the NACK */
-#define IXGBE_VT_MSGTYPE_CTS 0x20000000 /* Indicates that VF is still
- * clear to send requests */
+#define IXGBE_VT_MSGTYPE_SUCCESS 0x80000000 /* Messages or'd with this
+ * have succeeded
+ */
+#define IXGBE_VT_MSGTYPE_FAILURE 0x40000000 /* Messages or'd with this
+ * have failed
+ */
+#define IXGBE_VT_MSGTYPE_CTS 0x20000000 /* Indicates that VF is still
+ * clear to send requests
+ */
#define IXGBE_VT_MSGINFO_SHIFT 16
/* bits 23:16 are used for extra info for certain messages */
#define IXGBE_VT_MSGINFO_MASK (0xFF << IXGBE_VT_MSGINFO_SHIFT)
diff -r 389c00b0e685 -r 401e576db218 sys/dev/pci/ixgbe/ixgbe_vf.c
--- a/sys/dev/pci/ixgbe/ixgbe_vf.c Fri Dec 24 04:56:34 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_vf.c Fri Dec 24 04:59:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_vf.c,v 1.27 2021/04/30 06:55:32 msaitoh Exp $ */
+/* $NetBSD: ixgbe_vf.c,v 1.28 2021/12/24 04:59:23 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_vf.c 331224 2018-03-19 20:55:05Z erj $*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_vf.c,v 1.27 2021/04/30 06:55:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_vf.c,v 1.28 2021/12/24 04:59:23 msaitoh Exp $");
#include "ixgbe_api.h"
#include "ixgbe_type.h"
@@ -234,11 +234,11 @@
if (ret_val)
return ret_val;
- if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK) &&
- msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_NACK))
+ if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS) &&
+ msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_FAILURE))
return IXGBE_ERR_INVALID_MAC_ADDR;
- if (msgbuf[0] == (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
+ if (msgbuf[0] == (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS))
memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
@@ -369,7 +369,7 @@
/* if nacked the address was rejected, use "perm_addr" */
if (!ret_val &&
- (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_NACK))) {
+ (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_FAILURE))) {
ixgbe_get_mac_addr_vf(hw, hw->mac.addr);
return IXGBE_ERR_MBX;
}
@@ -464,7 +464,7 @@
msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS;
if (msgbuf[0] ==
- (IXGBE_VF_UPDATE_XCAST_MODE | IXGBE_VT_MSGTYPE_NACK)) {
+ (IXGBE_VF_UPDATE_XCAST_MODE | IXGBE_VT_MSGTYPE_FAILURE)) {
if (xcast_mode == IXGBEVF_XCAST_MODE_PROMISC) {
/*
* If the API version matched and the reply was NACK,
@@ -515,10 +515,10 @@
msgbuf[0] |= (u32)vlan_on << IXGBE_VT_MSGINFO_SHIFT;
ret_val = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 2);
- if (!ret_val && (msgbuf[0] & IXGBE_VT_MSGTYPE_ACK))
+ if (!ret_val && (msgbuf[0] & IXGBE_VT_MSGTYPE_SUCCESS))
return IXGBE_SUCCESS;
- return ret_val | (msgbuf[0] & IXGBE_VT_MSGTYPE_NACK);
+ return ret_val | (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE);
}
/**
@@ -583,7 +583,7 @@
if (!ret_val) {
msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS;
- if (msgbuf[0] == (msgbuf_chk | IXGBE_VT_MSGTYPE_NACK))
+ if (msgbuf[0] == (msgbuf_chk | IXGBE_VT_MSGTYPE_FAILURE))
return IXGBE_ERR_OUT_OF_MEM;
}
@@ -687,7 +687,7 @@
if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) {
/* msg is not CTS and is NACK we must have lost CTS status */
- if (in_msg & IXGBE_VT_MSGTYPE_NACK)
+ if (in_msg & IXGBE_VT_MSGTYPE_FAILURE)
ret_val = -1;
goto out;
}
@@ -725,7 +725,7 @@
if (retval)
return retval;
if ((msgbuf[0] & IXGBE_VF_SET_LPE) &&
- (msgbuf[0] & IXGBE_VT_MSGTYPE_NACK))
+ (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE))
return IXGBE_ERR_MBX;
return 0;
@@ -751,7 +751,7 @@
msg[0] &= ~IXGBE_VT_MSGTYPE_CTS;
/* Store value and return 0 on success */
- if (msg[0] == (IXGBE_VF_API_NEGOTIATE | IXGBE_VT_MSGTYPE_ACK)) {
+ if (msg[0] == (IXGBE_VF_API_NEGOTIATE | IXGBE_VT_MSGTYPE_SUCCESS)) {
hw->api_version = api;
return 0;
}
@@ -791,7 +791,7 @@
* some sort of mailbox error so we should treat it
* as such
*/
- if (msg[0] != (IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK))
+ if (msg[0] != (IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_SUCCESS))
return IXGBE_ERR_MBX;
/* record and validate values from message */
Home |
Main Index |
Thread Index |
Old Index