aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:31 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:31 -0400
commit2b9efba48283f34083df6bc53f6752fba4e4d409 (patch)
tree215d86f1934c896f8ec609ab033b69bf5b99e217 /include/linux/ide.h
parentb14c72127fbe8f97e49de7437520175673f7306a (diff)
ide: add pointer to the current packet command to ide_drive_t
* Add pointer to the current packet command (struct ide_atapi_pc *pc) to ide_drive_t and use it instead of the pointer in struct ide_*_obj. * Use drive->pc in ide_{issue,transfer}_pc() and ide_pc_intr() instead of 'pc' argument. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 93fd2bc17bf8..98d29df1ee04 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -322,6 +322,7 @@ typedef enum {
322 ide_started, /* a drive operation was started, handler was set */ 322 ide_started, /* a drive operation was started, handler was set */
323} ide_startstop_t; 323} ide_startstop_t;
324 324
325struct ide_atapi_pc;
325struct ide_devset; 326struct ide_devset;
326struct ide_driver_s; 327struct ide_driver_s;
327 328
@@ -484,6 +485,9 @@ struct ide_drive_s {
484 struct device gendev; 485 struct device gendev;
485 struct completion gendev_rel_comp; /* to deal with device release() */ 486 struct completion gendev_rel_comp; /* to deal with device release() */
486 487
488 /* current packet command */
489 struct ide_atapi_pc *pc;
490
487 /* callback for packet commands */ 491 /* callback for packet commands */
488 void (*pc_callback)(struct ide_drive_s *, int); 492 void (*pc_callback)(struct ide_drive_s *, int);
489 493
@@ -1171,15 +1175,15 @@ int ide_do_test_unit_ready(ide_drive_t *, struct gendisk *);
1171int ide_do_start_stop(ide_drive_t *, struct gendisk *, int); 1175int ide_do_start_stop(ide_drive_t *, struct gendisk *, int);
1172int ide_set_media_lock(ide_drive_t *, struct gendisk *, int); 1176int ide_set_media_lock(ide_drive_t *, struct gendisk *, int);
1173 1177
1174ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, 1178ide_startstop_t ide_pc_intr(ide_drive_t *drive,
1175 ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, 1179 ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry,
1176 void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *), 1180 void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *),
1177 void (*retry_pc)(ide_drive_t *), 1181 void (*retry_pc)(ide_drive_t *),
1178 int (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned int, 1182 int (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned int,
1179 int)); 1183 int));
1180ide_startstop_t ide_transfer_pc(ide_drive_t *, struct ide_atapi_pc *, 1184ide_startstop_t ide_transfer_pc(ide_drive_t *,
1181 ide_handler_t *, unsigned int, ide_expiry_t *); 1185 ide_handler_t *, unsigned int, ide_expiry_t *);
1182ide_startstop_t ide_issue_pc(ide_drive_t *, struct ide_atapi_pc *, 1186ide_startstop_t ide_issue_pc(ide_drive_t *,
1183 ide_handler_t *, unsigned int, ide_expiry_t *); 1187 ide_handler_t *, unsigned int, ide_expiry_t *);
1184 1188
1185ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); 1189ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);