From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3B48EA00E6 for ; Thu, 16 May 2019 23:35:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE094397D; Thu, 16 May 2019 23:35:39 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 5D90B397D for ; Thu, 16 May 2019 23:35:38 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id c77so3539631wmd.1 for ; Thu, 16 May 2019 14:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cnqtb8M7hB1UQzfWzLudu6GHzOqV5JDflkp4vnY+8ak=; b=q7musvoPK4k5C7tHMQfhQb48/nI6bYaOGzv+Ovje9BFK8zcO2L2B1SFE04+MN/fosX +ZstJVkUvLdL6JCVF7UKF+KhlkvqxyjhWJnHLuCUrqLPhMzU0G4di6m4i8yPwxNgFW9l XO4Rz2x9LiKXTtpX5Tz7itdvI9cIuikmjLnuqHs8ArKK6aU3vBWM0JxzTzUJ1Pw/3cGU eJPVxfy/Pw6/cN/EG7aEz6MdLMrvduXAObhaI1mQY0xP15I0PipbLSlb49pyNnlaRRwB 42sfvf8ELViZJPGyxKlU8QQ/6AhR7JXKZcDjEPdHxZv26pfEYAZlhPtjd2jPoGFoO6/D mezw== 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:in-reply-to :references; bh=cnqtb8M7hB1UQzfWzLudu6GHzOqV5JDflkp4vnY+8ak=; b=O6kqeFAwPdbNieDhUYCIOfekl514J+sEQ6AXgZBnOQ/E/LPUdCUtTNgraa7j2Fq0oH 2xHEhSg/tJ8KsV9dxHAOeDF2SpLt47NJJg263habwRDDr1OC3VO66lfc1/1yx37hug96 tAbvsEqO6cCSbQhLuar5zpqB1aBbGILVcNByHBu69XVisgx7LeQWSAU1U4n44M6rWwXg w2bljmID8npZ2bnEssgoR7+8iNejPkYvLMT9tIfvvyjmwy+OZRvwgrcFqmH5tNAiAjhU 2UM+z8jIdL36e8TEq2FFYVKPjR802lnStVH5Te/8XJ6Srjk94+XFn6+zE2YC9y+kmv6Y YnZg== X-Gm-Message-State: APjAAAX4yqeKcxJb4EyobT2j8S9q6OQ5XYh43MkzLXQ54TLv20f8jNlP +scj3HrhRoW1SQf2UJwy/IA= X-Google-Smtp-Source: APXvYqygC4WUWI6fhBG9fmy8q1E/MRALqctJcY6NrVqupyjRItyXLmL27o+0oIu6WQWjUqtCqb1dFQ== X-Received: by 2002:a1c:1d09:: with SMTP id d9mr17170794wmd.55.1558042538102; Thu, 16 May 2019 14:35:38 -0700 (PDT) Received: from schoudah-dev.localdomain (host81-147-150-50.range81-147.btcentralplus.com. [81.147.150.50]) by smtp.gmail.com with ESMTPSA id b5sm6029396wrp.92.2019.05.16.14.35.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 14:35:37 -0700 (PDT) From: Shweta Choudaha To: shweta.choudaha@att.com Cc: stable@dpdk.org Date: Thu, 16 May 2019 22:35:27 +0100 Message-Id: <20190516213527.90064-2-shweta.choudaha@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190516213527.90064-1-shweta.choudaha@gmail.com> References: <20190516213527.90064-1-shweta.choudaha@gmail.com> Subject: [dpdk-stable] [PATCH 1/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Shweta Choudaha When PHY reset is blocked as is the case when BMC is connected via NC-SI do not set GO_LINKD bit in PHY power management register in dev_stop as this will disconnect the PHY. Also, in dev_close clear the GO_LINKD bit only if PHY reset is not blocked Fixes: 3af34dec0b41 ("igb: force phy power up/down") CC: stable@dpdk.org Signed-off-by: Shweta Choudaha --- drivers/net/e1000/igb_ethdev.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index d3a8f5bf4..d0de15531 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1515,8 +1515,10 @@ eth_igb_stop(struct rte_eth_dev *dev) igb_pf_reset_hw(hw); E1000_WRITE_REG(hw, E1000_WUC, 0); - /* Set bit for Go Link disconnect */ - if (hw->mac.type >= e1000_82580) { + + /* Set bit for Go Link disconnect if PHY reset is not blocked */ + if ((hw->mac.type >= e1000_82580) && + (e1000_check_reset_block(hw) != E1000_BLK_PHY_RESET)) { uint32_t phpm_reg; phpm_reg = E1000_READ_REG(hw, E1000_82580_PHY_POWER_MGMT); @@ -1590,8 +1592,9 @@ eth_igb_close(struct rte_eth_dev *dev) igb_release_manageability(hw); igb_hw_control_release(hw); - /* Clear bit for Go Link disconnect */ - if (hw->mac.type >= e1000_82580) { + /* Clear bit for Go Link disconnect if PHY reset is not blocked */ + if ((hw->mac.type >= e1000_82580) && + (e1000_check_reset_block(hw) != E1000_BLK_PHY_RESET)) { uint32_t phpm_reg; phpm_reg = E1000_READ_REG(hw, E1000_82580_PHY_POWER_MGMT); -- 2.11.0