Skip to content

Commit

Permalink
common/cnxk: fix mbox region copy
Browse files Browse the repository at this point in the history
[ upstream commit 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 ]

Using proper API to perform copy to mbox device memory region

Fixes: 0271990 ("common/cnxk: send link status event to VF")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
  • Loading branch information
Harman Kalra authored and bluca committed Mar 7, 2024
1 parent f1110aa commit 079911f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/common/cnxk/roc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
vf_msg = mbox_alloc_msg(&dev->mbox_vfpf_up, vf, sz);
if (vf_msg) {
mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg);
memcpy((uint8_t *)vf_msg +
sizeof(struct mbox_msghdr), &linfo,
sizeof(struct cgx_link_user_info));
mbox_memcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr), &linfo,
sizeof(struct cgx_link_user_info));

vf_msg->rc = msg->rc;
vf_msg->pcifunc = msg->pcifunc;
Expand Down

0 comments on commit 079911f

Please sign in to comment.