diff options
author | Madalin Bucur <madalin.bucur@nxp.com> | 2019-05-27 15:24:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-28 11:19:55 -0700 |
commit | 7aae703f8096d21e34ce5f34f16715587bc30902 (patch) | |
tree | 57450c747a85ea74bac6a8362304325c049b034a /drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | |
parent | net: mvneta: Fix err code path of probe (diff) | |
download | linux-dev-7aae703f8096d21e34ce5f34f16715587bc30902.tar.xz linux-dev-7aae703f8096d21e34ce5f34f16715587bc30902.zip |
dpaa_eth: use only online CPU portals
Make sure only the portals for the online CPUs are used.
Without this change, there are issues when someone boots with
maxcpus=n, with n < actual number of cores available as frames
either received or corresponding to the transmit confirmation
path would be offered for dequeue to the offline CPU portals,
getting lost.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c index bdee441bc3b7..7ce2e99b594d 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c @@ -569,7 +569,7 @@ static int dpaa_set_coalesce(struct net_device *dev, qman_dqrr_get_ithresh(portal, &prev_thresh); /* set new values */ - for_each_cpu(cpu, cpus) { + for_each_cpu_and(cpu, cpus, cpu_online_mask) { portal = qman_get_affine_portal(cpu); res = qman_portal_set_iperiod(portal, period); if (res) @@ -586,7 +586,7 @@ static int dpaa_set_coalesce(struct net_device *dev, revert_values: /* restore previous values */ - for_each_cpu(cpu, cpus) { + for_each_cpu_and(cpu, cpus, cpu_online_mask) { if (!needs_revert[cpu]) continue; portal = qman_get_affine_portal(cpu); |