Lines Matching refs:new_slot
306 struct pci_func *new_slot;
343 new_slot = cpqhp_slot_create(busnumber);
344 if (new_slot == NULL)
347 new_slot->bus = (u8) busnumber;
348 new_slot->device = (u8) device;
349 new_slot->function = 0;
350 new_slot->is_a_board = 0;
351 new_slot->presence_save = 0;
352 new_slot->switch_save = 0;
396 new_slot = cpqhp_slot_find(busnumber, device, index++);
397 while (new_slot &&
398 (new_slot->function != (u8) function))
399 new_slot = cpqhp_slot_find(busnumber, device, index++);
401 if (!new_slot) {
403 new_slot = cpqhp_slot_create(busnumber);
404 if (new_slot == NULL)
408 new_slot->bus = (u8) busnumber;
409 new_slot->device = (u8) device;
410 new_slot->function = (u8) function;
411 new_slot->is_a_board = 1;
412 new_slot->switch_save = 0x10;
414 new_slot->status = DevError;
415 devfn = (new_slot->device << 3) | new_slot->function;
416 new_slot->pci_dev = pci_get_domain_bus_and_slot(0,
417 new_slot->bus, devfn);
420 rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, function), cloop << 2, (u32 *) &(new_slot->config_space[cloop]));
425 pci_dev_put(new_slot->pci_dev);
466 int cpqhp_save_slot_config(struct controller *ctrl, struct pci_func *new_slot)
481 ctrl->pci_bus->number = new_slot->bus;
482 pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), PCI_VENDOR_ID, &ID);
487 pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), 0x0B, &class_code);
488 pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), PCI_HEADER_TYPE, &header_type);
498 pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_SECONDARY_BUS, &secondary_bus);
508 ctrl->pci_bus->number = new_slot->bus;
512 new_slot->status = 0;
515 pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), cloop << 2, (u32 *) &(new_slot->config_space[cloop]));
525 pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_VENDOR_ID, &ID);
530 pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), 0x0B, &class_code);
531 pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_HEADER_TYPE, &header_type);