Contributors: 19
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Maxime Chevallier |
168 |
68.29% |
1 |
4.17% |
Linus Torvalds (pre-git) |
20 |
8.13% |
4 |
16.67% |
Florian Fainelli |
11 |
4.47% |
1 |
4.17% |
Zach Brown |
10 |
4.07% |
1 |
4.17% |
Joe Perches |
5 |
2.03% |
2 |
8.33% |
Lorenzo Bianconi |
4 |
1.63% |
1 |
4.17% |
Linus Torvalds |
4 |
1.63% |
1 |
4.17% |
Sebastian Andrzej Siewior |
4 |
1.63% |
1 |
4.17% |
Richard Cochran |
3 |
1.22% |
1 |
4.17% |
Russell King |
3 |
1.22% |
1 |
4.17% |
Jakub Kiciński |
3 |
1.22% |
2 |
8.33% |
Jeff Garzik |
3 |
1.22% |
1 |
4.17% |
Andy Fleming |
2 |
0.81% |
1 |
4.17% |
Maxim Georgiev |
1 |
0.41% |
1 |
4.17% |
Stephen Hemminger |
1 |
0.41% |
1 |
4.17% |
Stanislaw Gruszka |
1 |
0.41% |
1 |
4.17% |
David S. Miller |
1 |
0.41% |
1 |
4.17% |
Bartosz Golaszewski |
1 |
0.41% |
1 |
4.17% |
Jiri Pirko |
1 |
0.41% |
1 |
4.17% |
Total |
246 |
|
24 |
|
/* SPDX-License-Identifier: GPL-2.0 */
/*
* PHY device list allow maintaining a list of PHY devices that are
* part of a netdevice's link topology. PHYs can for example be chained,
* as is the case when using a PHY that exposes an SFP module, on which an
* SFP transceiver that embeds a PHY is connected.
*
* This list can then be used by userspace to leverage individual PHY
* capabilities.
*/
#ifndef __PHY_LINK_TOPOLOGY_H
#define __PHY_LINK_TOPOLOGY_H
#include <linux/ethtool.h>
#include <linux/netdevice.h>
struct xarray;
struct phy_device;
struct sfp_bus;
struct phy_link_topology {
struct xarray phys;
u32 next_phy_index;
};
struct phy_device_node {
enum phy_upstream upstream_type;
union {
struct net_device *netdev;
struct phy_device *phydev;
} upstream;
struct sfp_bus *parent_sfp_bus;
struct phy_device *phy;
};
#if IS_ENABLED(CONFIG_PHYLIB)
int phy_link_topo_add_phy(struct net_device *dev,
struct phy_device *phy,
enum phy_upstream upt, void *upstream);
void phy_link_topo_del_phy(struct net_device *dev, struct phy_device *phy);
static inline struct phy_device *
phy_link_topo_get_phy(struct net_device *dev, u32 phyindex)
{
struct phy_link_topology *topo = dev->link_topo;
struct phy_device_node *pdn;
if (!topo)
return NULL;
pdn = xa_load(&topo->phys, phyindex);
if (pdn)
return pdn->phy;
return NULL;
}
#else
static inline int phy_link_topo_add_phy(struct net_device *dev,
struct phy_device *phy,
enum phy_upstream upt, void *upstream)
{
return 0;
}
static inline void phy_link_topo_del_phy(struct net_device *dev,
struct phy_device *phy)
{
}
static inline struct phy_device *
phy_link_topo_get_phy(struct net_device *dev, u32 phyindex)
{
return NULL;
}
#endif
#endif /* __PHY_LINK_TOPOLOGY_H */