Lines Matching refs:zone
23 static unsigned int sd_zbc_get_zone_wp_offset(struct blk_zone *zone) in sd_zbc_get_zone_wp_offset() argument
25 if (zone->type == ZBC_ZONE_TYPE_CONV) in sd_zbc_get_zone_wp_offset()
28 switch (zone->cond) { in sd_zbc_get_zone_wp_offset()
32 return zone->wp - zone->start; in sd_zbc_get_zone_wp_offset()
34 return zone->len; in sd_zbc_get_zone_wp_offset()
51 struct blk_zone zone = { 0 }; in sd_zbc_parse_report() local
54 zone.type = buf[0] & 0x0f; in sd_zbc_parse_report()
55 zone.cond = (buf[1] >> 4) & 0xf; in sd_zbc_parse_report()
57 zone.reset = 1; in sd_zbc_parse_report()
59 zone.non_seq = 1; in sd_zbc_parse_report()
61 zone.len = logical_to_sectors(sdp, get_unaligned_be64(&buf[8])); in sd_zbc_parse_report()
62 zone.capacity = zone.len; in sd_zbc_parse_report()
63 zone.start = logical_to_sectors(sdp, get_unaligned_be64(&buf[16])); in sd_zbc_parse_report()
64 zone.wp = logical_to_sectors(sdp, get_unaligned_be64(&buf[24])); in sd_zbc_parse_report()
65 if (zone.type != ZBC_ZONE_TYPE_CONV && in sd_zbc_parse_report()
66 zone.cond == ZBC_ZONE_COND_FULL) in sd_zbc_parse_report()
67 zone.wp = zone.start + zone.len; in sd_zbc_parse_report()
69 ret = cb(&zone, idx, data); in sd_zbc_parse_report()
74 sdkp->rev_wp_offset[idx] = sd_zbc_get_zone_wp_offset(&zone); in sd_zbc_parse_report()
267 static int sd_zbc_update_wp_offset_cb(struct blk_zone *zone, unsigned int idx, in sd_zbc_update_wp_offset_cb() argument
274 sdkp->zones_wp_offset[idx] = sd_zbc_get_zone_wp_offset(zone); in sd_zbc_update_wp_offset_cb()