diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index a6dbb51ecd7b..a39c3c59789d 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -218,7 +218,7 @@ typedef enum { ide_unknown, ide_generic, ide_pci, | |||
218 | ide_rz1000, ide_trm290, | 218 | ide_rz1000, ide_trm290, |
219 | ide_cmd646, ide_cy82c693, ide_4drives, | 219 | ide_cmd646, ide_cy82c693, ide_4drives, |
220 | ide_pmac, ide_etrax100, ide_acorn, | 220 | ide_pmac, ide_etrax100, ide_acorn, |
221 | ide_forced | 221 | ide_au1xxx, ide_forced |
222 | } hwif_chipset_t; | 222 | } hwif_chipset_t; |
223 | 223 | ||
224 | /* | 224 | /* |
@@ -230,6 +230,7 @@ typedef struct hw_regs_s { | |||
230 | int dma; /* our dma entry */ | 230 | int dma; /* our dma entry */ |
231 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | 231 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ |
232 | hwif_chipset_t chipset; | 232 | hwif_chipset_t chipset; |
233 | struct device *dev; | ||
233 | } hw_regs_t; | 234 | } hw_regs_t; |
234 | 235 | ||
235 | /* | 236 | /* |
@@ -266,6 +267,10 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
266 | 267 | ||
267 | #include <asm/ide.h> | 268 | #include <asm/ide.h> |
268 | 269 | ||
270 | #ifndef MAX_HWIFS | ||
271 | #define MAX_HWIFS CONFIG_IDE_MAX_HWIFS | ||
272 | #endif | ||
273 | |||
269 | /* needed on alpha, x86/x86_64, ia64, mips, ppc32 and sh */ | 274 | /* needed on alpha, x86/x86_64, ia64, mips, ppc32 and sh */ |
270 | #ifndef IDE_ARCH_OBSOLETE_DEFAULTS | 275 | #ifndef IDE_ARCH_OBSOLETE_DEFAULTS |
271 | # define ide_default_io_base(index) (0) | 276 | # define ide_default_io_base(index) (0) |
@@ -1084,9 +1089,11 @@ enum { | |||
1084 | 1089 | ||
1085 | /* | 1090 | /* |
1086 | * Subdrivers support. | 1091 | * Subdrivers support. |
1092 | * | ||
1093 | * The gendriver.owner field should be set to the module owner of this driver. | ||
1094 | * The gendriver.name field should be set to the name of this driver | ||
1087 | */ | 1095 | */ |
1088 | typedef struct ide_driver_s { | 1096 | typedef struct ide_driver_s { |
1089 | struct module *owner; | ||
1090 | const char *version; | 1097 | const char *version; |
1091 | u8 media; | 1098 | u8 media; |
1092 | unsigned supports_dsc_overlap : 1; | 1099 | unsigned supports_dsc_overlap : 1; |
@@ -1194,37 +1201,11 @@ extern u64 ide_get_error_location(ide_drive_t *, char *); | |||
1194 | */ | 1201 | */ |
1195 | typedef enum { | 1202 | typedef enum { |
1196 | ide_wait, /* insert rq at end of list, and wait for it */ | 1203 | ide_wait, /* insert rq at end of list, and wait for it */ |
1197 | ide_next, /* insert rq immediately after current request */ | ||
1198 | ide_preempt, /* insert rq in front of current request */ | 1204 | ide_preempt, /* insert rq in front of current request */ |
1199 | ide_head_wait, /* insert rq in front of current request and wait for it */ | 1205 | ide_head_wait, /* insert rq in front of current request and wait for it */ |
1200 | ide_end /* insert rq at end of list, but don't wait for it */ | 1206 | ide_end /* insert rq at end of list, but don't wait for it */ |
1201 | } ide_action_t; | 1207 | } ide_action_t; |
1202 | 1208 | ||
1203 | /* | ||
1204 | * This function issues a special IDE device request | ||
1205 | * onto the request queue. | ||
1206 | * | ||
1207 | * If action is ide_wait, then the rq is queued at the end of the | ||
1208 | * request queue, and the function sleeps until it has been processed. | ||
1209 | * This is for use when invoked from an ioctl handler. | ||
1210 | * | ||
1211 | * If action is ide_preempt, then the rq is queued at the head of | ||
1212 | * the request queue, displacing the currently-being-processed | ||
1213 | * request and this function returns immediately without waiting | ||
1214 | * for the new rq to be completed. This is VERY DANGEROUS, and is | ||
1215 | * intended for careful use by the ATAPI tape/cdrom driver code. | ||
1216 | * | ||
1217 | * If action is ide_next, then the rq is queued immediately after | ||
1218 | * the currently-being-processed-request (if any), and the function | ||
1219 | * returns without waiting for the new rq to be completed. As above, | ||
1220 | * This is VERY DANGEROUS, and is intended for careful use by the | ||
1221 | * ATAPI tape/cdrom driver code. | ||
1222 | * | ||
1223 | * If action is ide_end, then the rq is queued at the end of the | ||
1224 | * request queue, and the function returns immediately without waiting | ||
1225 | * for the new rq to be completed. This is again intended for careful | ||
1226 | * use by the ATAPI tape/cdrom driver code. | ||
1227 | */ | ||
1228 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); | 1209 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); |
1229 | 1210 | ||
1230 | /* | 1211 | /* |
@@ -1324,7 +1305,8 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1324 | extern int ideprobe_init(void); | 1305 | extern int ideprobe_init(void); |
1325 | 1306 | ||
1326 | extern void ide_scan_pcibus(int scan_direction) __init; | 1307 | extern void ide_scan_pcibus(int scan_direction) __init; |
1327 | extern int ide_pci_register_driver(struct pci_driver *driver); | 1308 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner); |
1309 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE) | ||
1328 | extern void ide_pci_unregister_driver(struct pci_driver *driver); | 1310 | extern void ide_pci_unregister_driver(struct pci_driver *driver); |
1329 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1311 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); |
1330 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1312 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); |