• Grygorii Strashko's avatar
    net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode · a9e60cf0
    Grygorii Strashko authored
    This patch adds multi-port support to TI AM65x CPSW driver xmit/rx path in
    preparation for adding support for multi-port devices, like Main CPSW0 on
    K3 J721E SoC or future CPSW3g on K3 AM64x SoC.
    Hence DMA channels are common/shared for all ext Ports and the RX/TX NAPI
    and DMA processing going to be assigned to first available netdev this patch:
     - ensures all RX descriptors fields are initialized;
     - adds synchronization for TX DMA push/pop operation (locking) as
    Networking core locks are not enough any more;
     - updates TX bql processing for every packet in
    am65_cpsw_nuss_tx_compl_packets() as every completed TX skb can have
    different ndev assigned (come from different netdevs).
    
    To avoid performance issues for existing one-port CPSW2g devices the above
    changes are done only for multi-port devices by splitting xmit path for
    one-port and multi-port devices.
    Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
    Reviewed-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    a9e60cf0
am65-cpsw-nuss.h 3.79 KB