From: Stephen Hemminger <shemminger@vyatta.com>
To: Kristoffer Glembo <kristoffer@gaisler.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
Kristoffer Glembo <kristoffer@gaisler.com>
Subject: Re: [PATCH 1/1 V4] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
Date: Mon, 25 Jan 2010 08:33:22 -0800 [thread overview]
Message-ID: <20100125083322.2100eab1@nehalam> (raw)
In-Reply-To: <1264417272-3800-2-git-send-email-kristoffer@gaisler.com>
On Mon, 25 Jan 2010 12:01:12 +0100
Kristoffer Glembo <kristoffer@gaisler.com> wrote:
> +static int greth_start_xmit(struct sk_buff *skb, struct net_device *dev)
> +{
> + struct greth_private *greth = netdev_priv(dev);
> + struct greth_bd *bdp;
> + int err = NETDEV_TX_OK;
> + u32 status, dma_addr;
> +
> + bdp = greth->tx_bd_base + greth->tx_next;
> +
> + if (unlikely(greth->tx_free <= 0)) {
> + netif_stop_queue(dev);
> + err = NETDEV_TX_BUSY;
> + goto out;
> + }
...
> +
> +out:
> + dev_kfree_skb(skb);
> + return err;
> +}
> +
Wrong, if device is busy; then skb must NOT be freed.
--
next prev parent reply other threads:[~2010-01-25 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 11:01 [PATCH 0/1 V4] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver Kristoffer Glembo
2010-01-25 11:01 ` [PATCH 1/1 " Kristoffer Glembo
2010-01-25 16:31 ` Stephen Hemminger
2010-01-27 11:01 ` Kristoffer Glembo
2010-01-25 16:33 ` Stephen Hemminger [this message]
2010-01-25 16:36 ` Stephen Hemminger
2010-01-25 16:37 ` Stephen Hemminger
2010-01-25 16:39 ` Stephen Hemminger
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=20100125083322.2100eab1@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=kristoffer@gaisler.com \
--cc=netdev@vger.kernel.org \
/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).