Skip to content

Commit

Permalink
Add tx_provide() to handle_irq()
Browse files Browse the repository at this point in the history
Signed-off-by: Courtney Darville <courtneydarville94@outlook.com>
  • Loading branch information
Courtney3141 committed Sep 23, 2024
1 parent 81828b0 commit f655259
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions drivers/network/imx/ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ static void handle_irq(void)
while (e & IRQ_MASK) {
if (e & NETIRQ_TXF) {
tx_return();
tx_provide();
}
if (e & NETIRQ_RXF) {
rx_return();
Expand Down
26 changes: 16 additions & 10 deletions drivers/network/meson/ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,24 @@ static void tx_return(void)
static void handle_irq()
{
uint32_t e = eth_dma->status;
if (e & DMA_INTR_RXF) {
rx_return();
}
if (e & DMA_INTR_TXF) {
tx_return();
}
if (e & DMA_INTR_ABNORMAL) {
if (e & DMA_INTR_FBE) {
sddf_dprintf("Ethernet device fatal bus error\n");
eth_dma->status &= e;

while (e & DMA_INTR_MASK) {
if (e & DMA_INTR_RXF) {
rx_return();
}
if (e & DMA_INTR_TXF) {
tx_return();
tx_provide();
}
if (e & DMA_INTR_ABNORMAL) {
if (e & DMA_INTR_FBE) {
sddf_dprintf("Ethernet device fatal bus error\n");
}
}
e = eth_dma->status;
eth_dma->status &= e;
}
eth_dma->status &= e;
}

static void eth_setup(void)
Expand Down

0 comments on commit f655259

Please sign in to comment.