sata: fix a bug in init_sata() for pci-sata card
authorli pengbo <Pengbo.Li@freescale.com>
Wed, 12 Nov 2014 11:16:40 +0000 (19:16 +0800)
committerTom Rini <trini@ti.com>
Sun, 23 Nov 2014 11:49:01 +0000 (06:49 -0500)
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@freescale.com>
drivers/block/sata_sil.c

index 1f510cd265c0b42657fc74b28253965bea1c3de0..b483dbb5d188888fdbacda243b2d1f78f10a5a0c 100644 (file)
@@ -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;