Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    r65f77f4 r82721f5  
    454454{
    455455        /* Value of the BAR */
    456         uint32_t val;
    457         uint32_t bar;
    458         uint32_t mask;
    459 
     456        uint32_t val, mask;
    460457        /* IO space address */
    461458        bool io;
     
    495492        /* Get the address mask. */
    496493        pci_conf_write_32(fun, addr, 0xffffffff);
    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 
     494        mask &= pci_conf_read_32(fun, addr);
     495       
    507496        /* Restore the original value. */
    508497        pci_conf_write_32(fun, addr, val);
     
    552541{
    553542        uint8_t irq = pci_conf_read_8(fun, PCI_BRIDGE_INT_LINE);
    554         uint8_t pin = pci_conf_read_8(fun, PCI_BRIDGE_INT_PIN);
    555 
    556         if (pin != 0 && irq != 0xff)
     543        if (irq != 0xff)
    557544                pci_add_interrupt(fun, irq);
    558545}
Note: See TracChangeset for help on using the changeset viewer.