diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2013-07-30 12:21:56 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-07-31 21:50:09 (GMT) |
commit | 83821dd80bccd017570355049612050c98285d0b (patch) | |
tree | 6377d21c399b73b75fb1b5e9b680e0ee997efe45 /drivers/net/ethernet | |
parent | 5548c02ece5c03a42aa2571848c61060401c2826 (diff) | |
download | linux-fsl-qoriq-83821dd80bccd017570355049612050c98285d0b.tar.xz |
dpaa_eth: minor change in dpaa_eth_napi_schedule()
Moved counter increment in inline function.
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Change-Id: Iee1981c67f0b3daed65276cd3a3addf74c91e264
Reviewed-on: http://git.am.freescale.net:8181/3658
Reviewed-by: Hamciuc Bogdan-BHAMCIU1 <bogdan.hamciuc@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')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.c | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.h | 1 |
2 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index 845d392..01954f5 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -340,10 +340,8 @@ priv_rx_error_dqrr(struct qman_portal *portal, percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); - if (dpaa_eth_napi_schedule(percpu_priv)) { - percpu_priv->in_interrupt++; + if (dpaa_eth_napi_schedule(percpu_priv)) return qman_cb_dqrr_stop; - } if (unlikely(dpaa_eth_refill_bpools(percpu_priv))) /* Unable to refill the buffer pool due to insufficient @@ -376,10 +374,8 @@ priv_rx_default_dqrr(struct qman_portal *portal, /* IRQ handler, non-migratable; safe to use __this_cpu_ptr here */ percpu_priv = __this_cpu_ptr(priv->percpu_priv); - if (unlikely(dpaa_eth_napi_schedule(percpu_priv))) { - percpu_priv->in_interrupt++; + if (unlikely(dpaa_eth_napi_schedule(percpu_priv))) return qman_cb_dqrr_stop; - } /* Vale of plenty: make sure we didn't run out of buffers */ @@ -409,10 +405,8 @@ priv_tx_conf_error_dqrr(struct qman_portal *portal, percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); - if (dpaa_eth_napi_schedule(percpu_priv)) { - percpu_priv->in_interrupt++; + if (dpaa_eth_napi_schedule(percpu_priv)) return qman_cb_dqrr_stop; - } _dpa_tx_error(net_dev, priv, percpu_priv, &dq->fd, fq->fqid); @@ -437,10 +431,8 @@ priv_tx_conf_default_dqrr(struct qman_portal *portal, /* Non-migratable context, safe to use __this_cpu_ptr */ percpu_priv = __this_cpu_ptr(priv->percpu_priv); - if (dpaa_eth_napi_schedule(percpu_priv)) { - percpu_priv->in_interrupt++; + if (dpaa_eth_napi_schedule(percpu_priv)) return qman_cb_dqrr_stop; - } _dpa_tx_conf(net_dev, priv, percpu_priv, &dq->fd, fq->fqid); diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h index 987c3b9..fed4109 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h @@ -521,6 +521,7 @@ static inline int dpaa_eth_napi_schedule(struct dpa_percpu_priv_s *percpu_priv) int ret = qman_irqsource_remove(QM_PIRQ_DQRI); if (likely(!ret)) { napi_schedule(&percpu_priv->napi); + percpu_priv->in_interrupt++; return 1; } } |