summaryrefslogtreecommitdiff
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-15 20:57:44 +0900
committerTejun Heo <htejun@gmail.com>2006-05-15 20:57:44 +0900
commit838df6284c54447efae956fb9c243d8ba4ab0f47 (patch)
tree1bba23b1bf77f80facfc5c6046f357e237176d48 /drivers/scsi/libata-core.c
parentce5f7f3d0cab82d6c16fcb64def8bfc0a3a85dd6 (diff)
downloadlwn-838df6284c54447efae956fb9c243d8ba4ab0f47.tar.gz
lwn-838df6284c54447efae956fb9c243d8ba4ab0f47.zip
[PATCH] libata: init ap->cbl to ATA_CBL_SATA early
Init ap->cbl to ATA_CBL_SATA in ata_host_init(). This is necessary for soon-to-follow SCR handling function changes. LLDDs are free to change ap->cbl during probing. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 51cb9ca5519c..f29d43cb6991 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2370,8 +2370,7 @@ void ata_std_probeinit(struct ata_port *ap)
if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) {
u32 spd;
- /* set cable type and resume link */
- ap->cbl = ATA_CBL_SATA;
+ /* resume link */
sata_phy_resume(ap);
/* init sata_spd_limit to the current value */
@@ -4586,7 +4585,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
ap->udma_mask = ent->udma_mask;
ap->flags |= ent->host_flags;
ap->ops = ent->port_ops;
- ap->cbl = ATA_CBL_NONE;
ap->sata_spd_limit = UINT_MAX;
ap->active_tag = ATA_TAG_POISON;
ap->last_ctl = 0xFF;
@@ -4594,6 +4592,11 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
INIT_WORK(&ap->port_task, NULL, NULL);
INIT_LIST_HEAD(&ap->eh_done_q);
+ /* set cable type */
+ ap->cbl = ATA_CBL_NONE;
+ if (ap->flags & ATA_FLAG_SATA)
+ ap->cbl = ATA_CBL_SATA;
+
for (i = 0; i < ATA_MAX_DEVICES; i++) {
struct ata_device *dev = &ap->device[i];
dev->devno = i;