aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files-5.10/drivers/net/ethernet
Commit message (Collapse)AuthorAgeFilesLines
* realtek: Improve IRQ request in Ethernet driverBirger Koblitz2022-02-171-5/+4
| | | | | | | Improves the IRQ request code by using platform_get_irq() which provides better error handling. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Fix RTL931X Ethernet driverBirger Koblitz2022-02-171-21/+167
| | | | | | | | | | Various fixes to enable Ethernet on the RTL931X: - Network start and stop sequence for RTL931X HW - MDIO access on RTL931X SoC - Chip initialization - SerDes setup Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Fix Ethernet driver IRQ service routine for SMPBirger Koblitz2022-02-171-5/+0
| | | | | | | Do not lock the register structure in IRQ context. It is not necessary and leads to lockups under SMP load. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: fix RTL839X receive tag decodingBirger Koblitz2022-02-171-4/+5
| | | | | | Correct offset in RX tag structure. Correct offload decision flagging. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Fix RTL931X-specific Ethernet driver functionsBirger Koblitz2022-02-172-12/+39
| | | | | | | Fix the update counter of the RX ring, add SDS access functions for RTL931X. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: rename rtl838x_reg structureBirger Koblitz2022-02-172-6/+6
| | | | | | | | Rename the SoC-specific rtl838x_reg structure in the Ethernet driver to avoid confusion with the structure of the same name in the DSA driver. New name is: rtl838x_eth_reg Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Fix RTL839x TX CPU-TagBirger Koblitz2022-02-171-2/+2
| | | | | | | | | | Setting bits 20 and 23 in a u16 is obviously wrong. According to https://www.svanheule.net/realtek/cypress/cputag cpu_tag[2] starts at bit 48 in the cpu-tag structure, so bit 43 is bit 5 in cpu_tag[2] and bit 40 is bit 8 in cpu_tag[2]. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Increase zone size for Ethernet driver DMABirger Koblitz2022-02-171-2/+2
| | | | | | | | | | Set CONFIG_FORCE_MAX_ZONEORDER setting to 13 to allow larger contiguous memory allocation for the DMA of the Ethernet driver. Increase the number of entries in the RX ring to 300 making use of the larger DMA region now possible for receiveing packets. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: reset both ethernet NIC and queuesSander Vanheule2021-11-241-4/+7
| | | | | | | | | | | | | | | Recent versions of Realtek's SDK reset both the ethernet NIC and queues (SW_NIC_RST and SW_Q_RST bits) when initialising the hardware. Furthermore, when issuing a CPU reset on the Zyxel GS1900-8 (not supported by any current driver), the networking part of the SoC is not reset. This leads to unresponsive network after the restart. By resetting both the ethernet NIC and queues, networking always comes up reliably. Suggested-by: Birger Koblitz <mail@birger-koblitz.de> Signed-off-by: Sander Vanheule <sander@svanheule.net> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
* realtek: Add driver support for TC offloadingBirger Koblitz2021-10-092-1/+4
| | | | | | | | This adds support for offloading TC flower by using the Packet Inspection Engine of the RTL-SoCs. Basic infrastructure support is provide with callbacks to the tc subsystem and support for HW packet counters. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Add port to smi-bus address mappingBirger Koblitz2021-10-091-32/+69
| | | | | | | | All RTL SoCs addresss PHYs via their port number, which is mapped to an SMI address. Add support for configuring this mapping via the .dts on all SoCs apart from the 839x, where the mapping to the 64 ports is fixed. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Increase maximum RX ring buffer lengthBirger Koblitz2021-10-091-4/+5
| | | | | | | Increase the maximum ring buffer length in order to improve performance on RTL839x devices. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Improve TX CPU-Tag usageBirger Koblitz2021-10-091-20/+29
| | | | | | | | | On RTL83xx enable learning of the MAC source address of the CPU port from outgoing packets. Add documentation on bit fields. On RTL93xx enable port-mask usage and the use of internal priority, these SoCs automatically learn the MAC. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Remove storm control and attack warningsBirger Koblitz2021-10-091-25/+0
| | | | | | | | Remove the storm control and attack warnings from the IRQ handler of the Ethernet driver. There was no consequence to the detection and the kernel can also handle at least the attacks itself. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: Correct TX ring size in ethernet driverBirger Koblitz2021-10-091-2/+1
| | | | | | | This enlarges the size of the TX ring buffer, which prevents warnings when the buffer runs out of space. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
* realtek: fix compile errors in rtl838x_eth.c for 5.10INAGAKI Hiroshi2021-09-261-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | this patch fixes the following errors when compiling: - "unsigned int txqueue" is added as an additional parameter of ndo_tx_timeout in net_device_ops (include/linux/netdevice.h) - "mac_link_state" in phylink_mac_ops (include/linux/phylink.h) is renamed to "mac_pcs_get_state" and changed the return value to void from int - several parameters are added to "mac_link_up" in phylink_mac_ops (include/linux/phylink.h) and the order of the parameters is changed added: - int speed - int duplex - bool tx_pause - bool rx_pause - a parameter "phy_interface_t *interface" is added to of_get_phy_mode (drivers/of/of_net.c) and returns the state instead of phy mode Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: copy config/files/patches to 5.10INAGAKI Hiroshi2021-09-262-0/+2630
this patch copies the following files from 5.4 to 5.10: - config-5.4 -> config-5.10 - files-5.4/ -> files-5.10/ - patches-5.4/ -> patches-5.10/ Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [rebase on change in files-5.4] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>