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.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 04e0fa97ac99..79c028251c70 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -636,7 +636,6 @@ typedef struct ide_drive_s {
636 unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ 636 unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */
637 unsigned int cyl; /* "real" number of cyls */ 637 unsigned int cyl; /* "real" number of cyls */
638 unsigned int drive_data; /* use by tuneproc/selectproc */ 638 unsigned int drive_data; /* use by tuneproc/selectproc */
639 unsigned int usage; /* current "open()" count for drive */
640 unsigned int failures; /* current failure count */ 639 unsigned int failures; /* current failure count */
641 unsigned int max_failures; /* maximum allowed failure count */ 640 unsigned int max_failures; /* maximum allowed failure count */
642 u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ 641 u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */
@@ -736,23 +735,22 @@ typedef struct hwif_s {
736 int (*ide_dma_end)(ide_drive_t *drive); 735 int (*ide_dma_end)(ide_drive_t *drive);
737 int (*ide_dma_check)(ide_drive_t *drive); 736 int (*ide_dma_check)(ide_drive_t *drive);
738 int (*ide_dma_on)(ide_drive_t *drive); 737 int (*ide_dma_on)(ide_drive_t *drive);
739 int (*ide_dma_off_quietly)(ide_drive_t *drive); 738 void (*dma_off_quietly)(ide_drive_t *drive);
740 int (*ide_dma_test_irq)(ide_drive_t *drive); 739 int (*ide_dma_test_irq)(ide_drive_t *drive);
741 int (*ide_dma_host_on)(ide_drive_t *drive); 740 void (*ide_dma_clear_irq)(ide_drive_t *drive);
742 int (*ide_dma_host_off)(ide_drive_t *drive); 741 void (*dma_host_on)(ide_drive_t *drive);
742 void (*dma_host_off)(ide_drive_t *drive);
743 int (*ide_dma_lostirq)(ide_drive_t *drive); 743 int (*ide_dma_lostirq)(ide_drive_t *drive);
744 int (*ide_dma_timeout)(ide_drive_t *drive); 744 int (*ide_dma_timeout)(ide_drive_t *drive);
745 745
746 void (*OUTB)(u8 addr, unsigned long port); 746 void (*OUTB)(u8 addr, unsigned long port);
747 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); 747 void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port);
748 void (*OUTW)(u16 addr, unsigned long port); 748 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); 749 void (*OUTSW)(unsigned long port, void *addr, u32 count);
751 void (*OUTSL)(unsigned long port, void *addr, u32 count); 750 void (*OUTSL)(unsigned long port, void *addr, u32 count);
752 751
753 u8 (*INB)(unsigned long port); 752 u8 (*INB)(unsigned long port);
754 u16 (*INW)(unsigned long port); 753 u16 (*INW)(unsigned long port);
755 u32 (*INL)(unsigned long port);
756 void (*INSW)(unsigned long port, void *addr, u32 count); 754 void (*INSW)(unsigned long port, void *addr, u32 count);
757 void (*INSL)(unsigned long port, void *addr, u32 count); 755 void (*INSL)(unsigned long port, void *addr, u32 count);
758 756
@@ -774,7 +772,6 @@ typedef struct hwif_s {
774 unsigned int cursg; 772 unsigned int cursg;
775 unsigned int cursg_ofs; 773 unsigned int cursg_ofs;
776 774
777 int mmio; /* hosts iomio (0) or custom (2) select */
778 int rqsize; /* max sectors per request */ 775 int rqsize; /* max sectors per request */
779 int irq; /* our irq number */ 776 int irq; /* our irq number */
780 777
@@ -802,12 +799,11 @@ typedef struct hwif_s {
802 unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ 799 unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */
803 unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ 800 unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */
804 unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ 801 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 */ 802 unsigned auto_poll : 1; /* supports nop auto-poll */
807 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ 803 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 */ 804 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 */ 805 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 */ 806 unsigned mmio : 1; /* host uses MMIO */
811 807
812 struct device gendev; 808 struct device gendev;
813 struct completion gendev_rel_comp; /* To deal with device release() */ 809 struct completion gendev_rel_comp; /* To deal with device release() */
@@ -1280,8 +1276,9 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *);
1280int __ide_dma_bad_drive(ide_drive_t *); 1276int __ide_dma_bad_drive(ide_drive_t *);
1281int __ide_dma_good_drive(ide_drive_t *); 1277int __ide_dma_good_drive(ide_drive_t *);
1282int ide_use_dma(ide_drive_t *); 1278int ide_use_dma(ide_drive_t *);
1283int __ide_dma_off(ide_drive_t *); 1279void ide_dma_off(ide_drive_t *);
1284void ide_dma_verbose(ide_drive_t *); 1280void ide_dma_verbose(ide_drive_t *);
1281int ide_set_dma(ide_drive_t *);
1285ide_startstop_t ide_dma_intr(ide_drive_t *); 1282ide_startstop_t ide_dma_intr(ide_drive_t *);
1286 1283
1287#ifdef CONFIG_BLK_DEV_IDEDMA_PCI 1284#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -1291,9 +1288,9 @@ extern void ide_destroy_dmatable(ide_drive_t *);
1291extern int ide_release_dma(ide_hwif_t *); 1288extern int ide_release_dma(ide_hwif_t *);
1292extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); 1289extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int);
1293 1290
1294extern int __ide_dma_host_off(ide_drive_t *); 1291void ide_dma_host_off(ide_drive_t *);
1295extern int __ide_dma_off_quietly(ide_drive_t *); 1292void ide_dma_off_quietly(ide_drive_t *);
1296extern int __ide_dma_host_on(ide_drive_t *); 1293void ide_dma_host_on(ide_drive_t *);
1297extern int __ide_dma_on(ide_drive_t *); 1294extern int __ide_dma_on(ide_drive_t *);
1298extern int __ide_dma_check(ide_drive_t *); 1295extern int __ide_dma_check(ide_drive_t *);
1299extern int ide_dma_setup(ide_drive_t *); 1296extern int ide_dma_setup(ide_drive_t *);
@@ -1305,8 +1302,9 @@ extern int __ide_dma_timeout(ide_drive_t *);
1305 1302
1306#else 1303#else
1307static inline int ide_use_dma(ide_drive_t *drive) { return 0; } 1304static inline int ide_use_dma(ide_drive_t *drive) { return 0; }
1308static inline int __ide_dma_off(ide_drive_t *drive) { return 0; } 1305static inline void ide_dma_off(ide_drive_t *drive) { ; }
1309static inline void ide_dma_verbose(ide_drive_t *drive) { ; } 1306static inline void ide_dma_verbose(ide_drive_t *drive) { ; }
1307static inline int ide_set_dma(ide_drive_t *drive) { return 1; }
1310#endif /* CONFIG_BLK_DEV_IDEDMA */ 1308#endif /* CONFIG_BLK_DEV_IDEDMA */
1311 1309
1312#ifndef CONFIG_BLK_DEV_IDEDMA_PCI 1310#ifndef CONFIG_BLK_DEV_IDEDMA_PCI
@@ -1354,6 +1352,7 @@ extern int ide_dma_enable(ide_drive_t *drive);
1354extern char *ide_xfer_verbose(u8 xfer_rate); 1352extern char *ide_xfer_verbose(u8 xfer_rate);
1355extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1353extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1356extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); 1354extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
1355int ide_use_fast_pio(ide_drive_t *);
1357 1356
1358u8 ide_dump_status(ide_drive_t *, const char *, u8); 1357u8 ide_dump_status(ide_drive_t *, const char *, u8);
1359 1358
@@ -1367,7 +1366,6 @@ typedef struct ide_pio_data_s {
1367 u8 pio_mode; 1366 u8 pio_mode;
1368 u8 use_iordy; 1367 u8 use_iordy;
1369 u8 overridden; 1368 u8 overridden;
1370 u8 blacklisted;
1371 unsigned int cycle_time; 1369 unsigned int cycle_time;
1372} ide_pio_data_t; 1370} ide_pio_data_t;
1373 1371