From: saeed bishara <saeed.bishara@gmail.com>
To: Rob Herring <robherring2@gmail.com>,
netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org
Cc: joe@perches.com
Subject: Re: [PATCH v2] net: add calxeda xgmac ethernet driver
Date: Mon, 31 Oct 2011 09:58:05 +0200 [thread overview]
Message-ID: <CAMAG_ecUe3UNYE4pUYA3_NNcK5znotBDvMPfb_BgHmx4ZmgcWQ@mail.gmail.com> (raw)
In-Reply-To: <1320010217-17322-1-git-send-email-robherring2@gmail.com>
On Sun, Oct 30, 2011 at 11:30 PM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
Hi Rob, one more comment
>
> +static void xgmac_tx_complete(struct xgmac_priv *priv)
> +{
> + void __iomem *ioaddr = priv->base;
> +
> +
> + writel(DMA_STATUS_TU | DMA_STATUS_NIS, ioaddr + XGMAC_DMA_STATUS);
> +
> + while (dma_ring_cnt(priv->tx_head, priv->tx_tail, DMA_TX_RING_SZ)) {
> + unsigned int entry = priv->tx_tail;
> + struct sk_buff *skb = priv->tx_skbuff[entry];
> + struct xgmac_dma_desc *p = priv->dma_tx + entry;
> +
> + /* Check if the descriptor is owned by the DMA. */
> + if (desc_get_owner(p))
> + break;
> +
> + /* Verify tx error by looking at the last segment */
> + if (desc_get_tx_ls(p))
> + desc_get_tx_status(priv, p);
> +
> + netdev_dbg(priv->dev, "tx ring: curr %d, dirty %d\n",
> + priv->tx_head, priv->tx_tail);
> +
> + dma_unmap_single(priv->device, desc_get_buf_addr(p),
> + desc_get_buf_len(p), DMA_TO_DEVICE);
I think you missed to do dma_unmap_page for the skp frags page.
saeed
prev parent reply other threads:[~2011-10-31 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-30 21:30 [PATCH v2] net: add calxeda xgmac ethernet driver Rob Herring
2011-10-31 7:58 ` saeed bishara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMAG_ecUe3UNYE4pUYA3_NNcK5znotBDvMPfb_BgHmx4ZmgcWQ@mail.gmail.com \
--to=saeed.bishara@gmail.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=robherring2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).