Lines Matching refs:bpb
1389 int silent, struct fat_bios_param_block *bpb) in fat_read_bpb() argument
1394 memset(bpb, 0, sizeof(*bpb)); in fat_read_bpb()
1395 bpb->fat_sector_size = get_unaligned_le16(&b->sector_size); in fat_read_bpb()
1396 bpb->fat_sec_per_clus = b->sec_per_clus; in fat_read_bpb()
1397 bpb->fat_reserved = le16_to_cpu(b->reserved); in fat_read_bpb()
1398 bpb->fat_fats = b->fats; in fat_read_bpb()
1399 bpb->fat_dir_entries = get_unaligned_le16(&b->dir_entries); in fat_read_bpb()
1400 bpb->fat_sectors = get_unaligned_le16(&b->sectors); in fat_read_bpb()
1401 bpb->fat_fat_length = le16_to_cpu(b->fat_length); in fat_read_bpb()
1402 bpb->fat_total_sect = le32_to_cpu(b->total_sect); in fat_read_bpb()
1404 bpb->fat16_state = b->fat16.state; in fat_read_bpb()
1405 bpb->fat16_vol_id = get_unaligned_le32(b->fat16.vol_id); in fat_read_bpb()
1407 bpb->fat32_length = le32_to_cpu(b->fat32.length); in fat_read_bpb()
1408 bpb->fat32_root_cluster = le32_to_cpu(b->fat32.root_cluster); in fat_read_bpb()
1409 bpb->fat32_info_sector = le16_to_cpu(b->fat32.info_sector); in fat_read_bpb()
1410 bpb->fat32_state = b->fat32.state; in fat_read_bpb()
1411 bpb->fat32_vol_id = get_unaligned_le32(b->fat32.vol_id); in fat_read_bpb()
1414 if (!bpb->fat_reserved) { in fat_read_bpb()
1420 if (!bpb->fat_fats) { in fat_read_bpb()
1438 if (!is_power_of_2(bpb->fat_sector_size) in fat_read_bpb()
1439 || (bpb->fat_sector_size < 512) in fat_read_bpb()
1440 || (bpb->fat_sector_size > 4096)) { in fat_read_bpb()
1443 (unsigned)bpb->fat_sector_size); in fat_read_bpb()
1447 if (!is_power_of_2(bpb->fat_sec_per_clus)) { in fat_read_bpb()
1450 (unsigned)bpb->fat_sec_per_clus); in fat_read_bpb()
1454 if (bpb->fat_fat_length == 0 && bpb->fat32_length == 0) { in fat_read_bpb()
1468 struct fat_bios_param_block *bpb) in fat_read_static_bpb() argument
1514 memset(bpb, 0, sizeof(*bpb)); in fat_read_static_bpb()
1515 bpb->fat_sector_size = SECTOR_SIZE; in fat_read_static_bpb()
1516 bpb->fat_sec_per_clus = fdefaults->sec_per_clus; in fat_read_static_bpb()
1517 bpb->fat_reserved = 1; in fat_read_static_bpb()
1518 bpb->fat_fats = 2; in fat_read_static_bpb()
1519 bpb->fat_dir_entries = fdefaults->dir_entries; in fat_read_static_bpb()
1520 bpb->fat_sectors = fdefaults->nr_sectors; in fat_read_static_bpb()
1521 bpb->fat_fat_length = fdefaults->fat_length; in fat_read_static_bpb()
1540 struct fat_bios_param_block bpb; in fat_fill_super() local
1605 &bpb); in fat_fill_super()
1608 (struct fat_boot_sector *)bh->b_data, silent, &bpb); in fat_fill_super()
1616 logical_sector_size = bpb.fat_sector_size; in fat_fill_super()
1617 sbi->sec_per_clus = bpb.fat_sec_per_clus; in fat_fill_super()
1649 sbi->fats = bpb.fat_fats; in fat_fill_super()
1651 sbi->fat_start = bpb.fat_reserved; in fat_fill_super()
1652 sbi->fat_length = bpb.fat_fat_length; in fat_fill_super()
1665 if (!sbi->fat_length && bpb.fat32_length) { in fat_fill_super()
1671 sbi->fat_length = bpb.fat32_length; in fat_fill_super()
1672 sbi->root_cluster = bpb.fat32_root_cluster; in fat_fill_super()
1675 sbi->fsinfo_sector = bpb.fat32_info_sector; in fat_fill_super()
1705 sbi->vol_id = bpb.fat32_vol_id; in fat_fill_super()
1707 sbi->vol_id = bpb.fat16_vol_id; in fat_fill_super()
1716 sbi->dir_entries = bpb.fat_dir_entries; in fat_fill_super()
1727 total_sectors = bpb.fat_sectors; in fat_fill_super()
1729 total_sectors = bpb.fat_total_sect; in fat_fill_super()
1738 sbi->dirty = bpb.fat32_state & FAT_STATE_DIRTY; in fat_fill_super()
1740 sbi->dirty = bpb.fat16_state & FAT_STATE_DIRTY; in fat_fill_super()