SnabbCo/snabbswitch — pull request #240 by javierguerragiraldez (2014-08-20 06:53:05+00:00)
Title: Intel10G: better NIC initialization

This is a more complete implementation of the initialization procedure described in the Intel docs. Doesn't do any difference on "good" cards with good cables, but on flaky hardware does seem to improve the odds of actually working.

Avoids lockup by aborting the wait for link up at 1/2 second. Empirically I've found that good cards always come up before 0.2 sec, and even bad hardware either responds before 0.3 sec or never at all.

Strangely, failing to register as "link up" doesn't necessarily mean it won't work, so I'm not convinced to add an abort if `wait_linkup()` timeouts.