Thread (62 messages) 62 messages, 10 authors, 2021-11-29

RE: [PATCH 2/2] net: ethernet: Add driver for Sunplus SP7021

From: Wells Lu 呂芳騰 <hidden>
Date: 2021-11-08 14:26:23
Also in: linux-devicetree, lkml

quoted
SP7021 Ethernet supports 3 operation modes:
 - Dual Ethernet mode
   In this mode, driver creates two net-device interfaces. Each connects
   to PHY. There are two LAN ports totally.
   I am sorry that EMAC of SP7021 cannot support L2 switch functions
   of Linux switch-device model because it only has partial function of
   switch.
This is fine.
Thanks a lot!

quoted
 - One Ethernet mode
   In this mode, driver creates one net-device interface. It connects to
   to a PHY (There is only one LAN port).
   The LAN port is then connected to a 3-port Ethernet hub.
   The 3-port Ethernet hub is a hardware circuitry. All operations
   (packet forwarding) are done by hardware. No software
   intervention is needed. Actually, even just power-on, no software
   running, two LAN ports of SP7021 work well as 2-port hub.
We need to dig into the details of this mode. I would initially say no, until we
really do know it is impossible to do it correctly.  Even if it is impossible to do
it correctly, i'm still temped to reject this mode.

How does spanning tree work? Who sends and receives the BPDU?

Is there PTP support? How do you send and receive the PTP frames?

Is IGMP snooping supported?

All of these have one thing in common, you need to be able to egress frames
out a specific port of the switch, and you need to know what port a received
frames ingressed on. If you can do that, you can probably do proper support in
Linux.
The "L2 switch" is a very simple witch. It has 3 ports: CPU, LAN port 0 and LAN 
port 1. A packet is always forwarded to other two ports if source-address (of MAC)
learning function is off, or forwarded to one of the two ports if source-address
learning function is on and source address is learnt (recorded by switch).

The switch will not recognize type of packets, regardless BPDU, PTP or any other
packets. If turning off source-address learning function, it works like an Ethernet
plus a 2-port hub.

Is the datasheet available?
Yes, refer to on-line document of SP7021:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/pages/462553090/15.+Ethernet+Switch

   Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help