All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i40e: fix the issue of port initialization failure
@ 2015-12-23  5:32 Helin Zhang
  2016-02-03 16:31 ` Bruce Richardson
  2016-02-05  1:20 ` Zhang, Helin
  0 siblings, 2 replies; 6+ messages in thread
From: Helin Zhang @ 2015-12-23  5:32 UTC (permalink / raw)
  To: dev

Workaround for the issue of cannot processing adminq commands during
initialization, when 2x40G or 4x10G is receiving packets in highest
throughput. Register 0x002698a8 and 0x002698ac should be cleared at
first, and restored with the default values at the end. No more
details, as they are not exposed registers.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index bf6220d..149a31e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -712,6 +712,41 @@ i40e_add_tx_flow_control_drop_filter(struct i40e_pf *pf)
 				  " frames from VSIs.");
 }
 
+/* Workaround for the issue of cannot processing adminq commands during
+ * initialization, when 2x40G or 4x10G is receiving packets in highest
+ * throughput. Register 0x002698a8 and 0x002698ac should be cleared at
+ * first, and restored with the default values at the end. No more details,
+ * as they are not exposed registers.
+ */
+static void
+i40e_clear_fdena(struct i40e_hw *hw)
+{
+	uint32_t fdena0, fdena1;
+
+	fdena0 = I40E_READ_REG(hw, 0x002698a8);
+	fdena1 = I40E_READ_REG(hw, 0x002698ac);
+	PMD_INIT_LOG(DEBUG, "[0x002698a8]: 0x%08x, [0x002698ac]: 0x%08x",
+		     fdena0, fdena1);
+
+	I40E_WRITE_REG(hw, 0x002698a8, 0x0);
+	I40E_WRITE_REG(hw, 0x002698ac, 0x0);
+	I40E_WRITE_FLUSH(hw);
+}
+
+/* Workaround for the issue of cannot processing adminq commands during
+ * initialization, when 2x40G or 4x10G is receiving packets in highest
+ * throughput. Register 0x002698a8 and 0x002698ac should be cleared at
+ * first, and restored with the default values at the end. No more details,
+ * as they are not exposed registers.
+ */
+static void
+i40e_restore_fdena(struct i40e_hw *hw)
+{
+	I40E_WRITE_REG(hw, 0x002698a8, 0xfc000000);
+	I40E_WRITE_REG(hw, 0x002698ac, 0x80007fdf);
+	I40E_WRITE_FLUSH(hw);
+}
+
 static int
 eth_i40e_dev_init(struct rte_eth_dev *dev)
 {
@@ -774,6 +809,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return ret;
 	}
 
+	i40e_clear_fdena(hw);
+
 	/* Initialize the shared code (base driver) */
 	ret = i40e_init_shared_code(hw);
 	if (ret) {
@@ -934,6 +971,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		pf->flags &= ~I40E_FLAG_DCB;
 	}
 
+	i40e_restore_fdena(hw);
+
 	return 0;
 
 err_mac_alloc:
-- 
1.9.3

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

* Re: [PATCH] i40e: fix the issue of port initialization failure
  2015-12-23  5:32 [PATCH] i40e: fix the issue of port initialization failure Helin Zhang
@ 2016-02-03 16:31 ` Bruce Richardson
  2016-02-04  0:50   ` Zhang, Helin
  2016-02-05  1:20 ` Zhang, Helin
  1 sibling, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2016-02-03 16:31 UTC (permalink / raw)
  To: Helin Zhang; +Cc: dev

On Wed, Dec 23, 2015 at 01:32:59PM +0800, Helin Zhang wrote:
> Workaround for the issue of cannot processing adminq commands during
> initialization, when 2x40G or 4x10G is receiving packets in highest
> throughput. Register 0x002698a8 and 0x002698ac should be cleared at
> first, and restored with the default values at the end. No more
> details, as they are not exposed registers.
> 
> Signed-off-by: Helin Zhang <helin.zhang@intel.com>

Hi Helin,

can you please add an appropriately "fixes" line to the patch, since the
subject explicitly calls it out as a bug-fix. Also, the words "the issue" in
the subject can be removed as they don't add value. It would also be worthwhile
referencing the adminq in the subject too, since that is the failure being
reported. How about:

	"i40e: fix adminq failure on port init"

Regards,
/Bruce

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

* Re: [PATCH] i40e: fix the issue of port initialization failure
  2016-02-03 16:31 ` Bruce Richardson
