aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-core.c4
-rw-r--r--drivers/ata/libata-eh.c31
-rw-r--r--drivers/ata/libata.h17
3 files changed, 34 insertions, 18 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c046c5e1e5db..9467c2f60192 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6218,7 +6218,7 @@ void ata_dev_init(struct ata_device *dev)
6218 * LOCKING: 6218 * LOCKING:
6219 * Kernel thread context (may sleep) 6219 * Kernel thread context (may sleep)
6220 */ 6220 */
6221static void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp) 6221void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp)
6222{ 6222{
6223 int i; 6223 int i;
6224 6224
@@ -6253,7 +6253,7 @@ static void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp)
6253 * RETURNS: 6253 * RETURNS:
6254 * 0 on success, -errno on failure. 6254 * 0 on success, -errno on failure.
6255 */ 6255 */
6256static int sata_link_init_spd(struct ata_link *link) 6256int sata_link_init_spd(struct ata_link *link)
6257{ 6257{
6258 u32 scontrol, spd; 6258 u32 scontrol, spd;
6259 int rc; 6259 int rc;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index eb087bbc4771..1d3b0dccfb0a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -74,7 +74,6 @@ static const unsigned long ata_eh_reset_timeouts[] = {
74}; 74};
75 75
76static void __ata_port_freeze(struct ata_port *ap); 76static void __ata_port_freeze(struct ata_port *ap);
77static void ata_eh_finish(struct ata_port *ap);
78#ifdef CONFIG_PM 77#ifdef CONFIG_PM
79static void ata_eh_handle_port_suspend(struct ata_port *ap); 78static void ata_eh_handle_port_suspend(struct ata_port *ap);
80static void ata_eh_handle_port_resume(struct ata_port *ap); 79static void ata_eh_handle_port_resume(struct ata_port *ap);
@@ -1015,7 +1014,7 @@ void ata_eh_qc_retry(struct ata_queued_cmd *qc)
1015 * LOCKING: 1014 * LOCKING:
1016 * None. 1015 * None.
1017 */ 1016 */
1018static void ata_eh_detach_dev(struct ata_device *dev) 1017void ata_eh_detach_dev(struct ata_device *dev)
1019{ 1018{
1020 struct ata_link *link = dev->link; 1019 struct ata_link *link = dev->link;
1021 struct ata_port *ap = link->ap; 1020 struct ata_port *ap = link->ap;
@@ -1052,8 +1051,8 @@ static void ata_eh_detach_dev(struct ata_device *dev)
1052 * LOCKING: 1051 * LOCKING:
1053 * None. 1052 * None.
1054 */ 1053 */
1055static void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev, 1054void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev,
1056 unsigned int action) 1055 unsigned int action)
1057{ 1056{
1058 struct ata_port *ap = link->ap; 1057 struct ata_port *ap = link->ap;
1059 struct ata_eh_info *ehi = &link->eh_info; 1058 struct ata_eh_info *ehi = &link->eh_info;
@@ -1095,8 +1094,8 @@ static void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev,
1095 * LOCKING: 1094 * LOCKING:
1096 * None. 1095 * None.
1097 */ 1096 */
1098static void ata_eh_done(struct ata_link *link, struct ata_device *dev, 1097void ata_eh_done(struct ata_link *link, struct ata_device *dev,
1099 unsigned int action) 1098 unsigned int action)
1100{ 1099{
1101 struct ata_eh_context *ehc = &link->eh_context; 1100 struct ata_eh_context *ehc = &link->eh_context;
1102 1101
@@ -1756,7 +1755,7 @@ static void ata_eh_link_autopsy(struct ata_link *link)
1756 * LOCKING: 1755 * LOCKING:
1757 * Kernel thread context (may sleep). 1756 * Kernel thread context (may sleep).
1758 */ 1757 */
1759static void ata_eh_autopsy(struct ata_port *ap) 1758void ata_eh_autopsy(struct ata_port *ap)
1760{ 1759{
1761 struct ata_link *link; 1760 struct ata_link *link;
1762 1761
@@ -1867,7 +1866,7 @@ static void ata_eh_link_report(struct ata_link *link)
1867 * LOCKING: 1866 * LOCKING:
1868 * None. 1867 * None.
1869 */ 1868 */
1870static void ata_eh_report(struct ata_port *ap) 1869void ata_eh_report(struct ata_port *ap)
1871{ 1870{
1872 struct ata_link *link; 1871 struct ata_link *link;
1873 1872
@@ -1918,9 +1917,9 @@ static int ata_eh_followup_srst_needed(int rc, int classify,
1918 return 0; 1917 return 0;
1919} 1918}
1920 1919
1921static int ata_eh_reset(struct ata_link *link, int classify, 1920int ata_eh_reset(struct ata_link *link, int classify,
1922 ata_prereset_fn_t prereset, ata_reset_fn_t softreset, 1921 ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
1923 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset) 1922 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset)
1924{ 1923{
1925 struct ata_eh_context *ehc = &link->eh_context; 1924 struct ata_eh_context *ehc = &link->eh_context;
1926 unsigned int *classes = ehc->classes; 1925 unsigned int *classes = ehc->classes;
@@ -2296,10 +2295,10 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err)
2296 * RETURNS: 2295 * RETURNS:
2297 * 0 on success, -errno on failure. 2296 * 0 on success, -errno on failure.
2298 */ 2297 */
2299static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, 2298int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
2300 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 2299 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
2301 ata_postreset_fn_t postreset, 2300 ata_postreset_fn_t postreset,
2302 struct ata_link **r_failed_link) 2301 struct ata_link **r_failed_link)
2303{ 2302{
2304 struct ata_link *link; 2303 struct ata_link *link;
2305 struct ata_device *dev; 2304 struct ata_device *dev;
@@ -2445,7 +2444,7 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
2445 * LOCKING: 2444 * LOCKING:
2446 * None. 2445 * None.
2447 */ 2446 */
2448static void ata_eh_finish(struct ata_port *ap) 2447void ata_eh_finish(struct ata_port *ap)
2449{ 2448{
2450 int tag; 2449 int tag;
2451 2450
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index d4d369908c0f..0f3e355fdfd7 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -95,6 +95,8 @@ extern void ata_dev_select(struct ata_port *ap, unsigned int device,
95extern void swap_buf_le16(u16 *buf, unsigned int buf_words); 95extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
96extern int ata_flush_cache(struct ata_device *dev); 96extern int ata_flush_cache(struct ata_device *dev);
97extern void ata_dev_init(struct ata_device *dev); 97extern void ata_dev_init(struct ata_device *dev);
98extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
99extern int sata_link_init_spd(struct ata_link *link);
98extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg); 100extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
99extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); 101extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
100extern struct ata_port *ata_port_alloc(struct ata_host *host); 102extern struct ata_port *ata_port_alloc(struct ata_host *host);
@@ -156,6 +158,21 @@ extern void ata_scsi_error(struct Scsi_Host *host);
156extern void ata_port_wait_eh(struct ata_port *ap); 158extern void ata_port_wait_eh(struct ata_port *ap);
157extern void ata_eh_fastdrain_timerfn(unsigned long arg); 159extern void ata_eh_fastdrain_timerfn(unsigned long arg);
158extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); 160extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
161extern void ata_eh_detach_dev(struct ata_device *dev);
162extern void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev,
163 unsigned int action);
164extern void ata_eh_done(struct ata_link *link, struct ata_device *dev,
165 unsigned int action);
166extern void ata_eh_autopsy(struct ata_port *ap);
167extern void ata_eh_report(struct ata_port *ap);
168extern int ata_eh_reset(struct ata_link *link, int classify,
169 ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
170 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset);
171extern int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
172 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
173 ata_postreset_fn_t postreset,
174 struct ata_link **r_failed_disk);
175extern void ata_eh_finish(struct ata_port *ap);
159 176
160/* libata-sff.c */ 177/* libata-sff.c */
161extern u8 ata_irq_on(struct ata_port *ap); 178extern u8 ata_irq_on(struct ata_port *ap);