Add the following counters for 82575 and newer except 80003, ICHs and PCHs:
- Only 82576 document describes about the circuit breaker,
so the following two might be only for 82575:
- Circuit Breaker TX Manageability Packet
- Circuit Breaker RX Dropped Packet
- 82575's document doesn't describe the following two, but we can see
the same value as GO{T,R}C have:
- Host Good Octets RX
- Host Good Octets TX
- 82575's document doesn't describe the LENERRS (Length Errors) counter.
I don't know if it has.
- Perhaps Non-SerDes/SGMII devices don't have SCVPC
(SerDes/SGMII Code Violation Packet) register. We don't care if
it's SerDes/SGMII or not for now.
- HRMPC (Header Redirection Missed Packet) appears only once
in 8257[56]'s datasheet. FreeBSD's igb counts it, so we do, too.
- Count the following two for I350 and newer. I don't know if PCHs have:
- EEE TX LPI
- EEE RX LPI
- 0x403c was CEXTERR(Carrier Extension Error). 82575 and newer except 80003,
ICHs and PCHs have HTDPMC(Host Tx Discarded Packets by MAC). I don't really
know for 82575. The 82575 datasheet say nothing about it.
- The following two are changed for circuit breaker. Only 82576's datasheet
describes abut it, so the registers might be only for 82576.
Use those registers for 82575 and newer except 80003, ICHs and PCHs just in
case.
- 0x40fc was TSCTFC(TCP Segmentation Context Tx Fail). It was replaced by
the CBRMPC(Circuit Breaker Rx Manageability Packet) register.
- 0x4124 was ICRXOC(Interrupt Cause Receiver Overrun). It was replaced by
the HTCBDPC(Host Tx Circuit Breaker Dropped Packet) register.
- From 0x4104 to 0x4124:
- For 0x4124, 82575's datasheet says it's not changed(ICRXOC).
I don't know if it's correct. We use new HTCBDPC register for 82575.
- 82576 and newer changed the meaning.
- I don't know for 80003, ICHs and PCHs. Don't count those registers.
At least, those registers in PCH2 and PCH_CNP are all zero.
The transmit underrun bit in the transmit status filed is only for 82544
(and older?), so don't use the counter for newer chips. The bit is reserved
for newer chips, but the bit sometimes set on 82575 at least.
It looked like we may need to sometimes call dklastclose in error
branch for the case of (flags & ~sc->sc_mode & FWRITE) != 0, but it
is not actually possible to reach that case: if the caller requested
read/write, and the parent is read-only, and it is the first time
we've opened the parent, then dkfirstopen will fail with EROFS so we
never get there.
But this is confusing and it looked like the error branch is wrong,
so let's rearrange the conditional to make it clearer that we cannot
goto out after dkfirstopen has succeeded. And then assert that the
case cannot happen when we do call dkfirstopen.
These had their -h option removed in the ATF 0.19 release, but these
references in the man pages weren't (mostly) removed upstream until
a later commit (that hasn't been released).