summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorMarian Rotariu <marian.rotariu@freescale.com>2013-09-19 08:10:54 (GMT)
committerRivera Jose-B46482 <German.Rivera@freescale.com>2013-09-20 19:40:16 (GMT)
commitd5b9d98f42057d8f6a23b5f7a822add04fc33f89 (patch)
treeb954c2a17076134d7e3f8be306af58d6f06875da /drivers/net/ethernet
parent85badb75e0c504b5b9b8c575b69cd4a6eb42fe4c (diff)
downloadlinux-fsl-qoriq-d5b9d98f42057d8f6a23b5f7a822add04fc33f89.tar.xz
dpaa_eth: Show all created buffers in sysfs
The current sysfs code shows only the default buffer pool. With this patch, sysfs code will show all created buffer pools, including the default one. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: Ia3ff0e72f2806f7a0d7e94a520b12829af8a6a23 Reviewed-on: http://git.am.freescale.net:8181/4847 Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c
index 9e293da..16071b3 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c
@@ -1,4 +1,3 @@
-
/*
* Copyright 2008-2012 Freescale Semiconductor Inc.
*
@@ -145,17 +144,17 @@ static ssize_t dpaa_eth_show_fqids(struct device *dev,
return bytes;
}
-static ssize_t dpaa_eth_show_dflt_bpid(struct device *dev,
+static ssize_t dpaa_eth_show_bpids(struct device *dev,
struct device_attribute *attr, char *buf)
{
ssize_t bytes = 0;
struct dpa_priv_s *priv = netdev_priv(to_net_dev(dev));
struct dpa_bp *dpa_bp = priv->dpa_bp;
+ int i = 0;
- if (priv->bp_count != 1)
- bytes += snprintf(buf, PAGE_SIZE, "-1\n");
- else
- bytes += snprintf(buf, PAGE_SIZE, "%u\n", dpa_bp->bpid);
+ for (i = 0; i < priv->bp_count; i++)
+ bytes += snprintf(buf + bytes, PAGE_SIZE, "%u\n",
+ dpa_bp[i].bpid);
return bytes;
}
@@ -218,7 +217,7 @@ static struct device_attribute dpaa_eth_attrs[] = {
__ATTR(device_addr, S_IRUGO, dpaa_eth_show_addr, NULL),
__ATTR(device_type, S_IRUGO, dpaa_eth_show_type, NULL),
__ATTR(fqids, S_IRUGO, dpaa_eth_show_fqids, NULL),
- __ATTR(dflt_bpid, S_IRUGO, dpaa_eth_show_dflt_bpid, NULL),
+ __ATTR(bpids, S_IRUGO, dpaa_eth_show_bpids, NULL),
__ATTR(mac_regs, S_IRUGO, dpaa_eth_show_mac_regs, NULL),
#ifdef CONFIG_FSL_DPAA_1588
__ATTR(ptp_1588, S_IRUGO | S_IWUSR, dpaa_eth_show_ptp_1588,