diff mbox

[dpdk-dev,v2,1/2] i40e: do not use macros defined in i40e_register_x710_int.h

Message ID 1414566571-25829-2-git-send-email-helin.zhang@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Helin Zhang Oct. 29, 2014, 7:09 a.m. UTC
As i40e_register_x710_int.h is for early hardware only and
should be removed finally, the macros defiend in it should
not be used. For those registers which is not defined, just
define it in code directly as workaround.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

v2 changes:
* Added back writing the register of I40E_GLINT_CTL.
* Defined I40E_GLINT_CTL and its relevant,
  i40e_register_x710_int.h will be deleted.
diff mbox

Patch

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index e1f581a..6f2ceb2 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -51,7 +51,6 @@ 
 #include <rte_eth_ctrl.h>
 
 #include "i40e_logs.h"
-#include "i40e/i40e_register_x710_int.h"
 #include "i40e/i40e_prototype.h"
 #include "i40e/i40e_adminq_cmd.h"
 #include "i40e/i40e_type.h"
@@ -609,6 +608,10 @@  i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
 		I40E_WRITE_REG(hw, I40E_PFINT_ITRN(I40E_ITR_INDEX_DEFAULT,
 				msix_vect - 1), interval);
 
+#ifndef I40E_GLINT_CTL
+#define I40E_GLINT_CTL                     0x0003F800
+#define I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK 0x4
+#endif
 		/* Disable auto-mask on enabling of all none-zero  interrupt */
 		I40E_WRITE_REG(hw, I40E_GLINT_CTL,
 				I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK);