Commit 2fea0250 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] dev_t [3/3]: major.h cleanups

Patch from Andries.Brouwer@cwi.nl

The third patch removes the last occurrences of MAX_BLKDEV and MAX_CHRDEV and
sorts the majors in major.h.  It also updates the definition of
SCSI_DISK_MAJOR.
parent 826d245f
...@@ -6,85 +6,74 @@ ...@@ -6,85 +6,74 @@
* For the device number assignments, see Documentation/devices.txt. * For the device number assignments, see Documentation/devices.txt.
*/ */
/* limits */ #define UNNAMED_MAJOR 0
#define MEM_MAJOR 1
/* #define RAMDISK_MAJOR 1
* Important: Don't change this to 256. Major number 255 is and must be #define FLOPPY_MAJOR 2
* reserved for future expansion into a larger dev_t space. #define PTY_MASTER_MAJOR 2
*/ #define IDE0_MAJOR 3
#define MAX_CHRDEV 255 #define HD_MAJOR IDE0_MAJOR
#define MAX_BLKDEV 255 #define PTY_SLAVE_MAJOR 3
#define TTY_MAJOR 4
#define UNNAMED_MAJOR 0 #define TTYAUX_MAJOR 5
#define MEM_MAJOR 1 #define LP_MAJOR 6
#define RAMDISK_MAJOR 1 #define VCS_MAJOR 7
#define FLOPPY_MAJOR 2 #define LOOP_MAJOR 7
#define PTY_MASTER_MAJOR 2 #define SCSI_DISK0_MAJOR 8
#define IDE0_MAJOR 3 #define SCSI_TAPE_MAJOR 9
#define PTY_SLAVE_MAJOR 3 #define MD_MAJOR 9
#define HD_MAJOR IDE0_MAJOR #define MISC_MAJOR 10
#define TTY_MAJOR 4 #define SCSI_CDROM_MAJOR 11
#define TTYAUX_MAJOR 5 #define MUX_MAJOR 11 /* PA-RISC only */
#define LP_MAJOR 6 #define QIC02_TAPE_MAJOR 12
#define VCS_MAJOR 7 #define XT_DISK_MAJOR 13
#define LOOP_MAJOR 7 #define SOUND_MAJOR 14
#define SCSI_DISK0_MAJOR 8 #define CDU31A_CDROM_MAJOR 15
#define SCSI_TAPE_MAJOR 9 #define JOYSTICK_MAJOR 15
#define MD_MAJOR 9 #define GOLDSTAR_CDROM_MAJOR 16
#define MISC_MAJOR 10 #define OPTICS_CDROM_MAJOR 17
#define SCSI_CDROM_MAJOR 11 #define SANYO_CDROM_MAJOR 18
#define MUX_MAJOR 11 /* PA-RISC only */ #define CYCLADES_MAJOR 19
#define QIC02_TAPE_MAJOR 12 #define CYCLADESAUX_MAJOR 20
#define XT_DISK_MAJOR 13 #define MITSUMI_X_CDROM_MAJOR 20
#define SOUND_MAJOR 14 #define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */
#define CDU31A_CDROM_MAJOR 15 #define SCSI_GENERIC_MAJOR 21
#define JOYSTICK_MAJOR 15 #define IDE1_MAJOR 22
#define GOLDSTAR_CDROM_MAJOR 16 #define DIGICU_MAJOR 22
#define OPTICS_CDROM_MAJOR 17 #define DIGI_MAJOR 23
#define SANYO_CDROM_MAJOR 18 #define MITSUMI_CDROM_MAJOR 23
#define CYCLADES_MAJOR 19 #define CDU535_CDROM_MAJOR 24
#define CYCLADESAUX_MAJOR 20 #define STL_SERIALMAJOR 24
#define MITSUMI_X_CDROM_MAJOR 20 #define MATSUSHITA_CDROM_MAJOR 25
#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */ #define STL_CALLOUTMAJOR 25
#define SCSI_GENERIC_MAJOR 21 #define MATSUSHITA_CDROM2_MAJOR 26
#define Z8530_MAJOR 34 #define QIC117_TAPE_MAJOR 27
#define DIGI_MAJOR 23 #define MATSUSHITA_CDROM3_MAJOR 27
#define IDE1_MAJOR 22 #define MATSUSHITA_CDROM4_MAJOR 28
#define DIGICU_MAJOR 22 #define STL_SIOMEMMAJOR 28
#define MITSUMI_CDROM_MAJOR 23 #define ACSI_MAJOR 28
#define CDU535_CDROM_MAJOR 24 #define AZTECH_CDROM_MAJOR 29
#define STL_SERIALMAJOR 24 #define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */
#define MATSUSHITA_CDROM_MAJOR 25 #define CM206_CDROM_MAJOR 32
#define STL_CALLOUTMAJOR 25 #define IDE2_MAJOR 33
#define MATSUSHITA_CDROM2_MAJOR 26 #define IDE3_MAJOR 34
#define QIC117_TAPE_MAJOR 27 #define Z8530_MAJOR 34
#define MATSUSHITA_CDROM3_MAJOR 27 #define XPRAM_MAJOR 35 /* Expanded storage on S/390: "slow ram"*/
#define MATSUSHITA_CDROM4_MAJOR 28 #define NETLINK_MAJOR 36
#define STL_SIOMEMMAJOR 28 #define PS2ESDI_MAJOR 36
#define ACSI_MAJOR 28 #define IDETAPE_MAJOR 37
#define AZTECH_CDROM_MAJOR 29 #define Z2RAM_MAJOR 37
#define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */ #define APBLOCK_MAJOR 38 /* AP1000 Block device */
#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */ #define DDV_MAJOR 39 /* AP1000 DDV block device */
#define CM206_CDROM_MAJOR 32 #define NBD_MAJOR 43 /* Network block device */
#define IDE2_MAJOR 33 #define RISCOM8_NORMAL_MAJOR 48
#define IDE3_MAJOR 34 #define DAC960_MAJOR 48 /* 48..55 */
#define XPRAM_MAJOR 35 /* expanded storage on S/390 = "slow ram" */ #define RISCOM8_CALLOUT_MAJOR 49
/* proposed by Peter */ #define MKISS_MAJOR 55
#define NETLINK_MAJOR 36 #define DSP56K_MAJOR 55 /* DSP56001 processor device */
#define PS2ESDI_MAJOR 36
#define IDETAPE_MAJOR 37 #define IDE4_MAJOR 56
#define Z2RAM_MAJOR 37 #define IDE5_MAJOR 57
#define APBLOCK_MAJOR 38 /* AP1000 Block device */
#define DDV_MAJOR 39 /* AP1000 DDV block device */
#define NBD_MAJOR 43 /* Network block device */
#define RISCOM8_NORMAL_MAJOR 48
#define DAC960_MAJOR 48 /* 48..55 */
#define RISCOM8_CALLOUT_MAJOR 49
#define MKISS_MAJOR 55
#define DSP56K_MAJOR 55 /* DSP56001 processor device */
#define IDE4_MAJOR 56
#define IDE5_MAJOR 57
#define SCSI_DISK1_MAJOR 65 #define SCSI_DISK1_MAJOR 65
#define SCSI_DISK2_MAJOR 66 #define SCSI_DISK2_MAJOR 66
...@@ -94,15 +83,6 @@ ...@@ -94,15 +83,6 @@
#define SCSI_DISK6_MAJOR 70 #define SCSI_DISK6_MAJOR 70
#define SCSI_DISK7_MAJOR 71 #define SCSI_DISK7_MAJOR 71
#define SCSI_DISK8_MAJOR 128
#define SCSI_DISK9_MAJOR 129
#define SCSI_DISK10_MAJOR 130
#define SCSI_DISK11_MAJOR 131
#define SCSI_DISK12_MAJOR 132
#define SCSI_DISK13_MAJOR 133
#define SCSI_DISK14_MAJOR 134
#define SCSI_DISK15_MAJOR 135
#define COMPAQ_SMART2_MAJOR 72 #define COMPAQ_SMART2_MAJOR 72
#define COMPAQ_SMART2_MAJOR1 73 #define COMPAQ_SMART2_MAJOR1 73
#define COMPAQ_SMART2_MAJOR2 74 #define COMPAQ_SMART2_MAJOR2 74
...@@ -112,10 +92,31 @@ ...@@ -112,10 +92,31 @@
#define COMPAQ_SMART2_MAJOR6 78 #define COMPAQ_SMART2_MAJOR6 78
#define COMPAQ_SMART2_MAJOR7 79 #define COMPAQ_SMART2_MAJOR7 79
#define SPECIALIX_NORMAL_MAJOR 75 #define SPECIALIX_NORMAL_MAJOR 75
#define SPECIALIX_CALLOUT_MAJOR 76 #define SPECIALIX_CALLOUT_MAJOR 76
#define AURORA_MAJOR 79
#define I2O_MAJOR 80 /* 80->87 */
#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */
#define IDE6_MAJOR 88
#define IDE7_MAJOR 89
#define IDE8_MAJOR 90
#define IDE9_MAJOR 91
#define DASD_MAJOR 94
#define MDISK_MAJOR 95
#define UBD_MAJOR 98
#define JSFD_MAJOR 99
#define PHONE_MAJOR 100
#define COMPAQ_CISS_MAJOR 104 #define COMPAQ_CISS_MAJOR 104
#define COMPAQ_CISS_MAJOR1 105 #define COMPAQ_CISS_MAJOR1 105
#define COMPAQ_CISS_MAJOR2 106 #define COMPAQ_CISS_MAJOR2 106
#define COMPAQ_CISS_MAJOR3 107 #define COMPAQ_CISS_MAJOR3 107
...@@ -126,36 +127,26 @@ ...@@ -126,36 +127,26 @@
#define ATARAID_MAJOR 114 #define ATARAID_MAJOR 114
#define DASD_MAJOR 94 /* Official assignations from Peter */ #define SCSI_DISK8_MAJOR 128
#define SCSI_DISK9_MAJOR 129
#define MDISK_MAJOR 95 /* Official assignations from Peter */ #define SCSI_DISK10_MAJOR 130
#define SCSI_DISK11_MAJOR 131
#define I2O_MAJOR 80 /* 80->87 */ #define SCSI_DISK12_MAJOR 132
#define SCSI_DISK13_MAJOR 133
#define IDE6_MAJOR 88 #define SCSI_DISK14_MAJOR 134
#define IDE7_MAJOR 89 #define SCSI_DISK15_MAJOR 135
#define IDE8_MAJOR 90
#define IDE9_MAJOR 91
#define UBD_MAJOR 98
#define AURORA_MAJOR 79
#define JSFD_MAJOR 99
#define PHONE_MAJOR 100 #define UNIX98_PTY_MASTER_MAJOR 128
#define UNIX98_PTY_MAJOR_COUNT 8
#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
#define RTF_MAJOR 150 #define RTF_MAJOR 150
#define RAW_MAJOR 162 #define RAW_MAJOR 162
#define USB_ACM_MAJOR 166 #define USB_ACM_MAJOR 166
#define USB_ACM_AUX_MAJOR 167 #define USB_ACM_AUX_MAJOR 167
#define USB_CHAR_MAJOR 180 #define USB_CHAR_MAJOR 180
#define UNIX98_PTY_MASTER_MAJOR 128
#define UNIX98_PTY_MAJOR_COUNT 8
#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
#define VXVM_MAJOR 199 /* VERITAS volume i/o driver */ #define VXVM_MAJOR 199 /* VERITAS volume i/o driver */
#define VXSPEC_MAJOR 200 /* VERITAS volume config driver */ #define VXSPEC_MAJOR 200 /* VERITAS volume config driver */
#define VXDMP_MAJOR 201 /* VERITAS volume multipath driver */ #define VXDMP_MAJOR 201 /* VERITAS volume multipath driver */
...@@ -163,17 +154,18 @@ ...@@ -163,17 +154,18 @@
#define MSR_MAJOR 202 #define MSR_MAJOR 202
#define CPUID_MAJOR 203 #define CPUID_MAJOR 203
#define OSST_MAJOR 206 /* OnStream-SCx0 SCSI tape */ #define OSST_MAJOR 206 /* OnStream-SCx0 SCSI tape */
#define IBM_TTY3270_MAJOR 227 /* Official allocations now */ #define IBM_TTY3270_MAJOR 227
#define IBM_FS3270_MAJOR 228 #define IBM_FS3270_MAJOR 228
/* /*
* Tests for SCSI devices. * Tests for SCSI devices.
*/ */
#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \ #define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR)) ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR) || \
((M) >= SCSI_DISK8_MAJOR && (M) <= SCSI_DISK15_MAJOR))
#define SCSI_BLK_MAJOR(M) \ #define SCSI_BLK_MAJOR(M) \
(SCSI_DISK_MAJOR(M) \ (SCSI_DISK_MAJOR(M) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment