Browse Source

[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>
tags/v1.20.1
Thomas Miletich 10 years ago
parent
commit
e5f6471525
2 changed files with 5 additions and 3 deletions
  1. 4
    3
      src/drivers/net/3c90x.c
  2. 1
    0
      src/drivers/net/3c90x.h

+ 4
- 3
src/drivers/net/3c90x.c View File

@@ -346,11 +346,12 @@ static int a3c90x_transmit(struct net_device *netdev,
346 346
 	tx_cur_desc->DnNextPtr = 0;
347 347
 
348 348
 	/* FrameStartHeader differs in 90x and >= 90xB
349
-	 * It contains length in 90x and a round up boundary and packet ID for
350
-	 * 90xB and 90xC. We can leave this to 0 for 90xB and 90xC.
349
+	 * It contains the packet length in 90x and a round up boundary and
350
+	 * packet ID for 90xB and 90xC. Disable packet length round-up on the
351
+	 * later revisions.
351 352
 	 */
352 353
 	tx_cur_desc->FrameStartHeader =
353
-	    fshTxIndicate | (inf_3c90x->isBrev ? 0x00 : len);
354
+	    fshTxIndicate | (inf_3c90x->isBrev ? fshRndupDefeat : len);
354 355
 
355 356
 	tx_cur_desc->DataAddr = virt_to_bus(iob->data);
356 357
 	tx_cur_desc->DataLength = len | downLastFrag;

+ 1
- 0
src/drivers/net/3c90x.h View File

@@ -202,6 +202,7 @@ enum GlobalResetParams {
202 202
 enum FrameStartHeader {
203 203
 	fshTxIndicate = 0x8000,
204 204
 	fshDnComplete = 0x10000,
205
+	fshRndupDefeat = 0x10000000,
205 206
 };
206 207
 
207 208
 enum UpDownDesc {

Loading…
Cancel
Save