Lines Matching refs:func

224 int shpchp_configure_device (struct controller* ctrl, struct pci_func* func)    in shpchp_configure_device()  argument
241 dbg("%s: func->pci_dev %p\n", __FUNCTION__, func->pci_dev); in shpchp_configure_device()
242 if (func->pci_dev != NULL) in shpchp_configure_device()
243 dbg("%s: func->pci_dev->irq %x\n", __FUNCTION__, func->pci_dev->irq); in shpchp_configure_device()
244 if (func->pci_dev == NULL) in shpchp_configure_device()
245 func->pci_dev = pci_find_slot(func->bus, (func->device << 3) | (func->function & 0x7)); in shpchp_configure_device()
246 dbg("%s: after pci_find_slot, func->pci_dev %p\n", __FUNCTION__, func->pci_dev); in shpchp_configure_device()
247 if (func->pci_dev != NULL) in shpchp_configure_device()
248 dbg("%s: after pci_find_slot, func->pci_dev->irq %x\n", __FUNCTION__, func->pci_dev->irq); in shpchp_configure_device()
251 if (func->pci_dev == NULL) { in shpchp_configure_device()
255 dev0.bus->number = func->bus; in shpchp_configure_device()
256 dbg("%s: dev0.bus->number %x\n", __FUNCTION__, func->bus); in shpchp_configure_device()
257 dev0.devfn = PCI_DEVFN(func->device, func->function); in shpchp_configure_device()
264 func->pci_dev = pci_scan_slot(&dev0); in shpchp_configure_device()
266 func->pci_dev->irq); in shpchp_configure_device()
267 if (func->pci_dev == NULL) { in shpchp_configure_device()
273 if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { in shpchp_configure_device()
274 pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus); in shpchp_configure_device()
275 child = (struct pci_bus*) pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus); in shpchp_configure_device()
281 temp = func->pci_dev; in shpchp_configure_device()
282 dbg("%s: func->pci_dev->irq %x\n", __FUNCTION__, func->pci_dev->irq); in shpchp_configure_device()
295 int shpchp_unconfigure_device(struct pci_func* func) in shpchp_unconfigure_device() argument
305 dbg("%s: bus/dev/func = %x/%x/%x\n", __FUNCTION__, func->bus, func->device, func->function); in shpchp_unconfigure_device()
308 struct pci_dev* temp = pci_find_slot(func->bus, (func->device << 3) | j); in shpchp_unconfigure_device()
657 int shpchp_save_used_resources (struct controller *ctrl, struct pci_func *func, int disable) in shpchp_save_used_resources() argument
683 func = shpchp_slot_find(func->bus, func->device, index++); in shpchp_save_used_resources()
685 while ((func != NULL) && func->is_a_board) { in shpchp_save_used_resources()
686 pci_bus->number = func->bus; in shpchp_save_used_resources()
687 devfn = PCI_DEVFN(func->device, func->function); in shpchp_save_used_resources()
702 dbg("Save_used_res of PCI bridge b:d=0x%x:%x, sc=0x%x\n", func->bus, func->device, save_command); in shpchp_save_used_resources()
719 bus_node->next = func->bus_head; in shpchp_save_used_resources()
720 func->bus_head = bus_node; in shpchp_save_used_resources()
736 io_node->next = func->io_head; in shpchp_save_used_resources()
737 func->io_head = io_node; in shpchp_save_used_resources()
752 mem_node->next = func->mem_head; in shpchp_save_used_resources()
753 func->mem_head = mem_node; in shpchp_save_used_resources()
767 p_mem_node->next = func->p_mem_head; in shpchp_save_used_resources()
768 func->p_mem_head = p_mem_node; in shpchp_save_used_resources()
771 … dbg("Save_used_res of PCI adapter b:d=0x%x:%x, sc=0x%x\n", func->bus, func->device, save_command); in shpchp_save_used_resources()
804 io_node->next = func->io_head; in shpchp_save_used_resources()
805 func->io_head = io_node; in shpchp_save_used_resources()
833 p_mem_node->next = func->p_mem_head; in shpchp_save_used_resources()
834 func->p_mem_head = p_mem_node; in shpchp_save_used_resources()
840 mem_node->next = func->mem_head; in shpchp_save_used_resources()
841 func->mem_head = mem_node; in shpchp_save_used_resources()
859 p_mem_node->next = func->p_mem_head; in shpchp_save_used_resources()
860 func->p_mem_head = p_mem_node; in shpchp_save_used_resources()
866 mem_node->next = func->mem_head; in shpchp_save_used_resources()
867 func->mem_head = mem_node; in shpchp_save_used_resources()
878 dbg("Save_used_res of PCI unknown type b:d=0x%x:%x. skip.\n", func->bus, func->device); in shpchp_save_used_resources()
884 func = shpchp_slot_find(func->bus, func->device, index++); in shpchp_save_used_resources()
899 int shpchp_return_board_resources(struct pci_func * func, struct resource_lists * resources) in shpchp_return_board_resources() argument
906 if (!func) in shpchp_return_board_resources()
909 node = func->io_head; in shpchp_return_board_resources()
910 func->io_head = NULL; in shpchp_return_board_resources()
917 node = func->mem_head; in shpchp_return_board_resources()
918 func->mem_head = NULL; in shpchp_return_board_resources()
925 node = func->p_mem_head; in shpchp_return_board_resources()
926 func->p_mem_head = NULL; in shpchp_return_board_resources()
933 node = func->bus_head; in shpchp_return_board_resources()
934 func->bus_head = NULL; in shpchp_return_board_resources()
1002 void shpchp_destroy_board_resources (struct pci_func * func) in shpchp_destroy_board_resources() argument
1008 res = func->io_head; in shpchp_destroy_board_resources()
1009 func->io_head = NULL; in shpchp_destroy_board_resources()
1017 res = func->mem_head; in shpchp_destroy_board_resources()
1018 func->mem_head = NULL; in shpchp_destroy_board_resources()
1026 res = func->p_mem_head; in shpchp_destroy_board_resources()
1027 func->p_mem_head = NULL; in shpchp_destroy_board_resources()
1035 res = func->bus_head; in shpchp_destroy_board_resources()
1036 func->bus_head = NULL; in shpchp_destroy_board_resources()