Changeset 24240


Ignore:
Timestamp:
2010-12-04T11:31:18+01:00 (7 years ago)
Author:
nbd
Message:

ar71xx: merge pci register read workaround from r24236

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/target/linux/ar71xx/files/arch/mips/pci/pci-ar71xx.c

    r20288 r24240  
    137137        unsigned long flags; 
    138138        u32 data; 
     139        int retry = 0; 
    139140        int ret; 
    140141 
     
    144145                        PCI_SLOT(devfn), PCI_FUNC(devfn), where, size); 
    145146 
     147retry: 
    146148        spin_lock_irqsave(&ar71xx_pci_lock, flags); 
    147149 
     
    176178 
    177179        *value = (data >> (8 * (where & 3))) & mask[size & 7]; 
     180 
     181        /* 
     182         * PCI controller bug: sometimes reads to the PCI_COMMAND register 
     183         * return 0xffff, even though the PCI trace shows the correct value. 
     184         * Work around this by retrying reads to this register 
     185         */ 
     186        if (where == PCI_COMMAND && (*value & 0xffff) == 0xffff && retry++ < 2) 
     187                goto retry; 
    178188 
    179189        return ret; 
Note: See TracChangeset for help on using the changeset viewer.