diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2013-06-11 12:51:39 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-07-15 21:46:51 (GMT) |
commit | 8a0e4e8ffa017b12819e26ca071b3bfb43c7cb10 (patch) | |
tree | 3ef87d5d814e19d6f385eae6aaaf957c1fbf3b3a /drivers/net/ethernet/freescale/dpa | |
parent | 56d258f01391fd25d2aa6f4535e55ea7cf4894bb (diff) | |
download | linux-fsl-qoriq-8a0e4e8ffa017b12819e26ca071b3bfb43c7cb10.tar.xz |
dpaa_eth: remove some references to shared and macless port types
Remove reference to shared and MACless port types from
functions dpa_fq_probe_mac() and dpaa_eth_sysfs_init().
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Change-Id: I3d2ab0f9d3ba01e0b39df43d9dc2cb036c8a7133
Reviewed-on: http://git.am.freescale.net:8181/3083
Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com>
Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.c | 22 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c | 16 |
2 files changed, 16 insertions, 22 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index 5c14860..abfd773 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -3181,7 +3181,8 @@ static struct dpa_fq *dpa_fq_alloc(struct device *dev, /* Probing of FQs for MACful ports */ static int dpa_fq_probe_mac(struct device *dev, struct list_head *list, - struct fm_port_fqs *port_fqs, bool is_shared, + struct fm_port_fqs *port_fqs, + bool tx_conf_fqs_per_core, enum port_type ptype) { const struct fqid_cell *fqids; @@ -3190,14 +3191,14 @@ static int dpa_fq_probe_mac(struct device *dev, struct list_head *list, int num_ranges; int i, lenp; - if (ptype == TX && !is_shared) { + if (ptype == TX && tx_conf_fqs_per_core) { /* Use per-core tx confirmation queues on private ports */ if (!dpa_fq_alloc(dev, tx_confirm_fqids, list, FQ_TYPE_TX_CONF_MQ)) goto fq_alloc_failed; #ifdef CONFIG_FSL_DPAA_TX_RECYCLE - /* per-core tx queues for recycleable frames (FManv3 only) */ + /* per-core Tx queues for recyclable frames (FManv3 only) */ if (!dpa_fq_alloc(dev, tx_recycle_fqids, list, FQ_TYPE_TX_RECYCLE)) goto fq_alloc_failed; @@ -3766,10 +3767,10 @@ dpaa_eth_priv_probe(struct platform_device *_of_dev) memset(&port_fqs, 0, sizeof(port_fqs)); - err = dpa_fq_probe_mac(dev, &priv->dpa_fq_list, &port_fqs, false, RX); + err = dpa_fq_probe_mac(dev, &priv->dpa_fq_list, &port_fqs, true, RX); if (!err) err = dpa_fq_probe_mac(dev, &priv->dpa_fq_list, - &port_fqs, false, TX); + &port_fqs, true, TX); if (err < 0) goto fq_probe_failed; @@ -3952,10 +3953,10 @@ dpaa_eth_shared_probe(struct platform_device *_of_dev) memset(&port_fqs, 0, sizeof(port_fqs)); err = dpa_fq_probe_mac(dev, &priv->dpa_fq_list, &port_fqs, - true, RX); + false, RX); if (!err) err = dpa_fq_probe_mac(dev, &priv->dpa_fq_list, - &port_fqs, true, TX); + &port_fqs, false, TX); if (err < 0) goto fq_probe_failed; @@ -4077,6 +4078,7 @@ dpaa_eth_macless_probe(struct platform_device *_of_dev) struct dpa_percpu_priv_s *percpu_priv; struct fm_port_fqs port_fqs; struct task_struct *kth; + static u8 macless_idx; dev = &_of_dev->dev; @@ -4173,6 +4175,8 @@ dpaa_eth_macless_probe(struct platform_device *_of_dev) if (err < 0) goto netdev_init_failed; + priv->macless_idx = macless_idx++; + dpaa_eth_sysfs_init(&net_dev->dev); return 0; @@ -4245,9 +4249,9 @@ dpaa_eth_proxy_probe(struct platform_device *_of_dev) memset(&port_fqs, 0, sizeof(port_fqs)); - err = dpa_fq_probe_mac(dev, &proxy_fq_list, &port_fqs, false, RX); + err = dpa_fq_probe_mac(dev, &proxy_fq_list, &port_fqs, true, RX); if (!err) - err = dpa_fq_probe_mac(dev, &proxy_fq_list, &port_fqs, false, + err = dpa_fq_probe_mac(dev, &proxy_fq_list, &port_fqs, true, TX); if (err < 0) return err; diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c index 05ae698..63d165c 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sysfs.c @@ -41,8 +41,6 @@ #include "dpaa_1588.h" #endif -static u8 macless_idx; - static ssize_t dpaa_eth_show_addr(struct device *dev, struct device_attribute *attr, char *buf) { @@ -231,23 +229,15 @@ static struct device_attribute dpaa_eth_attrs[] = { void dpaa_eth_sysfs_init(struct device *dev) { - struct dpa_priv_s *priv = netdev_priv(to_net_dev(dev)); int i; for (i = 0; i < ARRAY_SIZE(dpaa_eth_attrs); i++) if (device_create_file(dev, &dpaa_eth_attrs[i])) { dev_err(dev, "Error creating sysfs file\n"); - goto device_create_file_failed; + while (i > 0) + device_remove_file(dev, &dpaa_eth_attrs[--i]); + return; } - - if (!priv->mac_dev) - priv->macless_idx = macless_idx++; - - return; - -device_create_file_failed: - while (i > 0) - device_remove_file(dev, &dpaa_eth_attrs[--i]); } void dpaa_eth_sysfs_remove(struct device *dev) |