Statistics
| Branch: | Revision:

root / hw / net / cadence_gem.c @ 216db403

History | View | Annotate | Download (41.9 kB)

# Date Author Comment
11785f53 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Don't assert against 0 buffer address

This has no real hardware analog and asserting correctness of DMA
addresses is not a perhiperal level problem. Delete.

Signed-off-by: Peter Crosthwaite <>
Message-id: ...

7cfd65e4 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: simplify rx buf descriptor walking

There was a replication of the rx descriptor address walking logic.
Reorder the flow control to remove. This refactoring also obsoletes
the local variables packet_desc_addr and last_desc_addr.

Signed-off-by: Peter Crosthwaite <>...

06c2fe95 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Prefetch rx descriptors ASAP

The real hardware prefetches rx buffer descriptors ASAP and
potentially throws relevant interrupts following the fetch
even in the absence of a received packet.

Reported-by: Deepika Dhamija <>...

63af1e0c 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Implement RX descriptor match mode flags

The various Rx packet address matching mode flags were not being set in
the rx descriptor. Implement.

Reported-by: Deepika Dhamija <>
Signed-off-by: Peter Crosthwaite <>...

a03f7429 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Implement SAR match bit in rx desc

Bit 27 of the RX buffer desc word 1 should be set when the packet was
accepted due to specific address register match. Implement.

This feature is absent from the Xilinx documentation (UG585) but the
behaviour is tested as accurate on real hardware....

64eb9301 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Implement SAR (de)activation

The Specific address registers can be enabled or disabled by software.
QEMU was assuming they were always enabled. Implement the
disable/enable feature. SARs are disabled by writing to the lower half
register. They are re-enabled by then writing the upper half....

17cf2c76 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Add missing VMSTATE_END_OF_LIST

Signed-off-by: Peter Crosthwaite <>
Message-id:
Signed-off-by: Peter Maydell <>

30570698 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Fix rx multi-fragment packets

Bytes_to_copy was being updated before its final use where it
advances the rx buffer pointer. This was causing total mayhem,
where packet data for any subsequent fragments was being fetched
from the wrong place....

191946c5 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Fix small packet FCS stripping

The minimum packet size is 64, however this is before FCS stripping
occurs. So when FCS stripping the minimum packet size is 60. Fix.

Reported-by: Deepika Dhamija <>
Signed-off-by: Peter Crosthwaite <>...

e2314fda 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Fix register w1c logic

This write-1-clear logic was incorrect. It was always clearing w1c
bits regardless of whether the written value was 1 or not. i.e. it
was implementing a write-anything-to-clear strategy.

Signed-off-by: Peter Crosthwaite <>...

3ae5725f 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Improve can_receive debug printfery

Currently this just floods indicating that can_receive has been called
by the net framework. Instead, save the result of the most recent
can_receive callback as state and only print a message if the result...

8202aa53 12/10/2013 03:28 pm Peter Crosthwaite

net/cadence_gem: Don't rx packets when no rx buffer available

Return false from can_receive() when no valid buffer descriptor is
available. Ensures against mass packet droppage in some applications.

Signed-off-by: Peter Crosthwaite <>...

24e822ea 12/10/2013 03:28 pm Peter Crosthwaite

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 <>
Signed-off-by: Peter Crosthwaite <>...

3b2c97f9 12/10/2013 03:28 pm Edgar E. Iglesias

net/cadence_gem: Update DMA rx descriptors as we process them

We were updating the ownership bit of all descriptors if packets
get split and written through several descriptors.

Signed-off-by: Edgar E. Iglesias <>
Signed-off-by: Peter Crosthwaite <>...

318643be 07/29/2013 10:06 pm Andreas Färber

cadence_gem: QOM cast cleanup

Signed-off-by: Andreas Färber <>

eedfac6f 07/04/2013 06:42 pm Paolo Bonzini

hw/n*: pass owner to memory_region_init* functions

Signed-off-by: Paolo Bonzini <>

2c9b15ca 07/04/2013 06:42 pm Paolo Bonzini

memory: add owner argument to initialization functions

Signed-off-by: Paolo Bonzini <>

49ab747f 04/08/2013 07:13 pm Paolo Bonzini

hw: move target-independent files to subdirectories

This patch tackles all files that are compiled once, moving
them to subdirectories of hw/.

Signed-off-by: Paolo Bonzini <>