X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Ftfp.c;h=a4b0934610f7383b290ae68b4b4c4741bf0adad4;hb=f1f6ebc0eaf68a825c6175f5e6a436f7d91660c3;hp=0f6d63cc0066da05aae47c22ab90176905b5f524;hpb=0ea250f896ca197bbf79e6920abff4531ced0c2c;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/tfp.c b/drivers/net/bnxt/tf_core/tfp.c index 0f6d63cc00..a4b0934610 100644 --- a/drivers/net/bnxt/tf_core/tfp.c +++ b/drivers/net/bnxt/tf_core/tfp.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * see the individual elements. - * Copyright(c) 2019-2020 Broadcom + * Copyright(c) 2019-2021 Broadcom * All rights reserved. */ @@ -28,7 +28,7 @@ * Returns success or failure code. */ int -tfp_send_msg_direct(struct tf *tfp, +tfp_send_msg_direct(struct bnxt *bp, struct tfp_send_msg_parms *parms) { int rc = 0; @@ -40,9 +40,7 @@ tfp_send_msg_direct(struct tf *tfp, if (parms->mailbox == TF_CHIMP_MB) use_kong_mb = 0; - rc = bnxt_hwrm_tf_message_direct(container_of(tfp, - struct bnxt, - tfp), + rc = bnxt_hwrm_tf_message_direct(bp, use_kong_mb, parms->tf_type, parms->req_data, @@ -53,40 +51,6 @@ tfp_send_msg_direct(struct tf *tfp, return rc; } -/** - * Sends preformatted TruFlow msg to the TruFlow Firmware using - * the Truflow tunnel HWRM message type. - * - * Returns success or failure code. - */ -int -tfp_send_msg_tunneled(struct tf *tfp, - struct tfp_send_msg_parms *parms) -{ - int rc = 0; - uint8_t use_kong_mb = 1; - - if (parms == NULL) - return -EINVAL; - - if (parms->mailbox == TF_CHIMP_MB) - use_kong_mb = 0; - - rc = bnxt_hwrm_tf_message_tunneled(container_of(tfp, - struct bnxt, - tfp), - use_kong_mb, - parms->tf_type, - parms->tf_subtype, - &parms->tf_resp_code, - parms->req_data, - parms->req_size, - parms->resp_data, - parms->resp_size); - - return rc; -} - /** * Allocates zero'ed memory from the heap. * @@ -170,7 +134,7 @@ tfp_get_fid(struct tf *tfp, uint16_t *fw_fid) if (tfp == NULL || fw_fid == NULL) return -EINVAL; - bp = container_of(tfp, struct bnxt, tfp); + bp = (struct bnxt *)tfp->bp; if (bp == NULL) return -EINVAL; @@ -187,7 +151,7 @@ tfp_get_pf(struct tf *tfp, uint16_t *pf) if (tfp == NULL || pf == NULL) return -EINVAL; - bp = container_of(tfp, struct bnxt, tfp); + bp = (struct bnxt *)tfp->bp; if (BNXT_VF(bp) && bp->parent) { *pf = bp->parent->fid - 1; return 0;