pci.c (463ec0ac871f03e21674b446dc97d4def9b07bbf) | pci.c (36fed96550cc5e0c7c87d0c69eb5beccf1d2d77f) |
---|---|
1/*- 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * Copyright (c) 2000, Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000, BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 986 unchanged lines hidden (view full) --- 995void 996pci_add_child(device_t bus, struct pci_devinfo *dinfo) 997{ 998 device_t pcib; 999 1000 pcib = device_get_parent(bus); 1001 dinfo->cfg.dev = device_add_child(bus, NULL, -1); 1002 device_set_ivars(dinfo->cfg.dev, dinfo); | 1/*- 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * Copyright (c) 2000, Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000, BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 986 unchanged lines hidden (view full) --- 995void 996pci_add_child(device_t bus, struct pci_devinfo *dinfo) 997{ 998 device_t pcib; 999 1000 pcib = device_get_parent(bus); 1001 dinfo->cfg.dev = device_add_child(bus, NULL, -1); 1002 device_set_ivars(dinfo->cfg.dev, dinfo); |
1003 resource_list_init(&dinfo->resources); |
|
1003 pci_cfg_save(dinfo->cfg.dev, dinfo, 0); 1004 pci_cfg_restore(dinfo->cfg.dev, dinfo); 1005 pci_add_resources(pcib, bus, dinfo->cfg.dev); 1006 pci_print_verbose(dinfo); 1007} 1008 1009static int 1010pci_probe(device_t dev) --- 137 unchanged lines hidden (view full) --- 1148 DEVICE_IDENTIFY(driver, dev); 1149 device_get_children(dev, &devlist, &numdevs); 1150 for (i = 0; i < numdevs; i++) { 1151 child = devlist[i]; 1152 if (device_get_state(child) != DS_NOTPRESENT) 1153 continue; 1154 dinfo = device_get_ivars(child); 1155 pci_print_verbose(dinfo); | 1004 pci_cfg_save(dinfo->cfg.dev, dinfo, 0); 1005 pci_cfg_restore(dinfo->cfg.dev, dinfo); 1006 pci_add_resources(pcib, bus, dinfo->cfg.dev); 1007 pci_print_verbose(dinfo); 1008} 1009 1010static int 1011pci_probe(device_t dev) --- 137 unchanged lines hidden (view full) --- 1149 DEVICE_IDENTIFY(driver, dev); 1150 device_get_children(dev, &devlist, &numdevs); 1151 for (i = 0; i < numdevs; i++) { 1152 child = devlist[i]; 1153 if (device_get_state(child) != DS_NOTPRESENT) 1154 continue; 1155 dinfo = device_get_ivars(child); 1156 pci_print_verbose(dinfo); |
1156/*XXX???*/ /* resource_list_init(&dinfo->cfg.resources); */ | |
1157 if (bootverbose) 1158 printf("pci%d:%d:%d: reprobing on driver added\n", 1159 dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func); 1160 pci_cfg_restore(child, dinfo); 1161 if (device_probe_and_attach(child) != 0) 1162 pci_cfg_save(child, dinfo, 1); 1163 } 1164 free(devlist, M_TEMP); --- 812 unchanged lines hidden --- | 1157 if (bootverbose) 1158 printf("pci%d:%d:%d: reprobing on driver added\n", 1159 dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func); 1160 pci_cfg_restore(child, dinfo); 1161 if (device_probe_and_attach(child) != 0) 1162 pci_cfg_save(child, dinfo, 1); 1163 } 1164 free(devlist, M_TEMP); --- 812 unchanged lines hidden --- |