aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-core.c13
-rw-r--r--drivers/ata/libata-pmp.c12
-rw-r--r--drivers/ata/libata.h10
-rw-r--r--include/linux/libata.h17
4 files changed, 27 insertions, 25 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ca60af0cb051..b2d5d63fb6c9 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -86,15 +86,6 @@ const struct ata_port_operations sata_port_ops = {
86 .hardreset = sata_std_hardreset, 86 .hardreset = sata_std_hardreset,
87}; 87};
88 88
89const struct ata_port_operations sata_pmp_port_ops = {
90 .inherits = &sata_port_ops,
91
92 .pmp_prereset = ata_std_prereset,
93 .pmp_hardreset = sata_std_hardreset,
94 .pmp_postreset = ata_std_postreset,
95 .error_handler = sata_pmp_error_handler,
96};
97
98static unsigned int ata_dev_init_params(struct ata_device *dev, 89static unsigned int ata_dev_init_params(struct ata_device *dev,
99 u16 heads, u16 sectors); 90 u16 heads, u16 sectors);
100static unsigned int ata_dev_set_xfermode(struct ata_device *dev); 91static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
@@ -6192,7 +6183,6 @@ EXPORT_SYMBOL_GPL(sata_deb_timing_hotplug);
6192EXPORT_SYMBOL_GPL(sata_deb_timing_long); 6183EXPORT_SYMBOL_GPL(sata_deb_timing_long);
6193EXPORT_SYMBOL_GPL(ata_base_port_ops); 6184EXPORT_SYMBOL_GPL(ata_base_port_ops);
6194EXPORT_SYMBOL_GPL(sata_port_ops); 6185EXPORT_SYMBOL_GPL(sata_port_ops);
6195EXPORT_SYMBOL_GPL(sata_pmp_port_ops);
6196EXPORT_SYMBOL_GPL(ata_dummy_port_ops); 6186EXPORT_SYMBOL_GPL(ata_dummy_port_ops);
6197EXPORT_SYMBOL_GPL(ata_dummy_port_info); 6187EXPORT_SYMBOL_GPL(ata_dummy_port_info);
6198EXPORT_SYMBOL_GPL(ata_std_bios_param); 6188EXPORT_SYMBOL_GPL(ata_std_bios_param);
@@ -6272,9 +6262,6 @@ EXPORT_SYMBOL_GPL(ata_pci_device_resume);
6272#endif /* CONFIG_PM */ 6262#endif /* CONFIG_PM */
6273#endif /* CONFIG_PCI */ 6263#endif /* CONFIG_PCI */
6274 6264
6275EXPORT_SYMBOL_GPL(sata_pmp_qc_defer_cmd_switch);
6276EXPORT_SYMBOL_GPL(sata_pmp_error_handler);
6277
6278EXPORT_SYMBOL_GPL(__ata_ehi_push_desc); 6265EXPORT_SYMBOL_GPL(__ata_ehi_push_desc);
6279EXPORT_SYMBOL_GPL(ata_ehi_push_desc); 6266EXPORT_SYMBOL_GPL(ata_ehi_push_desc);
6280EXPORT_SYMBOL_GPL(ata_ehi_clear_desc); 6267EXPORT_SYMBOL_GPL(ata_ehi_clear_desc);
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 9c998611b644..bb10c0630791 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -11,6 +11,14 @@
11#include <linux/libata.h> 11#include <linux/libata.h>
12#include "libata.h" 12#include "libata.h"
13 13
14const struct ata_port_operations sata_pmp_port_ops = {
15 .inherits = &sata_port_ops,
16 .pmp_prereset = ata_std_prereset,
17 .pmp_hardreset = sata_std_hardreset,
18 .pmp_postreset = ata_std_postreset,
19 .error_handler = sata_pmp_error_handler,
20};
21
14/** 22/**
15 * sata_pmp_read - read PMP register 23 * sata_pmp_read - read PMP register
16 * @link: link to read PMP register for 24 * @link: link to read PMP register for
@@ -1012,3 +1020,7 @@ void sata_pmp_error_handler(struct ata_port *ap)
1012 sata_pmp_eh_recover(ap); 1020 sata_pmp_eh_recover(ap);
1013 ata_eh_finish(ap); 1021 ata_eh_finish(ap);
1014} 1022}
1023
1024EXPORT_SYMBOL_GPL(sata_pmp_port_ops);
1025EXPORT_SYMBOL_GPL(sata_pmp_qc_defer_cmd_switch);
1026EXPORT_SYMBOL_GPL(sata_pmp_error_handler);
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 6b70a624828c..42b30e38495d 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -179,11 +179,6 @@ extern void ata_schedule_scsi_eh(struct Scsi_Host *shost);
179extern void ata_scsi_dev_rescan(struct work_struct *work); 179extern void ata_scsi_dev_rescan(struct work_struct *work);
180extern int ata_bus_probe(struct ata_port *ap); 180extern int ata_bus_probe(struct ata_port *ap);
181 181
182/* libata-pmp.c */
183extern int sata_pmp_scr_read(struct ata_link *link, int reg, u32 *val);
184extern int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val);
185extern int sata_pmp_attach(struct ata_device *dev);
186
187/* libata-eh.c */ 182/* libata-eh.c */
188extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); 183extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
189extern void ata_scsi_error(struct Scsi_Host *host); 184extern void ata_scsi_error(struct Scsi_Host *host);
@@ -207,6 +202,11 @@ extern int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
207 struct ata_link **r_failed_disk); 202 struct ata_link **r_failed_disk);
208extern void ata_eh_finish(struct ata_port *ap); 203extern void ata_eh_finish(struct ata_port *ap);
209 204
205/* libata-pmp.c */
206extern int sata_pmp_scr_read(struct ata_link *link, int reg, u32 *val);
207extern int sata_pmp_scr_write(struct ata_link *link, int reg, u32 val);
208extern int sata_pmp_attach(struct ata_device *dev);
209
210/* libata-sff.c */ 210/* libata-sff.c */
211#ifdef CONFIG_ATA_SFF 211#ifdef CONFIG_ATA_SFF
212extern void ata_dev_select(struct ata_port *ap, unsigned int device, 212extern void ata_dev_select(struct ata_port *ap, unsigned int device,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index db77b90003fd..eb86d6f39635 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1027,12 +1027,6 @@ static inline int ata_acpi_cbl_80wire(struct ata_port *ap,
1027#endif 1027#endif
1028 1028
1029/* 1029/*
1030 * PMP - drivers/ata/libata-pmp.c
1031 */
1032extern int sata_pmp_qc_defer_cmd_switch(struct ata_queued_cmd *qc);
1033extern void sata_pmp_error_handler(struct ata_port *ap);
1034
1035/*
1036 * EH - drivers/ata/libata-eh.c 1030 * EH - drivers/ata/libata-eh.c
1037 */ 1031 */
1038extern void ata_port_schedule_eh(struct ata_port *ap); 1032extern void ata_port_schedule_eh(struct ata_port *ap);
@@ -1075,7 +1069,6 @@ extern void ata_std_error_handler(struct ata_port *ap);
1075 */ 1069 */
1076extern const struct ata_port_operations ata_base_port_ops; 1070extern const struct ata_port_operations ata_base_port_ops;
1077extern const struct ata_port_operations sata_port_ops; 1071extern const struct ata_port_operations sata_port_ops;
1078extern const struct ata_port_operations sata_pmp_port_ops;
1079 1072
1080#define ATA_BASE_SHT(drv_name) \ 1073#define ATA_BASE_SHT(drv_name) \
1081 .module = THIS_MODULE, \ 1074 .module = THIS_MODULE, \
@@ -1352,6 +1345,16 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
1352 return *(struct ata_port **)&host->hostdata[0]; 1345 return *(struct ata_port **)&host->hostdata[0];
1353} 1346}
1354 1347
1348
1349/**************************************************************************
1350 * PMP - drivers/ata/libata-pmp.c
1351 */
1352extern const struct ata_port_operations sata_pmp_port_ops;
1353
1354extern int sata_pmp_qc_defer_cmd_switch(struct ata_queued_cmd *qc);
1355extern void sata_pmp_error_handler(struct ata_port *ap);
1356
1357
1355/************************************************************************** 1358/**************************************************************************
1356 * SFF - drivers/ata/libata-sff.c 1359 * SFF - drivers/ata/libata-sff.c
1357 */ 1360 */