Lines Matching defs:func

70 int cpqhp_configure_device(struct controller *ctrl, struct pci_func *func)
77 if (func->pci_dev == NULL)
78 func->pci_dev = pci_get_domain_bus_and_slot(0, func->bus,
79 PCI_DEVFN(func->device,
80 func->function));
83 if (func->pci_dev == NULL) {
86 num = pci_scan_slot(ctrl->pci_dev->bus, PCI_DEVFN(func->device, func->function));
90 func->pci_dev = pci_get_domain_bus_and_slot(0, func->bus,
91 PCI_DEVFN(func->device,
92 func->function));
93 if (func->pci_dev == NULL) {
99 if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
100 pci_hp_add_bridge(func->pci_dev);
101 child = func->pci_dev->subordinate;
106 pci_dev_put(func->pci_dev);
114 int cpqhp_unconfigure_device(struct pci_func *func)
118 dbg("%s: bus/dev/func = %x/%x/%x\n", __func__, func->bus, func->device, func->function);
123 func->bus,
124 PCI_DEVFN(func->device,
550 int cpqhp_save_base_addr_length(struct controller *ctrl, struct pci_func *func)
565 func = cpqhp_slot_find(func->bus, func->device, index++);
567 while (func != NULL) {
568 pci_bus->number = func->bus;
569 devfn = PCI_DEVFN(func->device, func->function);
588 pci_bus->number = func->bus;
622 func->base_length[(cloop - 0x10) >> 2] =
624 func->base_type[(cloop - 0x10) >> 2] = type;
662 func->base_length[(cloop - 0x10) >> 2] = base;
663 func->base_type[(cloop - 0x10) >> 2] = type;
671 func = cpqhp_slot_find(func->bus, func->device, index++);
687 int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
710 func = cpqhp_slot_find(func->bus, func->device, index++);
712 while ((func != NULL) && func->is_a_board) {
713 pci_bus->number = func->bus;
714 devfn = PCI_DEVFN(func->device, func->function);
740 bus_node->next = func->bus_head;
741 func->bus_head = bus_node;
755 io_node->next = func->io_head;
756 func->io_head = io_node;
771 mem_node->next = func->mem_head;
772 func->mem_head = mem_node;
787 p_mem_node->next = func->p_mem_head;
788 func->p_mem_head = p_mem_node;
820 io_node->next = func->io_head;
821 func->io_head = io_node;
837 p_mem_node->next = func->p_mem_head;
838 func->p_mem_head = p_mem_node;
854 mem_node->next = func->mem_head;
855 func->mem_head = mem_node;
891 io_node->next = func->io_head;
892 func->io_head = io_node;
908 p_mem_node->next = func->p_mem_head;
909 func->p_mem_head = p_mem_node;
925 mem_node->next = func->mem_head;
926 func->mem_head = mem_node;
934 func = cpqhp_slot_find(func->bus, func->device, index++);
950 int cpqhp_configure_board(struct controller *ctrl, struct pci_func *func)
963 func = cpqhp_slot_find(func->bus, func->device, index++);
965 while (func != NULL) {
966 pci_bus->number = func->bus;
967 devfn = PCI_DEVFN(func->device, func->function);
973 pci_bus_write_config_dword(pci_bus, devfn, cloop, func->config_space[cloop >> 2]);
1001 if (temp != func->config_space[cloop >> 2]) {
1003 dbg("bus = %x, device = %x, function = %x\n", func->bus, func->device, func->function);
1004 dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop >> 2]);
1010 func->configured = 1;
1012 func = cpqhp_slot_find(func->bus, func->device, index++);
1028 int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func)
1042 if (!func->is_a_board)
1045 func = cpqhp_slot_find(func->bus, func->device, index++);
1047 while (func != NULL) {
1048 pci_bus->number = func->bus;
1049 devfn = PCI_DEVFN(func->device, func->function);
1057 if (temp_register != func->config_space[0])
1064 if (temp_register != func->config_space[0x08 >> 2])
1076 temp_register = func->config_space[0x18 >> 2];
1097 if (temp_register != func->config_space[0x2C >> 2]) {
1102 if (!((func->config_space[0] == 0xAE100E11)
1136 if (func->base_length[(cloop - 0x10) >> 2] != base)
1139 if (func->base_type[(cloop - 0x10) >> 2] != type)
1153 func = cpqhp_slot_find(func->bus, func->device, index++);
1177 struct pci_func *func = NULL;
1274 func = cpqhp_slot_find(primary_bus, dev_func >> 3, 0);
1276 while (func && (func->function != (dev_func & 0x07))) {
1277 dbg("func = %p (bus, dev, fun) = (%d, %d, %d)\n", func, primary_bus, dev_func >> 3, index);
1278 func = cpqhp_slot_find(primary_bus, dev_func >> 3, index++);
1282 if (!func) {
1319 io_node->next = func->io_head;
1320 func->io_head = io_node;
1342 mem_node->next = func->mem_head;
1343 func->mem_head = mem_node;
1367 p_mem_node->next = func->p_mem_head;
1368 func->p_mem_head = p_mem_node;
1390 bus_node->next = func->bus_head;
1391 func->bus_head = bus_node;
1420 int cpqhp_return_board_resources(struct pci_func *func, struct resource_lists *resources)
1427 if (!func)
1430 node = func->io_head;
1431 func->io_head = NULL;
1438 node = func->mem_head;
1439 func->mem_head = NULL;
1446 node = func->p_mem_head;
1447 func->p_mem_head = NULL;
1454 node = func->bus_head;
1455 func->bus_head = NULL;
1523 void cpqhp_destroy_board_resources(struct pci_func *func)
1527 res = func->io_head;
1528 func->io_head = NULL;
1536 res = func->mem_head;
1537 func->mem_head = NULL;
1545 res = func->p_mem_head;
1546 func->p_mem_head = NULL;
1554 res = func->bus_head;
1555 func->bus_head = NULL;