Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
thomil authored and mcb30 committed Aug 20, 2013
1 parent b324a9c commit e5f6471
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/drivers/net/3c90x.c
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/drivers/net/3c90x.h
Expand Up @@ -202,6 +202,7 @@ enum GlobalResetParams {
enum FrameStartHeader {
fshTxIndicate = 0x8000,
fshDnComplete = 0x10000,
fshRndupDefeat = 0x10000000,
};

enum UpDownDesc {
Expand Down

0 comments on commit e5f6471

Please sign in to comment.