Add Enhanced Three-Speed Ethernet Controller (eTSEC)
PATCH v2 1/1 Add Enhanced Three-Speed Ethernet Controller (eTSEC)
This implementation doesn't include ring priority, TCP/IP Off-Load, QoS.
--- default-configs/ppc-softmmu.mak | 1 + hw/net/Makefile.objs | 3 + hw/net/fsl_etsec/etsec.c | 465 ++++++++++++++++++++++++++++ hw/net/fsl_etsec/etsec.h | 174 +++++++++++ hw/net/fsl_etsec/miim.c | 146 +++++++++ hw/net/fsl_etsec/registers.c | 295 ++++++++++++++++++ hw/net/fsl_etsec/registers.h | 320 +++++++++++++++++++ hw/net/fsl_etsec/rings.c | 650 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 2054 insertions(+) create mode 100644 hw/net/fsl_etsec/etsec.c create mode 100644 hw/net/fsl_etsec/etsec.h create mode 100644 hw/net/fsl_etsec/miim.c create mode 100644 hw/net/fsl_etsec/registers.c create mode 100644 hw/net/fsl_etsec/registers.h create mode 100644 hw/net/fsl_etsec/rings.c
default-configs/ppc-softmmu.mak +1 -0
@@ -46,3 +46,4 @@ CONFIG_E500=y CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM)) # For PReP CONFIG_MC146818RTC=y +CONFIG_ETSEC=y
hw/net/Makefile.objs +3 -0
@@ -31,3 +31,6 @@ obj-$(CONFIG_XILINX_ETHLITE) += xilinx_ethlite.o obj-$(CONFIG_VIRTIO) += virtio-net.o obj-y += vhost_net.o + +obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \ + fsl_etsec/rings.o fsl_etsec/miim.o
hw/net/fsl_etsec/etsec.c new file +465 -0
465 lines not on this page · raw message
hw/net/fsl_etsec/etsec.h new file +174 -0
174 lines not on this page · raw message
hw/net/fsl_etsec/miim.c new file +146 -0
146 lines not on this page · raw message
hw/net/fsl_etsec/registers.c new file +295 -0
295 lines not on this page · raw message
hw/net/fsl_etsec/registers.h new file +320 -0
320 lines not on this page · raw message
hw/net/fsl_etsec/rings.c new file +650 -0
650 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Quoted 3 lines · Fabien Chouteau
This implementation doesn't include ring priority, TCP/IP Off-Load, QoS.
Signed-off-by Fabien Chouteau <[email protected]>
Thanks, applied to ppc-next. Could you please follow up with a patch that makes this available as -net nic,model=etsec and generate a respective device tree node for it?
Alex
Quoted 8 lines · Alexander Graf
Quoted 3 lines · Fabien Chouteau
This implementation doesn't include ring priority, TCP/IP Off-Load, QoS.
Signed-off-by Fabien Chouteau <[email protected]>Thanks, applied to ppc-next. Could you please follow up with a patch that makes this available as -net nic,model=etsec and generate a respective device tree node for it?
This does not compile:
CC ppc-softmmu/hw/net/fsl_etsec/rings.o
In file included from /home/alexey/p/qemu/hw/net/fsl_etsec/rings.c:24:0:/home/alexey/p/qemu/include/net/checksum.h:51:31: error: ‘struct iovec’ declared inside parameter list [-Werror] /home/alexey/p/qemu/include/net/checksum.h:51:31: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] /home/alexey/p/qemu/hw/net/fsl_etsec/rings.c: In function ‘fill_rx_bd’:/home/alexey/p/qemu/hw/net/fsl_etsec/rings.c:396:5: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘hwaddr’ [-Werror=format] /home/alexey/p/qemu/hw/net/fsl_etsec/rings.c:396:5: error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Werror=format]/home/alexey/p/qemu/hw/net/fsl_etsec/rings.c: In function ‘etsec_walk_rx_ring’:/home/alexey/p/qemu/hw/net/fsl_etsec/rings.c:583:28: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Werror=format] /home/alexey/p/qemu/hw/net/fsl_etsec/rings.c:649:5: error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ [-Werror=format]
cc1: all warnings being treated as errors
make[1]: *** [hw/net/fsl_etsec/rings.o] Error 1
make[1]: *** Waiting for unfinished jobs.... /home/alexey/p/qemu/hw/net/fsl_etsec/etsec.c: In function ‘etsec_realize’:/home/alexey/p/qemu/hw/net/fsl_etsec/etsec.c:389:53: error: ‘SysBusDevice’ has no member named ‘qdev’
make[1]: *** [hw/net/fsl_etsec/etsec.o] Error 1
make: *** [subdir-ppc-softmmu] Error 2
Signature · 1 line
Alexey
Quoted 11 lines · Alexey Kardashevskiy
Quoted 8 lines · Alexander Graf
Quoted 3 lines · Fabien Chouteau
This implementation doesn't include ring priority, TCP/IP Off-Load, QoS.
Signed-off-by Fabien Chouteau <[email protected]>Thanks, applied to ppc-next. Could you please follow up with a patch that makes this available as -net nic,model=etsec and generate a respective device tree node for it?
This does not compile:
Ok, removed from ppc-next again. Fabien, please rebase on the current git state :).
Alex
Quoted 9 lines · Alexander Graf
Quoted 6 lines · Alexey Kardashevskiy
Quoted 5 lines · Alexander Graf
Quoted 2 lines · Fabien Chouteau
This implementation doesn't include ring priority, TCP/IP Off-Load, QoS.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Fabien Chouteau <[email protected]>Thanks, applied to ppc-next. Could you please follow up with a patch that makes this available as -net nic,model=etsec and generate a respective device tree node for it?
This does not compile:
Ok, removed from ppc-next again. Fabien, please rebase on the current git state :).
Thanks Alex, I'm surprised I though this patch was forgotten :)
Unfortunately I won't have time to fix before January.
Quoted 12 lines · Fabien Chouteau
Quoted 11 lines · Alexander Graf
Quoted 8 lines · Alexey Kardashevskiy
Quoted 7 lines · Alexander Graf
Quoted 3 lines · Fabien Chouteau
This implementation doesn't include ring priority, TCP/IP Off-Load, QoS.
Signed-off-by Fabien Chouteau <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Thanks, applied to ppc-next. Could you please follow up with a patch that makes this available as -net nic,model=etsec and generate a respective device tree node for it?
This does not compile:
Ok, removed from ppc-next again. Fabien, please rebase on the current git state :).
Thanks Alex, I'm surprised I though this patch was forgotten :)
Miracles do happen :).
Quoted 1 line
Unfortunately I won't have time to fix before January.
That works for me. While at it, please also add a patch to enable -net usage with etsec. Sysbus devices can't be used with -device yet - I still need to work on that one. And I'd prefer not to have dead code in the tree that nobody can use.
Alex
Quoted 3 lines · Alexander Graf
Quoted 1 line · Fabien Chouteau
Unfortunately I won't have time to fix before January.
Hello Alex,
I fixed the compiler errors and I will send version 3 in few minutes.
Quoted 2 lines
That works for me. While at it, please also add a patch to enable -net usage with etsec.
-net nic,model=ETSEC,vlan=0 already works.
Regards,