Skip to content

Commit

Permalink
kmod/vdpa: use lower 4-bytes for signature
Browse files Browse the repository at this point in the history
The upper 4-bytes are reserved by the firmware for
storing meta data. Use only lower 4-bytes to update
the signature details.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Change-Id: I9f8a9d7c783e7849d00f623e49822ca0d02f48cc
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/143087
Tested-by: sa_ip-toolkits-Jenkins <sa_ip-toolkits-jenkins@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Shijith Thotton <sthotton@marvell.com>
  • Loading branch information
Vamsi Attunuru authored and jerinjacobk committed Jan 28, 2025
1 parent efde8c0 commit 2f7d33a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kmod/vdpa/octeon_ep/octep_vdpa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,10 @@ static const struct vdpa_mgmtdev_ops octep_vdpa_mgmt_dev_ops = {

static bool get_device_ready_status(u8 __iomem *addr)
{
u64 signature = readq(addr + OCTEP_VF_MBOX_DATA(0));
u32 signature = readl(addr + OCTEP_VF_MBOX_DATA(0));

if (signature == OCTEP_DEV_READY_SIGNATURE) {
writeq(0, addr + OCTEP_VF_MBOX_DATA(0));
writel(0, addr + OCTEP_VF_MBOX_DATA(0));
return true;
}

Expand Down Expand Up @@ -777,7 +777,7 @@ static int octep_sriov_enable(struct pci_dev *pdev, int num_vfs)
rpvf = FIELD_GET(GENMASK_ULL(35, 32), val);
if (done) {
for (i = 0; i < pf->enabled_vfs; i++)
writeq(OCTEP_DEV_READY_SIGNATURE, addr + OCTEP_PF_MBOX_DATA(i * rpvf));
writel(OCTEP_DEV_READY_SIGNATURE, addr + OCTEP_PF_MBOX_DATA(i * rpvf));
}

return num_vfs;
Expand Down

0 comments on commit 2f7d33a

Please sign in to comment.