Lines Matching refs:parent
78 struct udev_device *parent = dev; in skip_subsystem() local
80 while (parent != NULL) { in skip_subsystem()
83 subsystem = udev_device_get_subsystem(parent); in skip_subsystem()
86 dev = parent; in skip_subsystem()
87 parent = udev_device_get_parent(parent); in skip_subsystem()
92 static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent, char **path) { in handle_scsi_fibre_channel() argument
93 struct udev *udev = udev_device_get_udev(parent); in handle_scsi_fibre_channel()
99 targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target"); in handle_scsi_fibre_channel()
108 parent = NULL; in handle_scsi_fibre_channel()
112 format_lun_number(parent, &lun); in handle_scsi_fibre_channel()
118 return parent; in handle_scsi_fibre_channel()
121 static struct udev_device *handle_scsi_sas_wide_port(struct udev_device *parent, char **path) { in handle_scsi_sas_wide_port() argument
122 struct udev *udev = udev_device_get_udev(parent); in handle_scsi_sas_wide_port()
129 targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target"); in handle_scsi_sas_wide_port()
144 parent = NULL; in handle_scsi_sas_wide_port()
148 format_lun_number(parent, &lun); in handle_scsi_sas_wide_port()
154 return parent; in handle_scsi_sas_wide_port()
157 static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path) in handle_scsi_sas() argument
159 struct udev *udev = udev_device_get_udev(parent); in handle_scsi_sas()
172 targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target"); in handle_scsi_sas()
189 parent = NULL; in handle_scsi_sas()
199 parent = NULL; in handle_scsi_sas()
205 parent = handle_scsi_sas_wide_port(parent, path); in handle_scsi_sas()
212 parent = NULL; in handle_scsi_sas()
219 parent = NULL; in handle_scsi_sas()
231 parent = NULL; in handle_scsi_sas()
236 format_lun_number(parent, &lun); in handle_scsi_sas()
248 return parent; in handle_scsi_sas()
251 static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path) { in handle_scsi_iscsi() argument
252 struct udev *udev = udev_device_get_udev(parent); in handle_scsi_iscsi()
263 transportdev = parent; in handle_scsi_iscsi()
278 parent = NULL; in handle_scsi_iscsi()
283 parent = NULL; in handle_scsi_iscsi()
289 parent = NULL; in handle_scsi_iscsi()
295 parent = NULL; in handle_scsi_iscsi()
299 format_lun_number(parent, &lun); in handle_scsi_iscsi()
306 return parent; in handle_scsi_iscsi()
309 static struct udev_device *handle_scsi_default(struct udev_device *parent, char **path) { in handle_scsi_default() argument
319 hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); in handle_scsi_default()
323 name = udev_device_get_sysname(parent); in handle_scsi_default()
350 parent = NULL; in handle_scsi_default()
356 parent = NULL; in handle_scsi_default()
382 parent = NULL; in handle_scsi_default()
393 static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char **path) { in handle_scsi_hyperv() argument
401 hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); in handle_scsi_hyperv()
423 format_lun_number(parent, &lun); in handle_scsi_hyperv()
426 return parent; in handle_scsi_hyperv()
429 static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_par… in handle_scsi() argument
434 devtype = udev_device_get_devtype(parent); in handle_scsi()
436 return parent; in handle_scsi()
439 id = udev_device_get_sysattr_value(parent, "ieee1394_id"); in handle_scsi()
441 parent = skip_subsystem(parent, "scsi"); in handle_scsi()
448 name = udev_device_get_syspath(parent); in handle_scsi()
451 parent = handle_scsi_fibre_channel(parent, path); in handle_scsi()
457 parent = handle_scsi_sas(parent, path); in handle_scsi()
463 parent = handle_scsi_iscsi(parent, path); in handle_scsi()
480 parent = NULL; in handle_scsi()
485 parent = handle_scsi_hyperv(parent, path); in handle_scsi()
489 parent = handle_scsi_default(parent, path); in handle_scsi()
491 return parent; in handle_scsi()
494 static struct udev_device *handle_cciss(struct udev_device *parent, char **path) { in handle_cciss() argument
498 str = udev_device_get_sysname(parent); in handle_cciss()
503 parent = skip_subsystem(parent, "cciss"); in handle_cciss()
504 return parent; in handle_cciss()
521 static struct udev_device *handle_usb(struct udev_device *parent, char **path) { in handle_usb() argument
526 devtype = udev_device_get_devtype(parent); in handle_usb()
528 return parent; in handle_usb()
530 return parent; in handle_usb()
532 str = udev_device_get_sysname(parent); in handle_usb()
535 return parent; in handle_usb()
538 parent = skip_subsystem(parent, "usb"); in handle_usb()
540 return parent; in handle_usb()
543 static struct udev_device *handle_bcma(struct udev_device *parent, char **path) { in handle_bcma() argument
547 sysname = udev_device_get_sysname(parent); in handle_bcma()
552 return parent; in handle_bcma()
555 static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **p… in handle_ccw() argument
573 path_prepend(path, "ccw-%s", udev_device_get_sysname(parent)); in handle_ccw()
575 parent = skip_subsystem(parent, "ccw"); in handle_ccw()
576 return parent; in handle_ccw()
580 struct udev_device *parent; in builtin_path_id() local
586 parent = udev_device_get_parent_with_subsystem_devtype(dev, "ccw", NULL); in builtin_path_id()
587 if (parent != NULL) { in builtin_path_id()
588 handle_ccw(parent, dev, &path); in builtin_path_id()
593 parent = dev; in builtin_path_id()
594 while (parent != NULL) { in builtin_path_id()
597 subsys = udev_device_get_subsystem(parent); in builtin_path_id()
601 handle_scsi_tape(parent, &path); in builtin_path_id()
603 parent = handle_scsi(parent, &path, &supported_parent); in builtin_path_id()
606 parent = handle_cciss(parent, &path); in builtin_path_id()
609 parent = handle_usb(parent, &path); in builtin_path_id()
612 parent = handle_bcma(parent, &path); in builtin_path_id()
615 path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent)); in builtin_path_id()
616 parent = skip_subsystem(parent, "serio"); in builtin_path_id()
618 path_prepend(&path, "pci-%s", udev_device_get_sysname(parent)); in builtin_path_id()
619 parent = skip_subsystem(parent, "pci"); in builtin_path_id()
622 path_prepend(&path, "platform-%s", udev_device_get_sysname(parent)); in builtin_path_id()
623 parent = skip_subsystem(parent, "platform"); in builtin_path_id()
627 path_prepend(&path, "acpi-%s", udev_device_get_sysname(parent)); in builtin_path_id()
628 parent = skip_subsystem(parent, "acpi"); in builtin_path_id()
631 path_prepend(&path, "xen-%s", udev_device_get_sysname(parent)); in builtin_path_id()
632 parent = skip_subsystem(parent, "xen"); in builtin_path_id()
635 path_prepend(&path, "scm-%s", udev_device_get_sysname(parent)); in builtin_path_id()
636 parent = skip_subsystem(parent, "scm"); in builtin_path_id()
641 parent = udev_device_get_parent(parent); in builtin_path_id()