Changeset 1908

Show
Ignore:
Timestamp:
10/09/10 03:25:53 (10 years ago)
Author:
jwoithe
Message:

Always read the ConfigROM using quadlet reads, since some devices advertise larger supported read requests but reject anything other than quadlet reads. This is known to affect Echo Audiofire pre8 devices and there may be others too.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/csr1212.c

    r864 r1908  
    16021602int csr1212_parse_csr(struct csr1212_csr *csr) 
    16031603{ 
    1604         static const int mr_map[] = { 4, 64, 1024, 0 }; 
    16051604        struct csr1212_dentry *dentry; 
    16061605        int ret; 
     
    16131612                return ret; 
    16141613 
    1615         if (!csr->ops->get_max_rom) 
    1616                 csr->max_rom = mr_map[0];       /* default value */ 
    1617         else { 
    1618                 int i = csr->ops->get_max_rom(csr->bus_info_data, 
    1619                                               csr->private_data); 
    1620                 if (i & ~0x3) 
    1621                         return CSR1212_EINVAL; 
    1622                 csr->max_rom = mr_map[i]; 
    1623         } 
     1614        /*  
     1615         * There has been a buggy firmware with bus_info_block.max_rom > 0  
     1616         * spotted which actually only supported quadlet read requests to the  
     1617         * config ROM.  Therefore read everything quadlet by quadlet regardless  
     1618         * of what the bus info block says.  This mirrors a similar change 
     1619         * made in the Linux kernel around 4 Jan 2009.  See 
     1620         *   http://git.kernel.org/linus/0bed1819687b50a7 
     1621         * The other hunks in that diff are cleanups - removal of things 
     1622         * which aren't needed now that max_rom is fixed at 4.  In time it 
     1623         * may be worthwhile merging them too. 
     1624         */  
     1625        csr->max_rom = 4;  
    16241626 
    16251627        csr->cache_head->layout_head = csr->root_kv;