- Jul 21, 2020
-
-
Grygorii Strashko authored
commit 3d0fda90 upstream. Ensure that critical setting can only be configured when there are no running netdevs - all ports are down. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Grygorii Strashko authored
commit 7d58d3eb upstream. Skip HW configuration when p0-rx-ptype-rrobin is changed as it will be done by .ndev_open(), Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Grygorii Strashko authored
commit d6d0aeaf upstream. The MAC SL has to be initialized for each port otherwise am65_cpsw_nuss_slave_disable_unused() will crash for disabled ports. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Grygorii Strashko authored
commit 51824048 upstream. The pf_p0_rx_ptype_rrobin is global parameter so move its initialization in probe. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Gustavo A. R. Silva authored
commit f362b70b upstream. Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _size_. This code was detected with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by:
Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Grygorii Strashko authored
commit a45cfcc6 upstream. The MCU CPSW expected to populate only MDIO device, but follow up patches will add "compatible" property to the MCU CPSW CPTS node which will cause creation of CPTS device and MCU CPSW init failure. Hence, switch to use of_platform_device_create() instead of of_platform_populate() for MDIO device population. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Grygorii Strashko authored
commit a9a495d5 upstream. Sync MCU CPSW DT bindings to LKML version as max as possible. Used initial LKML commit to identify that code already upstream. Note. yaml required some additional work and not critical at this stage. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com>
-
Grygorii Strashko authored
commit ba86a6e9 upstream. Sync MCU CPSW to LKML version as max as possible. Used initial LKML commit to identify that code already upstream. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com>
-
Grygorii Strashko authored
commit ae7fdac8 upstream. Sync MCU CPSW to LKML version as max as possible. Used initial LKML commit to identify that code already upstream. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com>
-
Grygorii Strashko authored
commit 93a76530 upstream. Sync MCU CPSW code to LKML version as max as possible. Used initial LKML commit to identify that code already upstream. It will break networking due to binding changes which will be fixed by following patches. Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com>
-
- Jul 14, 2020
-
-
LCPD Auto Merger authored
TI-Feature: connectivity TI-Branch: connectivity-ti-linux-5.4.y * 'connectivity-ti-linux-5.4.y' of ssh://bitbucket.itg.ti.com/lcpdpublicdom/connectivity : (37 commits) net: ti: prueth_core: hsr/prp: VLAN filter to receive tagged SV frames net: ti: prueth_core: hsr/prp: add Multicast filtering net: ti: prueth_core: hsr/prp: add VLAN filtering net: ti: prueth_core: hsr/prp: update for ethtool stats support net: ti: prueth_core: add helper functions to support lre offload ARM: dts: am335x-icev2: add interrupts for HSR/PRP queue interrupts ARM: dts: am437x: add interrupts for HSR/PRP queue interrupts ARM: dts: am57x: add interrupts for hsr/prp queue interrupts net: ti: prueth_core: hsr/prp: add NSP support net: ti: prueth_core: hsr/prp: add ethtool command to switch Ethenet type net: ti: prueth_core: add HSR/PRP driver dt-bindings: net: ti-prueth: Add interrupt properties for HSR/PRP net: ti: prueth_core: add HSR/PRP firmware specific init functions net: ti: prueth_core: hsr/prp: set mux_sel and Min/Max frame sizes net: ti: prueth_core: move timer utility functions to prueth_core net: ti: prueth_core: move prueth_hostinit() to inside ndo_open() ARM: dts: am437x-idk : remove firmware-name from DTS ARM: dts: am335x-icev2 : remove firmware-name from DTS ARM: dts: k2g-ice : remove firmware-name from DTS ARM: dts: am57xx-idk : remove firmware-name from DTS ... Signed-off-by:
LCPD Auto Merger <lcpd_integration@list.ti.com>
-
- Jul 10, 2020
-
-
Murali Karicheri authored
HSR/PRP networks may use VLAN for management messages such as that for sending and receiving tagged supervision frames. So implement lredev_set_sv_vlan_id() ops of the LRE offloaded device to add VLAN filter entry for receiving these tagged frames. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Similar to Dual EMAC firmware, HSR/PRP (LRE) firmware also supports a hashed Multicast filter table of 256 entries. This patch extends the MC filtering support to HSR/PRP Ethernet types. This is a shared table for LRE. So protect access using a spinlock. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
This patch add VLAN filtering support for LRE offload. VLAN table has 512 entries with 8 VIDs supported per entry. It is a shared table. So use a spinlock to protect access. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
This patch adds Link Redundancy Entity (LRE) stats through ethtool command. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Firmware requires node table entries to be inserted by driver to save PRU cycles for packet processing. Node table provides a view of remote nodes in the network. The nodes send supervision frames periodically with its own mac address and the same is processed by firmware. First firmware lookup the source MAC address. If not found, it indicates a flag in the descriptor which driver uses to insert the MAC address in the node table. The rx packet processing code kicks a worker thread to insert the mac address. This patch adds the required function to do the insert function and also clear the table on demand. Firmware also requires driver to run a timer for 10 msec to update check flags in dram for firmware to do periodic table maintenance functions for LRE offload. So change basic timer period to 10 msec and use a counter to track the NSP timer which needs to be done every 100 msec. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
This adds interrupts property for HSR/PRP priority queue interrupts for the supported platforms. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
This adds interrupts property for HSR/PRP priority queue interrupts for the supported platforms. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
This adds interrupts property for hsr/prp priority queue interrupts for the supported platforms. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
For HSR/PRP the timer has to be run at 10 msec due to requirement to support offload function in firmware. So run the basic timer at 10 msec when Ethernet type is HSR/PRP and use a counter to count 100 msec for NSP timer. Keep the basic timer at 100 msec when in Dual EMAC mode to reduce CPU cycle usage. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
PRUETH driver now supports Dual EMAC/HSR/PRP/SWITCH Ethernet types. The user requires to switch between these Ethernet types at run time without rebooting the device. This patch introduces Ethtool -K option to switch the Ethernet types between Dual EMAC/HSR/PRP Ethernet types. User first bring down the interface and then set the HSR or PRP offload flag in the Ethernet device using ethtool -K option. Then bring up the Ethernet interfaces and setup the HSR/PRP interface using ip link command. For example to Switch from Dual EMAC to HSR, user do ifconfig eth2 down ifconfig eth3 down ifconfig eth2 hw ether <MAC Addr> ifconfig eth3 hw ether <MAC Addr> ethtool -K eth2 hsr-rx-offload on ethtool -K eth3 hsr-rx-offload on Now ready to create hsr interface as ip link add name hsr0 type hsr slave1 eth2 slave2 eth3 supervision 45 version 1 Similarly to switch from Dual EMAC to prp user do similar steps ifconfig eth2 down ifconfig eth3 down ifconfig eth2 hw ether <MAC Addr> ifconfig eth3 hw ether <MAC Addr> ethtool -K eth2 prp-rx-offload on ethtool -K eth3 prp-rx-offload on ip link add name prp0 type hsr slave1 eth2 slave2 eth3 supervision 45 proto 1 To switch back to Dual EMAC, user clear the respective flags through ethtool command and bring up the interface. Switching between HSR and PRP is done in a similar way. First needs to reset the existing flag and then set the new flag before creating the hsr/prp interface. User is not allowed to switch between Switch and HSR/PRP. To switch, user first needs to change to Dual EMAC eth type and then do the switching of ethtype. Driver continues to support the existing method for switching between Dual EMAC and Switch eth types. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
HSR/PRP is a industrial Ethernet protocol defined by IEC 62439 standard. Both use 6 bytes of protocol bytes to implement redundancy. This consists of 2 bytes of sequence number, 1 byte of Ethernet type identifying the protocol and LSDU length and pathid/network id bits. Link Redundancy Entity (LRE) implements 1) duplication of Ethernet frames at Egress and 2) discard of duplicates at the ingress and 3) processing of Supervision frames to build the Node Table information. Node table contains the health status of remote nodes in the network. HSR/PRP driver offload part of LRE function. In the current version of the firmware 2 & 3 are offloaded to PRU firmware. 1) is still performed by upper HSR/PRP driver under net/hsr. This patch initialize the firmware based on the Ethernet type. HSR/PRP firmware uses same memory map as Switch firmware. So all places in the driver that initializes the basic Switch firmware is re-used for HSR/PRP as well using the !PRUETH_IS_EMAC() macro. Any HSR/PRP specific function is initialized under PRUETH_IS_LRE() macro. This update support both v1.0 and v2.1 of the ICSS firmware by using fw offsets that are assigned at probe based on platform. A list of firmware names are also picked at probe and then based on ethtype appropriate firmware is picked to load on the PRUs. For Packet handling, NAPI is used at at Ingress. There are two pair of Queues at the Ingress for each port. Low priority and High priority. A NAPI instance is added for each of the priority queue. An interrupt is raised by firmware when packets are en-queued to one of the priority queue. red_emac_rx_packets() ensures that packets are scanned from both queues at a specific priority and sends them to network stack based on timestamp associated with the packet. At the egress, packets are en-queued based on pcp bits. There are 2 queues per port and other queues are for port to port traffic. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
- Jul 08, 2020
-
-
Murali Karicheri authored
This document the bindings update to support HSR/PRP offload in PRUETH driver. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
This patch adds HSR/PRP Ethernet specific firmware init/config functions, firmware header files, data types etc. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
As an preparatory patch to support other Ethernet types in the driver, driver needs to configure min/max frame sizes in MII_RT registers as well as MUX_SEL as part of prueth_mii_init(). It is expected that this function gets called in ndo_open() and Ethernet type may be different than EMAC or SWITCH. So update prueth_mii_init() to configure the values for High Seamless Redundancy (HSR) and Parallel Redundancy Protocol (PRP) Ethernet types. HSR and PRP are two industrial protocols that operates at Layer 2 to implement redundancy. They extend the frame size by 6 octets of protocol bytes at Layer 2. Thus update the max frame size for these Ethernet types in MII_RT_RX_FRMS. As standard management frames are expected to be received as well, min frame size remains unaffected. Introduce a new macro PRUETH_IS_LRE() to check for HSR or PRP and use that to configure the Max frame value differently. Link Redundancy Entity (LRE) is the common function in HSR and PRP that implements redundancy for HSR and PRP. Also MUX_SEL reg values are same for HSR, PRP and SWITCH. So adjust the code accordingly. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
As a preparatory patch to introduce additional Ethernet types in the driver that also requires timer related functions, it is cleaner to have timer related main code in prueth_core driver and on event make calls to appropriate firmware specific functions as needed. So this add a function prueth_enable_nsp(), to configure storm prevention and define the same in prueth_qos.c. On timeout, call prueth_enable_nsp() to configure storm prevention feature. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
As preparatory patch to introduce support for additional Ethernet types, move prueth_hostinit() to inside ndo_open() as prueth_hostinit() is common across all Ethernet types and make sense to do it as part of ndo_open() since driver needs to support run time changing of Ethernet type. Currently Ethernet type is set inside prueth_change_to_switch_mode() or prueth_change_to_emac_mode() and prueth_hostinit() is invoked there. So move this to inside ndo_open(). Now that driver always do rproc_set_firmware() in ndo_open() based on Ethernet type, remove the restore of firmware names to EMAC firmware in prueth_sw_shutdown_prus(). For switch based firmwarem there are common resources to be initialized when the first port is initialized which are done part of prueth_hostinit(). So introduce a mutex to enter the critical region inside ndo_open() for initialization and in ndo_stop() when last port is down. Also set emac_configured at the end after the port is enabled and use proper input to prueth_port_enable() call. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Now that driver lists the firmware names, remove this from the dts. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Now that driver lists the firmware names, remove this from the dts. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Now that driver lists the firmware names, remove this from the dts. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Now that driver lists the firmware names, remove this from the dts. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Use functions to initialize the fdb table and to free the memory and move the code to prueth_switch.c. While at it place the fdb init function ahead of booting the PRUs as this memory is used by PRU. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Now that firmware filenames are listed in the driver as a static table, remove this from DTS. So update the documentation accordingly. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Remove firmware filename usage in dts and use compatibility private data to specify firmware files names in the driver as driver is expected to support run time change of Ethernet type in which case file name has to be determined dynamically when network device is opened as Ethernet type can be other than Dual EMAC. As file names are dependent on the platform and Ethernet type, introduce an array to hold these names and use in the driver. While at it move the macros to check Ethernet type to common header file prueth.h as it this is common across all Ethernet types Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
Many functions such as prueth_hostconfig(), prueth_hostinit() doesn't return any error code and can be void. Fix the return type to void in such cases. Also check for return type of prueth_sw_emac_config() since the function has a return value. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
if driver is in single emac mode, then nsp code will crash because there is no check for emac ptr. So fix it by adding a check for null ptr. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
tx irq is optional in the driver. So remove the same from dts to get a better egress performance for small size frames. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
tx irq is optional in the driver. So remove the same from dts to get a better egress performance for small size frames. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
tx irq is optional in the driver. So remove the same from dts to get a better egress performance for small size frames. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-
Murali Karicheri authored
tx irq is optional in the driver. So remove the same from dts to get a better egress performance for small size frames. Signed-off-by:
Murali Karicheri <m-karicheri2@ti.com>
-