• Home
  • Raw
  • Download

Lines Matching refs:zone

29 static unsigned int sd_zbc_get_zone_wp_offset(struct blk_zone *zone)  in sd_zbc_get_zone_wp_offset()  argument
31 if (zone->type == ZBC_ZONE_TYPE_CONV) in sd_zbc_get_zone_wp_offset()
34 switch (zone->cond) { in sd_zbc_get_zone_wp_offset()
38 return zone->wp - zone->start; in sd_zbc_get_zone_wp_offset()
40 return zone->len; in sd_zbc_get_zone_wp_offset()
77 struct blk_zone zone = { 0 }; in sd_zbc_parse_report() local
84 zone.type = buf[0] & 0x0f; in sd_zbc_parse_report()
85 zone.cond = (buf[1] >> 4) & 0xf; in sd_zbc_parse_report()
87 zone.reset = 1; in sd_zbc_parse_report()
89 zone.non_seq = 1; in sd_zbc_parse_report()
92 zone.start = logical_to_sectors(sdp, start_lba); in sd_zbc_parse_report()
93 zone.capacity = logical_to_sectors(sdp, get_unaligned_be64(&buf[8])); in sd_zbc_parse_report()
94 zone.len = zone.capacity; in sd_zbc_parse_report()
97 if (zone.len > gran) { in sd_zbc_parse_report()
101 sectors_to_logical(sdp, zone.capacity), in sd_zbc_parse_report()
102 sectors_to_logical(sdp, zone.len), in sd_zbc_parse_report()
110 zone.len = gran; in sd_zbc_parse_report()
112 if (zone.cond == ZBC_ZONE_COND_FULL) in sd_zbc_parse_report()
113 zone.wp = zone.start + zone.len; in sd_zbc_parse_report()
115 zone.wp = logical_to_sectors(sdp, get_unaligned_be64(&buf[24])); in sd_zbc_parse_report()
117 ret = cb(&zone, idx, data); in sd_zbc_parse_report()
122 sdkp->rev_wp_offset[idx] = sd_zbc_get_zone_wp_offset(&zone); in sd_zbc_parse_report()
359 static int sd_zbc_update_wp_offset_cb(struct blk_zone *zone, unsigned int idx, in sd_zbc_update_wp_offset_cb() argument
366 sdkp->zones_wp_offset[idx] = sd_zbc_get_zone_wp_offset(zone); in sd_zbc_update_wp_offset_cb()