diff options
author | Ido Schimmel <idosch@nvidia.com> | 2021-10-12 16:25:13 +0300 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2021-11-08 18:17:57 +0100 |
commit | 369b43a1a066de022a4d20921dcc0c440021d33b (patch) | |
tree | 37901f16a4dbd9d866aa1581984c20bb57037c53 /cmis.h | |
parent | 795f42092f205b555e498ee3379d75261c16ef40 (diff) | |
download | ethtool-369b43a1a066de022a4d20921dcc0c440021d33b.tar.gz |
cmis: Initialize CMIS memory map
The CMIS memory map [1] consists of Lower Memory and Upper Memory.
The content of the Lower Memory is fixed and can be addressed using an
offset between 0 and 127 (inclusive).
The Upper Memory is variable and optional and can be addressed by
specifying a bank number, a page number and an offset between 128 and
255 (inclusive).
Create a structure describing this memory map and initialize it with
pointers to available pages.
In the IOCTL path, the structure holds pointers to regions of the
continuous buffer passed to user space via the 'ETHTOOL_GMODULEEEPROM'
command.
In the netlink path, the structure holds pointers to individual pages
passed to user space via the 'MODULE_EEPROM_GET' message.
This structure will later allow us to consolidate the IOCTL and netlink
parsing code paths and also easily support additional EEPROM pages.
[1] CMIS Rev. 5, pag. 97, section 8.1.1, Figure 8-1
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Diffstat (limited to 'cmis.h')
-rw-r--r-- | cmis.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4,6 +4,8 @@ /* Identifier and revision compliance (Page 0) */ #define CMIS_ID_OFFSET 0x00 #define CMIS_REV_COMPLIANCE_OFFSET 0x01 +#define CMIS_MEMORY_MODEL_OFFSET 0x02 +#define CMIS_MEMORY_MODEL_MASK 0x80 #define CMIS_MODULE_TYPE_OFFSET 0x55 #define CMIS_MT_MMF 0x01 |