struct ide_drive_s {
        char            name[4];        /* drive name, such as "hda" */
        char            driver_req[10]; /* requests specific driver */

        struct request_queue    *queue; /* request queue */

        struct request          *rq;    /* current request */
        struct ide_drive_s      *next;  /* circular list of hwgroup drives */
        void            *driver_data;   /* extra driver data */
        struct hd_driveid       *id;    /* drive model identification info */
#ifdef CONFIG_IDE_PROC_FS
        struct proc_dir_entry *proc;    /* /proc/ide/ directory entry */
        struct ide_settings_s *settings;/* /proc/ide/ drive settings */
#endif
        struct hwif_s           *hwif;  /* actually (ide_hwif_t *) */

        unsigned long sleep;            /* sleep until this time */
        unsigned long service_start;    /* time we started last request */
        unsigned long service_time;     /* service time of last request */
        unsigned long timeout;          /* max time to wait for irq */

        special_t       special;        /* special action flags */
        select_t        select;         /* basic drive/head select reg value */

        u8      keep_settings;          /* restore settings after drive reset */
        u8      using_dma;              /* disk is using dma for read/write */
        u8      retry_pio;              /* retrying dma capable host in pio */
        u8      state;                  /* retry state */
        u8      waiting_for_dma;        /* dma currently in progress */
        u8      unmask;                 /* okay to unmask other irqs */
        u8      noflush;                /* don't attempt flushes */
        u8      dsc_overlap;            /* DSC overlap */
        u8      nice1;                  /* give potential excess bandwidth */

        unsigned present        : 1;    /* drive is physically present */
        unsigned dead           : 1;    /* device ejected hint */
        unsigned id_read        : 1;    /* 1=id read from disk 0 = synthetic */
        unsigned noprobe        : 1;    /* from:  hdx=noprobe */
        unsigned removable      : 1;    /* 1 if need to do check_media_change */
        unsigned attach         : 1;    /* needed for removable devices */
        unsigned forced_geom    : 1;    /* 1 if hdx=c,h,s was given at boot */
        unsigned no_unmask      : 1;    /* disallow setting unmask bit */
        unsigned no_io_32bit    : 1;    /* disallow enabling 32bit I/O */
        unsigned atapi_overlap  : 1;    /* ATAPI overlap (not supported) */
        unsigned doorlocking    : 1;    /* for removable only: door lock/unlock works */
        unsigned nodma          : 1;    /* disallow DMA */
        unsigned remap_0_to_1   : 1;    /* 0=noremap, 1=remap 0->1 (for EZDrive) */
        unsigned blocked        : 1;    /* 1=powermanagment told us not to do anything, so sleep nicely */
        unsigned scsi           : 1;    /* 0=default, 1=ide-scsi emulation */
        unsigned sleeping       : 1;    /* 1=sleeping & sleep field valid */
        unsigned post_reset     : 1;
        unsigned udma33_warned  : 1;

        u8      addressing;     /* 0=28-bit, 1=48-bit, 2=48-bit doing 28-bit */
        u8      quirk_list;     /* considered quirky, set for a specific host */
        u8      init_speed;     /* transfer rate set at boot */
        u8      current_speed;  /* current transfer rate set */
        u8      desired_speed;  /* desired transfer rate set */
        u8      dn;             /* now wide spread use */
        u8      wcache;         /* status of write cache */
        u8      acoustic;       /* acoustic management */
        u8      media;          /* disk, cdrom, tape, floppy, ... */
        u8      ready_stat;     /* min status value for drive ready */
        u8      mult_count;     /* current multiple sector setting */
        u8      mult_req;       /* requested multiple sector setting */
        u8      tune_req;       /* requested drive tuning setting */
        u8      io_32bit;       /* 0=16-bit, 1=32-bit, 2/3=32bit+sync */
        u8      bad_wstat;      /* used for ignoring WRERR_STAT */
        u8      nowerr;         /* used for ignoring WRERR_STAT */
        u8      sect0;          /* offset of first sector for DM6:DDO */
        u8      head;           /* "real" number of heads */
        u8      sect;           /* "real" sectors per track */
        u8      bios_head;      /* BIOS/fdisk/LILO number of heads */
        u8      bios_sect;      /* BIOS/fdisk/LILO sectors per track */

        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 */
        unsigned int    failures;       /* current failure count */
        unsigned int    max_failures;   /* maximum allowed failure count */
        u64             probed_capacity;/* initial reported media capacity (ide-cd only currently) */

        u64             capacity64;     /* total number of sectors */

        int             lun;            /* logical unit */
        int             crc_count;      /* crc counter to reduce drive speed */
#ifdef CONFIG_BLK_DEV_IDEACPI
        struct ide_acpi_drive_link *acpidata;
#endif
        struct list_head list;
        struct device   gendev;
        struct completion gendev_rel_comp;      /* to deal with device release() */

        /* callback for packet commands */
        void (*pc_callback)(struct ide_drive_s *);

        unsigned long atapi_flags;
};


Reply via email to