Commit 7a88bde7 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.33

parent d641d85b
...@@ -133,13 +133,12 @@ E: bir7@leland.Stanford.Edu ...@@ -133,13 +133,12 @@ E: bir7@leland.Stanford.Edu
D: Original author of the Linux networking code D: Original author of the Linux networking code
N: Philip Blundell N: Philip Blundell
E: pjb27@cam.ac.uk E: Philip.Blundell@pobox.com
E: pb@nexus.co.uk
E: phil@tazenda.demon.co.uk
D: Device driver hacking (especially EtherExpress16/3C505 net cards) D: Device driver hacking (especially EtherExpress16/3C505 net cards)
D: Some Linux/ARM stuff D: Some Linux/ARM stuff
S: Trinity College D: Co-architect of the parallel port sharing system
S: Cambridge, UK. CB2 1TQ S: 201 Gilbert Road
S: Cambridge, UK. CB4 3PA
N: Thomas Bogendoerfer N: Thomas Bogendoerfer
E: tsbogend@alpha.franken.de E: tsbogend@alpha.franken.de
...@@ -510,6 +509,7 @@ S: USA ...@@ -510,6 +509,7 @@ S: USA
N: Grant Guenther N: Grant Guenther
E: grant@torque.net E: grant@torque.net
D: drivers for parallel port devices: ppa, ez, bpcd D: drivers for parallel port devices: ppa, ez, bpcd
D: original architect of the parallel-port sharing scheme.
S: 906-1001 Bay St. S: 906-1001 Bay St.
S: Toronto, Ontario, M5S 3A6 S: Toronto, Ontario, M5S 3A6
S: Canada S: Canada
...@@ -696,9 +696,11 @@ S: Chapel Hill, North Carolina 27514-4818 ...@@ -696,9 +696,11 @@ S: Chapel Hill, North Carolina 27514-4818
S: USA S: USA
N: Bernhard Kaindl N: Bernhard Kaindl
E: bkaindl@netway.at
E: edv@bartelt.via.at E: edv@bartelt.via.at
D: Author of a menu based configuration tool, kmenu, which D: Author of a menu based configuration tool, kmenu, which
D: is the predecessor of 'make menuconfig' and 'make xconfig'. D: is the predecessor of 'make menuconfig' and 'make xconfig'.
D: digiboard driver update(modularisation work and 2.1.x upd)
S: Tallak 95 S: Tallak 95
S: 8103 Rein S: 8103 Rein
S: Austria S: Austria
...@@ -826,7 +828,8 @@ S: Australia ...@@ -826,7 +828,8 @@ S: Australia
N: Hans Lermen N: Hans Lermen
E: lermen@elserv.ffm.fgan.de E: lermen@elserv.ffm.fgan.de
D: Author of the LOADLIN Linux loader D: Author of the LOADLIN Linux loader, hacking on boot stuff
D: Co-ordinator of DOSEMU releases
S: Am Muehlenweg 38 S: Am Muehlenweg 38
S: D53424 Remagen S: D53424 Remagen
S: Germany S: Germany
...@@ -888,7 +891,7 @@ D: Initial implementation of VC's, pty's and select() ...@@ -888,7 +891,7 @@ D: Initial implementation of VC's, pty's and select()
N: James B. MacLean N: James B. MacLean
E: macleajb@ednet.ns.ca E: macleajb@ednet.ns.ca
W: http://www.ednet.ns.ca/~macleajb/dosemu.html W: http://www.ednet.ns.ca/~macleajb/dosemu.html
D: Coordinator of DOSEMU releases D: Former Co-ordinator of DOSEMU releases
D: Program in DOSEMU D: Program in DOSEMU
S: PO BOX 220, HFX. CENTRAL S: PO BOX 220, HFX. CENTRAL
S: Halifax, Nova Scotia S: Halifax, Nova Scotia
...@@ -1521,6 +1524,13 @@ S: Kruislaan 419 ...@@ -1521,6 +1524,13 @@ S: Kruislaan 419
S: 1098 VA Amsterdam S: 1098 VA Amsterdam
S: The Netherlands S: The Netherlands
N: Tim Waugh
E: tmw20@cyberelk.demon.co.uk
D: Co-architect of the parallel-port sharing system
S: 51 Frensham Road
S: Southsea
S: Hampshire, UK. PO4 8AE
N: Juergen Weigert N: Juergen Weigert
E: jnweiger@immd4.informatik.uni-erlangen.de E: jnweiger@immd4.informatik.uni-erlangen.de
D: The Linux Support Team Erlangen D: The Linux Support Team Erlangen
......
...@@ -835,6 +835,23 @@ CONFIG_CPU_LITTLE_ENDIAN ...@@ -835,6 +835,23 @@ CONFIG_CPU_LITTLE_ENDIAN
be necessary to run older Mips systems, such as the Sony News and be necessary to run older Mips systems, such as the Sony News and
MIPS RC3xxx, in big endian mode. MIPS RC3xxx, in big endian mode.
Plug and Play support
CONFIG_PNP
Plug and Play support allows the kernel to automatically configure some
peripheral devices. Say Y to enable PnP.
Parallel-port support
CONFIG_PNP_PARPORT
If you want to use devices connected to your parallel port (printer,
Zip driver, PLIP link, ...) then you should enable this option and
read Documentation/parport.txt.
Autoprobe for parallel device IDs
CONFIG_PNP_PARPORT_AUTOPROBE
Some IEEE-1284 conformant parallel-port devices can identify themselves
when requested. If this option is enabled the kernel will probe to see
what devices are connected at boot time.
Enable loadable module support Enable loadable module support
CONFIG_MODULES CONFIG_MODULES
Kernel modules are small pieces of compiled code which can be Kernel modules are small pieces of compiled code which can be
...@@ -2076,6 +2093,19 @@ CONFIG_SCSI_PPA ...@@ -2076,6 +2093,19 @@ CONFIG_SCSI_PPA
drive: it will be supported automatically if you said Y to the drive: it will be supported automatically if you said Y to the
generic "SCSI disk support", above. generic "SCSI disk support", above.
EPP FIFO Checking
CONFIG_SCSI_PPA_HAVE_PEDANTIC
Some chipsets are slower then their motherboard. We have to control
the state of the FIFO now and then. The values are 0 (don't check
FIFO), 1 (check FIFO every 4 bytes), 2 (check FIFO every other byte)
and 3 (check FIFO every time). If your EPP chipset is from the SMC
series, you are likely to have to set this value greater than 0.
EPP Timing
CONFIG_SCSI_PPA_EPP_TIME
This is the "reset time period", a delay time. Too low a value may
cause all sorts of mid-level SCSI problems.
Network device support? Network device support?
CONFIG_NETDEVICES CONFIG_NETDEVICES
You can say N here in case you don't intend to connect to any other You can say N here in case you don't intend to connect to any other
...@@ -4091,24 +4121,12 @@ CONFIG_PRINTER ...@@ -4091,24 +4121,12 @@ CONFIG_PRINTER
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to compile this sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to compile this
as a module ( = code which can be inserted in and removed from the as a module ( = code which can be inserted in and removed from the
running kernel whenever you want), say M here and read running kernel whenever you want), say M here and read
Documentation/modules.txt. The module will be called plip.o. If you Documentation/modules.txt.
want to use both a parallel printer and PLIP, there are two cases:
1) If the printer and the PLIP cable are to use the same parallel CONFIG_PRINTER_READBACK
port (presumably because you have just one), it is best to compile If your printer conforms to IEEE 1284, it may be able to provide a status
both drivers as modules and load and unload them as needed. 2) To indication when you read from it (for example, with `cat /dev/lp1'). To
use different parallel ports for the printer and the PLIP cable, you use this feature, say Y here.
can say Y to this printer driver, specify the base address of the
parallel port(s) to use for the printer(s) with the "lp" kernel
command line option. (Try "man bootparam" or see the documentation
of your boot loader (lilo or loadlin) about how to pass options to
the kernel at boot time. The lilo procedure is also explained in the
SCSI-HOWTO, available via ftp (user: anonymous) in
sunsite.unc.edu:/pub/Linux/docs/HOWTO.) The standard base addresses
as well as the syntax of the "lp" command line option can be found
in drivers/char/lp.c. You can then say Y to the PLIP driver or,
preferably, M in which case Documentation/networking/net-modules.txt
tells you how to specify the port and IRQ to be used by PLIP at
module load time.
Mouse Support (not serial mice) Mouse Support (not serial mice)
CONFIG_MOUSE CONFIG_MOUSE
......
...@@ -46,7 +46,7 @@ foo \kill}% ...@@ -46,7 +46,7 @@ foo \kill}%
% %
\title{{\bf Linux Allocated Devices}} \title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$} \author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: March 3, 1997} \date{Last revised: April 7, 1997}
\maketitle \maketitle
% %
\noindent \noindent
...@@ -171,6 +171,7 @@ reply. ...@@ -171,6 +171,7 @@ reply.
\major{ }{}{block}{MicroSolutions BackPack parallel port CD-ROM} \major{ }{}{block}{MicroSolutions BackPack parallel port CD-ROM}
\major{42}{}{}{Demo/sample use} \major{42}{}{}{Demo/sample use}
\major{43}{}{char }{isdn4linux virtual modem} \major{43}{}{char }{isdn4linux virtual modem}
\major{ }{}{block}{Network block devices}
\major{44}{}{char }{isdn4linux virtual modem -- alternate devices} \major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
\major{45}{}{char }{isdn4linux ISDN BRI driver} \major{45}{}{char }{isdn4linux ISDN BRI driver}
\major{46}{}{char }{Comtrol Rocketport serial card} \major{46}{}{char }{Comtrol Rocketport serial card}
...@@ -199,7 +200,14 @@ reply. ...@@ -199,7 +200,14 @@ reply.
\major{72}{}{char }{Computone IntelliPort II serial card -- alternate devices} \major{72}{}{char }{Computone IntelliPort II serial card -- alternate devices}
\major{73}{}{char }{Computone IntelliPort II serial card -- control devices} \major{73}{}{char }{Computone IntelliPort II serial card -- control devices}
\major{74}{}{char }{SCI bridge} \major{74}{}{char }{SCI bridge}
\major{75}{--119}{}{Unallocated} \major{75}{}{char }{Specialix IO8+ serial card}
\major{76}{}{char }{Specialix IO8+ serial card -- alternate devices}
\major{77}{}{char }{ComScire Quantum Noise Generator}
\major{78}{}{char }{PAM Software's multimodem boards}
\major{79}{}{char }{PAM Software's multimodem boards -- alternate devices}
\major{80}{}{char }{Photometrics AT200 CCD camera}
\major{81}{}{char }{Brooktree Bt848 frame grabbers}
\major{82}{--119}{}{Unallocated}
\major{120}{--127}{}{Local/experimental use} \major{120}{--127}{}{Local/experimental use}
\major{128}{--239}{}{Unallocated} \major{128}{--239}{}{Unallocated}
\major{240}{--254}{}{Local/experimental use} \major{240}{--254}{}{Local/experimental use}
...@@ -494,6 +502,8 @@ physical disks. ...@@ -494,6 +502,8 @@ physical disks.
\minor{140}{/dev/relay8}{Berkshire Products Octal relay card} \minor{140}{/dev/relay8}{Berkshire Products Octal relay card}
\minor{141}{/dev/relay16}{Berkshire Products ISO-16 relay card} \minor{141}{/dev/relay16}{Berkshire Products ISO-16 relay card}
\minor{142}{/dev/msr}{x86 model specific registers} \minor{142}{/dev/msr}{x86 model specific registers}
\minor{143}{/dev/pciconf}{PCI configuration space}
\minor{144}{/dev/nvram}{Non-volatile configuration RAM}
\end{devicelist} \end{devicelist}
\begin{devicelist} \begin{devicelist}
...@@ -659,6 +669,11 @@ See the Double documentation for an explanation of the ``mirror'' devices. ...@@ -659,6 +669,11 @@ See the Double documentation for an explanation of the ``mirror'' devices.
\minordots \minordots
\end{devicelist} \end{devicelist}
\noindent
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} \begin{devicelist}
\major{22}{}{char }{Digiboard serial card} \major{22}{}{char }{Digiboard serial card}
\minor{0}{/dev/ttyD0}{First Digiboard port} \minor{0}{/dev/ttyD0}{First Digiboard port}
...@@ -1033,8 +1048,20 @@ driver with this number should not cause ill effects to the system ...@@ -1033,8 +1048,20 @@ driver with this number should not cause ill effects to the system
\minor{0}{/dev/ttyI0}{First virtual modem} \minor{0}{/dev/ttyI0}{First virtual modem}
\minordots \minordots
\minor{63}{/dev/ttyI63}{64th virtual modem} \minor{63}{/dev/ttyI63}{64th virtual modem}
\\
\major{ }{}{block}{Network block devices}
\minor{0}{/dev/nd0}{First network block device}
\minor{1}{/dev/nd1}{Second network block device}
\minordots
\end{devicelist} \end{devicelist}
\noindent
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} \begin{devicelist}
\major{44}{}{char }{isdn4linux virtual modem -- alternate devices} \major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
\minor{0}{/dev/cui0}{Callout device corresponding to {\file ttyI0}} \minor{0}{/dev/cui0}{Callout device corresponding to {\file ttyI0}}
...@@ -1310,7 +1337,62 @@ supports the AVM B1 card. ...@@ -1310,7 +1337,62 @@ supports the AVM B1 card.
Currently for Dolphin Interconnect Solutions' PCI-SCI bridge. Currently for Dolphin Interconnect Solutions' PCI-SCI bridge.
\begin{devicelist} \begin{devicelist}
\major{75}{--119}{}{Unallocated} \major{75}{}{char }{Specialix IO8+ serial card}
\minor{0}{/dev/ttyW0}{First IO8+ port, first card}
\minor{1}{/dev/ttyW1}{Second IO8+ port, first card}
\minordots
\minor{8}{/dev/ttyW8}{First IO8+ port, second card}
\minordots
\end{devicelist}
\begin{devicelist}
\major{76}{}{char }{Specialix IO8+ serial card -- alternate devices}
\minor{0}{/dev/cuw0}{Callout device corresponding to {\file ttyW0}}
\minor{1}{/dev/cuw1}{Callout device corresponding to {\file ttyW1}}
\minordots
\minor{8}{/dev/cuw8}{Callout device corresponding to {\file ttyW8}}
\minordots
\end{devicelist}
\begin{devicelist}
\major{77}{}{char }{ComScire Quantum Noise Generator}
\minor{0}{/dev/qng}{ComScire Quantum Noise Generator}
\end{devicelist}
\begin{devicelist}
\major{78}{}{char }{PAM Software's multimodem boards}
\minor{0}{/dev/ttyM0}{First PAM modem}
\minor{1}{/dev/ttyM1}{Second PAM modem}
\minordots
\end{devicelist}
\begin{devicelist}
\major{79}{}{char }{PAM Software's multimodem boards -- alternate devices}
\minor{0}{/dev/cum0}{Callout device corresponding to {\file ttyM0}}
\minor{1}{/dev/cum1}{Callout device corresponding to {\file ttyM1}}
\minordots
\end{devicelist}
\begin{devicelist}
\major{80}{}{char }{Photometrics AT200 CCD camera}
\minor{0}{/dev/at200}{Photometrics AT200 CCD camera}
\end{devicelist}
\begin{devicelist}
\major{81}{}{char }{Brooktree Bt848 frame grabbers}
\minor{0}{/dev/bttv0}{First Bt848 card}
\minor{0}{/dev/bttv1}{Second Bt848 card}
\minordots
\minor{16}{/dev/bttvc0}{Control for first Bt848 card}
\minor{17}{/dev/bttvc1}{Control for second Bt848 card}
\minordots
\minor{32}{/dev/bttv-vbi0}{VBI data of first Bt848 card}
\minor{33}{/dev/bttv-vbi1}{VBI data of second Bt848 card}
\minordots
\end{devicelist}
\begin{devicelist}
\major{82}{--119}{}{Unallocated}
\end{devicelist} \end{devicelist}
\begin{devicelist} \begin{devicelist}
...@@ -1467,6 +1549,9 @@ expected that multiple letters will be used; all letters will be upper ...@@ -1467,6 +1549,9 @@ 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} case for the {\file tty} device and lower case for the {\file cu}
device. device.
The names {\file /dev/ttyQ$\#$} and {\file /dev/cuq$\#$} are reserved
for local use.
The alternate devices provide for kernel-based exclusion and somewhat The alternate devices provide for kernel-based exclusion and somewhat
different defaults than the primary devices. Their main purpose is to different defaults than the primary devices. Their main purpose is to
allow the use of serial ports with programs with no inherent or broken allow the use of serial ports with programs with no inherent or broken
......
LINUX ALLOCATED DEVICES LINUX ALLOCATED DEVICES
Maintained by H. Peter Anvin <hpa@zytor.com> Maintained by H. Peter Anvin <hpa@zytor.com>
Last revised: March 3, 1997 Last revised: April 7, 1997
This list is the successor to Rick Miller's Linux Device List, which This list is the successor to Rick Miller's Linux Device List, which
he stopped maintaining when he got busy with other things in 1993. It he stopped maintaining when he got busy with other things in 1993. It
...@@ -285,6 +284,9 @@ reply. ...@@ -285,6 +284,9 @@ reply.
139 = /dev/openprom SPARC OpenBoot PROM 139 = /dev/openprom SPARC OpenBoot PROM
140 = /dev/relay8 Berkshire Products Octal relay card 140 = /dev/relay8 Berkshire Products Octal relay card
141 = /dev/relay16 Berkshire Products ISO-16 relay card 141 = /dev/relay16 Berkshire Products ISO-16 relay card
142 = /dev/msr x86 model-specific registers
143 = /dev/pciconf PCI configuration space
144 = /dev/nvram Non-volatile configuration RAM
11 char Raw keyboard device 11 char Raw keyboard device
0 = /dev/kbd Raw keyboard device 0 = /dev/kbd Raw keyboard device
...@@ -410,6 +412,11 @@ reply. ...@@ -410,6 +412,11 @@ reply.
1 = /dev/sg1 Second generic SCSI device 1 = /dev/sg1 Second generic SCSI device
... ...
Most distributions name these /dev/sga, /dev/sgb...;
this sets an unnecessary limit of 26 SCSI devices in
the system and is counter to standard Linux
device-naming practice.
22 char Digiboard serial card 22 char Digiboard serial card
0 = /dev/ttyD0 First Digiboard port 0 = /dev/ttyD0 First Digiboard port
1 = /dev/ttyD1 Second Digiboard port 1 = /dev/ttyD1 Second Digiboard port
...@@ -707,6 +714,17 @@ reply. ...@@ -707,6 +714,17 @@ reply.
0 = /dev/ttyI0 First virtual modem 0 = /dev/ttyI0 First virtual modem
... ...
63 = /dev/ttyI63 64th virtual modem 63 = /dev/ttyI63 64th virtual modem
block Network block devices
0 = /dev/nb0 First network block device
1 = /dev/nb1 Second network block device
...
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 44 char isdn4linux virtual modem - alternate devices
0 = /dev/cui0 Callout device corresponding to ttyI0 0 = /dev/cui0 Callout device corresponding to ttyI0
...@@ -920,7 +938,48 @@ reply. ...@@ -920,7 +938,48 @@ reply.
Currently for Dolphin Interconnect Solutions' PCI-SCI Currently for Dolphin Interconnect Solutions' PCI-SCI
bridge. bridge.
75-119 UNALLOCATED 75 char Specialix IO8+ serial card
0 = /dev/ttyW0 First IO8+ port, first card
1 = /dev/ttyW1 Second IO8+ port, first card
...
8 = /dev/ttyW8 First IO8+ port, second card
...
76 char Specialix IO8+ serial card - alternate devices
0 = /dev/cuw0 Callout device corresponding to ttyW0
1 = /dev/cuw1 Callout device corresponding to ttyW1
...
8 = /dev/cuw8 Callout device corresponding to ttyW8
...
77 char ComScire Quantum Noise Generator
0 = /dev/qng ComScire Quantum Noise Generator
78 char PAM Software's multimodem boards
0 = /dev/ttyM0 First PAM modem
1 = /dev/ttyM1 Second PAM modem
...
79 char PAM Software's multimodem boards - alternate devices
0 = /dev/cum0 Callout device corresponding to ttyM0
1 = /dev/cum1 Callout device corresponding to ttyM1
...
80 char Photometrics AT200 CCD camera
0 = /dev/at200 Photometrics AT200 CCD camera
81 char Brooktree Bt848 frame grabbers
0 = /dev/bttv0 First Bt848 card
1 = /dev/bttv1 Second Bt848 card
...
16 = /dev/bttvc0 Control for first Bt848 card
17 = /dev/bttvc1 Control for second Bt848 card
...
32 = /dev/bttv-vbi0 VBI data of first Bt848 card
33 = /dev/bttv-vbi1 VBI data of second Bt848 card
...
82-119 UNALLOCATED
120-127 LOCAL/EXPERIMENTAL USE 120-127 LOCAL/EXPERIMENTAL USE
...@@ -931,9 +990,6 @@ reply. ...@@ -931,9 +990,6 @@ reply.
255 RESERVED 255 RESERVED
**** ADDITIONAL /dev DIRECTORY ENTRIES **** ADDITIONAL /dev DIRECTORY ENTRIES
This section details additional entries that should or may exist in This section details additional entries that should or may exist in
...@@ -1054,6 +1110,8 @@ correspond to /dev/cua# and /dev/cub#. In the future, it should be ...@@ -1054,6 +1110,8 @@ 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 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 and lower case for the "cu" device.
The names /dev/ttyQ# and /dev/cuq# are reserved for local use.
The alternate devices provide for kernel-based exclusion and somewhat The alternate devices provide for kernel-based exclusion and somewhat
different defaults than the primary devices. Their main purpose is to different defaults than the primary devices. Their main purpose is to
allow the use of serial ports with programs with no inherent or broken allow the use of serial ports with programs with no inherent or broken
......
...@@ -3,37 +3,184 @@ The Linux Digiboard Driver ...@@ -3,37 +3,184 @@ The Linux Digiboard Driver
The Digiboard Driver for Linux supports the following boards: The Digiboard Driver for Linux supports the following boards:
DigiBoard PC/Xe, PC/Xi, PC/Xeve DigiBoard PC/Xi, PC/Xe, PC/Xeve(which is the newer, smaller Xe with
a 8K window which is also known as PC/Xe(8K) and has no memory/irq
switches) You can use up to 4 cards with this driver and should work
on other architectures than intel also.
Limitations: In case you have problems with this version(1.6.1) of this driver, please
------------ email directly to me as I made the last update. It you have a report about
Currently the Driver does not do autoprobing! runnning it on other architectures than intel, email me, so I can document
it here.
The preconfigured I/O address is 0200h and the default memory address An version of this driver has been taken by Digiboard to make a driver
0D0000h, ALT-PIN feature on and 16 ports available. software package which supports also PC/Xem cards and newer PCI cards
but it don't support the old PC/Xi cards and it isn't yet ported to
linux-2.1.x and may not be useable on other architectures than intel now.
It is available from ftp.digi.com/ftp.digiboard.com. You can write me if
you need an patch for this driver.
Use them and you will not have to worry about configuring anything. Bernhard Kaindl (bkaindl@netway.at) 6. April 1997.
You can configure the driver via lilo. Have a look at the end of this Configuring the Driver
message. The default settings vanish as soon as you give a digi= commandline. ----------------------
You can give multiple digi= commandline parameters to define multiple
boards. The driver can be build direct into the kernel or as module.
The pcxx driver can be configured using the command line feature while
loading the kernel with LILO or LOADLIN or, if built as a module,
with arguments to insmod and modprobe or with parameters in
/etc/conf.modules for modprobe and kerneld.
After configuring the driver you need to create the device special files
as described in "Device file creation:" below and set the appropriate
permissions for your application.
As Module
---------
modprobe pcxx io=<io> \
membase=<membase> \
memsize=<memsize> \
numports=<numports> \
altpin=<altpin> \
verbose=<verbose>
or, if several cards are installed
modprobe pcxx io=<io-1>,<io-2>,... \
membase=<membase-1>,<membase-2>,... \
memsize=<memsize-1>,<memsize-2>,... \
numports=<numports-1>,<numports-2>,... \
altpin=<altpin-1>,<altpin-2>,... \
verbose=<verbose>
where <io-N> is the io address of the Nth card and <membase-N> is the
memory base address of the Nth card, etc.
The parameters can be specified in any order. For example, the numports
parameter can precede the membase parameter, or vice versa. If several
cards are installed the ordering within the comma separated parameter
lists must be consistent, of course.
io - I/O port address of that card.
membase - Memory start address of that card.
memsize - Memory size of that card, in kilobytes. If given, this value
is compared against the card to verify configuration and
hinder the driver to use a misconfigured card. If the parameter
does not match the board it is disabled with a memory size error.
numports - Number of ports on this card. This is the number of devices to
assign to this card or reserve if disabled.
altpin - 1: swap DCD and DSR for 8-pin RJ-45 with modems.
0: don't swap DCD and DSR.
other values count as 1.
verbose - 1: give nice verbose output during initialisation of the driver.
possibly helpful during board configuration.
0: normal terse output.
Only the parameters which differ from the defaults need to be specified.
If the io= parameter is not given, the default config is used. This is
io=0x200 membase=0xD0000 numports=16 altpin=0
Only parameters applicable need be specified. For example to configure
2 boards, first one at 0x200 with 8 ports, rest defaults, second one at
0x120, memory at 0xD80000, altpin enabled, rest defaults, you can do this
by using these parameters:
modprobe pcxx io=0x200,0x120 numports=8,8 membase=,0xD80000 altpin=,1
To disable a temporary unuseable board without changing the mapping of the
devices following that board, you can empty the io-value for that board:
modprobe pcxx io=,0x120 numports=8,8 membase=,0xD80000 altpin=,1
The remainig board still uses ttyD8-ttyD15 and cud8-cud15.
Example line for /etc/conf.modules for use with kerneld and as default
parameters for modprobe:
options pcxx io=0x200 numports=8
For kerneld to work you will likely need to add these two lines to your
/etc/conf.modules:
alias char-major-22 pcxx
alias char-major-23 pcxx
Boot-time configuration when linked into the kernel
---------------------------------------------------
Per Board to be configured, pass a digi= commandline parameter to the
kernel using lilo or loadlin. It consists of a string of comma separated
identifiers or integers. The 6 values in order are:
Card status: Enable - use that board
Disable - don't actually use that board.
Card type: PC/Xi - the old ones with 64/128/256/512K RAM.
PC/Xe - PC/Xe(old ones with 64k mem range).
PC/Xeve - PC/Xe(newers with 8k mem range).
Note: This is for documentation only, the type is detected from the board.
Altpin setting: Enable - swap DCD and DSR for 8-pin RJ-45 with modems.
Disable - don't swap DCD and DSR.
Number of ports: 1 ... 16 - Number of ports on this card. This is the
number of devices to assign to this card.
I/O port address: eg. 200 - I/O Port address where the card is configured.
Memory base addr: eg. 80000 - Memory address where the board's memory starts.
This is an example for a line which you can insert into you lilo.conf:
append="digi=Enable,PC/Xi,Disable,4,120,D0000"
there is an alternate form, in which you must use decimal values only:
append="digi=1,0,0,16,512,851968"
If you don't give a digi= commandline, the compiled-in defaults of
board 1: io=0x200, membase=0xd0000, altpin=off and numports=16 are used.
If you have the resources (io&mem) free for use, configure your board to
these settings and you should be set up fine even if yours has not 16 ports.
Sources of Information
----------------------
Webpage: http://private.fuller.edu/clameter/digi.html
Mailing List: digiboard@list.fuller.edu
(Write e-mail to that address to subscribe. Common ListServ commands work.
Archive of messages available)
Christoph Lameter (clameter@fuller.edu) 16. April 1996.
Supporting Tools
----------------
Supporting Tools:
-----------------
Some tools and more detailed information can be found at Some tools and more detailed information can be found at
ftp://ftp.fuller.edu/Linux/digi ftp://ftp.fuller.edu/Linux/digi
WARNING: Most of the stuff available right now uses the WRONG Major Device
numbers and the wrong call out devices. Be careful and check them first.
Better not use any of the software in that directory if you run a recent
1.3.X Kernel or later!
The "ditty" tool described in the Digiboard Manuals for other Unixes The "ditty" tool described in the Digiboard Manuals for other Unixes
is also available. is also available.
Device file creation
--------------------
Currently the Linux MAKEDEV command does not support generating the Digiboard Currently the Linux MAKEDEV command does not support generating the Digiboard
Devices. Use the following script to generate the devices: Devices.
The /dev/cud devices behave like the /dev/cua devices
and the ttyD devices are like the /dev/ttyS devices.
Use the following script to generate the devices:
------------------ mkdigidev begin ------------------ mkdigidev begin
#!/bin/sh #!/bin/sh
...@@ -66,8 +213,10 @@ do ...@@ -66,8 +213,10 @@ do
boardnum=`expr $boardnum + 1` boardnum=`expr $boardnum + 1`
done done
------------------ mkdigidev end ------------------ mkdigidev end
or apply the following patch to /dev/MAKEDEV and do a or apply the following patch to /dev/MAKEDEV and do a
make digi sh /dev/MAKEDEV digi
----- MAKEDEV Patch ----- MAKEDEV Patch
--- /dev/MAKEDEV Sun Aug 13 15:48:23 1995 --- /dev/MAKEDEV Sun Aug 13 15:48:23 1995
+++ MAKEDEV Tue Apr 16 17:53:27 1996 +++ MAKEDEV Tue Apr 16 17:53:27 1996
...@@ -105,51 +254,3 @@ make digi ...@@ -105,51 +254,3 @@ make digi
;; ;;
par[0-2]) par[0-2])
----- End Makedev patch ----- End Makedev patch
The /dev/cud?? devices behave like the /dev/cua?? devices
and the ttyD devices are like the /dev/ttyS?? devices.
Sources of Information
----------------------
Webpage: http://private.fuller.edu/clameter/digi.html
Mailing List: digiboard@list.fuller.edu
(Write e-mail to that address to subscribe. Common ListServ commands work.
Archive of messages available)
Christoph Lameter (clameter@fuller.edu) 16. April 1996.
-----------------------------------------------------------------------------
Changes v1.5.5:
The ability to use the kernel's command line to pass in the configuration for
boards. Using LILO's APPEND command, a string of comma separated identifiers
or integers can be used. The 6 values in order are:
Enable/Disable this card,
Type of card: PC/Xi(0), PC/Xe(1), PC/Xeve(2), PC/Xem(3)
Enable/Disable alternate pin arrangement,
Number of ports on this card,
I/O Port where card is configured (in HEX if using string identifiers),
Base of memory window (in HEX if using string identifiers),
Samples:
append="digi=E,PC/Xi,D,16,200,D0000"
append="digi=1,0,0,16,512,(whatever D0000 is in base 10 :)
Driver's minor device numbers are conserved. This means that instead of
each board getting a block of 16 minors pre-assigned, it gets however
many it should, with the next card following directly behind it. A
system with 4 2-port PC/Xi boards will use minor numbers 0-7.
This conserves some memory, and removes a few hard coded constants.
NOTE!! NOTE!! NOTE!!
The definition of PC/Xem as a valid board type is the BEGINNING of support
for this device. The driver does not currently recognise the board, nor
does it want to initialize it. At least not the EISA version.
Mike McLagan <mike.mclagan@linux.org> 5, April 1996.
Ioctl Numbers Ioctl Numbers
12 Feb 1997 5 Apr 1997
Michael Chastain Michael Chastain
<mec@shout.net> <mec@shout.net>
...@@ -89,6 +89,8 @@ Code Seq# Include File Comments ...@@ -89,6 +89,8 @@ Code Seq# Include File Comments
'a' all various, see http://lrcwww.epfl.ch/linux-atm/magic.html 'a' all various, see http://lrcwww.epfl.ch/linux-atm/magic.html
'c' all linux/comstats.h 'c' all linux/comstats.h
'f' all linux/ext2_fs.h 'f' all linux/ext2_fs.h
'l' 00-3F linux/tcfs_fs.h in development:
<http://mikonos.dia.unisa.it/tcfs>
'm' all linux/mtio.h conflict! 'm' all linux/mtio.h conflict!
'm' all linux/soundcard.h conflict! 'm' all linux/soundcard.h conflict!
'n' all linux/ncp_fs.h 'n' all linux/ncp_fs.h
...@@ -105,8 +107,10 @@ Code Seq# Include File Comments ...@@ -105,8 +107,10 @@ Code Seq# Include File Comments
0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range 0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
0x8B all linux/wireless.h 0x8B all linux/wireless.h
0x8C 00-3F WiNRADiO driver in development:
<mailto:brian@proximity.com.au>
0x90 00 linux/sbpcd.h 0x90 00 linux/sbpcd.h
0x99 00-0F 537-Addinboard driver in development, e-mail contact: 0x99 00-0F 537-Addinboard driver in development:
b.kohl@ipn-b.comlink.apc.org <mailto:b.kohl@ipn-b.comlink.apc.org>
0xA0 all Small Device Project in development, e-mail contact: 0xA0 all Small Device Project in development:
khollis@northwest.com <mailto:khollis@northwest.com>
The `parport' code provides parallel-port support under Linux. This
includes the ability to share one port between multiple device
drivers.
You can pass parameters to the parport code to override its automatic
detection of your hardware. This is particularly useful if you want
to use IRQs, since in general these can't be autoprobed successfully.
If you load the parport code as a module, say
# insmod parport.o io=0x378,0x278 irq=7,5
to tell the parport code that you want two ports, one at 0x378 using
IRQ 7, and one at 0x278 using IRQ 5.
If you compile the parport code into the kernel, then you can use
kernel boot parameters to get the same effect. Add something like the
following to your LILO command line:
parport=0x378,7 parport=0x278,5
You can have many `parport=...' statements, one for each port you want
to add. Adding `parport=0' or just `parport=' to the command-line
will disable parport support entirely.
Once the parport code is initialised, you can attach device drivers to
ports. Normally this happens automatically; if the lp driver is
loaded it will create one lp device for each port found. You can
override this, though, by using parameters either when you load the lp
driver:
# insmod lp.o parport=0,2
or on the LILO command line:
lp=parport0 lp=parport2
Both the above examples would inform lp that you want /dev/lp0 to be
the first parallel port, and /dev/lp1 to be the _third_ parallel port,
with no lp device associated with the second port (parport1). Note
that this is different to the way older kernels worked; there used to
be a static association between the I/O port address and the device
name, so /dev/lp0 was always the port at 0x3bc. This is no longer the
case - if you only have one port, it will always be /dev/lp0,
regardless of base address.
Also:
* If you selected the device autoprobe at compile time, you can say
`lp=auto' on the kernel command line, and lp will create devices only
for those ports that seem to have printers attached.
* If you give PLIP the `timid' parameter, either with `plip=timid' on
the command line, or with `insmod plip timid=1' when using modules, it
will avoid any ports that seem to be in use by other devices.
...@@ -407,6 +407,19 @@ M: emoenke@gwdg.de ...@@ -407,6 +407,19 @@ M: emoenke@gwdg.de
L: linux-kernel@vger.rutgers.edu L: linux-kernel@vger.rutgers.edu
S: Maintained S: Maintained
PARALLEL PORT SHARING SUPPORT
P: Phil Blundell
M: Philip.Blundell@pobox.com
P: Tim Waugh
M: tmw20@cyberelk.demon.co.uk
P: David Campbell
M: campbell@tirian.che.curtin.edu.au
L: linux-parport@torque.net
L: pnp-list@redhat.com
W: http://www.cyberelk.demon.co.uk/parport.html
W: http://www.cage.curtin.edu.au/~campbell/parbus/
S: Maintained
FPU EMULATOR FPU EMULATOR
P: Bill Metzenthen P: Bill Metzenthen
M: billm@suburbia.net M: billm@suburbia.net
...@@ -421,7 +434,7 @@ S: Maintained ...@@ -421,7 +434,7 @@ S: Maintained
KERNEL AUTOMOUNTER (AUTOFS) KERNEL AUTOMOUNTER (AUTOFS)
P: H. Peter Anvin P: H. Peter Anvin
M: hpa@zytor.com M: hpa@zytor.com
L: linux-kernel@vger.rutgers.edu L: autofs@linux.kernel.org
S: Maintained S: Maintained
DEVICE NUMBER REGISTRY DEVICE NUMBER REGISTRY
......
VERSION = 2 VERSION = 2
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 32 SUBLEVEL = 33
ARCH = i386 ARCH = i386
...@@ -14,7 +14,7 @@ ARCH = i386 ...@@ -14,7 +14,7 @@ ARCH = i386
SMP = 1 SMP = 1
# #
# SMP profiling options # SMP profiling options
# SMP_PROF = 1 SMP_PROF = 1
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
...@@ -144,6 +144,10 @@ ifdef CONFIG_PCI ...@@ -144,6 +144,10 @@ ifdef CONFIG_PCI
DRIVERS := $(DRIVERS) drivers/pci/pci.a DRIVERS := $(DRIVERS) drivers/pci/pci.a
endif endif
ifdef CONFIG_PNP
DRIVERS := $(DRIVERS) drivers/pnp/pnp.a
endif
ifdef CONFIG_SBUS ifdef CONFIG_SBUS
DRIVERS := $(DRIVERS) drivers/sbus/sbus.a DRIVERS := $(DRIVERS) drivers/sbus/sbus.a
endif endif
......
...@@ -22,11 +22,14 @@ unexport O_TARGET ...@@ -22,11 +22,14 @@ unexport O_TARGET
unexport O_OBJS unexport O_OBJS
unexport L_OBJS unexport L_OBJS
unexport M_OBJS unexport M_OBJS
# intermediate objects that form part of a module
unexport MI_OBJS
unexport ALL_MOBJS unexport ALL_MOBJS
# objects that export symbol tables # objects that export symbol tables
unexport OX_OBJS unexport OX_OBJS
unexport LX_OBJS unexport LX_OBJS
unexport MX_OBJS unexport MX_OBJS
unexport MIX_OBJS
unexport SYMTAB_OBJS unexport SYMTAB_OBJS
unexport MOD_LIST_NAME unexport MOD_LIST_NAME
...@@ -105,7 +108,7 @@ ALL_MOBJS = $(MX_OBJS) $(M_OBJS) ...@@ -105,7 +108,7 @@ ALL_MOBJS = $(MX_OBJS) $(M_OBJS)
ifneq "$(strip $(ALL_MOBJS))" "" ifneq "$(strip $(ALL_MOBJS))" ""
PDWN=$(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh) PDWN=$(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
endif endif
modules: $(ALL_MOBJS) dummy modules: $(ALL_MOBJS) $(MIX_OBJS) $(MI_OBJS) dummy
ifdef MOD_SUB_DIRS ifdef MOD_SUB_DIRS
set -e; for i in $(MOD_SUB_DIRS); do $(MAKE) -C $$i modules; done set -e; for i in $(MOD_SUB_DIRS); do $(MAKE) -C $$i modules; done
endif endif
...@@ -150,7 +153,7 @@ script: ...@@ -150,7 +153,7 @@ script:
# #
ifdef CONFIG_MODULES ifdef CONFIG_MODULES
SYMTAB_OBJS = $(LX_OBJS) $(OX_OBJS) $(MX_OBJS) SYMTAB_OBJS = $(LX_OBJS) $(OX_OBJS) $(MX_OBJS) $(MIX_OBJS)
ifdef CONFIG_MODVERSIONS ifdef CONFIG_MODVERSIONS
ifneq "$(strip $(SYMTAB_OBJS))" "" ifneq "$(strip $(SYMTAB_OBJS))" ""
......
...@@ -95,8 +95,14 @@ bool 'Sysctl support' CONFIG_SYSCTL ...@@ -95,8 +95,14 @@ bool 'Sysctl support' CONFIG_SYSCTL
tristate 'Kernel support for a.out (ECOFF) binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for a.out (ECOFF) binaries' CONFIG_BINFMT_AOUT
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86 tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Kernel support for JAVA binaries' CONFIG_BINFMT_JAVA
fi
tristate 'Parallel port support' CONFIG_PNP_PARPORT
endmenu endmenu
source drivers/pnp/Config.in
source drivers/block/Config.in source drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then if [ "$CONFIG_NET" = "y" ]; then
......
#
# linux/arch/i386/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
OBJECTS = misc.o
CFLAGS = -g -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall
test-gzip: piggy.o $(OBJECTS)
$(CC) -g -o test-gzip $(OBJECTS) piggy.o
clean:
$(RM) inflate.o misc.o test-gzip
inflate.o: inflate.c gzip.h
misc.o: misc.c gzip.h
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
* High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
*/ */
#include <string.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -97,7 +95,6 @@ static void error(char *m); ...@@ -97,7 +95,6 @@ static void error(char *m);
static void gzip_mark(void **); static void gzip_mark(void **);
static void gzip_release(void **); static void gzip_release(void **);
#ifndef STANDALONE_DEBUG
static void puts(const char *); static void puts(const char *);
extern int end; extern int end;
...@@ -196,7 +193,7 @@ static void puts(const char *s) ...@@ -196,7 +193,7 @@ static void puts(const char *s)
outb_p(0xff & (pos >> 1), vidport+1); outb_p(0xff & (pos >> 1), vidport+1);
} }
__ptr_t memset(__ptr_t s, int c, size_t n) void* memset(void* s, int c, size_t n)
{ {
int i; int i;
char *ss = (char*)s; char *ss = (char*)s;
...@@ -204,7 +201,7 @@ __ptr_t memset(__ptr_t s, int c, size_t n) ...@@ -204,7 +201,7 @@ __ptr_t memset(__ptr_t s, int c, size_t n)
for (i=0;i<n;i++) ss[i] = c; for (i=0;i<n;i++) ss[i] = c;
} }
__ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src, void* memcpy(void* __dest, __const void* __src,
size_t __n) size_t __n)
{ {
int i; int i;
...@@ -212,7 +209,6 @@ __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src, ...@@ -212,7 +209,6 @@ __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src,
for (i=0;i<__n;i++) d[i] = s[i]; for (i=0;i<__n;i++) d[i] = s[i];
} }
#endif
/* =========================================================================== /* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty * Fill the input buffer. This is called only when the buffer is empty
...@@ -292,34 +288,6 @@ struct { ...@@ -292,34 +288,6 @@ struct {
short b; short b;
} stack_start = { & user_stack [STACK_SIZE] , KERNEL_DS }; } stack_start = { & user_stack [STACK_SIZE] , KERNEL_DS };
#ifdef STANDALONE_DEBUG
static void gzip_mark(void **ptr)
{
}
static void gzip_release(void **ptr)
{
}
char output_buffer[1024 * 800];
int
main(argc, argv)
int argc;
char **argv;
{
output_data = output_buffer;
makecrc();
puts("Uncompressing Linux...");
gunzip();
puts("done.\n");
return 0;
}
#else
void setup_normal_output_buffer() void setup_normal_output_buffer()
{ {
#ifdef STANDARD_MEMORY_BIOS_CALL #ifdef STANDARD_MEMORY_BIOS_CALL
...@@ -388,8 +356,4 @@ int decompress_kernel(struct moveparams *mv) ...@@ -388,8 +356,4 @@ int decompress_kernel(struct moveparams *mv)
if (high_loaded) close_output_buffer_if_we_run_high(mv); if (high_loaded) close_output_buffer_if_we_run_high(mv);
return high_loaded; return high_loaded;
} }
#endif
...@@ -44,8 +44,13 @@ choice 'Processor type' \ ...@@ -44,8 +44,13 @@ choice 'Processor type' \
Pentium CONFIG_M586 \ Pentium CONFIG_M586 \
PPro CONFIG_M686" Pentium PPro CONFIG_M686" Pentium
bool 'Video mode selection support' CONFIG_VIDEO_SELECT bool 'Video mode selection support' CONFIG_VIDEO_SELECT
tristate 'Parallel port support' CONFIG_PNP_PARPORT
endmenu endmenu
source drivers/pnp/Config.in
source drivers/block/Config.in source drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then if [ "$CONFIG_NET" = "y" ]; then
......
...@@ -156,9 +156,10 @@ CONFIG_NET_EISA=y ...@@ -156,9 +156,10 @@ CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set # CONFIG_PCNET32 is not set
# CONFIG_APRICOT is not set # CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set # CONFIG_CS89x0 is not set
CONFIG_DE4X5=y # CONFIG_DE4X5 is not set
# CONFIG_DEC_ELCP is not set # CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set # CONFIG_DGRS is not set
CONFIG_EEXPRESS_PRO100=y
# CONFIG_NET_POCKET is not set # CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set # CONFIG_FDDI is not set
# CONFIG_DLCI is not set # CONFIG_DLCI is not set
...@@ -192,9 +193,10 @@ CONFIG_VFAT_FS=y ...@@ -192,9 +193,10 @@ CONFIG_VFAT_FS=y
# CONFIG_UMSDOS_FS is not set # CONFIG_UMSDOS_FS is not set
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
# CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y CONFIG_SUNRPC=y
CONFIG_LOCKD=y CONFIG_LOCKD=y
# CONFIG_ROOT_NFS is not set
# CONFIG_SMB_FS is not set # CONFIG_SMB_FS is not set
CONFIG_ISO9660_FS=y CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set # CONFIG_HPFS_FS is not set
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
extern void dump_thread(struct pt_regs *, struct user *); extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(elf_fpregset_t *); extern int dump_fpu(elf_fpregset_t *);
...@@ -26,6 +27,7 @@ EXPORT_SYMBOL(dump_thread); ...@@ -26,6 +27,7 @@ EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(dump_fpu); EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap); EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(local_irq_count);
EXPORT_SYMBOL_NOVERS(__down_failed); EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
EXPORT_SYMBOL_NOVERS(__up_wakeup); EXPORT_SYMBOL_NOVERS(__up_wakeup);
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#ifdef __SMP_PROF__
extern volatile unsigned long smp_apic_timer_ticks[1+NR_CPUS];
#endif
#define CR0_NE 32 #define CR0_NE 32
static unsigned char cache_21 = 0xff; static unsigned char cache_21 = 0xff;
...@@ -137,6 +141,9 @@ BUILD_IRQ(SECOND,15,0x80) ...@@ -137,6 +141,9 @@ BUILD_IRQ(SECOND,15,0x80)
BUILD_SMP_INTERRUPT(reschedule_interrupt) BUILD_SMP_INTERRUPT(reschedule_interrupt)
BUILD_SMP_INTERRUPT(invalidate_interrupt) BUILD_SMP_INTERRUPT(invalidate_interrupt)
BUILD_SMP_INTERRUPT(stop_cpu_interrupt) BUILD_SMP_INTERRUPT(stop_cpu_interrupt)
#ifdef __SMP_PROF__
BUILD_SMP_TIMER_INTERRUPT(apic_timer_interrupt)
#endif
#endif #endif
/* /*
...@@ -252,6 +259,7 @@ int get_smp_prof_list(char *buf) { ...@@ -252,6 +259,7 @@ int get_smp_prof_list(char *buf) {
unsigned long sum_spins_syscall = 0; unsigned long sum_spins_syscall = 0;
unsigned long sum_spins_sys_idle = 0; unsigned long sum_spins_sys_idle = 0;
unsigned long sum_smp_idle_count = 0; unsigned long sum_smp_idle_count = 0;
unsigned long sum_apic_timer_ticks = 0;
for (i=0;i<smp_num_cpus;i++) { for (i=0;i<smp_num_cpus;i++) {
int cpunum = cpu_logical_map[i]; int cpunum = cpu_logical_map[i];
...@@ -259,6 +267,7 @@ int get_smp_prof_list(char *buf) { ...@@ -259,6 +267,7 @@ int get_smp_prof_list(char *buf) {
sum_spins_syscall+=smp_spins_syscall[cpunum]; sum_spins_syscall+=smp_spins_syscall[cpunum];
sum_spins_sys_idle+=smp_spins_sys_idle[cpunum]; sum_spins_sys_idle+=smp_spins_sys_idle[cpunum];
sum_smp_idle_count+=smp_idle_count[cpunum]; sum_smp_idle_count+=smp_idle_count[cpunum];
sum_apic_timer_ticks+=smp_apic_timer_ticks[cpunum];
} }
len += sprintf(buf+len,"CPUS: %10i \n", smp_num_cpus); len += sprintf(buf+len,"CPUS: %10i \n", smp_num_cpus);
...@@ -315,6 +324,12 @@ int get_smp_prof_list(char *buf) { ...@@ -315,6 +324,12 @@ int get_smp_prof_list(char *buf) {
len +=sprintf(buf+len," idle ticks\n"); len +=sprintf(buf+len," idle ticks\n");
len+=sprintf(buf+len,"TICK %10lu",sum_apic_timer_ticks);
for (i=0;i<smp_num_cpus;i++)
len+=sprintf(buf+len," %10lu",smp_apic_timer_ticks[cpu_logical_map[i]]);
len +=sprintf(buf+len," local APIC timer ticks\n");
len+=sprintf(buf+len, "IPI: %10lu received\n", len+=sprintf(buf+len, "IPI: %10lu received\n",
ipi_count); ipi_count);
...@@ -734,14 +749,30 @@ void init_IRQ(void) ...@@ -734,14 +749,30 @@ void init_IRQ(void)
outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
outb_p(LATCH & 0xff , 0x40); /* LSB */ outb_p(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */ outb(LATCH >> 8 , 0x40); /* MSB */
for (i = 0; i < 16 ; i++) for (i = 0; i < 16 ; i++)
set_intr_gate(0x20+i,bad_interrupt[i]); set_intr_gate(0x20+i,bad_interrupt[i]);
/* This bit is a hack because we don't send timer messages to all processors yet */
/* It has to be here .. it doesn't work if you put it down the bottom - assembler explodes 8) */ /*
* This bit is a hack because we don't send timer messages to all
* processors yet. It has to be here .. it doesn't work if you put
* it down the bottom - assembler explodes 8)
*/
#ifdef __SMP__ #ifdef __SMP__
set_intr_gate(0x20+i, reschedule_interrupt); /* IRQ '16' - IPI for rescheduling */ /* IRQ '16' - IPI for rescheduling */
set_intr_gate(0x21+i, invalidate_interrupt); /* IRQ '17' - IPI for invalidation */ set_intr_gate(0x20+i, reschedule_interrupt);
set_intr_gate(0x22+i, stop_cpu_interrupt); /* IRQ '18' - IPI for CPU halt */
/* IRQ '17' - IPI for invalidation */
set_intr_gate(0x21+i, invalidate_interrupt);
/* IRQ '18' - IPI for CPU halt */
set_intr_gate(0x22+i, stop_cpu_interrupt);
#ifdef __SMP_PROF__
/* IRQ '19' - self generated IPI for local APIC timer */
set_intr_gate(0x23+i, apic_timer_interrupt);
#endif
#endif #endif
request_region(0x20,0x20,"pic1"); request_region(0x20,0x20,"pic1");
request_region(0xa0,0x20,"pic2"); request_region(0xa0,0x20,"pic2");
......
...@@ -107,6 +107,7 @@ asmlinkage int sys_idle(void) ...@@ -107,6 +107,7 @@ asmlinkage int sys_idle(void)
if (current->pid != 0) if (current->pid != 0)
goto out; goto out;
/* endless idle loop with no priority at all */ /* endless idle loop with no priority at all */
current->priority = -100;
current->counter = -100; current->counter = -100;
for (;;) for (;;)
{ {
...@@ -145,6 +146,7 @@ asmlinkage int sys_idle(void) ...@@ -145,6 +146,7 @@ asmlinkage int sys_idle(void)
int cpu_idle(void *unused) int cpu_idle(void *unused)
{ {
current->priority = -100;
while(1) while(1)
{ {
if(cpu_data[smp_processor_id()].hlt_works_ok && !hlt_counter && !need_resched) if(cpu_data[smp_processor_id()].hlt_works_ok && !hlt_counter && !need_resched)
...@@ -158,6 +160,8 @@ int cpu_idle(void *unused) ...@@ -158,6 +160,8 @@ int cpu_idle(void *unused)
run_task_queue(&tq_scheduler); run_task_queue(&tq_scheduler);
unlock_kernel(); unlock_kernel();
} }
/* endless idle loop with no priority at all */
current->counter = -100;
schedule(); schedule();
} }
} }
...@@ -474,7 +478,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, ...@@ -474,7 +478,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
p->tss.ss = KERNEL_DS; p->tss.ss = KERNEL_DS;
p->tss.ds = KERNEL_DS; p->tss.ds = KERNEL_DS;
p->tss.fs = USER_DS; p->tss.fs = USER_DS;
p->tss.gs = KERNEL_DS; p->tss.gs = USER_DS;
p->tss.ss0 = KERNEL_DS; p->tss.ss0 = KERNEL_DS;
p->tss.esp0 = p->kernel_stack_page + PAGE_SIZE; p->tss.esp0 = p->kernel_stack_page + PAGE_SIZE;
p->tss.tr = _TSS(nr); p->tss.tr = _TSS(nr);
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* Michel Lespinasse : Changes for 2.1 kernel map. * Michel Lespinasse : Changes for 2.1 kernel map.
* Michael Chastain : Change trampoline.S to gnu as. * Michael Chastain : Change trampoline.S to gnu as.
* Alan Cox : Dumb bug: 'B' step PPro's are fine * Alan Cox : Dumb bug: 'B' step PPro's are fine
* * Ingo Molnar : Added APIC timers, based on code
* from Jose Renau
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
#include <asm/io.h> #include <asm/io.h>
extern unsigned long start_kernel, _etext; extern unsigned long start_kernel, _etext;
void setup_APIC_clock (void);
/* /*
* Some notes on processor bugs: * Some notes on processor bugs:
...@@ -137,6 +139,10 @@ volatile unsigned long smp_spins_syscall[NR_CPUS]={0}; /* Count syscall spins ...@@ -137,6 +139,10 @@ volatile unsigned long smp_spins_syscall[NR_CPUS]={0}; /* Count syscall spins
volatile unsigned long smp_spins_syscall_cur[NR_CPUS]={0};/* Count spins for the actual syscall */ volatile unsigned long smp_spins_syscall_cur[NR_CPUS]={0};/* Count spins for the actual syscall */
volatile unsigned long smp_spins_sys_idle[NR_CPUS]={0}; /* Count spins for sys_idle */ volatile unsigned long smp_spins_sys_idle[NR_CPUS]={0}; /* Count spins for sys_idle */
volatile unsigned long smp_idle_count[1+NR_CPUS]={0,}; /* Count idle ticks */ volatile unsigned long smp_idle_count[1+NR_CPUS]={0,}; /* Count idle ticks */
/* Count local APIC timer ticks */
volatile unsigned long smp_apic_timer_ticks[1+NR_CPUS]={0,};
#endif #endif
#if defined (__SMP_PROF__) #if defined (__SMP_PROF__)
volatile unsigned long smp_idle_map=0; /* Map for idle processors */ volatile unsigned long smp_idle_map=0; /* Map for idle processors */
...@@ -621,6 +627,14 @@ void smp_callin(void) ...@@ -621,6 +627,14 @@ void smp_callin(void)
l=apic_read(APIC_SPIV); l=apic_read(APIC_SPIV);
l|=(1<<8); /* Enable */ l|=(1<<8); /* Enable */
apic_write(APIC_SPIV,l); apic_write(APIC_SPIV,l);
#ifdef __SMP_PROF__
/*
* Set up our APIC timer.
*/
setup_APIC_clock ();
#endif
sti(); sti();
/* /*
* Get our bogomips. * Get our bogomips.
...@@ -767,7 +781,14 @@ void smp_boot_cpus(void) ...@@ -767,7 +781,14 @@ void smp_boot_cpus(void)
apic_write(APIC_SPIV,cfg); apic_write(APIC_SPIV,cfg);
udelay(10); udelay(10);
#ifdef __SMP_PROF__
/*
* Set up our local APIC timer:
*/
setup_APIC_clock ();
#endif
/* /*
* Now scan the cpu present map and fire up the other CPUs. * Now scan the cpu present map and fire up the other CPUs.
*/ */
...@@ -1305,3 +1326,274 @@ asmlinkage void smp_stop_cpu_interrupt(void) ...@@ -1305,3 +1326,274 @@ asmlinkage void smp_stop_cpu_interrupt(void)
for(;;) __asm__("hlt"); for(;;) __asm__("hlt");
for (;;) ; for (;;) ;
} }
#ifdef __SMP_PROF__
extern void (*do_profile)(struct pt_regs *);
static void (*default_do_profile)(struct pt_regs *) = NULL;
/*
* APIC timer interrupt
*/
void smp_apic_timer_interrupt(struct pt_regs * regs)
{
int cpu = smp_processor_id();
if (!user_mode(regs)) {
unsigned long flags;
/*
* local timer interrupt is not NMI yet, so
* it's simple, we just aquire the global cli
* lock to mess around with profiling info.
*
* later, in the NMI version, we have to build
* our own 'current' pointer (as we could have
* interrupted code that just changes "current")
* and have to lock profiling info between NMI
* interrupts properly.
*/
save_flags(flags);
cli();
default_do_profile(regs);
restore_flags(flags);
}
/*
* this is safe outside the lock.
*/
smp_apic_timer_ticks[cpu]++;
apic_read (APIC_SPIV);
apic_write (APIC_EOI, 0);
}
/*
* This part sets up the APIC 32 bit clock in LVTT1, with HZ interrupts
* per second. We assume that the caller has already set up the local
* APIC at apic_addr.
*
* Later we might want to split HZ into two parts: introduce
* PROFILING_HZ and scheduling HZ. The APIC timer is not exactly
* sync with the external timer chip, it closely follows bus clocks.
*/
#define RTDSC(x) __asm__ __volatile__ ( ".byte 0x0f,0x31" \
:"=a" (((unsigned long*)&x)[0]), \
"=d" (((unsigned long*)&x)[1]))
/*
* The timer chip is already set up at HZ interrupts per second here,
* but we do not accept timer interrupts yet. We only allow the BP
* to calibrate.
*/
unsigned int get_8254_timer_count (void)
{
unsigned int count;
outb_p(0x00, 0x43);
count = inb_p(0x40);
count |= inb_p(0x40) << 8;
return count;
}
/*
* This function sets up the local APIC timer, with a timeout of
* 'clocks' APIC bus clock. During calibration we actually call
* this function twice, once with a bogus timeout value, second
* time for real. The other (noncalibrating) CPUs call this
* function only once, with the real value.
*
* We are strictly in irqs off mode here, as we do not want to
* get an APIC interrupt go off accidentally.
*/
#define APIC_DIVISOR 16
/*
* We do reads before writes even if unnecessary, to get around the
* APIC double write 'bug'.
*/
void setup_APIC_timer (unsigned int clocks)
{
unsigned long lvtt1_value;
unsigned int tmp_value;
/*
* Unfortunately the local APIC timer cannot be set up into NMI
* mode. With the IO APIC we can re-route the external timer
* interrupt and broadcast it as an NMI to all CPUs, so no pain.
*
* NOTE: this irq vector 19 and the gate in BUILD_SMP_TIMER_INTERRUPT
* should be the same ;)
*/
tmp_value = apic_read(APIC_LVTT);
lvtt1_value = APIC_LVT_TIMER_PERIODIC | (0x20+19);
apic_write(APIC_LVTT , lvtt1_value);
/*
* Divide PICLK by 16
*/
tmp_value = apic_read(APIC_TDCR);
apic_write(APIC_TDCR , (tmp_value & ~APIC_TDR_DIV_1 )
| APIC_TDR_DIV_16);
tmp_value = apic_read(APIC_TMICT);
apic_write(APIC_TMICT, clocks/APIC_DIVISOR);
}
void wait_8254_wraparound (void)
{
unsigned int curr_count, prev_count=~0;
int delta;
curr_count = get_8254_timer_count();
do {
prev_count = curr_count;
curr_count = get_8254_timer_count();
delta = curr_count-prev_count;
/*
* This limit for delta seems arbitrary, but it isnt, it's
* slightly above the level of error a buggy Mercury/Neptune
* chipset timer can cause.
*/
} while (delta<1000);
}
/*
* In this function we calibrate APIC bus clocks to the external
* timer here. Unfortunately we cannot use jiffies and
* the timer irq to calibrate, since some later bootup
* code depends on getting the first irq? Ugh.
*
* We want to do the calibration only once since we
* want to have local timer irqs syncron. CPUs connected
* by the same APIC bus have the very same bus frequency.
* And we want to have irqs off anyways, no accidental
* APIC irq that way.
*/
int calibrate_APIC_clock (void)
{
unsigned long long t1,t2;
unsigned long tt1,tt2;
unsigned int prev_count, curr_count;
long calibration_result;
printk("calibrating APIC timer ... ");
/*
* Put whatever arbitrary (but long enough) timeout
* value into the APIC clock, we just want to get the
* counter running for calibration.
*/
setup_APIC_timer(1000000000);
/*
* The timer chip counts down to zero. Lets wait
* for a wraparound to start exact measurement:
* (the current tick might have been already half done)
*/
wait_8254_wraparound ();
/*
* We wrapped around just now, lets start:
*/
RTDSC(t1);
tt1=apic_read(APIC_TMCCT);
/*
* lets wait until we get to the next wrapround:
*/
wait_8254_wraparound ();
tt2=apic_read(APIC_TMCCT);
RTDSC(t2);
/*
* The APIC bus clock counter is 32 bits only, it
* might have overflown:
*/
if (tt2<tt1) {
unsigned long tmp = tt2;
tt2=tt1;
tt1=tmp;
}
calibration_result = (tt2-tt1)*APIC_DIVISOR;
printk("\n..... %ld CPU clocks in 1 timer chip tick.\n",
(unsigned long)(t2-t1));
printk("..... %ld APIC bus clocks in 1 timer chip tick.\n",
calibration_result);
printk("..... CPU clock speed is %ld.%ld MHz.\n",
((long)(t2-t1))/(1000000/HZ),
((long)(t2-t1))%(1000000/HZ) );
printk("..... APIC bus clock speed is %ld.%ld MHz.\n",
calibration_result/(1000000/HZ),
calibration_result%(1000000/HZ) );
return calibration_result;
}
void setup_APIC_clock (void)
{
unsigned long flags;
static volatile int calibration_lock;
static unsigned int calibration_result;
return;
save_flags(flags);
cli();
printk("setup_APIC_clock() called.\n");
/*
* We use a private profiling function. (This is preparation
* for NMI local timer interrupts.)
*
* [ setup_APIC_clock() is called from all CPUs, but we want
* to do this part of the setup only once ... and it fits
* here best ]
*/
if (!set_bit(0,&calibration_lock)) {
default_do_profile = do_profile;
do_profile = NULL;
calibration_result=calibrate_APIC_clock();
/*
* Signal completion to the other CPU[s]:
*/
calibration_lock = 3;
} else {
/*
* Other CPU is calibrating, wait for finish:
*/
printk("waiting for other CPU calibrating APIC timer ... ");
while (calibration_lock == 1);
printk("done, continuing.\n");
}
setup_APIC_timer (calibration_result);
restore_flags(flags);
}
#undef APIC_DIVISOR
#undef RTDSC
#endif
...@@ -114,7 +114,7 @@ int kstack_depth_to_print = 24; ...@@ -114,7 +114,7 @@ int kstack_depth_to_print = 24;
#define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_OFFSET (8*1024*1024)
#define MODULE_RANGE (8*1024*1024) #define MODULE_RANGE (8*1024*1024)
static void show_regs(struct pt_regs *regs) static void show_registers(struct pt_regs *regs)
{ {
int i; int i;
unsigned long esp; unsigned long esp;
...@@ -124,8 +124,6 @@ static void show_regs(struct pt_regs *regs) ...@@ -124,8 +124,6 @@ static void show_regs(struct pt_regs *regs)
esp = (unsigned long) &regs->esp; esp = (unsigned long) &regs->esp;
ss = KERNEL_DS; ss = KERNEL_DS;
if ((regs->eflags & VM_MASK) || (3 & regs->xcs) == 3)
return;
if (regs->xcs & 3) { if (regs->xcs & 3) {
esp = regs->esp; esp = regs->esp;
ss = regs->xss & 0xffff; ss = regs->xss & 0xffff;
...@@ -184,9 +182,11 @@ static void show_regs(struct pt_regs *regs) ...@@ -184,9 +182,11 @@ static void show_regs(struct pt_regs *regs)
/*static*/ void die_if_kernel(const char * str, struct pt_regs * regs, long err) /*static*/ void die_if_kernel(const char * str, struct pt_regs * regs, long err)
{ {
if ((regs->eflags & VM_MASK) || (3 & regs->xcs) == 3)
return;
console_verbose(); console_verbose();
printk("%s: %04lx\n", str, err & 0xffff); printk("%s: %04lx\n", str, err & 0xffff);
show_regs(regs); show_registers(regs);
do_exit(SIGSEGV); do_exit(SIGSEGV);
} }
...@@ -236,7 +236,7 @@ asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) ...@@ -236,7 +236,7 @@ asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
asmlinkage void do_nmi(struct pt_regs * regs, long error_code) asmlinkage void do_nmi(struct pt_regs * regs, long error_code)
{ {
printk("NMI\n"); show_regs(regs); printk("NMI\n"); show_registers(regs);
#ifdef CONFIG_SMP_NMI_INVAL #ifdef CONFIG_SMP_NMI_INVAL
smp_flush_tlb_rcv(); smp_flush_tlb_rcv();
#else #else
......
...@@ -187,11 +187,10 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code) ...@@ -187,11 +187,10 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
* *
* First we check if it was the bootup rw-test, though.. * First we check if it was the bootup rw-test, though..
*/ */
if (wp_works_ok < 0 && !address && (error_code & 1)) { if (wp_works_ok < 0 && address == 0xc0000000 && (error_code & 1)) {
wp_works_ok = 1; wp_works_ok = 1;
pg0[0] = pte_val(mk_pte(0, PAGE_SHARED)); pg0[0] = pte_val(mk_pte(0, PAGE_SHARED));
flush_tlb(); flush_tlb();
printk("This processor honours the WP bit even when in supervisor mode. Good.\n");
goto out; goto out;
} }
if (address < PAGE_SIZE) { if (address < PAGE_SIZE) {
......
...@@ -146,19 +146,19 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem) ...@@ -146,19 +146,19 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
pg_dir = swapper_pg_dir; pg_dir = swapper_pg_dir;
/* unmap the original low memory mappings */ /* unmap the original low memory mappings */
pgd_val(pg_dir[0]) = 0; pgd_val(pg_dir[0]) = 0;
/* Map whole memory from 0xC0000000 */
while (address < end_mem) { while (address < end_mem) {
/*
* The following code enabled 4MB page tables for the
* Intel Pentium cpu, unfortunately the SMP kernel can't
* handle the 4MB page table optimizations yet
*/
/*
* This will create page tables that
* span up to the next 4MB virtual
* memory boundary, but that's ok,
* we won't use that memory anyway.
*/
if (x86_capability & 8) { if (x86_capability & 8) {
/*
* If we're running on a Pentium CPU, we can use the 4MB
* page tables.
*
* The page tables we create span up to the next 4MB
* virtual memory boundary, but that's OK as we won't
* use that memory anyway.
*/
#ifdef GAS_KNOWS_CR4 #ifdef GAS_KNOWS_CR4
__asm__("movl %%cr4,%%eax\n\t" __asm__("movl %%cr4,%%eax\n\t"
"orl $16,%%eax\n\t" "orl $16,%%eax\n\t"
...@@ -176,8 +176,10 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem) ...@@ -176,8 +176,10 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
address += 4*1024*1024; address += 4*1024*1024;
continue; continue;
} }
/* map the memory at virtual addr 0xC0000000 */ /*
/* pg_table is physical at this point */ * We're on a [34]86, use normal page tables.
* pg_table is physical at this point
*/
pg_table = (pte_t *) (PAGE_MASK & pgd_val(pg_dir[768])); pg_table = (pte_t *) (PAGE_MASK & pgd_val(pg_dir[768]));
if (!pg_table) { if (!pg_table) {
pg_table = (pte_t *) __pa(start_mem); pg_table = (pte_t *) __pa(start_mem);
...@@ -273,18 +275,25 @@ void mem_init(unsigned long start_mem, unsigned long end_mem) ...@@ -273,18 +275,25 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
/* test if the WP bit is honoured in supervisor mode */ /* test if the WP bit is honoured in supervisor mode */
if (wp_works_ok < 0) { if (wp_works_ok < 0) {
unsigned char tmp_reg; unsigned char tmp_reg;
unsigned long old = pg0[0];
printk("Checking if this processor honours the WP bit even in supervisor mode... ");
pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_READONLY)); pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_READONLY));
local_flush_tlb(); local_flush_tlb();
current->mm->mmap->vm_start += PAGE_SIZE;
__asm__ __volatile__( __asm__ __volatile__(
"movb %0,%1 ; movb %1,%0" "movb %0,%1 ; movb %1,%0"
:"=m" (*(char *) __va(0)), :"=m" (*(char *) __va(0)),
"=q" (tmp_reg) "=q" (tmp_reg)
:/* no inputs */ :/* no inputs */
:"memory"); :"memory");
pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_KERNEL)); pg0[0] = old;
local_flush_tlb(); local_flush_tlb();
if (wp_works_ok < 0) current->mm->mmap->vm_start -= PAGE_SIZE;
if (wp_works_ok < 0) {
wp_works_ok = 0; wp_works_ok = 0;
printk("No.\n");
} else
printk("Ok.\n");
} }
return; return;
} }
......
...@@ -9,12 +9,17 @@ ...@@ -9,12 +9,17 @@
SUB_DIRS := block char net #streams SUB_DIRS := block char net #streams
MOD_SUB_DIRS := $(SUB_DIRS) sbus MOD_SUB_DIRS := $(SUB_DIRS) sbus
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn pnp
ifdef CONFIG_PCI ifdef CONFIG_PCI
SUB_DIRS += pci SUB_DIRS += pci
endif endif
ifdef CONFIG_PNP
SUB_DIRS += pnp
MOD_SUB_DIRS += pnp
endif
ifdef CONFIG_SBUS ifdef CONFIG_SBUS
SUB_DIRS += sbus SUB_DIRS += sbus
endif endif
......
...@@ -765,9 +765,15 @@ static void setup_dev(struct gendisk *dev) ...@@ -765,9 +765,15 @@ static void setup_dev(struct gendisk *dev)
void device_setup(void) void device_setup(void)
{ {
extern void console_map_init(void); extern void console_map_init(void);
#ifdef CONFIG_PNP_PARPORT
extern int pnp_parport_init(void);
#endif
struct gendisk *p; struct gendisk *p;
int nr=0; int nr=0;
#ifdef CONFIG_PNP_PARPORT
pnp_parport_init();
#endif
chr_dev_init(); chr_dev_init();
blk_dev_init(); blk_dev_init();
sti(); sti();
......
...@@ -112,7 +112,7 @@ static void xd_geninit (struct gendisk *); ...@@ -112,7 +112,7 @@ static void xd_geninit (struct gendisk *);
static int xd_open (struct inode *inode,struct file *file); static int xd_open (struct inode *inode,struct file *file);
static void do_xd_request (void); static void do_xd_request (void);
static int xd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg); static int xd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg);
static void xd_release (struct inode *inode,struct file *file); static int xd_release (struct inode *inode,struct file *file);
static int xd_reread_partitions (kdev_t dev); static int xd_reread_partitions (kdev_t dev);
static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count); static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count);
static void xd_recalibrate (u_char drive); static void xd_recalibrate (u_char drive);
......
...@@ -19,7 +19,7 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then ...@@ -19,7 +19,7 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
fi fi
bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
bool 'Digiboard PC/Xx Support' CONFIG_DIGI tristate 'Digiboard PC/Xx Support' CONFIG_DIGI
tristate 'Cyclades async mux support' CONFIG_CYCLADES tristate 'Cyclades async mux support' CONFIG_CYCLADES
bool 'Stallion multiport serial support' CONFIG_STALDRV bool 'Stallion multiport serial support' CONFIG_STALDRV
if [ "$CONFIG_STALDRV" = "y" ]; then if [ "$CONFIG_STALDRV" = "y" ]; then
...@@ -33,8 +33,12 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then ...@@ -33,8 +33,12 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
int ' FIFO trigger level' CONFIG_ESPSERIAL_TRIGGER_LEVEL 768 int ' FIFO trigger level' CONFIG_ESPSERIAL_TRIGGER_LEVEL 768
fi fi
fi fi
tristate 'Parallel printer support' CONFIG_PRINTER if [ "$CONFIG_PNP_PARPORT" != "n" ]; then
dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PNP_PARPORT
if [ "$CONFIG_PRINTER" != "n" ]; then
bool ' Support IEEE1284 status readback' CONFIG_PRINTER_READBACK
fi
fi
bool 'Mouse Support (not serial mice)' CONFIG_MOUSE bool 'Mouse Support (not serial mice)' CONFIG_MOUSE
if [ "$CONFIG_MOUSE" = "y" ]; then if [ "$CONFIG_MOUSE" = "y" ]; then
......
...@@ -884,10 +884,10 @@ int tioclinux(struct tty_struct *tty, unsigned long arg) ...@@ -884,10 +884,10 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
* related to the kernel should not use this. * related to the kernel should not use this.
*/ */
data = shift_state; data = shift_state;
return put_user(data, (char *) arg); return __put_user(data, (char *) arg);
case 7: case 7:
data = mouse_reporting(); data = mouse_reporting();
return put_user(data, (char *) arg); return __put_user(data, (char *) arg);
case 10: case 10:
set_vesa_blanking(arg); set_vesa_blanking(arg);
return 0; return 0;
...@@ -1337,11 +1337,17 @@ static int do_con_write(struct tty_struct * tty, int from_user, ...@@ -1337,11 +1337,17 @@ static int do_con_write(struct tty_struct * tty, int from_user,
if (currcons == sel_cons) if (currcons == sel_cons)
clear_selection(); clear_selection();
if (from_user) {
/* just to make sure that noone lurks at places he shouldn't see. */
if (verify_area(VERIFY_READ, buf, count))
return 0; /* ?? are error codes legal here ?? */
}
disable_bh(CONSOLE_BH); disable_bh(CONSOLE_BH);
while (!tty->stopped && count) { while (!tty->stopped && count) {
enable_bh(CONSOLE_BH); enable_bh(CONSOLE_BH);
if (from_user) if (from_user)
get_user(c, buf); __get_user(c, buf);
else else
c = *buf; c = *buf;
buf++; n++; count--; buf++; n++; count--;
......
...@@ -235,7 +235,7 @@ int con_set_trans_old(unsigned char * arg) ...@@ -235,7 +235,7 @@ int con_set_trans_old(unsigned char * arg)
for (i=0; i<E_TABSZ ; i++) { for (i=0; i<E_TABSZ ; i++) {
unsigned char uc; unsigned char uc;
get_user(uc, arg+i); __get_user(uc, arg+i);
p[i] = UNI_DIRECT_BASE | uc; p[i] = UNI_DIRECT_BASE | uc;
} }
...@@ -255,7 +255,7 @@ int con_get_trans_old(unsigned char * arg) ...@@ -255,7 +255,7 @@ int con_get_trans_old(unsigned char * arg)
for (i=0; i<E_TABSZ ; i++) for (i=0; i<E_TABSZ ; i++)
{ {
ch = conv_uni_to_pc(p[i]); ch = conv_uni_to_pc(p[i]);
put_user((ch & ~0xff) ? 0 : ch, arg+i); __put_user((ch & ~0xff) ? 0 : ch, arg+i);
} }
return 0; return 0;
} }
...@@ -272,7 +272,7 @@ int con_set_trans_new(ushort * arg) ...@@ -272,7 +272,7 @@ int con_set_trans_new(ushort * arg)
for (i=0; i<E_TABSZ ; i++) { for (i=0; i<E_TABSZ ; i++) {
unsigned short us; unsigned short us;
get_user(us, arg+i); __get_user(us, arg+i);
p[i] = us; p[i] = us;
} }
...@@ -291,7 +291,7 @@ int con_get_trans_new(ushort * arg) ...@@ -291,7 +291,7 @@ int con_get_trans_new(ushort * arg)
return i; return i;
for (i=0; i<E_TABSZ ; i++) for (i=0; i<E_TABSZ ; i++)
put_user(p[i], arg+i); __put_user(p[i], arg+i);
return 0; return 0;
} }
...@@ -381,8 +381,8 @@ con_set_unimap(ushort ct, struct unipair *list) ...@@ -381,8 +381,8 @@ con_set_unimap(ushort ct, struct unipair *list)
while( ct-- ) while( ct-- )
{ {
unsigned short unicode, fontpos; unsigned short unicode, fontpos;
get_user(unicode, &list->unicode); __get_user(unicode, &list->unicode);
get_user(fontpos, &list->fontpos); __get_user(fontpos, &list->fontpos);
if ( (err1 = con_insert_unipair(unicode,fontpos)) != 0 ) if ( (err1 = con_insert_unipair(unicode,fontpos)) != 0 )
err = err1; err = err1;
list++; list++;
...@@ -434,15 +434,15 @@ con_get_unimap(ushort ct, ushort *uct, struct unipair *list){ ...@@ -434,15 +434,15 @@ con_get_unimap(ushort ct, ushort *uct, struct unipair *list){
{ {
if ( *p2 < MAX_GLYPH && ect++ < ct ) if ( *p2 < MAX_GLYPH && ect++ < ct )
{ {
put_user((u_short)((i<<11)+(j<<6)+k), __put_user((u_short)((i<<11)+(j<<6)+k),
&list->unicode); &list->unicode);
put_user((u_short) *p2, &list->fontpos); __put_user((u_short) *p2, &list->fontpos);
list++; list++;
} }
p2++; p2++;
} }
} }
put_user(ect, uct); __put_user(ect, uct);
return ((ect <= ct) ? 0 : -ENOMEM); return ((ect <= ct) ? 0 : -ENOMEM);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -49,6 +49,7 @@ struct board_info { ...@@ -49,6 +49,7 @@ struct board_info {
ushort numports; ushort numports;
ushort port; ushort port;
ulong membase; ulong membase;
ulong memsize;
ushort first_minor; ushort first_minor;
}; };
......
...@@ -118,8 +118,9 @@ int set_selection(const unsigned long arg, struct tty_struct *tty, int user) ...@@ -118,8 +118,9 @@ int set_selection(const unsigned long arg, struct tty_struct *tty, int user)
int sel_mode, new_sel_start, new_sel_end, spc; int sel_mode, new_sel_start, new_sel_end, spc;
char *bp, *obp; char *bp, *obp;
int i, ps, pe; int i, ps, pe;
do_unblank_screen(); do_unblank_screen();
poke_blanked_console();
{ unsigned short *args, xs, ys, xe, ye; { unsigned short *args, xs, ys, xe, ye;
...@@ -291,7 +292,7 @@ int paste_selection(struct tty_struct *tty) ...@@ -291,7 +292,7 @@ int paste_selection(struct tty_struct *tty)
if (!bp || !c) if (!bp || !c)
return 0; return 0;
do_unblank_screen(); poke_blanked_console();
add_wait_queue(&vt->paste_wait, &wait); add_wait_queue(&vt->paste_wait, &wait);
do { do {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
......
...@@ -44,6 +44,10 @@ ...@@ -44,6 +44,10 @@
* *
* Restrict vt switching via ioctl() * Restrict vt switching via ioctl()
* -- grif@cs.ucr.edu, 5-Dec-95 * -- grif@cs.ucr.edu, 5-Dec-95
*
* Move console and virtual terminal code to more apropriate files,
* implement CONFIG_VT and generalize console device interface.
* -- Marko Kohtala <Marko.Kohtala@hut.fi>, March 97
*/ */
#include <linux/config.h> #include <linux/config.h>
......
This diff is collapsed.
...@@ -621,6 +621,7 @@ static void receive_packet(struct device *dev, int len) ...@@ -621,6 +621,7 @@ static void receive_packet(struct device *dev, int len)
if (set_bit(0, (void *) &adapter->dmaing)) if (set_bit(0, (void *) &adapter->dmaing))
printk("%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction); printk("%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction);
skb->dev = dev;
adapter->current_dma.direction = 0; adapter->current_dma.direction = 0;
adapter->current_dma.length = rlen; adapter->current_dma.length = rlen;
adapter->current_dma.skb = skb; adapter->current_dma.skb = skb;
...@@ -698,12 +699,12 @@ static void elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr) ...@@ -698,12 +699,12 @@ static void elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr)
} else { } else {
struct sk_buff *skb = adapter->current_dma.skb; struct sk_buff *skb = adapter->current_dma.skb;
if (skb) { if (skb) {
skb->dev = dev;
if (adapter->current_dma.target) { if (adapter->current_dma.target) {
/* have already done the skb_put() */ /* have already done the skb_put() */
memcpy(adapter->current_dma.target, adapter->dma_buffer, adapter->current_dma.length); memcpy(adapter->current_dma.target, adapter->dma_buffer, adapter->current_dma.length);
} }
skb->protocol = eth_type_trans(skb,dev); skb->protocol = eth_type_trans(skb,dev);
adapter->stats.rx_bytes += skb->len;
netif_rx(skb); netif_rx(skb);
} }
} }
...@@ -1032,10 +1033,8 @@ static int send_packet(struct device *dev, struct sk_buff *skb) ...@@ -1032,10 +1033,8 @@ static int send_packet(struct device *dev, struct sk_buff *skb)
printk("%s: transmit blocked\n", dev->name); printk("%s: transmit blocked\n", dev->name);
return FALSE; return FALSE;
} }
adapter = dev->priv;
adapter->stats.tx_bytes+=nlen; adapter->stats.tx_bytes += nlen;
/* /*
* send the adapter a transmit packet command. Ignore segment and offset * send the adapter a transmit packet command. Ignore segment and offset
......
...@@ -79,6 +79,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then ...@@ -79,6 +79,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
tristate 'Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5 tristate 'Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5
tristate 'DECchip Tulip (dc21x4x) PCI support' CONFIG_DEC_ELCP tristate 'DECchip Tulip (dc21x4x) PCI support' CONFIG_DEC_ELCP
tristate 'Digi Intl. RightSwitch SE-X support' CONFIG_DGRS tristate 'Digi Intl. RightSwitch SE-X support' CONFIG_DGRS
tristate 'EtherExpressPro/100 support' CONFIG_EEXPRESS_PRO100
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 tristate 'Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210
bool 'Zenith Z-Note support (EXPERIMENTAL)' CONFIG_ZNET bool 'Zenith Z-Note support (EXPERIMENTAL)' CONFIG_ZNET
...@@ -113,7 +114,9 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then ...@@ -113,7 +114,9 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
fi fi
fi fi
tristate 'PLIP (parallel port) support' CONFIG_PLIP if [ ! "$CONFIG_PNP_PARPORT" = "n" ]; then
dep_tristate 'PLIP (parallel port) support' CONFIG_PLIP $CONFIG_PNP_PARPORT
fi
tristate 'PPP (point-to-point) support' CONFIG_PPP tristate 'PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then if [ ! "$CONFIG_PPP" = "n" ]; then
......
...@@ -371,6 +371,14 @@ else ...@@ -371,6 +371,14 @@ else
endif endif
endif endif
ifeq ($(CONFIG_EEXPRESS_PRO100),y)
L_OBJS += eepro100.o
else
ifeq ($(CONFIG_EEXPRESS_PRO100),m)
M_OBJS += eepro100.o
endif
endif
ifeq ($(CONFIG_WAVELAN),y) ifeq ($(CONFIG_WAVELAN),y)
L_OBJS += wavelan.o L_OBJS += wavelan.o
else else
......
...@@ -50,6 +50,7 @@ extern int hp_plus_probe(struct device *dev); ...@@ -50,6 +50,7 @@ extern int hp_plus_probe(struct device *dev);
extern int znet_probe(struct device *); extern int znet_probe(struct device *);
extern int express_probe(struct device *); extern int express_probe(struct device *);
extern int eepro_probe(struct device *); extern int eepro_probe(struct device *);
extern int eepro100_probe(struct device *);
extern int el3_probe(struct device *); extern int el3_probe(struct device *);
extern int at1500_probe(struct device *); extern int at1500_probe(struct device *);
extern int pcnet32_probe(struct device *); extern int pcnet32_probe(struct device *);
...@@ -178,6 +179,9 @@ static int ethif_probe(struct device *dev) ...@@ -178,6 +179,9 @@ static int ethif_probe(struct device *dev)
#ifdef CONFIG_EEXPRESS_PRO /* Intel EtherExpress Pro/10 */ #ifdef CONFIG_EEXPRESS_PRO /* Intel EtherExpress Pro/10 */
&& eepro_probe(dev) && eepro_probe(dev)
#endif #endif
#ifdef CONFIG_EEXPRESS_PRO100 /* Intel EtherExpress Pro/100 */
&& eepro100_probe(dev)
#endif
#ifdef CONFIG_DEPCA /* DEC DEPCA */ #ifdef CONFIG_DEPCA /* DEC DEPCA */
&& depca_probe(dev) && depca_probe(dev)
#endif #endif
...@@ -327,18 +331,6 @@ static struct device eth0_dev = { ...@@ -327,18 +331,6 @@ static struct device eth0_dev = {
# undef NEXT_DEV # undef NEXT_DEV
# define NEXT_DEV (&eth0_dev) # define NEXT_DEV (&eth0_dev)
#if defined(PLIP) || defined(CONFIG_PLIP)
extern int plip_init(struct device *);
static struct device plip2_dev = {
"plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, };
static struct device plip1_dev = {
"plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, };
static struct device plip0_dev = {
"plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, };
# undef NEXT_DEV
# define NEXT_DEV (&plip0_dev)
#endif /* PLIP */
#if defined(SLIP) || defined(CONFIG_SLIP) #if defined(SLIP) || defined(CONFIG_SLIP)
/* To be exact, this node just hooks the initialization /* To be exact, this node just hooks the initialization
routines to the device structures. */ routines to the device structures. */
......
This diff is collapsed.
...@@ -318,7 +318,7 @@ int register_netdev(struct device *dev) ...@@ -318,7 +318,7 @@ int register_netdev(struct device *dev)
save_flags(flags); save_flags(flags);
cli(); cli();
if (dev && dev->init) { if (dev) {
if (dev->name && if (dev->name &&
((dev->name[0] == '\0') || (dev->name[0] == ' '))) { ((dev->name[0] == '\0') || (dev->name[0] == ' '))) {
for (i = 0; i < MAX_ETH_CARDS; ++i) for (i = 0; i < MAX_ETH_CARDS; ++i)
...@@ -330,13 +330,15 @@ int register_netdev(struct device *dev) ...@@ -330,13 +330,15 @@ int register_netdev(struct device *dev)
} }
} }
sti(); /* device probes assume interrupts enabled */ if (dev->init) {
if (dev->init(dev) != 0) { sti(); /* device probes assume interrupts enabled */
if (dev->init(dev) != 0) {
if (i < MAX_ETH_CARDS) ethdev_index[i] = NULL; if (i < MAX_ETH_CARDS) ethdev_index[i] = NULL;
restore_flags(flags); restore_flags(flags);
return -EIO; return -EIO;
}
cli();
} }
cli();
/* Add device to end of chain */ /* Add device to end of chain */
if (dev_base) { if (dev_base) {
......
This diff is collapsed.
This diff is collapsed.
Currently known (or at least suspected) bugs in parport:
o /proc/parport is buggy under 2.0.29 (ls /proc/parport/0 gives no such
file or directory). David has suggested a fix for this. [/proc/parport
has been temporarily taken out]
o SCSI aborts for PPA under 2.0.29 [reported by jmr]. Under investigation.
o make config (etc) allow you to select CONFIG_PNP_PARPORT=m, CONFIG_PPA=y -
the resulting kernel won't link.
o IEEE1284 code does not do the terminating handshake after transfers, which
seems to upset some devices.
o lp doesn't allow you to read status while printing is in progress.
#
# Plug and Play configuration
#
mainmenu_option next_comment
comment 'Plug and Play support'
bool 'Plug and Play support' CONFIG_PNP
if [ "$CONFIG_PNP" = "y" ]; then
if [ "$CONFIG_PNP_PARPORT" != "n" ]; then
bool ' Auto-probe for parallel devices' CONFIG_PNP_PARPORT_AUTOPROBE
fi
fi
endmenu
#
# Makefile for the kernel Plug-and-Play device drivers.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
#
# Note 3! Plug and Play is the Borg. We have assimilated some other
# drivers in the `char', `net' and `scsi' directories, but left them
# there to allay suspicion.
SUB_DIRS :=
MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS)
L_TARGET := pnp.a
MX_OBJS :=
LX_OBJS :=
MI_OBJS :=
MIX_OBJS :=
ifeq ($(CONFIG_PNP_PARPORT),y)
L_OBJS += parport_share.o parport_procfs.o
ifeq ($(CONFIG_PNP_PARPORT_AUTOPROBE),y)
L_OBJS += parport_probe.o
endif
LX_OBJS += parport_init.o
else
ifeq ($(CONFIG_PNP_PARPORT),m)
MI_OBJS += parport_share.o parport_procfs.o
ifeq ($(CONFIG_PNP_PARPORT_AUTOPROBE),y)
MI_OBJS += parport_probe.o
endif
MIX_OBJS += parport_init.o
M_OBJS += parport.o
endif
endif
include $(TOPDIR)/Rules.make
parport.o: $(MI_OBJS) $(MIX_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ $(MI_OBJS) $(MIX_OBJS)
Things to be done.
0. Fix the bugs (see BUGS-parport).
1. Write a /proc interface for parport. As a starting point, we could
probably have something like this:
/proc/parport/N/hardware
Details of the port hardware - chipset, capabilities and so on.
Read-only.
/proc/parport/N/irq
IRQ number of the port. Read-write.
/proc/parport/N/devices
List of devices connected to this bus, with the currently active
one marked in some way. Probably you'd have the device in the
first column, and '*' (for the current device) or '-' (for a
lurker) in the second column.
NOTE: The directory structure has been coded -- but the files are
missing ...
2. Proper documentation.
3. Overhaul lp.c:
a) It's a mess, and there is a lot of code duplication.
b) ECP support would be nice. This can only work if both the port and
the printer support it.
c) Errors could do with being handled better. There's no point logging a
message every 10 seconds when the printer is out of paper.
d) Handle status readback automatically. IEEE1284 printers can post status
bits when they have something to say. We should read out and deal
with (maybe just log) whatever the printer wants to tell the world.
4. Assimilate more drivers.
This diff is collapsed.
/* $Id: parport_ll_io.h,v 1.1.2.1 1997/03/26 13:01:09 phil Exp $
* David Campbell's "favourite IO routines" for parallel ports
*/
#define r_dtr(x) inb((x)->base)
#define r_str(x) inb((x)->base+1)
#define r_ctr(x) inb((x)->base+2)
#define r_epp(x) inb((x)->base+4)
#define r_fifo(x) inb((x)->base+0x400)
#define r_ecr(x) inb((x)->base+0x402)
#define r_cnfgA(x) inb((x)->base+0x400)
#define r_cnfgB(x) inb((x)->base+0x401)
#define w_dtr(x,y) outb((y), (x)->base)
#define w_str(x,y) outb((y), (x)->base+1)
#define w_ctr(x,y) outb((y), (x)->base+2)
#define w_epp(x,y) outb((y), (x)->base+4)
#define w_fifo(x,y) outb((y), (x)->base+0x400)
#define w_ecr(x,y) outb((y), (x)->base+0x402)
#define w_cnfgA(x,y) outb((y), (x)->base+0x400)
#define w_cnfgB(x,y) outb((y), (x)->base+0x401)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -71,9 +71,16 @@ if [ "$CONFIG_PCI" = "y" -a "$CONFIG_SCSI_NCR53C7xx" != "y" ]; then ...@@ -71,9 +71,16 @@ if [ "$CONFIG_PCI" = "y" -a "$CONFIG_SCSI_NCR53C7xx" != "y" ]; then
fi fi
fi fi
if [ "$CONFIG_MCA" = "y" ]; then if [ "$CONFIG_MCA" = "y" ]; then
bool 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA
fi
if [ "$CONFIG_PNP_PARPORT" != "n" ]; then
dep_tristate 'IOMEGA Parallel Port ZIP drive SCSI support' CONFIG_SCSI_PPA $CONFIG_SCSI $CONFIG_PNP_PARPORT
if [ "$CONFIG_SCSI_PPA" != "n" ]; then
int ' Pedantic EPP-checking' CONFIG_SCSI_PPA_HAVE_PEDANTIC 2 0 3
int ' EPP timeout' CONFIG_SCSI_PPA_EPP_TIME 128
fi
dep_tristate 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA $CONFIG_SCSI dep_tristate 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA $CONFIG_SCSI
fi fi
dep_tristate 'IOMEGA Parallel Port ZIP drive SCSI support' CONFIG_SCSI_PPA $CONFIG_SCSI
dep_tristate 'PAS16 SCSI support' CONFIG_SCSI_PAS16 $CONFIG_SCSI dep_tristate 'PAS16 SCSI support' CONFIG_SCSI_PAS16 $CONFIG_SCSI
dep_tristate 'Qlogic FAS SCSI support' CONFIG_SCSI_QLOGIC_FAS $CONFIG_SCSI dep_tristate 'Qlogic FAS SCSI support' CONFIG_SCSI_QLOGIC_FAS $CONFIG_SCSI
if [ "$CONFIG_PCI" = "y" ]; then if [ "$CONFIG_PCI" = "y" ]; then
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -173,6 +173,7 @@ void clear_inode(struct inode * inode) ...@@ -173,6 +173,7 @@ void clear_inode(struct inode * inode)
{ {
struct wait_queue * wait; struct wait_queue * wait;
inode->i_count++;
truncate_inode_pages(inode, 0); truncate_inode_pages(inode, 0);
wait_on_inode(inode); wait_on_inode(inode);
if (IS_WRITABLE(inode)) { if (IS_WRITABLE(inode)) {
...@@ -182,6 +183,7 @@ void clear_inode(struct inode * inode) ...@@ -182,6 +183,7 @@ void clear_inode(struct inode * inode)
remove_inode_hash(inode); remove_inode_hash(inode);
remove_inode_free(inode); remove_inode_free(inode);
wait = ((volatile struct inode *) inode)->i_wait; wait = ((volatile struct inode *) inode)->i_wait;
inode->i_count--;
if (inode->i_count) if (inode->i_count)
nr_free_inodes++; nr_free_inodes++;
memset(inode,0,sizeof(*inode)); memset(inode,0,sizeof(*inode));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
torvalds@penguin.transmeta.com
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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