]> Git Repo - qemu.git/commitdiff
cadence_gem: Read the correct queue descriptor
authorAlistair Francis <[email protected]>
Thu, 20 Apr 2017 16:32:29 +0000 (17:32 +0100)
committerPeter Maydell <[email protected]>
Thu, 20 Apr 2017 16:39:17 +0000 (17:39 +0100)
Read the correct descriptor instead of hardcoding the first (q=0).

Signed-off-by: Alistair Francis <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: 988b183dcf951856d8b3379f7e911ec95233bbf4.1491947224[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/net/cadence_gem.c

index d4de8ad9f1e14bb9c67c7ca21db20ccca5a2518e..17c229d486b8bd9a2186a1a040db674c36acac1f 100644 (file)
@@ -790,8 +790,8 @@ static void gem_get_rx_desc(CadenceGEMState *s, int q)
 {
     DB_PRINT("read descriptor 0x%x\n", (unsigned)s->rx_desc_addr[q]);
     /* read current descriptor */
-    cpu_physical_memory_read(s->rx_desc_addr[0],
-                             (uint8_t *)s->rx_desc[0], sizeof(s->rx_desc[0]));
+    cpu_physical_memory_read(s->rx_desc_addr[q],
+                             (uint8_t *)s->rx_desc[q], sizeof(s->rx_desc[q]));
 
     /* Descriptor owned by software ? */
     if (rx_desc_get_ownership(s->rx_desc[q]) == 1) {
This page took 0.031254 seconds and 4 git commands to generate.