bcmsysport:Fix error handling in the function bcm_sysport_init_rx_ring
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Nicholas Krause
This fixes the error handling in the function
bcm_sysport_init_rx_ringiafter calling the functionrdma_enable_setto 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 byrdma_enable_set.
Subject should be starting with "net: systemport: ", otherwise, this looks good to me:
Reviewed-by Florian Fainelli <[email protected]>
Tested-by Florian Fainelli <[email protected]>
Quoted 25 lines
Signed-off-by Nicholas Krause <[email protected]>--- drivers/net/ethernet/broadcom/bcmsysport.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/net/ethernet/broadcom/bcmsysport.c +6
-1@@ -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 );
Signature · 1 line
Florian