void hd_scan_sysfs_usb(hd_data_t *hd_data) { if(!hd_probe_feature(hd_data, pr_usb)) return; hd_data->module = mod_usb; /* some clean-up */ remove_hd_entries(hd_data); hd_data->proc_usb = free_str_list(hd_data->proc_usb); hd_data->usb = NULL; PROGRESS(1, 0, "sysfs drivers"); hd_sysfs_driver_list(hd_data); PROGRESS(2, 0, "usb"); get_usb_devs(hd_data); PROGRESS(3, 1, "joydev mod"); load_module(hd_data, "joydev"); PROGRESS(3, 2, "evdev mod"); load_module(hd_data, "evdev"); PROGRESS(3, 3, "input"); get_input_devs(hd_data); PROGRESS(3, 4, "lp"); get_printer_devs(hd_data); PROGRESS(3, 5, "serial"); get_serial_devs(hd_data); }
void hd_scan_sysfs_pci(hd_data_t *hd_data) { if(!hd_probe_feature(hd_data, pr_pci)) return; hd_data->module = mod_pci; /* some clean-up */ remove_hd_entries(hd_data); hd_data->pci = NULL; PROGRESS(1, 0, "sysfs drivers"); hd_sysfs_driver_list(hd_data); PROGRESS(2, 0, "get sysfs pci data"); hd_pci_read_data(hd_data); if(hd_data->debug) dump_pci_data(hd_data); add_pci_data(hd_data); PROGRESS(3, 0, "macio"); hd_read_macio(hd_data); PROGRESS(3, 0, "vio"); hd_read_vio(hd_data); }
void int_add_driver_modules(hd_data_t *hd_data) { hd_t *hd; hd_sysfs_driver_list(hd_data); for(hd = hd_data->hd; hd; hd = hd->next) { int_update_driver_data(hd_data, hd); } }
/* * Add driver data, if it is missing. * * Interface function, don't use internally. */ void hd_add_driver_data(hd_data_t *hd_data, hd_t *hd) { char *s; if(hd->drivers) return; hd_sysfs_driver_list(hd_data); s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1); if(s) add_str_list(&hd->drivers, s); int_update_driver_data(hd_data, hd); }
void hd_scan_sysfs_pci(hd_data_t *hd_data) { if(!hd_probe_feature(hd_data, pr_pci)) return; hd_data->module = mod_pci; /* some clean-up */ remove_hd_entries(hd_data); hd_data->pci = NULL; PROGRESS(1, 0, "sysfs drivers"); hd_sysfs_driver_list(hd_data); PROGRESS(2, 0, "get sysfs pci data"); hd_pci_read_data(hd_data); if(hd_data->debug) dump_pci_data(hd_data); add_pci_data(hd_data); PROGRESS(3, 0, "macio"); hd_read_macio(hd_data); PROGRESS(4, 0, "vio"); hd_read_vio(hd_data); PROGRESS(5, 0, "xen"); hd_read_xen(hd_data); PROGRESS(6, 0, "ps3"); hd_read_ps3_system_bus(hd_data); PROGRESS(7, 0, "platform"); hd_read_platform(hd_data); PROGRESS(8, 0, "of_platform"); hd_read_of_platform(hd_data); PROGRESS(9, 0, "vm"); hd_read_vm(hd_data); PROGRESS(10, 0, "virtio"); hd_read_virtio(hd_data); PROGRESS(11, 0, "ibmebus"); hd_read_ibmebus(hd_data); PROGRESS(12, 0, "uisvirtpci"); hd_read_uisvirtpci(hd_data); }
void hd_scan_sysfs_block(hd_data_t *hd_data) { if(!hd_probe_feature(hd_data, pr_block)) return; hd_data->module = mod_block; /* some clean-up */ remove_hd_entries(hd_data); hd_data->disks = free_str_list(hd_data->disks); hd_data->partitions = free_str_list(hd_data->partitions); hd_data->cdroms = free_str_list(hd_data->cdroms); if(hd_probe_feature(hd_data, pr_block_mods)) { PROGRESS(1, 0, "block modules"); // load_module(hd_data, "ide-cd"); load_module(hd_data, "ide-cd_mod"); load_module(hd_data, "ide-disk"); load_module(hd_data, "sr_mod"); load_module(hd_data, "sd_mod"); #if !defined(__s390__) && !defined(__s390x__) load_module(hd_data, "st"); #endif } PROGRESS(2, 0, "sysfs drivers"); hd_sysfs_driver_list(hd_data); PROGRESS(3, 0, "cdrom"); read_cdroms(hd_data); PROGRESS(4, 0, "partition"); read_partitions(hd_data); PROGRESS(5, 0, "get sysfs block dev data"); get_block_devs(hd_data); if(hd_data->cdrom) { ADD2LOG("oops: cdrom list not empty\n"); } }
void hd_scan_pcmcia(hd_data_t *hd_data) { if(!hd_probe_feature(hd_data, pr_pcmcia)) return; hd_data->module = mod_pcmcia; /* some clean-up */ remove_hd_entries(hd_data); PROGRESS(1, 0, "sysfs drivers"); hd_sysfs_driver_list(hd_data); PROGRESS(2, 0, "pcmcia"); pcmcia_read_data(hd_data); PROGRESS(3, 0, "pcmcia ctrl"); pcmcia_ctrl_read_data(hd_data); }
void hd_scan_int(hd_data_t *hd_data) { hd_t *hd; if(!hd_probe_feature(hd_data, pr_int)) return; hd_data->module = mod_int; /* some clean-up */ remove_hd_entries(hd_data); PROGRESS(2, 0, "cdrom"); int_cdrom(hd_data); PROGRESS(3, 0, "media"); int_media_check(hd_data); PROGRESS(4, 0, "floppy"); int_floppy(hd_data); #if defined(__i386__) || defined (__x86_64__) PROGRESS(5, 0, "edd"); assign_edd_info(hd_data); PROGRESS(5, 1, "bios"); int_bios(hd_data); #endif PROGRESS(6, 0, "mouse"); int_mouse(hd_data); /* data already needed in int_system() */ hd_sysfs_driver_list(hd_data); #if defined(__i386__) || defined (__x86_64__) PROGRESS(15, 0, "system info"); int_system(hd_data); #endif PROGRESS(7, 0, "hdb"); hd_data->flags.keep_kmods = 1; for(hd = hd_data->hd; hd; hd = hd->next) { hddb_add_info(hd_data, hd); } hd_data->flags.keep_kmods = 0; PROGRESS(7, 1, "modules"); int_add_driver_modules(hd_data); PROGRESS(8, 0, "usbscsi"); int_fix_usb_scsi(hd_data); PROGRESS(9, 0, "hotplug"); int_hotplug(hd_data); PROGRESS(10, 0, "modem"); int_modem(hd_data); PROGRESS(11, 0, "wlan"); int_wlan(hd_data); PROGRESS(12, 0, "udev"); int_udev(hd_data); PROGRESS(13, 0, "device names"); int_devicenames(hd_data); #if defined(__i386__) || defined (__x86_64__) PROGRESS(14, 0, "soft raid"); int_softraid(hd_data); PROGRESS(15, 0, "geo"); int_legacy_geo(hd_data); #endif PROGRESS(16, 0, "parent"); int_find_parent(hd_data); }