aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/intelxvf.h
diff options
context:
space:
mode:
authorVishvananda Ishaya <vish.ishaya@oracle.com>2017-03-09 13:54:13 +0000
committerMichael Brown <mcb30@ipxe.org>2017-03-09 13:56:22 +0000
commit1d049002622da6a5a9cc98c42fd4dd27dc741b96 (patch)
treef5ef75498ab111610a6ed1a759d272053ba0786d /src/drivers/net/intelxvf.h
parent9db9221ea0e3a7a4b32cf7fbdb17a46af474ce2b (diff)
downloadipxe-1d049002622da6a5a9cc98c42fd4dd27dc741b96.tar.gz
[intel] Reset all virtual function settings
Some VF data is not cleared with reset, so make sure to return all the settings to default before configuring the VF. This fixes an issue where network packets would fail to be received if the VF was previously used by the linux ixgbevf driver. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/intelxvf.h')
-rw-r--r--src/drivers/net/intelxvf.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/drivers/net/intelxvf.h b/src/drivers/net/intelxvf.h
index ad046a65c..4663272aa 100644
--- a/src/drivers/net/intelxvf.h
+++ b/src/drivers/net/intelxvf.h
@@ -55,8 +55,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** Mailbox Control Register */
#define INTELXVF_MBCTRL 0x02fcUL
+/** Packet Split Receive Type */
+#define INTELXVF_PSRTYPE 0x0300UL
+
/** Receive Descriptor register block */
-#define INTELXVF_RD 0x1000UL
+#define INTELXVF_RD(n) ( 0x1000UL + ( 0x40 * (n) ) )
/** RX DCA Control Register */
#define INTELXVF_DCA_RXCTRL 0x100cUL
@@ -67,9 +70,13 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define INTELXVF_SRRCTL_BSIZE(kb) ( (kb) << 0 ) /**< Receive buffer size */
#define INTELXVF_SRRCTL_BSIZE_DEFAULT INTELXVF_SRRCTL_BSIZE ( 0x02 )
#define INTELXVF_SRRCTL_BSIZE_MASK INTELXVF_SRRCTL_BSIZE ( 0x1f )
+#define INTELXVF_SRRCTL_BHDRSIZE(kb) ( (kb) << 8 ) /**< Header size */
+#define INTELXVF_SRRCTL_BHDRSIZE_DEFAULT INTELXVF_SRRCTL_BHDRSIZE ( 0x04 )
+#define INTELXVF_SRRCTL_BHDRSIZE_MASK INTELXVF_SRRCTL_BHDRSIZE ( 0x0f )
#define INTELXVF_SRRCTL_DESCTYPE(typ) ( (typ) << 25 ) /**< Descriptor type */
#define INTELXVF_SRRCTL_DESCTYPE_DEFAULT INTELXVF_SRRCTL_DESCTYPE ( 0x00 )
#define INTELXVF_SRRCTL_DESCTYPE_MASK INTELXVF_SRRCTL_DESCTYPE ( 0x07 )
+#define INTELXVF_SRRCTL_DROP_EN 0x10000000UL
/** Good Packets Received Count */
#define INTELXVF_GPRC 0x101c
@@ -84,7 +91,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define INTELXVF_MPRC 0x1034
/** Transmit Descriptor register block */
-#define INTELXVF_TD 0x2000UL
+#define INTELXVF_TD(n) ( 0x2000UL + ( 0x40 * (n) ) )
/** Good Packets Transmitted Count */
#define INTELXVF_GPTC 0x201c
@@ -101,4 +108,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** API version 1.1 */
#define INTELXVF_MSG_VERSION_1_1 0x00000002UL
+/** Number of queues */
+#define INTELXVF_NUM_RINGS 8
+
#endif /* _INTELXVF_H */