diff options
| author | Bartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl> | 2004-03-14 15:48:03 -0800 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2004-03-14 15:48:03 -0800 |
| commit | 94088a7af1ebc146131e72db1997d2cae317fdd1 (patch) | |
| tree | 649d3a4f0f686e4f6550e0e4db1b42f6fc945d1e /include/linux/ide.h | |
| parent | 890abeb9bbcd8f02c04b7662ba108ba79a9488e1 (diff) | |
[PATCH] remove ide_cmd_type_parser() logic
Set ide_task_t fields (command_type, handler and prehandler) directly.
Remove unused ide_task_t->posthandler and all ide_cmd_type_parser() logic.
ide_cmd_type_parser() was meant to be used for ioctls but
ended up checking validity of kernel generated requests (doh!).
Rationale for removal:
- it can't be used for existing ioctls (changes the way they work)
- kernel shouldn't check validity of (root only) user-space requests
(it can and should be done in user-space)
- it wastes CPU cycles on going through parsers
- it makes code harder to understand/follow
(now info about request is localized)
Diffstat (limited to 'include/linux/ide.h')
| -rw-r--r-- | include/linux/ide.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index d166358e626c..399ea1190813 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -998,7 +998,6 @@ typedef struct hwif_s { */ typedef ide_startstop_t (ide_pre_handler_t)(ide_drive_t *, struct request *); typedef ide_startstop_t (ide_handler_t)(ide_drive_t *); -typedef ide_startstop_t (ide_post_handler_t)(ide_drive_t *); typedef int (ide_expiry_t)(ide_drive_t *); typedef struct hwgroup_s { @@ -1360,7 +1359,6 @@ typedef struct ide_task_s { int command_type; ide_pre_handler_t *prehandler; ide_handler_t *handler; - ide_post_handler_t *posthandler; struct request *rq; /* copy of request */ void *special; /* valid_t generally */ } ide_task_t; @@ -1459,15 +1457,6 @@ extern void ide_init_drive_taskfile(struct request *); extern int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *); -extern ide_pre_handler_t * ide_pre_handler_parser(struct hd_drive_task_hdr *, struct hd_drive_hob_hdr *); - -extern ide_handler_t * ide_handler_parser(struct hd_drive_task_hdr *, struct hd_drive_hob_hdr *); - -extern ide_post_handler_t * ide_post_handler_parser(struct hd_drive_task_hdr *, struct hd_drive_hob_hdr *); - -/* Expects args is a full set of TF registers and parses the command type */ -extern int ide_cmd_type_parser(ide_task_t *); - int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long); int ide_task_ioctl(ide_drive_t *, unsigned int, unsigned long); |
