diff options
author | Razvan Stefanescu <razvan.stefanescu@nxp.com> | 2019-07-05 17:27:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-22 07:34:12 +0200 |
commit | b2fdbfa91b8c54c8884323b8914b0a7b81e67fc2 (patch) | |
tree | 87fca755c729f64dfe7443754538bafd72a47773 /drivers/staging/fsl-dpaa2 | |
parent | 543ba01d99cc6b4007c1f9a475c1d572c46a5543 (diff) | |
download | linux-b2fdbfa91b8c54c8884323b8914b0a7b81e67fc2.tar.gz linux-b2fdbfa91b8c54c8884323b8914b0a7b81e67fc2.tar.bz2 linux-b2fdbfa91b8c54c8884323b8914b0a7b81e67fc2.zip |
staging: fsl-dpaa2/ethsw: Add network interface statistics
Allocate MC portal with atomic context for I/O and enable network interface
statistics for hardware counters.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/1562336836-17119-3-git-send-email-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-dpaa2')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index 87470070c3a5..b2273f840813 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -521,6 +521,7 @@ static const struct net_device_ops ethsw_port_ops = { .ndo_stop = port_stop, .ndo_set_mac_address = eth_mac_addr, + .ndo_get_stats64 = port_get_stats, .ndo_change_mtu = port_change_mtu, .ndo_has_offload_stats = port_has_offload_stats, .ndo_get_offload_stats = port_get_offload_stats, @@ -1483,7 +1484,8 @@ static int ethsw_probe(struct fsl_mc_device *sw_dev) ethsw->dev = dev; dev_set_drvdata(dev, ethsw); - err = fsl_mc_portal_allocate(sw_dev, 0, ðsw->mc_io); + err = fsl_mc_portal_allocate(sw_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, + ðsw->mc_io); if (err) { if (err == -ENXIO) err = -EPROBE_DEFER; |