Commit 5a4e4c8f authored by Lendacky, Thomas's avatar Lendacky, Thomas Committed by David S. Miller

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: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d3c19c0a
...@@ -164,6 +164,7 @@ enum xgbe_conn_type { ...@@ -164,6 +164,7 @@ enum xgbe_conn_type {
XGBE_CONN_TYPE_NONE = 0, XGBE_CONN_TYPE_NONE = 0,
XGBE_CONN_TYPE_SFP, XGBE_CONN_TYPE_SFP,
XGBE_CONN_TYPE_MDIO, XGBE_CONN_TYPE_MDIO,
XGBE_CONN_TYPE_RSVD1,
XGBE_CONN_TYPE_BACKPLANE, XGBE_CONN_TYPE_BACKPLANE,
XGBE_CONN_TYPE_MAX, XGBE_CONN_TYPE_MAX,
}; };
...@@ -2831,6 +2832,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata) ...@@ -2831,6 +2832,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata)
if (xgbe_phy_conn_type_mismatch(pdata)) { if (xgbe_phy_conn_type_mismatch(pdata)) {
dev_err(pdata->dev, "phy mode/connection mismatch (%#x/%#x)\n", dev_err(pdata->dev, "phy mode/connection mismatch (%#x/%#x)\n",
phy_data->port_mode, phy_data->conn_type); phy_data->port_mode, phy_data->conn_type);
return -EINVAL;
} }
/* Validate the mode requested */ /* Validate the mode requested */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment