[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57A24D62.5080207@codeaurora.org>
Date: Wed, 3 Aug 2016 15:00:34 -0500
From: Timur Tabi <timur@...eaurora.org>
To: Lino Sanfilippo <LinoSanfilippo@....de>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
sdharia@...eaurora.org, shankerd@...eaurora.org,
vikrams@...eaurora.org, cov@...eaurora.org, gavidov@...eaurora.org,
robh+dt@...nel.org, andrew@...n.ch, bjorn.andersson@...aro.org,
mlangsdo@...hat.com, jcm@...hat.com, agross@...eaurora.org,
davem@...emloft.net, f.fainelli@...il.com
Subject: Re: [PATCH] [v6] net: emac: emac gigabit ethernet controller driver
Timur Tabi wrote:
>
> Is there a good way to test my code? ping and iperf appear to send no
> more than 3 packets at a time, which comes nowhere close to filling the
> queue (which holds 512 normally). netif_queue_stopped() never returns
> true, no matter what I do.
Never mind, I fixed this problem. I had a race condition between
/* update produce idx */
prod_idx = (tx_q->tpd.produce_idx << tx_q->produce_shift) &
tx_q->produce_mask;
emac_reg_update32(adpt->base + tx_q->produce_reg,
tx_q->produce_mask, prod_idx);
and the call to netif_stop_queue(). The emac_reg_update32() signalled
to the hardware that data is available, and it immediately called the
ISR, before I had a chance to call netif_stop_queue(). So now I call
emac_reg_update32() after netif_stop_queue(), and everything works.
I'll post a v7 soon.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
Powered by blists - more mailing lists