All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Nathan Hintz <nlhintz@hotmail.com>
Subject: Re: [PATCH] bgmac: fix "cmdcfg" calls for promisc and loopback modes
Date: Thu, 07 Feb 2013 15:55:08 +0100	[thread overview]
Message-ID: <5113C04C.60100@openwrt.org> (raw)
In-Reply-To: <1360232591-25789-1-git-send-email-zajec5@gmail.com>

Hello Rafal,

On 02/07/2013 11:23 AM, Rafał Miłecki wrote:
> This makes code match the specs.

And this probably deserves a better commit message too. Especially as 
you are inverting booleans, without the actual consumer of that boolean 
parameter being in the context of the patch.

Thanks!

>
> Reported-by: Nathan Hintz <nlhintz@hotmail.com>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>   drivers/net/ethernet/broadcom/bgmac.c |    8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
> index f90d1dc..8cf5e39 100644
> --- a/drivers/net/ethernet/broadcom/bgmac.c
> +++ b/drivers/net/ethernet/broadcom/bgmac.c
> @@ -776,9 +776,9 @@ static void bgmac_set_rx_mode(struct net_device *net_dev)
>   	struct bgmac *bgmac = netdev_priv(net_dev);
>
>   	if (net_dev->flags & IFF_PROMISC)
> -		bgmac_cmdcfg_maskset(bgmac, ~0, BGMAC_CMDCFG_PROM, false);
> +		bgmac_cmdcfg_maskset(bgmac, ~0, BGMAC_CMDCFG_PROM, true);
>   	else
> -		bgmac_cmdcfg_maskset(bgmac, ~BGMAC_CMDCFG_PROM, 0, false);
> +		bgmac_cmdcfg_maskset(bgmac, ~BGMAC_CMDCFG_PROM, 0, true);
>   }
>
>   #if 0 /* We don't use that regs yet */
> @@ -1039,9 +1039,9 @@ static void bgmac_chip_init(struct bgmac *bgmac, bool full_init)
>   	bgmac_write_mac_address(bgmac, bgmac->net_dev->dev_addr);
>
>   	if (bgmac->loopback)
> -		bgmac_cmdcfg_maskset(bgmac, ~0, BGMAC_CMDCFG_ML, true);
> +		bgmac_cmdcfg_maskset(bgmac, ~0, BGMAC_CMDCFG_ML, false);
>   	else
> -		bgmac_cmdcfg_maskset(bgmac, ~BGMAC_CMDCFG_ML, 0, true);
> +		bgmac_cmdcfg_maskset(bgmac, ~BGMAC_CMDCFG_ML, 0, false);
>
>   	bgmac_write(bgmac, BGMAC_RXMAX_LENGTH, 32 + ETHER_MAX_LEN);
>
>

  reply	other threads:[~2013-02-07 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 10:23 [PATCH] bgmac: fix "cmdcfg" calls for promisc and loopback modes Rafał Miłecki
2013-02-07 14:55 ` Florian Fainelli [this message]
2013-02-07 15:40 ` [PATCH V2] " Rafał Miłecki
2013-02-08 22:44   ` David Miller

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=5113C04C.60100@openwrt.org \
    --to=florian@openwrt.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nlhintz@hotmail.com \
    --cc=zajec5@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.