summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2019-05-05 15:54:48 -0600
committerEvan Lojewski <github@meklort.com>2019-05-05 15:54:48 -0600
commitd13e29b4e501e47b8694dc5099fbdc70d04735bd (patch)
tree22337257d554112ad1d1b4dc047b9dd6d360ef53
parent73d3f28286b255e9d3605c39acd6b4c6ff7a5e02 (diff)
downloadbcm5719-ortega-d13e29b4e501e47b8694dc5099fbdc70d04735bd.tar.gz
bcm5719-ortega-d13e29b4e501e47b8694dc5099fbdc70d04735bd.zip
Fix Network_TX_transmitPassthroughPacket to drop the FCS word.
-rw-r--r--libs/Network/tx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/Network/tx.c b/libs/Network/tx.c
index 4ab1cb6..7ac9c28 100644
--- a/libs/Network/tx.c
+++ b/libs/Network/tx.c
@@ -432,6 +432,9 @@ void Network_TX_transmitPassthroughPacket(uint32_t length)
return;
}
+ // Drop the FCS word. It will be generated by hardware.
+ length -= 4;
+
int32_t tail;
int32_t first = tail = Network_TX_allocateBlock();
int32_t next_block = -1;
@@ -470,4 +473,8 @@ void Network_TX_transmitPassthroughPacket(uint32_t length)
doorbell.bits.Length = total_blocks;
APE.TxToNetDoorbellFunc0 = doorbell;
+
+ // Read last RX word (FCS) to clear the buffer
+ uint32_t data = APE_PERI.BmcToNcReadBuffer.r32;
+ (void)data;
}
OpenPOWER on IntegriCloud