netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] bcmsysport:Fix error handling in the function bcm_sysport_init_rx_ring
       [not found] <1437135231-27511-1-git-send-email-xerofoify@gmail.com>
@ 2015-07-17 17:08 ` Florian Fainelli
  0 siblings, 0 replies; only message in thread
From: Florian Fainelli @ 2015-07-17 17:08 UTC (permalink / raw)
  To: Nicholas Krause; +Cc: netdev, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-17 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1437135231-27511-1-git-send-email-xerofoify@gmail.com>
2015-07-17 17:08 ` [PATCH] bcmsysport:Fix error handling in the function bcm_sysport_init_rx_ring Florian Fainelli

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).