Lines Matching refs:parent

78         struct udev_device *parent = dev;
80 while (parent != NULL) {
83 subsystem = udev_device_get_subsystem(parent);
86 dev = parent;
87 parent = udev_device_get_parent(parent);
92 static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent, char **path) {
93 struct udev *udev = udev_device_get_udev(parent);
99 targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
108 parent = NULL;
112 format_lun_number(parent, &lun);
118 return parent;
121 static struct udev_device *handle_scsi_sas_wide_port(struct udev_device *parent, char **path) {
122 struct udev *udev = udev_device_get_udev(parent);
129 targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
144 parent = NULL;
148 format_lun_number(parent, &lun);
154 return parent;
157 static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path)
159 struct udev *udev = udev_device_get_udev(parent);
172 targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
186 /* The next parent is sas port */
189 parent = NULL;
199 parent = NULL;
205 parent = handle_scsi_sas_wide_port(parent, path);
212 parent = NULL;
216 /* The port's parent is either hba or expander */
219 parent = NULL;
231 parent = NULL;
236 format_lun_number(parent, &lun);
248 return parent;
251 static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path) {
252 struct udev *udev = udev_device_get_udev(parent);
263 transportdev = parent;
278 parent = NULL;
283 parent = NULL;
289 parent = NULL;
295 parent = NULL;
299 format_lun_number(parent, &lun);
306 return parent;
309 static struct udev_device *handle_scsi_default(struct udev_device *parent, char **path) {
319 hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
323 name = udev_device_get_sysname(parent);
350 parent = NULL;
356 parent = NULL;
374 * own instance number per parent device; relying on the global host
382 parent = NULL;
393 static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char **path) {
401 hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
423 format_lun_number(parent, &lun);
426 return parent;
429 static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
434 devtype = udev_device_get_devtype(parent);
436 return parent;
439 id = udev_device_get_sysattr_value(parent, "ieee1394_id");
441 parent = skip_subsystem(parent, "scsi");
448 name = udev_device_get_syspath(parent);
451 parent = handle_scsi_fibre_channel(parent, path);
457 parent = handle_scsi_sas(parent, path);
463 parent = handle_scsi_iscsi(parent, path);
480 parent = NULL;
485 parent = handle_scsi_hyperv(parent, path);
489 parent = handle_scsi_default(parent, path);
491 return parent;
494 static struct udev_device *handle_cciss(struct udev_device *parent, char **path) {
498 str = udev_device_get_sysname(parent);
503 parent = skip_subsystem(parent, "cciss");
504 return parent;
521 static struct udev_device *handle_usb(struct udev_device *parent, char **path) {
526 devtype = udev_device_get_devtype(parent);
528 return parent;
530 return parent;
532 str = udev_device_get_sysname(parent);
535 return parent;
538 parent = skip_subsystem(parent, "usb");
540 return parent;
543 static struct udev_device *handle_bcma(struct udev_device *parent, char **path) {
547 sysname = udev_device_get_sysname(parent);
552 return parent;
555 static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path) {
573 path_prepend(path, "ccw-%s", udev_device_get_sysname(parent));
575 parent = skip_subsystem(parent, "ccw");
576 return parent;
580 struct udev_device *parent;
586 parent = udev_device_get_parent_with_subsystem_devtype(dev, "ccw", NULL);
587 if (parent != NULL) {
588 handle_ccw(parent, dev, &path);
593 parent = dev;
594 while (parent != NULL) {
597 subsys = udev_device_get_subsystem(parent);
601 handle_scsi_tape(parent, &path);
603 parent = handle_scsi(parent, &path, &supported_parent);
606 parent = handle_cciss(parent, &path);
609 parent = handle_usb(parent, &path);
612 parent = handle_bcma(parent, &path);
615 path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent));
616 parent = skip_subsystem(parent, "serio");
618 path_prepend(&path, "pci-%s", udev_device_get_sysname(parent));
619 parent = skip_subsystem(parent, "pci");
622 path_prepend(&path, "platform-%s", udev_device_get_sysname(parent));
623 parent = skip_subsystem(parent, "platform");
627 path_prepend(&path, "acpi-%s", udev_device_get_sysname(parent));
628 parent = skip_subsystem(parent, "acpi");
631 path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
632 parent = skip_subsystem(parent, "xen");
635 path_prepend(&path, "scm-%s", udev_device_get_sysname(parent));
636 parent = skip_subsystem(parent, "scm");
641 parent = udev_device_get_parent(parent);
645 * Do not return devices with an unknown parent device type. They
646 * might produce conflicting IDs if the parent does not provide a