From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id E77BC5688 for ; Fri, 27 Jul 2018 20:13:22 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id y2-v6so6162810wma.1 for ; Fri, 27 Jul 2018 11:13:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BDlS+4+DgWIMj9DRrtmRYRSjis1Kfl2pLhjXWO4Lml0=; b=VbZMzjcE+90P0ZJsaL4238vX8yV0Sta+0wIlHYDXR+dap+nMrH0JsR/Nuff1YK22yH Gpbmu68DlPtH3Lx/GgpCvVGwx4mW628YbnSPo31fFFIUm4Xl/Ir4HN2GkyNzuiAhAQpc 7s5lbiOAPkI5lgIduqOC5IEYlikTiCJVl+jkDlm1rCA+I7kB1Ai+kuc0GZrcoYAetTOi ZoxmPL9wUzEtwCR2j4cZHTIn7/ccCOQT5PCZ6nXkkQTER9W0QtH6HHDBYEh6x0ga+Mnr zuCkIqRNhNFoMJWGIAIP+QNWzgUU9n3GPwwRAAkqEJzIH8OVPxYPt5VbeCzLARGiGj3V OaUA== X-Gm-Message-State: AOUpUlFTLYXP0hre7k1mMX2G5OeGUGpd57TSTVA+vFgEbJXCuwmkt273 cSg/ExtwzSkM30ph98Lr01JOHsd+aU4= X-Google-Smtp-Source: AAOMgpfZFOrWikFvNVyn7yGvmyhGKT9jEl8VGfh3nGk9HfGcszU8f5ZdJZAwocMpcK3Abc8lamJ1uw== X-Received: by 2002:a1c:c912:: with SMTP id f18-v6mr5414080wmb.73.1532715202269; Fri, 27 Jul 2018 11:13:22 -0700 (PDT) Received: from localhost ([2a00:23c5:be94:4600:7b12:f8a0:fd52:f87d]) by smtp.gmail.com with ESMTPSA id s16-v6sm3893269wrq.20.2018.07.27.11.13.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jul 2018 11:13:21 -0700 (PDT) From: Luca Boccassi To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, Luca Boccassi Date: Fri, 27 Jul 2018 19:13:17 +0100 Message-Id: <20180727181317.7374-1-bluca@debian.org> X-Mailer: git-send-email 2.18.0 Subject: [dpdk-dev] [PATCH] net/e1000: enable MSI-x for linkup and other events in 82574 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 18:13:23 -0000 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 --- 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