net/e1000: fix link status

Message ID 20191113124659.88561-1-lunyuanx.cui@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/e1000: fix link status |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Cui, LunyuanX Nov. 13, 2019, 12:46 p.m. UTC
  The link status got from link status register was not correct,
because register has been reset when ports reset.
After port reset, set the link status down.

Fixes: c431ec66c54c ("net/igb: support setting link up or down")
Cc: stable@dpdk.org

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Wenzhuo Lu Nov. 26, 2019, 2:38 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Cui, LunyuanX
> Sent: Wednesday, November 13, 2019 8:47 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Cui, LunyuanX <lunyuanx.cui@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/e1000: fix link status
> 
> The link status got from link status register was not correct, because register
> has been reset when ports reset.
> After port reset, set the link status down.
> 
> Fixes: c431ec66c54c ("net/igb: support setting link up or down")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
  
Xiaolong Ye Nov. 26, 2019, 2:39 a.m. UTC | #2
On 11/26, Lu, Wenzhuo wrote:
>Hi,
>
>> -----Original Message-----
>> From: Cui, LunyuanX
>> Sent: Wednesday, November 13, 2019 8:47 PM
>> To: dev@dpdk.org
>> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
>> <qiming.yang@intel.com>; Cui, LunyuanX <lunyuanx.cui@intel.com>;
>> stable@dpdk.org
>> Subject: [PATCH] net/e1000: fix link status
>> 
>> The link status got from link status register was not correct, because register
>> has been reset when ports reset.
>> After port reset, set the link status down.
>> 
>> Fixes: c431ec66c54c ("net/igb: support setting link up or down")
>> Cc: stable@dpdk.org
>> 
>> Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
>Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

Patch

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 369a978ad..83102f2ad 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -891,6 +891,8 @@  eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	/* enable support intr */
 	igb_intr_enable(eth_dev);
 
+	eth_igb_dev_set_link_down(eth_dev);
+
 	/* initialize filter info */
 	memset(filter_info, 0,
 	       sizeof(struct e1000_filter_info));