[v2,119/148] net/ice/base: support E830 in Topology AQ command

Message ID fd91804ae55b4404fb159e0ed33ab8d8c3bdeabb.1718204529.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Bruce Richardson
Headers
Series Update net/ice base driver to latest upstream snapshot |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Burakov, Anatoly June 12, 2024, 3:01 p.m. UTC
In E830, regarding the Get Tx Topology AQ command, there is a change in
the way that the RD bit must be set. For E830, the RD bit must be
cleared. Setting the RD bit for the E830 device was causing the Get Tx
Topology command to fail.

Fix it to clear RD bit for E830 device.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ice/base/ice_ddp.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
index 798abb41c4..af843f4e08 100644
--- a/drivers/net/ice/base/ice_ddp.c
+++ b/drivers/net/ice/base/ice_ddp.c
@@ -2301,11 +2301,16 @@  ice_get_set_tx_topo(struct ice_hw *hw, u8 *buf, u16 buf_size,
 		if (buf)
 			cmd->set_flags |= ICE_AQC_TX_TOPO_FLAGS_SRC_RAM |
 					  ICE_AQC_TX_TOPO_FLAGS_LOAD_NEW;
+
+		desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);
 	} else {
 		ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_tx_topo);
 		cmd->get_flags = ICE_AQC_TX_TOPO_GET_RAM;
+
+		if (!ice_is_e830(hw))
+			desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);
 	}
-	desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);
+
 	status = ice_aq_send_cmd(hw, &desc, buf, buf_size, cd);
 	if (status)
 		return status;