diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-02 05:51:53 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-02 10:09:21 -0400 |
commit | 1ad8e7f9eb051b040880e45337ed74bfd916ef7f (patch) | |
tree | 010f563b369b0d00a280aa6545790c95a7b5a8a5 /drivers | |
parent | ece1d63619df010b8c4f08e43755e2a03f3b6eed (diff) |
[PATCH] libata: make some libata-core routines extern
Make libata-core routines which will be used by EH implementation
extern.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libata-core.c | 29 | ||||
-rw-r--r-- | drivers/scsi/libata.h | 13 |
2 files changed, 25 insertions, 17 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 186a9ce4f072..8beba3cd9a56 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -65,10 +65,6 @@ static unsigned int ata_dev_init_params(struct ata_port *ap, | |||
65 | struct ata_device *dev, | 65 | struct ata_device *dev, |
66 | u16 heads, | 66 | u16 heads, |
67 | u16 sectors); | 67 | u16 sectors); |
68 | static int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev, | ||
69 | int force_pio0); | ||
70 | static int ata_down_sata_spd_limit(struct ata_port *ap); | ||
71 | static int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); | ||
72 | static unsigned int ata_dev_set_xfermode(struct ata_port *ap, | 68 | static unsigned int ata_dev_set_xfermode(struct ata_port *ap, |
73 | struct ata_device *dev); | 69 | struct ata_device *dev); |
74 | static void ata_dev_xfermask(struct ata_port *ap, struct ata_device *dev); | 70 | static void ata_dev_xfermask(struct ata_port *ap, struct ata_device *dev); |
@@ -412,7 +408,7 @@ static const char *sata_spd_string(unsigned int spd) | |||
412 | return spd_str[spd - 1]; | 408 | return spd_str[spd - 1]; |
413 | } | 409 | } |
414 | 410 | ||
415 | static void ata_dev_disable(struct ata_port *ap, struct ata_device *dev) | 411 | void ata_dev_disable(struct ata_port *ap, struct ata_device *dev) |
416 | { | 412 | { |
417 | if (ata_dev_enabled(dev)) { | 413 | if (ata_dev_enabled(dev)) { |
418 | printk(KERN_WARNING "ata%u: dev %u disabled\n", | 414 | printk(KERN_WARNING "ata%u: dev %u disabled\n", |
@@ -979,10 +975,9 @@ void ata_qc_complete_internal(struct ata_queued_cmd *qc) | |||
979 | * None. Should be called with kernel context, might sleep. | 975 | * None. Should be called with kernel context, might sleep. |
980 | */ | 976 | */ |
981 | 977 | ||
982 | static unsigned | 978 | unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, |
983 | ata_exec_internal(struct ata_port *ap, struct ata_device *dev, | 979 | struct ata_taskfile *tf, const u8 *cdb, |
984 | struct ata_taskfile *tf, const u8 *cdb, | 980 | int dma_dir, void *buf, unsigned int buflen) |
985 | int dma_dir, void *buf, unsigned int buflen) | ||
986 | { | 981 | { |
987 | u8 command = tf->command; | 982 | u8 command = tf->command; |
988 | struct ata_queued_cmd *qc; | 983 | struct ata_queued_cmd *qc; |
@@ -1649,7 +1644,7 @@ void ata_port_disable(struct ata_port *ap) | |||
1649 | * RETURNS: | 1644 | * RETURNS: |
1650 | * 0 on success, negative errno on failure | 1645 | * 0 on success, negative errno on failure |
1651 | */ | 1646 | */ |
1652 | static int ata_down_sata_spd_limit(struct ata_port *ap) | 1647 | int ata_down_sata_spd_limit(struct ata_port *ap) |
1653 | { | 1648 | { |
1654 | u32 spd, mask; | 1649 | u32 spd, mask; |
1655 | int highbit; | 1650 | int highbit; |
@@ -1709,7 +1704,7 @@ static int __ata_set_sata_spd_needed(struct ata_port *ap, u32 *scontrol) | |||
1709 | * RETURNS: | 1704 | * RETURNS: |
1710 | * 1 if SATA spd configuration is needed, 0 otherwise. | 1705 | * 1 if SATA spd configuration is needed, 0 otherwise. |
1711 | */ | 1706 | */ |
1712 | static int ata_set_sata_spd_needed(struct ata_port *ap) | 1707 | int ata_set_sata_spd_needed(struct ata_port *ap) |
1713 | { | 1708 | { |
1714 | u32 scontrol; | 1709 | u32 scontrol; |
1715 | 1710 | ||
@@ -1913,8 +1908,8 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed, | |||
1913 | * RETURNS: | 1908 | * RETURNS: |
1914 | * 0 on success, negative errno on failure | 1909 | * 0 on success, negative errno on failure |
1915 | */ | 1910 | */ |
1916 | static int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev, | 1911 | int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev, |
1917 | int force_pio0) | 1912 | int force_pio0) |
1918 | { | 1913 | { |
1919 | unsigned long xfer_mask; | 1914 | unsigned long xfer_mask; |
1920 | int highbit; | 1915 | int highbit; |
@@ -1992,7 +1987,7 @@ static int ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev) | |||
1992 | * RETURNS: | 1987 | * RETURNS: |
1993 | * 0 on success, negative errno otherwise | 1988 | * 0 on success, negative errno otherwise |
1994 | */ | 1989 | */ |
1995 | static int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) | 1990 | int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) |
1996 | { | 1991 | { |
1997 | struct ata_device *dev; | 1992 | struct ata_device *dev; |
1998 | int i, rc = 0, used_dma = 0, found = 0; | 1993 | int i, rc = 0, used_dma = 0, found = 0; |
@@ -2590,9 +2585,9 @@ int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes) | |||
2590 | ata_std_postreset, classes); | 2585 | ata_std_postreset, classes); |
2591 | } | 2586 | } |
2592 | 2587 | ||
2593 | static int ata_do_reset(struct ata_port *ap, | 2588 | int ata_do_reset(struct ata_port *ap, |
2594 | ata_reset_fn_t reset, ata_postreset_fn_t postreset, | 2589 | ata_reset_fn_t reset, ata_postreset_fn_t postreset, |
2595 | int verbose, unsigned int *classes) | 2590 | int verbose, unsigned int *classes) |
2596 | { | 2591 | { |
2597 | int i, rc; | 2592 | int i, rc; |
2598 | 2593 | ||
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 75e9bd5833da..31efc2e60b69 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -45,7 +45,20 @@ extern int libata_fua; | |||
45 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | 45 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, |
46 | struct ata_device *dev); | 46 | struct ata_device *dev); |
47 | extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); | 47 | extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); |
48 | extern void ata_dev_disable(struct ata_port *ap, struct ata_device *dev); | ||
48 | extern void ata_port_flush_task(struct ata_port *ap); | 49 | extern void ata_port_flush_task(struct ata_port *ap); |
50 | extern unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, | ||
51 | struct ata_taskfile *tf, const u8 *cdb, | ||
52 | int dma_dir, void *buf, unsigned int buflen); | ||
53 | extern int ata_down_sata_spd_limit(struct ata_port *ap); | ||
54 | extern int ata_set_sata_spd_needed(struct ata_port *ap); | ||
55 | extern int ata_down_xfermask_limit(struct ata_port *ap, struct ata_device *dev, | ||
56 | int force_pio0); | ||
57 | extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); | ||
58 | extern int ata_do_reset(struct ata_port *ap, | ||
59 | ata_reset_fn_t reset, | ||
60 | ata_postreset_fn_t postreset, | ||
61 | int verbose, unsigned int *classes); | ||
49 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 62 | extern void ata_qc_free(struct ata_queued_cmd *qc); |
50 | extern void ata_qc_issue(struct ata_queued_cmd *qc); | 63 | extern void ata_qc_issue(struct ata_queued_cmd *qc); |
51 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); | 64 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); |