[U-Boot] [PATCH] sata: fix a bug in init_sata() for pci-sata card

Pengbo Li Pengbo.Li at freescale.com
Wed Nov 12 12:16:40 CET 2014


Except the first loop, init_sata() should return 0 instead of 1
in the others.

This patch fix the issue of the 2nd sata port not workable on pci-sata card.

Signed-off-by: Pengbo Li <Pengbo.Li at freescale.com>
---
 drivers/block/sata_sil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/sata_sil.c b/drivers/block/sata_sil.c
index 1f510cd..b483dbb 100644
--- a/drivers/block/sata_sil.c
+++ b/drivers/block/sata_sil.c
@@ -519,7 +519,7 @@ int init_sata(int dev)
 	u16 word;
 
 	if (init_done == 1 && dev < sata_info.maxport)
-		return 1;
+		return 0;
 
 	init_done = 1;
 
-- 
2.1.0.27.g96db324



More information about the U-Boot mailing list