aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/xgbe/xgbe.h
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2016-11-10 17:11:14 -0600
committerDavid S. Miller <davem@davemloft.net>2016-11-13 00:56:26 -0500
commit732f2ab7afb975755dcfbdcbe6eafe42e8cdc1d4 (patch)
tree9afae2228b664f01d2b577dbee242bbf228bbf4c /drivers/net/ethernet/amd/xgbe/xgbe.h
parentamd-xgbe: Add support for SFP+ modules (diff)
downloadlinux-dev-732f2ab7afb975755dcfbdcbe6eafe42e8cdc1d4.tar.xz
linux-dev-732f2ab7afb975755dcfbdcbe6eafe42e8cdc1d4.zip
amd-xgbe: Add support for MDIO attached PHYs
Use the phylib support in the kernel to communicate with and control an MDIO attached PHY. Use the hardware's MDIO communication mechanism to communicate with the PHY. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe.h')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
index a691f844fa72..34db47094c61 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
@@ -289,6 +289,9 @@
/* ECC correctable error notification window (seconds) */
#define XGBE_ECC_LIMIT 60
+/* MDIO port types */
+#define XGMAC_MAX_C22_PORT 3
+
struct xgbe_prv_data;
struct xgbe_packet_data {
@@ -675,6 +678,14 @@ struct xgbe_hw_if {
void (*write_mmd_regs)(struct xgbe_prv_data *, int, int, int);
int (*set_speed)(struct xgbe_prv_data *, int);
+ int (*set_ext_mii_mode)(struct xgbe_prv_data *, unsigned int,
+ enum xgbe_mdio_mode);
+ int (*read_ext_mii_regs)(struct xgbe_prv_data *, int, int);
+ int (*write_ext_mii_regs)(struct xgbe_prv_data *, int, int, u16);
+
+ int (*set_gpio)(struct xgbe_prv_data *, unsigned int);
+ int (*clr_gpio)(struct xgbe_prv_data *, unsigned int);
+
void (*enable_tx)(struct xgbe_prv_data *);
void (*disable_tx)(struct xgbe_prv_data *);
void (*enable_rx)(struct xgbe_prv_data *);
@@ -1111,6 +1122,7 @@ struct xgbe_prv_data {
struct xgbe_phy phy;
int mdio_mmd;
unsigned long link_check;
+ struct completion mdio_complete;
char an_name[IFNAMSIZ + 32];
struct workqueue_struct *an_workqueue;