Skip to content

Commit 61afa0b

Browse files
bodedtomer540
authored andcommitted
fixed compilation issue in cables layouts
1 parent 34a9ae9 commit 61afa0b

File tree

2 files changed

+0
-253
lines changed

2 files changed

+0
-253
lines changed

tools_layouts/reg_access_hca_layouts.c

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,135 +3001,6 @@ void reg_access_hca_mcda_reg_ext_dump(const struct reg_access_hca_mcda_reg_ext *
30013001
reg_access_hca_mcda_reg_ext_print(ptr_struct, fd, 0);
30023002
}
30033003

3004-
void reg_access_hca_mcia_ext_pack(const struct reg_access_hca_mcia_ext *ptr_struct, u_int8_t *ptr_buff)
3005-
{
3006-
u_int32_t offset;
3007-
int i;
3008-
3009-
offset = 24;
3010-
adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->status);
3011-
offset = 16;
3012-
adb2c_push_bits_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->slot_index);
3013-
offset = 8;
3014-
adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->module);
3015-
offset = 2;
3016-
adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->pnv);
3017-
offset = 0;
3018-
adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->l);
3019-
offset = 48;
3020-
adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->device_address);
3021-
offset = 40;
3022-
adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->page_number);
3023-
offset = 32;
3024-
adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->i2c_device_address);
3025-
offset = 80;
3026-
adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->size);
3027-
offset = 72;
3028-
adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->bank_number);
3029-
offset = 68;
3030-
adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->bg_mode);
3031-
offset = 67;
3032-
adb2c_push_bits_to_buff(ptr_buff, offset, 1, (u_int32_t)ptr_struct->passwd_length);
3033-
offset = 96;
3034-
adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->password);
3035-
for (i = 0; i < 32; ++i) {
3036-
offset = adb2c_calc_array_field_address(128, 32, i, 1184, 1);
3037-
adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->dword[i]);
3038-
}
3039-
offset = 1152;
3040-
adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int32_t)ptr_struct->password_msb);
3041-
}
3042-
3043-
void reg_access_hca_mcia_ext_unpack(struct reg_access_hca_mcia_ext *ptr_struct, const u_int8_t *ptr_buff)
3044-
{
3045-
u_int32_t offset;
3046-
int i;
3047-
3048-
offset = 24;
3049-
ptr_struct->status = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8);
3050-
offset = 16;
3051-
ptr_struct->slot_index = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 4);
3052-
offset = 8;
3053-
ptr_struct->module = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8);
3054-
offset = 2;
3055-
ptr_struct->pnv = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1);
3056-
offset = 0;
3057-
ptr_struct->l = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1);
3058-
offset = 48;
3059-
ptr_struct->device_address = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16);
3060-
offset = 40;
3061-
ptr_struct->page_number = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8);
3062-
offset = 32;
3063-
ptr_struct->i2c_device_address = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8);
3064-
offset = 80;
3065-
ptr_struct->size = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16);
3066-
offset = 72;
3067-
ptr_struct->bank_number = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8);
3068-
offset = 68;
3069-
ptr_struct->bg_mode = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1);
3070-
offset = 67;
3071-
ptr_struct->passwd_length = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 1);
3072-
offset = 96;
3073-
ptr_struct->password = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4);
3074-
for (i = 0; i < 32; ++i) {
3075-
offset = adb2c_calc_array_field_address(128, 32, i, 1184, 1);
3076-
ptr_struct->dword[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4);
3077-
}
3078-
offset = 1152;
3079-
ptr_struct->password_msb = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4);
3080-
}
3081-
3082-
void reg_access_hca_mcia_ext_print(const struct reg_access_hca_mcia_ext *ptr_struct, FILE *fd, int indent_level)
3083-
{
3084-
int i;
3085-
3086-
adb2c_add_indentation(fd, indent_level);
3087-
fprintf(fd, "======== reg_access_hca_mcia_ext ========\n");
3088-
3089-
adb2c_add_indentation(fd, indent_level);
3090-
fprintf(fd, "status : " UH_FMT "\n", ptr_struct->status);
3091-
adb2c_add_indentation(fd, indent_level);
3092-
fprintf(fd, "slot_index : " UH_FMT "\n", ptr_struct->slot_index);
3093-
adb2c_add_indentation(fd, indent_level);
3094-
fprintf(fd, "module : " UH_FMT "\n", ptr_struct->module);
3095-
adb2c_add_indentation(fd, indent_level);
3096-
fprintf(fd, "pnv : " UH_FMT "\n", ptr_struct->pnv);
3097-
adb2c_add_indentation(fd, indent_level);
3098-
fprintf(fd, "l : " UH_FMT "\n", ptr_struct->l);
3099-
adb2c_add_indentation(fd, indent_level);
3100-
fprintf(fd, "device_address : " UH_FMT "\n", ptr_struct->device_address);
3101-
adb2c_add_indentation(fd, indent_level);
3102-
fprintf(fd, "page_number : " UH_FMT "\n", ptr_struct->page_number);
3103-
adb2c_add_indentation(fd, indent_level);
3104-
fprintf(fd, "i2c_device_address : " UH_FMT "\n", ptr_struct->i2c_device_address);
3105-
adb2c_add_indentation(fd, indent_level);
3106-
fprintf(fd, "size : " UH_FMT "\n", ptr_struct->size);
3107-
adb2c_add_indentation(fd, indent_level);
3108-
fprintf(fd, "bank_number : " UH_FMT "\n", ptr_struct->bank_number);
3109-
adb2c_add_indentation(fd, indent_level);
3110-
fprintf(fd, "bg_mode : " UH_FMT "\n", ptr_struct->bg_mode);
3111-
adb2c_add_indentation(fd, indent_level);
3112-
fprintf(fd, "passwd_length : " UH_FMT "\n", ptr_struct->passwd_length);
3113-
adb2c_add_indentation(fd, indent_level);
3114-
fprintf(fd, "password : " U32H_FMT "\n", ptr_struct->password);
3115-
for (i = 0; i < 32; ++i) {
3116-
adb2c_add_indentation(fd, indent_level);
3117-
fprintf(fd, "dword_%03d : " U32H_FMT "\n", i, ptr_struct->dword[i]);
3118-
}
3119-
adb2c_add_indentation(fd, indent_level);
3120-
fprintf(fd, "password_msb : " U32H_FMT "\n", ptr_struct->password_msb);
3121-
}
3122-
3123-
unsigned int reg_access_hca_mcia_ext_size(void)
3124-
{
3125-
return REG_ACCESS_HCA_MCIA_EXT_SIZE;
3126-
}
3127-
3128-
void reg_access_hca_mcia_ext_dump(const struct reg_access_hca_mcia_ext *ptr_struct, FILE *fd)
3129-
{
3130-
reg_access_hca_mcia_ext_print(ptr_struct, fd, 0);
3131-
}
3132-
31333004
void reg_access_hca_mcqi_reg_ext_pack(const struct reg_access_hca_mcqi_reg_ext *ptr_struct, u_int8_t *ptr_buff)
31343005
{
31353006
u_int32_t offset;
@@ -7108,9 +6979,6 @@ void reg_access_hca_reg_access_hca_Nodes_print(const union reg_access_hca_reg_ac
71086979
fprintf(fd, "mmdio_ext:\n");
71096980
reg_access_hca_mmdio_ext_print(&(ptr_struct->mmdio_ext), fd, indent_level + 1);
71106981
adb2c_add_indentation(fd, indent_level);
7111-
fprintf(fd, "mcia_ext:\n");
7112-
reg_access_hca_mcia_ext_print(&(ptr_struct->mcia_ext), fd, indent_level + 1);
7113-
adb2c_add_indentation(fd, indent_level);
71146982
fprintf(fd, "mtie_ext:\n");
71156983
reg_access_hca_mtie_ext_print(&(ptr_struct->mtie_ext), fd, indent_level + 1);
71166984
adb2c_add_indentation(fd, indent_level);

tools_layouts/reg_access_hca_layouts.h

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,116 +1982,6 @@ struct reg_access_hca_mcda_reg_ext {
19821982
u_int32_t data[32];
19831983
};
19841984

1985-
/* Description - */
1986-
/* Size in bytes - 148 */
1987-
struct reg_access_hca_mcia_ext {
1988-
/*---------------- DWORD[0] (Offset 0x0) ----------------*/
1989-
/* Description - Module Status
1990-
0: SUCCESS
1991-
1: NO_EEPROM_MODULE. No response from module's EEPROM.
1992-
2: MODULE_NOT_SUPPORTED. Module type not supported by the device. 3: MODULE_NOT_CONNECTED. No module present indication.
1993-
4: MODULE_TYPE_INVALID - module is not supported by INI.
1994-
1995-
9: I2C_ERROR. Error occurred while trying to access the module's EEPROM using I2C.
1996-
16: MODULE_DISABLED - module is disabled
1997-
*/
1998-
/* 0x0.0 - 0x0.7 */
1999-
/* access: RO */
2000-
u_int8_t status;
2001-
/* Description - Slot index
2002-
0: Main board */
2003-
/* 0x0.12 - 0x0.15 */
2004-
/* access: INDEX */
2005-
u_int8_t slot_index;
2006-
/* Description - Module number
2007-
NIC: Range 0 .. MGPIR.num_of_modules -1
2008-
*/
2009-
/* 0x0.16 - 0x0.23 */
2010-
/* access: INDEX */
2011-
u_int8_t module;
2012-
/* Description - [DWIP]:
2013-
Page Number Valid
2014-
0: write page number
2015-
1: don't write page number
2016-
Valid only if module is in SW control */
2017-
/* 0x0.29 - 0x0.29 */
2018-
/* access: OP */
2019-
u_int8_t pnv;
2020-
/* Description - Lock Page bit.
2021-
When bit is set, FW can access the last accessed page.
2022-
After boot and ISSU, default value is 0.
2023-
2024-
*/
2025-
/* 0x0.31 - 0x0.31 */
2026-
/* access: RW */
2027-
u_int8_t l;
2028-
/*---------------- DWORD[1] (Offset 0x4) ----------------*/
2029-
/* Description - Device address
2030-
2031-
*/
2032-
/* 0x4.0 - 0x4.15 */
2033-
/* access: INDEX */
2034-
u_int16_t device_address;
2035-
/* Description - Page number
2036-
Reserved when MCIA.l = 1 or when MCIA.pnv = 1
2037-
2038-
*/
2039-
/* 0x4.16 - 0x4.23 */
2040-
/* access: INDEX */
2041-
u_int8_t page_number;
2042-
/* Description - I2C device address
2043-
*/
2044-
/* 0x4.24 - 0x4.31 */
2045-
/* access: INDEX */
2046-
u_int8_t i2c_device_address;
2047-
/*---------------- DWORD[2] (Offset 0x8) ----------------*/
2048-
/* Description - Number of bytes to read/write (up to 128 bytes) */
2049-
/* 0x8.0 - 0x8.15 */
2050-
/* access: INDEX */
2051-
u_int16_t size;
2052-
/* Description - Bank number
2053-
*/
2054-
/* 0x8.16 - 0x8.23 */
2055-
/* access: INDEX */
2056-
u_int8_t bank_number;
2057-
/* Description - [DWIP][switch_internal]
2058-
Background operation
2059-
0: Foreground mode (legacy)
2060-
1: Background mode
2061-
2062-
When working on background mode, FW shall return STS_OK immediately and return the transaction data via MCIA trap. */
2063-
/* 0x8.27 - 0x8.27 */
2064-
/* access: OP */
2065-
u_int8_t bg_mode;
2066-
/* Description - 0: password length is 4B (password_msb is reserved)
2067-
1: password length is 8B (password_msb is used) */
2068-
/* 0x8.28 - 0x8.28 */
2069-
/* access: OP */
2070-
u_int8_t passwd_length;
2071-
/*---------------- DWORD[3] (Offset 0xc) ----------------*/
2072-
/* Description - The password that is written to the module password field.
2073-
This field is reserved when passwd_cap is not set to 1.
2074-
Reserved when module is in SW control. */
2075-
/* 0xc.0 - 0xc.31 */
2076-
/* access: OP */
2077-
u_int32_t password;
2078-
/*---------------- DWORD[4] (Offset 0x10) ----------------*/
2079-
/* Description - Bytes to read/write
2080-
Note: some FW versions support only 12*4B
2081-
See MCAM bit34 */
2082-
/* 0x10.0 - 0x8c.31 */
2083-
/* access: RW */
2084-
u_int32_t dword[32];
2085-
/*---------------- DWORD[36] (Offset 0x90) ----------------*/
2086-
/* Description - password msb
2087-
Supported only when MCAM bit34 is set
2088-
Supported only when passwd_cap is set
2089-
Reserved when passwd_length = 0 */
2090-
/* 0x90.0 - 0x90.31 */
2091-
/* access: RW */
2092-
u_int32_t password_msb;
2093-
};
2094-
20951985
/* Description - */
20961986
/* Size in bytes - 148 */
20971987
struct reg_access_hca_mcqi_reg_ext {
@@ -4968,10 +4858,6 @@ union reg_access_hca_reg_access_hca_Nodes {
49684858
/* access: RW */
49694859
struct reg_access_hca_mmdio_ext mmdio_ext;
49704860
/* Description - */
4971-
/* 0x0.0 - 0x90.31 */
4972-
/* access: RW */
4973-
struct reg_access_hca_mcia_ext mcia_ext;
4974-
/* Description - */
49754861
/* 0x0.0 - 0x2c.31 */
49764862
/* access: RW */
49774863
struct reg_access_hca_mtie_ext mtie_ext;
@@ -5401,13 +5287,6 @@ void reg_access_hca_mcda_reg_ext_print(const struct reg_access_hca_mcda_reg_ext
54015287
unsigned int reg_access_hca_mcda_reg_ext_size(void);
54025288
#define REG_ACCESS_HCA_MCDA_REG_EXT_SIZE (0x90)
54035289
void reg_access_hca_mcda_reg_ext_dump(const struct reg_access_hca_mcda_reg_ext *ptr_struct, FILE *fd);
5404-
/* mcia_ext */
5405-
void reg_access_hca_mcia_ext_pack(const struct reg_access_hca_mcia_ext *ptr_struct, u_int8_t *ptr_buff);
5406-
void reg_access_hca_mcia_ext_unpack(struct reg_access_hca_mcia_ext *ptr_struct, const u_int8_t *ptr_buff);
5407-
void reg_access_hca_mcia_ext_print(const struct reg_access_hca_mcia_ext *ptr_struct, FILE *fd, int indent_level);
5408-
unsigned int reg_access_hca_mcia_ext_size(void);
5409-
#define REG_ACCESS_HCA_MCIA_EXT_SIZE (0x94)
5410-
void reg_access_hca_mcia_ext_dump(const struct reg_access_hca_mcia_ext *ptr_struct, FILE *fd);
54115290
/* mcqi_reg_ext */
54125291
void reg_access_hca_mcqi_reg_ext_pack(const struct reg_access_hca_mcqi_reg_ext *ptr_struct, u_int8_t *ptr_buff);
54135292
void reg_access_hca_mcqi_reg_ext_unpack(struct reg_access_hca_mcqi_reg_ext *ptr_struct, const u_int8_t *ptr_buff);

0 commit comments

Comments
 (0)