diff options
author | Alistair Francis | 2017-04-20 18:32:29 +0200 |
---|---|---|
committer | Peter Maydell | 2017-04-20 18:39:17 +0200 |
commit | 75b7760212b2cfa86977704a2c19a0d8daced5be (patch) | |
tree | e29aa3b0fe9a5efafe57cbf131f2df36beb8e5eb /hw | |
parent | hw/arm: Qomify pxa2xx.c (diff) | |
download | qemu-75b7760212b2cfa86977704a2c19a0d8daced5be.tar.gz qemu-75b7760212b2cfa86977704a2c19a0d8daced5be.tar.xz qemu-75b7760212b2cfa86977704a2c19a0d8daced5be.zip |
cadence_gem: Read the correct queue descriptor
Read the correct descriptor instead of hardcoding the first (q=0).
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 988b183dcf951856d8b3379f7e911ec95233bbf4.1491947224.git.alistair.francis@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/cadence_gem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index d4de8ad9f1..17c229d486 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -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) { |