]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[3c90x] Don't round up transmit packet length
authorThomas Miletich <thomas.miletich@gmail.com>
Mon, 19 Aug 2013 11:16:27 +0000 (13:16 +0200)
committerMichael Brown <mcb30@ipxe.org>
Tue, 20 Aug 2013 13:37:05 +0000 (14:37 +0100)
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>
src/drivers/net/3c90x.c
src/drivers/net/3c90x.h

index 1433e64a332e1b47fcf1b5c20dfe0c78d9d1f041..364492bbc740e8e2dd2fa9dc4ceda52b195ebbb6 100644 (file)
@@ -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;
index 53fc522bf0148729094c0efd3ba4c2aaf826a9fa..8bffa37f13b500a6375f21971e86d5e1f2d4f196 100644 (file)
@@ -202,6 +202,7 @@ enum GlobalResetParams {
 enum FrameStartHeader {
        fshTxIndicate = 0x8000,
        fshDnComplete = 0x10000,
+       fshRndupDefeat = 0x10000000,
 };
 
 enum UpDownDesc {