
18 Nov
2015
18 Nov
'15
2:23 p.m.
Am 18.11.2015 um 13:48 schrieb Dirk Eibach:
I assume the idea is to go to the next port if the current port is disabled. But adding 3 to the index does not seem to be the right thing to do, since Armada XP has ports with 4 lanes, but also with ports with one lane. I assume that iterating over all lanes would not be a problem, but by mistake the pcie->lane == 0 was left in the condition.
Yeah you are right. The additional condition was superfluous in the original version.
So this should perform better:
/* Don't read at all from pci registers if port power is down */ if (SELECT(soc_ctrl, pcie->port) == 0) { if (pcie->lane == 0) debug("%s: skipping port %d\n", __func__, pcie->port); continue; }
I agree.
Regards, Anton