[intel] Work around broken reset mechanism in i219 devices
authorMichael Brown <mcb30@ipxe.org>
Sat, 3 Feb 2018 19:21:54 +0000 (19:21 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 3 Feb 2018 19:21:54 +0000 (19:21 +0000)
commit546dd51de8459d4d09958891f426fa2c73ff090d
treef33afdec5b9f432208fcaa836b72c5b487861d04
parentc900751fa65c35f0975e103fce3c17d8c40aa270
[intel] Work around broken reset mechanism in i219 devices

The i219 appears to have a seriously broken reset mechanism.  After
any transmit or receive activity, resetting the card will break both
the transmit and receive datapaths until the next PCI bus reset.

The Linux and BSD drivers include a convoluted workaround authored by
Intel which involves setting a bit in the undocumented FEXTNVM11
register, then transmitting a dummy 512-byte packet containing garbage
data, then reconfiguring the receive descriptor prefetch thresholds
and temporarily reenabling the receive datapath.  The comments in the
Intel fix do not even remotely match what the code actually does, and
the code accidentally leaves the transmitter enabled after use.

Experimentation suggests that an equivalent fix is to simply set the
undocumented bit in FEXTNVM11 before enabling the transmit or receive
descriptor rings.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/intel.c
src/drivers/net/intel.h