Home
last modified time | relevance | path

Searched refs:crc_offset (Results 1 – 9 of 9) sorted by relevance

/openbmc/u-boot/board/varisys/common/
H A Dsys_eeprom.c175 u32 crc, crc_offset = offsetof(struct eeprom, crc); in update_crc() local
177 crc = crc32(0, (void *)&e, crc_offset); in update_crc()
439 u32 crc, crc_offset = offsetof(struct eeprom, crc); in mac_read_from_eeprom_common() local
455 crc = crc32(0, (void *)&e, crc_offset); in mac_read_from_eeprom_common()
456 crcp = (void *)&e + crc_offset; in mac_read_from_eeprom_common()
/openbmc/u-boot/board/freescale/common/
H A Dsys_eeprom.c421 u32 crc, crc_offset = offsetof(struct eeprom, crc); in mac_read_from_eeprom() local
443 crc_offset = 0x72; in mac_read_from_eeprom()
446 crc = crc32(0, (void *)&e, crc_offset); in mac_read_from_eeprom()
447 crcp = (void *)&e + crc_offset; in mac_read_from_eeprom()
/openbmc/qemu/block/
H A Dvhdx.c152 uint32_t vhdx_update_checksum(uint8_t *buf, size_t size, int crc_offset) in vhdx_update_checksum() argument
157 assert(size > (crc_offset + sizeof(crc))); in vhdx_update_checksum()
159 memset(buf + crc_offset, 0, sizeof(crc)); in vhdx_update_checksum()
162 memcpy(buf + crc_offset, &crc, sizeof(crc)); in vhdx_update_checksum()
168 int crc_offset) in vhdx_checksum_calc() argument
174 if (crc_offset > 0) { in vhdx_checksum_calc()
175 memcpy(&crc_orig, buf + crc_offset, sizeof(crc_orig)); in vhdx_checksum_calc()
176 memset(buf + crc_offset, 0, sizeof(crc_orig)); in vhdx_checksum_calc()
180 if (crc_offset > 0) { in vhdx_checksum_calc()
181 memcpy(buf + crc_offset, &crc_orig, sizeof(crc_orig)); in vhdx_checksum_calc()
[all …]
H A Dvhdx.h408 uint32_t vhdx_update_checksum(uint8_t *buf, size_t size, int crc_offset);
410 int crc_offset);
412 bool vhdx_checksum_is_valid(uint8_t *buf, size_t size, int crc_offset);
/openbmc/linux/fs/f2fs/
H A Dcheckpoint.c848 size_t crc_offset = 0; in get_checkpoint_version() local
857 crc_offset = le32_to_cpu((*cp_block)->checksum_offset); in get_checkpoint_version()
858 if (crc_offset < CP_MIN_CHKSUM_OFFSET || in get_checkpoint_version()
859 crc_offset > CP_CHKSUM_OFFSET) { in get_checkpoint_version()
861 f2fs_warn(sbi, "invalid crc_offset: %zu", crc_offset); in get_checkpoint_version()
H A Dsuper.c3429 size_t crc_offset = 0; in sanity_check_raw_super() local
3440 crc_offset = le32_to_cpu(raw_super->checksum_offset); in sanity_check_raw_super()
3441 if (crc_offset != in sanity_check_raw_super()
3444 crc_offset); in sanity_check_raw_super()
3448 if (!f2fs_crc_valid(sbi, crc, raw_super, crc_offset)) { in sanity_check_raw_super()
H A Df2fs.h2070 size_t crc_offset = le32_to_cpu(cp->checksum_offset); in cur_cp_crc() local
2071 return le32_to_cpu(*((__le32 *)((unsigned char *)cp + crc_offset))); in cur_cp_crc()
/openbmc/linux/drivers/net/ethernet/emulex/benet/
H A Dbe_cmds.c2581 u16 img_optype, u32 img_offset, u32 crc_offset) in be_cmd_get_flash_crc() argument
2602 req->params.offset = cpu_to_le32(img_offset + crc_offset); in be_cmd_get_flash_crc()
2604 req->params.offset = cpu_to_le32(crc_offset); in be_cmd_get_flash_crc()
2668 u32 crc_offset; in be_check_flash_crc() local
2677 crc_offset = hdr_size + img_offset + img_size - 4; in be_check_flash_crc()
2680 if (!memcmp(crc, p + crc_offset, 4)) in be_check_flash_crc()
/openbmc/linux/drivers/hid/
H A Dhid-playstation.c765 uint8_t crc_offset = size - 4; in ps_get_report() local
766 uint32_t report_crc = get_unaligned_le32(&buf[crc_offset]); in ps_get_report()
768 if (!ps_check_crc32(PS_FEATURE_CRC32_SEED, buf, crc_offset, report_crc)) { in ps_get_report()