summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/3c90x.c
diff options
context:
space:
mode:
authorThomas Miletich2013-08-19 13:16:27 +0200
committerMichael Brown2013-08-20 15:37:05 +0200
commite5f6471525917a088d038678505c18c0574accac (patch)
treefec7f8903fbafe7ae4d4d212a49b3dcf79e21a3a /src/drivers/net/3c90x.c
parent[3c90x] Stall upload engine before setting RX ring address (diff)
downloadipxe-e5f6471525917a088d038678505c18c0574accac.tar.gz
ipxe-e5f6471525917a088d038678505c18c0574accac.tar.xz
ipxe-e5f6471525917a088d038678505c18c0574accac.zip
[3c90x] Don't round up transmit packet length
The 3c90x B and C revisions support rounding up the packet length to a specific boundary. Disable this feature to avoid overlength packets. This fixes the loopback test. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/3c90x.c')
-rw-r--r--src/drivers/net/3c90x.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c
index 1433e64a..364492bb 100644
--- a/src/drivers/net/3c90x.c
+++ b/src/drivers/net/3c90x.c
@@ -346,11 +346,12 @@ static int a3c90x_transmit(struct net_device *netdev,
tx_cur_desc->DnNextPtr = 0;
/* FrameStartHeader differs in 90x and >= 90xB
- * It contains length in 90x and a round up boundary and packet ID for
- * 90xB and 90xC. We can leave this to 0 for 90xB and 90xC.
+ * It contains the packet length in 90x and a round up boundary and
+ * packet ID for 90xB and 90xC. Disable packet length round-up on the
+ * later revisions.
*/
tx_cur_desc->FrameStartHeader =
- fshTxIndicate | (inf_3c90x->isBrev ? 0x00 : len);
+ fshTxIndicate | (inf_3c90x->isBrev ? fshRndupDefeat : len);
tx_cur_desc->DataAddr = virt_to_bus(iob->data);
tx_cur_desc->DataLength = len | downLastFrag;