Lines Matching refs: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))
1059 * cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed
1061 * @device: device to find
1066 struct pci_func *cpqhp_slot_find(u8 bus, u8 device, u8 index)
1073 if ((func == NULL) || ((func->device == device) && (index == 0)))
1076 if (func->device == device)
1082 if (func->device == device)
1130 if (slot->device == (hp_slot + ctrl->slot_device_offset))
1244 * @func: PCI device/function information
1261 hp_slot = func->device - ctrl->slot_device_offset;
1398 * @func: PCI device/function info
1416 hp_slot = func->device - ctrl->slot_device_offset;
1417 dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n",
1418 __func__, func->device, ctrl->slot_device_offset, hp_slot);
1503 /* Get vendor/device ID u32 */
1505 rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register);
1567 new_slot = cpqhp_slot_find(ctrl->bus, func->device, index++);
1604 * @func: PCI device/function info
1605 * @replace_flag: whether replacing or adding a new device
1612 u8 device;
1621 device = func->device;
1623 hp_slot = func->device - ctrl->slot_device_offset;
1636 temp_func = cpqhp_slot_find(func->bus, func->device, index++);
1643 temp_func = cpqhp_slot_find(temp_func->bus, temp_func->device, index++);
1695 func = cpqhp_slot_find(ctrl->bus, device, 0);
1705 func->device = device;
1895 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
1917 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
1943 u8 device, hp_slot;
1951 device = func->device;
1952 hp_slot = device - ctrl->slot_device_offset;
1953 p_slot = cpqhp_find_slot(ctrl, device);
1972 func->device = device;
2002 func->device = device;
2030 u8 device, class_code, header_type, BCR;
2038 device = func->device;
2039 func = cpqhp_slot_find(ctrl->bus, device, index++);
2040 p_slot = cpqhp_find_slot(ctrl, device);
2045 devfn = PCI_DEVFN(func->device, func->function);
2074 func = cpqhp_slot_find(ctrl->bus, device, index++);
2077 func = cpqhp_slot_find(ctrl->bus, device, 0);
2222 /* Check for Multi-function device */
2224 rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte);
2230 if (temp_byte & 0x80) /* Multi-function device */
2245 new_slot = cpqhp_slot_find(new_slot->bus, new_slot->device, index++);
2262 pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(func->device, function), 0x00, &ID);
2274 new_slot->device = func->device;
2297 * configure_new_function - Configures the PCI header information of one device
2313 u8 device;
2338 devfn = PCI_DEVFN(func->device, func->function);
2500 for (device = 0; (device <= 0x1F) && !rc; device++) {
2505 pci_bus_read_config_dword(pci_bus, PCI_DEVFN(device, 0), 0x00, &ID);
2508 if (!PCI_POSSIBLE_ERROR(ID)) { /* device present */
2518 new_slot->device = device;
2525 } /* End of IF (device in slot?) */
2541 rc = cpqhp_set_irq(func->bus, func->device,
2726 * a device */
2743 /* Standard device */
2861 rc = cpqhp_set_irq(func->bus, func->device, temp_byte, IRQ);