aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 04e0fa97ac99..d3bbc7188b6a 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -615,6 +615,7 @@ typedef struct ide_drive_s {
615 u8 init_speed; /* transfer rate set at boot */ 615 u8 init_speed; /* transfer rate set at boot */
616 u8 pio_speed; /* unused by core, used by some drivers for fallback from DMA */ 616 u8 pio_speed; /* unused by core, used by some drivers for fallback from DMA */
617 u8 current_speed; /* current transfer rate set */ 617 u8 current_speed; /* current transfer rate set */
618 u8 desired_speed; /* desired transfer rate set */
618 u8 dn; /* now wide spread use */ 619 u8 dn; /* now wide spread use */
619 u8 wcache; /* status of write cache */ 620 u8 wcache; /* status of write cache */
620 u8 acoustic; /* acoustic management */ 621 u8 acoustic; /* acoustic management */
@@ -636,7 +637,6 @@ typedef struct ide_drive_s {
636 unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ 637 unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */
637 unsigned int cyl; /* "real" number of cyls */ 638 unsigned int cyl; /* "real" number of cyls */
638 unsigned int drive_data; /* use by tuneproc/selectproc */ 639 unsigned int drive_data; /* use by tuneproc/selectproc */
639 unsigned int usage; /* current "open()" count for drive */
640 unsigned int failures; /* current failure count */ 640 unsigned int failures; /* current failure count */
641 unsigned int max_failures; /* maximum allowed failure count */ 641 unsigned int max_failures; /* maximum allowed failure count */
642 u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ 642 u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */
@@ -736,23 +736,22 @@ typedef struct hwif_s {
736 int (*ide_dma_end)(ide_drive_t *drive); 736 int (*ide_dma_end)(ide_drive_t *drive);
737 int (*ide_dma_check)(ide_drive_t *drive); 737 int (*ide_dma_check)(ide_drive_t *drive);
738 int (*ide_dma_on)(ide_drive_t *drive); 738 int (*ide_dma_on)(ide_drive_t *drive);
739 int (*ide_dma_off_quietly)(ide_drive_t *drive); 739 void (*dma_off_quietly)(ide_drive_t *drive);
740 int (*ide_dma_test_irq)(ide_drive_t *drive); 740 int (*ide_dma_test_irq)(ide_drive_t *drive);
741 int (*ide_dma_host_on)(ide_drive_t *drive); 741 void (*ide_dma_clear_irq)(ide_drive_t *drive);
742 int (*ide_dma_host_off)(ide_drive_t *drive); 742 void (*dma_host_on)(ide_drive_t *drive);
743 void (*dma_host_off)(ide_drive_t *drive);
743 int (*ide_dma_lostirq)(ide_drive_t *drive); 744 int (*ide_dma_lostirq)(ide_drive_t *drive);
744 int (*ide_dma_timeout)(ide_drive_t *drive); 745 int (*ide_dma_timeout)(ide_drive_t *drive);
745 746
746 void (*OUTB)(u8 addr, unsigned long port); 747 void (*OUTB)(u8 addr, unsigned long port);
747 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); 748 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port);
748 void (*OUTW)(u16 addr, unsigned long port); 749 void (*OUTW)(u16 addr, unsigned long port);
749 void (*OUTL)(u32 addr, unsigned long port);
750 void (*OUTSW)(unsigned long port, void *addr, u32 count); 750 void (*OUTSW)(unsigned long port, void *addr, u32 count);
751 void (*OUTSL)(unsigned long port, void *addr, u32 count); 751 void (*OUTSL)(unsigned long port, void *addr, u32 count);
752 752
753 u8 (*INB)(unsigned long port); 753 u8 (*INB)(unsigned long port);
754 u16 (*INW)(unsigned long port); 754 u16 (*INW)(unsigned long port);
755 u32 (*INL)(unsigned long port);
756 void (*INSW)(unsigned long port, void *addr, u32 count); 755 void (*INSW)(unsigned long port, void *addr, u32 count);
757 void (*INSL)(unsigned long port, void *addr, u32 count); 756 void (*INSL)(unsigned long port, void *addr, u32 count);
758 757
@@ -774,7 +773,6 @@ typedef struct hwif_s {
774 unsigned int cursg; 773 unsigned int cursg;
775 unsigned int cursg_ofs; 774 unsigned int cursg_ofs;
776 775
777 int mmio; /* hosts iomio (0) or custom (2) select */
778 int rqsize; /* max sectors per request */ 776 int rqsize; /* max sectors per request */
779 int irq; /* our irq number */ 777 int irq; /* our irq number */
780 778
@@ -802,12 +800,11 @@ typedef struct hwif_s {
802 unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ 800 unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */
803 unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ 801 unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */
804 unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ 802 unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */
805 unsigned no_dsc : 1; /* 0 default, 1 dsc_overlap disabled */
806 unsigned auto_poll : 1; /* supports nop auto-poll */ 803 unsigned auto_poll : 1; /* supports nop auto-poll */
807 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ 804 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
808 unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ 805 unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */
809 unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ 806 unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */
810 unsigned atapi_irq_bogon : 1; /* Generates spurious DMA interrupts in PIO mode */ 807 unsigned mmio : 1; /* host uses MMIO */
811 808
812 struct device gendev; 809 struct device gendev;
813 struct completion gendev_rel_comp; /* To deal with device release() */ 810 struct completion gendev_rel_comp; /* To deal with device release() */
@@ -864,6 +861,8 @@ typedef struct hwgroup_s {
864 int (*expiry)(ide_drive_t *); 861 int (*expiry)(ide_drive_t *);
865 /* ide_system_bus_speed */ 862 /* ide_system_bus_speed */
866 int pio_clock; 863 int pio_clock;
864 int req_gen;
865 int req_gen_timer;
867 866
868 unsigned char cmd_buf[4]; 867 unsigned char cmd_buf[4];
869} ide_hwgroup_t; 868} ide_hwgroup_t;
@@ -1280,8 +1279,9 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *);
1280int __ide_dma_bad_drive(ide_drive_t *); 1279int __ide_dma_bad_drive(ide_drive_t *);
1281int __ide_dma_good_drive(ide_drive_t *); 1280int __ide_dma_good_drive(ide_drive_t *);
1282int ide_use_dma(ide_drive_t *); 1281int ide_use_dma(ide_drive_t *);
1283int __ide_dma_off(ide_drive_t *); 1282void ide_dma_off(ide_drive_t *);
1284void ide_dma_verbose(ide_drive_t *); 1283void ide_dma_verbose(ide_drive_t *);
1284int ide_set_dma(ide_drive_t *);
1285ide_startstop_t ide_dma_intr(ide_drive_t *); 1285ide_startstop_t ide_dma_intr(ide_drive_t *);
1286 1286
1287#ifdef CONFIG_BLK_DEV_IDEDMA_PCI 1287#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -1291,9 +1291,9 @@ extern void ide_destroy_dmatable(ide_drive_t *);
1291extern int ide_release_dma(ide_hwif_t *); 1291extern int ide_release_dma(ide_hwif_t *);
1292extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); 1292extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int);
1293 1293
1294extern int __ide_dma_host_off(ide_drive_t *); 1294void ide_dma_host_off(ide_drive_t *);
1295extern int __ide_dma_off_quietly(ide_drive_t *); 1295void ide_dma_off_quietly(ide_drive_t *);
1296extern int __ide_dma_host_on(ide_drive_t *); 1296void ide_dma_host_on(ide_drive_t *);
1297extern int __ide_dma_on(ide_drive_t *); 1297extern int __ide_dma_on(ide_drive_t *);
1298extern int __ide_dma_check(ide_drive_t *); 1298extern int __ide_dma_check(ide_drive_t *);
1299extern int ide_dma_setup(ide_drive_t *); 1299extern int ide_dma_setup(ide_drive_t *);
@@ -1305,8 +1305,9 @@ extern int __ide_dma_timeout(ide_drive_t *);
1305 1305
1306#else 1306#else
1307static inline int ide_use_dma(ide_drive_t *drive) { return 0; } 1307static inline int ide_use_dma(ide_drive_t *drive) { return 0; }
1308static inline int __ide_dma_off(ide_drive_t *drive) { return 0; } 1308static inline void ide_dma_off(ide_drive_t *drive) { ; }
1309static inline void ide_dma_verbose(ide_drive_t *drive) { ; } 1309static inline void ide_dma_verbose(ide_drive_t *drive) { ; }
1310static inline int ide_set_dma(ide_drive_t *drive) { return 1; }
1310#endif /* CONFIG_BLK_DEV_IDEDMA */ 1311#endif /* CONFIG_BLK_DEV_IDEDMA */
1311 1312
1312#ifndef CONFIG_BLK_DEV_IDEDMA_PCI 1313#ifndef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -1354,20 +1355,21 @@ extern int ide_dma_enable(ide_drive_t *drive);
1354extern char *ide_xfer_verbose(u8 xfer_rate); 1355extern char *ide_xfer_verbose(u8 xfer_rate);
1355extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1356extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1356extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); 1357extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
1358int ide_use_fast_pio(ide_drive_t *);
1357 1359
1358u8 ide_dump_status(ide_drive_t *, const char *, u8); 1360u8 ide_dump_status(ide_drive_t *, const char *, u8);
1359 1361
1360typedef struct ide_pio_timings_s { 1362typedef struct ide_pio_timings_s {
1361 int setup_time; /* Address setup (ns) minimum */ 1363 int setup_time; /* Address setup (ns) minimum */
1362 int active_time; /* Active pulse (ns) minimum */ 1364 int active_time; /* Active pulse (ns) minimum */
1363 int cycle_time; /* Cycle time (ns) minimum = (setup + active + recovery) */ 1365 int cycle_time; /* Cycle time (ns) minimum = */
1366 /* active + recovery (+ setup for some chips) */
1364} ide_pio_timings_t; 1367} ide_pio_timings_t;
1365 1368
1366typedef struct ide_pio_data_s { 1369typedef struct ide_pio_data_s {
1367 u8 pio_mode; 1370 u8 pio_mode;
1368 u8 use_iordy; 1371 u8 use_iordy;
1369 u8 overridden; 1372 u8 overridden;
1370 u8 blacklisted;
1371 unsigned int cycle_time; 1373 unsigned int cycle_time;
1372} ide_pio_data_t; 1374} ide_pio_data_t;
1373 1375