Lines Matching refs:cur_func

50 static void assign_alt_irq (struct pci_func * cur_func, u8 class_code)  in assign_alt_irq()  argument
54 if (cur_func->irq[j] == 0xff) { in assign_alt_irq()
57 cur_func->irq[j] = SCSI_IRQ; in assign_alt_irq()
60 cur_func->irq[j] = LAN_IRQ; in assign_alt_irq()
63 cur_func->irq[j] = OTHER_IRQ; in assign_alt_irq()
89 struct pci_func *cur_func, *prev_func; in ibmphp_configure_card() local
98 cur_func = func; in ibmphp_configure_card()
107 cur_func->function = function; in ibmphp_configure_card()
109 …cur_func->busno = %x, cur_func->device = %x, cur_func->funcion = %x\n", cur_func->busno, device, f… in ibmphp_configure_card()
111 …pci_read_config_word_nodev (ibmphp_pci_root_ops, cur_func->busno, device, function, PCI_VENDOR_ID,… in ibmphp_configure_card()
125 …pci_read_config_byte_nodev (ibmphp_pci_root_ops, cur_func->busno, device, function, PCI_HEADER_TYP… in ibmphp_configure_card()
126 …pci_read_config_dword_nodev (ibmphp_pci_root_ops, cur_func->busno, device, function, PCI_CLASS_REV… in ibmphp_configure_card()
133 "Please choose another device.\n", cur_func->device); in ibmphp_configure_card()
137 "Please choose another device.\n", cur_func->device); in ibmphp_configure_card()
143 assign_alt_irq (cur_func, class_code); in ibmphp_configure_card()
144 if ((rc = configure_device (cur_func)) < 0) { in ibmphp_configure_card()
147 cur_func->device, cur_func->busno); in ibmphp_configure_card()
151 cur_func->next = NULL; in ibmphp_configure_card()
155 assign_alt_irq (cur_func, class_code); in ibmphp_configure_card()
156 if ((rc = configure_device (cur_func)) < 0) { in ibmphp_configure_card()
159 cur_func->device, cur_func->busno); in ibmphp_configure_card()
169 newfunc->busno = cur_func->busno; in ibmphp_configure_card()
171 cur_func->next = newfunc; in ibmphp_configure_card()
172 cur_func = newfunc; in ibmphp_configure_card()
174 newfunc->irq[j] = cur_func->irq[j]; in ibmphp_configure_card()
180 "Please insert another card.\n", cur_func->device); in ibmphp_configure_card()
183 assign_alt_irq (cur_func, class_code); in ibmphp_configure_card()
184 rc = configure_bridge (&cur_func, slotno); in ibmphp_configure_card()
187 err ("Bus %x, devfunc %x \n", cur_func->busno, cur_func->device); in ibmphp_configure_card()
198 …pci_read_config_byte_nodev (ibmphp_pci_root_ops, cur_func->busno, device, function, PCI_SECONDARY_… in ibmphp_configure_card()
211 newfunc->irq[j] = cur_func->irq[j]; in ibmphp_configure_card()
214 for (prev_func = cur_func; prev_func->next; prev_func = prev_func->next) ; in ibmphp_configure_card()
217 cur_func->next = newfunc; in ibmphp_configure_card()
237 newfunc->busno = cur_func->busno; in ibmphp_configure_card()
240 newfunc->irq[j] = cur_func->irq[j]; in ibmphp_configure_card()
241 for (prev_func = cur_func; prev_func->next; prev_func = prev_func->next) ; in ibmphp_configure_card()
243 cur_func = newfunc; in ibmphp_configure_card()
250 "Please insert another card.\n", cur_func->device); in ibmphp_configure_card()
254 assign_alt_irq (cur_func, class_code); in ibmphp_configure_card()
256 debug ("cur_func->busno b4 configure_bridge is %x\n", cur_func->busno); in ibmphp_configure_card()
257 rc = configure_bridge (&cur_func, slotno); in ibmphp_configure_card()
260 err ("Bus %x, devfunc %x \n", cur_func->busno, cur_func->device); in ibmphp_configure_card()
270 … debug ("cur_func->busno = %x, device = %x, function = %x\n", cur_func->busno, device, function); in ibmphp_configure_card()
271 …pci_read_config_byte_nodev (ibmphp_pci_root_ops, cur_func->busno, device, function, PCI_SECONDARY_… in ibmphp_configure_card()
286 newfunc->irq[j] = cur_func->irq[j]; in ibmphp_configure_card()
289 for (prev_func = cur_func; prev_func->next; prev_func = prev_func->next) ; in ibmphp_configure_card()
292 cur_func->next = newfunc; in ibmphp_configure_card()
326 if (cur_func->io[i]) { in ibmphp_configure_card()
327 ibmphp_remove_resource (cur_func->io[i]); in ibmphp_configure_card()
328 cur_func->io[i] = NULL; in ibmphp_configure_card()
329 } else if (cur_func->pfmem[i]) { in ibmphp_configure_card()
330 ibmphp_remove_resource (cur_func->pfmem[i]); in ibmphp_configure_card()
331 cur_func->pfmem[i] = NULL; in ibmphp_configure_card()
332 } else if (cur_func->mem[i]) { in ibmphp_configure_card()
333 ibmphp_remove_resource (cur_func->mem[i]); in ibmphp_configure_card()
334 cur_func->mem[i] = NULL; in ibmphp_configure_card()
1581 struct pci_func *cur_func = NULL; in ibmphp_unconfigure_card() local
1596 cur_func = sl->func; in ibmphp_unconfigure_card()
1597 while (cur_func) { in ibmphp_unconfigure_card()
1599 if (cur_func->bus) { in ibmphp_unconfigure_card()
1607 if (cur_func->io[count]) { in ibmphp_unconfigure_card()
1610 ibmphp_remove_resource (cur_func->io[count]); in ibmphp_unconfigure_card()
1611 cur_func->io[count] = NULL; in ibmphp_unconfigure_card()
1613 if (cur_func->mem[count]) { in ibmphp_unconfigure_card()
1616 ibmphp_remove_resource (cur_func->mem[count]); in ibmphp_unconfigure_card()
1617 cur_func->mem[count] = NULL; in ibmphp_unconfigure_card()
1619 if (cur_func->pfmem[count]) { in ibmphp_unconfigure_card()
1622 ibmphp_remove_resource (cur_func->pfmem[count]); in ibmphp_unconfigure_card()
1623 cur_func->pfmem[count] = NULL; in ibmphp_unconfigure_card()
1627 temp_func = cur_func->next; in ibmphp_unconfigure_card()
1628 kfree (cur_func); in ibmphp_unconfigure_card()
1629 cur_func = temp_func; in ibmphp_unconfigure_card()