Right, but you're reading them now even if you don't have to. So why areThat's right.amd64_read_pci_cfg(pvt->F3, F10_ONLINE_SPARE, &pvt->online_spare);This doesn't look equivalent - above we're checking whether we're ganged
- amd64_read_dct_pci_cfg(pvt, DCLR0, &pvt->dclr0);
- amd64_read_dct_pci_cfg(pvt, DCHR0, &pvt->dchr0);
-
- if (!dct_ganging_enabled(pvt)) {
- amd64_read_dct_pci_cfg(pvt, DCLR1, &pvt->dclr1);
- amd64_read_dct_pci_cfg(pvt, DCHR1, &pvt->dchr1);
- }
+ amd64_read_dct_pci_cfg(pvt, 0, DCLR0, &pvt->dclr0);
+ amd64_read_dct_pci_cfg(pvt, 0, DCHR0, &pvt->dchr0);
pvt->ecc_sym_sz = 4;
if (pvt->fam >= 0x10) {
+ amd64_read_dct_pci_cfg(pvt, 1, DCLR0, &pvt->dclr1);
+ amd64_read_dct_pci_cfg(pvt, 1, DCHR0, &pvt->dchr1);
now you're doing it for >= F10h. Why?
Because only F10h supports ganging?
If ganging is enabled (which is a condition we check for in
amd64_read_dct_pci_cfg();
Then we return 0.
you even changing this? What's wrong with doing:
if (!dct_ganging_enabled(pvt)) {
amd64_read_dct_pci_cfg(pvt, 1, DCLR0, &pvt->dclr1);
amd64_read_dct_pci_cfg(pvt, 1, DCHR0, &pvt->dchr1);
}
which is much clearer than doing the family check.