1 #ifndef _LINUX_BLKDEV_H
2 #define _LINUX_BLKDEV_H
3
4 #include <linux/major.h>
5 #include <linux/sched.h>
6 #include <linux/genhd.h>
7
8
9
10
11
12
13
14 struct request {
15 volatile int rq_status;
16 #define RQ_INACTIVE (-1)
17 #define RQ_ACTIVE 1
18 #define RQ_SCSI_BUSY 0xffff
19 #define RQ_SCSI_DONE 0xfffe
20 #define RQ_SCSI_DISCONNECTING 0xffe0
21
22 kdev_t rq_dev;
23 int cmd;
24 int errors;
25 unsigned long sector;
26 unsigned long nr_sectors;
27 unsigned long current_nr_sectors;
28 char * buffer;
29 struct semaphore * sem;
30 struct buffer_head * bh;
31 struct buffer_head * bhtail;
32 struct request * next;
33 };
34
35 struct blk_dev_struct {
36 void (*request_fn)(void);
37 struct request * current_request;
38 };
39
40 struct sec_size {
41 unsigned block_size;
42 unsigned block_size_bits;
43 };
44
45 extern struct sec_size * blk_sec[MAX_BLKDEV];
46 extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
47 extern struct wait_queue * wait_for_request;
48 extern void resetup_one_dev(struct gendisk *dev, int drive);
49
50 extern int * blk_size[MAX_BLKDEV];
51
52 extern int * blksize_size[MAX_BLKDEV];
53
54 extern int * hardsect_size[MAX_BLKDEV];
55
56 #endif