DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked
@ 2019-05-16 21:45 Shweta Choudaha
  2019-05-16 21:45 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha
  0 siblings, 1 reply; 5+ messages in thread
From: Shweta Choudaha @ 2019-05-16 21:45 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, shweta.choudaha

From: Shweta Choudaha <shweta.choudaha@att.com>

Hello,

 This fixes an issue where GO_LINKD bit is incorrectly set/cleared even when PHY reset is blocked.
Fixes f34dec0b41 ("igb: force phy power up/down")

Thanks,
Shweta

Shweta Choudaha (1):
  net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked

 drivers/net/e1000/igb_ethdev.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 1/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked
  2019-05-16 21:45 [dpdk-dev] [PATCH 0/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked Shweta Choudaha
@ 2019-05-16 21:45 ` Shweta Choudaha
  2019-05-16 22:03   ` [dpdk-dev] [PATCH v2 0/1] " Shweta Choudaha
  0 siblings, 1 reply; 5+ messages in thread
From: Shweta Choudaha @ 2019-05-16 21:45 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, shweta.choudaha, stable

From: Shweta Choudaha <shweta.choudaha@att.com>

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 <shweta.choudaha@att.com>
---
 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2 0/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked
  2019-05-16 21:45 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha
@ 2019-05-16 22:03   ` Shweta Choudaha
  2019-05-16 22:03     ` [dpdk-dev] [PATCH v2 1/1] " Shweta Choudaha
  0 siblings, 1 reply; 5+ messages in thread
From: Shweta Choudaha @ 2019-05-16 22:03 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, shweta.choudaha

From: Shweta Choudaha <shweta.choudaha@att.com>

Hello,

 This patch fixes an issue where GO_LINKD bit is incorrectly set/cleared even when PHY reset is blocked
and is updated to fix the checkpatch warning
Fixes f34dec0b41 ("igb: force phy power up/down")

Thanks,
Shweta

Shweta Choudaha (1):
  net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked

 drivers/net/e1000/igb_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2 1/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked
  2019-05-16 22:03   ` [dpdk-dev] [PATCH v2 0/1] " Shweta Choudaha
@ 2019-05-16 22:03     ` Shweta Choudaha
  2019-10-28  6:40       ` Ye Xiaolong
  0 siblings, 1 reply; 5+ messages in thread
From: Shweta Choudaha @ 2019-05-16 22:03 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, shweta.choudaha, stable

From: Shweta Choudaha <shweta.choudaha@att.com>

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 <shweta.choudaha@att.com>
---
 drivers/net/e1000/igb_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index d3a8f5bf4..4d4065d05 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1515,8 +1515,9 @@ 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 +1591,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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked
  2019-05-16 22:03     ` [dpdk-dev] [PATCH v2 1/1] " Shweta Choudaha
@ 2019-10-28  6:40       ` Ye Xiaolong
  0 siblings, 0 replies; 5+ messages in thread
From: Ye Xiaolong @ 2019-10-28  6:40 UTC (permalink / raw)
  To: Shweta Choudaha; +Cc: dev, wenzhuo.lu, shweta.choudaha, stable

On 05/16, Shweta Choudaha wrote:
>From: Shweta Choudaha <shweta.choudaha@att.com>
>
>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 <shweta.choudaha@att.com>
>---
> drivers/net/e1000/igb_ethdev.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
>index d3a8f5bf4..4d4065d05 100644
>--- a/drivers/net/e1000/igb_ethdev.c
>+++ b/drivers/net/e1000/igb_ethdev.c
>@@ -1515,8 +1515,9 @@ 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 +1591,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
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-28  6:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 21:45 [dpdk-dev] [PATCH 0/1] net/e1000: set/clear GO_LINKD bit only if PHY reset is not blocked Shweta Choudaha
2019-05-16 21:45 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha
2019-05-16 22:03   ` [dpdk-dev] [PATCH v2 0/1] " Shweta Choudaha
2019-05-16 22:03     ` [dpdk-dev] [PATCH v2 1/1] " Shweta Choudaha
2019-10-28  6:40       ` Ye Xiaolong

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).