Lines Matching full:part
142 struct sdda_part *part[MMC_PART_MAX]; member
443 struct sdda_part *part; in sddaopen() local
448 part = (struct sdda_part *)dp->d_drv1; in sddaopen()
449 softc = part->sc; in sddaopen()
464 part->flags |= SDDA_FLAG_OPEN; in sddaopen()
474 struct sdda_part *part; in sddaclose() local
478 part = (struct sdda_part *)dp->d_drv1; in sddaclose()
479 softc = part->sc; in sddaclose()
481 part->flags &= ~SDDA_FLAG_OPEN; in sddaclose()
498 struct sdda_part *part; in sddaschedule() local
504 bp = bioq_first(&softc->part[softc->part_curr]->bio_queue); in sddaschedule()
507 if ((part = softc->part[i]) != NULL && in sddaschedule()
508 (bp = bioq_first(&softc->part[i]->bio_queue)) != NULL) in sddaschedule()
526 struct sdda_part *part; in sddastrategy() local
529 part = (struct sdda_part *)bp->bio_disk->d_drv1; in sddastrategy()
530 softc = part->sc; in sddastrategy()
549 bioq_disksort(&part->bio_queue, bp); in sddastrategy()
585 struct sdda_part *part; in sddadiskgonecb() local
587 part = (struct sdda_part *)dp->d_drv1; in sddadiskgonecb()
588 periph = part->sc->periph; in sddadiskgonecb()
598 struct sdda_part *part; in sddaoninvalidate() local
616 if ((part = softc->part[i]) != NULL) { in sddaoninvalidate()
617 bioq_flush(&part->bio_queue, NULL, ENXIO); in sddaoninvalidate()
618 disk_gone(part->disk); in sddaoninvalidate()
628 struct sdda_part *part; in sddacleanup() local
637 if ((part = softc->part[i]) != NULL) { in sddacleanup()
638 disk_destroy(part->disk); in sddacleanup()
639 free(part, M_DEVBUF); in sddacleanup()
640 softc->part[i] = NULL; in sddacleanup()
711 struct sdda_part *part; in sddaasync() local
715 if ((part = softc->part[i]) != NULL) { in sddaasync()
716 disk_attr_changed(part->disk, "GEOM::physpath", in sddaasync()
735 struct sdda_part *part; in sddagetattr() local
738 part = (struct sdda_part *)bp->bio_disk->d_drv1; in sddagetattr()
739 softc = part->sc; in sddagetattr()
1510 struct sdda_part *part; in sdda_add_part() local
1519 part = sc->part[type] = malloc(sizeof(*part), M_DEVBUF, in sdda_add_part()
1521 if (part == NULL) { in sdda_add_part()
1526 part->cnt = cnt; in sdda_add_part()
1527 part->type = type; in sdda_add_part()
1528 part->ro = ro; in sdda_add_part()
1529 part->sc = sc; in sdda_add_part()
1530 snprintf(part->name, sizeof(part->name), name, "sdda", periph->unit_number); in sdda_add_part()
1545 bioq_init(&part->bio_queue); in sdda_add_part()
1558 part->disk = disk_alloc(); in sdda_add_part()
1559 part->disk->d_rotation_rate = DISK_RR_NON_ROTATING; in sdda_add_part()
1560 part->disk->d_devstat = devstat_new_entry(part->name, in sdda_add_part()
1566 part->disk->d_open = sddaopen; in sdda_add_part()
1567 part->disk->d_close = sddaclose; in sdda_add_part()
1568 part->disk->d_strategy = sddastrategy; in sdda_add_part()
1570 part->disk->d_dump = sddadump; in sdda_add_part()
1571 part->disk->d_getattr = sddagetattr; in sdda_add_part()
1572 part->disk->d_gone = sddadiskgonecb; in sdda_add_part()
1573 part->disk->d_name = part->name; in sdda_add_part()
1574 part->disk->d_drv1 = part; in sdda_add_part()
1575 part->disk->d_maxsize = in sdda_add_part()
1578 part->disk->d_unit = cnt; in sdda_add_part()
1579 part->disk->d_flags = 0; in sdda_add_part()
1580 strlcpy(part->disk->d_descr, sc->card_id_string, in sdda_add_part()
1581 MIN(sizeof(part->disk->d_descr), sizeof(sc->card_id_string))); in sdda_add_part()
1582 strlcpy(part->disk->d_ident, sc->card_sn_string, in sdda_add_part()
1583 MIN(sizeof(part->disk->d_ident), sizeof(sc->card_sn_string))); in sdda_add_part()
1584 part->disk->d_hba_vendor = cpi.hba_vendor; in sdda_add_part()
1585 part->disk->d_hba_device = cpi.hba_device; in sdda_add_part()
1586 part->disk->d_hba_subvendor = cpi.hba_subvendor; in sdda_add_part()
1587 part->disk->d_hba_subdevice = cpi.hba_subdevice; in sdda_add_part()
1588 snprintf(part->disk->d_attachment, sizeof(part->disk->d_attachment), in sdda_add_part()
1591 part->disk->d_sectorsize = mmc_get_sector_size(periph); in sdda_add_part()
1592 part->disk->d_mediasize = media_size; in sdda_add_part()
1593 part->disk->d_stripesize = 0; in sdda_add_part()
1594 part->disk->d_fwsectors = 0; in sdda_add_part()
1595 part->disk->d_fwheads = 0; in sdda_add_part()
1600 disk_add_alias(part->disk, cname); in sdda_add_part()
1614 disk_create(part->disk, DISK_VERSION); in sdda_add_part()
1762 uint8_t part) in sdda_init_switch_part() argument
1767 KASSERT(part < MMC_PART_MAX, ("%s: invalid partition index", __func__)); in sdda_init_switch_part()
1768 sc->part_requested = part; in sdda_init_switch_part()
1771 ~EXT_CSD_PART_CONFIG_ACC_MASK) | part; in sdda_init_switch_part()
1789 struct sdda_part *part; in sddastart() local
1803 part = softc->part[softc->part_curr]; in sddastart()
1804 bp = bioq_first(&part->bio_queue); in sddastart()
1807 if ((part = softc->part[part_index]) != NULL && in sddastart()
1808 (bp = bioq_first(&softc->part[part_index]->bio_queue)) != NULL) in sddastart()
1835 bioq_remove(&part->bio_queue, bp); in sddastart()
1840 part->flags |= SDDA_FLAG_DIRTY; in sddastart()
2015 struct sdda_part *part; in sddadump() local
2024 part = dp->d_drv1; in sddadump()
2025 softc = part->sc; in sddadump()
2036 if (softc->part[softc->part_curr] != part) in sddadump()