Commit af91fd7e authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'ethtool-consolidate-irq-coalescing-part-4'

Jakub Kicinski says:

====================
ethtool: consolidate irq coalescing - part 4

Convert more drivers following the groundwork laid in a recent
patch set [1] and continued in [2], [3]. The aim of the effort
is to consolidate irq coalescing parameter validation in the core.

This set converts 15 drivers in drivers/net/ethernet - remaining
Intel drivers, Freescale/NXP, and others.
2 more conversion sets to come.

[1] https://lore.kernel.org/netdev/20200305051542.991898-1-kuba@kernel.org/
[2] https://lore.kernel.org/netdev/20200306010602.1620354-1-kuba@kernel.org/
[3] https://lore.kernel.org/netdev/20200310021512.1861626-1-kuba@kernel.org/


====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c7449b75 e259b911
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1408,6 +1408,9 @@ static int be_set_priv_flags(struct net_device *netdev, u32 flags)
}

const struct ethtool_ops be_ethtool_ops = {
	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
				     ETHTOOL_COALESCE_USE_ADAPTIVE |
				     ETHTOOL_COALESCE_USECS_LOW_HIGH,
	.get_drvinfo = be_get_drvinfo,
	.get_wol = be_get_wol,
	.set_wol = be_set_wol,
+2 −4
Original line number Diff line number Diff line
@@ -525,7 +525,6 @@ static int dpaa_get_coalesce(struct net_device *dev,

	c->rx_coalesce_usecs = period;
	c->rx_max_coalesced_frames = thresh;
	c->use_adaptive_rx_coalesce = false;

	return 0;
}
@@ -540,9 +539,6 @@ static int dpaa_set_coalesce(struct net_device *dev,
	u8 thresh, prev_thresh;
	int cpu, res;

	if (c->use_adaptive_rx_coalesce)
		return -EINVAL;

	period = c->rx_coalesce_usecs;
	thresh = c->rx_max_coalesced_frames;

@@ -582,6 +578,8 @@ revert_values:
}

const struct ethtool_ops dpaa_ethtool_ops = {
	.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
				     ETHTOOL_COALESCE_RX_MAX_FRAMES,
	.get_drvinfo = dpaa_get_drvinfo,
	.get_msglevel = dpaa_get_msglevel,
	.set_msglevel = dpaa_set_msglevel,
+2 −0
Original line number Diff line number Diff line
@@ -2641,6 +2641,8 @@ fec_enet_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
}

static const struct ethtool_ops fec_enet_ethtool_ops = {
	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
				     ETHTOOL_COALESCE_MAX_FRAMES,
	.get_drvinfo		= fec_enet_get_drvinfo,
	.get_regs_len		= fec_enet_get_regs_len,
	.get_regs		= fec_enet_get_regs,
+2 −0
Original line number Diff line number Diff line
@@ -1474,6 +1474,8 @@ static int gfar_get_ts_info(struct net_device *dev,
}

const struct ethtool_ops gfar_ethtool_ops = {
	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
				     ETHTOOL_COALESCE_MAX_FRAMES,
	.get_drvinfo = gfar_gdrvinfo,
	.get_regs_len = gfar_reglen,
	.get_regs = gfar_get_regs,
+5 −0
Original line number Diff line number Diff line
@@ -1264,6 +1264,11 @@ static int hns_get_rxnfc(struct net_device *netdev,
}

static const struct ethtool_ops hns_ethtool_ops = {
	.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
				     ETHTOOL_COALESCE_MAX_FRAMES |
				     ETHTOOL_COALESCE_USE_ADAPTIVE |
				     ETHTOOL_COALESCE_USECS_LOW_HIGH |
				     ETHTOOL_COALESCE_MAX_FRAMES_LOW_HIGH,
	.get_drvinfo = hns_nic_get_drvinfo,
	.get_link  = hns_nic_get_link,
	.get_ringparam = hns_get_ringparam,
Loading