summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2022-04-14 10:52:42 +0300
committerJakub Kicinski <kuba@kernel.org>2022-04-15 14:04:14 -0700
commit31248b5a354b6871afecb259690dd615de730ef0 (patch)
tree677940a18def1693264e997ea52b8671026eb9e3 /drivers
parenta992005cc88bdb6628110b97afe8651baa87f1e3 (diff)
octeon_ep: Remove custom driver version
In review comment [1] was pointed that new code is not supposed to set driver version and should rely on kernel version instead. As an outcome of that comment all the dance around setting such driver version to FW should be removed too, because in upstream kernel whole driver will have same version so read/write from/to FW will give same result. [1] https://lore.kernel.org/all/YladGTmon1x3dfxI@unreal Fixes: 862cd659a6fb ("octeon_ep: Add driver framework and device initialization") Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Link: https://lore.kernel.org/r/5d76f3116ee795071ec044eabb815d6c2bdc7dbd.1649922731.git.leonro@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c13
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_main.c2
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_main.h9
3 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
index 8c196dadfad0..39322e4dd100 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_mbox.c
@@ -26,9 +26,7 @@
#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)
@@ -65,7 +63,7 @@ static u32 octep_ctrl_mbox_circq_depth(u32 pi, u32 ci, u32 mask)
int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox)
{
- u64 version, magic_num, status;
+ u64 magic_num, status;
if (!mbox)
return -EINVAL;
@@ -81,13 +79,6 @@ int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox)
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");
@@ -96,7 +87,6 @@ int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox)
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));
@@ -248,7 +238,6 @@ int octep_ctrl_mbox_uninit(struct octep_ctrl_mbox *mbox)
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");
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index f2af5ebffcf1..e020c81f3455 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -30,7 +30,6 @@ MODULE_DEVICE_TABLE(pci, octep_pci_id_tbl);
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.
@@ -950,7 +949,6 @@ int octep_device_setup(struct octep_device *oct)
/* 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) {
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.h b/drivers/net/ethernet/marvell/octeon_ep/octep_main.h
index 520f2c3664f9..025626a61383 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.h
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.h
@@ -12,15 +12,6 @@
#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"