summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-03-07 18:49:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-08 11:33:26 +0100
commitd80505569d30b1856e4e96deb23522bc8babd472 (patch)
tree21f86623395adfaf3cefeae45ace125f70911b5e /drivers/ata/ahci.c
parentd34aca4c09615870b694820dc21049bd1e77030e (diff)
downloadbarebox-d80505569d30b1856e4e96deb23522bc8babd472.tar.gz
barebox-d80505569d30b1856e4e96deb23522bc8babd472.tar.xz
ata: ahci: fix wrong link check
The following commit accidently bailed out if the link is up, not when it's down as stated in the commit message. | commit a3f74d928ce73f37eab5b398e018aaeb42fd2ba4 | Author: Rob Herring <rob.herring@calxeda.com> | Date: Mon Feb 11 18:02:00 2013 +0100 | | ahci: handle COMINIT received during spin-up | | Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes | the link to go down and we need to re-initialize the link. | | Signed-off-by: Rob Herring <rob.herring@calxeda.com> | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 4d5b52afe5..1712006a91 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -387,7 +387,7 @@ static int ahci_init_port(struct ahci_port *ahci_port)
ret = wait_on_timeout(WAIT_SPINUP,
((readl(port_mmio + PORT_TFDATA) &
(ATA_STATUS_BUSY | ATA_STATUS_DRQ)) == 0)
- || !((readl(port_mmio + PORT_SCR_STAT) & 0xf) == 1));
+ || ((readl(port_mmio + PORT_SCR_STAT) & 0xf) == 1));
if (ret) {
ahci_port_info(ahci_port, "timeout.\n");
ret = -ENODEV;