DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ian Stokes <ian.stokes@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, Ian Stokes <ian.stokes@intel.com>
Subject: [PATCH] net/ice: fix DCF init for E830 devices
Date: Fri, 19 Jul 2024 14:44:27 +0100	[thread overview]
Message-ID: <20240719134427.10512-1-ian.stokes@intel.com> (raw)

From: Bruce Richardson <bruce.richardson@intel.com>

E830 introduces a new version of Get Link Status Data
which increases the size of struct ice_aqc_get_link_status_data
from 32 bytes to 56. When initializing DCF, attempt to get
link status data using both formats of the command, by overriding
the mac type to E830 on failure with the default setting.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
---
 drivers/net/ice/ice_dcf_parent.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index 4e4a63fdd0..f92bd5e726 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -346,8 +346,19 @@ ice_dcf_init_parent_hw(struct ice_hw *hw)
 
 	/* Initialize port_info struct with link information */
 	status = ice_aq_get_link_info(hw->port_info, true, NULL, NULL);
-	if (status)
-		goto err_unroll_alloc;
+	if (status) {
+		enum ice_mac_type type = hw->mac_type;
+
+		/* DCF uses ICE_MAC_GENERIC which can be talking to either
+		 * E810 or E830. Retry with E830 mac type to ensure correct
+		 * data length is used for IAVF communication with PF.
+		 */
+		hw->mac_type = ICE_MAC_E830;
+		status = ice_aq_get_link_info(hw->port_info, true, NULL, NULL);
+		hw->mac_type = type;
+		if (status)
+			goto err_unroll_alloc;
+	}
 
 	status = ice_init_fltr_mgmt_struct(hw);
 	if (status)
-- 
2.34.1


             reply	other threads:[~2024-07-19 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 13:44 Ian Stokes [this message]
2024-07-22 11:41 ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240719134427.10512-1-ian.stokes@intel.com \
    --to=ian.stokes@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).