#define OCTEP_CTRL_MBOX_INFO_MAGIC_NUM_OFFSET(m) (m)
#define OCTEP_CTRL_MBOX_INFO_BARMEM_SZ_OFFSET(m) ((m) + 8)
-#define OCTEP_CTRL_MBOX_INFO_HOST_VERSION_OFFSET(m) ((m) + 16)
#define OCTEP_CTRL_MBOX_INFO_HOST_STATUS_OFFSET(m) ((m) + 24)
-#define OCTEP_CTRL_MBOX_INFO_FW_VERSION_OFFSET(m) ((m) + 136)
#define OCTEP_CTRL_MBOX_INFO_FW_STATUS_OFFSET(m) ((m) + 144)
#define OCTEP_CTRL_MBOX_H2FQ_INFO_OFFSET(m) ((m) + OCTEP_CTRL_MBOX_INFO_SZ)
int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox)
{
- u64 version, magic_num, status;
+ u64 magic_num, status;
if (!mbox)
return -EINVAL;
return -EINVAL;
}
- version = readq(OCTEP_CTRL_MBOX_INFO_FW_VERSION_OFFSET(mbox->barmem));
- if (version != OCTEP_DRV_VERSION) {
- pr_info("octep_ctrl_mbox : Firmware version mismatch %llx != %x\n",
- version, OCTEP_DRV_VERSION);
- return -EINVAL;
- }
-
status = readq(OCTEP_CTRL_MBOX_INFO_FW_STATUS_OFFSET(mbox->barmem));
if (status != OCTEP_CTRL_MBOX_STATUS_READY) {
pr_info("octep_ctrl_mbox : Firmware is not ready.\n");
mbox->barmem_sz = readl(OCTEP_CTRL_MBOX_INFO_BARMEM_SZ_OFFSET(mbox->barmem));
- writeq(mbox->version, OCTEP_CTRL_MBOX_INFO_HOST_VERSION_OFFSET(mbox->barmem));
writeq(OCTEP_CTRL_MBOX_STATUS_INIT, OCTEP_CTRL_MBOX_INFO_HOST_STATUS_OFFSET(mbox->barmem));
mbox->h2fq.elem_cnt = readl(OCTEP_CTRL_MBOX_H2FQ_ELEM_CNT_OFFSET(mbox->barmem));
writeq(OCTEP_CTRL_MBOX_STATUS_INVALID,
OCTEP_CTRL_MBOX_INFO_HOST_STATUS_OFFSET(mbox->barmem));
- writeq(0, OCTEP_CTRL_MBOX_INFO_HOST_VERSION_OFFSET(mbox->barmem));
pr_info("Octep ctrl mbox : Uninit successful.\n");
MODULE_AUTHOR("Veerasenareddy Burru <vburru@marvell.com>");
MODULE_DESCRIPTION(OCTEP_DRV_STRING);
MODULE_LICENSE("GPL");
-MODULE_VERSION(OCTEP_DRV_VERSION_STR);
/**
* octep_alloc_ioq_vectors() - Allocate Tx/Rx Queue interrupt info.
/* Initialize control mbox */
ctrl_mbox = &oct->ctrl_mbox;
- ctrl_mbox->version = OCTEP_DRV_VERSION;
ctrl_mbox->barmem = CFG_GET_CTRL_MBOX_MEM_ADDR(oct->conf);
ret = octep_ctrl_mbox_init(ctrl_mbox);
if (ret) {
#include "octep_rx.h"
#include "octep_ctrl_mbox.h"
-#define OCTEP_DRV_VERSION_MAJOR 1
-#define OCTEP_DRV_VERSION_MINOR 0
-#define OCTEP_DRV_VERSION_VARIANT 0
-
-#define OCTEP_DRV_VERSION ((OCTEP_DRV_VERSION_MAJOR << 16) + \
- (OCTEP_DRV_VERSION_MINOR << 8) + \
- OCTEP_DRV_VERSION_VARIANT)
-
-#define OCTEP_DRV_VERSION_STR "1.0.0"
#define OCTEP_DRV_NAME "octeon_ep"
#define OCTEP_DRV_STRING "Marvell Octeon EndPoint NIC Driver"