Lines Matching refs:raid_map
1123 struct pqi_scsi_dev *device, struct raid_map *raid_map) in pqi_validate_raid_map() argument
1129 raid_map_size = get_unaligned_le32(&raid_map->structure_size); in pqi_validate_raid_map()
1131 if (raid_map_size < offsetof(struct raid_map, disk_data)) { in pqi_validate_raid_map()
1137 if (get_unaligned_le16(&raid_map->layout_map_count) != 2) { in pqi_validate_raid_map()
1142 if (get_unaligned_le16(&raid_map->layout_map_count) != 3) { in pqi_validate_raid_map()
1148 get_unaligned_le16(&raid_map->layout_map_count) > 1) { in pqi_validate_raid_map()
1151 get_unaligned_le16(&raid_map->strip_size) * in pqi_validate_raid_map()
1152 get_unaligned_le16(&raid_map->data_disks_per_row); in pqi_validate_raid_map()
1175 struct raid_map *raid_map; in pqi_get_raid_map() local
1177 raid_map = kmalloc(sizeof(*raid_map), GFP_KERNEL); in pqi_get_raid_map()
1178 if (!raid_map) in pqi_get_raid_map()
1182 device->scsi3addr, raid_map, sizeof(*raid_map), in pqi_get_raid_map()
1188 raid_map_size = get_unaligned_le32(&raid_map->structure_size); in pqi_get_raid_map()
1190 if (raid_map_size > sizeof(*raid_map)) { in pqi_get_raid_map()
1192 kfree(raid_map); in pqi_get_raid_map()
1194 raid_map = kmalloc(raid_map_size, GFP_KERNEL); in pqi_get_raid_map()
1195 if (!raid_map) in pqi_get_raid_map()
1199 device->scsi3addr, raid_map, raid_map_size, in pqi_get_raid_map()
1204 if (get_unaligned_le32(&raid_map->structure_size) in pqi_get_raid_map()
1209 get_unaligned_le32(&raid_map->structure_size)); in pqi_get_raid_map()
1215 rc = pqi_validate_raid_map(ctrl_info, device, raid_map); in pqi_get_raid_map()
1219 device->raid_map = raid_map; in pqi_get_raid_map()
1224 kfree(raid_map); in pqi_get_raid_map()
1719 kfree(existing_device->raid_map); in pqi_scsi_update_device()
1720 existing_device->raid_map = new_device->raid_map; in pqi_scsi_update_device()
1728 new_device->raid_map = NULL; in pqi_scsi_update_device()
1734 kfree(device->raid_map); in pqi_free_device()
2218 struct pqi_encryption_info *encryption_info, struct raid_map *raid_map, in pqi_set_encryption_info() argument
2228 volume_blk_size = get_unaligned_le32(&raid_map->volume_blk_size); in pqi_set_encryption_info()
2233 get_unaligned_le16(&raid_map->data_encryption_key_index); in pqi_set_encryption_info()
2248 struct raid_map *raid_map; in pqi_raid_bypass_submit_scsi_cmd() local
2337 raid_map = device->raid_map; in pqi_raid_bypass_submit_scsi_cmd()
2340 if (last_block >= get_unaligned_le64(&raid_map->volume_blk_cnt) || in pqi_raid_bypass_submit_scsi_cmd()
2344 data_disks_per_row = get_unaligned_le16(&raid_map->data_disks_per_row); in pqi_raid_bypass_submit_scsi_cmd()
2345 strip_size = get_unaligned_le16(&raid_map->strip_size); in pqi_raid_bypass_submit_scsi_cmd()
2346 layout_map_count = get_unaligned_le16(&raid_map->layout_map_count); in pqi_raid_bypass_submit_scsi_cmd()
2380 get_unaligned_le16(&raid_map->metadata_disks_per_row); in pqi_raid_bypass_submit_scsi_cmd()
2381 map_row = ((u32)(first_row >> raid_map->parity_rotation_shift)) % in pqi_raid_bypass_submit_scsi_cmd()
2382 get_unaligned_le16(&raid_map->row_cnt); in pqi_raid_bypass_submit_scsi_cmd()
2514 ((u32)(first_row >> raid_map->parity_rotation_shift)) % in pqi_raid_bypass_submit_scsi_cmd()
2515 get_unaligned_le16(&raid_map->row_cnt); in pqi_raid_bypass_submit_scsi_cmd()
2518 (get_unaligned_le16(&raid_map->row_cnt) * in pqi_raid_bypass_submit_scsi_cmd()
2523 aio_handle = raid_map->disk_data[map_index].aio_handle; in pqi_raid_bypass_submit_scsi_cmd()
2524 disk_block = get_unaligned_le64(&raid_map->disk_starting_blk) + in pqi_raid_bypass_submit_scsi_cmd()
2530 if (raid_map->phys_blk_shift) { in pqi_raid_bypass_submit_scsi_cmd()
2531 disk_block <<= raid_map->phys_blk_shift; in pqi_raid_bypass_submit_scsi_cmd()
2532 disk_block_cnt <<= raid_map->phys_blk_shift; in pqi_raid_bypass_submit_scsi_cmd()
2557 if (get_unaligned_le16(&raid_map->flags) & in pqi_raid_bypass_submit_scsi_cmd()
2559 pqi_set_encryption_info(&encryption_info, raid_map, in pqi_raid_bypass_submit_scsi_cmd()