Skip to content

Commit

Permalink
net: cadence_gem: Add Tx descriptor fetch printf
Browse files Browse the repository at this point in the history
Add a debug printf for TX descriptor fetching. This is helpful to anyone
needing to debug TX ring buffer traversal. It is also now consistent with
the RX code which has a similar printf.

Signed-off-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
pete128 authored and Michael Tokarev committed Jun 10, 2014
1 parent 6ab57a6 commit fa15286
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hw/net/cadence_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,8 @@ static void gem_transmit(GemState *s)

/* read current descriptor */
packet_desc_addr = s->tx_desc_addr;

DB_PRINT("read descriptor 0x%" HWADDR_PRIx "\n", packet_desc_addr);
cpu_physical_memory_read(packet_desc_addr,
(uint8_t *)&desc[0], sizeof(desc));
/* Handle all descriptors owned by hardware */
Expand Down Expand Up @@ -962,6 +964,7 @@ static void gem_transmit(GemState *s)
} else {
packet_desc_addr += 8;
}
DB_PRINT("read descriptor 0x%" HWADDR_PRIx "\n", packet_desc_addr);
cpu_physical_memory_read(packet_desc_addr,
(uint8_t *)&desc[0], sizeof(desc));
}
Expand Down

0 comments on commit fa15286

Please sign in to comment.