From patchwork Thu May 16 21:45:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shweta Choudaha X-Patchwork-Id: 53500 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03D525F0F; Thu, 16 May 2019 23:46:18 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 9197C5F0D; Thu, 16 May 2019 23:46:16 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id t5so3519800wmh.3; Thu, 16 May 2019 14:46:16 -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=YMLU0Ksb+83MUSxSj3uPVtm6ItRMjpfMfu7C1OaOxDolFTTMb68z9sNTietEkLawpY 0IsvDzZsL/vN7qa3K41hvPqy0/BdqE+4IFGDzqa1rILtJZLBFoWjtNb+vsnfe0KVxSFQ xHjMLKeEKey1ptwxER6U+FmjYco/Cbiiyb3RxOO49ZHtFuqIjI5ctcIlHKadkkho8LwQ S4EPmV+tZNvXlZDVxjkvqZ6Ss3LqV/dDpr9TJOleLt0iXrBeQ2RmNZHbOREiMF0p4tjK PFzhm4cUTExo8FAGwERo3huSL0APZ8FcC9JiHoNFK8nuE859pnbLrcTMU99jwg9MJ4hl yE/Q== 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=FVNB0xcomyMV91ZT13N3pCDCZ9ZqPCwsUSi1z8lbZGQPjs80U7Mj+5VhANT2g0J22g DeN7rZHXb7/sdW7xp4xJAzC0T/r1LsChUE0Wcf6EUUe5PIg9rFqhK1iYhnSgIvQ8asox 6hCp1qLV2zRKjElcZh6cHMWC7nlyMTV7ILwYnJ9oGH++73qog2X0VQwTH0jNLGH0/1b6 dywpJsgjCPkwbGODFJbnDhwDLerB7gX4AvnGEUMl5ma2Wd/eSGqrYfF3CX2RFrupLUbu StjhiW69h0pm02BM3Bt17rGzgwtpb7aEwsLiQK6G1bX8qi5U4lSdL1qjav5xUnPyAM7W bNOA== X-Gm-Message-State: APjAAAWnLt/ELuOyLF3t4aU/YPesRYH5AkL5vVZobKmug3qpTjaMvpTW oZwrSS6T8Tsrwy1QhrF/SSOEEhonK5k= X-Google-Smtp-Source: APXvYqxx/Was226iYgTDkNKldKOcReRtachkI0TsWQcFCilwA1Ys8kpeHmSV2/ySEB3myaIqeltN7w== X-Received: by 2002:a1c:f910:: with SMTP id x16mr3294544wmh.132.1558043176234; Thu, 16 May 2019 14:46:16 -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 z8sm5482869wrs.84.2019.05.16.14.46.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 14:46:15 -0700 (PDT) From: Shweta Choudaha To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, shweta.choudaha@att.com, stable@dpdk.org Date: Thu, 16 May 2019 22:45:35 +0100 Message-Id: <20190516214535.90650-2-shweta.choudaha@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190516214535.90650-1-shweta.choudaha@gmail.com> References: <20190516214535.90650-1-shweta.choudaha@gmail.com> Subject: [dpdk-dev] [PATCH 1/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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);