Lines Matching +full:layer +full:- +full:buffer +full:- +full:offset

1 /* SPDX-License-Identifier: BSD-3-Clause */
40 * @pkg_buf: the package buffer to transfer
41 * @buf_size: the size of the package buffer
42 * @last_buf: last buffer indicator
43 * @error_offset: returns error offset
68 cmd->flags |= ICE_AQC_DOWNLOAD_PKG_LAST_BUF;
72 /* Read error from buffer only when the FW returned an error */
77 *error_offset = LE32_TO_CPU(resp->error_offset);
79 *error_info = LE32_TO_CPU(resp->error_info);
88 * @pkg_buf: the package buffer which will receive the section
89 * @buf_size: the size of the package buffer
109 * @pkg_buf: the package cmd buffer
110 * @buf_size: the size of the package cmd buffer
111 * @last_buf: last buffer indicator
112 * @error_offset: returns error offset
137 cmd->flags |= ICE_AQC_DOWNLOAD_PKG_LAST_BUF;
141 /* Read error from buffer only when the FW returned an error */
146 *error_offset = LE32_TO_CPU(resp->error_offset);
148 *error_info = LE32_TO_CPU(resp->error_info);
171 pkg_hdr->pkg_format_ver.major, pkg_hdr->pkg_format_ver.minor,
172 pkg_hdr->pkg_format_ver.update,
173 pkg_hdr->pkg_format_ver.draft);
176 for (i = 0; i < LE32_TO_CPU(pkg_hdr->seg_count); i++) {
180 ((u8 *)pkg_hdr + LE32_TO_CPU(pkg_hdr->seg_offset[i]));
182 if (LE32_TO_CPU(seg->seg_type) == seg_type)
199 if (idx < LE32_TO_CPU(pkg_hdr->seg_count))
202 LE32_TO_CPU(pkg_hdr->seg_offset[idx]));
208 * ice_is_signing_seg_at_idx - determine if segment is a signing segment
219 retval = LE32_TO_CPU(seg->seg_type) == SEGMENT_TYPE_SIGNING;
244 if (seg && LE32_TO_CPU(seg->seg_id) == seg_id &&
245 LE32_TO_CPU(seg->sign_type) == sign_type)
267 u32 offset, info;
269 status = ice_aq_update_pkg(hw, bh, LE16_TO_CPU(bh->data_end),
270 last, &offset, &info, NULL);
274 status, offset, info);
326 * ice_is_buffer_metadata - determine if package buffer is a metadata buffer
327 * @buf: pointer to buffer header
333 if (LE32_TO_CPU(buf->section_entry[0].type) & ICE_METADATA_BUF)
341 * @buf: pointer to current buffer header
342 * @idx: index of the buffer in the current sequence
343 * @count: the buffer count in the current sequence
345 * Note: this routine should only be called if the buffer is not the last buffer
352 /* A set metadata flag in the next buffer will signal that the current
353 * buffer will be the last buffer downloaded
368 * @start: buffer index of first buffer to download
370 * @indicate_last: if true, then set last buffer flag on last buffer download
373 * are skipped, and the first metadata buffer found indicates that the rest
383 u32 offset, info, i;
388 /* If the first buffer's first section has its metadata bit set
393 if (LE32_TO_CPU(bh->section_entry[0].type) & ICE_METADATA_BUF)
406 &offset, &info, NULL);
411 status, offset, info);
412 err = hw->adminq.sq_last_status;
427 * @pkg_info: the buffer which will receive the information list
428 * @buf_size: the size of the pkg_info information buffer
446 * ice_get_pkg_segment_id - get correct package segment id, based on device
469 * ice_get_pkg_sign_type - get package segment sign type, based on device
496 * ice_get_signing_req - get correct package requirements, based on device
501 hw->pkg_seg_id = ice_get_pkg_segment_id(hw->mac_type);
502 hw->pkg_sign_type = ice_get_pkg_sign_type(hw->mac_type);
506 * ice_download_pkg_sig_seg - download a signature segment
515 state = ice_dwnld_cfg_bufs_no_lock(hw, seg->buf_tbl.buf_array, 0,
516 LE32_TO_CPU(seg->buf_tbl.buf_count),
523 * ice_download_pkg_config_seg - download a config segment
527 * @start: starting buffer
528 * @count: buffer count
547 buf_count = LE32_TO_CPU(bufs->buf_count);
552 state = ice_dwnld_cfg_bufs_no_lock(hw, bufs->buf_array, start, count,
559 * ice_dwnld_sign_and_cfg_segs - download a signing segment and config segment
584 conf_idx = LE32_TO_CPU(seg->signed_seg_idx);
585 start = LE32_TO_CPU(seg->signed_buf_start);
586 count = LE32_TO_CPU(seg->signed_buf_count);
587 flags = LE32_TO_CPU(seg->flags);
612 * ice_match_signing_seg - determine if a matching signing segment exists
623 for (i = 0; i < LE32_TO_CPU(pkg_hdr->seg_count); i++) {
635 * ice_post_dwnld_pkg_actions - perform post download package actions
655 * ice_download_pkg_with_sig_seg - download package using signature segments
662 enum ice_aq_err aq_err = hw->adminq.sq_last_status;
667 ice_debug(hw, ICE_DBG_INIT, "Segment ID %d\n", hw->pkg_seg_id);
668 ice_debug(hw, ICE_DBG_INIT, "Signature type %d\n", hw->pkg_sign_type);
679 for (i = 0; i < LE32_TO_CPU(pkg_hdr->seg_count); i++) {
680 if (!ice_is_signing_seg_type_at_idx(pkg_hdr, i, hw->pkg_seg_id,
681 hw->pkg_sign_type))
716 /* If the first buffer's first section has its metadata bit set
721 if (LE32_TO_CPU(bh->section_entry[0].type) & ICE_METADATA_BUF)
728 return ice_map_aq_err_to_ddp_state(hw->adminq.sq_last_status);
754 ice_seg->hdr.seg_format_ver.major,
755 ice_seg->hdr.seg_format_ver.minor,
756 ice_seg->hdr.seg_format_ver.update,
757 ice_seg->hdr.seg_format_ver.draft);
760 LE32_TO_CPU(ice_seg->hdr.seg_type),
761 LE32_TO_CPU(ice_seg->hdr.seg_size), ice_seg->hdr.seg_id);
766 LE32_TO_CPU(ice_buf_tbl->buf_count));
768 state = ice_dwnld_cfg_bufs(hw, ice_buf_tbl->buf_array,
769 LE32_TO_CPU(ice_buf_tbl->buf_count));
788 if (ice_match_signing_seg(pkg_hdr, hw->pkg_seg_id, hw->pkg_sign_type))
816 hw->pkg_seg_id);
819 ice_find_seg_in_pkg(hw, hw->pkg_seg_id, pkg_hdr);
835 hw->pkg_ver = meta->ver;
836 ice_memcpy(hw->pkg_name, meta->name, sizeof(meta->name),
840 meta->ver.major, meta->ver.minor, meta->ver.update,
841 meta->ver.draft, meta->name);
843 hw->ice_seg_fmt_ver = seg_hdr->seg_format_ver;
844 ice_memcpy(hw->ice_seg_id, seg_hdr->seg_id,
845 sizeof(hw->ice_seg_id), ICE_NONDMA_TO_NONDMA);
848 seg_hdr->seg_format_ver.major,
849 seg_hdr->seg_format_ver.minor,
850 seg_hdr->seg_format_ver.update,
851 seg_hdr->seg_format_ver.draft,
852 seg_hdr->seg_id);
884 for (i = 0; i < LE32_TO_CPU(pkg_info->count); i++) {
889 if (pkg_info->pkg_info[i].is_active) {
891 hw->active_pkg_ver = pkg_info->pkg_info[i].ver;
892 hw->active_track_id =
893 LE32_TO_CPU(pkg_info->pkg_info[i].track_id);
894 ice_memcpy(hw->active_pkg_name,
895 pkg_info->pkg_info[i].name,
896 sizeof(pkg_info->pkg_info[i].name),
898 hw->active_pkg_in_nvm = pkg_info->pkg_info[i].is_in_nvm;
900 if (pkg_info->pkg_info[i].is_active_at_boot)
902 if (pkg_info->pkg_info[i].is_modified)
904 if (pkg_info->pkg_info[i].is_in_nvm)
908 i, pkg_info->pkg_info[i].ver.major,
909 pkg_info->pkg_info[i].ver.minor,
910 pkg_info->pkg_info[i].ver.update,
911 pkg_info->pkg_info[i].ver.draft,
912 pkg_info->pkg_info[i].name, flags);
926 * @offset: pointer to receive absolute offset, always zero for label sections
933 u32 *offset)
943 if (offset)
944 *offset = 0;
947 if (index >= LE16_TO_CPU(labels->count))
950 return labels->label + index;
981 *value = LE16_TO_CPU(label->value);
982 return label->name;
987 * @ice_seg: pointer to the ice segment (non-NULL)
1023 * ice_verify_pkg - verify package
1024 * @pkg: pointer to the package buffer
1025 * @len: size of the package buffer
1038 if (pkg->pkg_format_ver.major != ICE_PKG_FMT_VER_MAJ ||
1039 pkg->pkg_format_ver.minor != ICE_PKG_FMT_VER_MNR ||
1040 pkg->pkg_format_ver.update != ICE_PKG_FMT_VER_UPD ||
1041 pkg->pkg_format_ver.draft != ICE_PKG_FMT_VER_DFT)
1045 seg_count = LE32_TO_CPU(pkg->seg_count);
1055 u32 off = LE32_TO_CPU(pkg->seg_offset[i]);
1065 if (len < off + LE32_TO_CPU(seg->seg_size))
1073 * ice_free_seg - free package segment pointer
1081 if (hw->pkg_copy) {
1082 ice_free(hw, hw->pkg_copy);
1083 hw->pkg_copy = NULL;
1084 hw->pkg_size = 0;
1086 hw->seg = NULL;
1090 * ice_chk_pkg_version - check package version for compatibility with driver
1100 if (pkg_ver->major > ICE_PKG_SUPP_VER_MAJ ||
1101 (pkg_ver->major == ICE_PKG_SUPP_VER_MAJ &&
1102 pkg_ver->minor > ICE_PKG_SUPP_VER_MNR))
1104 else if (pkg_ver->major < ICE_PKG_SUPP_VER_MAJ ||
1105 (pkg_ver->major == ICE_PKG_SUPP_VER_MAJ &&
1106 pkg_ver->minor < ICE_PKG_SUPP_VER_MNR))
1129 state = ice_chk_pkg_version(&hw->pkg_ver);
1136 *seg = (struct ice_seg *)ice_find_seg_in_pkg(hw, hw->pkg_seg_id,
1154 for (i = 0; i < LE32_TO_CPU(pkg->count); i++) {
1156 if (!pkg->pkg_info[i].is_in_nvm)
1158 if ((*seg)->hdr.seg_format_ver.major !=
1159 pkg->pkg_info[i].ver.major ||
1160 (*seg)->hdr.seg_format_ver.minor >
1161 pkg->pkg_info[i].ver.minor) {
1178 * @offset: ptr to variable that receives the offset in the field vector table
1182 * enumerates offset field. "offset" is an index into the field vector table.
1185 ice_sw_fv_handler(u32 sect_type, void *section, u32 index, u32 *offset)
1192 if (index >= LE16_TO_CPU(fv_section->count))
1194 if (offset)
1200 *offset = LE16_TO_CPU(fv_section->base_offset) + index;
1201 return fv_section->fv + index;
1205 * ice_get_prof_index_max - get the max profile index for used profile
1219 u32 offset;
1223 if (!hw->seg)
1226 ice_seg = hw->seg;
1231 &offset, ice_sw_fv_handler);
1239 for (j = 0; j < hw->blk[ICE_BLK_SW].es.fvw; j++)
1240 if (fv->ew[j].prot_id != ICE_PROT_INVALID ||
1241 fv->ew[j].off != ICE_FV_OFFSET_INVAL)
1250 hw->switch_info->max_used_prof_index = max_prof_index;
1256 * ice_get_ddp_pkg_state - get DDP pkg state after download
1264 if (hw->pkg_ver.major == hw->active_pkg_ver.major &&
1265 hw->pkg_ver.minor == hw->active_pkg_ver.minor &&
1266 hw->pkg_ver.update == hw->active_pkg_ver.update &&
1267 hw->pkg_ver.draft == hw->active_pkg_ver.draft &&
1268 !memcmp(hw->pkg_name, hw->active_pkg_name, sizeof(hw->pkg_name))) {
1273 } else if (hw->active_pkg_ver.major != ICE_PKG_SUPP_VER_MAJ ||
1274 hw->active_pkg_ver.minor != ICE_PKG_SUPP_VER_MNR) {
1282 * ice_init_pkg_regs - initialize additional package registers
1291 /* setup Switch block input mask, which is 48-bits in two parts */
1297 * ice_init_pkg - initialize/download package
1299 * @buf: pointer to the package buffer
1300 * @len: size of the package buffer
1306 * within the supplied package buffer. Next, the function will cache any hints
1315 * This function stores a pointer to the package buffer memory, and it is
1316 * expected that the supplied buffer will not be freed immediately. If the
1317 * package buffer needs to be freed, such as when read from a file, use
1356 ice_debug(hw, ICE_DBG_INIT, "package previously loaded - no work.\n");
1370 hw->seg = seg;
1387 * ice_copy_and_init_pkg - initialize/download a copy of the package
1389 * @buf: pointer to the package buffer
1390 * @len: size of the package buffer
1392 * This function copies the package buffer, and then calls ice_init_pkg() to
1395 * The copying is necessary if the package buffer supplied is constant, or if
1398 * If the package buffer resides in the data segment and can be modified, the
1401 * However, if the package buffer needs to be copied first, such as when being
1404 * This function will first copy the package buffer, before calling
1406 * package buffer, as the new copy will be managed by this function and
1426 hw->pkg_copy = buf_copy;
1427 hw->pkg_size = len;
1434 * ice_is_init_pkg_successful - check if DDP init was successful
1453 * Allocates a package buffer and returns a pointer to the buffer header.
1466 buf->data_end = CPU_TO_LE16(offsetof(struct ice_buf_hdr,
1492 * ice_get_sw_prof_type - determine switch profile type
1509 for (i = 0; i < hw->blk[ICE_BLK_SW].es.fvw; i++) {
1510 if (fv->ew[i].off != ICE_NAN_OFFSET)
1513 /* UDP tunnel will have UDP_OF protocol ID and VNI offset */
1514 if (fv->ew[i].prot_id == (u8)ICE_PROT_UDP_OF &&
1515 fv->ew[i].off == ICE_VNI_OFFSET)
1519 if (fv->ew[i].prot_id == (u8)ICE_PROT_GRE_OF)
1527 * ice_get_sw_fv_bitmap - Get switch field vector bitmap based on profile type
1542 ice_seg = hw->seg;
1545 u32 offset;
1549 &offset, ice_sw_fv_handler);
1554 prof_type = ice_get_sw_prof_type(hw, fv, offset);
1557 ice_set_bit((u16)offset, bm);
1571 * a given protocol ID and offset and returns a list of structures of type
1586 u32 offset;
1590 if (!lkups->n_val_words || !hw->seg)
1593 ice_seg = hw->seg;
1599 &offset, ice_sw_fv_handler);
1607 if (!ice_is_bit_set(bm, (u16)offset))
1610 for (i = 0; i < lkups->n_val_words; i++) {
1613 for (j = 0; j < hw->blk[ICE_BLK_SW].es.fvw; j++)
1614 if (fv->ew[j].prot_id ==
1615 lkups->fv_words[i].prot_id &&
1616 fv->ew[j].off == lkups->fv_words[i].off)
1618 if (j >= hw->blk[ICE_BLK_SW].es.fvw)
1620 if (i + 1 == lkups->n_val_words) {
1625 fvl->fv_ptr = fv;
1626 fvl->profile_id = offset;
1627 LIST_ADD(&fvl->list_entry, fv_list);
1641 LIST_DEL(&fvl->list_entry);
1649 * ice_init_prof_result_bm - Initialize the profile result index bitmap
1660 if (!hw->seg)
1663 ice_seg = hw->seg;
1675 ice_zero_bitmap(hw->switch_info->prof_res_bm[off],
1683 if (fv->ew[i].prot_id == ICE_PROT_INVALID &&
1684 fv->ew[i].off == ICE_FV_OFFSET_INVAL)
1686 hw->switch_info->prof_res_bm[off]);
1695 * Frees a package buffer
1707 * Reserves one or more section table entries in a package buffer. This routine
1712 * result in some wasted space in the buffer.
1725 buf = (struct ice_buf_hdr *)&bld->buf;
1728 section_count = LE16_TO_CPU(buf->section_count);
1732 if (bld->reserved_section_table_entries + count > ICE_MAX_S_COUNT)
1734 bld->reserved_section_table_entries += count;
1736 data_end = LE16_TO_CPU(buf->data_end) +
1738 buf->data_end = CPU_TO_LE16(data_end);
1749 * Reserves memory in the buffer for a section's content and updates the
1751 * byte of the section start within the buffer, which is used to fill in the
1765 buf = (struct ice_buf_hdr *)&bld->buf;
1767 /* check for enough space left in buffer */
1768 data_end = LE16_TO_CPU(buf->data_end);
1777 sect_count = LE16_TO_CPU(buf->section_count);
1778 if (sect_count < bld->reserved_section_table_entries) {
1781 buf->section_entry[sect_count].offset = CPU_TO_LE16(data_end);
1782 buf->section_entry[sect_count].size = CPU_TO_LE16(size);
1783 buf->section_entry[sect_count].type = CPU_TO_LE32(type);
1786 buf->data_end = CPU_TO_LE16(data_end);
1788 buf->section_count = CPU_TO_LE16(sect_count + 1);
1803 * Allocates a package buffer with a single section.
1838 * Unreserves one or more section table entries in a package buffer, releasing
1844 * result in some wasted space in the buffer.
1857 buf = (struct ice_buf_hdr *)&bld->buf;
1860 section_count = LE16_TO_CPU(buf->section_count);
1864 if (count > bld->reserved_section_table_entries)
1866 bld->reserved_section_table_entries -= count;
1868 data_end = LE16_TO_CPU(buf->data_end) -
1870 buf->data_end = CPU_TO_LE16(data_end);
1879 * Returns the number of free bytes remaining in the buffer.
1889 buf = (struct ice_buf_hdr *)&bld->buf;
1890 return ICE_MAX_S_DATA_END - LE16_TO_CPU(buf->data_end);
1897 * Returns the number of active sections. Before using the package buffer
1899 * least one active section - otherwise, the buffer is not legal and should
1910 buf = (struct ice_buf_hdr *)&bld->buf;
1911 return LE16_TO_CPU(buf->section_count);
1918 * Return a pointer to the buffer's header
1923 return &bld->buf;
1932 * Returns the address of the buffer table within the ice segment.
1939 (ice_seg->device_table +
1940 LE32_TO_CPU(ice_seg->device_table_count));
1943 (nvms->vers + LE32_TO_CPU(nvms->table_count));
1948 * @buf: pointer to the ice buffer
1950 * This helper function validates a buffer's header.
1958 hdr = (struct ice_buf_hdr *)buf->buf;
1960 section_count = LE16_TO_CPU(hdr->section_count);
1964 data_end = LE16_TO_CPU(hdr->data_end);
1977 * call is made with the ice_seg parameter non-NULL; on subsequent calls,
1981 * an invalid buffer end value).
1987 state->buf_table = ice_find_buf_table(ice_seg);
1988 if (!state->buf_table)
1991 state->buf_idx = 0;
1992 return ice_pkg_val_buf(state->buf_table->buf_array);
1995 if (++state->buf_idx < LE32_TO_CPU(state->buf_table->buf_count))
1996 return ice_pkg_val_buf(state->buf_table->buf_array +
1997 state->buf_idx);
2008 * also advancing the buffer if needed.
2013 if (!ice_seg && !state->buf)
2016 if (!ice_seg && state->buf)
2017 if (++state->sect_idx < LE16_TO_CPU(state->buf->section_count))
2020 state->buf = ice_pkg_enum_buf(ice_seg, state);
2021 if (!state->buf)
2024 /* start of new buffer, reset section index */
2025 state->sect_idx = 0;
2036 * ice segment. The first call is made with the ice_seg parameter non-NULL;
2045 u16 offset, size;
2048 state->type = sect_type;
2054 while (state->buf->section_entry[state->sect_idx].type !=
2055 CPU_TO_LE32(state->type))
2060 offset = LE16_TO_CPU(state->buf->section_entry[state->sect_idx].offset);
2061 if (offset < ICE_MIN_S_OFF || offset > ICE_MAX_S_OFF)
2064 size = LE16_TO_CPU(state->buf->section_entry[state->sect_idx].size);
2068 /* make sure the section fits in the buffer */
2069 if (offset + size > ICE_PKG_BUF_SIZE)
2072 state->sect_type =
2073 LE32_TO_CPU(state->buf->section_entry[state->sect_idx].type);
2076 state->sect = ((u8 *)state->buf) +
2077 LE16_TO_CPU(state->buf->section_entry[state->sect_idx].offset);
2079 return state->sect;
2087 * @offset: pointer to variable that receives the offset in the table (optional)
2091 * the ice segment. The first call is made with the ice_seg parameter non-NULL;
2100 * The offset parameter is optional, but should be used for sections that
2101 * contain an offset for each section table. For such cases, the section handler
2102 * function must return the appropriate offset + index to give the absolution
2103 * offset for each entry. For example, if the base for a section's header
2104 * indicates a base offset of 10, and the index for the entry is 2, then
2105 * section handler function should set the offset to 10 + 2 = 12.
2109 u32 sect_type, u32 *offset,
2111 u32 index, u32 *offset))
2122 state->entry_idx = 0;
2123 state->handler = handler;
2125 state->entry_idx++;
2128 if (!state->handler)
2132 entry = state->handler(state->sect_type, state->sect, state->entry_idx,
2133 offset);
2139 state->entry_idx = 0;
2140 entry = state->handler(state->sect_type, state->sect,
2141 state->entry_idx, offset);
2152 * @offset: pointer to receive absolute offset, always 0 for boost TCAM sections
2158 ice_boost_tcam_handler(u32 sect_type, void *section, u32 index, u32 *offset)
2171 if (offset)
2172 *offset = 0;
2175 if (index >= LE16_TO_CPU(boost->count))
2178 return boost->tcam + index;
2183 * @ice_seg: pointer to the ice segment (non-NULL)
2208 if (tcam && LE16_TO_CPU(tcam->addr) == addr) {
2223 * @ice_seg: pointer to the segment of the package scan (non-NULL)
2237 ice_memset(&hw->tnl, 0, sizeof(hw->tnl), ICE_NONDMA_MEM);
2256 for (i = 0; i < hw->tnl.count; i++) {
2257 ice_find_boost_entry(ice_seg, hw->tnl.tbl[i].boost_addr,
2258 &hw->tnl.tbl[i].boost_entry);
2259 if (hw->tnl.tbl[i].boost_entry)
2260 hw->tnl.tbl[i].valid = true;
2273 * 0 - Means the caller has acquired the global config lock
2275 * ICE_ERR_AQ_NO_WORK - Indicates another driver has already written the
2348 * ice_get_set_tx_topo - get or set tx topology
2350 * @buf: pointer to tx topology buffer
2351 * @buf_size: buffer size
2354 * @set: 0-get, 1-set topology
2369 cmd->set_flags = ICE_AQC_TX_TOPO_FLAGS_ISSUED;
2372 cmd->set_flags |= ICE_AQC_TX_TOPO_FLAGS_SRC_RAM |
2378 cmd->get_flags = ICE_AQC_TX_TOPO_GET_RAM;
2395 * ice_cfg_tx_topo - Initialize new tx topology if available
2397 * @buf: pointer to Tx topology buffer
2398 * @len: buffer size
2400 * The function will apply the new Tx topology from the package buffer
2410 u16 i, size = 0, offset;
2419 if (!hw->func_caps.common_cap.tx_sched_topo_comp_mode_en) {
2440 hw->num_tx_sched_layers == 9) {
2448 hw->num_tx_sched_layers == 5) {
2465 hw->num_tx_sched_layers == 5) {
2482 ice_debug(hw, ICE_DBG_INIT, "5 layer topology segment is missing\n");
2486 if (LE32_TO_CPU(seg->buf_table.buf_count) < ICE_MIN_S_COUNT) {
2487 ice_debug(hw, ICE_DBG_INIT, "5 layer topology segment count(%d) is wrong\n",
2488 seg->buf_table.buf_count);
2492 section = ice_pkg_val_buf(seg->buf_table.buf_array);
2494 if (!section || LE32_TO_CPU(section->section_entry[0].type) !=
2496 ice_debug(hw, ICE_DBG_INIT, "5 layer topology section type is wrong\n");
2500 size = LE16_TO_CPU(section->section_entry[0].size);
2501 offset = LE16_TO_CPU(section->section_entry[0].offset);
2503 ice_debug(hw, ICE_DBG_INIT, "5 layer topology section size is wrong\n");
2507 /* make sure the section fits in the buffer */
2508 if (offset + size > ICE_PKG_BUF_SIZE) {
2509 ice_debug(hw, ICE_DBG_INIT, "5 layer topology buffer > 4K\n");
2513 /* Get the new topology buffer */
2514 new_topo = ((u8 *)section) + offset;
2530 /* Reset is in progress, re-init the hw again */
2531 ice_debug(hw, ICE_DBG_INIT, "Reset is in progress. layer topology might be applied already\n");