From: David Miller <davem@davemloft.net>
To: pgynther@google.com
Cc: netdev@vger.kernel.org, f.fainelli@gmail.com
Subject: Re: [PATCH net-next] net: bcmgenet: fix Tx ring priority programming
Date: Mon, 06 Oct 2014 23:59:26 -0400 (EDT) [thread overview]
Message-ID: <20141006.235926.30933585433924137.davem@davemloft.net> (raw)
In-Reply-To: <20141007005001.61C1D100BC1@puck.mtv.corp.google.com>
From: Petri Gynther <pgynther@google.com>
Date: Mon, 6 Oct 2014 17:50:01 -0700 (PDT)
> @@ -1731,11 +1744,12 @@ static void bcmgenet_init_multiq(struct net_device *dev)
> reg |= ring_cfg;
> bcmgenet_tdma_writel(priv, reg, DMA_RING_CFG);
>
> - /* Use configured rings priority and set ring #16 priority */
> - reg = bcmgenet_tdma_readl(priv, DMA_RING_PRIORITY);
> - reg |= ((GENET_Q0_PRIORITY + priv->hw_params->tx_queues) << 20);
> - reg |= dma_priority;
> - bcmgenet_tdma_writel(priv, reg, DMA_PRIORITY);
> + /* Set ring 16 priority and program the hardware registers */
> + dma_priority[2] |=
> + ((GENET_Q0_PRIORITY + priv->hw_params->tx_queues) << 20);
Please use "<< (16 - 12) * DMA_RING_BUF_PRIORITY_SHIFT" otherwise this
constant is magic.
You might, optionally, add macros for the subtraction adjustment each
priority register uses (0, 6, 12, respectively).
next prev parent reply other threads:[~2014-10-07 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 0:50 [PATCH net-next] net: bcmgenet: fix Tx ring priority programming Petri Gynther
2014-10-07 3:59 ` David Miller [this message]
2014-10-07 16:09 ` Petri Gynther
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=20141006.235926.30933585433924137.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pgynther@google.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).