Skip to content

Commit

Permalink
eth: dwmac only interrupt on final packet
Browse files Browse the repository at this point in the history
Signed-off-by: Krishnan Winter <krishnanwinter1@gmail.com>
  • Loading branch information
Kswin01 committed Sep 24, 2024
1 parent 751035e commit a018748
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/network/dwmac-5.10a/ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,14 @@ static void tx_provide(void)
assert(!err);

// For normal transmit descriptors, tdes2 needs to be set to generate an IRQ on transmit
// completion. We also need to provide the length of the buffer data in bits 13:0.
uint32_t tdes2 = DESC_TXCTRL_TXINT | buffer.len;
// completion. We will only do this for the final packet of the current transmission.
// We also need to provide the length of the buffer data in bits 13:0.
uint32_t tdes2 = buffer.len;
if (net_queue_empty_active(&tx_queue)) {
tdes2 |= DESC_TXCTRL_TXINT;
}

// uint32_t tdes2 = DESC_TXCTRL_TXINT | buffer.len;

// For normal transmit descritpors, we need to give ownership to DMA, as well as indicate
// that this is the first and last parts of the current packet.
Expand Down

0 comments on commit a018748

Please sign in to comment.