diff options
| author | David S. Miller <davem@davemloft.net> | 2021-10-18 16:02:56 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2021-10-18 16:02:56 +0300 |
| commit | c87350ced118ef898ffcb7badacf0939010f2549 (patch) | |
| tree | 25de2b180cedf455546748f1975c8b36707b5fef /include | |
| parent | 4abd7cffc09a38015fa14a22471e3de48a4ca032 (diff) | |
| parent | 2ca2969aae1e110fe243a50d6d5809f6f4895092 (diff) | |
| download | linux-c87350ced118ef898ffcb7badacf0939010f2549.tar.xz | |
Merge branch 'rtl8365mb-vc-support'
Alvin Šipraga says:
====================
net: dsa: add support for RTL8365MB-VC
This series adds support for Realtek's RTL8365MB-VC, a 4+1 port
10/100/1000M Ethernet switch. The driver - rtl8365mb - was developed by
Michael Ramussen and myself.
This version of the driver is relatively slim, implementing only the
standalone port functionality and no offload capabilities. It is based
on a previous RFC series [1] from August, and the main difference is the
removal of some spurious VLAN operations. Otherwise I have simply
addressed most of the feedback. Please see the respective patches for
more detail.
In parallel I am working on offloading the bridge layer capabilities,
but I would like to get the basic stuff upstreamed as soon as possible.
v3 -> v4:
- get irq before setting virq parents (fixes kernel test robot
warning)
- remove pad-to-72-bytes logic in tagger xmit (fixes DENG Qingfang's
suggestion); no longer needed as we set CPU minimum RX size to 64
bytes
- use mutex to protect MIB counter access instead of a spinlock (fixes
Jakub's feedback on v3 statistics refactoring)
v2 -> v3:
- move IRQ setup earlier in probe per Florian's suggestion
- fix compilation error on some archs due to FIELD_PREP use in v1
- follow Jakub's suggestion and use the standard ethtool stats API;
NOTE: new patch in the series for relevant DSA plumbing
- following the stats change, it became apparent that the rtl8366
helper library is no longer that helpful; scrap it and implement
the ethtool ops specifically for this chip
v1 -> v2:
- drop DSA port type checks during MAC configuration
- use OF properties to configure RGMII TX/RX delay
- don't set default fwd_offload_mark if packet is trapped to CPU
- remove port mapping macros
- update device tree bindings documentation with an example
- cosmetic changes to the tagging driver using FIELD_* macros
[1] https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 8 | ||||
| -rw-r--r-- | include/uapi/linux/if_ether.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index d784e76113b8..05ebdd8d5321 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -51,6 +51,7 @@ struct phylink_link_state; #define DSA_TAG_PROTO_SEVILLE_VALUE 21 #define DSA_TAG_PROTO_BRCM_LEGACY_VALUE 22 #define DSA_TAG_PROTO_SJA1110_VALUE 23 +#define DSA_TAG_PROTO_RTL8_4_VALUE 24 enum dsa_tag_protocol { DSA_TAG_PROTO_NONE = DSA_TAG_PROTO_NONE_VALUE, @@ -77,6 +78,7 @@ enum dsa_tag_protocol { DSA_TAG_PROTO_OCELOT_8021Q = DSA_TAG_PROTO_OCELOT_8021Q_VALUE, DSA_TAG_PROTO_SEVILLE = DSA_TAG_PROTO_SEVILLE_VALUE, DSA_TAG_PROTO_SJA1110 = DSA_TAG_PROTO_SJA1110_VALUE, + DSA_TAG_PROTO_RTL8_4 = DSA_TAG_PROTO_RTL8_4_VALUE, }; struct dsa_switch; @@ -645,6 +647,12 @@ struct dsa_switch_ops { int (*get_sset_count)(struct dsa_switch *ds, int port, int sset); void (*get_ethtool_phy_stats)(struct dsa_switch *ds, int port, uint64_t *data); + void (*get_eth_phy_stats)(struct dsa_switch *ds, int port, + struct ethtool_eth_phy_stats *phy_stats); + void (*get_eth_mac_stats)(struct dsa_switch *ds, int port, + struct ethtool_eth_mac_stats *mac_stats); + void (*get_eth_ctrl_stats)(struct dsa_switch *ds, int port, + struct ethtool_eth_ctrl_stats *ctrl_stats); void (*get_stats64)(struct dsa_switch *ds, int port, struct rtnl_link_stats64 *s); void (*self_test)(struct dsa_switch *ds, int port, diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 5f589c7a8382..5da4ee234e0b 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h @@ -86,6 +86,7 @@ * over Ethernet */ #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ +#define ETH_P_REALTEK 0x8899 /* Multiple proprietary protocols */ #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ |
