Skip to contentSkip to conversation

common/octeontx2: upgrade the mbox definition to version 2

PATCH Applied Nithin Dabilpuram 2 participants 2 messages Oct 14, 2019 – Oct 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/octeontx2: upgrade the mbox definition to version 2

Sync mail box data structures to version 0x0002. This patch checks for mismatch in mail box revision and avoids initializing octeontx2 pci device if there is a mismatch.

---
 drivers/common/octeontx2/otx2_mbox.c |   6 ++
 drivers/common/octeontx2/otx2_mbox.h | 190 +++++++++++++++++++++++++++++------
 2 files changed, 165 insertions(+), 31 deletions(-)
drivers/common/octeontx2/otx2_mbox.c +6 -0
index 86559fa..c359bf4 100644
@@ -364,6 +364,12 @@ otx2_send_ready_msg(struct otx2_mbox *mbox, uint16_t *pcifunc)
 	if (rc)
 		return rc;
 
+	if (rsp->hdr.ver != OTX2_MBOX_VERSION) {
+		otx2_err("Incompatible MBox versions(AF: 0x%04x DPDK: 0x%04x)",
+			  rsp->hdr.ver, OTX2_MBOX_VERSION);
+		return -EPIPE;
+	}
+
 	if (pcifunc)
 		*pcifunc = rsp->hdr.pcifunc;
 
drivers/common/octeontx2/otx2_mbox.h +159 -31

358 lines not on this page · raw message

Signature · 1 line
2.8.4
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 11 lines · Nithin Dabilpuram

Sync mail box data structures to version 0x0002. This patch checks for mismatch in mail box revision and avoids initializing octeontx2 pci device if there is a mismatch.

---
 drivers/common/octeontx2/otx2_mbox.c |   6 ++
 drivers/common/octeontx2/otx2_mbox.h | 190 +++++++++++++++++++++++++++++------
 2 files changed, 165 insertions(+), 31 deletions(-)

Applied to dpdk-next-net-mrvl/master. Thanks