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 #define MAX_SD 2
19
20 typedef struct partition {
21 unsigned char boot_ind;
22 unsigned char head;
23 unsigned char sector;
24 unsigned char cyl;
25 unsigned char sys_ind;
26 unsigned char end_head;
27 unsigned char end_sector;
28 unsigned char end_cyl;
29 unsigned int start_sect;
30 unsigned int nr_sects;
31 } Partition;
32
33 extern int NR_SD;
34
35 extern Partition scsi_disks[MAX_SD << 4] ;
36
37
38 typedef struct {
39 unsigned capacity;
40 unsigned sector_size;
41 Scsi_Device *device;
42 unsigned char sector_bit_size;
43 unsigned char sector_bit_shift;
44 unsigned ten:1;
45 unsigned remap:1;
46 unsigned use:1;
47
48 } Scsi_Disk;
49
50 extern Scsi_Disk rscsi_disks[MAX_SD];
51
52 void sd_init(void);
53
54 #define HOST (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->host_no)
55 #define ID (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->id)
56 #define LUN (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->lun)
57 #endif