net/ftgmac100: Rewrite the driver
Subsystems (3)
PATCH v2 1/1 net/ftgmac100: Rewrite the driver
This is an almost-complete rewrite of this driver.
The patch overall multiplies the performance of the driver on an AST2500 eval board with a gigabit link.
I get above 360Mbit/s with this vs. about 80Mbit/s with the current driver. I've done some tests on NC-SI machines as well, I get close to peak (above 90Mbit/s).
It does that by, among other things, rewriting the receive and transmit code, to both simplify the fast path as much as possible, avoid flushing of the caches (the aspeed chips have really slow little ARM cores), implementing support for fragmented sends, fixing HW checksum generation (AST2500 only), etc...
In addition, I've added netpoll support, tx timeout recovery, better handling of link speed changes, multicast filter and promisc support, various ethtool config additions etc...
Finally, the code has been cleaned up and reorganized, and various corner cases fixed, such as recovery in some error situations.
--
v2. Fix recovery on abnormal interrupts
Quieten messages on rx packet errors, statistics are sufficient
While I tried initially to do an incremental series of patch this quickly became unrealistic as I rewrote more of the driver. This is better reviewed as a new replacement driver for the same chip instead. Since the Aspeed SoC is the only in-tree user and we are maintaining this for OpenBMC, the risk is limited, I didn't feel the need of submitting this as a separate driver and deprecate the old one.
--- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 1 - arch/arm/boot/dts/aspeed-g4.dtsi | 6 +- arch/arm/boot/dts/aspeed-g5.dtsi | 6 +- drivers/net/ethernet/faraday/ftgmac100.c | 2143 ++++++++++++++----------- drivers/net/ethernet/faraday/ftgmac100.h | 183 ++- 5 files changed, 1394 insertions(+), 945 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +0 -1
@@ -102,7 +102,6 @@ status = "okay"; use-ncsi; - no-hw-checksum; };
arch/arm/boot/dts/aspeed-g4.dtsi +2 -4
@@ -42,18 +42,16 @@ }; mac0: ethernet@1e660000 { - compatible = "faraday,ftgmac100"; + compatible = "aspeed,ast2400-mac", "faraday,ftgmac100"; reg = <0x1e660000 0x180>; interrupts = <2>; - no-hw-checksum; status = "disabled"; }; mac1: ethernet@1e680000 { - compatible = "faraday,ftgmac100"; + compatible = "aspeed,ast2400-mac", "faraday,ftgmac100"; reg = <0x1e680000 0x180>; interrupts = <3>; - no-hw-checksum; status = "disabled"; };
arch/arm/boot/dts/aspeed-g5.dtsi +2 -4
@@ -141,18 +141,16 @@ }; mac0: ethernet@1e660000 { - compatible = "faraday,ftgmac100"; + compatible = "aspeed,ast2500-mac", "faraday,ftgmac100"; reg = <0x1e660000 0x180>; interrupts = <2>; - no-hw-checksum; status = "disabled"; }; mac1: ethernet@1e680000 { - compatible = "faraday,ftgmac100"; + compatible = "aspeed,ast2500-mac", "faraday,ftgmac100"; reg = <0x1e680000 0x180>; interrupts = <3>; - no-hw-checksum; status = "disabled"; };
drivers/net/ethernet/faraday/ftgmac100.c +1212 -931
2,578 lines not on this page · raw message
drivers/net/ethernet/faraday/ftgmac100.h +178 -5
211 lines not on this page · raw message