mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
	netdev@vger.kernel.org, mugunthanvnm@ti.com,
	grygorii.strashko@ti.com
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dlide@ti.com
Subject: Re: [PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message
Date: Sat, 06 Aug 2016 13:24:41 -0700	[thread overview]
Message-ID: <1470515081.28648.20.camel@perches.com> (raw)
In-Reply-To: <1470480524-6851-13-git-send-email-ivan.khoronzhuk@linaro.org>

On Sat, 2016-08-06 at 13:48 +0300, Ivan Khoronzhuk wrote:
> While poll handlers there is no possibility to figure out
> which network device is handling packets, as cpdma channels
> are common for both network devices in dual_emac mode. Currently,
> the messages are printed only for one device, in fact, there is two.
> So, better to print integrated num_tx value for both devices if
> any of them is allowed to.
[]
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
[]
> @@ -378,6 +378,7 @@ struct cpsw_common {
>  	bool				rx_irq_disabled;
>  	bool				tx_irq_disabled;
>  	u32 irqs_table[IRQ_NUM];
> +	int				intr_dbg_msg;

Looks like this should be bool and should
be placed after tx_irq_disabled

[]

> @@ -1848,8 +1853,35 @@ static u32 cpsw_get_msglevel(struct net_device *ndev)
>  
>  static void cpsw_set_msglevel(struct net_device *ndev, u32 value)
>  {
> +	int i;
> +	struct cpsw_priv *sl_priv;
>  	struct cpsw_priv *priv = netdev_priv(ndev);
> +	struct cpsw_common *cpsw = priv->cpsw;
> +
>  	priv->msg_enable = value;
> +
> +	/* There is no possibility to at napi poll level
> +	 * to know which netdev is handled, so enable
> +	 * common dbg msg print if any interface is enabled to

to? too?

> +	 */
> +	cpsw->intr_dbg_msg = 0;
> +	if (!cpsw->data.dual_emac) {
> +		if (netif_msg_intr(priv))
> +			cpsw->intr_dbg_msg = 1;
> +		return;
> +	}
> +
> +	for (i = 0; i < cpsw->data.slaves; i++) {
> +		ndev = netdev_priv(cpsw->slaves[i].ndev);
> +		if (!ndev)
> +			continue;
> +
> +		sl_priv = netdev_priv(ndev);
> +		if (netif_msg_intr(sl_priv)) {
> +			cpsw->intr_dbg_msg = 1;
> +			break;
> +		}
> +	}
>  }
>  
>  static int cpsw_get_ts_info(struct net_device *ndev,

  reply	other threads:[~2016-08-06 20:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-06 10:48 [PATCH v2 00/14] net: ethernet: ti: cpsw: split driver data and per ndev data Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 01/14] net: ethernet: ti: cpsw: simplify submit routine Ivan Khoronzhuk
2016-08-09  8:09   ` Mugunthan V N
2016-08-09 11:27   ` Grygorii Strashko
2016-08-06 10:48 ` [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll Ivan Khoronzhuk
2016-08-09  8:13   ` Mugunthan V N
2016-08-09 11:29   ` Grygorii Strashko
2016-08-09 12:10     ` Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 03/14] net: ethernet: ti: cpsw: remove priv from cpsw_get_slave_port() parameters list Ivan Khoronzhuk
2016-08-09  8:14   ` Mugunthan V N
2016-08-09 11:31   ` Grygorii Strashko
2016-08-06 10:48 ` [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv Ivan Khoronzhuk
2016-08-09  8:15   ` Mugunthan V N
2016-08-09 11:31   ` Grygorii Strashko
2016-08-06 10:48 ` [PATCH v2 05/14] net: ethernet: ti: cpsw: don't check slave num in runtime Ivan Khoronzhuk
2016-08-09  8:16   ` Mugunthan V N
2016-08-09 11:34   ` Grygorii Strashko
2016-08-09 12:08     ` Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 06/14] net: ethernet: ti: cpsw: create common struct to hold shared driver data Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 07/14] net: ethernet: ti: cpsw: replace pdev on dev Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 08/14] net: ethernet: ti: cpsw: move links on h/w registers to cpsw_common Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 09/14] net: ethernet: ti: cpsw: move cpdma resources " Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 10/14] net; ethernet: ti: cpsw: move irq stuff under cpsw_common Ivan Khoronzhuk
2016-08-09 15:43   ` Grygorii Strashko
2016-08-06 10:48 ` [PATCH v2 11/14] net: ethernet: ti: cpsw: move data platform data and slaves info to cpsw_common Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message Ivan Khoronzhuk
2016-08-06 20:24   ` Joe Perches [this message]
2016-08-06 10:48 ` [PATCH v2 13/14] net: ethernet: ti: cpsw: move napi struct to cpsw_common Ivan Khoronzhuk
2016-08-06 10:48 ` [PATCH v2 14/14] net: ethernet: ti: cpsw: move ale, cpts and drivers params under cpsw_common Ivan Khoronzhuk
2016-08-09 15:45 ` [PATCH v2 00/14] net: ethernet: ti: cpsw: split driver data and per ndev data Grygorii Strashko

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=1470515081.28648.20.camel@perches.com \
    --to=joe@perches.com \
    --cc=dlide@ti.com \
    --cc=grygorii.strashko@ti.com \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.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

all inboxes | Powered by JetHome®