netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Green <andy.green@linaro.org>
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	patches@linaro.org, Francois Romieu <romieu@fr.zoreil.com>
Subject: Re: [net-next PATCH v3] net: ethernet driver: Fujitsu OGMA
Date: Sun, 15 Jun 2014 09:14:46 -0700	[thread overview]
Message-ID: <1402848886.2695.8.camel@joe-AO725> (raw)
In-Reply-To: <20140615042109.30580.8558.stgit@localhost.localdomain>

On Sun, 2014-06-15 at 12:21 +0800, Andy Green wrote:
> This driver adds support for "ogma", a Fujitsu Semiconductor Ltd IP Gigabit
> Ethernet + PHY IP used in a variety of their ARM-based ASICs.

trivia: (nothing to stop this, could be acted on later)

> diff --git a/drivers/net/ethernet/fujitsu/ogma/ogma.h b/drivers/net/ethernet/fujitsu/ogma/ogma.h
[]
> +struct ogma_gmac_mode {
> +	u32 half_duplex_flag:1;
> +	u32 flow_ctrl_enable_flag:1;
> +	u8 link_speed;
> +	u16 flow_start_th;
> +	u16 flow_stop_th;
> +	u16 pause_time;
> +};

These structures seem inefficiently packed.
Perhaps reordering members might make sense.

> +struct ogma_desc_ring {
> +	unsigned int id;
> +	bool running;
> +	u32 full:1;
> +	u8 len;

Maybe
	bool running;
	bool full;
	u8 len;

[]

> +int ogma_alloc_desc_ring(struct ogma_priv *priv, unsigned int id)
> +{
[]
> +	desc->ring_vaddr = dma_alloc_coherent(priv->dev, desc->len * DESC_NUM,
[]
> +	memset(desc->ring_vaddr, 0, desc->len * DESC_NUM);

There is a dma_zalloc_coherent

> +int ogma_get_rx_pkt_data(struct ogma_priv *priv,
> +			 struct ogma_rx_pkt_info *rxpi,
> +			 struct ogma_frag_info *frag, u16 *len,
> +			 struct sk_buff **skb)
> +{
[]
> +	if (alloc_rx_pkt_buf(priv, &info, &info.addr, &info.paddr, &tmp_skb)) {
> +		netif_err(priv, drv, priv->net_device,
> +			  "%s: alloc_rx_pkt_buf fail\n", __func__);

Likely none of these OOM messages are
useful/necessary.  A generic OOM message is
emitted by the kernel memory subsystem.

  reply	other threads:[~2014-06-15 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15  4:21 [net-next PATCH v3] net: ethernet driver: Fujitsu OGMA Andy Green
2014-06-15 16:14 ` Joe Perches [this message]
2014-06-17  4:41 ` Florian Fainelli

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=1402848886.2695.8.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=andy.green@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=romieu@fr.zoreil.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).