浏览代码

net: ravb: Do not shut down clock in start callback

Do not stop the clock in the start callback in case of failure, keep
them running to also keep the PHY running. The failure could be ie.
PHY failing to negotiate link and if the clock get shut down, another
attempt at bringing the link up would fail. The clock right now are
started in probe function and stopped in remove function, which is
the correct behavior.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Marek Vasut 7 年之前
父节点
当前提交
c4a8d9ca04
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      drivers/net/ravb.c

+ 2 - 6
drivers/net/ravb.c

@@ -437,7 +437,7 @@ static int ravb_start(struct udevice *dev)
 
 
 	ret = ravb_reset(dev);
 	ret = ravb_reset(dev);
 	if (ret)
 	if (ret)
-		goto err;
+		return ret;
 
 
 	ravb_base_desc_init(eth);
 	ravb_base_desc_init(eth);
 	ravb_tx_desc_init(eth);
 	ravb_tx_desc_init(eth);
@@ -445,16 +445,12 @@ static int ravb_start(struct udevice *dev)
 
 
 	ret = ravb_config(dev);
 	ret = ravb_config(dev);
 	if (ret)
 	if (ret)
-		goto err;
+		return ret;
 
 
 	/* Setting the control will start the AVB-DMAC process. */
 	/* Setting the control will start the AVB-DMAC process. */
 	writel(CCC_OPC_OPERATION, eth->iobase + RAVB_REG_CCC);
 	writel(CCC_OPC_OPERATION, eth->iobase + RAVB_REG_CCC);
 
 
 	return 0;
 	return 0;
-
-err:
-	clk_disable(&eth->clk);
-	return ret;
 }
 }
 
 
 static void ravb_stop(struct udevice *dev)
 static void ravb_stop(struct udevice *dev)