]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/ide.h
ide: unify conversion macros
[mv-sheeva.git] / include / linux / ide.h
index d88cced0d02c5a4c62356edac0985a2a346f33c3..350ef47ed616f4d9898469eaa6656d654bc33b5c 100644 (file)
@@ -531,6 +531,9 @@ struct ide_drive_s {
        u8      bios_head;      /* BIOS/fdisk/LILO number of heads */
        u8      bios_sect;      /* BIOS/fdisk/LILO sectors per track */
 
+       /* delay this long before sending packet command */
+       u8 pc_delay;
+
        unsigned int    bios_cyl;       /* BIOS/fdisk/LILO number of cyls */
        unsigned int    cyl;            /* "real" number of cyls */
        unsigned int    drive_data;     /* used by set_pio_mode/selectproc */
@@ -555,6 +558,10 @@ struct ide_drive_s {
        /* callback for packet commands */
        void (*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 *,
+                             unsigned int, int);
+
        unsigned long atapi_flags;
 
        struct ide_atapi_pc request_sense_pc;
@@ -563,7 +570,13 @@ struct ide_drive_s {
 
 typedef struct ide_drive_s ide_drive_t;
 
-#define to_ide_device(dev)container_of(dev, ide_drive_t, gendev)
+#define to_ide_device(dev)             container_of(dev, ide_drive_t, gendev)
+
+#define to_ide_drv(obj, cont_type)     \
+       container_of(obj, struct cont_type, kref)
+
+#define ide_drv_g(disk, cont_type)     \
+       container_of((disk)->private_data, struct cont_type, driver)
 
 struct ide_task_s;
 struct ide_port_info;
@@ -1184,14 +1197,7 @@ static inline unsigned long ide_scsi_get_timeout(struct ide_atapi_pc *pc)
 
 int ide_scsi_expiry(ide_drive_t *);
 
-ide_startstop_t ide_pc_intr(ide_drive_t *drive, ide_handler_t *handler,
-       void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *),
-       int (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned int,
-                          int));
-ide_startstop_t ide_transfer_pc(ide_drive_t *,
-                               ide_handler_t *, unsigned int, ide_expiry_t *);
-ide_startstop_t ide_issue_pc(ide_drive_t *,
-                            ide_handler_t *, unsigned int, ide_expiry_t *);
+ide_startstop_t ide_issue_pc(ide_drive_t *, unsigned int, ide_expiry_t *);
 
 ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);