Lines Matching defs:device

31 	// fields in ACPI. TODO: Query both/the correct root device.
118 // check the base device at function 0
124 // the device is not present
128 // we have a device, check how many functions we need to iterate
134 // check for device presence by looking for a valid vendor
182 device, so we must ensure that we don't try to configure different
183 IRQs for each device, overwriting the previous config of the
184 respective link device.
189 where an ISA device might be connected. The only safe assumption
231 // A new link device, read possible IRQs and fill them in.
242 panic("failed to read possible irqs of link device");
249 panic("failed to read current irq of link device");
325 dprintf("failed to set irq on link device, keeping current\n");
386 dprintf("failed to get handle to link device\n");
406 dprintf("no matching PCI device for irq entry: ");
411 dprintf("found matching PCI device for irq entry: ");
429 find_routing_table_entry(IRQRoutingTable& table, uint8 bus, uint8 device,
434 if (irqEntry.pci_bus != bus || irqEntry.pci_device != device)
450 for (uint8 device = 0; device < kMaxPCIDeviceCount; device++) {
451 if (pci->read_pci_config(bus, device, 0, PCI_vendor_id, 2) == 0xffff) {
453 bus, device);
458 uint8 headerType = pci->read_pci_config(bus, device, 0,
466 // check for device presence by looking for a valid vendor
467 if (pci->read_pci_config(bus, device, function, PCI_vendor_id, 2)
471 "not present.\n", bus, device, function);
476 headerType = pci->read_pci_config(bus, device, function,
487 pciAddress.device = device;
492 uint8 secondaryBus = pci->read_pci_config(bus, device, function,
502 uint8 interruptPin = pci->read_pci_config(bus, device, function,
506 "not routed.\n", bus, device, function);
512 bus, device, interruptPin);
514 // we already have a matching entry for that device/pin, make
517 "already matched. Will mask.\n", bus, device, function);
523 "parents, searching them...\n", bus, device, function,
527 // figure one out in the parent, based on the device number and
530 uint8 parentPin = ((device + interruptPin - 1) % 4) + 1;
534 parent.device, parentPin);
538 "no matchedTable entry.\n", bus, device, function);
540 parent.bus, parent.device, parentPin);
545 parentPin = ((parent.device + parentPin - 1) % 4) + 1;
549 B_PRIu8 "...\n", bus, device, function, parentPin);
555 newEntry.device_address = (device << 16) | 0xffff;
558 newEntry.pci_device = device;
561 uint8 biosIRQ = pci->read_pci_config(bus, device, function,
571 "PCI %u:%u:%u", bus, device, function);
587 uint32 interrupt_line = pci->read_pci_config(bus, device,
592 dprintf("assuming no interrupt use on PCI device"
594 bus, device, function, interrupt_line);
600 "unstable / broken.\n", bus, device, function);
612 acpi_handle parent, acpi_handle device, uint8 currentBus,
621 if (evaluate_integer(acpi, device, "_ADR", value) == B_OK) {
622 pciAddress.device = (uint8)(value >> 16);
625 pciAddress.device = 0;
629 if (pciAddress.device >= kMaxPCIDeviceCount
632 // (just a different type of device)
636 // Verify that the device is really present...
638 pciAddress.device, pciAddress.function, PCI_device_id, 2);
641 TRACE("device not present\n");
647 pciAddress.device, pciAddress.function, PCI_class_base, 1);
649 pciAddress.device, pciAddress.function, PCI_class_sub, 1);
657 pciAddress.device, pciAddress.function, PCI_header_type, 1);
674 pciAddress.device, pciAddress.function, PCI_secondary_bus, 1);
702 status_t status = acpi->get_irq_routing_table(device, &buffer);
738 status = acpi->ns_handle_to_pathname(device, &pathBuffer);
757 status = read_irq_routing_table_recursive(acpi, pci, device, childHandle,
883 read_irq_descriptor(acpi_module_info* acpi, acpi_handle device,
893 status = acpi->get_current_resources(device, &buffer);
895 status = acpi->get_possible_resources(device, &buffer);
1016 read_current_irq(acpi_module_info* acpi, acpi_handle device,
1019 return read_irq_descriptor(acpi, device, true, &descriptor, NULL);
1024 read_possible_irqs(acpi_module_info* acpi, acpi_handle device,
1027 return read_irq_descriptor(acpi, device, false, NULL, &descriptorList);
1032 set_current_irq(acpi_module_info* acpi, acpi_handle device,
1039 status_t status = acpi->get_current_resources(device, &buffer);
1097 status = acpi->set_current_resources(device, &buffer);