From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, axboe@suse.de,
albertcc@tw.ibm.com, lkosewsk@gmail.com,
linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 1/3] libata: set default cbl in probeinit
Date: Tue, 11 Apr 2006 22:16:44 +0900 [thread overview]
Message-ID: <11447614043099-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11447614041095-git-send-email-htejun@gmail.com>
Make setting CBL type responsibility of probeinit. This allows using
only ap->cbl == ATA_CBL_SATA test in all other parts. Without this,
ata_down_sata_spd_limit() doesn't work during probe reset.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/scsi/libata-core.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
8e8d8e326ca269f1cf38c6cf715a71a98e773600
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 3387fe3..8d3fed4 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2369,12 +2369,16 @@ void ata_std_probeinit(struct ata_port *
if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) {
u32 spd;
+ /* set cable type and resume link */
+ ap->cbl = ATA_CBL_SATA;
sata_phy_resume(ap);
+ /* init sata_spd_limit to the current value */
spd = (scr_read(ap, SCR_CONTROL) & 0xf0) >> 4;
if (spd)
ap->sata_spd_limit &= (1 << spd) - 1;
+ /* wait for device */
if (sata_dev_present(ap))
ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT);
}
@@ -2531,10 +2535,6 @@ void ata_std_postreset(struct ata_port *
{
DPRINTK("ENTER\n");
- /* set cable type if it isn't already set */
- if (ap->cbl == ATA_CBL_NONE && ap->flags & ATA_FLAG_SATA)
- ap->cbl = ATA_CBL_SATA;
-
/* print link status */
if (ap->cbl == ATA_CBL_SATA)
sata_print_link_status(ap);
@@ -2584,7 +2584,7 @@ int ata_std_probe_reset(struct ata_port
ata_reset_fn_t hardreset;
hardreset = NULL;
- if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read)
+ if (ap->cbl == ATA_CBL_SATA && ap->ops->scr_read)
hardreset = sata_std_hardreset;
return ata_drive_probe_reset(ap, ata_std_probeinit,
--
1.2.4
next prev parent reply other threads:[~2006-04-11 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-11 13:16 [PATCHSET] misc reset updates (repost) Tejun Heo
2006-04-11 13:16 ` Tejun Heo [this message]
2006-04-11 16:40 ` [PATCH 1/3] libata: set default cbl in probeinit Jeff Garzik
2006-04-11 13:16 ` [PATCH 2/3] libata: kill @verbose from ata_reset_fn_t Tejun Heo
2006-04-11 13:16 ` [PATCH 3/3] libata: make reset methods complain when they fail Tejun Heo
2006-04-11 13:19 ` [PATCHSET 1/9] this is the first patchset 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=11447614043099-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=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=lkosewsk@gmail.com \
/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).