rem: static void scan_pci(void)
add: scan_pci(void)
context: static void scan_pci(void){	int bus, dev, func; 			/* We can have up to 255 busses */	for(bus = 0; bus < 255; bus++) {		/* Each bus can have up to 'bus_max_devices' devices on it */		for(dev = 0; dev <= bus_max_devices; dev++) {			/* Each device can have up to 8 functions */			uint16 sv_vendor_id = 0, sv_device_id = 0;						for (func = 0; func < 8; func++) {				pci_info *pcii = NULL;				uint16 vendor_id = read_pci_config(bus, dev, func, 0, 2);				uint16 device_id;				uint8 offset;				/* If we get 0xffff then there is no device here. As there can't				 * be any gaps in function allocation this tells us that we				 * can move onto the next device/bus				 */				if (vendor_id == 0xffff)					break;				device_id = read_pci_config(bus, dev, func, PCI_device_id, 2);				/* Is this a new device? As we're scanning the functions here, many devices				 * will supply identical information for all 8 accesses! Try to catch this and				 * simply move past duplicates. We need to continue scanning in case we miss				 * a different device at the end.				 * XXX - is this correct????				 */				if (vendor_id == sv_vendor_id && sv_device_id == device_id) {					/* It's a duplicate */					continue;				}				sv_vendor_id = vendor_id;				sv_device_id = device_id;								/* At present we will add a device to our list if we get here,				 * but we may want to review if we need to add 8 version of the				 * same device if only the functions differ?				 */				if ((pcii = (pci_info*)kmalloc(sizeof(pci_info))) == NULL) {					dprintf("Failed to get memory for a pic_info structure in scan_pci\n");					return;				}				if (pci_get_capability(bus, dev, func, PCI_cap_id_agp, &offset))					dprintf("Device @ %d:%d:%d has AGP capability\n", bus, dev, func);				pci_set_power_state(bus, dev, func, PCI_pm_state_d0);								/* basic header */				pcii->bus = bus;				pcii->device = dev;				pcii->function = func;				pcii->vendor_id = vendor_id;				pcii->device_id = device_id;				pcii->revision =    read_pci_config(bus, dev, func, PCI_revision, 1);				pcii->class_api =   read_pci_config(bus, dev, func, PCI_class_api, 1);				pcii->class_sub =   read_pci_config(bus, dev, func, PCI_class_sub, 1);				pcii->class_base =  read_pci_config(bus, dev, func, PCI_class_base, 1);				pcii->header_type = read_pci_config(bus, dev, func, PCI_header_type, 1);				pcii->header_type &= PCI_header_type_mask;			        					}		}	}}