Lines Matching refs:desc

42 static bool is_sd(struct blk_desc *desc)  in is_sd()  argument
44 struct mmc *mmc = find_mmc_device(desc->devnum); in is_sd()
510 struct blk_desc *desc = dev_get_uclass_platdata(dev); in dp_fill() local
515 dp->logical_unit_number = desc->devnum; in dp_fill()
516 dp->primary_secondary = IDE_BUS(desc->devnum); in dp_fill()
517 dp->slave_master = desc->devnum % in dp_fill()
527 struct blk_desc *desc = dev_get_uclass_platdata(dev); in dp_fill() local
532 dp->logical_unit_number = desc->lun; in dp_fill()
533 dp->target_id = desc->target; in dp_fill()
541 struct blk_desc *desc = dev_get_uclass_platdata(dev); in dp_fill() local
544 sddp->dp.sub_type = is_sd(desc) ? in dp_fill()
564 struct blk_desc *desc = mmc_get_blk_desc(mmc); in dp_fill() local
567 sddp->dp.sub_type = is_sd(desc) ? in dp_fill()
581 struct usb_device_descriptor *desc = &udev->descriptor; in dp_fill() local
586 udp->vendor_id = desc->idVendor; in dp_fill()
587 udp->product_id = desc->idProduct; in dp_fill()
588 udp->device_class = desc->bDeviceClass; in dp_fill()
589 udp->device_subclass = desc->bDeviceSubClass; in dp_fill()
590 udp->device_protocol = desc->bDeviceProtocol; in dp_fill()
617 static unsigned dp_part_size(struct blk_desc *desc, int part) in dp_part_size() argument
624 int ret = blk_find_device(desc->if_type, desc->devnum, &dev); in dp_part_size()
627 dev = desc->bdev->parent; in dp_part_size()
637 if (desc->part_type == PART_TYPE_ISO) in dp_part_size()
652 static void *dp_part_node(void *buf, struct blk_desc *desc, int part) in dp_part_node() argument
656 part_get_info(desc, part, &info); in dp_part_node()
658 if (desc->part_type == PART_TYPE_ISO) { in dp_part_node()
678 if (desc->part_type == PART_TYPE_EFI) in dp_part_node()
683 switch (desc->sig_type) { in dp_part_node()
694 memcpy(hddp->partition_signature, &desc->mbr_sig, in dp_part_node()
695 sizeof(desc->mbr_sig)); in dp_part_node()
699 memcpy(hddp->partition_signature, &desc->guid_sig, in dp_part_node()
717 static void *dp_part_fill(void *buf, struct blk_desc *desc, int part) in dp_part_fill() argument
722 int ret = blk_find_device(desc->if_type, desc->devnum, &dev); in dp_part_fill()
725 dev = desc->bdev->parent; in dp_part_fill()
745 udp->parent_port_number = desc->if_type; in dp_part_fill()
746 udp->usb_interface = desc->devnum; in dp_part_fill()
753 return dp_part_node(buf, desc, part); in dp_part_fill()
757 struct efi_device_path *efi_dp_from_part(struct blk_desc *desc, int part) in efi_dp_from_part() argument
761 start = buf = dp_alloc(dp_part_size(desc, part) + sizeof(END)); in efi_dp_from_part()
765 buf = dp_part_fill(buf, desc, part); in efi_dp_from_part()
779 struct efi_device_path *efi_dp_part_node(struct blk_desc *desc, int part) in efi_dp_part_node() argument
784 if (desc->part_type == PART_TYPE_ISO) in efi_dp_part_node()
790 dp_part_node(buf, desc, part); in efi_dp_part_node()
811 struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part, in efi_dp_from_file() argument
818 if (desc) in efi_dp_from_file()
819 dpsize = dp_part_size(desc, part); in efi_dp_from_file()
828 if (desc) in efi_dp_from_file()
829 buf = dp_part_fill(buf, desc, part); in efi_dp_from_file()
960 struct blk_desc *desc = NULL; in efi_dp_from_name() local
971 part = blk_get_device_part_str(dev, devnr, &desc, &fs_partition, in efi_dp_from_name()
977 *device = efi_dp_from_part(desc, part); in efi_dp_from_name()
993 *file = efi_dp_from_file(((!is_net && device) ? desc : NULL), in efi_dp_from_name()