1 #ifndef _LINUX_HDREG_H
2 #define _LINUX_HDREG_H
3
4
5
6
7
8
9
10
11 #define HD_DATA 0x1f0
12 #define HD_ERROR 0x1f1
13 #define HD_NSECTOR 0x1f2
14 #define HD_SECTOR 0x1f3
15 #define HD_LCYL 0x1f4
16 #define HD_HCYL 0x1f5
17 #define HD_CURRENT 0x1f6
18 #define HD_STATUS 0x1f7
19 #define HD_PRECOMP HD_ERROR
20 #define HD_COMMAND HD_STATUS
21
22 #define HD_CMD 0x3f6
23
24
25 #define ERR_STAT 0x01
26 #define INDEX_STAT 0x02
27 #define ECC_STAT 0x04
28 #define DRQ_STAT 0x08
29 #define SEEK_STAT 0x10
30 #define WRERR_STAT 0x20
31 #define READY_STAT 0x40
32 #define BUSY_STAT 0x80
33
34
35 #define WIN_RESTORE 0x10
36 #define WIN_READ 0x20
37 #define WIN_WRITE 0x30
38 #define WIN_VERIFY 0x40
39 #define WIN_FORMAT 0x50
40 #define WIN_INIT 0x60
41 #define WIN_SEEK 0x70
42 #define WIN_DIAGNOSE 0x90
43 #define WIN_SPECIFY 0x91
44
45
46 #define MARK_ERR 0x01
47 #define TRK0_ERR 0x02
48 #define ABRT_ERR 0x04
49 #define ID_ERR 0x10
50 #define ECC_ERR 0x40
51 #define BBD_ERR 0x80
52
53
54
55
56 #define HDIO_REQ 0x301
57 #define HDIO_GETGEO 0x301
58 struct hd_geometry {
59 unsigned char heads;
60 unsigned char sectors;
61 unsigned short cylinders;
62 unsigned long start;
63 };
64 #endif