aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-15 07:57:47 -0400
committerTejun Heo <htejun@gmail.com>2006-05-15 07:57:47 -0400
commit81952c5497b40ae56835bd0d6537f8c6bdea07e7 (patch)
treefa2db695c56e481c271c7249197ad3b4a98b6087 /drivers/scsi/ahci.c
parent34bf21704c848fe00c516d1c8f163db08b70b137 (diff)
[PATCH] libata: use new SCR and on/offline functions
Use new SCR and on/offline functions. Note that for LLDD which know it implements SCR callbacks, SCR functions are guaranteed to succeed and ata_port_online() == !ata_port_offline(). Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index c33255404ee5..c2298fb131d8 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -567,7 +567,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class)
567 567
568 DPRINTK("ENTER\n"); 568 DPRINTK("ENTER\n");
569 569
570 if (!sata_dev_present(ap)) { 570 if (ata_port_offline(ap)) {
571 DPRINTK("PHY reports no device\n"); 571 DPRINTK("PHY reports no device\n");
572 *class = ATA_DEV_NONE; 572 *class = ATA_DEV_NONE;
573 return 0; 573 return 0;
@@ -640,7 +640,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class)
640 msleep(150); 640 msleep(150);
641 641
642 *class = ATA_DEV_NONE; 642 *class = ATA_DEV_NONE;
643 if (sata_dev_present(ap)) { 643 if (ata_port_online(ap)) {
644 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { 644 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
645 rc = -EIO; 645 rc = -EIO;
646 reason = "device not ready"; 646 reason = "device not ready";
@@ -670,7 +670,7 @@ static int ahci_hardreset(struct ata_port *ap, unsigned int *class)
670 rc = sata_std_hardreset(ap, class); 670 rc = sata_std_hardreset(ap, class);
671 ahci_start_engine(ap); 671 ahci_start_engine(ap);
672 672
673 if (rc == 0 && sata_dev_present(ap)) 673 if (rc == 0 && ata_port_online(ap))
674 *class = ahci_dev_classify(ap); 674 *class = ahci_dev_classify(ap);
675 if (*class == ATA_DEV_UNKNOWN) 675 if (*class == ATA_DEV_UNKNOWN)
676 *class = ATA_DEV_NONE; 676 *class = ATA_DEV_NONE;