diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 27cb39de2ae2..ec10b2a3bb6e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
11 | #include <linux/hdreg.h> | 11 | #include <linux/hdreg.h> |
12 | #include <linux/hdsmart.h> | ||
13 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
14 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
@@ -503,7 +502,8 @@ typedef struct hwif_s { | |||
503 | 502 | ||
504 | hwif_chipset_t chipset; /* sub-module for tuning.. */ | 503 | hwif_chipset_t chipset; /* sub-module for tuning.. */ |
505 | 504 | ||
506 | struct pci_dev *pci_dev; /* for pci chipsets */ | 505 | struct device *dev; |
506 | |||
507 | const struct ide_port_info *cds; /* chipset device struct */ | 507 | const struct ide_port_info *cds; /* chipset device struct */ |
508 | 508 | ||
509 | ide_ack_intr_t *ack_intr; | 509 | ide_ack_intr_t *ack_intr; |
@@ -628,8 +628,7 @@ typedef int (ide_expiry_t)(ide_drive_t *); | |||
628 | typedef struct hwgroup_s { | 628 | typedef struct hwgroup_s { |
629 | /* irq handler, if active */ | 629 | /* irq handler, if active */ |
630 | ide_startstop_t (*handler)(ide_drive_t *); | 630 | ide_startstop_t (*handler)(ide_drive_t *); |
631 | /* irq handler, suspended if active */ | 631 | |
632 | ide_startstop_t (*handler_save)(ide_drive_t *); | ||
633 | /* BOOL: protects all fields below */ | 632 | /* BOOL: protects all fields below */ |
634 | volatile int busy; | 633 | volatile int busy; |
635 | /* BOOL: wake us up on timer expiry */ | 634 | /* BOOL: wake us up on timer expiry */ |
@@ -644,25 +643,18 @@ typedef struct hwgroup_s { | |||
644 | /* ptr to current hwif in linked-list */ | 643 | /* ptr to current hwif in linked-list */ |
645 | ide_hwif_t *hwif; | 644 | ide_hwif_t *hwif; |
646 | 645 | ||
647 | /* for pci chipsets */ | ||
648 | struct pci_dev *pci_dev; | ||
649 | |||
650 | /* current request */ | 646 | /* current request */ |
651 | struct request *rq; | 647 | struct request *rq; |
648 | |||
652 | /* failsafe timer */ | 649 | /* failsafe timer */ |
653 | struct timer_list timer; | 650 | struct timer_list timer; |
654 | /* local copy of current write rq */ | ||
655 | struct request wrq; | ||
656 | /* timeout value during long polls */ | 651 | /* timeout value during long polls */ |
657 | unsigned long poll_timeout; | 652 | unsigned long poll_timeout; |
658 | /* queried upon timeouts */ | 653 | /* queried upon timeouts */ |
659 | int (*expiry)(ide_drive_t *); | 654 | int (*expiry)(ide_drive_t *); |
660 | /* ide_system_bus_speed */ | 655 | |
661 | int pio_clock; | ||
662 | int req_gen; | 656 | int req_gen; |
663 | int req_gen_timer; | 657 | int req_gen_timer; |
664 | |||
665 | unsigned char cmd_buf[4]; | ||
666 | } ide_hwgroup_t; | 658 | } ide_hwgroup_t; |
667 | 659 | ||
668 | typedef struct ide_driver_s ide_driver_t; | 660 | typedef struct ide_driver_s ide_driver_t; |
@@ -986,8 +978,6 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); | |||
986 | 978 | ||
987 | void task_end_request(ide_drive_t *, struct request *, u8); | 979 | void task_end_request(ide_drive_t *, struct request *, u8); |
988 | 980 | ||
989 | u8 wait_drive_not_busy(ide_drive_t *); | ||
990 | |||
991 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); | 981 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); |
992 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | 982 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); |
993 | 983 | ||
@@ -1017,7 +1007,6 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1017 | 1007 | ||
1018 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER | 1008 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER |
1019 | extern int ide_scan_direction; | 1009 | extern int ide_scan_direction; |
1020 | int __init ide_scan_pcibus(void); | ||
1021 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); | 1010 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1022 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) | 1011 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1023 | #else | 1012 | #else |
@@ -1096,6 +1085,10 @@ enum { | |||
1096 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), | 1085 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), |
1097 | /* host is CY82C693 */ | 1086 | /* host is CY82C693 */ |
1098 | IDE_HFLAG_CY82C693 = (1 << 27), | 1087 | IDE_HFLAG_CY82C693 = (1 << 27), |
1088 | /* force host out of "simplex" mode */ | ||
1089 | IDE_HFLAG_CLEAR_SIMPLEX = (1 << 28), | ||
1090 | /* DSC overlap is unsupported */ | ||
1091 | IDE_HFLAG_NO_DSC = (1 << 29), | ||
1099 | }; | 1092 | }; |
1100 | 1093 | ||
1101 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1094 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1153,12 +1146,13 @@ void ide_dma_on(ide_drive_t *); | |||
1153 | int ide_set_dma(ide_drive_t *); | 1146 | int ide_set_dma(ide_drive_t *); |
1154 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1147 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
1155 | 1148 | ||
1149 | int ide_build_sglist(ide_drive_t *, struct request *); | ||
1150 | void ide_destroy_dmatable(ide_drive_t *); | ||
1151 | |||
1156 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1152 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
1157 | extern int ide_build_sglist(ide_drive_t *, struct request *); | ||
1158 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1153 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1159 | extern void ide_destroy_dmatable(ide_drive_t *); | ||
1160 | extern int ide_release_dma(ide_hwif_t *); | 1154 | extern int ide_release_dma(ide_hwif_t *); |
1161 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); | 1155 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); |
1162 | 1156 | ||
1163 | void ide_dma_host_set(ide_drive_t *, int); | 1157 | void ide_dma_host_set(ide_drive_t *, int); |
1164 | extern int ide_dma_setup(ide_drive_t *); | 1158 | extern int ide_dma_setup(ide_drive_t *); |
@@ -1197,6 +1191,7 @@ static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | |||
1197 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1191 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1198 | #endif | 1192 | #endif |
1199 | 1193 | ||
1194 | void ide_remove_port_from_hwgroup(ide_hwif_t *); | ||
1200 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1195 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
1201 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); | 1196 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); |
1202 | extern void ide_unregister (unsigned int index); | 1197 | extern void ide_unregister (unsigned int index); |
@@ -1291,9 +1286,14 @@ extern struct bus_type ide_bus_type; | |||
1291 | #define ide_id_has_flush_cache_ext(id) \ | 1286 | #define ide_id_has_flush_cache_ext(id) \ |
1292 | (((id)->cfs_enable_2 & 0x2400) == 0x2400) | 1287 | (((id)->cfs_enable_2 & 0x2400) == 0x2400) |
1293 | 1288 | ||
1289 | static inline void ide_dump_identify(u8 *id) | ||
1290 | { | ||
1291 | print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, 16, 2, id, 512, 0); | ||
1292 | } | ||
1293 | |||
1294 | static inline int hwif_to_node(ide_hwif_t *hwif) | 1294 | static inline int hwif_to_node(ide_hwif_t *hwif) |
1295 | { | 1295 | { |
1296 | struct pci_dev *dev = hwif->pci_dev; | 1296 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
1297 | return dev ? pcibus_to_node(dev->bus) : -1; | 1297 | return dev ? pcibus_to_node(dev->bus) : -1; |
1298 | } | 1298 | } |
1299 | 1299 | ||