@ 2016-02-04  0:50   ` Zhang, Helin
  2016-02-04  8:43     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Helin @ 2016-02-04  0:50 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev



> -----Original Message-----
> From: Richardson, Bruce
> Sent: Thursday, February 4, 2016 12:31 AM
> To: Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] i40e: fix the issue of port initialization failure
> 
> On Wed, Dec 23, 2015 at 01:32:59PM +0800, Helin Zhang wrote:
> > Workaround for the issue of cannot processing adminq commands during
> > initialization, when 2x40G or 4x10G is receiving packets in highest
> > throughput. Register 0x002698a8 and 0x002698ac should be cleared at
> > first, and restored with the default values at the end. No more
> > details, as they are not exposed registers.
> >
> > Signed-off-by: Helin Zhang <helin.zhang@intel.com>
> 
> Hi Helin,
> 
> can you please add an appropriately "fixes" line to the patch, since the subject
> explicitly calls it out as a bug-fix. Also, the words "the issue" in the subject can
> be removed as they don't add value. It would also be worthwhile referencing
> the adminq in the subject too, since that is the failure being reported. How
> about:
> 
> 	"i40e: fix adminq failure on port init"

Oh, sorry, I forgot this patch.
Firmware finally fixed it in FVL5, and we need to use new AQ commands for reading/writing some registers.
So I will drop this patch. Thanks!

Regards,
Helin

> 
> Regards,
> /Bruce

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

* Re: [PATCH] i40e: fix the issue of port initialization failure
  2016-02-04  0:50   ` Zhang, Helin
@ 2016-02-04  8:43     ` Thomas Monjalon
  2016-02-05  1:21       ` Zhang, Helin
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2016-02-04  8:43 UTC (permalink / raw)
  To: Zhang, Helin; +Cc: dev

2016-02-04 00:50, Zhang, Helin:
> From: Richardson, Bruce
> > can you please add an appropriately "fixes" line to the patch, since the subject
> > explicitly calls it out as a bug-fix. Also, the words "the issue" in the subject can
> > be removed as they don't add value. It would also be worthwhile referencing
> > the adminq in the subject too, since that is the failure being reported. How
> > about:
> > 
> > 	"i40e: fix adminq failure on port init"
> 
> Oh, sorry, I forgot this patch.
> Firmware finally fixed it in FVL5, and we need to use new AQ commands for reading/writing some registers.
> So I will drop this patch. Thanks!

In such case, please mark it as "Rejected" in patchwork and self reply on the
mailing list to advertise it is dropped.
Thanks

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

* Re: [PATCH] i40e: fix the issue of port initialization failure
  2015-12-23  5:32 [PATCH] i40e: fix the issue of port initialization failure Helin Zhang
  2016-02-03 16:31 ` Bruce Richardson
@ 2016-02-05  1:20 ` Zhang, Helin
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang, Helin @ 2016-02-05  1:20 UTC (permalink / raw)
  To: dev



> -----Original Message-----
> From: Zhang, Helin
> Sent: Wednesday, December 23, 2015 1:33 PM
> To: dev@dpdk.org
> Cc: Xu, Qian Q; Zhang, Helin
> Subject: [PATCH] i40e: fix the issue of port initialization failure
> 
> Workaround for the issue of cannot processing adminq commands during
> initialization, when 2x40G or 4x10G is receiving packets in highest throughput.
> Register 0x002698a8 and 0x002698ac should be cleared at first, and restored
> with the default values at the end. No more details, as they are not exposed
> registers.
> 
> Signed-off-by: Helin Zhang <helin.zhang@intel.com>
NACK, as it will be fixed by firmware. This workaround in SW is not needed at all.

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

* Re: [PATCH] i40e: fix the issue of port initialization failure
  2016-02-04  8:43     ` Thomas Monjalon
@ 2016-02-05  1:21       ` Zhang, Helin
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Helin @ 2016-02-05  1:21 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, February 4, 2016 4:44 PM
> To: Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] i40e: fix the issue of port initialization failure
> 
> 2016-02-04 00:50, Zhang, Helin:
> > From: Richardson, Bruce
> > > can you please add an appropriately "fixes" line to the patch, since
> > > the subject explicitly calls it out as a bug-fix. Also, the words
> > > "the issue" in the subject can be removed as they don't add value.
> > > It would also be worthwhile referencing the adminq in the subject
> > > too, since that is the failure being reported. How
> > > about:
> > >
> > > 	"i40e: fix adminq failure on port init"
> >
> > Oh, sorry, I forgot this patch.
> > Firmware finally fixed it in FVL5, and we need to use new AQ commands for
> reading/writing some registers.
> > So I will drop this patch. Thanks!
> 
> In such case, please mark it as "Rejected" in patchwork and self reply on the
> mailing list to advertise it is dropped.
> Thanks
Done. Thanks!

Regards,
Helin

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

end of thread, other threads:[~2016-02-05  1:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-23  5:32 [PATCH] i40e: fix the issue of port initialization failure Helin Zhang
2016-02-03 16:31 ` Bruce Richardson
2016-02-04  0:50   ` Zhang, Helin
2016-02-04  8:43     ` Thomas Monjalon
2016-02-05  1:21       ` Zhang, Helin
2016-02-05  1:20 ` Zhang, Helin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.