clean
[linux-2.4.21-pre4.git] / include / linux / major.h
1 #ifndef _LINUX_MAJOR_H
2 #define _LINUX_MAJOR_H
3
4 /*
5  * This file has definitions for major device numbers.
6  * For the device number assignments, see Documentation/devices.txt.
7  */
8
9 /* limits */
10
11 /*
12  * Important: Don't change this to 256.  Major number 255 is and must be
13  * reserved for future expansion into a larger dev_t space.
14  */
15 #define MAX_CHRDEV      255
16 #define MAX_BLKDEV      255
17
18 #define UNNAMED_MAJOR   0
19 #define MEM_MAJOR       1
20 #define RAMDISK_MAJOR   1
21 #define FLOPPY_MAJOR    2
22 #define PTY_MASTER_MAJOR 2
23 #define IDE0_MAJOR      3
24 #define PTY_SLAVE_MAJOR 3
25 #define HD_MAJOR        IDE0_MAJOR
26 #define TTY_MAJOR       4
27 #define TTYAUX_MAJOR    5
28 #define LP_MAJOR        6
29 #define VCS_MAJOR       7
30 #define LOOP_MAJOR      7
31 #define SCSI_DISK0_MAJOR 8
32 #define SCSI_TAPE_MAJOR 9
33 #define MD_MAJOR        9
34 #define MISC_MAJOR      10
35 #define SCSI_CDROM_MAJOR 11
36 #define MUX_MAJOR       11      /* PA-RISC only */
37 #define QIC02_TAPE_MAJOR 12
38 #define XT_DISK_MAJOR   13
39 #define SOUND_MAJOR     14
40 #define CDU31A_CDROM_MAJOR 15
41 #define JOYSTICK_MAJOR  15
42 #define GOLDSTAR_CDROM_MAJOR 16
43 #define OPTICS_CDROM_MAJOR 17
44 #define SANYO_CDROM_MAJOR 18
45 #define CYCLADES_MAJOR  19
46 #define CYCLADESAUX_MAJOR 20
47 #define MITSUMI_X_CDROM_MAJOR 20
48 #define MFM_ACORN_MAJOR 21      /* ARM Linux /dev/mfm */
49 #define SCSI_GENERIC_MAJOR 21
50 #define Z8530_MAJOR 34
51 #define DIGI_MAJOR 23
52 #define IDE1_MAJOR      22
53 #define DIGICU_MAJOR 22
54 #define MITSUMI_CDROM_MAJOR 23
55 #define CDU535_CDROM_MAJOR 24
56 #define STL_SERIALMAJOR 24
57 #define MATSUSHITA_CDROM_MAJOR 25
58 #define STL_CALLOUTMAJOR 25
59 #define MATSUSHITA_CDROM2_MAJOR 26
60 #define QIC117_TAPE_MAJOR 27
61 #define MATSUSHITA_CDROM3_MAJOR 27
62 #define MATSUSHITA_CDROM4_MAJOR 28
63 #define STL_SIOMEMMAJOR 28
64 #define ACSI_MAJOR      28
65 #define AZTECH_CDROM_MAJOR 29
66 #define GRAPHDEV_MAJOR  29      /* SparcLinux & Linux/68k /dev/fb */
67 #define SHMIQ_MAJOR     85      /* Linux/mips, SGI /dev/shmiq */
68 #define CM206_CDROM_MAJOR 32
69 #define IDE2_MAJOR      33
70 #define IDE3_MAJOR      34
71 #define XPRAM_MAJOR     35      /* expanded storage on S/390 = "slow ram" */
72                                 /* proposed by Peter                      */
73 #define NETLINK_MAJOR   36
74 #define PS2ESDI_MAJOR   36
75 #define IDETAPE_MAJOR   37
76 #define Z2RAM_MAJOR     37
77 #define APBLOCK_MAJOR   38   /* AP1000 Block device */
78 #define DDV_MAJOR       39   /* AP1000 DDV block device */
79 #define NBD_MAJOR       43   /* Network block device    */
80 #define RISCOM8_NORMAL_MAJOR 48
81 #define DAC960_MAJOR    48      /* 48..55 */
82 #define RISCOM8_CALLOUT_MAJOR 49
83 #define MKISS_MAJOR     55
84 #define DSP56K_MAJOR    55   /* DSP56001 processor device */
85
86 #define IDE4_MAJOR      56
87 #define IDE5_MAJOR      57
88
89 #define LVM_BLK_MAJOR   58      /* Logical Volume Manager */
90
91 #define SCSI_DISK1_MAJOR        65
92 #define SCSI_DISK2_MAJOR        66
93 #define SCSI_DISK3_MAJOR        67
94 #define SCSI_DISK4_MAJOR        68
95 #define SCSI_DISK5_MAJOR        69
96 #define SCSI_DISK6_MAJOR        70
97 #define SCSI_DISK7_MAJOR        71
98
99
100 #define COMPAQ_SMART2_MAJOR     72
101 #define COMPAQ_SMART2_MAJOR1    73
102 #define COMPAQ_SMART2_MAJOR2    74
103 #define COMPAQ_SMART2_MAJOR3    75
104 #define COMPAQ_SMART2_MAJOR4    76
105 #define COMPAQ_SMART2_MAJOR5    77
106 #define COMPAQ_SMART2_MAJOR6    78
107 #define COMPAQ_SMART2_MAJOR7    79
108
109 #define SPECIALIX_NORMAL_MAJOR 75
110 #define SPECIALIX_CALLOUT_MAJOR 76
111
112 #define COMPAQ_CISS_MAJOR       104
113 #define COMPAQ_CISS_MAJOR1      105
114 #define COMPAQ_CISS_MAJOR2      106
115 #define COMPAQ_CISS_MAJOR3      107
116 #define COMPAQ_CISS_MAJOR4      108
117 #define COMPAQ_CISS_MAJOR5      109
118 #define COMPAQ_CISS_MAJOR6      110
119 #define COMPAQ_CISS_MAJOR7      111
120
121 #define ATARAID_MAJOR           114
122
123 #define DASD_MAJOR      94      /* Official assignations from Peter */
124
125 #define MDISK_MAJOR     95      /* Official assignations from Peter */
126
127 #define I2O_MAJOR               80      /* 80->87 */
128
129 #define IDE6_MAJOR      88
130 #define IDE7_MAJOR      89
131 #define IDE8_MAJOR      90
132 #define IDE9_MAJOR      91
133
134 #define UBD_MAJOR       98
135
136 #define AURORA_MAJOR 79
137
138 #define VIODASD_MAJOR   112
139 #define VIOCD_MAJOR     113
140
141 #define JSFD_MAJOR      99
142
143 #define PHONE_MAJOR     100
144
145 #define LVM_CHAR_MAJOR  109     /* Logical Volume Manager */
146
147 #define UMEM_MAJOR      116     /* http://www.umem.com/ Battery Backed RAM */
148
149 #define RTF_MAJOR       150
150 #define RAW_MAJOR       162
151
152 #define USB_ACM_MAJOR           166
153 #define USB_ACM_AUX_MAJOR       167
154 #define USB_CHAR_MAJOR          180
155
156 #define UNIX98_PTY_MASTER_MAJOR 128
157 #define UNIX98_PTY_MAJOR_COUNT  8
158 #define UNIX98_PTY_SLAVE_MAJOR  (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
159
160 #define VXVM_MAJOR              199     /* VERITAS volume i/o driver    */
161 #define VXSPEC_MAJOR            200     /* VERITAS volume config driver */
162 #define VXDMP_MAJOR             201     /* VERITAS volume multipath driver */
163
164 #define MSR_MAJOR               202
165 #define CPUID_MAJOR             203
166
167 #define OSST_MAJOR      206     /* OnStream-SCx0 SCSI tape */
168
169 #define IBM_TTY3270_MAJOR       227     /* Official allocations now */
170 #define IBM_FS3270_MAJOR        228
171
172 /*
173  * Tests for SCSI devices.
174  */
175
176 #define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
177   ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR))
178   
179 #define SCSI_BLK_MAJOR(M) \
180   (SCSI_DISK_MAJOR(M)   \
181    || (M) == SCSI_CDROM_MAJOR)
182
183 static __inline__ int scsi_blk_major(int m) {
184         return SCSI_BLK_MAJOR(m);
185 }
186
187 /*
188  * Tests for IDE devices
189  */
190 #define IDE_DISK_MAJOR(M)       ((M) == IDE0_MAJOR || (M) == IDE1_MAJOR || \
191                                 (M) == IDE2_MAJOR || (M) == IDE3_MAJOR || \
192                                 (M) == IDE4_MAJOR || (M) == IDE5_MAJOR || \
193                                 (M) == IDE6_MAJOR || (M) == IDE7_MAJOR || \
194                                 (M) == IDE8_MAJOR || (M) == IDE9_MAJOR)
195
196 static __inline__ int ide_blk_major(int m)
197 {
198         return IDE_DISK_MAJOR(m);
199 }
200
201 #endif