aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-31 05:28:24 -0400
committerTejun Heo <htejun@gmail.com>2006-05-31 05:28:24 -0400
commitd87fa38e70853a9607dc34a02d15cf5f149f49f2 (patch)
tree6afc6f8b9ff9c2c441efd61829d5d6fa6eb5698d /drivers
parent52783c5dcc8d317bc8c3e2692d366e8a305abada (diff)
[PATCH] libata-hp: move ata_do_reset() to libata-eh.c
With ops->probe_init() gone, no user is left in libata-core.c. Move ata_do_reset() to libata-eh.c and make it static. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c28
-rw-r--r--drivers/scsi/libata-eh.c28
-rw-r--r--drivers/scsi/libata.h2
3 files changed, 28 insertions, 30 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 30a6020c5121..40d16124cc9f 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2783,34 +2783,6 @@ void ata_std_postreset(struct ata_port *ap, unsigned int *classes)
2783 DPRINTK("EXIT\n"); 2783 DPRINTK("EXIT\n");
2784} 2784}
2785 2785
2786int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
2787 unsigned int *classes)
2788{
2789 int i, rc;
2790
2791 for (i = 0; i < ATA_MAX_DEVICES; i++)
2792 classes[i] = ATA_DEV_UNKNOWN;
2793
2794 rc = reset(ap, classes);
2795 if (rc)
2796 return rc;
2797
2798 /* If any class isn't ATA_DEV_UNKNOWN, consider classification
2799 * is complete and convert all ATA_DEV_UNKNOWN to
2800 * ATA_DEV_NONE.
2801 */
2802 for (i = 0; i < ATA_MAX_DEVICES; i++)
2803 if (classes[i] != ATA_DEV_UNKNOWN)
2804 break;
2805
2806 if (i < ATA_MAX_DEVICES)
2807 for (i = 0; i < ATA_MAX_DEVICES; i++)
2808 if (classes[i] == ATA_DEV_UNKNOWN)
2809 classes[i] = ATA_DEV_NONE;
2810
2811 return 0;
2812}
2813
2814/** 2786/**
2815 * ata_dev_same_device - Determine whether new ID matches configured device 2787 * ata_dev_same_device - Determine whether new ID matches configured device
2816 * @dev: device to compare against 2788 * @dev: device to compare against
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c
index 30a83a57a12f..d4b80b64342c 100644
--- a/drivers/scsi/libata-eh.c
+++ b/drivers/scsi/libata-eh.c
@@ -1355,6 +1355,34 @@ static void ata_eh_report(struct ata_port *ap)
1355 } 1355 }
1356} 1356}
1357 1357
1358static int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
1359 unsigned int *classes)
1360{
1361 int i, rc;
1362
1363 for (i = 0; i < ATA_MAX_DEVICES; i++)
1364 classes[i] = ATA_DEV_UNKNOWN;
1365
1366 rc = reset(ap, classes);
1367 if (rc)
1368 return rc;
1369
1370 /* If any class isn't ATA_DEV_UNKNOWN, consider classification
1371 * is complete and convert all ATA_DEV_UNKNOWN to
1372 * ATA_DEV_NONE.
1373 */
1374 for (i = 0; i < ATA_MAX_DEVICES; i++)
1375 if (classes[i] != ATA_DEV_UNKNOWN)
1376 break;
1377
1378 if (i < ATA_MAX_DEVICES)
1379 for (i = 0; i < ATA_MAX_DEVICES; i++)
1380 if (classes[i] == ATA_DEV_UNKNOWN)
1381 classes[i] = ATA_DEV_NONE;
1382
1383 return 0;
1384}
1385
1358static int ata_eh_followup_srst_needed(int rc, int classify, 1386static int ata_eh_followup_srst_needed(int rc, int classify,
1359 const unsigned int *classes) 1387 const unsigned int *classes)
1360{ 1388{
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index 0586b0cd73fd..1dd496f1f7ac 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -57,8 +57,6 @@ extern int sata_down_spd_limit(struct ata_port *ap);
57extern int sata_set_spd_needed(struct ata_port *ap); 57extern int sata_set_spd_needed(struct ata_port *ap);
58extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0); 58extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0);
59extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); 59extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
60extern int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
61 unsigned int *classes);
62extern void ata_qc_free(struct ata_queued_cmd *qc); 60extern void ata_qc_free(struct ata_queued_cmd *qc);
63extern void ata_qc_issue(struct ata_queued_cmd *qc); 61extern void ata_qc_issue(struct ata_queued_cmd *qc);
64extern void __ata_qc_complete(struct ata_queued_cmd *qc); 62extern void __ata_qc_complete(struct ata_queued_cmd *qc);