|
34 | 34 | #include <linux/rculist.h> |
35 | 35 | #include <linux/workqueue.h> |
36 | 36 | #include <linux/dynamic_queue_limits.h> |
| 37 | +#include <linux/dpll.h> |
37 | 38 |
|
38 | 39 | #include <net/net_namespace.h> |
39 | 40 | #ifdef CONFIG_DCB |
@@ -2058,6 +2059,9 @@ enum netdev_ml_priv_type { |
2058 | 2059 | * SET_NETDEV_DEVLINK_PORT macro. This pointer is static |
2059 | 2060 | * during the time netdevice is registered. |
2060 | 2061 | * |
| 2062 | + * @dpll_pin: Pointer to the SyncE source pin of a DPLL subsystem, |
| 2063 | + * where the clock is recovered. |
| 2064 | + * |
2061 | 2065 | * FIXME: cleanup struct net_device such that network protocol info |
2062 | 2066 | * moves out. |
2063 | 2067 | */ |
@@ -2414,6 +2418,10 @@ struct net_device { |
2414 | 2418 | struct rtnl_hw_stats64 *offload_xstats_l3; |
2415 | 2419 |
|
2416 | 2420 | struct devlink_port *devlink_port; |
| 2421 | + |
| 2422 | +#if IS_ENABLED(CONFIG_DPLL) |
| 2423 | + struct dpll_pin *dpll_pin; |
| 2424 | +#endif |
2417 | 2425 | }; |
2418 | 2426 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
2419 | 2427 |
|
@@ -3961,6 +3969,18 @@ int dev_get_mac_address(struct sockaddr *sa, struct net *net, char *dev_name); |
3961 | 3969 | int dev_get_port_parent_id(struct net_device *dev, |
3962 | 3970 | struct netdev_phys_item_id *ppid, bool recurse); |
3963 | 3971 | bool netdev_port_same_parent_id(struct net_device *a, struct net_device *b); |
| 3972 | +void netdev_dpll_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin); |
| 3973 | +void netdev_dpll_pin_clear(struct net_device *dev); |
| 3974 | + |
| 3975 | +static inline struct dpll_pin *netdev_dpll_pin(const struct net_device *dev) |
| 3976 | +{ |
| 3977 | +#if IS_ENABLED(CONFIG_DPLL) |
| 3978 | + return dev->dpll_pin; |
| 3979 | +#else |
| 3980 | + return NULL; |
| 3981 | +#endif |
| 3982 | +} |
| 3983 | + |
3964 | 3984 | struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev, bool *again); |
3965 | 3985 | struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, |
3966 | 3986 | struct netdev_queue *txq, int *ret); |
|
0 commit comments