aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 44d074ff7789..bf86ee474533 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -33,6 +33,7 @@
33#include <asm/io.h> 33#include <asm/io.h>
34#include <linux/ata.h> 34#include <linux/ata.h>
35#include <linux/workqueue.h> 35#include <linux/workqueue.h>
36#include <scsi/scsi_host.h>
36 37
37/* 38/*
38 * compile-time options: to be removed as soon as all the drivers are 39 * compile-time options: to be removed as soon as all the drivers are
@@ -248,7 +249,7 @@ struct ata_queued_cmd;
248/* typedefs */ 249/* typedefs */
249typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); 250typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
250typedef void (*ata_probeinit_fn_t)(struct ata_port *); 251typedef void (*ata_probeinit_fn_t)(struct ata_port *);
251typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *); 252typedef int (*ata_reset_fn_t)(struct ata_port *, unsigned int *);
252typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); 253typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *);
253 254
254struct ata_ioports { 255struct ata_ioports {
@@ -499,15 +500,14 @@ extern void ata_port_probe(struct ata_port *);
499extern void __sata_phy_reset(struct ata_port *ap); 500extern void __sata_phy_reset(struct ata_port *ap);
500extern void sata_phy_reset(struct ata_port *ap); 501extern void sata_phy_reset(struct ata_port *ap);
501extern void ata_bus_reset(struct ata_port *ap); 502extern void ata_bus_reset(struct ata_port *ap);
503extern int ata_set_sata_spd(struct ata_port *ap);
502extern int ata_drive_probe_reset(struct ata_port *ap, 504extern int ata_drive_probe_reset(struct ata_port *ap,
503 ata_probeinit_fn_t probeinit, 505 ata_probeinit_fn_t probeinit,
504 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 506 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
505 ata_postreset_fn_t postreset, unsigned int *classes); 507 ata_postreset_fn_t postreset, unsigned int *classes);
506extern void ata_std_probeinit(struct ata_port *ap); 508extern void ata_std_probeinit(struct ata_port *ap);
507extern int ata_std_softreset(struct ata_port *ap, int verbose, 509extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
508 unsigned int *classes); 510extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
509extern int sata_std_hardreset(struct ata_port *ap, int verbose,
510 unsigned int *class);
511extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); 511extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
512extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, 512extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev,
513 int post_reset); 513 int post_reset);
@@ -526,6 +526,8 @@ extern void ata_host_set_remove(struct ata_host_set *host_set);
526extern int ata_scsi_detect(struct scsi_host_template *sht); 526extern int ata_scsi_detect(struct scsi_host_template *sht);
527extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 527extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
528extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 528extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
529extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
530extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
529extern int ata_scsi_release(struct Scsi_Host *host); 531extern int ata_scsi_release(struct Scsi_Host *host);
530extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); 532extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
531extern int ata_scsi_device_resume(struct scsi_device *); 533extern int ata_scsi_device_resume(struct scsi_device *);
@@ -538,6 +540,9 @@ extern unsigned int ata_busy_sleep(struct ata_port *ap,
538 unsigned long timeout); 540 unsigned long timeout);
539extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), 541extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *),
540 void *data, unsigned long delay); 542 void *data, unsigned long delay);
543extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
544 unsigned long interval_msec,
545 unsigned long timeout_msec);
541 546
542/* 547/*
543 * Default driver ops implementations 548 * Default driver ops implementations
@@ -631,7 +636,6 @@ extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_
631/* 636/*
632 * EH 637 * EH
633 */ 638 */
634extern int ata_scsi_error(struct Scsi_Host *host);
635extern void ata_eng_timeout(struct ata_port *ap); 639extern void ata_eng_timeout(struct ata_port *ap);
636extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); 640extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
637extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); 641extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
@@ -972,4 +976,9 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
972 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); 976 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma);
973} 977}
974 978
979static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
980{
981 return (struct ata_port *) &host->hostdata[0];
982}
983
975#endif /* __LINUX_LIBATA_H__ */ 984#endif /* __LINUX_LIBATA_H__ */