diff options
-rw-r--r-- | drivers/scsi/libata-core.c | 32 | ||||
-rw-r--r-- | drivers/scsi/libata.h | 4 | ||||
-rw-r--r-- | drivers/scsi/sata_sil24.c | 2 | ||||
-rw-r--r-- | include/linux/libata.h | 2 |
4 files changed, 20 insertions, 20 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 509178c3700c..196c09ff5e71 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -1465,7 +1465,7 @@ static int ata_bus_probe(struct ata_port *ap) | |||
1465 | tries[dev->devno] = 0; | 1465 | tries[dev->devno] = 0; |
1466 | break; | 1466 | break; |
1467 | case -EIO: | 1467 | case -EIO: |
1468 | ata_down_sata_spd_limit(ap); | 1468 | sata_down_spd_limit(ap); |
1469 | /* fall through */ | 1469 | /* fall through */ |
1470 | default: | 1470 | default: |
1471 | tries[dev->devno]--; | 1471 | tries[dev->devno]--; |
@@ -1640,12 +1640,12 @@ void ata_port_disable(struct ata_port *ap) | |||
1640 | } | 1640 | } |
1641 | 1641 | ||
1642 | /** | 1642 | /** |
1643 | * ata_down_sata_spd_limit - adjust SATA spd limit downward | 1643 | * sata_down_spd_limit - adjust SATA spd limit downward |
1644 | * @ap: Port to adjust SATA spd limit for | 1644 | * @ap: Port to adjust SATA spd limit for |
1645 | * | 1645 | * |
1646 | * Adjust SATA spd limit of @ap downward. Note that this | 1646 | * Adjust SATA spd limit of @ap downward. Note that this |
1647 | * function only adjusts the limit. The change must be applied | 1647 | * function only adjusts the limit. The change must be applied |
1648 | * using ata_set_sata_spd(). | 1648 | * using sata_set_spd(). |
1649 | * | 1649 | * |
1650 | * LOCKING: | 1650 | * LOCKING: |
1651 | * Inherited from caller. | 1651 | * Inherited from caller. |
@@ -1653,7 +1653,7 @@ void ata_port_disable(struct ata_port *ap) | |||
1653 | * RETURNS: | 1653 | * RETURNS: |
1654 | * 0 on success, negative errno on failure | 1654 | * 0 on success, negative errno on failure |
1655 | */ | 1655 | */ |
1656 | int ata_down_sata_spd_limit(struct ata_port *ap) | 1656 | int sata_down_spd_limit(struct ata_port *ap) |
1657 | { | 1657 | { |
1658 | u32 spd, mask; | 1658 | u32 spd, mask; |
1659 | int highbit; | 1659 | int highbit; |
@@ -1683,7 +1683,7 @@ int ata_down_sata_spd_limit(struct ata_port *ap) | |||
1683 | return 0; | 1683 | return 0; |
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol) | 1686 | static int __sata_set_spd_needed(struct ata_port *ap, u32 *scontrol) |
1687 | { | 1687 | { |
1688 | u32 spd, limit; | 1688 | u32 spd, limit; |
1689 | 1689 | ||
@@ -1699,7 +1699,7 @@ static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol) | |||
1699 | } | 1699 | } |
1700 | 1700 | ||
1701 | /** | 1701 | /** |
1702 | * ata_set_sata_spd_needed - is SATA spd configuration needed | 1702 | * sata_set_spd_needed - is SATA spd configuration needed |
1703 | * @ap: Port in question | 1703 | * @ap: Port in question |
1704 | * | 1704 | * |
1705 | * Test whether the spd limit in SControl matches | 1705 | * Test whether the spd limit in SControl matches |
@@ -1713,7 +1713,7 @@ static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol) | |||
1713 | * RETURNS: | 1713 | * RETURNS: |
1714 | * 1 if SATA spd configuration is needed, 0 otherwise. | 1714 | * 1 if SATA spd configuration is needed, 0 otherwise. |
1715 | */ | 1715 | */ |
1716 | int ata_set_sata_spd_needed(struct ata_port *ap) | 1716 | int sata_set_spd_needed(struct ata_port *ap) |
1717 | { | 1717 | { |
1718 | u32 scontrol; | 1718 | u32 scontrol; |
1719 | 1719 | ||
@@ -1722,11 +1722,11 @@ int ata_set_sata_spd_needed(struct ata_port *ap) | |||
1722 | 1722 | ||
1723 | scontrol = scr_read(ap, SCR_CONTROL); | 1723 | scontrol = scr_read(ap, SCR_CONTROL); |
1724 | 1724 | ||
1725 | return __ata_set_sata_spd_needed(ap, &scontrol); | 1725 | return __sata_set_spd_needed(ap, &scontrol); |
1726 | } | 1726 | } |
1727 | 1727 | ||
1728 | /** | 1728 | /** |
1729 | * ata_set_sata_spd - set SATA spd according to spd limit | 1729 | * sata_set_spd - set SATA spd according to spd limit |
1730 | * @ap: Port to set SATA spd for | 1730 | * @ap: Port to set SATA spd for |
1731 | * | 1731 | * |
1732 | * Set SATA spd of @ap according to sata_spd_limit. | 1732 | * Set SATA spd of @ap according to sata_spd_limit. |
@@ -1738,7 +1738,7 @@ int ata_set_sata_spd_needed(struct ata_port *ap) | |||
1738 | * 0 if spd doesn't need to be changed, 1 if spd has been | 1738 | * 0 if spd doesn't need to be changed, 1 if spd has been |
1739 | * changed. -EOPNOTSUPP if SCR registers are inaccessible. | 1739 | * changed. -EOPNOTSUPP if SCR registers are inaccessible. |
1740 | */ | 1740 | */ |
1741 | int ata_set_sata_spd(struct ata_port *ap) | 1741 | int sata_set_spd(struct ata_port *ap) |
1742 | { | 1742 | { |
1743 | u32 scontrol; | 1743 | u32 scontrol; |
1744 | 1744 | ||
@@ -1746,7 +1746,7 @@ int ata_set_sata_spd(struct ata_port *ap) | |||
1746 | return -EOPNOTSUPP; | 1746 | return -EOPNOTSUPP; |
1747 | 1747 | ||
1748 | scontrol = scr_read(ap, SCR_CONTROL); | 1748 | scontrol = scr_read(ap, SCR_CONTROL); |
1749 | if (!__ata_set_sata_spd_needed(ap, &scontrol)) | 1749 | if (!__sata_set_spd_needed(ap, &scontrol)) |
1750 | return 0; | 1750 | return 0; |
1751 | 1751 | ||
1752 | scr_write(ap, SCR_CONTROL, scontrol); | 1752 | scr_write(ap, SCR_CONTROL, scontrol); |
@@ -2464,7 +2464,7 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class) | |||
2464 | 2464 | ||
2465 | DPRINTK("ENTER\n"); | 2465 | DPRINTK("ENTER\n"); |
2466 | 2466 | ||
2467 | if (ata_set_sata_spd_needed(ap)) { | 2467 | if (sata_set_spd_needed(ap)) { |
2468 | /* SATA spec says nothing about how to reconfigure | 2468 | /* SATA spec says nothing about how to reconfigure |
2469 | * spd. To be on the safe side, turn off phy during | 2469 | * spd. To be on the safe side, turn off phy during |
2470 | * reconfiguration. This works for at least ICH7 AHCI | 2470 | * reconfiguration. This works for at least ICH7 AHCI |
@@ -2474,7 +2474,7 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class) | |||
2474 | scontrol = (scontrol & 0x0f0) | 0x302; | 2474 | scontrol = (scontrol & 0x0f0) | 0x302; |
2475 | scr_write_flush(ap, SCR_CONTROL, scontrol); | 2475 | scr_write_flush(ap, SCR_CONTROL, scontrol); |
2476 | 2476 | ||
2477 | ata_set_sata_spd(ap); | 2477 | sata_set_spd(ap); |
2478 | } | 2478 | } |
2479 | 2479 | ||
2480 | /* issue phy wake/reset */ | 2480 | /* issue phy wake/reset */ |
@@ -2657,7 +2657,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, | |||
2657 | if (probeinit) | 2657 | if (probeinit) |
2658 | probeinit(ap); | 2658 | probeinit(ap); |
2659 | 2659 | ||
2660 | if (softreset && !ata_set_sata_spd_needed(ap)) { | 2660 | if (softreset && !sata_set_spd_needed(ap)) { |
2661 | rc = ata_do_reset(ap, softreset, postreset, classes); | 2661 | rc = ata_do_reset(ap, softreset, postreset, classes); |
2662 | if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN) | 2662 | if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN) |
2663 | goto done; | 2663 | goto done; |
@@ -2677,7 +2677,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, | |||
2677 | break; | 2677 | break; |
2678 | } | 2678 | } |
2679 | 2679 | ||
2680 | if (ata_down_sata_spd_limit(ap)) | 2680 | if (sata_down_spd_limit(ap)) |
2681 | goto done; | 2681 | goto done; |
2682 | 2682 | ||
2683 | printk(KERN_INFO "ata%u: hardreset failed, will retry " | 2683 | printk(KERN_INFO "ata%u: hardreset failed, will retry " |
@@ -5113,7 +5113,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear); | |||
5113 | EXPORT_SYMBOL_GPL(ata_bmdma_status); | 5113 | EXPORT_SYMBOL_GPL(ata_bmdma_status); |
5114 | EXPORT_SYMBOL_GPL(ata_bmdma_stop); | 5114 | EXPORT_SYMBOL_GPL(ata_bmdma_stop); |
5115 | EXPORT_SYMBOL_GPL(ata_port_probe); | 5115 | EXPORT_SYMBOL_GPL(ata_port_probe); |
5116 | EXPORT_SYMBOL_GPL(ata_set_sata_spd); | 5116 | EXPORT_SYMBOL_GPL(sata_set_spd); |
5117 | EXPORT_SYMBOL_GPL(sata_phy_reset); | 5117 | EXPORT_SYMBOL_GPL(sata_phy_reset); |
5118 | EXPORT_SYMBOL_GPL(__sata_phy_reset); | 5118 | EXPORT_SYMBOL_GPL(__sata_phy_reset); |
5119 | EXPORT_SYMBOL_GPL(ata_bus_reset); | 5119 | EXPORT_SYMBOL_GPL(ata_bus_reset); |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 3f8b0a863781..26975df9a3fc 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -51,8 +51,8 @@ extern void ata_port_flush_task(struct ata_port *ap); | |||
51 | extern unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, | 51 | extern unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, |
52 | struct ata_taskfile *tf, const u8 *cdb, | 52 | struct ata_taskfile *tf, const u8 *cdb, |
53 | int dma_dir, void *buf, unsigned int buflen); | 53 | int dma_dir, void *buf, unsigned int buflen); |
54 | extern int ata_down_sata_spd_limit(struct ata_port *ap); | 54 | extern int sata_down_spd_limit(struct ata_port *ap); |
55 | extern int ata_set_sata_spd_needed(struct ata_port *ap); | 55 | extern int sata_set_spd_needed(struct ata_port *ap); |
56 | extern int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev, | 56 | extern int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev, |
57 | int force_pio0); | 57 | int force_pio0); |
58 | extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); | 58 | extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index e9fd869140c5..8c167250f4c9 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -528,7 +528,7 @@ static int sil24_hardreset(struct ata_port *ap, unsigned int *class) | |||
528 | u32 tmp; | 528 | u32 tmp; |
529 | 529 | ||
530 | /* sil24 does the right thing(tm) without any protection */ | 530 | /* sil24 does the right thing(tm) without any protection */ |
531 | ata_set_sata_spd(ap); | 531 | sata_set_spd(ap); |
532 | 532 | ||
533 | tout_msec = 100; | 533 | tout_msec = 100; |
534 | if (sata_dev_present(ap)) | 534 | if (sata_dev_present(ap)) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d35b1e3bb7e0..0b67aafd3878 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -504,7 +504,7 @@ extern void ata_port_probe(struct ata_port *); | |||
504 | extern void __sata_phy_reset(struct ata_port *ap); | 504 | extern void __sata_phy_reset(struct ata_port *ap); |
505 | extern void sata_phy_reset(struct ata_port *ap); | 505 | extern void sata_phy_reset(struct ata_port *ap); |
506 | extern void ata_bus_reset(struct ata_port *ap); | 506 | extern void ata_bus_reset(struct ata_port *ap); |
507 | extern int ata_set_sata_spd(struct ata_port *ap); | 507 | extern int sata_set_spd(struct ata_port *ap); |
508 | extern int ata_drive_probe_reset(struct ata_port *ap, | 508 | extern int ata_drive_probe_reset(struct ata_port *ap, |
509 | ata_probeinit_fn_t probeinit, | 509 | ata_probeinit_fn_t probeinit, |
510 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 510 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |