From: Yong Liu Date: Thu, 29 Oct 2015 09:18:43 +0000 (+0800) Subject: e1000: restrict link interrupt setup scope X-Git-Tag: spdx-start~8294 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=667b9313f9ed513057fda21ecd92cb8fa13bb7e1;p=dpdk.git e1000: restrict link interrupt setup scope Only mask lsc interrupt bit when setup device interrupt. Signed-off-by: Marvin Liu Acked-by: Cunming Liang --- diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 912f5dd8b3..4e75101940 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1268,11 +1268,14 @@ em_intr_disable(struct e1000_hw *hw) static int eth_em_interrupt_setup(struct rte_eth_dev *dev) { + uint32_t regval; struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); - E1000_WRITE_REG(hw, E1000_IMS, E1000_ICR_LSC); - rte_intr_enable(&(dev->pci_dev->intr_handle)); + /* 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); return (0); }