diff options
Diffstat (limited to 'include/linux/libata.h')
| -rw-r--r-- | include/linux/libata.h | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 66c3100c2b..806682603a 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -36,6 +36,8 @@ | |||
| 36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
| 37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
| 38 | 38 | ||
| 39 | #include <asm/libata-portmap.h> | ||
| 40 | |||
| 39 | /* | 41 | /* |
| 40 | * compile-time options: to be removed as soon as all the drivers are | 42 | * compile-time options: to be removed as soon as all the drivers are |
| 41 | * converted to the new debugging mechanism | 43 | * converted to the new debugging mechanism |
| @@ -112,8 +114,6 @@ enum { | |||
| 112 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 114 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
| 113 | ATA_MAX_QUEUE = 32, | 115 | ATA_MAX_QUEUE = 32, |
| 114 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 116 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
| 115 | ATA_MAX_SECTORS = 200, /* FIXME */ | ||
| 116 | ATA_MAX_SECTORS_LBA48 = 65535, | ||
| 117 | ATA_MAX_BUS = 2, | 117 | ATA_MAX_BUS = 2, |
| 118 | ATA_DEF_BUSY_WAIT = 10000, | 118 | ATA_DEF_BUSY_WAIT = 10000, |
| 119 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 119 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
| @@ -225,8 +225,8 @@ enum { | |||
| 225 | /* encoding various smaller bitmaps into a single | 225 | /* encoding various smaller bitmaps into a single |
| 226 | * unsigned int bitmap | 226 | * unsigned int bitmap |
| 227 | */ | 227 | */ |
| 228 | ATA_BITS_PIO = 5, | 228 | ATA_BITS_PIO = 7, |
| 229 | ATA_BITS_MWDMA = 3, | 229 | ATA_BITS_MWDMA = 5, |
| 230 | ATA_BITS_UDMA = 8, | 230 | ATA_BITS_UDMA = 8, |
| 231 | 231 | ||
| 232 | ATA_SHIFT_PIO = 0, | 232 | ATA_SHIFT_PIO = 0, |
| @@ -350,12 +350,12 @@ struct ata_probe_ent { | |||
| 350 | struct scsi_host_template *sht; | 350 | struct scsi_host_template *sht; |
| 351 | struct ata_ioports port[ATA_MAX_PORTS]; | 351 | struct ata_ioports port[ATA_MAX_PORTS]; |
| 352 | unsigned int n_ports; | 352 | unsigned int n_ports; |
| 353 | unsigned int hard_port_no; | 353 | unsigned int dummy_port_mask; |
| 354 | unsigned int pio_mask; | 354 | unsigned int pio_mask; |
| 355 | unsigned int mwdma_mask; | 355 | unsigned int mwdma_mask; |
| 356 | unsigned int udma_mask; | 356 | unsigned int udma_mask; |
| 357 | unsigned int legacy_mode; | ||
| 358 | unsigned long irq; | 357 | unsigned long irq; |
| 358 | unsigned long irq2; | ||
| 359 | unsigned int irq_flags; | 359 | unsigned int irq_flags; |
| 360 | unsigned long host_flags; | 360 | unsigned long host_flags; |
| 361 | unsigned long host_set_flags; | 361 | unsigned long host_set_flags; |
| @@ -367,6 +367,7 @@ struct ata_host_set { | |||
| 367 | spinlock_t lock; | 367 | spinlock_t lock; |
| 368 | struct device *dev; | 368 | struct device *dev; |
| 369 | unsigned long irq; | 369 | unsigned long irq; |
| 370 | unsigned long irq2; | ||
| 370 | void __iomem *mmio_base; | 371 | void __iomem *mmio_base; |
| 371 | unsigned int n_ports; | 372 | unsigned int n_ports; |
| 372 | void *private_data; | 373 | void *private_data; |
| @@ -374,7 +375,6 @@ struct ata_host_set { | |||
| 374 | unsigned long flags; | 375 | unsigned long flags; |
| 375 | int simplex_claimed; /* Keep seperate in case we | 376 | int simplex_claimed; /* Keep seperate in case we |
| 376 | ever need to do this locked */ | 377 | ever need to do this locked */ |
| 377 | struct ata_host_set *next; /* for legacy mode */ | ||
| 378 | struct ata_port *ports[0]; | 378 | struct ata_port *ports[0]; |
| 379 | }; | 379 | }; |
| 380 | 380 | ||
| @@ -505,7 +505,6 @@ struct ata_port { | |||
| 505 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 505 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
| 506 | unsigned int id; /* unique id req'd by scsi midlyr */ | 506 | unsigned int id; /* unique id req'd by scsi midlyr */ |
| 507 | unsigned int port_no; /* unique port #; from zero */ | 507 | unsigned int port_no; /* unique port #; from zero */ |
| 508 | unsigned int hard_port_no; /* hardware port #; from zero */ | ||
| 509 | 508 | ||
| 510 | struct ata_prd *prd; /* our SG list */ | 509 | struct ata_prd *prd; /* our SG list */ |
| 511 | dma_addr_t prd_dma; /* and its DMA mapping */ | 510 | dma_addr_t prd_dma; /* and its DMA mapping */ |
| @@ -649,6 +648,8 @@ extern const unsigned long sata_deb_timing_normal[]; | |||
| 649 | extern const unsigned long sata_deb_timing_hotplug[]; | 648 | extern const unsigned long sata_deb_timing_hotplug[]; |
| 650 | extern const unsigned long sata_deb_timing_long[]; | 649 | extern const unsigned long sata_deb_timing_long[]; |
| 651 | 650 | ||
| 651 | extern const struct ata_port_operations ata_dummy_port_ops; | ||
| 652 | |||
| 652 | static inline const unsigned long * | 653 | static inline const unsigned long * |
| 653 | sata_ehc_deb_timing(struct ata_eh_context *ehc) | 654 | sata_ehc_deb_timing(struct ata_eh_context *ehc) |
| 654 | { | 655 | { |
| @@ -658,6 +659,11 @@ sata_ehc_deb_timing(struct ata_eh_context *ehc) | |||
| 658 | return sata_deb_timing_normal; | 659 | return sata_deb_timing_normal; |
| 659 | } | 660 | } |
| 660 | 661 | ||
| 662 | static inline int ata_port_is_dummy(struct ata_port *ap) | ||
| 663 | { | ||
| 664 | return ap->ops == &ata_dummy_port_ops; | ||
| 665 | } | ||
| 666 | |||
| 661 | extern void ata_port_probe(struct ata_port *); | 667 | extern void ata_port_probe(struct ata_port *); |
| 662 | extern void __sata_phy_reset(struct ata_port *ap); | 668 | extern void __sata_phy_reset(struct ata_port *ap); |
| 663 | extern void sata_phy_reset(struct ata_port *ap); | 669 | extern void sata_phy_reset(struct ata_port *ap); |
| @@ -676,19 +682,30 @@ extern void ata_std_ports(struct ata_ioports *ioaddr); | |||
| 676 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | 682 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, |
| 677 | unsigned int n_ports); | 683 | unsigned int n_ports); |
| 678 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 684 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
| 679 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state); | 685 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
| 680 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 686 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); |
| 681 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); | 687 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
| 682 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 688 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
| 683 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 689 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
| 684 | #endif /* CONFIG_PCI */ | 690 | #endif /* CONFIG_PCI */ |
| 685 | extern int ata_device_add(const struct ata_probe_ent *ent); | 691 | extern int ata_device_add(const struct ata_probe_ent *ent); |
| 686 | extern void ata_port_detach(struct ata_port *ap); | 692 | extern void ata_port_detach(struct ata_port *ap); |
| 693 | extern void ata_host_set_init(struct ata_host_set *, struct device *, | ||
| 694 | unsigned long, const struct ata_port_operations *); | ||
| 687 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 695 | extern void ata_host_set_remove(struct ata_host_set *host_set); |
| 688 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 696 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
| 689 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 697 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 690 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 698 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
| 691 | extern int ata_scsi_release(struct Scsi_Host *host); | 699 | extern int ata_scsi_release(struct Scsi_Host *host); |
| 700 | extern void ata_sas_port_destroy(struct ata_port *); | ||
| 701 | extern struct ata_port *ata_sas_port_alloc(struct ata_host_set *, | ||
| 702 | struct ata_port_info *, struct Scsi_Host *); | ||
| 703 | extern int ata_sas_port_init(struct ata_port *); | ||
| 704 | extern int ata_sas_port_start(struct ata_port *ap); | ||
| 705 | extern void ata_sas_port_stop(struct ata_port *ap); | ||
| 706 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | ||
| 707 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | ||
| 708 | struct ata_port *ap); | ||
| 692 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 709 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); |
| 693 | extern int sata_scr_valid(struct ata_port *ap); | 710 | extern int sata_scr_valid(struct ata_port *ap); |
| 694 | extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); | 711 | extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); |
| @@ -697,7 +714,7 @@ extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); | |||
| 697 | extern int ata_port_online(struct ata_port *ap); | 714 | extern int ata_port_online(struct ata_port *ap); |
| 698 | extern int ata_port_offline(struct ata_port *ap); | 715 | extern int ata_port_offline(struct ata_port *ap); |
| 699 | extern int ata_scsi_device_resume(struct scsi_device *); | 716 | extern int ata_scsi_device_resume(struct scsi_device *); |
| 700 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); | 717 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); |
| 701 | extern int ata_host_set_suspend(struct ata_host_set *host_set, | 718 | extern int ata_host_set_suspend(struct ata_host_set *host_set, |
| 702 | pm_message_t mesg); | 719 | pm_message_t mesg); |
| 703 | extern void ata_host_set_resume(struct ata_host_set *host_set); | 720 | extern void ata_host_set_resume(struct ata_host_set *host_set); |
