[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1399812569.11946.131.camel@deadeye.wl.decadent.org.uk>
Date: Sun, 11 May 2014 13:49:29 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Neil Horman <nhorman@...driver.com>
Cc: netdev@...r.kernel.org, Guo-Fu Tseng <cooldavid@...ldavid.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] jme: Fix DMA unmap warning
On Mon, 2014-05-05 at 14:51 -0400, Neil Horman wrote:
[...]
> -static void
> +static void jme_drop_tx_map(struct jme_adapter *jme, int startidx, int endidx)
> +{
> + struct jme_ring *txring = &(jme->txring[0]);
> + struct jme_buffer_info *txbi = txring->bufinf, *ctxbi;
> + int mask = jme->tx_ring_mask;
> + int j;
> +
> + for (j = startidx ; j < endidx ; ++j) {
> + ctxbi = txbi + ((startidx + j + 2) & (mask));
So you're starting at startidx * 2 + 2, that can't be right.
[...]
> @@ -2228,7 +2268,8 @@ jme_start_xmit(struct sk_buff *skb, struct net_device *netdev)
> return NETDEV_TX_BUSY;
> }
>
> - jme_fill_tx_desc(jme, skb, idx);
> + if (jme_fill_tx_desc(jme, skb, idx))
> + return NETDEV_TX_BUSY;
NETDEV_TX_OK
Ben.
> jwrite32(jme, JME_TXCS, jme->reg_txcs |
> TXCS_SELECT_QUEUE0 |
--
Ben Hutchings
Sturgeon's Law: Ninety percent of everything is crap.
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists