diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index ac2d2cc78b10..8154b366bbd1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -518,8 +518,7 @@ extern void ata_std_probeinit(struct ata_port *ap); | |||
518 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); | 518 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); |
519 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); | 519 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); |
520 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); | 520 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); |
521 | extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, | 521 | extern int ata_dev_revalidate(struct ata_device *dev, int post_reset); |
522 | int post_reset); | ||
523 | extern void ata_port_disable(struct ata_port *); | 522 | extern void ata_port_disable(struct ata_port *); |
524 | extern void ata_std_ports(struct ata_ioports *ioaddr); | 523 | extern void ata_std_ports(struct ata_ioports *ioaddr); |
525 | #ifdef CONFIG_PCI | 524 | #ifdef CONFIG_PCI |
@@ -545,8 +544,8 @@ extern int ata_port_online(struct ata_port *ap); | |||
545 | extern int ata_port_offline(struct ata_port *ap); | 544 | extern int ata_port_offline(struct ata_port *ap); |
546 | extern int ata_scsi_device_resume(struct scsi_device *); | 545 | extern int ata_scsi_device_resume(struct scsi_device *); |
547 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); | 546 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); |
548 | extern int ata_device_resume(struct ata_port *, struct ata_device *); | 547 | extern int ata_device_resume(struct ata_device *); |
549 | extern int ata_device_suspend(struct ata_port *, struct ata_device *, pm_message_t state); | 548 | extern int ata_device_suspend(struct ata_device *, pm_message_t state); |
550 | extern int ata_ratelimit(void); | 549 | extern int ata_ratelimit(void); |
551 | extern unsigned int ata_busy_sleep(struct ata_port *ap, | 550 | extern unsigned int ata_busy_sleep(struct ata_port *ap, |
552 | unsigned long timeout_pat, | 551 | unsigned long timeout_pat, |
@@ -592,15 +591,13 @@ extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | |||
592 | extern u8 ata_bmdma_status(struct ata_port *ap); | 591 | extern u8 ata_bmdma_status(struct ata_port *ap); |
593 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 592 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
594 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); | 593 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); |
595 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, | 594 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, |
596 | struct scsi_cmnd *cmd, | ||
597 | void (*done)(struct scsi_cmnd *)); | 595 | void (*done)(struct scsi_cmnd *)); |
598 | extern int ata_std_bios_param(struct scsi_device *sdev, | 596 | extern int ata_std_bios_param(struct scsi_device *sdev, |
599 | struct block_device *bdev, | 597 | struct block_device *bdev, |
600 | sector_t capacity, int geom[]); | 598 | sector_t capacity, int geom[]); |
601 | extern int ata_scsi_slave_config(struct scsi_device *sdev); | 599 | extern int ata_scsi_slave_config(struct scsi_device *sdev); |
602 | extern struct ata_device *ata_dev_pair(struct ata_port *ap, | 600 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
603 | struct ata_device *adev); | ||
604 | 601 | ||
605 | /* | 602 | /* |
606 | * Timing helpers | 603 | * Timing helpers |
@@ -812,12 +809,12 @@ static inline struct ata_queued_cmd *ata_qc_from_tag (struct ata_port *ap, | |||
812 | return NULL; | 809 | return NULL; |
813 | } | 810 | } |
814 | 811 | ||
815 | static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, unsigned int device) | 812 | static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) |
816 | { | 813 | { |
817 | memset(tf, 0, sizeof(*tf)); | 814 | memset(tf, 0, sizeof(*tf)); |
818 | 815 | ||
819 | tf->ctl = ap->ctl; | 816 | tf->ctl = dev->ap->ctl; |
820 | if (device == 0) | 817 | if (dev->devno == 0) |
821 | tf->device = ATA_DEVICE_OBS; | 818 | tf->device = ATA_DEVICE_OBS; |
822 | else | 819 | else |
823 | tf->device = ATA_DEVICE_OBS | ATA_DEV1; | 820 | tf->device = ATA_DEVICE_OBS | ATA_DEV1; |
@@ -832,7 +829,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
832 | qc->nbytes = qc->curbytes = 0; | 829 | qc->nbytes = qc->curbytes = 0; |
833 | qc->err_mask = 0; | 830 | qc->err_mask = 0; |
834 | 831 | ||
835 | ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); | 832 | ata_tf_init(qc->dev, &qc->tf); |
836 | 833 | ||
837 | /* init result_tf such that it indicates normal completion */ | 834 | /* init result_tf such that it indicates normal completion */ |
838 | qc->result_tf.command = ATA_DRDY; | 835 | qc->result_tf.command = ATA_DRDY; |