From: Luca Boccassi <bluca@debian.org>
To: dev@dpdk.org
Cc: wenzhuo.lu@intel.com, Luca Boccassi <bluca@debian.org>
Subject: [dpdk-dev] [PATCH] net/e1000: enable MSI-x for linkup and other events in 82574
Date: Fri, 27 Jul 2018 19:13:17 +0100 [thread overview]
Message-ID: <20180727181317.7374-1-bluca@debian.org> (raw)
Linux supports 82574 MSI-x interrupt for linkup and other link
conditions. Enable the same feature in the e1000 PMD in order to
allow this card to work properly, as it requires interrupt
handling for link negotiations among other things.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
Hi Wenzhuo - just to make it clear, this patch and the previous are
not targeted for 18.08, just clearing my queue.
drivers/net/e1000/base/e1000_82571.c | 5 +++++
drivers/net/e1000/em_ethdev.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 7c279dbb3..397dd9482 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1257,6 +1257,11 @@ STATIC s32 e1000_init_hw_82571(struct e1000_hw *hw)
*/
e1000_clear_hw_cntrs_82571(hw);
+ /* MSI-X configure for 82574 */
+ if (mac->type == e1000_82574)
+ E1000_WRITE_REG(hw, E1000_IVAR,
+ (E1000_IVAR_INT_ALLOC_VALID << 16));
+
return ret_val;
}
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 7039dc100..bd05e4de0 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1444,7 +1444,8 @@ eth_em_interrupt_setup(struct rte_eth_dev *dev)
/* clear interrupt */
E1000_READ_REG(hw, E1000_ICR);
regval = E1000_READ_REG(hw, E1000_IMS);
- E1000_WRITE_REG(hw, E1000_IMS, regval | E1000_ICR_LSC);
+ E1000_WRITE_REG(hw, E1000_IMS,
+ regval | E1000_ICR_LSC | E1000_ICR_OTHER);
return 0;
}
@@ -1494,7 +1495,7 @@ em_rxq_intr_enable(struct e1000_hw *hw)
static void
em_lsc_intr_disable(struct e1000_hw *hw)
{
- E1000_WRITE_REG(hw, E1000_IMC, E1000_IMS_LSC);
+ E1000_WRITE_REG(hw, E1000_IMC, E1000_IMS_LSC | E1000_IMS_OTHER);
E1000_WRITE_FLUSH(hw);
}
--
2.18.0
next reply other threads:[~2018-07-27 18:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 18:13 Luca Boccassi [this message]
2018-09-26 10:23 ` Luca Boccassi
2018-10-09 10:16 ` Zhao1, Wei
2018-10-09 10:32 ` Luca Boccassi
2018-10-10 7:13 ` Zhao1, Wei
2018-10-10 17:58 ` Zhang, Qi Z
2018-10-09 10:29 ` Zhao1, Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180727181317.7374-1-bluca@debian.org \
--to=bluca@debian.org \
--cc=dev@dpdk.org \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).