]> Git Repo - qemu.git/commitdiff
net/cadence_gem: Implement mac level loopback mode
authorPeter Crosthwaite <[email protected]>
Wed, 4 Dec 2013 05:54:30 +0000 (21:54 -0800)
committerPeter Maydell <[email protected]>
Tue, 10 Dec 2013 13:28:49 +0000 (13:28 +0000)
Cadence GEM has a MAC level loopback mode. Implement. Use the same basic
operation as the already implemented PHY loopback.

Reported-by: Deepika Dhamija <[email protected]>
Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: 3a0baf1b6b2fc1be638bdf1a37408ec38988e970.1386136219[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/net/cadence_gem.c

index 4a355bbbef0375ea666035a72f72d6b1a5623951..a31801d659a3c0bc3f060c4509d53b3f791c8c9b 100644 (file)
@@ -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,
This page took 0.02735 seconds and 4 git commands to generate.