Lines Matching refs:bpb
1460 int silent, struct fat_bios_param_block *bpb) in fat_read_bpb() argument
1465 memset(bpb, 0, sizeof(*bpb)); in fat_read_bpb()
1466 bpb->fat_sector_size = get_unaligned_le16(&b->sector_size); in fat_read_bpb()
1467 bpb->fat_sec_per_clus = b->sec_per_clus; in fat_read_bpb()
1468 bpb->fat_reserved = le16_to_cpu(b->reserved); in fat_read_bpb()
1469 bpb->fat_fats = b->fats; in fat_read_bpb()
1470 bpb->fat_dir_entries = get_unaligned_le16(&b->dir_entries); in fat_read_bpb()
1471 bpb->fat_sectors = get_unaligned_le16(&b->sectors); in fat_read_bpb()
1472 bpb->fat_fat_length = le16_to_cpu(b->fat_length); in fat_read_bpb()
1473 bpb->fat_total_sect = le32_to_cpu(b->total_sect); in fat_read_bpb()
1475 bpb->fat16_state = b->fat16.state; in fat_read_bpb()
1476 bpb->fat16_vol_id = get_unaligned_le32(b->fat16.vol_id); in fat_read_bpb()
1478 bpb->fat32_length = le32_to_cpu(b->fat32.length); in fat_read_bpb()
1479 bpb->fat32_root_cluster = le32_to_cpu(b->fat32.root_cluster); in fat_read_bpb()
1480 bpb->fat32_info_sector = le16_to_cpu(b->fat32.info_sector); in fat_read_bpb()
1481 bpb->fat32_state = b->fat32.state; in fat_read_bpb()
1482 bpb->fat32_vol_id = get_unaligned_le32(b->fat32.vol_id); in fat_read_bpb()
1485 if (!bpb->fat_reserved) { in fat_read_bpb()
1491 if (!bpb->fat_fats) { in fat_read_bpb()
1509 if (!is_power_of_2(bpb->fat_sector_size) in fat_read_bpb()
1510 || (bpb->fat_sector_size < 512) in fat_read_bpb()
1511 || (bpb->fat_sector_size > 4096)) { in fat_read_bpb()
1514 (unsigned)bpb->fat_sector_size); in fat_read_bpb()
1518 if (!is_power_of_2(bpb->fat_sec_per_clus)) { in fat_read_bpb()
1521 (unsigned)bpb->fat_sec_per_clus); in fat_read_bpb()
1533 struct fat_bios_param_block *bpb) in fat_read_static_bpb() argument
1582 memset(bpb, 0, sizeof(*bpb)); in fat_read_static_bpb()
1583 bpb->fat_sector_size = SECTOR_SIZE; in fat_read_static_bpb()
1584 bpb->fat_sec_per_clus = fdefaults->sec_per_clus; in fat_read_static_bpb()
1585 bpb->fat_reserved = 1; in fat_read_static_bpb()
1586 bpb->fat_fats = 2; in fat_read_static_bpb()
1587 bpb->fat_dir_entries = fdefaults->dir_entries; in fat_read_static_bpb()
1588 bpb->fat_sectors = fdefaults->nr_sectors; in fat_read_static_bpb()
1589 bpb->fat_fat_length = fdefaults->fat_length; in fat_read_static_bpb()
1606 struct fat_bios_param_block bpb; in fat_fill_super() local
1654 &bpb); in fat_fill_super()
1657 (struct fat_boot_sector *)bh->b_data, silent, &bpb); in fat_fill_super()
1665 logical_sector_size = bpb.fat_sector_size; in fat_fill_super()
1666 sbi->sec_per_clus = bpb.fat_sec_per_clus; in fat_fill_super()
1698 sbi->fats = bpb.fat_fats; in fat_fill_super()
1700 sbi->fat_start = bpb.fat_reserved; in fat_fill_super()
1701 sbi->fat_length = bpb.fat_fat_length; in fat_fill_super()
1714 if (!sbi->fat_length && bpb.fat32_length) { in fat_fill_super()
1720 sbi->fat_length = bpb.fat32_length; in fat_fill_super()
1721 sbi->root_cluster = bpb.fat32_root_cluster; in fat_fill_super()
1724 sbi->fsinfo_sector = bpb.fat32_info_sector; in fat_fill_super()
1754 sbi->vol_id = bpb.fat32_vol_id; in fat_fill_super()
1756 sbi->vol_id = bpb.fat16_vol_id; in fat_fill_super()
1762 sbi->dir_entries = bpb.fat_dir_entries; in fat_fill_super()
1773 total_sectors = bpb.fat_sectors; in fat_fill_super()
1775 total_sectors = bpb.fat_total_sect; in fat_fill_super()
1784 sbi->dirty = bpb.fat32_state & FAT_STATE_DIRTY; in fat_fill_super()
1786 sbi->dirty = bpb.fat16_state & FAT_STATE_DIRTY; in fat_fill_super()