Changes in uspace/drv/bus/pci/pciintel/pci.c [82721f5:65f77f4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
r82721f5 r65f77f4 454 454 { 455 455 /* Value of the BAR */ 456 uint32_t val, mask; 456 uint32_t val; 457 uint32_t bar; 458 uint32_t mask; 459 457 460 /* IO space address */ 458 461 bool io; … … 492 495 /* Get the address mask. */ 493 496 pci_conf_write_32(fun, addr, 0xffffffff); 494 mask &= pci_conf_read_32(fun, addr); 495 497 bar = pci_conf_read_32(fun, addr); 498 499 /* 500 * Unimplemented BARs read back as all 0's. 501 */ 502 if (!bar) 503 return addr + (addrw64 ? 8 : 4); 504 505 mask &= bar; 506 496 507 /* Restore the original value. */ 497 508 pci_conf_write_32(fun, addr, val); … … 541 552 { 542 553 uint8_t irq = pci_conf_read_8(fun, PCI_BRIDGE_INT_LINE); 543 if (irq != 0xff) 554 uint8_t pin = pci_conf_read_8(fun, PCI_BRIDGE_INT_PIN); 555 556 if (pin != 0 && irq != 0xff) 544 557 pci_add_interrupt(fun, irq); 545 558 }
Note:
See TracChangeset
for help on using the changeset viewer.