linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, axboe@suse.de,
	albertcc@tw.ibm.com, forrest.zhao@intel.com, efalk@google.com,
	linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 5/6] sata_sil24: use sata_phy_debounce() in sil24_hardreset()
Date: Fri, 12 May 2006 00:14:58 +0900	[thread overview]
Message-ID: <11473604983253-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11473604983883-git-send-email-htejun@gmail.com>

Do phy debouncing instead of unconditional wait after DEV_RST.

---

 drivers/scsi/sata_sil24.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

b8c4776dbd446dd2087689d23c1a6ca153abd293
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index 629679e..72219fa 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -591,7 +591,7 @@ static int sil24_hardreset(struct ata_po
 {
 	void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr;
 	const char *reason;
-	int tout_msec;
+	int tout_msec, rc;
 	u32 tmp;
 
 	/* sil24 does the right thing(tm) without any protection */
@@ -605,10 +605,15 @@ static int sil24_hardreset(struct ata_po
 	tmp = ata_wait_register(port + PORT_CTRL_STAT,
 				PORT_CS_DEV_RST, PORT_CS_DEV_RST, 10, tout_msec);
 
-	/* SStatus oscillates between zero and valid status for short
-	 * duration after DEV_RST, give it time to settle.
+	/* SStatus oscillates between zero and valid status after
+	 * DEV_RST, debounce it.
 	 */
-	msleep(100);
+	rc = sata_phy_debounce(ap, ATA_DEBOUNCE_INTERVAL,
+			       ATA_DEBOUNCE_DURATION, ATA_DEBOUNCE_TIMEOUT);
+	if (rc) {
+		reason = "PHY debouncing failed";
+		goto err;
+	}
 
 	if (tmp & PORT_CS_DEV_RST) {
 		if (ata_port_offline(ap))
-- 
1.2.4



  reply	other threads:[~2006-05-11 15:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-11 15:14 [PATCHSET 07/11] prep LLDDs for hotplug support, take 1 (REPOST) Tejun Heo
2006-05-11 15:14 ` Tejun Heo [this message]
2006-05-11 15:14 ` [PATCH 4/6] sata_sil24: rename PORT_PRB to PORT_LRAM and add PORT_LRAM_SLOT_SZ Tejun Heo
2006-05-11 15:14 ` [PATCH 3/6] sata_sil: new interrupt handler Tejun Heo
2006-05-11 15:40   ` Alan Cox
2006-05-11 16:16     ` Tejun Heo
2006-05-11 15:14 ` [PATCH 1/6] libata: export ata_hsm_move() Tejun Heo
2006-05-11 15:14 ` [PATCH 2/6] sata_sil: add new constants in preparation for new interrupt handler Tejun Heo
2006-05-11 15:14 ` [PATCH 6/6] sata_sil24: kill ops->tf_read() and use ata_std_noop_check_status() Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2006-05-19 15:38 [PATCHSET 02/03] prep LLDDs for hotplug support, take 2 Tejun Heo
2006-05-19 15:38 ` [PATCH 5/6] sata_sil24: use sata_phy_debounce() in sil24_hardreset() Tejun Heo
2006-05-19 15:47   ` Jeff Garzik
2006-05-11 15:11 [PATCHSET 07/11] prep LLDDs for hotplug support, take 1 Tejun Heo
2006-05-11 15:11 ` [PATCH 5/6] sata_sil24: use sata_phy_debounce() in sil24_hardreset() Tejun Heo

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=11473604983253-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=axboe@suse.de \
    --cc=efalk@google.com \
    --cc=forrest.zhao@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).