netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Nicholas Krause <xerofoify@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bcmsysport:Fix error handling in the function bcm_sysport_init_rx_ring
Date: Fri, 17 Jul 2015 10:08:13 -0700	[thread overview]
Message-ID: <55A9367D.6040001@gmail.com> (raw)
In-Reply-To: <1437135231-27511-1-git-send-email-xerofoify@gmail.com>

On 17/07/15 05:13, Nicholas Krause wrote:
> This fixes the error handling in the function bcm_sysport_init_rx_ringi
> after calling the function rdma_enable_set to make sure the return value 
> is equal to zero and if not print on the console failed to enable RDMA
> for the device and return the failed error code returned by
> rdma_enable_set.

Subject should be starting with "net: systemport: ", otherwise, this
looks good to me:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>

> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  drivers/net/ethernet/broadcom/bcmsysport.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
> index 4566cdf..27a7b36 100644
> --- a/drivers/net/ethernet/broadcom/bcmsysport.c
> +++ b/drivers/net/ethernet/broadcom/bcmsysport.c
> @@ -1365,7 +1365,12 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
>  	/* Initialize HW, ensure RDMA is disabled */
>  	reg = rdma_readl(priv, RDMA_STATUS);
>  	if (!(reg & RDMA_DISABLED))
> -		rdma_enable_set(priv, 0);
> +		ret = rdma_enable_set(priv, 0);
> +
> +	if (ret) {
> +		netif_err(priv, hw, priv->netdev, "failed to enable RDMA\n");
> +		return ret;
> +	}
>  
>  	rdma_writel(priv, 0, RDMA_WRITE_PTR_LO);
>  	rdma_writel(priv, 0, RDMA_WRITE_PTR_HI);
> 


-- 
Florian

           reply	other threads:[~2015-07-17 17:08 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1437135231-27511-1-git-send-email-xerofoify@gmail.com>]

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=55A9367D.6040001@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xerofoify@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 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).