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.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 9fed365a598b..867cb68d8461 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -26,6 +26,9 @@
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/mutex.h> 27#include <asm/mutex.h>
28 28
29/* for request_sense */
30#include <linux/cdrom.h>
31
29#if defined(CONFIG_CRIS) || defined(CONFIG_FRV) || defined(CONFIG_MN10300) 32#if defined(CONFIG_CRIS) || defined(CONFIG_FRV) || defined(CONFIG_MN10300)
30# define SUPPORT_VLB_SYNC 0 33# define SUPPORT_VLB_SYNC 0
31#else 34#else
@@ -324,7 +327,6 @@ struct ide_cmd {
324 unsigned int cursg_ofs; 327 unsigned int cursg_ofs;
325 328
326 struct request *rq; /* copy of request */ 329 struct request *rq; /* copy of request */
327 void *special; /* valid_t generally */
328}; 330};
329 331
330/* ATAPI packet command flags */ 332/* ATAPI packet command flags */
@@ -360,11 +362,7 @@ struct ide_atapi_pc {
360 362
361 /* data buffer */ 363 /* data buffer */
362 u8 *buf; 364 u8 *buf;
363 /* current buffer position */
364 u8 *cur_pos;
365 int buf_size; 365 int buf_size;
366 /* missing/available data on the current buffer */
367 int b_count;
368 366
369 /* the corresponding request */ 367 /* the corresponding request */
370 struct request *rq; 368 struct request *rq;
@@ -377,10 +375,6 @@ struct ide_atapi_pc {
377 */ 375 */
378 u8 pc_buf[IDE_PC_BUFFER_SIZE]; 376 u8 pc_buf[IDE_PC_BUFFER_SIZE];
379 377
380 /* idetape only */
381 struct idetape_bh *bh;
382 char *b_data;
383
384 unsigned long timeout; 378 unsigned long timeout;
385}; 379};
386 380
@@ -593,16 +587,16 @@ struct ide_drive_s {
593 /* callback for packet commands */ 587 /* callback for packet commands */
594 int (*pc_callback)(struct ide_drive_s *, int); 588 int (*pc_callback)(struct ide_drive_s *, int);
595 589
596 void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *);
597 int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *,
598 unsigned int, int);
599
600 ide_startstop_t (*irq_handler)(struct ide_drive_s *); 590 ide_startstop_t (*irq_handler)(struct ide_drive_s *);
601 591
602 unsigned long atapi_flags; 592 unsigned long atapi_flags;
603 593
604 struct ide_atapi_pc request_sense_pc; 594 struct ide_atapi_pc request_sense_pc;
605 struct request request_sense_rq; 595
596 /* current sense rq and buffer */
597 bool sense_rq_armed;
598 struct request sense_rq;
599 struct request_sense sense_data;
606}; 600};
607 601
608typedef struct ide_drive_s ide_drive_t; 602typedef struct ide_drive_s ide_drive_t;
@@ -1174,7 +1168,10 @@ int ide_do_test_unit_ready(ide_drive_t *, struct gendisk *);
1174int ide_do_start_stop(ide_drive_t *, struct gendisk *, int); 1168int ide_do_start_stop(ide_drive_t *, struct gendisk *, int);
1175int ide_set_media_lock(ide_drive_t *, struct gendisk *, int); 1169int ide_set_media_lock(ide_drive_t *, struct gendisk *, int);
1176void ide_create_request_sense_cmd(ide_drive_t *, struct ide_atapi_pc *); 1170void ide_create_request_sense_cmd(ide_drive_t *, struct ide_atapi_pc *);
1177void ide_retry_pc(ide_drive_t *, struct gendisk *); 1171void ide_retry_pc(ide_drive_t *drive);
1172
1173void ide_prep_sense(ide_drive_t *drive, struct request *rq);
1174int ide_queue_sense_rq(ide_drive_t *drive, void *special);
1178 1175
1179int ide_cd_expiry(ide_drive_t *); 1176int ide_cd_expiry(ide_drive_t *);
1180 1177