Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lendacky, Thomas and committed by
David S. Miller
5a4e4c8f d3c19c0a

+2
+2
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
··· 164 164 XGBE_CONN_TYPE_NONE = 0, 165 165 XGBE_CONN_TYPE_SFP, 166 166 XGBE_CONN_TYPE_MDIO, 167 + XGBE_CONN_TYPE_RSVD1, 167 168 XGBE_CONN_TYPE_BACKPLANE, 168 169 XGBE_CONN_TYPE_MAX, 169 170 }; ··· 2832 2831 if (xgbe_phy_conn_type_mismatch(pdata)) { 2833 2832 dev_err(pdata->dev, "phy mode/connection mismatch (%#x/%#x)\n", 2834 2833 phy_data->port_mode, phy_data->conn_type); 2834 + return -EINVAL; 2835 2835 } 2836 2836 2837 2837 /* Validate the mode requested */