Skip to content

Commit

Permalink
amd-xgbe: Update connection validation for backplane mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lendacky, Thomas authored and David S. Miller committed Nov 18, 2016
1 parent d3c19c0 commit 5a4e4c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 5a4e4c8

Please sign in to comment.