sfc: support the ethtool ksettings API properly so that 25/50/100G works
Store and handle ethtool link mode masks within the driver instead of just a single u32. However, quite a significant amount of existing code wants to manipulate the masks directly, and thus now uses the first unsigned long (i.e. mask[0]) as though it were a legacy u32 mask. This is ok because all the bits that code is interested in are in the first 32 bits of the mask; but it might be a good idea to change them in future to use the proper bitmap API. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
702b3d5136
commit
c2ab85d2da
@@ -720,7 +720,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((wanted_fc & EFX_FC_AUTO) && !efx->link_advertising) {
|
||||
if ((wanted_fc & EFX_FC_AUTO) && !efx->link_advertising[0]) {
|
||||
netif_dbg(efx, drv, efx->net_dev,
|
||||
"Autonegotiation is disabled\n");
|
||||
rc = -EINVAL;
|
||||
@@ -732,10 +732,10 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
|
||||
(wanted_fc & EFX_FC_TX) && !(efx->wanted_fc & EFX_FC_TX))
|
||||
efx->type->prepare_enable_fc_tx(efx);
|
||||
|
||||
old_adv = efx->link_advertising;
|
||||
old_adv = efx->link_advertising[0];
|
||||
old_fc = efx->wanted_fc;
|
||||
efx_link_set_wanted_fc(efx, wanted_fc);
|
||||
if (efx->link_advertising != old_adv ||
|
||||
if (efx->link_advertising[0] != old_adv ||
|
||||
(efx->wanted_fc ^ old_fc) & EFX_FC_AUTO) {
|
||||
rc = efx->phy_op->reconfigure(efx);
|
||||
if (rc) {
|
||||
|
Reference in New Issue
Block a user