Merge branch 'DPAA-Ethernet-fixes'
Madalin Bucur says: ==================== DPAA Ethernet fixes This patch set is addressing several issues in the DPAA Ethernet driver suite: - module unload crash caused by wrong reference to device being left in the cleanup code after the DSA related changes - scheduling wile atomic bug in QMan code revealed during dpaa_eth module unload - a couple of error counter fixes, a duplicated init in dpaa_eth. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
16c2e4db83
@ -2008,7 +2008,6 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,
|
||||
}
|
||||
|
||||
if (unlikely(err < 0)) {
|
||||
percpu_stats->tx_errors++;
|
||||
percpu_stats->tx_fifo_errors++;
|
||||
return err;
|
||||
}
|
||||
@ -2278,7 +2277,6 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
|
||||
vaddr = phys_to_virt(addr);
|
||||
prefetch(vaddr + qm_fd_get_offset(fd));
|
||||
|
||||
fd_format = qm_fd_get_format(fd);
|
||||
/* The only FD types that we may receive are contig and S/G */
|
||||
WARN_ON((fd_format != qm_fd_contig) && (fd_format != qm_fd_sg));
|
||||
|
||||
@ -2311,8 +2309,10 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
|
||||
|
||||
skb_len = skb->len;
|
||||
|
||||
if (unlikely(netif_receive_skb(skb) == NET_RX_DROP))
|
||||
if (unlikely(netif_receive_skb(skb) == NET_RX_DROP)) {
|
||||
percpu_stats->rx_dropped++;
|
||||
return qman_cb_dqrr_consume;
|
||||
}
|
||||
|
||||
percpu_stats->rx_packets++;
|
||||
percpu_stats->rx_bytes += skb_len;
|
||||
@ -2860,7 +2860,7 @@ static int dpaa_remove(struct platform_device *pdev)
|
||||
struct device *dev;
|
||||
int err;
|
||||
|
||||
dev = &pdev->dev;
|
||||
dev = pdev->dev.parent;
|
||||
net_dev = dev_get_drvdata(dev);
|
||||
|
||||
priv = netdev_priv(net_dev);
|
||||
|
@ -2443,39 +2443,21 @@ struct cgr_comp {
|
||||
struct completion completion;
|
||||
};
|
||||
|
||||
static int qman_delete_cgr_thread(void *p)
|
||||
static void qman_delete_cgr_smp_call(void *p)
|
||||
{
|
||||
struct cgr_comp *cgr_comp = (struct cgr_comp *)p;
|
||||
int ret;
|
||||
|
||||
ret = qman_delete_cgr(cgr_comp->cgr);
|
||||
complete(&cgr_comp->completion);
|
||||
|
||||
return ret;
|
||||
qman_delete_cgr((struct qman_cgr *)p);
|
||||
}
|
||||
|
||||
void qman_delete_cgr_safe(struct qman_cgr *cgr)
|
||||
{
|
||||
struct task_struct *thread;
|
||||
struct cgr_comp cgr_comp;
|
||||
|
||||
preempt_disable();
|
||||
if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id()) {
|
||||
init_completion(&cgr_comp.completion);
|
||||
cgr_comp.cgr = cgr;
|
||||
thread = kthread_create(qman_delete_cgr_thread, &cgr_comp,
|
||||
"cgr_del");
|
||||
|
||||
if (IS_ERR(thread))
|
||||
goto out;
|
||||
|
||||
kthread_bind(thread, qman_cgr_cpus[cgr->cgrid]);
|
||||
wake_up_process(thread);
|
||||
wait_for_completion(&cgr_comp.completion);
|
||||
smp_call_function_single(qman_cgr_cpus[cgr->cgrid],
|
||||
qman_delete_cgr_smp_call, cgr, true);
|
||||
preempt_enable();
|
||||
return;
|
||||
}
|
||||
out:
|
||||
|
||||
qman_delete_cgr(cgr);
|
||||
preempt_enable();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user