[dpdk-dev] net/ixgbe: fix hardware reset issue in VF

Message ID 20180129080726.77589-1-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Helin Zhang
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Zhao1, Wei Jan. 29, 2018, 8:07 a.m. UTC
  There is no specific handling when there is error happened
of hardware reset process in VF device start process.

Fixes: 0a45657a6794a ("pci: rework interrupt handling")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Wenzhuo Lu Jan. 30, 2018, 2:25 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, January 29, 2018 4:07 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhao1, Wei
> <wei.zhao1@intel.com>
> Subject: [PATCH] net/ixgbe: fix hardware reset issue in VF
> 
> There is no specific handling when there is error happened of hardware
> reset process in VF device start process.
> 
> Fixes: 0a45657a6794a ("pci: rework interrupt handling")
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Please cc stable next time if it fixes an old issue. Thanks.
  
Zhao1, Wei Jan. 30, 2018, 2:26 a.m. UTC | #2
Ok.

> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Tuesday, January 30, 2018 10:25 AM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH] net/ixgbe: fix hardware reset issue in VF
> 
> Hi,
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Monday, January 29, 2018 4:07 PM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhao1, Wei
> > <wei.zhao1@intel.com>
> > Subject: [PATCH] net/ixgbe: fix hardware reset issue in VF
> >
> > There is no specific handling when there is error happened of hardware
> > reset process in VF device start process.
> >
> > Fixes: 0a45657a6794a ("pci: rework interrupt handling")
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> 
> Please cc stable next time if it fixes an old issue. Thanks.
  
Zhang, Helin Jan. 30, 2018, 6:03 a.m. UTC | #3
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuo
> Sent: Tuesday, January 30, 2018 10:25 AM
> To: Zhao1, Wei; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix hardware reset issue in VF
> 
> Hi,
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Monday, January 29, 2018 4:07 PM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhao1, Wei
> > <wei.zhao1@intel.com>
> > Subject: [PATCH] net/ixgbe: fix hardware reset issue in VF
> >
> > There is no specific handling when there is error happened of hardware
> > reset process in VF device start process.
> >
> > Fixes: 0a45657a6794a ("pci: rework interrupt handling")
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Applied to dpdk-next-net-intel, with commit log changes, thanks!

/Helin

> 
> Please cc stable next time if it fixes an old issue. Thanks.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 4f4334d..585c77c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5001,7 +5001,11 @@  ixgbevf_dev_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	hw->mac.ops.reset_hw(hw);
+	err = hw->mac.ops.reset_hw(hw);
+	if (err) {
+		PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)", err);
+		return err;
+	}
 	hw->mac.get_link_status = true;
 
 	/* negotiate mailbox API version to use with the PF. */