Commit 180eb7b9 authored by Linus Torvalds's avatar Linus Torvalds

Linux-2.1.115 - code freeze.

Ok, we've been in a tentative code freeze for a long time, and now it's
final. I've made a 2.1.115 that I hope is good enough, and I won't be
accepting anything but bug-fixes until 2.2..
There are two long-standing patches that I'm still considering:

 - devfs
 - dynamic fd's

and I kind of expect that they'll go in (devfs is configurable, so if you
don't want it you don't need to care, and the dynamic fd's save some
memory and speed certain things up a bit). The reason they're not in now
is mainly that I've been trying to get everything else off my plate, and I
want to ruminate on them in peace for a while.
Bug-fixes are still (and will always be) accepted,

                Linus
parent 29167632
......@@ -899,6 +899,13 @@ S: Kattreinstr 38
S: D-64295
S: Germany
N: Andi Kleen
E: ak@muc.de
D: network hacker, syncookies
S: Schwalbenstr. 96
S: 85551 Ottobrunn
S: Germany
N: Ian Kluft
E: ikluft@thunder.sbay.org
W: http://www.kluft.com/~ikluft/
......@@ -934,13 +941,6 @@ N: Andreas Koensgen
E: ajk@iehk.rwth-aachen.de
D: 6pack driver for AX.25
N: Andi Kleen
E: ak@muc.de
D: network hacker, syncookies
S: Schwalbenstr. 96
S: 85551 Ottobrunn
S: Germany
N: Willy Konynenberg
E: willy@xos.nl
W: http://www.xos.nl/
......
......@@ -1170,6 +1170,26 @@ CONFIG_HUB6
Say Y here to enable support in the dumb serial driver to support
the HUB6 card.
Unix98 PTY support
CONFIG_UNIX98_PTYS
Linux traditionally uses BSD-like /dev/ptyxx and /dev/ttyxx names
for pseudo-ttys (PTYs). This scheme has a number or problems. The
GNU C library 2.1 and later, however, supports the Unix98 naming
standard, using a cloning device /dev/ptmx and numbered devices in a
subdirectory /dev/pts/xxx. The device nodes in /dev/pts can be
automatically generated by the devpts virtual filesystem.
Say Y here if you are uncertain, unless you are very short on memory.
Maximum number of Unix98 PTYs in use (0-2048)
CONFIG_UNIX98_PTY_COUNT
The maximum number of Unix98 PTYs that can be used at any one time.
The default is 256, and should be enough for desktop systems,
however, server machines which support incoming telnet/rlogin/ssh
connections may want to increase this. When not in use, each
additional set of 256 PTYs occupy approximately 8K of kernel memory
on 32-bit architectures.
TGA Console Support
CONFIG_TGA_CONSOLE
Many Alpha systems (e.g the Multia) are shipped with a graphics card
......@@ -6515,10 +6535,7 @@ CONFIG_DEVPTS_FS
/dev/pts/2, for example. The GNU C library glibc 2.1 contains the
requisite support for this mode of operation.
This code is also available as a module called devpts.o ( = code
which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read Documentation/modules.txt.
Say Y here if you have enabled support for Unix98 PTYs.
Macintosh partition map support
CONFIG_MAC_PARTITION
......
\documentstyle{article}
%
% $Id: devices.tex,v 1.12 1998/08/06 04:52:01 hpa Exp $
% ---------------------------------------------------------------------------
% Adopt somewhat reasonable margins, so it doesn't take a million
% pages to print... :-) If you're actually putting this in print, you
% may wish to change these.
%
% $Id: devices.tex,v 1.7 1998/02/18 04:07:45 hpa Exp $
%
\oddsidemargin=0in
\textwidth=6.5in
\topmargin=0in
......@@ -32,7 +30,7 @@
\newcommand{\minordots}{\> \> \> \dots \\}
\newenvironment{devicelist}%
{\begin{tabbing}%
000--000 \= blockxxx \= 000 \= {\file /dev/crambamboli} \= foo \kill}%
000--000 \= blockxxx \= 000 \= {\file /dev/input/keyboardxxx} \= foo \kill}%
{\end{tabbing}}
\newcommand{\link}[4]{{\file #1} \> {\file #2} \> #3 \> #4 \\}
\newcommand{\vlink}[4]{{\file #1} \> {\em #2 \/} \> #3 \> #4 \\}
......@@ -50,7 +48,7 @@ foo \kill}%
%
\title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: February 17, 1998}
\date{Last revised: August 5, 1998}
\maketitle
%
\noindent
......@@ -115,13 +113,13 @@ Your cooperation is appreciated.
\major{ 2}{}{char }{Pseudo-TTY masters}
\major{ }{}{block}{Floppy disks}
\major{ 3}{}{char }{Pseudo-TTY slaves}
\major{ }{}{block}{First MFM, RLL and IDE hard disk/CD-ROM interface}
\major{ }{}{block}{First MFM, RLL or IDE hard disk/CD-ROM interface}
\major{ 4}{}{char }{TTY devices}
\major{ 5}{}{char }{Alternate TTY devices}
\major{ 6}{}{char }{Parallel printer devices}
\major{ 7}{}{char }{Virtual console access devices}
\major{ }{}{block}{Loopback devices}
\major{ 8}{}{block}{SCSI disk devices}
\major{ 8}{}{block}{SCSI disk devices (0-15)}
\major{ 9}{}{char }{SCSI tape devices}
\major{ }{}{block}{Metadisk (RAID) devices}
\major{10}{}{char }{Non-serial mice, misc features}
......@@ -142,10 +140,11 @@ Your cooperation is appreciated.
\major{18}{}{char }{Chase serial card -- alternate devices}
\major{ }{}{block}{Sanyo CD-ROM}
\major{19}{}{char }{Cyclades serial card}
\major{ }{}{block}{Double compressed disk}
\major{ }{}{block}{``Double'' compressed disk}
\major{20}{}{char }{Cyclades serial card -- alternate devices}
\major{ }{}{block}{Hitachi CD-ROM}
\major{21}{}{char }{Generic SCSI access}
\major{ }{}{block }{Acorn MFM hard drive interface}
\major{22}{}{char }{Digiboard serial card}
\major{ }{}{block}{Second IDE hard disk/CD-ROM interface}
\major{23}{}{char }{Digiboard serial card -- alternate devices}
......@@ -161,20 +160,21 @@ Your cooperation is appreciated.
\major{28}{}{char }{Stallion serial card -- card programming}
\major{ }{}{char }{Atari SLM ACSI laser printer (68k/Atari)}
\major{ }{}{block}{Fourth Matsushita (Panasonic/SoundBlaster) CD-ROM}
\major{ }{}{block}{ACSI disk (68k/Atari)}
\major{ }{}{block}{ACSI disk/CD-ROM (68k/Atari)}
\major{29}{}{char }{Universal frame buffer}
\major{ }{}{block}{Aztech/Orchid/Okano/Wearnes CD-ROM}
\major{30}{}{char }{iBCS-2}
\major{ }{}{block}{Philips LMS-205 CD-ROM}
\major{30}{}{char }{iBCS-2 compatibility devices}
\major{ }{}{block}{Philips LMS CM-205 CD-ROM}
\major{31}{}{char }{MPU-401 MIDI}
\major{ }{}{block}{ROM/flash memory card}
\major{32}{}{char }{Specialix serial card}
\major{ }{}{block}{Philips LMS-206 CD-ROM}
\major{ }{}{block}{Philips LMS CM-206 CD-ROM}
\major{33}{}{char }{Specialix serial card -- alternate devices}
\major{ }{}{block}{Third IDE hard disk/CD-ROM interface}
\major{34}{}{char }{Z8530 HDLC driver}
\major{ }{}{block}{Fourth IDE hard disk/CD-ROM interface}
\major{35}{}{char }{tclmidi MIDI driver}
\major{ }{}{block}{Slow memory ramdisk}
\major{36}{}{char }{Netlink support}
\major{ }{}{block}{MCA ESDI hard disk}
\major{37}{}{char }{IDE tape}
......@@ -193,33 +193,50 @@ Your cooperation is appreciated.
\major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
\major{ }{}{block}{Flash Translation Layer (FTL) filesystems}
\major{45}{}{char }{isdn4linux ISDN BRI driver}
\major{ }{}{block}{Reserved for parallel port IDE disk}
\major{ }{}{block}{Parallel port IDE disk devices}
\major{46}{}{char }{Comtrol Rocketport serial card}
\major{ }{}{block}{Reserved for parallel port ATAPI CD-ROM}
\major{ }{}{block}{Parallel port ATAPI CD-ROM devices}
\major{47}{}{char }{Comtrol Rocketport serial card -- alternate devices}
\major{ }{}{block}{Reserved for parallel port ATAPI disk}
\major{ }{}{block}{Parallel port ATAPI disk devices}
\major{48}{}{char }{SDL RISCom serial card}
\major{48}{--55}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{49}{}{char }{SDL RISCom serial card -- alternate devices}
\major{50}{}{char }{Reserved for GLINT}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{50}{}{char}{Reserved for GLINT}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{51}{}{char }{Baycom radio modem}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{52}{}{char }{Spellcaster DataComm/BRI ISDN card}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{53}{}{char }{BDM interface for remote debugging MC683xx microcontrollers}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{54}{}{char }{Electrocardiognosis Holter serial card}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{55}{}{char }{DSP56001 digital signal processor}
\major{ }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
\major{56}{}{char }{Apple Desktop Bus}
\major{ }{}{block}{Fifth IDE hard disk/CD-ROM interface}
\major{57}{}{char }{Hayes ESP serial card}
\major{ }{}{block}{Sixth IDE hard disk/CD-ROM interface}
\major{58}{}{char }{Hayes ESP serial card -- alternate devices}
\major{ }{}{block}{Reserved for logical volume manager}
\major{59}{}{char }{sf firewall package}
\major{60}{--63}{}{Local/experimental use}
\major{64}{}{char }{ENskip kernel encryption package}
\major{65}{}{char }{Sundance ``plink'' Transputer boards}
\major{ }{}{block}{SCSI disk devices (16-31)}
\major{66}{}{char }{YARC PowerPC PCI coprocessor card}
\major{ }{}{block}{SCSI disk devices (32-47)}
\major{67}{}{char }{Coda network filesystem}
\major{ }{}{block}{SCSI disk devices (48-63)}
\major{68}{}{char }{CAPI 2.0 interface}
\major{ }{}{block}{SCSI disk devices (64-79)}
\major{69}{}{char }{MA16 numeric accelerator card}
\major{ }{}{block}{SCSI disk devices (80-95)}
\major{70}{}{char }{SpellCaster Protocol Services Interface}
\major{ }{}{block}{SCSI disk devices (96-111)}
\major{71}{}{char }{Computone IntelliPort II serial card}
\major{ }{}{block}{SCSI disk devices (112-127)}
\major{72}{}{char }{Computone IntelliPort II serial card -- alternate devices}
\major{73}{}{char }{Computone IntelliPort II serial card -- control devices}
\major{74}{}{char }{SCI bridge}
......@@ -239,17 +256,30 @@ Your cooperation is appreciated.
\major{88}{}{char }{COMX synchronous serial card}
\major{89}{}{char }{I$^2$C bus interface}
\major{90}{}{char }{Memory Technology Device (RAM, ROM, Flash)}
\major{91}{}{char }{CAN-Bus devices}
\major{91}{}{char }{CAN-Bus controller}
\major{92}{}{char }{Reserved for ith Kommunikationstechnik MIC ISDN card}
\major{93}{}{char }{IBM Smart Capture Card frame grabber}
\major{94}{}{char }{miroVIDEO DC10/30 capture/playback device}
\major{95}{}{char }{IP Filter}
\major{96}{}{char }{Parallel port ATAPI tape}
\major{95}{}{char }{IP filter}
\major{96}{}{char }{Parallel port ATAPI tape devices}
\major{97}{}{char }{Parallel port generic ATAPI interface}
\major{98}{}{char }{Control and Measurement Device (comedi)}
\major{99}{--119}{}{Unallocated}
\major{98}{}{char }{Control and Mesurement Device (comedi)}
\major{99}{}{char }{Raw parallel ports}
\major{100}{}{char }{POTS (analogue telephone) A/B port}
\major{101}{}{char }{Motorola DSP 56xxx board}
\major{102}{}{char }{Philips SAA5249 Teletext signal decoder}
\major{103}{}{char }{Arla network file system}
\major{104}{}{char }{Flash BIOS support}
\major{105}{}{char }{Comtrol VS-1000 serial card}
\major{106}{}{char }{Comtrol VS-1000 serial card -- alternate devices}
\major{107}{}{char }{3Dfx Voodoo Graphics device}
\major{108}{}{char }{Device independent PPP interface}
\major{109}{}{char }{Reserved for logical volume manager}
\major{110}{--119}{}{Unallocated}
\major{120}{--127}{}{Local/experimental use}
\major{128}{--239}{}{Unallocated}
\major{128}{--135}{char }{Unix98 PTY masters}
\major{136}{--143}{char }{Unix98 PTY slaves}
\major{144}{--239}{}{Unallocated}
\major{240}{--254}{}{Local/experimental use}
\major{255}{}{}{Reserved}
\end{devicelist}
......@@ -257,12 +287,12 @@ Your cooperation is appreciated.
\section{Minor numbers}
\begin{devicelist}
\major{0}{}{}{Unnamed devices (e.g. non-device mounts)}
\major{ 0}{}{}{Unnamed devices (e.g. non-device mounts)}
\minor{0}{}{reserved as null device number}
\end{devicelist}
\begin{devicelist}
\major{1}{}{char}{Memory devices}
\major{ 1}{}{char}{Memory devices}
\minor{1}{/dev/mem}{Physical memory access}
\minor{2}{/dev/kmem}{Kernel virtual memory access}
\minor{3}{/dev/null}{Null device}
......@@ -285,7 +315,7 @@ Earlier kernels had {\file /dev/ramdisk} (1, 1) here. {\file /dev/initrd}
refers to a RAM disk which was preloaded by the boot loader.
\begin{devicelist}
\major{2}{}{char}{Pseudo-TTY masters}
\major{ 2}{}{char}{Pseudo-TTY masters}
\minor{0}{/dev/ptyp0}{First PTY master}
\minor{1}{/dev/ptyp1}{Second PTY master}
\minordots
......@@ -303,9 +333,9 @@ the position within the series.
\end{itemize}
\noindent
In the future, it is likely that the PTY master multiplex ({\file
/dev/ptmx}) device will be used to acquire a PTY on demand. If so,
the actual PTY masters will be unnamed devices.
These are the old-style (BSD) PTY devices; Unix98 devices are on major
128 and above and use the PTY master multiplex ({\file /dev/ptmx}) to
acquire a PTY on demand.
\begin{devicelist}
\major{}{}{block}{Floppy disks}
......@@ -369,7 +399,7 @@ models have been deprecated, since the drive type is insignificant for
these devices.
\begin{devicelist}
\major{3}{}{char}{Pseudo-TTY slaves}
\major{ 3}{}{char}{Pseudo-TTY slaves}
\minor{0}{/dev/ttyp0}{First PTY slave}
\minor{1}{/dev/ttyp1}{Second PTY slave}
\minordots
......@@ -377,8 +407,8 @@ these devices.
\end{devicelist}
\noindent
In the future, Linux may adopt the Unix98 naming scheme {\file
/dev/pts/0}, {\file /dev/pts/1}, ...
These are the old-style (BSD) PTY devices; Unix98 devices are on major
136 and above.
\begin{devicelist}
\major{}{}{block}{First MFM, RLL and IDE hard disk/CD-ROM interface}
......@@ -394,10 +424,10 @@ In the future, Linux may adopt the Unix98 naming scheme {\file
\end{devicelist}
\noindent
For MS-DOS style partition tables (typically used by Linux/i386),
partitions 1-4 are the primary partitions, partitions 5 and up are
logical partitions. For other partitioning schemes, the meaning of
the numbers vary.
For MS-DOS style partition tables (typically used by Linux/i386 and
sometimes on Linux/Alpha), partitions 1-4 are the primary partitions,
partitions 5 and up are logical partitions. For other partitioning
schemes, the meaning of the numbers vary.
\begin{devicelist}
\major{ 4}{}{char }{TTY devices}
......@@ -475,7 +505,7 @@ block devices. The binding to the loopback devices is handled by
{\bf mount}(8) or {\bf losetup}(8).
\begin{devicelist}
\major{ 8}{}{block}{SCSI disk devices}
\major{ 8}{}{block}{SCSI disk devices (0-15)}
\minor{0}{/dev/sda}{First SCSI disk whole disk}
\minor{16}{/dev/sdb}{Second SCSI disk whole disk}
\minor{32}{/dev/sdc}{Third SCSI disk whole disk}
......@@ -570,6 +600,7 @@ physical disks.
\minor{150}{/dev/input/keyboard}{Linux/SGI Irix emulation keyboard}
\minor{151}{/dev/led}{Front panel LEDs}
\minor{152}{/dev/radio}{Radio card (type?)}
\minor{153}{/dev/mergemem}{Memory merge device}
\end{devicelist}
\begin{devicelist}
......@@ -740,11 +771,22 @@ Most distributions name these {\file /dev/sga}, {\file /dev/sgb}...
This sets an unneccesary limit of 26 SCSI devices in the system, and
is counter to standard Linux device-naming practice.
\begin{devicelist}
\major{ }{}{block }{Acorn MFM hard drive interface}
\minor{0}{/dev/mfma}{First MFM drive whole disk}
\minor{64}{/dev/mfmb}{Second MFM drive whole disk}
\end{devicelist}
\noindent
This device is used on the ARM-based Acorn RiscPC. Partitions are
handled the same way as for IDE disks (see major number 3).
\begin{devicelist}
\major{22}{}{char }{Digiboard serial card}
\minor{0}{/dev/ttyD0}{First Digiboard port}
\minor{1}{/dev/ttyD1}{Second Digiboard port}
\minordots
\\
\major{ }{}{block}{Second IDE hard disk/CD-ROM interface}
\minor{0}{/dev/hdc}{Master: whole disk (or CD-ROM)}
\minor{64}{/dev/hdd}{Slave: whole disk (or CD-ROM)}
......@@ -883,29 +925,14 @@ disk (same as SCSI.)
\begin{devicelist}
\major{29}{}{char }{Universal frame buffer}
\minor{0}{/dev/fb0}{First frame buffer}
\minor{1}{/dev/fb0autodetect}{}
\minor{24}{/dev/fb0user0}{}
\minordots
\minor{31}{/dev/fb0user7}{}
\minor{32}{/dev/fb1}{Second frame buffer}
\minor{33}{/dev/fb1autodetect}{}
\minor{56}{/dev/fb1user0}{}
\minordots
\minor{63}{/dev/fb1user7}{}
\minor{64}{/dev/fb2}{Third frame buffer}
\minordots
\minor{224}{/dev/fb7}{Eighth frame buffer}
\end{devicelist}
\noindent
The universal frame buffer device is currently supported only on
Linux/68k and Linux/SPARC. The plain device accesses the frame
buffer at current resolution (Linux/68k calls this file {\file
current}, e.g. {\file /dev/fb0current}); the {\file autodetect} one at
bootup (default) resolution. Minor numbers 2--23 within each frame
buffer assignment are used for specific device-dependent resolutions.
There appears to be no standard naming for these devices. Finally,
24--31 within each device are reserved for user-selected modes,
usually entered at boot time. Currently only Linux/68k uses the
mode-specific devices.
All additional minor device numbers are reserved.
\begin{devicelist}
\major{ }{}{block}{Aztech/Orchid/Okano/Wearnes CD-ROM}
......@@ -924,8 +951,8 @@ mode-specific devices.
\end{devicelist}
\noindent
iBCS-2 requires {\file /dev/nfsd} to be a link to {\file /dev/socksys}
and {\file /dev/X0R} to be a link to {\file /dev/null}.
Additionally, iBCS-2 requires {\file /dev/nfsd} to be a link to {\file
/dev/socksys} and {\file /dev/X0R} to be a link to {\file /dev/null}.
\begin{devicelist}
\major{ }{}{block}{Philips LMS CM-205 CD-ROM}
......@@ -1023,6 +1050,9 @@ major number 3).
\minor{129}{/dev/smpte1}{Second MIDI port, SMPTE timed}
\minor{130}{/dev/smpte2}{Third MIDI port, SMPTE timed}
\minor{131}{/dev/smpte3}{Fourth MIDI port, SMPTE timed}
\\
\major{ }{}{block}{Slow memory ramdisk}
\minor{0}{/dev/slram}{Slow memory ramdisk}
\end{devicelist}
\begin{devicelist}
......@@ -1148,11 +1178,11 @@ MAJOR NUMBER 42 IS NONCOMPLIANT.
\end{devicelist}
\noindent
Network Block Device is somewhat similar to the loopback device: if you
read from it, it sends packets across the network asking a server for
data. If you write to it, it sends packets telling the server to write. It
could be used for mounting filesystems over the net, swapping over the
net, implementing block devices in userland etc.
Network Block Device is somehow similar to loopback devices: If you
read from it, it sends packet accross network asking server for
data. If you write to it, it sends packet telling server to write. It
could be used to mounting filesystems over the net, swapping over the
net, implementing block device in userland etc.
\begin{devicelist}
\major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
......@@ -1272,8 +1302,7 @@ does not support partitioning.
\end{devicelist}
\begin{devicelist}
\major{53}{}{char }{BDM interface for remote debugging MC683xx
microcontrollers}
\major{53}{}{char }{BDM interface for remote debugging MC683xx microcontrollers}
\minor{0}{/dev/pd\_bdm0}{PD BDM interface on {\file lp0}}
\minor{1}{/dev/pd\_bdm1}{PD BDM interface on {\file lp1}}
\minor{2}{/dev/pd\_bdm2}{PD BDM interface on {\file lp2}}
......@@ -1283,7 +1312,7 @@ microcontrollers}
\end{devicelist}
\noindent
This device is used for interfacing to the MC683xx
This device is used for the interfacing to the MC683xx
microcontrollers via Background Debug Mode by use of a Parallel Port
interface. PD is the Motorola Public Domain Interface and ICD is the
commercial interface by P\&E.
......@@ -1324,18 +1353,38 @@ heart monitoring equipment.
Additional devices will be added to this number, all starting with
{\file /dev/adb}.
\begin{devicelist}
\major{ }{}{block}{Fifth IDE hard disk/CD-ROM interface}
\minor{0}{/dev/hdi}{Master: whole disk (or CD-ROM)}
\minor{64}{/dev/hdj}{Slave: whole disk (or CD-ROM)}
\end{devicelist}
\noindent
Partitions are handled the same way as for the first interface (see
major number 3).
\begin{devicelist}
\major{57}{}{char }{Hayes ESP serial card}
\minor{0}{/dev/ttyP0}{First ESP port}
\minor{1}{/dev/ttyP1}{Second ESP port}
\minordots
\\
\major{ }{}{block}{Sixth IDE hard disk/CD-ROM interface}
\minor{0}{/dev/hdk}{Master: whole disk (or CD-ROM)}
\minor{64}{/dev/hdl}{Slave: whole disk (or CD-ROM)}
\end{devicelist}
\noindent
Partitions are handled the same way as for the first interface (see
major number 3).
\begin{devicelist}
\major{58}{}{char }{Hayes ESP serial card -- alternate devices}
\minor{0}{/dev/cup0}{Callout device corresponding to {\file ttyP0}}
\minor{1}{/dev/cup1}{Callout device corresponding to {\file ttyP1}}
\minordots
\\
\major{ }{}{block}{Reserved for logical volume manager}
\end{devicelist}
\begin{devicelist}
......@@ -1381,6 +1430,20 @@ used, in order to avoid conflict with future assignments.
This is a commercial driver; contact James Howes
$<$jth@prosig.demon.co.uk$>$ for information.
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (16-31)}
\minor{0}{/dev/sdq}{17th SCSI disk whole disk}
\minor{16}{/dev/sdr}{18th SCSI disk whole disk}
\minor{32}{/dev/sds}{19th SCSI disk whole disk}
\minordots
\minor{240}{/dev/sdaf}{32nd SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{66}{}{char }{YARC PowerPC PCI coprocessor card}
\minor{0}{/dev/yppcpci0}{First YARC card}
......@@ -1388,6 +1451,20 @@ $<$jth@prosig.demon.co.uk$>$ for information.
\minordots
\end{devicelist}
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (32-47)}
\minor{0}{/dev/sdag}{33rd SCSI disk whole disk}
\minor{16}{/dev/sdah}{34th SCSI disk whole disk}
\minor{32}{/dev/sdai}{35th SCSI disk whole disk}
\minordots
\minor{240}{/dev/sdav}{48th SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{67}{}{char }{Coda network filesystem}
\minor{0}{/dev/cfs0}{Coda cache manager}
......@@ -1396,6 +1473,20 @@ $<$jth@prosig.demon.co.uk$>$ for information.
\noindent
See {\url http://www.coda.cs.cmu.edu\/} for information about Coda.
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (48-63)}
\minor{0}{/dev/sdaw}{49th SCSI disk whole disk}
\minor{16}{/dev/sdax}{50th SCSI disk whole disk}
\minor{32}{/dev/sday}{51st SCSI disk whole disk}
\minordots
\minor{240}{/dev/sdbl}{64th SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{68}{}{char }{CAPI 2.0 interface}
\minor{0}{/dev/capi20}{Control device}
......@@ -1409,11 +1500,39 @@ See {\url http://www.coda.cs.cmu.edu\/} for information about Coda.
ISDN CAPI 2.0 driver for use with CAPI 2.0 applications; currently
supports the AVM B1 card.
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (64-79)}
\minor{0}{/dev/sdbm}{65th SCSI disk whole disk}
\minor{16}{/dev/sdbn}{66th SCSI disk whole disk}
\minor{32}{/dev/sdbo}{67th SCSI disk whole disk}
\minordots
\minor{240}{/dev/sdcb}{80th SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{69}{}{char }{MA16 numeric accelerator card}
\minor{0}{/dev/ma16}{Board memory access}
\end{devicelist}
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (80-95)}
\minor{0}{/dev/sdcc}{81st SCSI disk whole disk}
\minor{16}{/dev/sdcd}{82nd SCSI disk whole disk}
\minor{32}{/dev/sdce}{83th SCSI disk whole disk}
\minordots
\minor{240}{/dev/sdcr}{96th SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{70}{}{char }{SpellCaster Protocol Services Interface}
\minor{0}{/dev/apscfg}{Configuration interface}
......@@ -1425,6 +1544,20 @@ supports the AVM B1 card.
\minor{128}{/dev/apsmon}{Monitor interface}
\end{devicelist}
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (96-111)}
\minor{0}{/dev/sdcs}{97th SCSI disk whole disk}
\minor{16}{/dev/sdct}{98th SCSI disk whole disk}
\minor{32}{/dev/sdcu}{99th SCSI disk whole disk}
\minordots
\minor{240}{/dev/sddh}{112th SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{71}{}{char }{Computone IntelliPort II serial card}
\minor{0}{/dev/ttyF0}{IntelliPort II board 0, port 0}
......@@ -1445,6 +1578,20 @@ supports the AVM B1 card.
\minor{255}{/dev/ttyF255}{IntelliPort II board 3, port 63}
\end{devicelist}
\begin{devicelist}
\major{ }{}{block}{SCSI disk devices (112-127)}
\minor{0}{/dev/sddi}{113th SCSI disk whole disk}
\minor{16}{/dev/sddj}{114th SCSI disk whole disk}
\minor{32}{/dev/sddk}{115th SCSI disk whole disk}
\minordots
\minor{240}{/dev/sddx}{128th SCSI disk whole disk}
\end{devicelist}
\noindent
Partitions are handled in the same way as for IDE disks (see major
number 3) except that the partition limit is 15 rather than 63 per
disk.
\begin{devicelist}
\major{72}{}{char }{Computone IntelliPort II serial card -- alternate devices}
\minor{0}{/dev/cuf0}{Callout device corresponding to {\file ttyF0}}
......@@ -1685,7 +1832,85 @@ See {\url http://stm.lbl.gov/comedi/} or {\url
http://www.llp.fu-berlin.de/}.
\begin{devicelist}
\major{99}{--119}{}{Unallocated}
\major{99}{}{char }{Raw parallel ports}
\minor{0}{/dev/parport0}{First parallel port}
\minor{1}{/dev/parport1}{Second parallel port}
\minordots
\end{devicelist}
\noindent
These devices can be used to drive parallel port devices from
user-space while interacting with the parport sharing code.
\begin{devicelist}
\major{100}{}{char }{POTS (analogue telephone) A/B port}
\minor{0}{/dev/phone0}{First telephone port}
\minor{1}{/dev/phone1}{Second telephone port}
\minordots
\end{devicelist}
\begin{devicelist}
\major{101}{}{char }{Motorola DSP 56xxx board}
\minor{0}{/dev/mdspstat}{Status information}
\minor{1}{/dev/mdsp1}{First DSP board I/O and controls}
\minordots
\minor{16}{/dev/mdsp16}{16th DSP board I/O and controls}
\end{devicelist}
\begin{devicelist}
\major{102}{}{char }{Philips SAA5249 Teletext signal decoder}
\minor{0}{/dev/tlk0}{First Teletext decoder}
\minor{1}{/dev/tlk1}{Second Teletext decoder}
\minor{2}{/dev/tlk2}{Third Teletext decoder}
\minor{3}{/dev/tlk3}{Fourth Teletext decoder}
\end{devicelist}
\begin{devicelist}
\major{103}{}{char }{Arla network file system}
\minor{0}{/dev/xfs0}{Arla XFS}
\end{devicelist}
\noindent
Arla is a free clone of the Andrew File System, AFS. Any resemblance
with the Swedish milk producer is coincidental. For more information
about the project, write to $<$arla-drinkers@stacken.kth.se$>$ or
subscribe to the arla-announce mailing list by sending a mail to
$<$arla-announce-request@stacken.kth.se$>$.
\begin{devicelist}
\major{104}{}{char }{Flash BIOS support}
\end{devicelist}
\begin{devicelist}
\major{105}{}{char }{Comtrol VS-1000 serial card}
\minor{0}{/dev/ttyV0}{First VS-1000 port}
\minor{1}{/dev/ttyV1}{Second VS-1000 port}
\minordots
\end{devicelist}
\begin{devicelist}
\major{106}{}{char }{Comtrol VS-1000 serial card -- alternate devices}
\minor{0}{/dev/cuv0}{Callout device corresponding to {\file ttyV0}}
\minor{1}{/dev/cuv1}{Callout device corresponding to {\file ttyV1}}
\minordots
\end{devicelist}
\begin{devicelist}
\major{107}{}{char }{3Dfx Voodoo Graphics device}
\minor{0}{/dev/3dfx}{Primary 3Dfx graphics device}
\end{devicelist}
\begin{devicelist}
\major{108}{}{char }{Device independent PPP interface}
\minor{0}{/dev/ppp}{Device independent PPP interface}
\end{devicelist}
\begin{devicelist}
\major{109}{}{char }{Reserved for logical volume manager}
\end{devicelist}
\begin{devicelist}
\major{110}{--119}{}{Unallocated}
\end{devicelist}
\begin{devicelist}
......@@ -1693,7 +1918,28 @@ http://www.llp.fu-berlin.de/}.
\end{devicelist}
\begin{devicelist}
\major{128}{--239}{}{Unallocated}
\major{128}{--135}{char }{Unix98 PTY masters}
\end{devicelist}
\noindent
These devices should not have corresponding device nodes; instead they
should be accessed through the {\file /dev/ptmx} cloning device.
\begin{devicelist}
\major{136}{--143}{char }{Unix98 PTY slaves}
\minor{0}{/dev/pts/0}{First Unix98 pseudo-TTY}
\minor{1}{/dev/pts/1}{Second Unix98 pseudo-TTY}
\minordots
\end{devicelist}
\noindent
These device nodes are automatically generated with the proper
permissions and modes by mounting the {\file devpts} filesystem onto
{\file /dev/pts} with the appropriate mount options (distribution
dependent.)
\begin{devicelist}
\major{144}{--239}{}{Unallocated}
\end{devicelist}
\begin{devicelist}
......@@ -1704,6 +1950,11 @@ http://www.llp.fu-berlin.de/}.
\major{255}{}{}{Reserved}
\end{devicelist}
\noindent
This major is reserved to assist the expansion to a larger number
space. No device nodes with this major should ever be created on any
filesystem.
\section{Additional /dev directory entries}
This section details additional entries that should or may exist in the
......@@ -1739,9 +1990,6 @@ It is recommended that these links exist on all systems:
\link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility}
\link{/dev/ftape}{qft0}{symbolic}{Backward compatibility}
\link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs}
\link{/dev/fd?D*}{fd?u*}{hard}{Backward compatibility}
\link{/dev/fd?H*}{fd?u*}{hard}{Backward compatibility}
\link{/dev/fd?E*}{fd?u*}{hard}{Backward compatibility}
\end{nodelist}
\subsection{Locally defined links}
......@@ -1766,7 +2014,8 @@ exist, they should have the following uses.
{\file /dev/modem} should not be used for a modem which supports
dialin as well as dialout, as it tends to cause lock file problems.
If it exists, {\file /dev/modem} should point to the appropriate
dialout (alternate) device.
primary TTY device (the use of the alternate callout devices is
deprecated.)
For SCSI devices, {\file /dev/tape} and {\file /dev/cdrom} should
point to the ``cooked'' devices ({\file /dev/st*} and {\file
......@@ -1806,8 +2055,8 @@ conventions include several historical warts; some of these are
Linux-specific, some were inherited from other systems, and some
reflect Linux outgrowing a borrowed convention.
A hash mark ($\#$) in a device name is used here to indicate a decimal
number without leading zeroes.
A hash mark ($\#$) in a device name is in all cases used here to
indicate a decimal number without leading zeroes.
\subsection{Virtual consoles and the console device}
......@@ -1816,9 +2065,8 @@ monitor. Virtual consoles are named {\file /dev/tty$\#$}, with
numbering starting at {\file /dev/tty1}; {\file /dev/tty0} is the
current virtual console. {\file /dev/tty0} is the device that should
be used to access the system video card on those architectures for
which the frame buffer devices ({\file /dev/fb*}) do not exist
(including the x86). Do not use {\file /dev/console} for this
purpose.
which the frame buffer devices ({\file /dev/fb*}) are not applicable.
Do not use {\file /dev/console} for this purpose.
The {\em console device\/}, {\file /dev/console}, is the device to
which system messages should be sent, and on which logins should be
......@@ -1826,13 +2074,14 @@ permitted in single-user mode. Starting with Linux 2.1.71, {\file
/dev/console} is managed by the kernel; for previous versions it
should be a symbolic link to either {\file /dev/tty0}, a specific
virtual console such as {\file /dev/tty1}, or to a serial port primary
({\file tty}) device, depending on the configuration of the system.
({\file tty*}, not {\file cu*}) device, depending on the configuration
of the system.
\subsection{Serial ports}
Serial ports are RS-232 serial ports and any device which simulates
one, either in hardware (such as internal modems) or in software (such
as the ISDN driver.) Under Linux, each serial port has two device
as the ISDN driver.) Under Linux, each serial ports has two device
names, the primary or callin device and the alternate or callout one.
Each kind of device is indicated by a different letter. For any
letter $X$, the names of the devices are {\file /dev/tty${X\#}$} and
......@@ -1840,8 +2089,10 @@ letter $X$, the names of the devices are {\file /dev/tty${X\#}$} and
/dev/ttyS$\#$} and {\file /dev/ttyC$\#$} correspond to {\file
/dev/cua$\#$} and {\file /dev/cub$\#$}. In the future, it should be
expected that multiple letters will be used; all letters will be upper
case for the {\file tty} device and lower case for the {\file cu}
device.
case for the {\file tty} device (e.g. {\file /dev/ttyDP$\#$} and lower
case for the {\file cu} device (e.g. {\file /dev/cudp$\#$}.
The use of the callout devices is deprecated.
The names {\file /dev/ttyQ$\#$} and {\file /dev/cuq$\#$} are reserved
for local use.
......@@ -1849,8 +2100,8 @@ for local use.
The alternate devices provide for kernel-based exclusion and somewhat
different defaults than the primary devices. Their main purpose is to
allow the use of serial ports with programs with no inherent or broken
support for serial ports. For programs with proper knowledge of
serial port operation, their use should probably be avoided.
support for serial ports. Their use is deprecated, and they may be
removed from a future version of Linux.
Arbitration of serial ports is provided by the use of lock files with
the names {\file /var/lock/LCK..tty${X\#}$}. The contents of the lock
......@@ -1892,9 +2143,14 @@ can be used in the same manner as any TTY device. The master and
slave devices are connected by the kernel, generating the equivalent
of a bidirectional pipe with TTY capabilities.
The entire namespace {\file /dev/[pt]ty[p-za-o][0-9a-z]\/} should be
considered reserved for the future use of PTYs. Should more than 936
PTYs ever become a necessity, we will likely adopt a System V-like
scheme by which PTYs use a subdirectory of {\file /dev}.
Recent versions of the Linux kernels and GNU libc contain support for
the System V/Unix98 naming scheme for PTYs, which assigns a common
device {\file /dev/ptmx\/} to all the masters (opening it will
automatically give you a previously unassigned PTY) and a subdirectory
{\file /dev/pts\/} for the slaves; the slaves are named with decimal
integers ({\file /dev/pts/$\#$\/} in our notation). This removes the
problem of exhausting the namespace and enables the kernel to
automatically create the device nodes for the slaves on demand using
the {\file devpts\/} filesystem.
\end{document}
LINUX ALLOCATED DEVICES
Maintained by H. Peter Anvin <hpa@zytor.com>
Last revised: February 17, 1998
Last revised: August 5, 1998
This list is the Linux Device List, the official registry of allocated
device numbers and /dev directory nodes for the Linux operating
......@@ -92,10 +92,10 @@ Your cooperation is appreciated.
* the fifth letter is one of 0123456789abcdef indicating
the position within the series.
In the future, it is likely that the PTY master
multiplex (/dev/ptmx) device will be used to acquire a
PTY on demand. If so, the actual PTY masters will be
unnamed devices.
These are the old-style (BSD) PTY devices; Unix98
devices are on major 128 and above and use the PTY
master multiplex (/dev/ptmx) to acquire a PTY on
demand.
block Floppy disks
0 = /dev/fd0 First floppy disk autodetect
......@@ -156,8 +156,8 @@ Your cooperation is appreciated.
...
255 = /dev/ttyef 256th PTY slave
In the future, Linux may adopt the Unix98 naming
scheme (/dev/pts/0, /dev/pts/1, ...)
These are the old-style (BSD) PTY devices; Unix98
devices are on major 136 and above.
block First MFM, RLL and IDE hard disk/CD-ROM interface
0 = /dev/hda Master: whole disk (or CD-ROM)
......@@ -236,11 +236,11 @@ Your cooperation is appreciated.
1 = /dev/loop1 Second loopback device
...
The loopback devices are used to mount file systems not
The loopback devices are used to mount filesystems not
associated with block devices. The binding to the
loopback devices is handled by mount(8) or losetup(8).
8 block SCSI disk devices
8 block SCSI disk devices (0-15)
0 = /dev/sda First SCSI disk whole disk
16 = /dev/sdb Second SCSI disk whole disk
32 = /dev/sdc Third SCSI disk whole disk
......@@ -288,7 +288,7 @@ Your cooperation is appreciated.
...
The metadisk driver is used to span a
file system across multiple physical disks.
filesystem across multiple physical disks.
10 char Non-serial mice, misc features
0 = /dev/logibm Logitech bus mouse
......@@ -327,6 +327,7 @@ Your cooperation is appreciated.
150 = /dev/input/keyboard Linux/SGI Irix emulation keyboard
151 = /dev/led Front panel LEDs
152 = /dev/radio Radio card (type?)
153 = /dev/mergemem Memory merge device
11 char Raw keyboard device
0 = /dev/kbd Raw keyboard device
......@@ -387,11 +388,11 @@ Your cooperation is appreciated.
33 = /dev/patmgr1 Sequencer patch manager
34 = /dev/midi02 Third MIDI port
50 = /dev/midi03 Fourth MIDI port
block BIOS hard drive callback support
0 = /dev/dos_hda First BIOS hard drive whole disk
64 = /dev/dos_hdb Second BIOS hard drive whole disk
128 = /dev/dos_hdc Third BIOS hard drive whole disk
192 = /dev/dos_hdd Fourth BIOS hard drive whole disk
block BIOS harddrive callback support
0 = /dev/dos_hda First BIOS harddrive whole disk
64 = /dev/dos_hdb Second BIOS harddrive whole disk
128 = /dev/dos_hdc Third BIOS harddrive whole disk
192 = /dev/dos_hdd Fourth BIOS harddrive whole disk
Partitions are handled in the same way as IDE disks
(see major number 3).
......@@ -457,6 +458,14 @@ Your cooperation is appreciated.
the system and is counter to standard Linux
device-naming practice.
block Acorn MFM hard drive interface
0 = /dev/mfma First MFM drive whole disk
64 = /dev/mfmb Second MFM drive whole disk
This device is used on the ARM-based Acorn RiscPC.
Partitions are handled the same way as for IDE disks
(see major number 3).
22 char Digiboard serial card
0 = /dev/ttyD0 First Digiboard port
1 = /dev/ttyD1 Second Digiboard port
......@@ -576,28 +585,11 @@ Your cooperation is appreciated.
29 char Universal frame buffer
0 = /dev/fb0 First frame buffer
1 = /dev/fb0autodetect
24 = /dev/fb0user0
...
31 = /dev/fb0user7
32 = /dev/fb1 Second frame buffer
33 = /dev/fb1autodetect
56 = /dev/fb1user0
...
63 = /dev/fb1user7
The universal frame buffer device is currently only
supported on Linux/68k and Linux/SPARC. The plain
device accesses the frame buffer at current resolution
(Linux/68k calls this device "current",
e.g. /dev/fb0current); the "autodetect" one at bootup
(default) resolution. Minor numbers 2-23 within each
frame buffer assignment are used for specific
device-dependent resolutions. There appears to be no
standard naming for these devices. Finally, 2-31
within each device are reserved for user-selected
modes, usually entered at boot time. Currently only
Linux/68k uses the mode-specific devices.
...
240 = /dev/fb7 Eighth frame buffer
All additional minor numbers are reserved.
block Aztech/Orchid/Okano/Wearnes CD-ROM
0 = /dev/aztcd Aztech CD-ROM
......@@ -611,8 +603,9 @@ Your cooperation is appreciated.
2 = /dev/inet/udp Network access
2 = /dev/inet/tcp Network access
iBCS-2 requires /dev/nfsd to be a link to
/dev/socksys, and /dev/X0R to be a link to /dev/null.
Additionally, iBCS-2 requires /dev/nfsd to be a link
to /dev/socksys, and /dev/X0R to be a link to
/dev/null.
block Philips LMS CM-205 CD-ROM
0 = /dev/cm205cd Philips LMS CM-205 CD-ROM
......@@ -691,6 +684,8 @@ Your cooperation is appreciated.
129 = /dev/smpte1 Second MIDI port, SMPTE timed
130 = /dev/smpte2 Third MIDI port, SMPTE timed
131 = /dev/smpte3 Fourth MIDI port, SMPTE timed
block Slow memory ramdisk
0 = /dev/slram Slow memory ramdisk
36 char Netlink support
0 = /dev/route Routing, device updates, kernel to user
......@@ -785,18 +780,18 @@ Your cooperation is appreciated.
1 = /dev/nb1 Second network block device
...
The network block device is similar to a loopback device:
if you read from it, it sends packets across the network
asking the server for data. If you write to it, it sends
packets telling the server to write. It could be used to
mount file systems over the net, swap over the net,
implement block devices in userland, etc.
Network Block Device is somehow similar to loopback
devices: If you read from it, it sends packet accross
network asking server for data. If you write to it, it
sends packet telling server to write. It could be used
to mounting filesystems over the net, swapping over
the net, implementing block device in userland etc.
44 char isdn4linux virtual modem - alternate devices
0 = /dev/cui0 Callout device corresponding to ttyI0
...
63 = /dev/cui63 Callout device corresponding to ttyI63
block Flash Translation Layer (FTL) file systems
block Flash Translatio Layer (FTL) filesystems
0 = /dev/ftla FTL on first Memory Technology Device
16 = /dev/ftlb FTL on second Memory Technology Device
32 = /dev/ftlc FTL on third Memory Technology Device
......@@ -918,15 +913,30 @@ Your cooperation is appreciated.
Additional devices will be added to this number, all
starting with /dev/adb.
block Fifth IDE hard disk/CD-ROM interface
0 = /dev/hdi Master: whole disk (or CD-ROM)
64 = /dev/hdj Slave: whole disk (or CD-ROM)
Partitions are handled the same way as for the first
interface (see major number 3).
57 char Hayes ESP serial card
0 = /dev/ttyP0 First ESP port
1 = /dev/ttyP1 Second ESP port
...
block Sixth IDE hard disk/CD-ROM interface
0 = /dev/hdk Master: whole disk (or CD-ROM)
64 = /dev/hdl Slave: whole disk (or CD-ROM)
Partitions are handled the same way as for the first
interface (see major number 3).
58 char Hayes ESP serial card - alternate devices
0 = /dev/cup0 Callout device corresponding to ttyP0
1 = /dev/cup1 Callout device corresponding to ttyP1
...
block Reserved for logical volume manager
59 char sf firewall package
0 = /dev/firewall Communication with sf kernel module
......@@ -960,16 +970,49 @@ Your cooperation is appreciated.
This is a commercial driver; contact James Howes
<jth@prosig.demon.co.uk> for information.
block SCSI disk devices (16-31)
0 = /dev/sdq 16th SCSI disk whole disk
16 = /dev/sdr 17th SCSI disk whole disk
32 = /dev/sds 18th SCSI disk whole disk
...
240 = /dev/sdaf 32nd SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
66 char YARC PowerPC PCI coprocessor card
0 = /dev/yppcpci0 First YARC card
1 = /dev/yppcpci1 Second YARC card
...
block SCSI disk devices (32-47)
0 = /dev/sdag 33th SCSI disk whole disk
16 = /dev/sdah 34th SCSI disk whole disk
32 = /dev/sdai 35th SCSI disk whole disk
...
240 = /dev/sdav 48nd SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
67 char Coda network file system
0 = /dev/cfs0 Coda cache manager
See http://www.coda.cs.cmu.edu for information about Coda.
block SCSI disk devices (48-63)
0 = /dev/sdaw 49th SCSI disk whole disk
16 = /dev/sdax 50th SCSI disk whole disk
32 = /dev/sday 51st SCSI disk whole disk
...
240 = /dev/sdbl 64th SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
68 char CAPI 2.0 interface
0 = /dev/capi20 Control device
1 = /dev/capi20.00 First CAPI 2.0 application
......@@ -980,9 +1023,31 @@ Your cooperation is appreciated.
ISDN CAPI 2.0 driver for use with CAPI 2.0
applications; currently supports the AVM B1 card.
block SCSI disk devices (64-79)
0 = /dev/sdbm 64th SCSI disk whole disk
16 = /dev/sdbn 65th SCSI disk whole disk
32 = /dev/sdbo 66th SCSI disk whole disk
...
240 = /dev/sdcb 80th SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
69 char MA16 numeric accelerator card
0 = /dev/ma16 Board memory access
block SCSI disk devices (80-95)
0 = /dev/sdcc 81st SCSI disk whole disk
16 = /dev/sdcd 82nd SCSI disk whole disk
32 = /dev/sdce 83th SCSI disk whole disk
...
240 = /dev/sdcr 96th SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
70 char SpellCaster Protocol Services Interface
0 = /dev/apscfg Configuration interface
1 = /dev/apsauth Authentication interface
......@@ -992,6 +1057,17 @@ Your cooperation is appreciated.
65 = /dev/apsasync Async command interface
128 = /dev/apsmon Monitor interface
block SCSI disk devices (96-111)
0 = /dev/sdcs 97th SCSI disk whole disk
16 = /dev/sdct 98th SCSI disk whole disk
32 = /dev/sdcu 99th SCSI disk whole disk
...
240 = /dev/sddh 112nd SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
71 char Computone IntelliPort II serial card
0 = /dev/ttyF0 IntelliPort II board 0, port 0
1 = /dev/ttyF1 IntelliPort II board 0, port 1
......@@ -1010,6 +1086,17 @@ Your cooperation is appreciated.
...
255 = /dev/ttyF255 IntelliPort II board 3, port 63
block SCSI disk devices (112-127)
0 = /dev/sddi 113th SCSI disk whole disk
16 = /dev/sddj 114th SCSI disk whole disk
32 = /dev/sddk 115th SCSI disk whole disk
...
240 = /dev/sddx 128th SCSI disk whole disk
Partitions are handled in the same way as for IDE
disks (see major number 3) except that the limit on
partitions is 15.
72 char Computone IntelliPort II serial card - alternate devices
0 = /dev/cuf0 Callout device corresponding to ttyF0
1 = /dev/cuf1 Callout device corresponding to ttyF1
......@@ -1191,16 +1278,86 @@ Your cooperation is appreciated.
See http://stm.lbl.gov/comedi or http://www.llp.fu-berlin.de/.
99-119 UNALLOCATED
99 char Raw parallel ports
0 = /dev/parport0 First parallel port
1 = /dev/parport1 Second parallel port
...
100 char POTS (analogue telephone) A/B port
0 = /dev/phone0 First telephone port
1 = /dev/phone1 Second telephone port
...
101 char Motorola DSP 56xxx board
0 = /dev/mdspstat Status information
1 = /dev/mdsp1 First DSP board I/O controls
...
16 = /dev/mdsp16 16th DSP board I/O controls
102 char Philips SAA5249 Teletext signal decoder
0 = /dev/tlk0 First Teletext decoder
1 = /dev/tlk1 Second Teletext decoder
2 = /dev/tlk2 Third Teletext decoder
3 = /dev/tlk3 Fourth Teletext decoder
103 char Arla network file system
0 = /dev/xfs0 Arla XFS
Arla is a free clone of the Andrew File System, AFS.
Any resemblance with the Swedish milk producer is
coincidental. For more information about the project,
write to <arla-drinkers@stacken.kth.se> or subscribe
to the arla announce mailing list by sending a mail to
<arla-announce-request@stacken.kth.se>.
104 char Flash BIOS support
105 char Comtrol VS-1000 serial controller
0 = /dev/ttyV0 First VS-1000 port
1 = /dev/ttyV1 Second VS-1000 port
...
106 char Comtrol VS-1000 serial controller - alternate devices
0 = /dev/cuv0 First VS-1000 port
1 = /dev/cuv1 Second VS-1000 port
...
107 char 3Dfx Voodoo Graphics device
0 = /dev/3dfx Primary 3Dfx graphics device
108 char Device independent PPP interface
0 = /dev/ppp Device independent PPP interface
109 char Reserved for logical volume manager
108-119 UNALLOCATED
120-127 LOCAL/EXPERIMENTAL USE
128-239 UNALLOCATED
128-135 char Unix98 PTY masters
These devices should not have corresponding device
nodes; instead they should be accessed through the
/dev/ptmx cloning interface.
136-143 char Unix98 PTY slaves
0 = /dev/pts/0 First Unix98 pseudo-TTY
1 = /dev/pts/1 Second Unix98 pesudo-TTY
These device nodes are automatically generated with
the proper permissions and modes by mounting the
devpts filesystem onto /dev/pts with the appropriate
mount options (distribution dependent).
144-239 UNALLOCATED
240-254 LOCAL/EXPERIMENTAL USE
255 RESERVED
This major is reserved to assist the expansion to a
larger number space. No device nodes with this major
should ever be created on the filesystem.
**** ADDITIONAL /dev DIRECTORY ENTRIES
......@@ -1233,7 +1390,6 @@ It is recommended that these links exist on all systems:
/dev/ftape qft0 symbolic Backward compatibility
/dev/scd? sr? hard Alternate SCSI CD-ROM name
Locally defined links
The following links may be established locally to conform to the
......@@ -1247,13 +1403,13 @@ exist, they should have the following uses.
/dev/cdwriter CD-writer symbolic Current CD-writer device
/dev/scanner scanner symbolic Current scanner device
/dev/modem modem port symbolic Current dialout device
/dev/root root device symbolic Current root file system
/dev/root root device symbolic Current root filesystem
/dev/swap swap device symbolic Current swap device
/dev/modem should not be used for a modem which supports dialin as
well as dialout, as it tends to cause lock file problems. If it
exists, /dev/modem should point to the appropriate dialout (alternate)
device.
exists, /dev/modem should point to the appropriate primary TTY device
(the use of the alternate callout devices is deprecated).
For SCSI devices, /dev/tape and /dev/cdrom should point to the
``cooked'' devices (/dev/st* and /dev/sr*, respectively), whereas
......@@ -1280,7 +1436,7 @@ for a session; this includes virtual consoles, serial ports, and
pseudoterminals (PTYs).
All terminal devices share a common set of capabilities known as line
disciplines; these include the common terminal line discipline as well
diciplines; these include the common terminal line dicipline as well
as SLIP and PPP modes.
All terminal devices are named similarly; this section explains the
......@@ -1299,7 +1455,7 @@ monitor. Virtual consoles are named /dev/tty#, with numbering
starting at /dev/tty1; /dev/tty0 is the current virtual console.
/dev/tty0 is the device that should be used to access the system video
card on those architectures for which the frame buffer devices
(/dev/fb*) do not exist (including the x86). Do not use /dev/console
(/dev/fb*) are not applicable. Do not use /dev/console
for this purpose.
The console device, /dev/console, is the device to which system
......@@ -1321,15 +1477,16 @@ letter X, the names of the devices are /dev/ttyX# and /dev/cux#,
respectively; for historical reasons, /dev/ttyS# and /dev/ttyC#
correspond to /dev/cua# and /dev/cub#. In the future, it should be
expected that multiple letters will be used; all letters will be upper
case for the "tty" device and lower case for the "cu" device.
case for the "tty" device (e.g. /dev/ttyDP#) and lower case for the
"cu" device (e.g. /dev/cudp#).
The names /dev/ttyQ# and /dev/cuq# are reserved for local use.
The alternate devices provide for kernel-based exclusion and somewhat
different defaults than the primary devices. Their main purpose is to
allow the use of serial ports with programs with no inherent or broken
support for serial ports. For programs with proper knowledge of
serial port operation, their use should probably be avoided.
support for serial ports. Their use is deprecated, and they may be
removed from a future version of Linux.
Arbitration of serial ports is provided by the use of lock files with
the names /var/lock/LCK..ttyX#. The contents of the lock file should
......@@ -1359,7 +1516,7 @@ port TTY, for which no alternate device would exist.
Pseudoterminals (PTYs)
Pseudoterminals, or PTYs, are used to create login sessions or provide
other capabilities requiring a TTY line discipline (including SLIP or
other capabilities requiring a TTY line dicipline (including SLIP or
PPP capability) to arbitrary data-generation processes. Each PTY has
a master side, named /dev/pty[p-za-e][0-9a-f], and a slave side, named
/dev/tty[p-za-e][0-9a-f]. The kernel arbitrates the use of PTYs by
......@@ -1370,7 +1527,11 @@ can be used in the same manner as any TTY device. The master and
slave devices are connected by the kernel, generating the equivalent
of a bidirectional pipe with TTY capabilities.
The entire namespace /dev/[pt]ty[p-za-o][0-9a-z] should be considered
reserved for the future use of PTYs. Should more than 936 PTYs ever
become a necessity, we will likely adopt a System V-like scheme by
which PTYs use a subdirectory of /dev.
Recent versions of the Linux kernels and GNU libc contain support for
the System V/Unix98 naming scheme for PTYs, which assigns a common
device, /dev/ptmx, to all the masters (opening it will automatically
give you a previously unassigned PTY) and a subdirectory, /dev/pts,
for the slaves; the slaves are named with decimal integers (/dev/pts/#
in our notation). This removes the problem of exhausting the
namespace and enables the kernel to automatically create the device
nodes for the slaves on demand using the "devpts" filesystem.
......@@ -248,12 +248,12 @@ if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
fi
endmenu
source drivers/char/Config.in
source fs/Config.in
source fs/nls/Config.in
source drivers/char/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
......
......@@ -196,6 +196,7 @@ CONFIG_DE4X5=y
# CONFIG_DGRS is not set
# CONFIG_EEXPRESS_PRO100 is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_TLAN is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_DLCI is not set
......@@ -222,36 +223,6 @@ CONFIG_DE4X5=y
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_NLS is not set
#
# Character devices
#
......@@ -261,6 +232,8 @@ CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_MOUSE=y
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_BUSMOUSE is not set
......@@ -276,13 +249,43 @@ CONFIG_PSMOUSE=y
# CONFIG_VIDEO_DEV is not set
# CONFIG_NVRAM is not set
# CONFIG_JOYSTICK is not set
# CONFIG_MISC_RADIO is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_MAC_PARTITION is not set
# CONFIG_NLS is not set
#
# Console drivers
#
......
......@@ -30,6 +30,7 @@
#include <linux/mman.h>
#include <linux/shm.h>
#include <linux/poll.h>
#include <linux/file.h>
#include <asm/fpu.h>
#include <asm/io.h>
......@@ -137,13 +138,11 @@ asmlinkage int osf_getdirentries(unsigned int fd, struct osf_dirent *dirent,
{
int error;
struct file *file;
struct inode *inode;
struct osf_dirent_callback buf;
error = -EBADF;
if (fd >= NR_OPEN)
goto out;
file = current->files->fd[fd];
file = fget(fd);
if (!file)
goto out;
......@@ -154,17 +153,25 @@ asmlinkage int osf_getdirentries(unsigned int fd, struct osf_dirent *dirent,
error = -ENOTDIR;
if (!file->f_op || !file->f_op->readdir)
goto out;
goto out_putf;
/*
* Get the inode's semaphore to prevent changes
* to the directory while we read it.
*/
inode = file->f_dentry->d_inode;
down(&inode->i_sem);
error = file->f_op->readdir(file, &buf, osf_filldir);
up(&inode->i_sem);
if (error < 0)
goto out;
goto out_putf;
error = buf.error;
if (count == buf.count)
goto out;
if (count != buf.count)
error = count - buf.count;
error = count - buf.count;
out_putf:
fput(file);
out:
return error;
}
......@@ -248,13 +255,17 @@ asmlinkage unsigned long osf_mmap(unsigned long addr, unsigned long len,
lock_kernel();
if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
printk("%s: unimplemented OSF mmap flags %04lx\n", current->comm, flags);
printk("%s: unimplemented OSF mmap flags %04lx\n",
current->comm, flags);
if (!(flags & MAP_ANONYMOUS)) {
if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
file = fget(fd);
if (!file)
goto out;
}
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
ret = do_mmap(file, addr, len, prot, flags, off);
if (file)
fput(file);
out:
unlock_kernel();
return ret;
......@@ -340,11 +351,13 @@ asmlinkage int osf_fstatfs(unsigned long fd, struct osf_statfs *buffer, unsigned
lock_kernel();
retval = -EBADF;
if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
file = fget(fd);
if (!file)
goto out;
dentry = file->f_dentry;
if (dentry)
retval = do_osf_statfs(dentry, buffer, bufsiz);
fput(file);
out:
unlock_kernel();
return retval;
......@@ -390,38 +403,41 @@ static int getdev(const char *name, int rdonly, struct dentry **dp)
if (IS_ERR(dentry))
return retval;
retval = -ENOTBLK;
inode = dentry->d_inode;
if (!S_ISBLK(inode->i_mode)) {
dput(dentry);
return -ENOTBLK;
}
if (IS_NODEV(inode)) {
dput(dentry);
return -EACCES;
}
if (!S_ISBLK(inode->i_mode))
goto out_dput;
retval = -EACCES;
if (IS_NODEV(inode))
goto out_dput;
retval = -ENXIO;
dev = inode->i_rdev;
if (MAJOR(dev) >= MAX_BLKDEV) {
dput(dentry);
return -ENXIO;
}
if (MAJOR(dev) >= MAX_BLKDEV)
goto out_dput;
retval = -ENODEV;
fops = get_blkfops(MAJOR(dev));
if (!fops) {
dput(dentry);
return -ENODEV;
}
if (!fops)
goto out_dput;
if (fops->open) {
struct file dummy;
memset(&dummy, 0, sizeof(dummy));
dummy.f_dentry = dentry;
dummy.f_mode = rdonly ? 1 : 3;
retval = fops->open(inode, &dummy);
if (retval) {
dput(dentry);
return retval;
}
if (retval)
goto out_dput;
}
*dp = dentry;
return 0;
retval = 0;
out:
return retval;
out_dput:
dput(dentry);
goto out;
}
static void putdev(struct dentry *dentry)
......@@ -444,17 +460,19 @@ static int osf_ufs_mount(char *dirname, struct ufs_args *args, int flags)
struct dentry *dentry;
struct cdfs_args tmp;
retval = verify_area(VERIFY_READ, args, sizeof(*args));
if (retval)
return retval;
copy_from_user(&tmp, args, sizeof(tmp));
retval = -EFAULT;
if (copy_from_user(&tmp, args, sizeof(tmp)))
goto out;
retval = getdev(tmp.devname, 0, &dentry);
if (retval)
return retval;
retval = do_mount(dentry->d_inode->i_rdev, tmp.devname, dirname, "ext2", flags, NULL);
goto out;
retval = do_mount(dentry->d_inode->i_rdev, tmp.devname, dirname,
"ext2", flags, NULL);
if (retval)
putdev(dentry);
dput(dentry);
out:
return retval;
}
......@@ -464,17 +482,19 @@ static int osf_cdfs_mount(char *dirname, struct cdfs_args *args, int flags)
struct dentry * dentry;
struct cdfs_args tmp;
retval = verify_area(VERIFY_READ, args, sizeof(*args));
if (retval)
return retval;
copy_from_user(&tmp, args, sizeof(tmp));
retval = -EFAULT;
if (copy_from_user(&tmp, args, sizeof(tmp)))
goto out;
retval = getdev(tmp.devname, 1, &dentry);
if (retval)
return retval;
retval = do_mount(dentry->d_inode->i_rdev, tmp.devname, dirname, "iso9660", flags, NULL);
goto out;
retval = do_mount(dentry->d_inode->i_rdev, tmp.devname, dirname,
"iso9660", flags, NULL);
if (retval)
putdev(dentry);
dput(dentry);
out:
return retval;
}
......@@ -484,10 +504,8 @@ static int osf_procfs_mount(char *dirname, struct procfs_args *args, int flags)
int retval;
struct procfs_args tmp;
retval = verify_area(VERIFY_READ, args, sizeof(*args));
if (retval)
return retval;
copy_from_user(&tmp, args, sizeof(tmp));
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
dev = get_unnamed_dev();
if (!dev)
return -ENODEV;
......@@ -533,21 +551,22 @@ asmlinkage int osf_utsname(char *name)
{
int error;
lock_kernel();
error = verify_area(VERIFY_WRITE, name, 5 * 32);
if (error)
goto out;
down(&uts_sem);
copy_to_user(name + 0, system_utsname.sysname, 32);
copy_to_user(name + 32, system_utsname.nodename, 32);
copy_to_user(name + 64, system_utsname.release, 32);
copy_to_user(name + 96, system_utsname.version, 32);
copy_to_user(name + 128, system_utsname.machine, 32);
up(&uts_sem);
error = -EFAULT;
if (copy_to_user(name + 0, system_utsname.sysname, 32))
goto out;
if (copy_to_user(name + 32, system_utsname.nodename, 32))
goto out;
if (copy_to_user(name + 64, system_utsname.release, 32))
goto out;
if (copy_to_user(name + 96, system_utsname.version, 32))
goto out;
if (copy_to_user(name + 128, system_utsname.machine, 32))
goto out;
error = 0;
out:
unlock_kernel();
up(&uts_sem);
return error;
}
......
......@@ -115,12 +115,12 @@ if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
fi
endmenu
source drivers/char/Config.in
source fs/Config.in
source fs/nls/Config.in
source drivers/char/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
......
......@@ -217,36 +217,6 @@ CONFIG_EEXPRESS_PRO100=y
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_AUTOFS_FS=y
# CONFIG_UFS_FS is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_NLS is not set
#
# Character devices
#
......@@ -256,6 +226,8 @@ CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_MOUSE=y
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_BUSMOUSE is not set
......@@ -277,6 +249,37 @@ CONFIG_82C710_MOUSE=y
#
# CONFIG_FTAPE is not set
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_AUTOFS_FS=y
# CONFIG_UFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_MAC_PARTITION is not set
# CONFIG_NLS is not set
#
# Console drivers
#
......
......@@ -240,15 +240,6 @@ endmenu
fi
fi
source fs/Config.in
if [ "$CONFIG_VME" = "n" ]; then
define_bool CONFIG_FB y
source drivers/video/Config.in
fi
source fs/nls/Config.in
mainmenu_option next_comment
comment 'Character devices'
......@@ -343,6 +334,14 @@ if [ "$CONFIG_ATARI" = "y" ]; then
fi
endmenu
source fs/Config.in
if [ "$CONFIG_VME" = "n" ]; then
define_bool CONFIG_FB y
source drivers/video/Config.in
fi
source fs/nls/Config.in
mainmenu_option next_comment
comment 'Sound support'
......
......@@ -183,12 +183,12 @@ if [ "$CONFIG_SGI" != "y" ]; then
endmenu
fi
source drivers/char/Config.in
source fs/Config.in
source fs/nls/Config.in
source drivers/char/Config.in
mainmenu_option next_comment
comment 'Sound'
......
......@@ -51,7 +51,7 @@ CONFIG_SYSCTL=y
# CONFIG_MODULES is not set
#
# Floppy, IDE, and other block devices
# Block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_IDE=y
......@@ -74,6 +74,7 @@ CONFIG_BLK_DEV_IDECD=y
# Additional Block Devices
#
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
......@@ -94,7 +95,6 @@ CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
......@@ -157,12 +157,11 @@ CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
CONFIG_SCSI_NCR53C8XX=y
# CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT is not set
# CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=4
CONFIG_SCSI_NCR53C8XX_SYNC=5
# CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT is not set
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
......@@ -174,7 +173,7 @@ CONFIG_SCSI_NCR53C8XX_SYNC=5
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
CONFIG_JAZZ_ESP=y
# CONFIG_JAZZ_ESP is not set
#
# Network device support
......@@ -196,9 +195,10 @@ CONFIG_PCNET32=y
# CONFIG_CS89x0 is not set
# CONFIG_DE4X5 is not set
# CONFIG_DEC_ELCP is not set
# CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set
# CONFIG_EEXPRESS_PRO100 is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_TLAN is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_DLCI is not set
......@@ -221,6 +221,7 @@ CONFIG_PCNET32=y
# CONFIG_BAYCOM_SER_FDX is not set
# CONFIG_BAYCOM_SER_HDX is not set
# CONFIG_BAYCOM_PAR is not set
# CONFIG_BAYCOM_EPP is not set
# CONFIG_SOUNDMODEM is not set
#
......@@ -233,6 +234,31 @@ CONFIG_PCNET32=y
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_VIDEO_DEV is not set
# CONFIG_NVRAM is not set
# CONFIG_JOYSTICK is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# Filesystems
#
......@@ -260,6 +286,7 @@ CONFIG_LOCKD=y
# CONFIG_ROMFS_FS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_MAC_PARTITION is not set
CONFIG_NLS=y
......@@ -293,30 +320,6 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_KOI8_R is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_VIDEO_DEV is not set
# CONFIG_NVRAM is not set
# CONFIG_JOYSTICK is not set
# CONFIG_MISC_RADIO is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# Sound
#
......
......@@ -168,10 +168,6 @@ if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
fi
endmenu
source fs/Config.in
source fs/nls/Config.in
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
......@@ -179,6 +175,10 @@ endmenu
source drivers/char/Config.in
source fs/Config.in
source fs/nls/Config.in
mainmenu_option next_comment
comment 'Sound'
......
#
# Automatically generated by make menuconfig: don't edit
# Automatically generated make config: don't edit
#
#
......@@ -56,6 +56,10 @@ CONFIG_PROC_DEVICETREE=y
#
# CONFIG_BLK_DEV_FD is not set
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
......@@ -67,6 +71,10 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_SL82C105 is not set
# CONFIG_IDE_CHIPSETS is not set
#
# Additional Block Devices
#
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
......@@ -98,10 +106,18 @@ CONFIG_IP_MULTICAST=y
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#
CONFIG_INET_RARP=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
#
#
#
# CONFIG_IPX is not set
CONFIG_ATALK=m
# CONFIG_X25 is not set
......@@ -119,11 +135,19 @@ CONFIG_ATALK=m
# SCSI support
#
CONFIG_SCSI=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
# CONFIG_CHR_DEV_SG is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
......@@ -209,6 +233,10 @@ CONFIG_DEC_ELCP=m
# CONFIG_COPS is not set
# CONFIG_IPDDP is not set
CONFIG_PPP=m
#
# CCP compressors for PPP are only built as modules.
#
# CONFIG_SLIP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_TR is not set
......@@ -229,6 +257,35 @@ CONFIG_PPP=m
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
# CONFIG_MOUSE is not set
# CONFIG_UMISC is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_VIDEO_DEV is not set
CONFIG_NVRAM=y
# CONFIG_JOYSTICK is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# Filesystems
#
......@@ -256,8 +313,8 @@ CONFIG_HFS_FS=m
# CONFIG_ROMFS_FS is not set
CONFIG_AUTOFS_FS=y
# CONFIG_UFS_FS is not set
# CONFIG_ADFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_ADFS_FS is not set
CONFIG_MAC_PARTITION=y
CONFIG_NLS=y
......@@ -291,33 +348,6 @@ CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_KOI8_R is not set
#
# Console drivers
#
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_MOUSE is not set
# CONFIG_UMISC is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_VIDEO_DEV is not set
CONFIG_NVRAM=y
# CONFIG_JOYSTICK is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# Sound
#
......
......@@ -187,3 +187,4 @@ comment 'Kernel hacking'
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
endmenu
......@@ -40,6 +40,10 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
fi
tristate 'Hayes ESP serial port support' CONFIG_ESPSERIAL
fi
bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
fi
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
if [ "$CONFIG_PRINTER" != "n" ]; then
......
......@@ -11,6 +11,7 @@
* Diacriticals redone & other small changes, aeb@cwi.nl, June 1993
* Added decr/incr_console, dynamic keymaps, Unicode support,
* dynamic function/string keys, led setting, Sept 1994
*
* `Sticky' modifier keys, 951006.
* 11-11-96: SAK should now work in the raw mode (Martin Mares)
*
......@@ -19,7 +20,7 @@
* parts by Geert Uytterhoeven, May 1997
*
* 27-05-97: Added support for the Magic SysRq Key (Martin Mares)
* 16-01-97: Dead-key-twice behavior now configurable (Jiri Hanika)
* 30-07-98: Dead keys redone, aeb@cwi.nl.
*/
#include <linux/config.h>
......@@ -102,12 +103,13 @@ typedef void (k_handfn)(unsigned char value, char up_flag);
static k_handfn
do_self, do_fn, do_spec, do_pad, do_dead, do_cons, do_cur, do_shift,
do_meta, do_ascii, do_lock, do_lowercase, do_slock, do_ignore;
do_meta, do_ascii, do_lock, do_lowercase, do_slock, do_dead2,
do_ignore;
static k_hand key_handler[16] = {
do_self, do_fn, do_spec, do_pad, do_dead, do_cons, do_cur, do_shift,
do_meta, do_ascii, do_lock, do_lowercase, do_slock,
do_ignore, do_ignore, do_ignore
do_meta, do_ascii, do_lock, do_lowercase, do_slock, do_dead2,
do_ignore, do_ignore
};
/* Key types processed even in raw modes */
......@@ -136,7 +138,7 @@ const int max_vals[] = {
255, SIZE(func_table) - 1, SIZE(spec_fn_table) - 1, NR_PAD - 1,
NR_DEAD - 1, 255, 3, NR_SHIFT - 1,
255, NR_ASCII - 1, NR_LOCK - 1, 255,
NR_LOCK - 1
NR_LOCK - 1, 255
};
const int NR_TYPES = SIZE(max_vals);
......@@ -345,6 +347,10 @@ static void applkey(int key, char mode)
static void enter(void)
{
if (diacr) {
put_queue(diacr);
diacr = 0;
}
put_queue(13);
if (vc_kbd_mode(kbd,VC_CRLF))
put_queue(10);
......@@ -541,42 +547,49 @@ static void do_self(unsigned char value, char up_flag)
static unsigned char ret_diacr[NR_DEAD] =
{A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER, A_CEDIL };
/* If a dead key pressed twice, output a character corresponding to it, */
/* unless overriden in accent_table; otherwise just remember the dead key. */
/* Obsolete - for backwards compatibility only */
static void do_dead(unsigned char value, char up_flag)
{
value = ret_diacr[value];
do_dead2(value,up_flag);
}
/*
* Handle dead key. Note that we now may have several
* dead keys modifying the same character. Very useful
* for Vietnamese.
*/
static void do_dead2(unsigned char value, char up_flag)
{
if (up_flag)
return;
value = ret_diacr[value];
if (diacr == value) { /* pressed twice */
put_queue(handle_diacr(value));
return;
}
diacr = value;
diacr = (diacr ? handle_diacr(value) : value);
}
/* If space is pressed, return the character corresponding the pending */
/* dead key, otherwise try to combine the two. */
/*
* We have a combining character DIACR here, followed by the character CH.
* If the combination occurs in the table, return the corresponding value.
* Otherwise, if CH is a space or equals DIACR, return DIACR.
* Otherwise, conclude that DIACR was not combining after all,
* queue it and return CH.
*/
unsigned char handle_diacr(unsigned char ch)
{
int d = diacr;
int i;
diacr = 0;
if (ch == ' ')
return d;
for (i = 0; i < accent_table_size; i++) {
if (accent_table[i].diacr == d && accent_table[i].base == ch)
return accent_table[i].result;
}
if (ch != d) /* dead key pressed twice, put once */
put_queue(d);
if (ch == ' ' || ch == d)
return d;
return ch;
}
......
......@@ -35,9 +35,9 @@ struct pty_struct {
#define PTY_MAGIC 0x5001
static struct tty_driver pty_driver, pty_slave_driver;
static struct tty_driver old_pty_driver, old_pty_slave_driver;
static int pty_refcount;
/* Note: one set of tables for BSD and one for Unix98 */
static struct tty_struct *pty_table[NR_PTYS];
static struct termios *pty_termios[NR_PTYS];
static struct termios *pty_termios_locked[NR_PTYS];
......@@ -46,6 +46,20 @@ static struct termios *ttyp_termios[NR_PTYS];
static struct termios *ttyp_termios_locked[NR_PTYS];
static struct pty_struct pty_state[NR_PTYS];
#ifdef CONFIG_UNIX98_PTYS
/* These are global because they are accessed in tty_io.c */
struct tty_driver ptm_driver[UNIX98_NR_MAJORS];
struct tty_driver pts_driver[UNIX98_NR_MAJORS];
static struct tty_struct *ptm_table[UNIX98_NR_MAJORS][NR_PTYS];
static struct termios *ptm_termios[UNIX98_NR_MAJORS][NR_PTYS];
static struct termios *ptm_termios_locked[UNIX98_NR_MAJORS][NR_PTYS];
static struct tty_struct *pts_table[UNIX98_NR_MAJORS][NR_PTYS];
static struct termios *pts_termios[UNIX98_NR_MAJORS][NR_PTYS];
static struct termios *pts_termios_locked[UNIX98_NR_MAJORS][NR_PTYS];
static struct pty_struct ptm_state[UNIX98_NR_MAJORS][NR_PTYS];
#endif
#define MIN(a,b) ((a) < (b) ? (a) : (b))
static void pty_close(struct tty_struct * tty, struct file * filp)
......@@ -267,7 +281,7 @@ static int pty_open(struct tty_struct *tty, struct file * filp)
line = MINOR(tty->device) - tty->driver.minor_start;
if ((line < 0) || (line >= NR_PTYS))
goto out;
pty = pty_state + line;
pty = (struct pty_struct *)(tty->driver.driver_state) + line;
tty->driver_data = pty;
retval = -EIO;
......@@ -294,6 +308,10 @@ static void pty_set_termios(struct tty_struct *tty, struct termios *old_termios)
__initfunc(int pty_init(void))
{
int i;
/* Traditional BSD devices */
memset(&pty_state, 0, sizeof(pty_state));
memset(&pty_driver, 0, sizeof(struct tty_driver));
pty_driver.magic = TTY_DRIVER_MAGIC;
......@@ -314,6 +332,7 @@ __initfunc(int pty_init(void))
pty_driver.table = pty_table;
pty_driver.termios = pty_termios;
pty_driver.termios_locked = pty_termios_locked;
pty_driver.driver_state = pty_state;
pty_driver.other = &pty_slave_driver;
pty_driver.open = pty_open;
......@@ -337,37 +356,58 @@ __initfunc(int pty_init(void))
pty_slave_driver.table = ttyp_table;
pty_slave_driver.termios = ttyp_termios;
pty_slave_driver.termios_locked = ttyp_termios_locked;
pty_slave_driver.driver_state = pty_state;
pty_slave_driver.other = &pty_driver;
old_pty_driver = pty_driver;
old_pty_driver.driver_name = "compat_pty_master";
old_pty_driver.proc_entry = 0;
old_pty_driver.major = TTY_MAJOR;
old_pty_driver.minor_start = 128;
old_pty_driver.num = (NR_PTYS > 64) ? 64 : NR_PTYS;
old_pty_driver.other = &old_pty_slave_driver;
old_pty_slave_driver = pty_slave_driver;
old_pty_slave_driver.driver_name = "compat_pty_slave";
old_pty_slave_driver.proc_entry = 0;
old_pty_slave_driver.major = TTY_MAJOR;
old_pty_slave_driver.minor_start = 192;
old_pty_slave_driver.num = (NR_PTYS > 64) ? 64 : NR_PTYS;
old_pty_slave_driver.other = &old_pty_driver;
/* only the master pty gets this ioctl (which is why we
if (tty_register_driver(&pty_driver))
panic("Couldn't register pty driver");
if (tty_register_driver(&pty_slave_driver))
panic("Couldn't register pty slave driver");
/*
* only the master pty gets this ioctl (which is why we
* assign it here, instead of up with the rest of the
* pty_driver initialization. <cananian@alumni.princeton.edu>
*/
pty_driver.ioctl = pty_ioctl;
if (tty_register_driver(&pty_driver))
panic("Couldn't register pty driver");
if (tty_register_driver(&pty_slave_driver))
panic("Couldn't register pty slave driver");
if (tty_register_driver(&old_pty_driver))
panic("Couldn't register compat pty driver");
if (tty_register_driver(&old_pty_slave_driver))
panic("Couldn't register compat pty slave driver");
/* Unix98 devices */
#ifdef CONFIG_UNIX98_PTYS
printk("pty: %d Unix98 ptys configured\n", UNIX98_NR_MAJORS*NR_PTYS);
for ( i = 0 ; i < UNIX98_NR_MAJORS ; i++ ) {
ptm_driver[i] = pty_driver;
ptm_driver[i].name = "ptm";
ptm_driver[i].proc_entry = 0;
ptm_driver[i].major = UNIX98_PTY_MASTER_MAJOR+i;
ptm_driver[i].minor_start = 0;
ptm_driver[i].num = NR_PTYS;
ptm_driver[i].other = &pts_driver[i];
ptm_driver[i].table = ptm_table[i];
ptm_driver[i].termios = ptm_termios[i];
ptm_driver[i].termios_locked = ptm_termios_locked[i];
ptm_driver[i].driver_state = ptm_state[i];
pts_driver[i] = pty_slave_driver;
pts_driver[i].name = "pts";
pts_driver[i].proc_entry = 0;
pts_driver[i].major = UNIX98_PTY_SLAVE_MAJOR+i;
pts_driver[i].minor_start = 0;
pts_driver[i].num = ptm_driver[i].num;
pts_driver[i].other = &ptm_driver[i];
pts_driver[i].table = pts_table[i];
pts_driver[i].termios = pts_termios[i];
pts_driver[i].termios_locked = pts_termios_locked[i];
pts_driver[i].driver_state = ptm_state[i];
ptm_driver[i].ioctl = pty_ioctl;
if (tty_register_driver(&ptm_driver[i]))
panic("Couldn't register Unix98 ptm driver major %d",
ptm_driver[i].major);
if (tty_register_driver(&pts_driver[i]))
panic("Couldn't register Unix98 pts driver major %d",
pts_driver[i].major);
}
#endif
return 0;
}
......@@ -65,6 +65,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/devpts_fs.h>
#include <linux/file.h>
......@@ -108,6 +109,10 @@ struct termios tty_std_termios; /* for the benefit of tty drivers */
struct tty_driver *tty_drivers = NULL; /* linked list of tty drivers */
struct tty_ldisc ldiscs[NR_LDISCS]; /* line disc dispatch table */
#ifdef CONFIG_UNIX98_PTYS
extern struct tty_driver ptm_driver[]; /* Unix98 pty masters; for /dev/ptmx */
#endif
/*
* redirect is the pseudo-tty that console output
* is redirected to if asked by TIOCCONS.
......@@ -1230,34 +1235,33 @@ static int tty_open(struct inode * inode, struct file * filp)
device = c->device(c);
noctty = 1;
}
#ifdef CONFIG_UNIX98_PTYS
if (device == PTMX_DEV) {
/* find a free pty. */
struct tty_driver *driver = tty_drivers;
int minor, line;
/* find the pty driver */
for (driver=tty_drivers; driver; driver=driver->next)
if (driver->major == PTY_MASTER_MAJOR)
break;
if (!driver) return -ENODEV;
/* find a minor device that is not in use. */
for (minor=driver->minor_start;
minor<driver->minor_start+driver->num;
minor++) {
device = MKDEV(driver->major, minor);
retval = init_dev(device, &tty);
if (retval==0) break; /* success! */
int major, minor, line;
struct tty_driver *driver;
/* find a device that is not in use. */
retval = -1;
for ( major = 0 ; major < UNIX98_NR_MAJORS ; major++ ) {
driver = &ptm_driver[major];
for (minor = driver->minor_start ;
minor < driver->minor_start + driver->num ;
minor++) {
device = MKDEV(driver->major, minor);
if (!init_dev(device, &tty)) goto ptmx_found; /* ok! */
}
}
if (minor==driver->minor_start+driver->num) /* no success */
return -EIO; /* no free ptys */
return -EIO; /* no free ptys */
ptmx_found:
set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
line = minor - driver->minor_start;
devpts_pty_new(line, MKDEV(driver->other->major, line+driver->other->minor_start));
devpts_pty_new(line + major*NR_PTYS, MKDEV(driver->other->major,
line+driver->other->minor_start));
noctty = 1;
goto init_dev_done;
}
#endif
retval = init_dev(device, &tty);
if (retval)
......
......@@ -100,6 +100,10 @@ linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
Boot Command line options
------------------------------
"aic7xxx=no_reset" - Eliminate the SCSI bus reset during startup.
Some SCSI devices need the initial reset that this option disables
in order to work. If you have problems at bootup, please make sure
you aren't using this option.
"aic7xxx=reverse_scan" - Have the driver register the SCSI cards in the
reverse of the normal order. This may help those people who have more
than one PCI Adaptec controller force the correct controller to be
......
......@@ -209,7 +209,7 @@ struct proc_dir_entry proc_scsi_aic7xxx = {
0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
#define AIC7XXX_C_VERSION "5.0.18"
#define AIC7XXX_C_VERSION "5.0.20"
#define NUMBER(arr) (sizeof(arr) / sizeof(arr[0]))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
......@@ -1051,6 +1051,7 @@ static int aic7xxx_7895_irq_hack = -1; /* This enables a hack to fix
* 1 == Use the Channel B IRQ
*/
static unsigned int aic7xxx_extended = 0; /* extended translation on? */
static unsigned int aic7xxx_no_reset = 0; /* no resetting of SCSI bus */
static int aic7xxx_irq_trigger = -1; /*
* -1 use board setting
* 0 use edge triggered
......@@ -1222,6 +1223,7 @@ aic7xxx_setup(char *s, int *dummy)
unsigned int *flag;
} options[] = {
{ "extended", &aic7xxx_extended },
{ "no_reset", &aic7xxx_no_reset },
{ "irq_trigger", &aic7xxx_irq_trigger },
{ "verbose", &aic7xxx_verbose },
{ "reverse_scan",&aic7xxx_reverse_scan },
......@@ -2292,7 +2294,9 @@ aic7xxx_done(struct aic7xxx_host *p, struct aic7xxx_scb *scb)
}
#define WIDE_INQUIRY_BITS 0x60
#define SYNC_INQUIRY_BITS 0x10
if (buffer[7] & WIDE_INQUIRY_BITS)
if ( (buffer[7] & WIDE_INQUIRY_BITS) &&
(p->needwdtr_copy & (1<<tindex)) &&
(p->type & AHC_WIDE) )
{
p->needwdtr |= (1<<tindex);
p->needwdtr_copy |= (1<<tindex);
......@@ -3166,17 +3170,17 @@ aic7xxx_reset_current_bus(struct aic7xxx_host *p)
scsiseq = aic_inb(p, SCSISEQ);
aic_outb(p, scsiseq | SCSIRSTO, SCSISEQ);
mdelay(1);
mdelay(5);
/* Turn off the bus reset. */
aic_outb(p, scsiseq & ~SCSIRSTO, SCSISEQ);
aic7xxx_clear_intstat(p);
mdelay(2);
aic7xxx_clear_intstat(p);
/* Re-enable reset interrupts. */
aic_outb(p, aic_inb(p, SIMODE1) | ENSCSIRST, SIMODE1);
mdelay(1);
}
/*+F*************************************************************************
......@@ -4803,17 +4807,8 @@ aic7xxx_handle_scsiint(struct aic7xxx_host *p, unsigned char intstat)
Scsi_Cmnd *cmd;
scbptr = aic_inb(p, WAITING_SCBH);
if (scbptr >= p->scb_data->maxhscbs)
{
scb_index = SCB_LIST_NULL;
printk(WARN_LEAD "Bad scbptr %d during SELTO.\n",
p->host_no, -1, -1, -1, scbptr);
}
else
{
aic_outb(p, scbptr, SCBPTR);
scb_index = aic_inb(p, SCB_TAG);
}
aic_outb(p, scbptr, SCBPTR);
scb_index = aic_inb(p, SCB_TAG);
scb = NULL;
if (scb_index < p->scb_data->numscbs)
......@@ -4879,6 +4874,7 @@ aic7xxx_handle_scsiint(struct aic7xxx_host *p, unsigned char intstat)
* Restarting the sequencer will stop the selection and make sure devices
* are allowed to reselect in.
*/
aic_outb(p, 0, SCSISEQ);
aic_outb(p, aic_inb(p, SIMODE1) & ~ENREQINIT, SIMODE1);
p->flags &= ~AHC_HANDLING_REQINITS;
aic_outb(p, CLRSELTIMEO | CLRBUSFREE | CLRREQINIT, CLRSINT1);
......@@ -6407,7 +6403,7 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
scsi_conf |= p->scsi_id_b;
aic_outb(p, scsi_conf | (term) ? TERM_ENB : 0, SCSICONF + 1);
}
if (scsi_conf & RESET_SCSI)
if ( (scsi_conf & RESET_SCSI) && !(aic7xxx_no_reset) )
{
/* Reset SCSI bus B. */
if (aic7xxx_verbose & VERBOSE_PROBE)
......@@ -6443,7 +6439,7 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
}
if (scsi_conf & RESET_SCSI)
if ( (scsi_conf & RESET_SCSI) && !(aic7xxx_no_reset) )
{
/* Reset SCSI bus A. */
if (aic7xxx_verbose & VERBOSE_PROBE)
......@@ -6543,7 +6539,12 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
}
}
aic_outb(p, target_settings, TARG_SCRATCH + i);
/*
* If we reset the bus, then clear the transfer ssettings, else leave
* them be
*/
if ( (scsi_conf & RESET_SCSI) && !(aic7xxx_no_reset) )
aic_outb(p, target_settings, TARG_SCRATCH + i);
if (p->needsdtr_copy & (0x01 << i))
{
short sxfr, j;
......@@ -6581,8 +6582,16 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
}
p->needsdtr = p->needsdtr_copy;
p->needwdtr = p->needwdtr_copy;
aic_outb(p, 0, ULTRA_ENB);
aic_outb(p, 0, ULTRA_ENB + 1);
/*
* If we reset the bus, then clear the transfer ssettings, else leave
* them be
*/
if ( (scsi_conf & RESET_SCSI) && !(aic7xxx_no_reset) )
{
aic_outb(p, 0, ULTRA_ENB);
aic_outb(p, 0, ULTRA_ENB + 1);
}
/*
* Allocate enough hardware scbs to handle the maximum number of
......@@ -7024,7 +7033,12 @@ load_seeprom (struct aic7xxx_host *p, unsigned char *sxfrctl1)
target_settings &= ~0x70;
p->ultraenb &= ~(0x01 << i);
}
aic_outb(p, target_settings, TARG_SCRATCH + i);
/*
* Don't output these settings if we aren't resetting the bus, instead,
* leave the devices current settings in place
*/
if (!(aic7xxx_no_reset))
aic_outb(p, target_settings, TARG_SCRATCH + i);
}
aic_outb(p, ~(p->discenable & 0xFF), DISC_DSB);
aic_outb(p, ~((p->discenable >> 8) & 0xFF), DISC_DSB + 1);
......@@ -9346,6 +9360,7 @@ aic7xxx_release(struct Scsi_Host *host)
if(p->irq)
free_irq(p->irq, p);
release_region(p->base, MAXREG - MINREG);
#ifdef MMAPIO
if(p->maddr)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
......@@ -9354,6 +9369,7 @@ aic7xxx_release(struct Scsi_Host *host)
iounmap((void *) (((unsigned long) p->maddr) & PAGE_MASK));
#endif
}
#endif /* MMAPIO */
prev = NULL;
next = first_aic7xxx;
while(next != NULL)
......
/*********************************************************/
/* This file was written by someone, somewhere, sometime */
/* And is released into the Public Domain */
/*********************************************************/
#ifndef _AWACS_DEFS_H_
#define _AWACS_DEFS_H_
/*******************************/
/* AWACs Audio Register Layout */
/*******************************/
struct awacs_regs {
unsigned control; /* Audio control register */
unsigned pad0[3];
unsigned codec_ctrl; /* Codec control register */
unsigned pad1[3];
unsigned codec_stat; /* Codec status register */
unsigned pad2[3];
unsigned clip_count; /* Clipping count register */
unsigned pad3[3];
unsigned byteswap; /* Data is little-endian if 1 */
};
/*******************/
/* Audio Bit Masks */
/*******************/
/* Audio Control Reg Bit Masks */
/* ----- ------- --- --- ----- */
#define MASK_ISFSEL (0xf) /* Input SubFrame Select */
#define MASK_OSFSEL (0xf << 4) /* Output SubFrame Select */
#define MASK_RATE (0x7 << 8) /* Sound Rate */
#define MASK_CNTLERR (0x1 << 11) /* Error */
#define MASK_PORTCHG (0x1 << 12) /* Port Change */
#define MASK_IEE (0x1 << 13) /* Enable Interrupt on Error */
#define MASK_IEPC (0x1 << 14) /* Enable Interrupt on Port Change */
#define MASK_SSFSEL (0x3 << 15) /* Status SubFrame Select */
/* Audio Codec Control Reg Bit Masks */
/* ----- ----- ------- --- --- ----- */
#define MASK_NEWECMD (0x1 << 24) /* Lock: don't write to reg when 1 */
#define MASK_EMODESEL (0x3 << 22) /* Send info out on which frame? */
#define MASK_EXMODEADDR (0x3ff << 12) /* Extended Mode Address -- 10 bits */
#define MASK_EXMODEDATA (0xfff) /* Extended Mode Data -- 12 bits */
/* Audio Codec Control Address Values / Masks */
/* ----- ----- ------- ------- ------ - ----- */
#define MASK_ADDR0 (0x0 << 12) /* Expanded Data Mode Address 0 */
#define MASK_ADDR_MUX MASK_ADDR0 /* Mux Control */
#define MASK_ADDR_GAIN MASK_ADDR0
#define MASK_ADDR1 (0x1 << 12) /* Expanded Data Mode Address 1 */
#define MASK_ADDR_MUTE MASK_ADDR1
#define MASK_ADDR_RATE MASK_ADDR1
#define MASK_ADDR2 (0x2 << 12) /* Expanded Data Mode Address 2 */
#define MASK_ADDR_VOLA MASK_ADDR2 /* Volume Control A -- Headphones */
#define MASK_ADDR_VOLHD MASK_ADDR2
#define MASK_ADDR4 (0x4 << 12) /* Expanded Data Mode Address 4 */
#define MASK_ADDR_VOLC MASK_ADDR4 /* Volume Control C -- Speaker */
#define MASK_ADDR_VOLSPK MASK_ADDR4
/* Address 0 Bit Masks & Macros */
/* ------- - --- ----- - ------ */
#define MASK_GAINRIGHT (0xf) /* Gain Right Mask */
#define MASK_GAINLEFT (0xf << 4) /* Gain Left Mask */
#define MASK_GAINLINE (0x1 << 8) /* Change Gain for Line??? */
#define MASK_GAINMIC (0x0 << 8) /* Change Gain for Mic??? */
#define MASK_MUX_CD (0x1 << 9) /* Select CD in MUX */
#define MASK_MUX_MIC (0x1 << 10) /* Select Mic in MUX */
#define MASK_MUX_AUDIN (0x1 << 11) /* Select Audio In in MUX */
#define MASK_MUX_LINE MASK_MUX_AUDIN
#define GAINRIGHT(x) ((x) & MASK_GAINRIGHT)
#define GAINLEFT(x) (((x) << 4) & MASK_GAINLEFT)
/* Address 1 Bit Masks */
/* ------- - --- ----- */
#define MASK_ADDR1RES1 (0x3) /* Reserved */
#define MASK_RECALIBRATE (0x1 << 2) /* Recalibrate */
#define MASK_SAMPLERATE (0x7 << 3) /* Sample Rate: */
#define MASK_LOOPTHRU (0x1 << 6) /* Loopthrough Enable */
#define MASK_CMUTE (0x1 << 7) /* Output C (Speaker) Mute when 1 */
#define MASK_SPKMUTE MASK_CMUTE
#define MASK_ADDR1RES2 (0x1 << 8) /* Reserved */
#define MASK_AMUTE (0x1 << 9) /* Output A (Headphone) Mute when 1 */
#define MASK_HDMUTE MASK_AMUTE
#define MASK_PAROUT (0x3 << 10) /* Parallel Out (???) */
#define SAMPLERATE_48000 (0x0 << 3) /* 48 or 44.1 kHz */
#define SAMPLERATE_32000 (0x1 << 3) /* 32 or 29.4 kHz */
#define SAMPLERATE_24000 (0x2 << 3) /* 24 or 22.05 kHz */
#define SAMPLERATE_19200 (0x3 << 3) /* 19.2 or 17.64 kHz */
#define SAMPLERATE_16000 (0x4 << 3) /* 16 or 14.7 kHz */
#define SAMPLERATE_12000 (0x5 << 3) /* 12 or 11.025 kHz */
#define SAMPLERATE_9600 (0x6 << 3) /* 9.6 or 8.82 kHz */
#define SAMPLERATE_8000 (0x7 << 3) /* 8 or 7.35 kHz */
/* Address 2 & 4 Bit Masks & Macros */
/* ------- - - - --- ----- - ------ */
#define MASK_OUTVOLRIGHT (0xf) /* Output Right Volume */
#define MASK_ADDR2RES1 (0x2 << 4) /* Reserved */
#define MASK_ADDR4RES1 MASK_ADDR2RES1
#define MASK_OUTVOLLEFT (0xf << 6) /* Output Left Volume */
#define MASK_ADDR2RES2 (0x2 << 10) /* Reserved */
#define MASK_ADDR4RES2 MASK_ADDR2RES2
#define VOLRIGHT(x) (((~(x)) & MASK_OUTVOLRIGHT))
#define VOLLEFT(x) (((~(x)) << 6) & MASK_OUTVOLLEFT)
/* Audio Codec Status Reg Bit Masks */
/* ----- ----- ------ --- --- ----- */
#define MASK_EXTEND (0x1 << 23) /* Extend */
#define MASK_VALID (0x1 << 22) /* Valid Data? */
#define MASK_OFLEFT (0x1 << 21) /* Overflow Left */
#define MASK_OFRIGHT (0x1 << 20) /* Overflow Right */
#define MASK_ERRCODE (0xf << 16) /* Error Code */
#define MASK_REVISION (0xf << 12) /* Revision Number */
#define MASK_MFGID (0xf << 8) /* Mfg. ID */
#define MASK_CODSTATRES (0xf << 4) /* bits 4 - 7 reserved */
#define MASK_INPPORT (0xf) /* Input Port */
#define MASK_HDPCONN 8 /* headphone plugged in */
/* Clipping Count Reg Bit Masks */
/* -------- ----- --- --- ----- */
#define MASK_CLIPLEFT (0xff << 7) /* Clipping Count, Left Channel */
#define MASK_CLIPRIGHT (0xff) /* Clipping Count, Right Channel */
/* DBDMA ChannelStatus Bit Masks */
/* ----- ------------- --- ----- */
#define MASK_CSERR (0x1 << 7) /* Error */
#define MASK_EOI (0x1 << 6) /* End of Input -- only for Input Channel */
#define MASK_CSUNUSED (0x1f << 1) /* bits 1-5 not used */
#define MASK_WAIT (0x1) /* Wait */
/* Various Rates */
/* ------- ----- */
#define RATE_48000 (0x0 << 8) /* 48 kHz */
#define RATE_44100 (0x0 << 8) /* 44.1 kHz */
#define RATE_32000 (0x1 << 8) /* 32 kHz */
#define RATE_29400 (0x1 << 8) /* 29.4 kHz */
#define RATE_24000 (0x2 << 8) /* 24 kHz */
#define RATE_22050 (0x2 << 8) /* 22.05 kHz */
#define RATE_19200 (0x3 << 8) /* 19.2 kHz */
#define RATE_17640 (0x3 << 8) /* 17.64 kHz */
#define RATE_16000 (0x4 << 8) /* 16 kHz */
#define RATE_14700 (0x4 << 8) /* 14.7 kHz */
#define RATE_12000 (0x5 << 8) /* 12 kHz */
#define RATE_11025 (0x5 << 8) /* 11.025 kHz */
#define RATE_9600 (0x6 << 8) /* 9.6 kHz */
#define RATE_8820 (0x6 << 8) /* 8.82 kHz */
#define RATE_8000 (0x7 << 8) /* 8 kHz */
#define RATE_7350 (0x7 << 8) /* 7.35 kHz */
#define RATE_LOW 1 /* HIGH = 48kHz, etc; LOW = 44.1kHz, etc. */
#endif /* _AWACS_DEFS_H_ */
......@@ -72,9 +72,11 @@ if [ "$CONFIG_UFS_FS" != "n" ]; then
bool 'SMD disklabel (Sun partition tables) support' CONFIG_SMD_DISKLABEL
bool 'Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION
fi
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
tristate '/dev/pts filesystem for Unix98 PTYs' CONFIG_DEVPTS_FS
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'ADFS filesystem support (read only) (EXPERIMENTAL)' CONFIG_ADFS_FS
tristate '/dev/pts filesystem support (EXPERIMENTAL)' CONFIG_DEVPTS_FS
fi
bool 'Macintosh partition map support' CONFIG_MAC_PARTITION
endmenu
......@@ -27,7 +27,8 @@ struct devpts_sb_info {
gid_t gid;
umode_t mode;
struct inode *inodes[NR_PTYS];
unsigned int max_ptys;
struct inode **inodes;
};
#define DEVPTS_SUPER_MAGIC 0x1cd1
......
......@@ -34,7 +34,7 @@ static void devpts_put_super(struct super_block *sb)
struct inode *inode;
int i;
for ( i = 0 ; i < NR_PTYS ; i++ ) {
for ( i = 0 ; i < sbi->max_ptys ; i++ ) {
if ( (inode = sbi->inodes[i]) ) {
if ( inode->i_count != 1 )
printk("devpts_put_super: badness: entry %d count %d\n",
......@@ -48,6 +48,7 @@ static void devpts_put_super(struct super_block *sb)
if ( sbi->next )
SBI(sbi->next)->back = sbi->back;
kfree(sbi->inodes);
kfree(sbi);
#ifdef MODULE
......@@ -138,8 +139,14 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
if ( !sbi )
goto fail_unlock;
sbi->magic = DEVPTS_SBI_MAGIC;
memset(sbi->inodes, 0, sizeof sbi->inodes);
sbi->magic = DEVPTS_SBI_MAGIC;
sbi->max_ptys = unix98_max_ptys;
sbi->inodes = kmalloc(sizeof(struct inode *) * sbi->max_ptys, GFP_KERNEL);
if ( !sbi->inodes ) {
kfree(sbi);
goto fail_unlock;
}
memset(sbi->inodes, 0, sizeof(struct inode *) * sbi->max_ptys);
s->u.generic_sbp = (void *) sbi;
s->s_blocksize = 1024;
......@@ -252,6 +259,7 @@ static int devpts_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
static void devpts_read_inode(struct inode *inode)
{
ino_t ino = inode->i_ino;
struct devpts_sb_info *sbi = SBI(inode->i_sb);
inode->i_op = NULL;
inode->i_mode = 0;
......@@ -270,7 +278,7 @@ static void devpts_read_inode(struct inode *inode)
}
ino -= 2;
if ( ino >= NR_PTYS )
if ( ino >= sbi->max_ptys )
return; /* Bogus */
inode->i_mode = S_IFCHR;
......
......@@ -98,7 +98,7 @@ static int devpts_root_readdir(struct file *filp, void *dirent, filldir_t filldi
filp->f_pos = ++nr;
/* fall through */
default:
while ( nr < NR_PTYS+2 ) {
while ( nr < sbi->max_ptys ) {
int ptynr = nr - 2;
if ( sbi->inodes[ptynr] ) {
genptsname(numbuf, ptynr);
......
......@@ -531,15 +531,23 @@ struct dquot *dqget(kdev_t dev, unsigned int id, short type)
static void add_dquot_ref(kdev_t dev, short type)
{
struct super_block *sb = get_super(dev);
struct file *filp;
struct inode *inode;
if (!sb || !sb->dq_op)
return; /* nothing to do */
for (filp = inuse_filps; filp; filp = filp->f_next) {
if (!filp->f_dentry)
continue;
if (filp->f_dentry->d_sb != sb)
continue;
inode = filp->f_dentry->d_inode;
if (!inode || inode->i_dev != dev)
if (!inode)
continue;
if (filp->f_mode & FMODE_WRITE && inode->i_sb && inode->i_sb->dq_op) {
inode->i_sb->dq_op->initialize(inode, type);
if (filp->f_mode & FMODE_WRITE) {
sb->dq_op->initialize(inode, type);
inode->i_flags |= S_QUOTA;
}
}
......@@ -547,16 +555,23 @@ static void add_dquot_ref(kdev_t dev, short type)
static void reset_dquot_ptrs(kdev_t dev, short type)
{
struct super_block *sb = get_super(dev);
struct file *filp;
struct inode *inode;
if (!sb || !sb->dq_op)
return; /* nothing to do */
for (filp = inuse_filps; filp; filp = filp->f_next) {
if (!filp->f_dentry)
continue;
if (filp->f_dentry->d_sb != sb)
continue;
inode = filp->f_dentry->d_inode;
if (!inode || inode->i_dev != dev)
if (!inode)
continue;
if (IS_QUOTAINIT(inode)) {
if (inode->i_sb && inode->i_sb->dq_op)
inode->i_sb->dq_op->drop(inode);
sb->dq_op->drop(inode);
inode->i_dquot[type] = NODQUOT;
inode->i_flags &= ~S_QUOTA;
}
......
#ifndef __ASM_SMP_H
#define __ASM_SMP_H
#define cpu_logical_map(cpu) (cpu)
#ifdef __SMP__
#include <linux/tasks.h>
......@@ -47,7 +45,8 @@ extern __volatile__ int cpu_number_map[NR_CPUS];
__r0; \
})
#define smp_processor_id() hard_smp_processor_id()
#define smp_processor_id() hard_smp_processor_id()
#define cpu_logical_map(cpu) (cpu)
#endif /* __SMP__ */
......
......@@ -3,10 +3,6 @@
#ifdef __SMP__
#error SMP not supported
#else
#define cpu_logical_map(cpu) (cpu)
#endif
#endif
......@@ -241,13 +241,5 @@ extern __inline int hard_smp_processor_id(void)
#define SMP_FROM_INT 1
#define SMP_FROM_SYSCALL 2
#else
#ifndef ASSEMBLY
extern inline int cpu_logical_map(int cpu)
{
return cpu;
}
#endif
#endif
#endif
......@@ -12,9 +12,9 @@
*
* Gcc-2.7.x has a nasty bug with empty initializers.
*/
#if (__GNUC__ > 2) || (__GNUC_MINOR__ >= 8)
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
typedef struct { } spinlock_t;
#define SPIN_LOCK_UNLOCKED { 0 }
#define SPIN_LOCK_UNLOCKED { }
#else
typedef struct { int gcc_is_buggy; } spinlock_t;
#define SPIN_LOCK_UNLOCKED { 0 }
......
#ifndef __ASM_MIPS_SMP_H
#define __ASM_MIPS_SMP_H
#define cpu_logical_map(cpu) (cpu)
#endif /* __ASM_MIPS_SMP_H */
......@@ -186,13 +186,6 @@ extern __inline__ int hard_smp_processor_id(void)
#define SMP_FROM_SYSCALL 2
#else /* !(__SMP__) */
#ifndef __ASSEMBLY__
extern __inline__ int cpu_logical_map(int cpu)
{
return cpu;
}
#endif
#endif /* !(__SMP__) */
#define NO_PROC_ID 0xFF
......
......@@ -94,13 +94,6 @@ extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
#define PROC_CHANGE_PENALTY 20
#else /* !(__SMP__) */
#ifndef __ASSEMBLY__
extern __inline__ int cpu_logical_map(int cpu)
{
return cpu;
}
#endif
#endif /* !(__SMP__) */
#define NO_PROC_ID 0xFF
......
......@@ -21,23 +21,28 @@
#include <linux/config.h>
#include <linux/kdev_t.h>
#include <linux/tty.h>
#ifdef CONFIG_DEVPTS_FS
void devpts_pty_new(int, kdev_t);
void devpts_pty_kill(int);
#define unix98_max_ptys NR_PTYS * UNIX98_NR_MAJORS;
#elif defined(CONFIG_DEVPTS_FS_MODULE)
#ifdef BUILDING_PTY_C
void (*devpts_upcall_new)(int,kdev_t) = NULL;
void (*devpts_upcall_kill)(int) = NULL;
unsigned int unix98_max_ptys = NR_PTYS * UNIX98_NR_MAJORS;
EXPORT_SYMBOL(devpts_upcall_new);
EXPORT_SYMBOL(devpts_upcall_kill);
EXPORT_SYMBOL(unix98_max_ptys);
#else
extern void (*devpts_upcall_new)(int,kdev_t);
extern void (*devpts_upcall_kill)(int);
extern unsigned int unix98_max_ptys;
#endif
#ifndef BUILDING_DEVPTS
......
......@@ -2,7 +2,6 @@
#define _LINUX_KERNEL_STAT_H
#include <asm/irq.h>
#include <asm/smp.h>
#include <linux/smp.h>
#include <linux/tasks.h>
......
......@@ -8,8 +8,12 @@
/* limits */
#define MAX_CHRDEV 128
#define MAX_BLKDEV 128
/*
* Important: Don't change this to 256. Major number 255 is and must be
* reserved for future expansion into a larger dev_t space.
*/
#define MAX_CHRDEV 255
#define MAX_BLKDEV 255
#define UNNAMED_MAJOR 0
#define MEM_MAJOR 1
......@@ -80,6 +84,10 @@
#define SPECIALIX_NORMAL_MAJOR 75
#define SPECIALIX_CALLOUT_MAJOR 76
#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)
/*
* Tests for SCSI devices.
*/
......
......@@ -64,6 +64,7 @@ extern volatile int smp_msg_id;
#define smp_message_pass(t,m,d,w)
#define smp_threads_ready 1
#define kernel_lock()
#define cpu_logical_map(cpu) 0
#endif
#endif
......@@ -16,7 +16,9 @@
consoles 16 and higher (since it returns a short) */
#ifdef __KERNEL__
#include <linux/config.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <linux/termios.h>
#include <linux/tqueue.h>
#include <linux/tty_driver.h>
......@@ -32,9 +34,25 @@
* (Note: the *_driver.minor_start values 1, 64, 128, 192 are
* hardcoded at present.)
*/
#define NR_PTYS 256
#define NR_PTYS 256 /* ptys/major */
#define NR_LDISCS 16
/*
* Unix98 PTY's can be defined as any multiple of NR_PTYS up to
* UNIX98_PTY_MAJOR_COUNT; this section defines what we need from the
* config options
*/
#ifdef CONFIG_UNIX98_PTYS
# define UNIX98_NR_MAJORS ((CONFIG_UNIX98_PTY_COUNT+NR_PTYS-1)/NR_PTYS)
# if UNIX98_NR_MAJORS <= 0
# undef CONFIG_UNIX98_PTYS
# elif UNIX98_NR_MAJORS > UNIX98_PTY_MAJOR_COUNT
# error Too many Unix98 ptys defined
# undef UNIX98_NR_MAJORS
# define UNIX98_NR_MAJORS UNIX98_PTY_MAJOR_COUNT
# endif
#endif
/*
* These are set up by the setup-routine at boot-time:
*/
......
......@@ -139,6 +139,7 @@ struct tty_driver {
struct tty_struct **table;
struct termios **termios;
struct termios **termios_locked;
void *driver_state; /* only used for the PTY driver */
/*
* Interface routines from the upper tty layer to the tty
......
......@@ -17,6 +17,7 @@ kconfig.tk: ${TOPDIR}/Makefile ${TOPDIR}/arch/${ARCH}/config.in \
cat ${HEADER} >> ./kconfig.tk
./tkparse < ../arch/${ARCH}/config.in >> kconfig.tk
echo "set defaults \"arch/${ARCH}/defconfig\"" >> kconfig.tk
echo "set ARCH \"${ARCH}\"" >> kconfig.tk
cat ${TAIL} >> kconfig.tk
chmod 755 kconfig.tk
......
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