Lines Matching refs:func
153 int slot, int func) in pcistub_device_find() argument
165 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_device_find()
202 int slot, int func) in pcistub_get_pci_dev_by_slot() argument
215 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_get_pci_dev_by_slot()
956 int *slot, int *func) in str_to_slot() argument
960 switch (sscanf(buf, " %x:%x:%x.%x %n", domain, bus, slot, func, in str_to_slot()
963 *func = -1; in str_to_slot()
967 *slot = *func = -1; in str_to_slot()
976 switch (sscanf(buf, " %x:%x.%x %n", bus, slot, func, &parsed)) { in str_to_slot()
978 *func = -1; in str_to_slot()
982 *slot = *func = -1; in str_to_slot()
993 *slot, int *func, int *reg, int *size, int *mask) in str_to_quirk() argument
997 sscanf(buf, " %x:%x:%x.%x-%x:%x:%x %n", domain, bus, slot, func, in str_to_quirk()
1004 sscanf(buf, " %x:%x.%x-%x:%x:%x %n", bus, slot, func, reg, size, in str_to_quirk()
1012 static int pcistub_device_id_add(int domain, int bus, int slot, int func) in pcistub_device_id_add() argument
1016 int rc = 0, devfn = PCI_DEVFN(slot, func); in pcistub_device_id_add()
1020 rc = pcistub_device_id_add(domain, bus, slot, func); in pcistub_device_id_add()
1024 if (func < 0) { in pcistub_device_id_add()
1025 for (func = 0; !rc && func < 8; ++func) in pcistub_device_id_add()
1026 rc = pcistub_device_id_add(domain, bus, slot, func); in pcistub_device_id_add()
1038 || PCI_FUNC(devfn) != func) in pcistub_device_id_add()
1050 domain, bus, slot, func); in pcistub_device_id_add()
1059 static int pcistub_device_id_remove(int domain, int bus, int slot, int func) in pcistub_device_id_remove() argument
1070 && (func < 0 || PCI_FUNC(pci_dev_id->devfn) == func)) { in pcistub_device_id_remove()
1080 domain, bus, slot, func); in pcistub_device_id_remove()
1088 static int pcistub_reg_add(int domain, int bus, int slot, int func, in pcistub_reg_add() argument
1100 psdev = pcistub_device_find(domain, bus, slot, func); in pcistub_reg_add()
1133 int domain, bus, slot, func; in pcistub_slot_add() local
1136 err = str_to_slot(buf, &domain, &bus, &slot, &func); in pcistub_slot_add()
1140 err = pcistub_device_id_add(domain, bus, slot, func); in pcistub_slot_add()
1152 int domain, bus, slot, func; in pcistub_slot_remove() local
1155 err = str_to_slot(buf, &domain, &bus, &slot, &func); in pcistub_slot_remove()
1159 err = pcistub_device_id_remove(domain, bus, slot, func); in pcistub_slot_remove()
1226 int domain, bus, slot, func; in pcistub_irq_handler_switch() local
1229 err = str_to_slot(buf, &domain, &bus, &slot, &func); in pcistub_irq_handler_switch()
1233 psdev = pcistub_device_find(domain, bus, slot, func); in pcistub_irq_handler_switch()
1265 int domain, bus, slot, func, reg, size, mask; in pcistub_quirk_add() local
1268 err = str_to_quirk(buf, &domain, &bus, &slot, &func, ®, &size, in pcistub_quirk_add()
1273 err = pcistub_reg_add(domain, bus, slot, func, reg, size, mask); in pcistub_quirk_add()
1330 int domain, bus, slot, func; in permissive_add() local
1335 err = str_to_slot(buf, &domain, &bus, &slot, &func); in permissive_add()
1339 psdev = pcistub_device_find(domain, bus, slot, func); in permissive_add()
1412 int domain, bus, slot, func; in pcistub_init() local
1421 &domain, &bus, &slot, &func, &parsed); in pcistub_init()
1424 func = -1; in pcistub_init()
1430 slot = func = -1; in pcistub_init()
1441 &bus, &slot, &func, &parsed); in pcistub_init()
1444 func = -1; in pcistub_init()
1450 slot = func = -1; in pcistub_init()
1461 err = pcistub_device_id_add(domain, bus, slot, func); in pcistub_init()