mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-26 01:39:03 +00:00
Since all the remaining members of struct mdio_xpcs_ops have direct equivalents in struct phylink_pcs_ops, it is about time we remove it altogether. Since the phylink ops return void, we need to remove the error propagation from the various xpcs methods and simply print an error message where appropriate. Since xpcs_get_state_c73() detects link faults and attempts to reset the link on its own by calling xpcs_config(), but xpcs_config() now has a lot of phylink arguments which are not needed and cannot be simply fabricated by anybody else except phylink, the actual implementation has been moved into a smaller xpcs_do_config(). The const struct mdio_xpcs_ops *priv->hw->xpcs has been removed, so we need to look at the struct mdio_xpcs_args pointer now as an indication whether the port has an XPCS or not. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
35 lines
902 B
C
35 lines
902 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2020 Synopsys, Inc. and/or its affiliates.
|
|
* Synopsys DesignWare XPCS helpers
|
|
*/
|
|
|
|
#ifndef __LINUX_PCS_XPCS_H
|
|
#define __LINUX_PCS_XPCS_H
|
|
|
|
#include <linux/phy.h>
|
|
#include <linux/phylink.h>
|
|
|
|
/* AN mode */
|
|
#define DW_AN_C73 1
|
|
#define DW_AN_C37_SGMII 2
|
|
|
|
struct xpcs_id;
|
|
|
|
struct mdio_xpcs_args {
|
|
struct mdio_device *mdiodev;
|
|
const struct xpcs_id *id;
|
|
struct phylink_pcs pcs;
|
|
};
|
|
|
|
int xpcs_get_an_mode(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
|
|
void xpcs_validate(struct mdio_xpcs_args *xpcs, unsigned long *supported,
|
|
struct phylink_link_state *state);
|
|
int xpcs_config_eee(struct mdio_xpcs_args *xpcs, int mult_fact_100ns,
|
|
int enable);
|
|
struct mdio_xpcs_args *xpcs_create(struct mdio_device *mdiodev,
|
|
phy_interface_t interface);
|
|
void xpcs_destroy(struct mdio_xpcs_args *xpcs);
|
|
|
|
#endif /* __LINUX_PCS_XPCS_H */
|