• Home
  • Raw
  • Download

Lines Matching refs:edev

56 	ssize_t(*show) (struct edd_device * edev, char *buf);
57 int (*test) (struct edd_device * edev);
61 static int edd_dev_is_type(struct edd_device *edev, const char *type);
62 static struct pci_dev *edd_get_pci_dev(struct edd_device *edev);
74 edd_has_mbr_signature(struct edd_device *edev) in edd_has_mbr_signature() argument
76 return edev->index < min_t(unsigned char, edd.mbr_signature_nr, EDD_MBR_SIG_MAX); in edd_has_mbr_signature()
80 edd_has_edd_info(struct edd_device *edev) in edd_has_edd_info() argument
82 return edev->index < min_t(unsigned char, edd.edd_info_nr, EDDMAXNR); in edd_has_edd_info()
86 edd_dev_get_info(struct edd_device *edev) in edd_dev_get_info() argument
88 return edev->info; in edd_dev_get_info()
92 edd_dev_set_info(struct edd_device *edev, int i) in edd_dev_set_info() argument
94 edev->index = i; in edd_dev_set_info()
95 if (edd_has_mbr_signature(edev)) in edd_dev_set_info()
96 edev->mbr_signature = edd.mbr_signature[i]; in edd_dev_set_info()
97 if (edd_has_edd_info(edev)) in edd_dev_set_info()
98 edev->info = &edd.edd_info[i]; in edd_dev_set_info()
121 edd_show_host_bus(struct edd_device *edev, char *buf) in edd_show_host_bus() argument
127 if (!edev) in edd_show_host_bus()
129 info = edd_dev_get_info(edev); in edd_show_host_bus()
167 edd_show_interface(struct edd_device *edev, char *buf) in edd_show_interface() argument
173 if (!edev) in edd_show_interface()
175 info = edd_dev_get_info(edev); in edd_show_interface()
233 edd_show_raw_data(struct edd_device *edev, char *buf) in edd_show_raw_data() argument
237 if (!edev) in edd_show_raw_data()
239 info = edd_dev_get_info(edev); in edd_show_raw_data()
255 edd_show_version(struct edd_device *edev, char *buf) in edd_show_version() argument
259 if (!edev) in edd_show_version()
261 info = edd_dev_get_info(edev); in edd_show_version()
270 edd_show_mbr_signature(struct edd_device *edev, char *buf) in edd_show_mbr_signature() argument
273 p += scnprintf(p, left, "0x%08x\n", edev->mbr_signature); in edd_show_mbr_signature()
278 edd_show_extensions(struct edd_device *edev, char *buf) in edd_show_extensions() argument
282 if (!edev) in edd_show_extensions()
284 info = edd_dev_get_info(edev); in edd_show_extensions()
304 edd_show_info_flags(struct edd_device *edev, char *buf) in edd_show_info_flags() argument
308 if (!edev) in edd_show_info_flags()
310 info = edd_dev_get_info(edev); in edd_show_info_flags()
334 edd_show_legacy_max_cylinder(struct edd_device *edev, char *buf) in edd_show_legacy_max_cylinder() argument
338 if (!edev) in edd_show_legacy_max_cylinder()
340 info = edd_dev_get_info(edev); in edd_show_legacy_max_cylinder()
349 edd_show_legacy_max_head(struct edd_device *edev, char *buf) in edd_show_legacy_max_head() argument
353 if (!edev) in edd_show_legacy_max_head()
355 info = edd_dev_get_info(edev); in edd_show_legacy_max_head()
364 edd_show_legacy_sectors_per_track(struct edd_device *edev, char *buf) in edd_show_legacy_sectors_per_track() argument
368 if (!edev) in edd_show_legacy_sectors_per_track()
370 info = edd_dev_get_info(edev); in edd_show_legacy_sectors_per_track()
379 edd_show_default_cylinders(struct edd_device *edev, char *buf) in edd_show_default_cylinders() argument
383 if (!edev) in edd_show_default_cylinders()
385 info = edd_dev_get_info(edev); in edd_show_default_cylinders()
394 edd_show_default_heads(struct edd_device *edev, char *buf) in edd_show_default_heads() argument
398 if (!edev) in edd_show_default_heads()
400 info = edd_dev_get_info(edev); in edd_show_default_heads()
409 edd_show_default_sectors_per_track(struct edd_device *edev, char *buf) in edd_show_default_sectors_per_track() argument
413 if (!edev) in edd_show_default_sectors_per_track()
415 info = edd_dev_get_info(edev); in edd_show_default_sectors_per_track()
424 edd_show_sectors(struct edd_device *edev, char *buf) in edd_show_sectors() argument
428 if (!edev) in edd_show_sectors()
430 info = edd_dev_get_info(edev); in edd_show_sectors()
450 edd_has_legacy_max_cylinder(struct edd_device *edev) in edd_has_legacy_max_cylinder() argument
453 if (!edev) in edd_has_legacy_max_cylinder()
455 info = edd_dev_get_info(edev); in edd_has_legacy_max_cylinder()
462 edd_has_legacy_max_head(struct edd_device *edev) in edd_has_legacy_max_head() argument
465 if (!edev) in edd_has_legacy_max_head()
467 info = edd_dev_get_info(edev); in edd_has_legacy_max_head()
474 edd_has_legacy_sectors_per_track(struct edd_device *edev) in edd_has_legacy_sectors_per_track() argument
477 if (!edev) in edd_has_legacy_sectors_per_track()
479 info = edd_dev_get_info(edev); in edd_has_legacy_sectors_per_track()
486 edd_has_default_cylinders(struct edd_device *edev) in edd_has_default_cylinders() argument
489 if (!edev) in edd_has_default_cylinders()
491 info = edd_dev_get_info(edev); in edd_has_default_cylinders()
498 edd_has_default_heads(struct edd_device *edev) in edd_has_default_heads() argument
501 if (!edev) in edd_has_default_heads()
503 info = edd_dev_get_info(edev); in edd_has_default_heads()
510 edd_has_default_sectors_per_track(struct edd_device *edev) in edd_has_default_sectors_per_track() argument
513 if (!edev) in edd_has_default_sectors_per_track()
515 info = edd_dev_get_info(edev); in edd_has_default_sectors_per_track()
522 edd_has_edd30(struct edd_device *edev) in edd_has_edd30() argument
528 if (!edev) in edd_has_edd30()
530 info = edd_dev_get_info(edev); in edd_has_edd30()
627 edd_dev_is_type(struct edd_device *edev, const char *type) in edd_dev_is_type() argument
630 if (!edev) in edd_dev_is_type()
632 info = edd_dev_get_info(edev); in edd_dev_is_type()
649 edd_get_pci_dev(struct edd_device *edev) in edd_get_pci_dev() argument
651 struct edd_info *info = edd_dev_get_info(edev); in edd_get_pci_dev()
653 if (edd_dev_is_type(edev, "PCI") || edd_dev_is_type(edev, "XPRS")) { in edd_get_pci_dev()
663 edd_create_symlink_to_pcidev(struct edd_device *edev) in edd_create_symlink_to_pcidev() argument
666 struct pci_dev *pci_dev = edd_get_pci_dev(edev); in edd_create_symlink_to_pcidev()
670 ret = sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev"); in edd_create_symlink_to_pcidev()
676 edd_device_unregister(struct edd_device *edev) in edd_device_unregister() argument
678 kobject_put(&edev->kobj); in edd_device_unregister()
681 static void edd_populate_dir(struct edd_device * edev) in edd_populate_dir() argument
688 if (!attr->test || attr->test(edev)) in edd_populate_dir()
689 error = sysfs_create_file(&edev->kobj,&attr->attr); in edd_populate_dir()
693 edd_create_symlink_to_pcidev(edev); in edd_populate_dir()
698 edd_device_register(struct edd_device *edev, int i) in edd_device_register() argument
702 if (!edev) in edd_device_register()
704 edd_dev_set_info(edev, i); in edd_device_register()
705 edev->kobj.kset = edd_kset; in edd_device_register()
706 error = kobject_init_and_add(&edev->kobj, &edd_ktype, NULL, in edd_device_register()
709 edd_populate_dir(edev); in edd_device_register()
710 kobject_uevent(&edev->kobj, KOBJ_ADD); in edd_device_register()
730 struct edd_device *edev; in edd_init() local
743 edev = kzalloc(sizeof (*edev), GFP_KERNEL); in edd_init()
744 if (!edev) { in edd_init()
749 rc = edd_device_register(edev, i); in edd_init()
751 kfree(edev); in edd_init()
754 edd_devices[i] = edev; in edd_init()
770 struct edd_device *edev; in edd_exit() local
773 if ((edev = edd_devices[i])) in edd_exit()
774 edd_device_unregister(edev); in edd_exit()