All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Vince Bridgers <vbridger@opensource.altera.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <vbridger@altera.com>
Subject: Re: [PATCH net] stmmac: correct mc_filter local variable in set_filter and set_mac_addr call
Date: Fri, 10 Oct 2014 07:47:37 +0200	[thread overview]
Message-ID: <543772F9.1010304@st.com> (raw)
In-Reply-To: <1412867436-22153-1-git-send-email-vbridger@opensource.altera.com>

On 10/9/2014 5:10 PM, Vince Bridgers wrote:
> Testing revealed that the local variable mc_filter was dimensioned
> incorrectly for all possible configurations and get_mac_addr should
> have been set_mac_addr (a typo). Make sure mc_filter is dimensioned
> to 8 32-bit unsigned longs - the largest size of the Synopsys
> multicast filter register set.
>
> Signed-off-by: Vince Bridgers <vbridger@opensource.altera.com>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>   drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
> index 5efe60e..0adcf73 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
> @@ -134,7 +134,7 @@ static void dwmac1000_set_filter(struct mac_device_info *hw,
>   	void __iomem *ioaddr = (void __iomem *)dev->base_addr;
>   	unsigned int value = 0;
>   	unsigned int perfect_addr_number = hw->unicast_filter_entries;
> -	u32 mc_filter[2];
> +	u32 mc_filter[8];
>   	int mcbitslog2 = hw->mcast_bits_log2;
>
>   	pr_debug("%s: # mcasts %d, # unicast %d\n", __func__,
> @@ -182,7 +182,7 @@ static void dwmac1000_set_filter(struct mac_device_info *hw,
>   		struct netdev_hw_addr *ha;
>
>   		netdev_for_each_uc_addr(ha, dev) {
> -			stmmac_get_mac_addr(ioaddr, ha->addr,
> +			stmmac_set_mac_addr(ioaddr, ha->addr,
>   					    GMAC_ADDR_HIGH(reg),
>   					    GMAC_ADDR_LOW(reg));
>   			reg++;
>


  reply	other threads:[~2014-10-10  5:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 15:10 [PATCH net] stmmac: correct mc_filter local variable in set_filter and set_mac_addr call Vince Bridgers
2014-10-10  5:47 ` Giuseppe CAVALLARO [this message]
2014-10-10 18:48 ` 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=543772F9.1010304@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vbridger@altera.com \
    --cc=vbridger@opensource.altera.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.