Lines Matching defs:device
112 * cpqhp_find_slot - find the struct slot of given device
114 * @device: the device id to find
116 static struct slot *cpqhp_find_slot(struct controller *ctrl, u8 device)
120 while (slot && (slot->device != device))
1060 * cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed
1062 * @device: device to find
1067 struct pci_func *cpqhp_slot_find(u8 bus, u8 device, u8 index)
1074 if ((func == NULL) || ((func->device == device) && (index == 0)))
1077 if (func->device == device)
1083 if (func->device == device)
1131 if (slot->device == (hp_slot + ctrl->slot_device_offset))
1245 * @func: PCI device/function information
1262 hp_slot = func->device - ctrl->slot_device_offset;
1399 * @func: PCI device/function info
1418 hp_slot = func->device - ctrl->slot_device_offset;
1419 dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n",
1420 __func__, func->device, ctrl->slot_device_offset, hp_slot);
1505 /* Get vendor/device ID u32 */
1507 rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register);
1569 new_slot = cpqhp_slot_find(ctrl->bus, func->device, index++);
1606 * @func: PCI device/function info
1607 * @replace_flag: whether replacing or adding a new device
1614 u8 device;
1624 device = func->device;
1626 hp_slot = func->device - ctrl->slot_device_offset;
1639 temp_func = cpqhp_slot_find(func->bus, func->device, index++);
1646 temp_func = cpqhp_slot_find(temp_func->bus, temp_func->device, index++);
1698 func = cpqhp_slot_find(ctrl->bus, device, 0);
1708 func->device = device;
1888 u8 device;
1896 device = p_slot->device;
1901 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
1923 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
1949 u8 device, hp_slot;
1958 device = func->device;
1959 hp_slot = device - ctrl->slot_device_offset;
1960 p_slot = cpqhp_find_slot(ctrl, device);
1981 func->device = device;
2011 func->device = device;
2039 u8 device, class_code, header_type, BCR;
2048 device = func->device;
2049 func = cpqhp_slot_find(ctrl->bus, device, index++);
2050 p_slot = cpqhp_find_slot(ctrl, device);
2057 devfn = PCI_DEVFN(func->device, func->function);
2086 func = cpqhp_slot_find(ctrl->bus, device, index++);
2089 func = cpqhp_slot_find(ctrl->bus, device, 0);
2234 /* Check for Multi-function device */
2236 rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte);
2242 if (temp_byte & 0x80) /* Multi-function device */
2257 new_slot = cpqhp_slot_find(new_slot->bus, new_slot->device, index++);
2274 pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(func->device, function), 0x00, &ID);
2286 new_slot->device = func->device;
2309 * configure_new_function - Configures the PCI header information of one device
2325 u8 device;
2350 devfn = PCI_DEVFN(func->device, func->function);
2512 for (device = 0; (device <= 0x1F) && !rc; device++) {
2517 pci_bus_read_config_dword(pci_bus, PCI_DEVFN(device, 0), 0x00, &ID);
2520 if (ID != 0xFFFFFFFF) { /* device present */
2530 new_slot->device = device;
2537 } /* End of IF (device in slot?) */
2553 rc = cpqhp_set_irq(func->bus, func->device,
2738 * a device */
2755 /* Standard device */
2873 rc = cpqhp_set_irq(func->bus, func->device, temp_byte, IRQ);