summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2016-11-17 08:43:37 -0600
committerDavid S. Miller <davem@davemloft.net>2016-11-18 12:28:09 -0500
commit5a4e4c8f0236bc4cbb88aef5a706116e60e7ccc7 (patch)
treee2abff83487d9e0e1db4d4b4a405930489d02e7b /drivers
parentd3c19c0a72b7e1affce86a4eaa634af0c72fce61 (diff)
amd-xgbe: Update connection validation for backplane mode
Update the connection type enumeration for backplane mode and return an error when there is a mismatch between the mode and the connection type. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 348cc8cf5e74..9d8c953083b4 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -164,6 +164,7 @@ enum xgbe_conn_type {
XGBE_CONN_TYPE_NONE = 0,
XGBE_CONN_TYPE_SFP,
XGBE_CONN_TYPE_MDIO,
+ XGBE_CONN_TYPE_RSVD1,
XGBE_CONN_TYPE_BACKPLANE,
XGBE_CONN_TYPE_MAX,
};
@@ -2831,6 +2832,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata)
if (xgbe_phy_conn_type_mismatch(pdata)) {
dev_err(pdata->dev, "phy mode/connection mismatch (%#x/%#x)\n",
phy_data->port_mode, phy_data->conn_type);
+ return -EINVAL;
}
/* Validate the mode requested */