ide: remove ide_end_request()
[deliverable/linux.git] / include / linux / ide.h
index c2cdf77501853c8784d8f16e81b735c61a197f99..b6142171baf0609935eb35a6939e6406069a62a3 100644 (file)
@@ -295,8 +295,10 @@ enum {
                                          IDE_TFLAG_IN_DEVICE,
        /* force 16-bit I/O operations */
        IDE_TFLAG_IO_16BIT              = (1 << 26),
-       /* ide_task_t was allocated using kmalloc() */
+       /* struct ide_cmd was allocated using kmalloc() */
        IDE_TFLAG_DYN                   = (1 << 27),
+       IDE_TFLAG_FS                    = (1 << 28),
+       IDE_TFLAG_MULTI_PIO             = (1 << 29),
 };
 
 enum {
@@ -335,17 +337,27 @@ struct ide_taskfile {
        };
 };
 
-typedef struct ide_task_s {
+struct ide_cmd {
        union {
                struct ide_taskfile     tf;
                u8                      tf_array[14];
        };
        u8                      ftf_flags;      /* for TASKFILE ioctl */
        u32                     tf_flags;
-       int                     data_phase;
+       int                     protocol;
+
+       int                     sg_nents;         /* number of sg entries */
+       int                     orig_sg_nents;
+       int                     sg_dma_direction; /* DMA transfer direction */
+
+       unsigned int            nsect;
+       unsigned int            nleft;
+       struct scatterlist      *cursg;
+       unsigned int            cursg_ofs;
+
        struct request          *rq;            /* copy of request */
        void                    *special;       /* valid_t generally */
-} ide_task_t;
+};
 
 /* ATAPI packet command flags */
 enum {
@@ -619,7 +631,7 @@ struct ide_drive_s {
        struct ide_atapi_pc *failed_pc;
 
        /* callback for packet commands */
-       void (*pc_callback)(struct ide_drive_s *, int);
+       int  (*pc_callback)(struct ide_drive_s *, int);
 
        void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *);
        int  (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *,
@@ -652,13 +664,13 @@ struct ide_tp_ops {
 
        void    (*set_irq)(struct hwif_s *, int);
 
-       void    (*tf_load)(ide_drive_t *, struct ide_task_s *);
-       void    (*tf_read)(ide_drive_t *, struct ide_task_s *);
+       void    (*tf_load)(ide_drive_t *, struct ide_cmd *);
+       void    (*tf_read)(ide_drive_t *, struct ide_cmd *);
 
-       void    (*input_data)(ide_drive_t *, struct request *, void *,
-                             unsigned int);
-       void    (*output_data)(ide_drive_t *, struct request *, void *,
-                              unsigned int);
+       void    (*input_data)(ide_drive_t *, struct ide_cmd *,
+                             void *, unsigned int);
+       void    (*output_data)(ide_drive_t *, struct ide_cmd *,
+                              void *, unsigned int);
 };
 
 extern const struct ide_tp_ops default_tp_ops;
@@ -771,16 +783,8 @@ typedef struct hwif_s {
        /* Scatter-gather list used to build the above */
        struct scatterlist *sg_table;
        int sg_max_nents;               /* Maximum number of entries in it */
-       int sg_nents;                   /* Current number of entries in it */
-       int orig_sg_nents;
-       int sg_dma_direction;           /* dma transfer direction */
-
-       struct ide_task_s task;         /* current command */
 
-       unsigned int nsect;
-       unsigned int nleft;
-       struct scatterlist *cursg;
-       unsigned int cursg_ofs;
+       struct ide_cmd cmd;             /* current command */
 
        int             rqsize;         /* max sectors per request */
        int             irq;            /* our irq number */
@@ -866,7 +870,7 @@ typedef ide_startstop_t (ide_handler_t)(ide_drive_t *);
 typedef int (ide_expiry_t)(ide_drive_t *);
 
 /* used by ide-cd, ide-floppy, etc. */
-typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned);
+typedef void (xfer_func_t)(ide_drive_t *, struct ide_cmd *, void *, unsigned);
 
 extern struct mutex ide_setting_mtx;
 
@@ -1127,8 +1131,8 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l
 extern int ide_vlb_clk;
 extern int ide_pci_clk;
 
-int ide_end_request(ide_drive_t *, int, int);
-int ide_end_dequeued_request(ide_drive_t *, struct request *, int, int);
+unsigned int ide_rq_bytes(struct request *);
+int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int);
 void ide_kill_rq(ide_drive_t *, struct request *);
 
 void __ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int,
@@ -1161,8 +1165,8 @@ extern ide_startstop_t ide_do_reset (ide_drive_t *);
 extern int ide_devset_execute(ide_drive_t *drive,
                              const struct ide_devset *setting, int arg);
 
-void ide_complete_task(ide_drive_t *, ide_task_t *, u8, u8);
-void ide_complete_rq(ide_drive_t *, u8);
+void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8);
+int ide_complete_rq(ide_drive_t *, int, unsigned int);
 
 void ide_tf_dump(const char *, struct ide_taskfile *);
 
@@ -1172,11 +1176,11 @@ u8 ide_read_altstatus(ide_hwif_t *);
 
 void ide_set_irq(ide_hwif_t *, int);
 
-void ide_tf_load(ide_drive_t *, ide_task_t *);
-void ide_tf_read(ide_drive_t *, ide_task_t *);
+void ide_tf_load(ide_drive_t *, struct ide_cmd *);
+void ide_tf_read(ide_drive_t *, struct ide_cmd *);
 
-void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int);
-void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int);
+void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
+void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
 
 int ide_io_buffers(ide_drive_t *, struct ide_atapi_pc *, unsigned int, int);
 
@@ -1224,14 +1228,14 @@ int ide_cd_get_xferlen(struct request *);
 
 ide_startstop_t ide_issue_pc(ide_drive_t *);
 
-ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
+ide_startstop_t do_rw_taskfile(ide_drive_t *, struct ide_cmd *);
 
-void task_end_request(ide_drive_t *, struct request *, u8);
+void ide_finish_cmd(ide_drive_t *, struct ide_cmd *, u8);
 
-int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16);
-int ide_no_data_taskfile(ide_drive_t *, ide_task_t *);
+int ide_raw_taskfile(ide_drive_t *, struct ide_cmd *, u8 *, u16);
+int ide_no_data_taskfile(ide_drive_t *, struct ide_cmd *);
 
-int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long);
+int ide_taskfile_ioctl(ide_drive_t *, unsigned long);
 
 int ide_dev_read_id(ide_drive_t *, u8, u16 *);
 
@@ -1409,7 +1413,7 @@ int ide_pci_resume(struct pci_dev *);
 #endif
 
 void ide_map_sg(ide_drive_t *, struct request *);
-void ide_init_sg_cmd(ide_drive_t *, struct request *);
+void ide_init_sg_cmd(struct ide_cmd *, int);
 
 #define BAD_DMA_DRIVE          0
 #define GOOD_DMA_DRIVE         1
@@ -1477,6 +1481,8 @@ static inline int ide_set_dma(ide_drive_t *drive) { return 1; }
 static inline void ide_check_dma_crc(ide_drive_t *drive) { ; }
 static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; }
 static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; }
+static inline int ide_build_sglist(ide_drive_t *drive,
+                                  struct request *rq) { return 0; }
 #endif /* CONFIG_BLK_DEV_IDEDMA */
 
 #ifdef CONFIG_BLK_DEV_IDEACPI
This page took 0.027557 seconds and 5 git commands to generate.