diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
commit | a890b15c0990cc8d686edcc85f5fccde71ad5ce9 (patch) | |
tree | 73162355b58283a2531f13fbbf663809f95c1483 /include/linux/libata.h | |
parent | 79fa1b677be3a985cc66b9218a4dd09818f1051b (diff) | |
parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) |
Merge branch 'upstream'
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 21 |
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 */ |
249 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); | 250 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
250 | typedef void (*ata_probeinit_fn_t)(struct ata_port *); | 251 | typedef void (*ata_probeinit_fn_t)(struct ata_port *); |
251 | typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *); | 252 | typedef int (*ata_reset_fn_t)(struct ata_port *, unsigned int *); |
252 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); | 253 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); |
253 | 254 | ||
254 | struct ata_ioports { | 255 | struct ata_ioports { |
@@ -499,15 +500,14 @@ extern void ata_port_probe(struct ata_port *); | |||
499 | extern void __sata_phy_reset(struct ata_port *ap); | 500 | extern void __sata_phy_reset(struct ata_port *ap); |
500 | extern void sata_phy_reset(struct ata_port *ap); | 501 | extern void sata_phy_reset(struct ata_port *ap); |
501 | extern void ata_bus_reset(struct ata_port *ap); | 502 | extern void ata_bus_reset(struct ata_port *ap); |
503 | extern int ata_set_sata_spd(struct ata_port *ap); | ||
502 | extern int ata_drive_probe_reset(struct ata_port *ap, | 504 | extern 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); |
506 | extern void ata_std_probeinit(struct ata_port *ap); | 508 | extern void ata_std_probeinit(struct ata_port *ap); |
507 | extern int ata_std_softreset(struct ata_port *ap, int verbose, | 509 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); |
508 | unsigned int *classes); | 510 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); |
509 | extern int sata_std_hardreset(struct ata_port *ap, int verbose, | ||
510 | unsigned int *class); | ||
511 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); | 511 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); |
512 | extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, | 512 | extern 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); | |||
526 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 526 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
527 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 527 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
528 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 528 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
529 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | ||
530 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | ||
529 | extern int ata_scsi_release(struct Scsi_Host *host); | 531 | extern int ata_scsi_release(struct Scsi_Host *host); |
530 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 532 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); |
531 | extern int ata_scsi_device_resume(struct scsi_device *); | 533 | extern 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); |
539 | extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), | 541 | extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), |
540 | void *data, unsigned long delay); | 542 | void *data, unsigned long delay); |
543 | extern 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 | */ |
634 | extern int ata_scsi_error(struct Scsi_Host *host); | ||
635 | extern void ata_eng_timeout(struct ata_port *ap); | 639 | extern void ata_eng_timeout(struct ata_port *ap); |
636 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 640 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
637 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 641 | extern 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 | ||
979 | static 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__ */ |