net/bnxt: fix completion metadata format type for Thor
PATCH 1/1 net/bnxt: fix completion metadata format type for Thor
From: Shuanglin Wang <[email protected]>
For Thor, the default RX completion record metadata format should be set to Type 1 instead of Type 3. Using the wrong type causes the driver to misinterpret completion records.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +6 -3
@@ -480,10 +480,13 @@ bnxt_ulp_port_init(struct bnxt *bp)/* Make sure that custom header data is selected */ if (dev_id >BNXT_ULP_DEVICE_ID_WH_PLUS ) {struct bnxt_vnic_info *vnic = bp->vnic_info; - vnic->metadata_format =HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3 ; +if (dev_id ==BNXT_ULP_DEVICE_ID_THOR2 ) + vnic->metadata_format =HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3 ; +else + vnic->metadata_format =HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_1 ; rc =bnxt_hwrm_vnic_update (bp, - vnic, -HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID ); + vnic, +HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID );if (unlikely (rc)) {BNXT_DRV_DBG (ERR ,"Failed to set metadata format\n" ); goto jump_to_error;
Signature · 1 line
2.31.1
PATCH v2 1/1 net/bnxt: fix completion metadata format type for Thor
From: Shuanglin Wang <[email protected]>
For Thor, the default RX completion record metadata format should be set to Type 1 instead of Type 3. Using the incorrect type causes the driver to misinterpret the completion records. Thor2 continues to use Type 3.
---
v2:
* Fix the Fixes: tag to point to the commit that introduced the issue (dd0191d5e70d).
* Restore original indentation of the unrelated bnxt_hwrm_vnic_update() arguments.
* Mention that Thor2 keeps Type 3 in the commit message.
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +4 -1
@@ -480,7 +480,10 @@ bnxt_ulp_port_init(struct bnxt *bp)/* Make sure that custom header data is selected */ if (dev_id >BNXT_ULP_DEVICE_ID_WH_PLUS ) {struct bnxt_vnic_info *vnic = bp->vnic_info; - vnic->metadata_format =HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3 ; +if (dev_id ==BNXT_ULP_DEVICE_ID_THOR2 ) + vnic->metadata_format =HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3 ; +else + vnic->metadata_format =HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_1 ; rc =bnxt_hwrm_vnic_update (bp, vnic,HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID );
Signature · 1 line
2.31.1