]> err.no Git - linux-2.6/blobdiff - include/linux/libata.h
[NETFILTER]: H.323 helper: move some function prototypes to ip_conntrack_h323.h
[linux-2.6] / include / linux / libata.h
index 3ad2570f663b849cbee40501233f41da6a7ec19c..0d61357604d5b24726c9dd2fd410b264a75182bb 100644 (file)
@@ -151,7 +151,7 @@ enum {
        ATA_FLAG_PIO_LBA48      = (1 << 13), /* Host DMA engine is LBA28 only */
        ATA_FLAG_IRQ_MASK       = (1 << 14), /* Mask IRQ in PIO xfers */
 
-       ATA_FLAG_FLUSH_PIO_TASK = (1 << 15), /* Flush PIO task */
+       ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* Flush port task */
        ATA_FLAG_IN_EH          = (1 << 16), /* EH in progress */
 
        ATA_QCFLAG_ACTIVE       = (1 << 1), /* cmd not yet ack'd to scsi lyer */
@@ -160,8 +160,10 @@ enum {
        ATA_QCFLAG_DMAMAP       = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
        ATA_QCFLAG_EH_SCHEDULED = (1 << 5), /* EH scheduled */
 
+       /* host set flags */
+       ATA_HOST_SIMPLEX        = (1 << 0),     /* Host is simplex, one DMA channel per host_set only */
+       
        /* various lengths of time */
-       ATA_TMOUT_EDD           = 5 * HZ,       /* heuristic */
        ATA_TMOUT_PIO           = 30 * HZ,
        ATA_TMOUT_BOOT          = 30 * HZ,      /* heuristic */
        ATA_TMOUT_BOOT_QUICK    = 7 * HZ,       /* heuristic */
@@ -188,11 +190,19 @@ enum {
        PORT_DISABLED           = 2,
 
        /* encoding various smaller bitmaps into a single
-        * unsigned long bitmap
+        * unsigned int bitmap
         */
-       ATA_SHIFT_UDMA          = 0,
-       ATA_SHIFT_MWDMA         = 8,
-       ATA_SHIFT_PIO           = 11,
+       ATA_BITS_PIO            = 5,
+       ATA_BITS_MWDMA          = 3,
+       ATA_BITS_UDMA           = 8,
+
+       ATA_SHIFT_PIO           = 0,
+       ATA_SHIFT_MWDMA         = ATA_SHIFT_PIO + ATA_BITS_PIO,
+       ATA_SHIFT_UDMA          = ATA_SHIFT_MWDMA + ATA_BITS_MWDMA,
+
+       ATA_MASK_PIO            = ((1 << ATA_BITS_PIO) - 1) << ATA_SHIFT_PIO,
+       ATA_MASK_MWDMA          = ((1 << ATA_BITS_MWDMA) - 1) << ATA_SHIFT_MWDMA,
+       ATA_MASK_UDMA           = ((1 << ATA_BITS_UDMA) - 1) << ATA_SHIFT_UDMA,
 
        /* size of buffer to pad xfers ending on unaligned boundaries */
        ATA_DMA_PAD_SZ          = 4,
@@ -271,6 +281,7 @@ struct ata_probe_ent {
        unsigned long           irq;
        unsigned int            irq_flags;
        unsigned long           host_flags;
+       unsigned long           host_set_flags;
        void __iomem            *mmio_base;
        void                    *private_data;
 };
@@ -283,6 +294,9 @@ struct ata_host_set {
        unsigned int            n_ports;
        void                    *private_data;
        const struct ata_port_operations *ops;
+       unsigned long           flags;
+       int                     simplex_claimed;        /* Keep seperate in case we
+                                                          ever need to do this locked */
        struct ata_port *       ports[0];
 };
 
@@ -350,6 +364,11 @@ struct ata_device {
        unsigned int            max_sectors;    /* per-device max sectors */
        unsigned int            cdb_len;
 
+       /* per-dev xfer mask */
+       unsigned int            pio_mask;
+       unsigned int            mwdma_mask;
+       unsigned int            udma_mask;
+
        /* for CHS addressing */
        u16                     cylinders;      /* Number of cylinders */
        u16                     heads;          /* Number of heads */
@@ -387,12 +406,10 @@ struct ata_port {
 
        struct ata_host_stats   stats;
        struct ata_host_set     *host_set;
+       struct device           *dev;
 
        struct work_struct      port_task;
 
-       struct work_struct      packet_task;
-
-       struct work_struct      pio_task;
        unsigned int            hsm_task_state;
        unsigned long           pio_task_timeout;
 
@@ -409,6 +426,7 @@ struct ata_port_operations {
 
        void (*set_piomode) (struct ata_port *, struct ata_device *);
        void (*set_dmamode) (struct ata_port *, struct ata_device *);
+       unsigned long (*mode_filter) (const struct ata_port *, struct ata_device *, unsigned long);
 
        void (*tf_load) (struct ata_port *ap, const struct ata_taskfile *tf);
        void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
@@ -419,6 +437,7 @@ struct ata_port_operations {
        void (*dev_select)(struct ata_port *ap, unsigned int device);
 
        void (*phy_reset) (struct ata_port *ap); /* obsolete */
+       void (*set_mode) (struct ata_port *ap);
        int (*probe_reset) (struct ata_port *ap, unsigned int *classes);
 
        void (*post_set_mode) (struct ata_port *ap);
@@ -497,22 +516,22 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i
 extern void ata_pci_remove_one (struct pci_dev *pdev);
 extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state);
 extern int ata_pci_device_resume(struct pci_dev *pdev);
+extern int ata_pci_clear_simplex(struct pci_dev *pdev);
 #endif /* CONFIG_PCI */
 extern int ata_device_add(const struct ata_probe_ent *ent);
 extern void ata_host_set_remove(struct ata_host_set *host_set);
 extern int ata_scsi_detect(struct scsi_host_template *sht);
 extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
 extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
-extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
 extern int ata_scsi_error(struct Scsi_Host *host);
 extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
 extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
 extern int ata_scsi_release(struct Scsi_Host *host);
 extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
 extern int ata_scsi_device_resume(struct scsi_device *);
-extern int ata_scsi_device_suspend(struct scsi_device *);
+extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state);
 extern int ata_device_resume(struct ata_port *, struct ata_device *);
-extern int ata_device_suspend(struct ata_port *, struct ata_device *);
+extern int ata_device_suspend(struct ata_port *, struct ata_device *, pm_message_t state);
 extern int ata_ratelimit(void);
 extern unsigned int ata_busy_sleep(struct ata_port *ap,
                                   unsigned long timeout_pat,
@@ -538,6 +557,7 @@ extern void ata_port_stop (struct ata_port *ap);
 extern void ata_host_stop (struct ata_host_set *host_set);
 extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
 extern void ata_qc_prep(struct ata_queued_cmd *qc);
+extern void ata_noop_qc_prep(struct ata_queued_cmd *qc);
 extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
 extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf,
                unsigned int buflen);
@@ -562,6 +582,8 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
                              struct block_device *bdev,
                              sector_t capacity, int geom[]);
 extern int ata_scsi_slave_config(struct scsi_device *sdev);
+extern struct ata_device *ata_dev_pair(struct ata_port *ap, 
+                                      struct ata_device *adev);
 
 /*
  * Timing helpers
@@ -604,7 +626,7 @@ extern void ata_pci_host_stop (struct ata_host_set *host_set);
 extern struct ata_probe_ent *
 ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
 extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits);
-
+extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long);
 #endif /* CONFIG_PCI */