mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/5] ata: ahci: fix wrong link check
Date: Fri,  8 Mar 2013 11:35:47 +0100	[thread overview]
Message-ID: <1362738951-25614-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1362738951-25614-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 drivers/ata/ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 4d5b52a..1712006 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;
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-08 10:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 10:35 [PATCH] ata/ahci work Sascha Hauer
2013-03-08 10:35 ` Sascha Hauer [this message]
2013-03-08 10:35 ` [PATCH 2/5] ata: add ata logical device to defer probe Sascha Hauer
2013-03-08 10:35 ` [PATCH 3/5] ata: Add init callback to ata_port_operations Sascha Hauer
2013-03-08 10:35 ` [PATCH 4/5] ata: ahci: implement init callback Sascha Hauer
2013-03-08 10:35 ` [PATCH 5/5] ata: ahci: refactor init functions Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362738951-25614-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox