1
2
3
4
5
6
7
8 #ifndef _SD_H
9 #define _SD_H
10
11
12
13
14 #ifndef _SCSI_H
15 #include "scsi.h"
16 #endif
17
18 #ifndef _GENDISK_H
19 #include <linux/genhd.h>
20 #endif
21
22
23
24
25
26
27
28 #define MAX_SD 4
29 extern int NR_SD;
30
31 extern struct hd_struct sd[MAX_SD << 4];
32
33 typedef struct {
34 unsigned capacity;
35 unsigned sector_size;
36 Scsi_Device *device;
37 unsigned char sector_bit_size;
38 unsigned char sector_bit_shift;
39 unsigned ten:1;
40 unsigned remap:1;
41 } Scsi_Disk;
42
43 extern Scsi_Disk rscsi_disks[MAX_SD];
44
45 void sd_init(void);
46
47 #define HOST (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->host_no)
48 #define ID (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->id)
49 #define LUN (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->lun)
50 #endif