Lines Matching defs:func

67 int ibmphp_configure_card(struct pci_func *func, u8 slotno)
81 debug("inside configure_card, func->busno = %x\n", func->busno);
83 device = func->device;
84 cur_func = func;
87 * func->busno is correct, and func->device contains only device (at the 5
183 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
191 if (func->devices[i]) {
211 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
251 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
262 if (func->devices[i]) {
284 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */
329 static int configure_device(struct pci_func *func)
352 devfn = PCI_DEVFN(func->device, func->function);
353 ibmphp_pci_bus->number = func->busno;
376 debug("Device %x BAR %d wants %x\n", func->device, count, bar[count]);
393 io[count]->busno = func->busno;
394 io[count]->devfunc = PCI_DEVFN(func->device, func->function);
398 func->io[count] = io[count];
401 func->busno, func->device, func->function, len[count]);
405 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], func->io[count]->start);
408 debug("b4 writing, the IO address is %x\n", func->io[count]->start);
429 pfmem[count]->busno = func->busno;
430 pfmem[count]->devfunc = PCI_DEVFN(func->device,
431 func->function);
436 func->pfmem[count] = pfmem[count];
455 func->pfmem[count] = pfmem[count];
458 func->busno, func->device, len[count]);
465 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], func->pfmem[count]->start);
468 debug("b4 writing, start address is %x\n", func->pfmem[count]->start);
493 mem[count]->busno = func->busno;
494 mem[count]->devfunc = PCI_DEVFN(func->device,
495 func->function);
499 func->mem[count] = mem[count];
502 func->busno, func->device, len[count]);
506 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], func->mem[count]->start);
508 debug("b4 writing, start address is %x\n", func->mem[count]->start);
524 func->bus = 0; /* To indicate that this is not a PPB */
527 pci_bus_write_config_byte(ibmphp_pci_bus, devfn, PCI_INTERRUPT_LINE, func->irq[irq - 1]);
572 struct pci_func *func = *func_passed;
579 devfn = PCI_DEVFN(func->function, func->device);
580 ibmphp_pci_bus->number = func->busno;
586 pci_bus_write_config_byte(ibmphp_pci_bus, devfn, PCI_PRIMARY_BUS, func->busno);
594 sec_number = find_sec_number(func->busno, slotno);
601 debug("AFTER FIND_SEC_NUMBER, func->busno IS %x\n", func->busno);
621 debug("func->busno is %x\n", func->busno);
658 bus_io[count]->busno = func->busno;
659 bus_io[count]->devfunc = PCI_DEVFN(func->device,
660 func->function);
664 func->io[count] = bus_io[count];
667 func->busno, func->device, len[count]);
672 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], func->io[count]->start);
689 bus_pfmem[count]->busno = func->busno;
690 bus_pfmem[count]->devfunc = PCI_DEVFN(func->device,
691 func->function);
696 func->pfmem[count] = bus_pfmem[count];
712 func->pfmem[count] = bus_pfmem[count];
715 func->busno, func->device, len[count]);
722 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], func->pfmem[count]->start);
744 bus_mem[count]->busno = func->busno;
745 bus_mem[count]->devfunc = PCI_DEVFN(func->device,
746 func->function);
750 func->mem[count] = bus_mem[count];
753 func->busno, func->device, len[count]);
758 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], func->mem[count]->start);
772 amount_needed = scan_behind_bridge(func, sec_number);
776 ibmphp_pci_bus->number = func->busno;
789 func->io[count] = NULL;
792 func->pfmem[count] = NULL;
795 func->mem[count] = NULL;
814 io->busno = func->busno;
815 io->devfunc = PCI_DEVFN(func->device, func->function);
835 mem->busno = func->busno;
836 mem->devfunc = PCI_DEVFN(func->device, func->function);
856 pfmem->busno = func->busno;
857 pfmem->devfunc = PCI_DEVFN(func->device, func->function);
901 rc = add_new_bus(bus, io, mem, pfmem, func->busno);
911 ibmphp_remove_bus(bus, func->busno);
989 pci_bus_write_config_byte(ibmphp_pci_bus, devfn, PCI_INTERRUPT_LINE, func->irq[irq - 1]);
1001 func->devices[i] = 1;
1004 func->bus = 1; /* For unconfiguring, to indicate it's PPB */
1005 func_passed = &func;
1006 debug("func->busno b4 returning is %x\n", func->busno);
1007 debug("func->busno b4 returning in the other structure is %x\n", (*func_passed)->busno);
1028 func->io[i] = NULL;
1031 func->pfmem[i] = NULL;
1034 func->mem[i] = NULL;
1046 static struct res_needed *scan_behind_bridge(struct pci_func *func, u8 busno)
1176 * upon bootup in the system, since we don't allocate func to such case, we need to read
1468 err("was not able to unconfigure device %x func %x on bus %x. bailing out...\n",
1477 err("was not able to unconfigure device %x func %x on bus %x. bailing out...\n",
1546 /* In all other cases, will still need to get rid of func structure if it exists */
1551 if (sl->func) {
1552 cur_func = sl->func;
1589 sl->func = NULL;