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, 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);
518extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); 518extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
519extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); 519extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
520extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); 520extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
521extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, 521extern int ata_dev_revalidate(struct ata_device *dev, int post_reset);
522 int post_reset);
523extern void ata_port_disable(struct ata_port *); 522extern void ata_port_disable(struct ata_port *);
524extern void ata_std_ports(struct ata_ioports *ioaddr); 523extern 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);
545extern int ata_port_offline(struct ata_port *ap); 544extern int ata_port_offline(struct ata_port *ap);
546extern int ata_scsi_device_resume(struct scsi_device *); 545extern int ata_scsi_device_resume(struct scsi_device *);
547extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); 546extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state);
548extern int ata_device_resume(struct ata_port *, struct ata_device *); 547extern int ata_device_resume(struct ata_device *);
549extern int ata_device_suspend(struct ata_port *, struct ata_device *, pm_message_t state); 548extern int ata_device_suspend(struct ata_device *, pm_message_t state);
550extern int ata_ratelimit(void); 549extern int ata_ratelimit(void);
551extern unsigned int ata_busy_sleep(struct ata_port *ap, 550extern 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);
592extern u8 ata_bmdma_status(struct ata_port *ap); 591extern u8 ata_bmdma_status(struct ata_port *ap);
593extern void ata_bmdma_irq_clear(struct ata_port *ap); 592extern void ata_bmdma_irq_clear(struct ata_port *ap);
594extern void __ata_qc_complete(struct ata_queued_cmd *qc); 593extern void __ata_qc_complete(struct ata_queued_cmd *qc);
595extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, 594extern 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 *));
598extern int ata_std_bios_param(struct scsi_device *sdev, 596extern 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[]);
601extern int ata_scsi_slave_config(struct scsi_device *sdev); 599extern int ata_scsi_slave_config(struct scsi_device *sdev);
602extern struct ata_device *ata_dev_pair(struct ata_port *ap, 600extern 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
815static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, unsigned int device) 812static 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;