summaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2013-12-03 21:54:30 -0800
committerPeter Maydell <peter.maydell@linaro.org>2013-12-10 13:28:49 +0000
commit24e822ea4669145c94552cef67751fbd9a42b4c8 (patch)
tree15585069189d1198b64c897fa16fac3bb1b1ef7f /hw/net
parent198aa06459ba6c0e689ed0f61b59ebe8aa9f9287 (diff)
downloadqemu-24e822ea4669145c94552cef67751fbd9a42b4c8.tar.gz
qemu-24e822ea4669145c94552cef67751fbd9a42b4c8.tar.bz2
qemu-24e822ea4669145c94552cef67751fbd9a42b4c8.zip
net/cadence_gem: Implement mac level loopback mode
Cadence GEM has a MAC level loopback mode. Implement. Use the same basic operation as the already implemented PHY loopback. Reported-by: Deepika Dhamija <deepika@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 3a0baf1b6b2fc1be638bdf1a37408ec38988e970.1386136219.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/cadence_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index 4a355bbbef..a31801d659 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -893,7 +893,7 @@ static void gem_transmit(GemState *s)
gem_transmit_updatestats(s, tx_packet, total_bytes);
/* Send the packet somewhere */
- if (s->phy_loop) {
+ if (s->phy_loop || (s->regs[GEM_NWCTRL] & GEM_NWCTRL_LOCALLOOP)) {
gem_receive(qemu_get_queue(s->nic), tx_packet, total_bytes);
} else {
qemu_send_packet(qemu_get_queue(s->nic), tx_packet,