diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:44 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:44 -0400 |
commit | 838df6284c54447efae956fb9c243d8ba4ab0f47 (patch) | |
tree | 1bba23b1bf77f80facfc5c6046f357e237176d48 | |
parent | ce5f7f3d0cab82d6c16fcb64def8bfc0a3a85dd6 (diff) |
[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>
-rw-r--r-- | drivers/scsi/libata-core.c | 9 |
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) | |||
2370 | if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) { | 2370 | if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) { |
2371 | u32 spd; | 2371 | u32 spd; |
2372 | 2372 | ||
2373 | /* set cable type and resume link */ | 2373 | /* resume link */ |
2374 | ap->cbl = ATA_CBL_SATA; | ||
2375 | sata_phy_resume(ap); | 2374 | sata_phy_resume(ap); |
2376 | 2375 | ||
2377 | /* init sata_spd_limit to the current value */ | 2376 | /* 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, | |||
4586 | ap->udma_mask = ent->udma_mask; | 4585 | ap->udma_mask = ent->udma_mask; |
4587 | ap->flags |= ent->host_flags; | 4586 | ap->flags |= ent->host_flags; |
4588 | ap->ops = ent->port_ops; | 4587 | ap->ops = ent->port_ops; |
4589 | ap->cbl = ATA_CBL_NONE; | ||
4590 | ap->sata_spd_limit = UINT_MAX; | 4588 | ap->sata_spd_limit = UINT_MAX; |
4591 | ap->active_tag = ATA_TAG_POISON; | 4589 | ap->active_tag = ATA_TAG_POISON; |
4592 | ap->last_ctl = 0xFF; | 4590 | ap->last_ctl = 0xFF; |
@@ -4594,6 +4592,11 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, | |||
4594 | INIT_WORK(&ap->port_task, NULL, NULL); | 4592 | INIT_WORK(&ap->port_task, NULL, NULL); |
4595 | INIT_LIST_HEAD(&ap->eh_done_q); | 4593 | INIT_LIST_HEAD(&ap->eh_done_q); |
4596 | 4594 | ||
4595 | /* set cable type */ | ||
4596 | ap->cbl = ATA_CBL_NONE; | ||
4597 | if (ap->flags & ATA_FLAG_SATA) | ||
4598 | ap->cbl = ATA_CBL_SATA; | ||
4599 | |||
4597 | for (i = 0; i < ATA_MAX_DEVICES; i++) { | 4600 | for (i = 0; i < ATA_MAX_DEVICES; i++) { |
4598 | struct ata_device *dev = &ap->device[i]; | 4601 | struct ata_device *dev = &ap->device[i]; |
4599 | dev->devno = i; | 4602 | dev->devno = i; |