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; |
---|