amd-xgbe: Prepare for working with more than one type of phy
Prepare the code to be able to work with more than one type of phy by adding additional callable functions into the phy interface and removing phy specific settings/functions from non-phy related files. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
43e0dcf708
commit
e57f7a3fea
@@ -316,24 +316,7 @@ static int xgbe_set_settings(struct net_device *netdev,
|
||||
}
|
||||
|
||||
if (cmd->autoneg == AUTONEG_DISABLE) {
|
||||
switch (speed) {
|
||||
case SPEED_10000:
|
||||
break;
|
||||
case SPEED_2500:
|
||||
if (pdata->speed_set != XGBE_SPEEDSET_2500_10000) {
|
||||
netdev_err(netdev, "unsupported speed %u\n",
|
||||
speed);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case SPEED_1000:
|
||||
if (pdata->speed_set != XGBE_SPEEDSET_1000_10000) {
|
||||
netdev_err(netdev, "unsupported speed %u\n",
|
||||
speed);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!pdata->phy_if.phy_valid_speed(pdata, speed)) {
|
||||
netdev_err(netdev, "unsupported speed %u\n", speed);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user