Lines Matching refs:ctrl

84 int cpqhp_configure_device (struct controller *ctrl, struct pci_func *func)  in cpqhp_configure_device()  argument
98 num = pci_scan_slot(ctrl->pci_dev->bus, PCI_DEVFN(func->device, func->function)); in cpqhp_configure_device()
100 pci_bus_add_devices(ctrl->pci_dev->bus); in cpqhp_configure_device()
206 static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 *dev_num) in PCI_ScanBusForNonBridge() argument
212 ctrl->pci_bus->number = bus_num; in PCI_ScanBusForNonBridge()
216 if (PCI_RefinedAccessConfig(ctrl->pci_bus, tdevice, 0x08, &work) == -1) in PCI_ScanBusForNonBridge()
228 if (PCI_RefinedAccessConfig(ctrl->pci_bus, tdevice, 0x08, &work) == -1) in PCI_ScanBusForNonBridge()
233 pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(tdevice, 0), PCI_SECONDARY_BUS, &tbus); in PCI_ScanBusForNonBridge()
244 static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num, u8 slot, u8 nobri… in PCI_GetBusDevHelper() argument
259 ctrl->pci_bus->number = tbus; in PCI_GetBusDevHelper()
260 pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_VENDOR_ID, &work); in PCI_GetBusDevHelper()
265 pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_CLASS_REVISION, &work); in PCI_GetBusDevHelper()
269 pci_bus_read_config_byte (ctrl->pci_bus, *dev_num, PCI_SECONDARY_BUS, &tbus); in PCI_GetBusDevHelper()
271 if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) { in PCI_GetBusDevHelper()
283 int cpqhp_get_bus_dev (struct controller *ctrl, u8 *bus_num, u8 *dev_num, u8 slot) in cpqhp_get_bus_dev() argument
286 return PCI_GetBusDevHelper(ctrl, bus_num, dev_num, slot, 0); in cpqhp_get_bus_dev()
304 int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug) in cpqhp_save_config() argument
337 ctrl->pci_bus->number = busnumber; in cpqhp_save_config()
340 rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, 0), PCI_VENDOR_ID, &ID); in cpqhp_save_config()
361 rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, 0), 0x0B, &class_code); in cpqhp_save_config()
365 rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, 0), PCI_HEADER_TYPE, &header_type); in cpqhp_save_config()
383 …rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, function), PCI_SECONDARY_BUS, &seco… in cpqhp_save_config()
392 rc = cpqhp_save_config(ctrl, sub_bus, 0); in cpqhp_save_config()
395 ctrl->pci_bus->number = busnumber; in cpqhp_save_config()
422 …rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, function), cloop << 2, (u32 *) & (… in cpqhp_save_config()
437 rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, function), PCI_VENDOR_ID, &ID); in cpqhp_save_config()
442 rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, function), 0x0B, &class_code); in cpqhp_save_config()
446 …rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, function), PCI_HEADER_TYPE, &header… in cpqhp_save_config()
468 int cpqhp_save_slot_config (struct controller *ctrl, struct pci_func *new_slot) in cpqhp_save_slot_config() argument
483 ctrl->pci_bus->number = new_slot->bus; in cpqhp_save_slot_config()
484 pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), PCI_VENDOR_ID, &ID); in cpqhp_save_slot_config()
489 pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), 0x0B, &class_code); in cpqhp_save_slot_config()
490 …pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), PCI_HEADER_TYPE, &header_t… in cpqhp_save_slot_config()
500 …pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_SECONDARY_BUS,… in cpqhp_save_slot_config()
507 rc = cpqhp_save_config(ctrl, sub_bus, 0); in cpqhp_save_slot_config()
510 ctrl->pci_bus->number = new_slot->bus; in cpqhp_save_slot_config()
517 …pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), cloop << 2, (u32 *… in cpqhp_save_slot_config()
527 …pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_VENDOR_ID, &ID… in cpqhp_save_slot_config()
532 … pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), 0x0B, &class_code); in cpqhp_save_slot_config()
533 …pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_HEADER_TYPE, &h… in cpqhp_save_slot_config()
552 int cpqhp_save_base_addr_length(struct controller *ctrl, struct pci_func *func) in cpqhp_save_base_addr_length() argument
564 struct pci_bus *pci_bus = ctrl->pci_bus; in cpqhp_save_base_addr_length()
584 rc = cpqhp_save_base_addr_length(ctrl, next); in cpqhp_save_base_addr_length()
689 int cpqhp_save_used_resources (struct controller *ctrl, struct pci_func *func) in cpqhp_save_used_resources() argument
709 struct pci_bus *pci_bus = ctrl->pci_bus; in cpqhp_save_used_resources()
952 int cpqhp_configure_board(struct controller *ctrl, struct pci_func *func) in cpqhp_configure_board() argument
962 struct pci_bus *pci_bus = ctrl->pci_bus; in cpqhp_configure_board()
988 rc = cpqhp_configure_board(ctrl, next); in cpqhp_configure_board()
1030 int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func) in cpqhp_valid_replace() argument
1041 struct pci_bus *pci_bus = ctrl->pci_bus; in cpqhp_valid_replace()
1086 rc = cpqhp_valid_replace(ctrl, next); in cpqhp_valid_replace()
1172 int cpqhp_find_available_resources(struct controller *ctrl, void __iomem *rom_start) in cpqhp_find_available_resources() argument
1226 cpqhp_nic_irq = ctrl->cfgspc_irq; in cpqhp_find_available_resources()
1229 cpqhp_disk_irq = ctrl->cfgspc_irq; in cpqhp_find_available_resources()
1233 rc = compaq_nvram_load(rom_start, ctrl); in cpqhp_find_available_resources()
1264 if (primary_bus != ctrl->bus) { in cpqhp_find_available_resources()
1270 ctrl->pci_bus->number = primary_bus; in cpqhp_find_available_resources()
1271 pci_bus_read_config_dword (ctrl->pci_bus, dev_func, PCI_VENDOR_ID, &temp_dword); in cpqhp_find_available_resources()
1318 io_node->next = ctrl->io_head; in cpqhp_find_available_resources()
1319 ctrl->io_head = io_node; in cpqhp_find_available_resources()
1341 mem_node->next = ctrl->mem_head; in cpqhp_find_available_resources()
1342 ctrl->mem_head = mem_node; in cpqhp_find_available_resources()
1366 p_mem_node->next = ctrl->p_mem_head; in cpqhp_find_available_resources()
1367 ctrl->p_mem_head = p_mem_node; in cpqhp_find_available_resources()
1389 bus_node->next = ctrl->bus_head; in cpqhp_find_available_resources()
1390 ctrl->bus_head = bus_node; in cpqhp_find_available_resources()
1405 rc &= cpqhp_resource_sort_and_combine(&(ctrl->mem_head)); in cpqhp_find_available_resources()
1406 rc &= cpqhp_resource_sort_and_combine(&(ctrl->p_mem_head)); in cpqhp_find_available_resources()
1407 rc &= cpqhp_resource_sort_and_combine(&(ctrl->io_head)); in cpqhp_find_available_resources()
1408 rc &= cpqhp_resource_sort_and_combine(&(ctrl->bus_head)); in cpqhp_find_available_resources()