swconfig: add (PHY) generic helper setting port link
It's quite common for switches to have PHY per port so adding a generic helper setting link state will help many drivers. It just needs an API to access PHYs which this patch also adds. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48621
This commit is contained in:
@@ -99,6 +99,9 @@ struct switch_dev_ops {
|
||||
struct switch_port_link *link);
|
||||
int (*get_port_stats)(struct switch_dev *dev, int port,
|
||||
struct switch_port_stats *stats);
|
||||
|
||||
int (*phy_read16)(struct switch_dev *dev, int addr, u8 reg, u16 *value);
|
||||
int (*phy_write16)(struct switch_dev *dev, int addr, u8 reg, u16 value);
|
||||
};
|
||||
|
||||
struct switch_dev {
|
||||
@@ -170,4 +173,7 @@ struct switch_attr {
|
||||
int max;
|
||||
};
|
||||
|
||||
int switch_generic_set_link(struct switch_dev *dev, int port,
|
||||
struct switch_port_link *link);
|
||||
|
||||
#endif /* _LINUX_SWITCH_H */
|
||||
|
||||
Reference in New Issue
Block a user