Lines Matching refs:vid_hdr
87 const struct ubi_vid_hdr *vid_hdr);
477 struct ubi_vid_hdr vid_hdr; in nor_erase_prepare() local
495 ubi_init_vid_buf(ubi, &vidb, &vid_hdr); in nor_erase_prepare()
496 ubi_assert(&vid_hdr == ubi_get_vid_hdr(&vidb)); in nor_erase_prepare()
884 const struct ubi_vid_hdr *vid_hdr) in validate_vid_hdr() argument
886 int vol_type = vid_hdr->vol_type; in validate_vid_hdr()
887 int copy_flag = vid_hdr->copy_flag; in validate_vid_hdr()
888 int vol_id = be32_to_cpu(vid_hdr->vol_id); in validate_vid_hdr()
889 int lnum = be32_to_cpu(vid_hdr->lnum); in validate_vid_hdr()
890 int compat = vid_hdr->compat; in validate_vid_hdr()
891 int data_size = be32_to_cpu(vid_hdr->data_size); in validate_vid_hdr()
892 int used_ebs = be32_to_cpu(vid_hdr->used_ebs); in validate_vid_hdr()
893 int data_pad = be32_to_cpu(vid_hdr->data_pad); in validate_vid_hdr()
894 int data_crc = be32_to_cpu(vid_hdr->data_crc); in validate_vid_hdr()
990 ubi_dump_vid_hdr(vid_hdr); in validate_vid_hdr()
1015 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb); in ubi_io_read_vid_hdr() local
1026 magic = be32_to_cpu(vid_hdr->magic); in ubi_io_read_vid_hdr()
1031 if (ubi_check_pattern(vid_hdr, 0xFF, UBI_VID_HDR_SIZE)) { in ubi_io_read_vid_hdr()
1046 ubi_dump_vid_hdr(vid_hdr); in ubi_io_read_vid_hdr()
1053 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC); in ubi_io_read_vid_hdr()
1054 hdr_crc = be32_to_cpu(vid_hdr->hdr_crc); in ubi_io_read_vid_hdr()
1060 ubi_dump_vid_hdr(vid_hdr); in ubi_io_read_vid_hdr()
1070 err = validate_vid_hdr(ubi, vid_hdr); in ubi_io_read_vid_hdr()
1126 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb); in ubi_io_write_vid_hdr() local
1138 vid_hdr->magic = cpu_to_be32(UBI_VID_HDR_MAGIC); in ubi_io_write_vid_hdr()
1139 vid_hdr->version = UBI_VERSION; in ubi_io_write_vid_hdr()
1140 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC); in ubi_io_write_vid_hdr()
1141 vid_hdr->hdr_crc = cpu_to_be32(crc); in ubi_io_write_vid_hdr()
1143 err = self_check_vid_hdr(ubi, pnum, vid_hdr); in ubi_io_write_vid_hdr()
1275 const struct ubi_vid_hdr *vid_hdr) in self_check_vid_hdr() argument
1283 magic = be32_to_cpu(vid_hdr->magic); in self_check_vid_hdr()
1290 err = validate_vid_hdr(ubi, vid_hdr); in self_check_vid_hdr()
1300 ubi_dump_vid_hdr(vid_hdr); in self_check_vid_hdr()
1319 struct ubi_vid_hdr *vid_hdr; in self_check_peb_vid_hdr() local
1329 vid_hdr = ubi_get_vid_hdr(vidb); in self_check_peb_vid_hdr()
1336 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC); in self_check_peb_vid_hdr()
1337 hdr_crc = be32_to_cpu(vid_hdr->hdr_crc); in self_check_peb_vid_hdr()
1342 ubi_dump_vid_hdr(vid_hdr); in self_check_peb_vid_hdr()
1348 err = self_check_vid_hdr(ubi, pnum, vid_hdr); in self_check_peb_vid_hdr()