diff -u --recursive --new-file v2.4.2/linux/CREDITS linux/CREDITS
--- v2.4.2/linux/CREDITS Wed Feb 21 18:20:08 2001
+++ linux/CREDITS Sat Mar 3 10:52:18 2001
@@ -316,8 +316,8 @@
S: Australia
N: Hugh Blemings
-E: hugh@linuxcare.com
-W: http://www.linuxcare.com.au/hugh/
+E: hugh@misc.nu
+W: http://misc.nu/hugh/
D: Author and maintainer of the Keyspan USB to Serial drivers
S: Po Box 234
S: Belconnen ACT 2616
@@ -679,12 +679,8 @@
N: Cort Dougan
E: cort@fsmlabs.com
-W: http://www.ppc.kernel.org/~cort/
+W: http://www.fsmlabs.com/linuxppcbk.html
D: PowerPC
-S: Finite State Machine Labs
-S: P.O. 1829
-S: Socorro, New Mexico 87801
-S: USA
N: Oleg Drokin
E: green@ccssu.crimea.ua
@@ -1026,11 +1022,11 @@
S: Canada
N: Richard Günther
-E: richard.guenther@student.uni-tuebingen.de
+E: rguenth@tat.physik.uni-tuebingen.de
+W: http://www.tat.physik.uni-tuebingen.de/~rguenth
P: 2048/2E829319 2F 83 FC 93 E9 E4 19 E2 93 7A 32 42 45 37 23 57
D: binfmt_misc
-S: Fichtenweg 3/511
-S: 72076 Tübingen
+S: 72074 Tübingen
S: Germany
N: Justin Guyett
@@ -1347,9 +1343,7 @@
N: Dave Jones
E: davej@suse.de
-E: dave@powertweak.com
-E: djones2@glam.ac.uk
-W: http://powertweak.sourceforge.net
+W: http://www.suse.de/~davej
D: Moved PCI bridge tuning to userspace (Powertweak).
D: Centaur/IDT Winchip/Winchip 2 tweaks.
D: AFFS fixes for 2.3.x
@@ -2191,15 +2185,15 @@
S: USA
N: Kai Petzke
-E: wpp@marie.physik.tu-berlin.de
-W: http://physik.tu-berlin.de/~wpp
-P: 1024/B42868C1 D9 59 B9 98 BB 93 05 38 2E 3E 31 79 C3 65 5D E1
+E: petzke@teltarif.de
+W: http://www.teltarif.de/
+P: 1024/B42868C1 D9 59 B9 98 BB 93 05 38 2E 3E 31 79 C3 65 5D E1
D: Driver for Laser Magnetic Storage CD-ROM
D: Some kernel bug fixes
D: Port of the database Postgres
-D: "Unix fuer Jedermann" a German introduction to linux (see my web page)
-S: M"ullerstr. 69
-S: 13349 Berlin
+D: Book: "Linux verstehen und anwenden" (Hanser-Verlag)
+S: Triftstra=DFe 55
+S: 13353 Berlin
S: Germany
N: Emanuel Pirker
diff -u --recursive --new-file v2.4.2/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.4.2/linux/Documentation/Configure.help Wed Feb 21 18:20:08 2001
+++ linux/Documentation/Configure.help Sun Mar 4 14:30:18 2001
@@ -5469,6 +5469,45 @@
Adaptec AIC7xxx chipset SCSI controller support
CONFIG_SCSI_AIC7XXX
+ This driver supports all of Adaptec's PCI based SCSI controllers (not
+ the hardware RAID controllers though) as well as the aic7770 based
+ EISA and VLB SCSI controllers (the 274x and 284x series). This is
+ an Adaptec sponsored driver written by Justin Gibbs. It is intended
+ to replace the previous aic7xxx driver maintained by Doug Ledford since
+ Doug is no longer maintaining that driver.
+
+Default number of TCQ commands per device
+CONFIG_AIC7XXX_CMDS_PER_DEVICE
+ Specify the number of commands you would like to allocate per SCSI
+ device when Tagged Command Queueing (TCQ) is enabled on that device.
+
+ This is an upper bound value for the number of tagged transactions
+ to be used for any device. The aic7xxx driver will automatically
+ vary this number based on device behavior. For devices with a
+ fixed maximum, the driver will eventually lock to this maximum
+ and display a console message inidicating this value.
+
+ Note: Unless you experience some type of device failure, the default
+ value, no enforced limit, should work for you.
+
+ Default: 253
+
+Initial Bus Reset Settle Delay
+CONFIG_AIC7XXX_RESET_DELAY
+ The number of milliseconds to delay after an initial bus reset.
+ The bus settle delay following all error recovery actions is
+ dictated by the SCSI layer and is not affected by this value.
+
+ Default: 5000 (5 seconds)
+
+Old Adaptec AIC7xxx chipset SCSI controller support
+CONFIG_SCSI_AIC7XXX_OLD
+ WARNING This driver is an older aic7xxx driver and is no longer under
+ active development. Adaptec, Inc. is writing a new driver to take the
+ place of this one, and it is recommended that whenever possible, people
+ should use the new Adaptec written driver instead of this one. This
+ driver will eventually be phased out entirely.
+
This is support for the various aic7xxx based Adaptec SCSI
controllers. These include the 274x EISA cards; 284x VLB cards;
2902, 2910, 293x, 294x, 394x, 3985 and several other PCI and
@@ -5490,7 +5529,7 @@
Information on the configuration options for this controller can be
found by checking the help file for each of the available
- configuration options. You should read drivers/scsi/README.aic7xxx
+ configuration options. You should read drivers/scsi/aic7xxx_old/README.aic7xxx
at a minimum before contacting the maintainer with any questions.
The SCSI-HOWTO, available from
http://www.linuxdoc.org/docs.html#howto , can also be of great
@@ -5499,10 +5538,10 @@
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read Documentation/modules.txt. The module will be
- called aic7xxx.o.
+ called aic7xxx_old.o.
Enable or Disable Tagged Command Queueing by default
-CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT
+CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT
This option causes the aic7xxx driver to attempt to use Tagged
Command Queueing (TCQ) on all devices that claim to support it.
@@ -5536,7 +5575,7 @@
reduce performance.
Default number of TCQ commands per device
-CONFIG_AIC7XXX_CMDS_PER_DEVICE
+CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE
Specify the number of commands you would like to allocate per SCSI
device when Tagged Command Queueing (TCQ) is enabled on that device.
@@ -5557,7 +5596,7 @@
Default: 8
Collect statistics to report in /proc
-CONFIG_AIC7XXX_PROC_STATS
+CONFIG_AIC7XXX_OLD_PROC_STATS
This option tells the driver to keep track of how many commands have
been sent to each particular device and report that information to
the user via the /proc/scsi/aic7xxx/n file, where n is the number of
@@ -5569,21 +5608,6 @@
If unsure, say N.
-Delay in seconds after SCSI bus reset
-CONFIG_AIC7XXX_RESET_DELAY
- This sets how long the driver will wait after resetting the SCSI bus
- before attempting to communicate with the devices on the SCSI bus
- again. This delay will be used during the reset phase at bootup time
- as well as after any reset that might occur during normal operation.
- Reasonable numbers range anywhere from 5 to 15 seconds depending on
- your devices. DAT tape drives are notorious for needing more time
- after a bus reset to be ready for the next command, but most hard
- drives and CD-ROM devices are ready in only a few seconds. This
- option has a maximum upper limit of 20 seconds to avoid bad
- interactions between the aic7xxx driver and the rest of the Linux
- kernel. The default value has been reduced to 5 seconds. If this
- doesn't work with your hardware, try increasing this value.
-
IBM ServeRAID Support
CONFIG_SCSI_IPS
This is support for the IBM ServeRAID hardware RAID controllers.
@@ -8390,22 +8414,6 @@
module, say M here and read Documentation/modules.txt as well as
Documentation/networking/net-modules.txt.
-RealTek 8129 (not 8019/8029/8139!) support (EXPERIMENTAL)
-CONFIG_RTL8129
- This is NOT for RTL-8139 cards. Instead, select the 8139too driver
- (CONFIG_8139TOO).
- This is a driver for the Fast Ethernet PCI network cards based on
- the RTL8129 chip. If you have one of those, say Y and
- read the Ethernet-HOWTO, available from
- http://www.linuxdoc.org/docs.html#howto .
-
- Note: the 8029 is a NE2000 PCI clone, you can use the NE2K-PCI driver.
-
- If you want to compile this driver as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read Documentation/modules.txt. This is recommended.
- The module will be called rtl8129.o.
-
RealTek RTL-8139 PCI Fast Ethernet Adapter support
CONFIG_8139TOO
This is a driver for the Fast Ethernet PCI network cards based on
@@ -8481,7 +8489,7 @@
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read Documentation/modules.txt. This is recommended.
- The module will be called starfile.o.
+ The module will be called starfire.o.
Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support
CONFIG_ACENIC
@@ -9399,7 +9407,7 @@
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
- The module will will be called olympic.o. If you want to compile it
+ The module will be called olympic.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
Also read the file Documentation/networking/olympic.txt or check the
@@ -9439,7 +9447,7 @@
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
- The module will will be called tms380tr.o. If you want to compile it
+ The module will be called tms380tr.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
Generic TMS380 PCI support
@@ -9454,7 +9462,7 @@
This driver is available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
- The module will will be called tmspci.o. If you want to compile it
+ The module will be called tmspci.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
Madge Smart 16/4 PCI Mk2 support
@@ -9464,7 +9472,7 @@
This driver is available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
- The module will will be called abyss.o. If you want to compile it
+ The module will be called abyss.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
Madge Smart 16/4 Ringode MicroChannel
@@ -9474,7 +9482,7 @@
This driver is available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
- The module will will be called madgemc.o. If you want to compile it
+ The module will be called madgemc.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
SMC ISA TokenRing adapter support
@@ -9490,7 +9498,7 @@
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
- The module will will be called smctr.o. If you want to compile it
+ The module will be called smctr.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
Sun Happy Meal 10/100baseT support
diff -u --recursive --new-file v2.4.2/linux/Documentation/DMA-mapping.txt linux/Documentation/DMA-mapping.txt
--- v2.4.2/linux/Documentation/DMA-mapping.txt Mon Dec 11 13:45:42 2000
+++ linux/Documentation/DMA-mapping.txt Sat Mar 3 10:55:47 2001
@@ -59,7 +59,7 @@
1) Use some non-DMA mode for data transfer, if possible.
2) Ignore this device and do not initialize it.
-It is recommended that your driver print a kernel KERN_WARN message
+It is recommended that your driver print a kernel KERN_WARNING message
when you do one of these two things. In this manner, if a user of
your driver reports that performance is bad or that the device is not
even detected, you can ask him for the kernel messages to find out
diff -u --recursive --new-file v2.4.2/linux/Documentation/DocBook/kernel-api.tmpl linux/Documentation/DocBook/kernel-api.tmpl
--- v2.4.2/linux/Documentation/DocBook/kernel-api.tmpl Sat Dec 30 18:16:13 2000
+++ linux/Documentation/DocBook/kernel-api.tmpl Fri Mar 2 18:43:10 2001
@@ -34,6 +34,18 @@
+
+
+ Driver Basic
+ Driver Entry and Exit points
+!Iinclude/linux/init.h
+
+
+ Atomics
+!Iinclude/asm-i386/atomic.h
+
+
+
Data Types
Doubly Linked Lists
diff -u --recursive --new-file v2.4.2/linux/Documentation/arm/SA1100/Brutus linux/Documentation/arm/SA1100/Brutus
--- v2.4.2/linux/Documentation/arm/SA1100/Brutus Fri May 12 11:21:20 2000
+++ linux/Documentation/arm/SA1100/Brutus Fri Mar 2 11:12:06 2001
@@ -3,7 +3,7 @@
http://developer.intel.com/design/strong/applnots/sa1100lx/getstart.htm
-To compile for Brutus, you must issue the following comands:
+To compile for Brutus, you must issue the following commands:
make brutus_config
make config
diff -u --recursive --new-file v2.4.2/linux/Documentation/binfmt_misc.txt linux/Documentation/binfmt_misc.txt
--- v2.4.2/linux/Documentation/binfmt_misc.txt Tue Apr 28 14:22:03 1998
+++ linux/Documentation/binfmt_misc.txt Fri Mar 2 18:38:37 2001
@@ -81,6 +81,6 @@
There is a web page about binfmt_misc at
-http://www.anatom.uni-tuebingen.de/~richi/linux/binfmt_misc.html
+http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html
-Richard Günther, richard.guenther@student.uni-tuebingen.de
+Richard Günther
diff -u --recursive --new-file v2.4.2/linux/Documentation/dnotify.txt linux/Documentation/dnotify.txt
--- v2.4.2/linux/Documentation/dnotify.txt Tue Nov 14 10:54:07 2000
+++ linux/Documentation/dnotify.txt Fri Mar 2 18:38:37 2001
@@ -28,7 +28,7 @@
information. However, if the F_SETSIG fcntl(2) call is used to let the
kernel know which signal to deliver, a siginfo structure will be passed to
the signal handler and the si_fd member of that structure will contain the
-file descriptor associated with the direcory in which the event occured.
+file descriptor associated with the directory in which the event occurred.
Preferably the application will choose one of the real time signals
(SIGRTMIN + ) so that the notifications may be queued. This is
diff -u --recursive --new-file v2.4.2/linux/Documentation/ioctl-number.txt linux/Documentation/ioctl-number.txt
--- v2.4.2/linux/Documentation/ioctl-number.txt Wed Feb 21 18:20:09 2001
+++ linux/Documentation/ioctl-number.txt Fri Mar 2 17:50:22 2001
@@ -92,6 +92,7 @@
'M' all linux/soundcard.h conflict!
'M' 00-1F linux/isicom.h conflict!
+'N' 00-1F drivers/usb/scanner.h
'P' all linux/soundcard.h
'Q' all linux/soundcard.h
'R' 00-1F linux/random.h
diff -u --recursive --new-file v2.4.2/linux/Documentation/isdn/INTERFACE linux/Documentation/isdn/INTERFACE
--- v2.4.2/linux/Documentation/isdn/INTERFACE Wed Feb 21 18:20:09 2001
+++ linux/Documentation/isdn/INTERFACE Fri Mar 2 18:38:37 2001
@@ -1,4 +1,4 @@
-$Id: INTERFACE,v 1.15 1999/08/25 20:02:13 werner Exp $
+$Id: INTERFACE,v 1.15.8.1 2001/02/16 16:43:22 kai Exp $
Description of the Interface between Linklevel and Hardwarelevel
of isdn4linux:
@@ -481,7 +481,7 @@
driver = driver-Id
command = ISDN_CMD_PROT_IO
arg = The lower 8 Bits define the addressed protocol as defined
- in ISDN_PTYPE..., the upper bits are used to differenciate
+ in ISDN_PTYPE..., the upper bits are used to differentiate
the protocol specific CMD.
para = protocol and function specific. See isdnif.h for detail.
diff -u --recursive --new-file v2.4.2/linux/Documentation/isdn/README.eicon linux/Documentation/isdn/README.eicon
--- v2.4.2/linux/Documentation/isdn/README.eicon Sat Nov 11 18:58:02 2000
+++ linux/Documentation/isdn/README.eicon Fri Mar 2 11:12:12 2001
@@ -100,17 +100,6 @@
the necessary D-Channel traces for isdnlog.
-FILECHECK:
-A part of the eicon driver source code files are provided
-by Eicon Technology. In order to get the best support from Eicon,
-these files are tested with a checksum, just to know if the files
-were modified. This does *not* mean, you are not allowed to modify the
-driver. If you want to improve the driver or you fix a bug, please do
-so and let me (or Eicon) know, about the necessary changes. So
-every user knows, if the driver he uses is modified or checked with
-Eicon files. When the driver has been loaded, in the syslog you will
-find something like "verified" or "modified" right after the version.
-
Thanks to
Deutsche Mailbox Saar-Lor-Lux GmbH
diff -u --recursive --new-file v2.4.2/linux/Documentation/isdn/README.hysdn linux/Documentation/isdn/README.hysdn
--- v2.4.2/linux/Documentation/isdn/README.hysdn Wed Feb 21 18:20:09 2001
+++ linux/Documentation/isdn/README.hysdn Fri Mar 2 11:12:12 2001
@@ -1,4 +1,4 @@
-$Id: README.hysdn,v 1.3 2000/08/06 09:22:51 armin Exp $
+$Id: README.hysdn,v 1.3.6.1 2001/02/10 14:41:19 kai Exp $
The hysdn driver has been written by
by Werner Cornelius (werner@isdn4linux.de or werner@titro.de)
for Hypercope GmbH Aachen Germany. Hypercope agreed to publish this driver
diff -u --recursive --new-file v2.4.2/linux/Documentation/kernel-doc-nano-HOWTO.txt linux/Documentation/kernel-doc-nano-HOWTO.txt
--- v2.4.2/linux/Documentation/kernel-doc-nano-HOWTO.txt Mon Jun 19 12:56:07 2000
+++ linux/Documentation/kernel-doc-nano-HOWTO.txt Fri Mar 2 18:43:11 2001
@@ -57,7 +57,8 @@
If you want to see man pages instead, you can do this:
$ cd linux
-$ scripts/kernel-doc -man $(find -name '*.c' '*.h') | split-man.pl /tmp/man
+$ scripts/kernel-doc -man $(find -name '*.c') | split-man.pl /tmp/man
+$ scripts/kernel-doc -man $(find -name '*.h') | split-man.pl /tmp/man
Here is split-man.pl:
@@ -68,7 +69,7 @@
die "where do I put the results?\n";
}
-mkdir $ARGV[0],0777 or die "Can't create $ARGV[0]: $!\n";
+mkdir $ARGV[0],0777;
$state = 0;
while () {
if (/^\.TH \"[^\"]*\" 4 \"([^\"]*)\"/) {
diff -u --recursive --new-file v2.4.2/linux/Documentation/kernel-parameters.txt linux/Documentation/kernel-parameters.txt
--- v2.4.2/linux/Documentation/kernel-parameters.txt Sat Dec 30 11:23:13 2000
+++ linux/Documentation/kernel-parameters.txt Fri Mar 2 11:02:15 2001
@@ -188,8 +188,10 @@
es1371= [HW,SOUND]
- ether= [HW,NET] Ethernet cards parameters (iomem, irq,
- dev_name).
+ ether= [HW,NET] Ethernet cards parameters (irq,
+ base_io_addr, mem_start, mem_end, name.
+ (mem_start is often overloaded to mean something
+ different and driver-specific).
fd_mcs= [HW,SCSI]
@@ -328,7 +330,11 @@
ncr53c8xx= [HW,SCSI]
- netdev= [NET]
+ netdev= [NET] Ethernet cards parameters (irq,
+ base_io_addr, mem_start, mem_end, name.
+ (mem_start is often overloaded to mean something
+ different and driver-specific).
+ (cf: ether=)
nfsaddrs= [NFS]
diff -u --recursive --new-file v2.4.2/linux/Documentation/networking/8139too.txt linux/Documentation/networking/8139too.txt
--- v2.4.2/linux/Documentation/networking/8139too.txt Mon Oct 30 12:54:42 2000
+++ linux/Documentation/networking/8139too.txt Fri Mar 2 11:02:14 2001
@@ -180,6 +180,52 @@
Change History
--------------
+Version 0.9.15 - February 20, 2001
+
+* Call pci_enable_device to wake up/assign resource to device,
+ before actually using it.
+* Support wacky clone PCI ids (report from Norival Toniato Junior)
+* Text spelling corrections
+* Make sure tp->phys[] is signed
+* Always wake queue after hw restart, in tx_timeout
+* Record time of last received packet
+
+
+Version 0.9.14 - January 11, 2001
+
+* Merge some changes from Becker version 1.13:
+ * Add DFE 538TX PCI id
+ * MII read/write functions updated
+ * Cfg93[45]6 lock/unlock fix
+ * RTL-8129 (MII) support
+* Clean up spinlocking
+
+
+Version 0.9.13 - December, 2000
+
+* Clear blocked signals, avoid buffer overrun setting current->comm
+* Remove bogus PCI BAR length assertions
+* Remove unused 'debug' module parameter
+
+
+Version 0.9.12 - November 23, 2000
+
+* Kill major Tx stop/wake queue race
+* Use SET_MODULE_OWNER and fix module unload race
+* Fix cable length ("Twister") tuning
+* Proper media[] array length checking
+* Replace timer with kernel thread for twister tuning state machine
+ and media checking. Fixes mdio_xxx locking, now mdio_xxx is always
+ protected by rtnl_lock semaphore.
+* Correct some sledgehammer a.k.a. overzealous spin-locks
+* Performance: Eliminate atomic_t for Tx counters, we don't need it
+* Performance: Don't copy Tx buffer if the rare case occurs where it
+ is aligned perfectly for us.
+* Eliminate needless casting of dev->priv
+* PIO mode selection and Twister tuning are now CONFIG_xxx options
+ (though purposefully not in net/Config.in... yet)
+
+
Version 0.9.11 - October 28, 2000
* Do not fail when PIO and MMIO region lengths do not match.
diff -u --recursive --new-file v2.4.2/linux/Documentation/networking/tulip.txt linux/Documentation/networking/tulip.txt
--- v2.4.2/linux/Documentation/networking/tulip.txt Tue Nov 7 11:08:09 2000
+++ linux/Documentation/networking/tulip.txt Fri Mar 2 11:02:14 2001
@@ -148,6 +148,17 @@
Version history
===============
+0.9.14 (February 20, 2000):
+* Fix PNIC problems (Manfred Spraul)
+* Add new PCI id for Accton comet
+* Support Davicom tulips
+* Fix oops in eeprom parsing
+* Enable workarounds for early PCI chipsets
+* IA64, hppa csr0 support
+* Support media types 5, 6
+* Interpret a bit more of the 21142 SROM extended media type 3
+* Add missing delay in eeprom reading
+
0.9.11 (November 3, 2000):
* Eliminate extra bus accesses when sharing interrupts (prumpf)
* Barrier following ownership descriptor bit flip (prumpf)
diff -u --recursive --new-file v2.4.2/linux/Documentation/powerpc/ppc_htab.txt linux/Documentation/powerpc/ppc_htab.txt
--- v2.4.2/linux/Documentation/powerpc/ppc_htab.txt Wed Mar 10 21:49:10 1999
+++ linux/Documentation/powerpc/ppc_htab.txt Sat Mar 3 10:52:23 2001
@@ -2,7 +2,7 @@
=====================================================================
This document and the related code was written by me (Cort Dougan), please
-email me (cort@cs.nmt.edu) if you have questions, comments or corrections.
+email me (cort@fsmlabs.com) if you have questions, comments or corrections.
Last Change: 2.16.98
diff -u --recursive --new-file v2.4.2/linux/Documentation/powerpc/smp.txt linux/Documentation/powerpc/smp.txt
--- v2.4.2/linux/Documentation/powerpc/smp.txt Thu Apr 29 12:39:07 1999
+++ linux/Documentation/powerpc/smp.txt Sat Mar 3 10:52:27 2001
@@ -2,7 +2,7 @@
=====================================================================
This document and the related code was written by me
-(Cort Dougan, cort@cs.nmt.edu) please email me if you have questions,
+(Cort Dougan, cort@fsmlabs.com) please email me if you have questions,
comments or corrections.
Last Change: 3.31.99
diff -u --recursive --new-file v2.4.2/linux/Documentation/powerpc/sound.txt linux/Documentation/powerpc/sound.txt
--- v2.4.2/linux/Documentation/powerpc/sound.txt Mon Jun 28 13:40:39 1999
+++ linux/Documentation/powerpc/sound.txt Sat Mar 3 10:52:30 2001
@@ -1,7 +1,7 @@
Information about PowerPC Sound support
=====================================================================
-Please mail me (Cort Dougan, cort@cs.nmt.edu) if you have questions,
+Please mail me (Cort Dougan, cort@fsmlabs.com) if you have questions,
comments or corrections.
Last Change: 6.16.99
diff -u --recursive --new-file v2.4.2/linux/Documentation/powerpc/zImage_layout.txt linux/Documentation/powerpc/zImage_layout.txt
--- v2.4.2/linux/Documentation/powerpc/zImage_layout.txt Sat Oct 10 09:53:24 1998
+++ linux/Documentation/powerpc/zImage_layout.txt Sat Mar 3 10:52:32 2001
@@ -1,7 +1,7 @@
Information about the Linux/PPC kernel images
=====================================================================
-Please mail me me (Cort Dougan, cort@cs.nmt.edu) if you have questions,
+Please mail me (Cort Dougan, cort@fsmlabs.com) if you have questions,
comments or corrections.
This document is meant to answer several questions I've had about how
diff -u --recursive --new-file v2.4.2/linux/Documentation/s390/cds.txt linux/Documentation/s390/cds.txt
--- v2.4.2/linux/Documentation/s390/cds.txt Wed Feb 21 18:20:09 2001
+++ linux/Documentation/s390/cds.txt Fri Mar 2 11:12:06 2001
@@ -241,7 +241,7 @@
The get_dev_info_by_irq() / get_dev_info_by_devno() functions return:
- 0 - sucessful completion
+ 0 - successful completion
-ENODEV - irq or devno don't specify a known subchannel or device
number.
-EINVAL - invalid devinfo value.
@@ -317,7 +317,7 @@
0 - successful completion
-ENODEV - irq doesn't specify a valid subchannel number
-EINVAL - an invalid parameter was detected
--EBUSY - an irrecoverable I/O error occured or the device is not
+-EBUSY - an irrecoverable I/O error occurred or the device is not
operational.
Usage Notes :
@@ -568,7 +568,7 @@
The do_IO() function returns :
- 0 - successful completion or request successfuly initiated
+ 0 - successful completion or request successfully initiated
-EBUSY - the do_io() function was caled out of sequence. The
device is currently processing a previous I/O request
-ENODEV - irq doesn't specify a valid subchannel, the device is
@@ -777,7 +777,7 @@
The halt_IO() function returns :
- 0 - successful completion or request successfuly initiated
+ 0 - successful completion or request successfully initiated
-EBUSY - the device is currently performing a synchronous I/O
operation : do_IO() with flag DOIO_WAIT_FOR_INTERRUPT
or an error was encountered and the device is currently
diff -u --recursive --new-file v2.4.2/linux/MAINTAINERS linux/MAINTAINERS
--- v2.4.2/linux/MAINTAINERS Wed Feb 21 18:20:09 2001
+++ linux/MAINTAINERS Sat Mar 3 10:52:14 2001
@@ -745,7 +745,7 @@
LINUX FOR POWERPC
P: Cort Dougan
M: cort@fsmlabs.com
-W: http://www.ppc.kernel.org/
+W: http://www.fsmlabs.com/linuxppcbk.html
S: Maintained
LINUX FOR POWER MACINTOSH
diff -u --recursive --new-file v2.4.2/linux/Makefile linux/Makefile
--- v2.4.2/linux/Makefile Wed Feb 21 18:20:09 2001
+++ linux/Makefile Sun Mar 4 14:30:18 2001
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
-SUBLEVEL = 2
-EXTRAVERSION =
+SUBLEVEL = 3
+EXTRAVERSION =-pre2
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -144,6 +144,7 @@
DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
+DRIVERS-$(CONFIG_SCSI_AIC7XXX) += drivers/scsi/aic7xxx/aic7xxx_drv.o
DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
@@ -440,8 +441,8 @@
find . -type f -print | sort | xargs sum > .SUMS
dep-files: scripts/mkdep archdep include/linux/version.h
- scripts/mkdep init/*.c > .depend
- scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
+ scripts/mkdep -- init/*.c > .depend
+ scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
ifdef CONFIG_MODVERSIONS
$(MAKE) update-modverfile
diff -u --recursive --new-file v2.4.2/linux/Rules.make linux/Rules.make
--- v2.4.2/linux/Rules.make Fri Dec 29 14:07:19 2000
+++ linux/Rules.make Sun Mar 4 14:30:18 2001
@@ -123,7 +123,7 @@
# This make dependencies quickly
#
fastdep: dummy
- $(TOPDIR)/scripts/mkdep $(wildcard *.[chS] local.h.master) > .depend
+ $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS) -- $(wildcard *.[chS]) > .depend
ifdef ALL_SUB_DIRS
$(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
endif
@@ -150,7 +150,7 @@
#
ALL_MOBJS = $(filter-out $(obj-y), $(obj-m))
ifneq "$(strip $(ALL_MOBJS))" ""
-PDWN=$(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
+MOD_DESTDIR ?= $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
endif
unexport MOD_DIRS
@@ -172,8 +172,8 @@
.PHONY: _modinst__
_modinst__: dummy
ifneq "$(strip $(ALL_MOBJS))" ""
- mkdir -p $(MODLIB)/kernel/$(PDWN)
- cp $(ALL_MOBJS) $(MODLIB)/kernel/$(PDWN)
+ mkdir -p $(MODLIB)/kernel/$(MOD_DESTDIR)
+ cp $(ALL_MOBJS) $(MODLIB)/kernel/$(MOD_DESTDIR)$(MOD_TARGET)
endif
.PHONY: modules_install
@@ -222,9 +222,9 @@
$(MODINCL)/%.ver: %.c
@if [ ! -r $(MODINCL)/$*.stamp -o $(MODINCL)/$*.stamp -ot $< ]; then \
- echo '$(CC) $(CFLAGS) -E -D__GENKSYMS__ $<'; \
+ echo '$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -D__GENKSYMS__ $<'; \
echo '| $(GENKSYMS) $(genksyms_smp_prefix) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp'; \
- $(CC) $(CFLAGS) -E -D__GENKSYMS__ $< \
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -D__GENKSYMS__ $< \
| $(GENKSYMS) $(genksyms_smp_prefix) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp; \
if [ -r $@ ] && cmp -s $@ $@.tmp; then echo $@ is unchanged; rm -f $@.tmp; \
else echo mv $@.tmp $@; mv -f $@.tmp $@; fi; \
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/defconfig linux/arch/alpha/defconfig
--- v2.4.2/linux/arch/alpha/defconfig Mon Oct 16 15:38:41 2000
+++ linux/arch/alpha/defconfig Sun Mar 4 14:30:18 2001
@@ -285,10 +285,8 @@
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
CONFIG_SCSI_AIC7XXX=y
-CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT=y
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_PROC_STATS=y
-CONFIG_AIC7XXX_RESET_DELAY=5
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
+CONFIG_AIC7XXX_RESET_DELAY=5000
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/alpha_ksyms.c linux/arch/alpha/kernel/alpha_ksyms.c
--- v2.4.2/linux/arch/alpha/kernel/alpha_ksyms.c Wed Feb 21 18:20:09 2001
+++ linux/arch/alpha/kernel/alpha_ksyms.c Fri Mar 2 11:15:47 2001
@@ -235,3 +235,4 @@
EXPORT_SYMBOL_NOVERS(memset);
EXPORT_SYMBOL(get_wchan);
+EXPORT_SYMBOL(flush_tlb_page);
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/console.c linux/arch/alpha/kernel/console.c
--- v2.4.2/linux/arch/alpha/kernel/console.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/console.c Fri Mar 2 11:12:07 2001
@@ -21,8 +21,8 @@
unsigned long __vga_hose_io_base = 0; /* base for default hose */
unsigned long __vga_hose_mem_base = 0; /* base for default hose */
-static struct pci_controler * __init
-default_vga_hose_select(struct pci_controler *h1, struct pci_controler *h2)
+static struct pci_controller * __init
+default_vga_hose_select(struct pci_controller *h1, struct pci_controller *h2)
{
if (h2->index < h1->index)
return h2;
@@ -31,7 +31,7 @@
}
void __init
-set_vga_hose(struct pci_controler *hose)
+set_vga_hose(struct pci_controller *hose)
{
if (hose) {
__vga_hose_io_base = hose->io_space->start;
@@ -42,7 +42,7 @@
void __init
locate_and_init_vga(void *(*sel_func)(void *, void *))
{
- struct pci_controler *hose = NULL;
+ struct pci_controller *hose = NULL;
struct pci_dev *dev = NULL;
if (!sel_func) sel_func = (void *)default_vga_hose_select;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_apecs.c linux/arch/alpha/kernel/core_apecs.c
--- v2.4.2/linux/arch/alpha/kernel/core_apecs.c Tue Mar 21 10:46:21 2000
+++ linux/arch/alpha/kernel/core_apecs.c Fri Mar 2 11:12:07 2001
@@ -357,7 +357,7 @@
};
void
-apecs_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+apecs_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
wmb();
*(vip)APECS_IOC_TBIA = 0;
@@ -367,13 +367,13 @@
void __init
apecs_init_arch(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
/*
* Create our single hose.
*/
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_cia.c linux/arch/alpha/kernel/core_cia.c
--- v2.4.2/linux/arch/alpha/kernel/core_cia.c Mon Dec 11 13:46:26 2000
+++ linux/arch/alpha/kernel/core_cia.c Fri Mar 2 11:12:07 2001
@@ -299,7 +299,7 @@
*/
void
-cia_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+cia_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
wmb();
*(vip)CIA_IOC_PCI_TBIA = 3; /* Flush all locked and unlocked. */
@@ -314,7 +314,7 @@
*/
static void
-cia_pci_tbi_try1(struct pci_controler *hose,
+cia_pci_tbi_try1(struct pci_controller *hose,
dma_addr_t start, dma_addr_t end)
{
wmb();
@@ -359,7 +359,7 @@
}
static void
-cia_pci_tbi_try2(struct pci_controler *hose,
+cia_pci_tbi_try2(struct pci_controller *hose,
dma_addr_t start, dma_addr_t end)
{
unsigned long flags;
@@ -595,7 +595,7 @@
static void __init
do_init_arch(int is_pyxis)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
int temp;
int cia_rev;
@@ -628,7 +628,7 @@
*(vip)CIA_IOC_HAE_IO = 0;
/* For PYXIS, we always use BWX bus and i/o accesses. To that end,
- make sure they're enabled on the controler. */
+ make sure they're enabled on the controller. */
if (is_pyxis) {
temp = *(vip)CIA_IOC_CIA_CNFG;
temp |= CIA_CNFG_IOA_BWEN;
@@ -643,7 +643,7 @@
* Create our single hose.
*/
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_irongate.c linux/arch/alpha/kernel/core_irongate.c
--- v2.4.2/linux/arch/alpha/kernel/core_irongate.c Mon Aug 28 21:21:57 2000
+++ linux/arch/alpha/kernel/core_irongate.c Fri Mar 2 11:12:07 2001
@@ -367,7 +367,7 @@
void __init
irongate_init_arch(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
IRONGATE0->stat_cmd = IRONGATE0->stat_cmd & ~0x100;
irongate_pci_clr_err();
@@ -377,7 +377,7 @@
* Create our single hose.
*/
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_lca.c linux/arch/alpha/kernel/core_lca.c
--- v2.4.2/linux/arch/alpha/kernel/core_lca.c Tue Mar 21 10:46:21 2000
+++ linux/arch/alpha/kernel/core_lca.c Fri Mar 2 11:12:07 2001
@@ -279,7 +279,7 @@
};
void
-lca_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+lca_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
wmb();
*(vip)LCA_IOC_TBIA = 0;
@@ -289,13 +289,13 @@
void __init
lca_init_arch(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
/*
* Create our single hose.
*/
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_mcpcia.c linux/arch/alpha/kernel/core_mcpcia.c
--- v2.4.2/linux/arch/alpha/kernel/core_mcpcia.c Wed Jun 21 22:30:59 2000
+++ linux/arch/alpha/kernel/core_mcpcia.c Fri Mar 2 11:12:07 2001
@@ -89,7 +89,7 @@
static unsigned int
conf_read(unsigned long addr, unsigned char type1,
- struct pci_controler *hose)
+ struct pci_controller *hose)
{
unsigned long flags;
unsigned long mid = MCPCIA_HOSE2MID(hose->index);
@@ -137,7 +137,7 @@
static void
conf_write(unsigned long addr, unsigned int value, unsigned char type1,
- struct pci_controler *hose)
+ struct pci_controller *hose)
{
unsigned long flags;
unsigned long mid = MCPCIA_HOSE2MID(hose->index);
@@ -171,7 +171,7 @@
}
static int
-mk_conf_addr(struct pci_dev *dev, int where, struct pci_controler *hose,
+mk_conf_addr(struct pci_dev *dev, int where, struct pci_controller *hose,
unsigned long *pci_addr, unsigned char *type1)
{
u8 bus = dev->bus->number;
@@ -199,7 +199,7 @@
static int
mcpcia_read_config_byte(struct pci_dev *dev, int where, u8 *value)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr, w;
unsigned char type1;
@@ -215,7 +215,7 @@
static int
mcpcia_read_config_word(struct pci_dev *dev, int where, u16 *value)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr, w;
unsigned char type1;
@@ -231,7 +231,7 @@
static int
mcpcia_read_config_dword(struct pci_dev *dev, int where, u32 *value)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr;
unsigned char type1;
@@ -246,7 +246,7 @@
static int
mcpcia_write_config(struct pci_dev *dev, int where, u32 value, long mask)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr;
unsigned char type1;
@@ -288,7 +288,7 @@
};
void
-mcpcia_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+mcpcia_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
wmb();
*(vuip)MCPCIA_SG_TBIA(MCPCIA_HOSE2MID(hose->index)) = 0;
@@ -333,11 +333,11 @@
static void __init
mcpcia_new_hose(int h)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct resource *io, *mem, *hae_mem;
int mid = MCPCIA_HOSE2MID(h);
- hose = alloc_pci_controler();
+ hose = alloc_pci_controller();
if (h == 0)
pci_isa_hose = hose;
io = alloc_resource();
@@ -386,7 +386,7 @@
}
static void __init
-mcpcia_startup_hose(struct pci_controler *hose)
+mcpcia_startup_hose(struct pci_controller *hose)
{
int mid = MCPCIA_HOSE2MID(hose->index);
unsigned int tmp;
@@ -464,7 +464,7 @@
void __init
mcpcia_init_hoses(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
int hose_count;
int h;
@@ -561,7 +561,7 @@
mcpcia_print_system_area(unsigned long la_ptr)
{
struct el_common *frame;
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct IOD_subpacket {
unsigned long base;
@@ -638,7 +638,7 @@
{
/* FIXME: how do we figure out which hose the
error was on? */
- struct pci_controler *hose;
+ struct pci_controller *hose;
for (hose = hose_head; hose; hose = hose->next)
mcpcia_pci_clr_err(MCPCIA_HOSE2MID(hose->index));
break;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_polaris.c linux/arch/alpha/kernel/core_polaris.c
--- v2.4.2/linux/arch/alpha/kernel/core_polaris.c Tue Mar 21 10:46:21 2000
+++ linux/arch/alpha/kernel/core_polaris.c Fri Mar 2 11:12:07 2001
@@ -178,7 +178,7 @@
void __init
polaris_init_arch(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
/* May need to initialize error reporting (see PCICTL0/1), but
* for now assume that the firmware has done the right thing
@@ -192,7 +192,7 @@
* Create our single hose.
*/
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_t2.c linux/arch/alpha/kernel/core_t2.c
--- v2.4.2/linux/arch/alpha/kernel/core_t2.c Tue Mar 21 10:46:21 2000
+++ linux/arch/alpha/kernel/core_t2.c Fri Mar 2 11:12:07 2001
@@ -324,7 +324,7 @@
void __init
t2_init_arch(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
unsigned int i;
for (i = 0; i < NR_CPUS; i++) {
@@ -384,7 +384,7 @@
* Create our single hose.
*/
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_titan.c linux/arch/alpha/kernel/core_titan.c
--- v2.4.2/linux/arch/alpha/kernel/core_titan.c Tue Jul 18 22:58:28 2000
+++ linux/arch/alpha/kernel/core_titan.c Fri Mar 2 11:12:07 2001
@@ -83,7 +83,7 @@
mk_conf_addr(struct pci_dev *dev, int where, unsigned long *pci_addr,
unsigned char *type1)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr;
u8 bus = dev->bus->number;
u8 device_fn = dev->devfn;
@@ -200,7 +200,7 @@
void
-titan_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+titan_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
titan_pachip *pachip =
(hose->index & 1) ? TITAN_pachip1 : TITAN_pachip0;
@@ -243,7 +243,7 @@
}
static void __init
-titan_init_agp(titan_pachip_port *port, struct pci_controler *hose)
+titan_init_agp(titan_pachip_port *port, struct pci_controller *hose)
{
union TPAchipPCTL pctl;
@@ -276,9 +276,9 @@
static void __init
titan_init_one_pachip_port(titan_pachip_port *port, int index)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
- hose = alloc_pci_controler();
+ hose = alloc_pci_controller();
if (index == 0)
pci_isa_hose = hose;
hose->io_space = alloc_resource();
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_tsunami.c linux/arch/alpha/kernel/core_tsunami.c
--- v2.4.2/linux/arch/alpha/kernel/core_tsunami.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/core_tsunami.c Fri Mar 2 11:12:07 2001
@@ -90,7 +90,7 @@
mk_conf_addr(struct pci_dev *dev, int where, unsigned long *pci_addr,
unsigned char *type1)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr;
u8 bus = dev->bus->number;
u8 device_fn = dev->devfn;
@@ -206,7 +206,7 @@
};
void
-tsunami_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+tsunami_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
tsunami_pchip *pchip = hose->index ? TSUNAMI_pchip1 : TSUNAMI_pchip0;
volatile unsigned long *csr;
@@ -280,12 +280,12 @@
static void __init
tsunami_init_one_pchip(tsunami_pchip *pchip, int index)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
if (tsunami_probe_read(&pchip->pctl.csr) == 0)
return;
- hose = alloc_pci_controler();
+ hose = alloc_pci_controller();
if (index == 0)
pci_isa_hose = hose;
hose->io_space = alloc_resource();
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/core_wildfire.c linux/arch/alpha/kernel/core_wildfire.c
--- v2.4.2/linux/arch/alpha/kernel/core_wildfire.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/core_wildfire.c Fri Mar 2 11:12:07 2001
@@ -64,10 +64,10 @@
void __init
wildfire_init_hose(int qbbno, int hoseno)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
wildfire_pci *pci;
- hose = alloc_pci_controler();
+ hose = alloc_pci_controller();
hose->io_space = alloc_resource();
hose->mem_space = alloc_resource();
@@ -346,7 +346,7 @@
}
void
-wildfire_pci_tbi(struct pci_controler *hose, dma_addr_t start, dma_addr_t end)
+wildfire_pci_tbi(struct pci_controller *hose, dma_addr_t start, dma_addr_t end)
{
int qbbno = hose->index >> 3;
int hoseno = hose->index & 7;
@@ -360,7 +360,7 @@
mk_conf_addr(struct pci_dev *dev, int where, unsigned long *pci_addr,
unsigned char *type1)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long addr;
u8 bus = dev->bus->number;
u8 device_fn = dev->devfn;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/pci-noop.c linux/arch/alpha/kernel/pci-noop.c
--- v2.4.2/linux/arch/alpha/kernel/pci-noop.c Wed Feb 21 18:20:10 2001
+++ linux/arch/alpha/kernel/pci-noop.c Fri Mar 2 11:12:07 2001
@@ -14,17 +14,17 @@
/*
- * The PCI controler list.
+ * The PCI controller list.
*/
-struct pci_controler *hose_head, **hose_tail = &hose_head;
-struct pci_controler *pci_isa_hose;
+struct pci_controller *hose_head, **hose_tail = &hose_head;
+struct pci_controller *pci_isa_hose;
-struct pci_controler * __init
-alloc_pci_controler(void)
+struct pci_controller * __init
+alloc_pci_controller(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
hose = alloc_bootmem(sizeof(*hose));
@@ -47,7 +47,7 @@
asmlinkage long
sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct pci_dev *dev;
/* from hose or from bus.devfn */
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/pci.c linux/arch/alpha/kernel/pci.c
--- v2.4.2/linux/arch/alpha/kernel/pci.c Mon Dec 11 13:46:26 2000
+++ linux/arch/alpha/kernel/pci.c Fri Mar 2 11:12:07 2001
@@ -43,11 +43,11 @@
/*
- * The PCI controler list.
+ * The PCI controller list.
*/
-struct pci_controler *hose_head, **hose_tail = &hose_head;
-struct pci_controler *pci_isa_hose;
+struct pci_controller *hose_head, **hose_tail = &hose_head;
+struct pci_controller *pci_isa_hose;
/*
* Quirks.
@@ -136,7 +136,7 @@
pcibios_align_resource(void *data, struct resource *res, unsigned long size)
{
struct pci_dev *dev = data;
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
unsigned long alignto;
unsigned long start = res->start;
@@ -224,7 +224,7 @@
pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus)
{
/* Update device resources. */
- struct pci_controler *hose = (struct pci_controler *)bus->sysdata;
+ struct pci_controller *hose = (struct pci_controller *)bus->sysdata;
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
@@ -244,7 +244,7 @@
{
/* Propogate hose info into the subordinate devices. */
- struct pci_controler *hose = bus->sysdata;
+ struct pci_controller *hose = bus->sysdata;
struct list_head *ln;
struct pci_dev *dev = bus->self;
@@ -284,7 +284,7 @@
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int where;
u32 reg;
@@ -328,7 +328,7 @@
u8 __init
common_swizzle(struct pci_dev *dev, u8 *pinp)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
if (dev->bus->number != hose->first_busno) {
u8 pin = *pinp;
@@ -349,7 +349,7 @@
pcibios_fixup_pbus_ranges(struct pci_bus * bus,
struct pbus_set_ranges_data * ranges)
{
- struct pci_controler *hose = (struct pci_controler *)bus->sysdata;
+ struct pci_controller *hose = (struct pci_controller *)bus->sysdata;
ranges->io_start -= hose->io_space->start;
ranges->io_end -= hose->io_space->start;
@@ -383,11 +383,11 @@
void __init
common_init_pci(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct pci_bus *bus;
int next_busno;
- /* Scan all of the recorded PCI controlers. */
+ /* Scan all of the recorded PCI controllers. */
for (next_busno = 0, hose = hose_head; hose; hose = hose->next) {
hose->first_busno = next_busno;
hose->last_busno = 0xff;
@@ -402,10 +402,10 @@
}
-struct pci_controler * __init
-alloc_pci_controler(void)
+struct pci_controller * __init
+alloc_pci_controller(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
hose = alloc_bootmem(sizeof(*hose));
@@ -432,7 +432,7 @@
asmlinkage long
sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct pci_dev *dev;
/* from hose or from bus.devfn */
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/pci_impl.h linux/arch/alpha/kernel/pci_impl.h
--- v2.4.2/linux/arch/alpha/kernel/pci_impl.h Thu Mar 16 14:08:32 2000
+++ linux/arch/alpha/kernel/pci_impl.h Fri Mar 2 11:12:07 2001
@@ -6,7 +6,7 @@
*/
struct pci_dev;
-struct pci_controler;
+struct pci_controller;
struct pci_iommu_arena;
/*
@@ -133,7 +133,7 @@
struct pci_iommu_arena
{
spinlock_t lock;
- struct pci_controler *hose;
+ struct pci_controller *hose;
unsigned long *ptes;
dma_addr_t dma_base;
unsigned int size;
@@ -143,15 +143,15 @@
/* The hose list. */
-extern struct pci_controler *hose_head, **hose_tail;
-extern struct pci_controler *pci_isa_hose;
+extern struct pci_controller *hose_head, **hose_tail;
+extern struct pci_controller *pci_isa_hose;
extern void common_init_pci(void);
extern u8 common_swizzle(struct pci_dev *, u8 *);
-extern struct pci_controler *alloc_pci_controler(void);
+extern struct pci_controller *alloc_pci_controller(void);
extern struct resource *alloc_resource(void);
-extern struct pci_iommu_arena *iommu_arena_new(struct pci_controler *,
+extern struct pci_iommu_arena *iommu_arena_new(struct pci_controller *,
dma_addr_t, unsigned long,
unsigned long);
extern long iommu_arena_alloc(struct pci_iommu_arena *arena, long n);
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/pci_iommu.c linux/arch/alpha/kernel/pci_iommu.c
--- v2.4.2/linux/arch/alpha/kernel/pci_iommu.c Mon Dec 11 13:46:26 2000
+++ linux/arch/alpha/kernel/pci_iommu.c Fri Mar 2 11:12:07 2001
@@ -43,7 +43,7 @@
}
struct pci_iommu_arena *
-iommu_arena_new(struct pci_controler *hose, dma_addr_t base,
+iommu_arena_new(struct pci_controller *hose, dma_addr_t base,
unsigned long window_size, unsigned long align)
{
unsigned long mem_size;
@@ -147,7 +147,7 @@
dma_addr_t
pci_map_single(struct pci_dev *pdev, void *cpu_addr, long size, int direction)
{
- struct pci_controler *hose = pdev ? pdev->sysdata : pci_isa_hose;
+ struct pci_controller *hose = pdev ? pdev->sysdata : pci_isa_hose;
dma_addr_t max_dma = pdev ? pdev->dma_mask : 0x00ffffff;
struct pci_iommu_arena *arena;
long npages, dma_ofs, i;
@@ -215,7 +215,7 @@
pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, long size,
int direction)
{
- struct pci_controler *hose = pdev ? pdev->sysdata : pci_isa_hose;
+ struct pci_controller *hose = pdev ? pdev->sysdata : pci_isa_hose;
struct pci_iommu_arena *arena;
long dma_ofs, npages;
@@ -454,7 +454,7 @@
int direction)
{
struct scatterlist *start, *end, *out;
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct pci_iommu_arena *arena;
dma_addr_t max_dma;
@@ -528,7 +528,7 @@
pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
int direction)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct pci_iommu_arena *arena;
struct scatterlist *end;
dma_addr_t max_dma;
@@ -596,7 +596,7 @@
int
pci_dma_supported(struct pci_dev *pdev, dma_addr_t mask)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
struct pci_iommu_arena *arena;
#if !DEBUG_NODIRECT
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/proto.h linux/arch/alpha/kernel/proto.h
--- v2.4.2/linux/arch/alpha/kernel/proto.h Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/proto.h Fri Mar 2 11:12:07 2001
@@ -10,14 +10,14 @@
struct pt_regs;
struct task_struct;
struct pci_dev;
-struct pci_controler;
+struct pci_controller;
/* core_apecs.c */
extern struct pci_ops apecs_pci_ops;
extern void apecs_init_arch(void);
extern void apecs_pci_clr_err(void);
extern void apecs_machine_check(u64, u64, struct pt_regs *);
-extern void apecs_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_cia.c */
extern struct pci_ops cia_pci_ops;
@@ -25,7 +25,7 @@
extern void cia_init_arch(void);
extern void pyxis_init_arch(void);
extern void cia_machine_check(u64, u64, struct pt_regs *);
-extern void cia_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_irongate.c */
extern struct pci_ops irongate_pci_ops;
@@ -38,14 +38,14 @@
extern struct pci_ops lca_pci_ops;
extern void lca_init_arch(void);
extern void lca_machine_check(u64, u64, struct pt_regs *);
-extern void lca_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_mcpcia.c */
extern struct pci_ops mcpcia_pci_ops;
extern void mcpcia_init_arch(void);
extern void mcpcia_init_hoses(void);
extern void mcpcia_machine_check(u64, u64, struct pt_regs *);
-extern void mcpcia_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_polaris.c */
extern struct pci_ops polaris_pci_ops;
@@ -66,21 +66,21 @@
extern void titan_init_arch(void);
extern void titan_kill_arch(int);
extern void titan_machine_check(u64, u64, struct pt_regs *);
-extern void titan_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_tsunami.c */
extern struct pci_ops tsunami_pci_ops;
extern void tsunami_init_arch(void);
extern void tsunami_kill_arch(int);
extern void tsunami_machine_check(u64, u64, struct pt_regs *);
-extern void tsunami_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* core_wildfire.c */
extern struct pci_ops wildfire_pci_ops;
extern void wildfire_init_arch(void);
extern void wildfire_kill_arch(int);
extern void wildfire_machine_check(u64, u64, struct pt_regs *);
-extern void wildfire_pci_tbi(struct pci_controler *, dma_addr_t, dma_addr_t);
+extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
/* setup.c */
extern unsigned long srm_hae;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c
--- v2.4.2/linux/arch/alpha/kernel/setup.c Wed Feb 21 18:20:10 2001
+++ linux/arch/alpha/kernel/setup.c Fri Mar 2 11:12:07 2001
@@ -201,7 +201,7 @@
long i;
if (hose_head) {
- struct pci_controler *hose;
+ struct pci_controller *hose;
for (hose = hose_head; hose; hose = hose->next)
if (hose->index == 0) {
io = hose->io_space;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/sys_dp264.c linux/arch/alpha/kernel/sys_dp264.c
--- v2.4.2/linux/arch/alpha/kernel/sys_dp264.c Fri Oct 27 10:55:01 2000
+++ linux/arch/alpha/kernel/sys_dp264.c Fri Mar 2 11:12:07 2001
@@ -404,13 +404,13 @@
};
const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5;
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;
if (irq > 0) {
irq += 16 * hose->index;
} else {
- /* ??? The Contaq IDE controler on the ISA bridge uses
+ /* ??? The Contaq IDE controller on the ISA bridge uses
"legacy" interrupts 14 and 15. I don't know if anything
can wind up at the same slot+pin on hose1, so we'll
just have to trust whatever value the console might
@@ -455,7 +455,7 @@
static u8 __init
monet_swizzle(struct pci_dev *dev, u8 *pinp)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int slot, pin = *pinp;
if (hose->first_busno == dev->bus->number) {
@@ -521,7 +521,7 @@
};
const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5;
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;
if (irq > 0)
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/sys_eiger.c linux/arch/alpha/kernel/sys_eiger.c
--- v2.4.2/linux/arch/alpha/kernel/sys_eiger.c Thu Mar 16 14:07:09 2000
+++ linux/arch/alpha/kernel/sys_eiger.c Fri Mar 2 11:12:07 2001
@@ -177,7 +177,7 @@
static u8 __init
eiger_swizzle(struct pci_dev *dev, u8 *pinp)
{
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int slot, pin = *pinp;
int bridge_count = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/sys_jensen.c linux/arch/alpha/kernel/sys_jensen.c
--- v2.4.2/linux/arch/alpha/kernel/sys_jensen.c Tue Mar 21 10:46:21 2000
+++ linux/arch/alpha/kernel/sys_jensen.c Fri Mar 2 11:12:07 2001
@@ -124,12 +124,12 @@
static void __init
jensen_init_arch(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
/* Create a hose so that we can report i/o base addresses to
userland. */
- pci_isa_hose = hose = alloc_pci_controler();
+ pci_isa_hose = hose = alloc_pci_controller();
hose->io_space = &ioport_resource;
hose->mem_space = &iomem_resource;
hose->index = 0;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/sys_rawhide.c linux/arch/alpha/kernel/sys_rawhide.c
--- v2.4.2/linux/arch/alpha/kernel/sys_rawhide.c Fri Oct 27 10:55:01 2000
+++ linux/arch/alpha/kernel/sys_rawhide.c Fri Mar 2 11:12:07 2001
@@ -139,7 +139,7 @@
static void __init
rawhide_init_irq(void)
{
- struct pci_controler *hose;
+ struct pci_controller *hose;
long i;
mcpcia_init_hoses();
@@ -204,7 +204,7 @@
};
const long min_idsel = 1, max_idsel = 5, irqs_per_slot = 5;
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;
if (irq >= 0)
irq += 24 * hose->index;
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/sys_titan.c linux/arch/alpha/kernel/sys_titan.c
--- v2.4.2/linux/arch/alpha/kernel/sys_titan.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/sys_titan.c Fri Mar 2 11:12:07 2001
@@ -321,10 +321,10 @@
}
#ifdef CONFIG_VGA_HOSE
-static struct pci_controler * __init
-privateer_vga_hose_select(struct pci_controler *h1, struct pci_controler *h2)
+static struct pci_controller * __init
+privateer_vga_hose_select(struct pci_controller *h1, struct pci_controller *h2)
{
- struct pci_controler *hose = h1;
+ struct pci_controller *hose = h1;
int agp1, agp2;
/* which hose(s) are agp? */
diff -u --recursive --new-file v2.4.2/linux/arch/alpha/kernel/sys_wildfire.c linux/arch/alpha/kernel/sys_wildfire.c
--- v2.4.2/linux/arch/alpha/kernel/sys_wildfire.c Mon Oct 30 12:24:22 2000
+++ linux/arch/alpha/kernel/sys_wildfire.c Fri Mar 2 11:12:07 2001
@@ -315,7 +315,7 @@
};
const long min_idsel = 0, max_idsel = 7, irqs_per_slot = 5;
- struct pci_controler *hose = dev->sysdata;
+ struct pci_controller *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;
if (irq > 0) {
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/Makefile linux/arch/arm/mach-integrator/Makefile
--- v2.4.2/linux/arch/arm/mach-integrator/Makefile Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/Makefile Fri Mar 2 18:38:39 2001
@@ -0,0 +1,24 @@
+#
+# Makefile for the linux kernel.
+#
+# 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).
+
+USE_STANDARD_AS_RULE := true
+
+O_TARGET := integrator.o
+
+# Object file lists.
+
+obj-y := arch.o irq.o mm.o time.o
+obj-m :=
+obj-n :=
+obj- :=
+
+export-objs := leds.o
+
+obj-$(CONFIG_LEDS) += leds.o
+obj-$(CONFIG_PCI) += pci_v3.o pci.o
+
+include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/arch.c linux/arch/arm/mach-integrator/arch.c
--- v2.4.2/linux/arch/arm/mach-integrator/arch.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/arch.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,70 @@
+/*
+ * linux/arch/arm/mach-integrator/arch.c
+ *
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+extern void integrator_map_io(void);
+extern void integrator_init_irq(void);
+
+#ifdef CONFIG_KMI_KEYB
+static struct kmi_info integrator_keyboard __initdata = {
+ base: IO_ADDRESS(KMI0_BASE),
+ irq: IRQ_KMIINT0,
+ divisor: 24 / 8 - 1,
+ type: KMI_KEYBOARD,
+};
+
+static struct kmi_info integrator_mouse __initdata = {
+ base: IO_ADDRESS(KMI1_BASE),
+ irq: IRQ_KMIINT1,
+ divisor: 24 / 8 - 1,
+ type: KMI_MOUSE,
+};
+#endif
+
+static void __init
+integrator_fixup(struct machine_desc *desc, struct param_struct *params,
+ char **cmdline, struct meminfo *mi)
+{
+#ifdef CONFIG_KMI_KEYB
+ register_kmi(&integrator_keyboard);
+ register_kmi(&integrator_mouse);
+#endif
+}
+
+MACHINE_START(INTEGRATOR, "ARM-Integrator")
+ MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd")
+ BOOT_MEM(0x00000000, 0x16000000, 0xf1600000)
+ BOOT_PARAMS(0x00000100)
+ FIXUP(integrator_fixup)
+ MAPIO(integrator_map_io)
+ INITIRQ(integrator_init_irq)
+MACHINE_END
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/dma.c linux/arch/arm/mach-integrator/dma.c
--- v2.4.2/linux/arch/arm/mach-integrator/dma.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/dma.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/arm/mach-integrator/dma.c
+ *
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+void __init arch_dma_init(dma_t *dma)
+{
+}
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/irq.c linux/arch/arm/mach-integrator/irq.c
--- v2.4.2/linux/arch/arm/mach-integrator/irq.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/irq.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,71 @@
+/*
+ * linux/arch/arm/mach-integrator/irq.c
+ *
+ * Copyright (C) 1999 ARM Limited
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+
+#include
+#include
+#include
+
+#include
+
+/*
+ * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
+ * is the (PA >> 12).
+ *
+ * Setup a VA for the Integrator interrupt controller (for header #0,
+ * just for now).
+ */
+#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE)
+#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET
+
+#define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) )
+
+static void sc_mask_irq(unsigned int irq)
+{
+ __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR);
+}
+
+static void sc_unmask_irq(unsigned int irq)
+{
+ __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET);
+}
+
+void __init integrator_init_irq(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < NR_IRQS; i++) {
+ if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) {
+ irq_desc[i].valid = 1;
+ irq_desc[i].probe_ok = 1;
+ irq_desc[i].mask_ack = sc_mask_irq;
+ irq_desc[i].mask = sc_mask_irq;
+ irq_desc[i].unmask = sc_unmask_irq;
+ }
+ }
+
+ /* Disable all interrupts initially. */
+ /* Do the core module ones */
+ __raw_writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
+
+ /* do the header card stuff next */
+ __raw_writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR);
+ __raw_writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);
+}
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/leds.c linux/arch/arm/mach-integrator/leds.c
--- v2.4.2/linux/arch/arm/mach-integrator/leds.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/leds.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,94 @@
+/*
+ * linux/arch/arm/mach-integrator/leds.c
+ *
+ * Integrator LED control routines
+ *
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+static int saved_leds;
+
+static void integrator_leds_event(led_event_t ledevt)
+{
+ unsigned long flags;
+ const unsigned int dbg_base = IO_ADDRESS(INTEGRATOR_DBG_BASE);
+ const unsigned int hdr_ctrl = IO_ADDRESS(INTEGRATOR_HDR_BASE) +
+ INTEGRATOR_HDR_CTRL_OFFSET;
+ unsigned int ctrl;
+ unsigned int update_alpha_leds;
+
+ // yup, change the LEDs
+ local_irq_save(flags);
+ update_alpha_leds = 0;
+
+ switch(ledevt) {
+ case led_idle_start:
+ ctrl = __raw_readl(hdr_ctrl);
+ ctrl &= ~INTEGRATOR_HDR_CTRL_LED;
+ __raw_writel(ctrl, hdr_ctrl);
+ break;
+
+ case led_idle_end:
+ ctrl = __raw_readl(hdr_ctrl);
+ ctrl |= INTEGRATOR_HDR_CTRL_LED;
+ __raw_writel(ctrl, hdr_ctrl);
+ break;
+
+ case led_timer:
+ saved_leds ^= GREEN_LED;
+ update_alpha_leds = 1;
+ break;
+
+ case led_red_on:
+ saved_leds |= RED_LED;
+ update_alpha_leds = 1;
+ break;
+
+ case led_red_off:
+ saved_leds &= ~RED_LED;
+ update_alpha_leds = 1;
+ break;
+
+ default:
+ break;
+ }
+
+ if (update_alpha_leds) {
+ while (__raw_readl(dbg_base + INTEGRATOR_DBG_ALPHA_OFFSET) & 1);
+ __raw_writel(saved_leds, dbg_base + INTEGRATOR_DBG_LEDS_OFFSET);
+ }
+ local_irq_restore(flags);
+}
+
+static int __init leds_init(void)
+{
+ if (machine_is_integrator())
+ leds_event = integrator_leds_event;
+
+ return 0;
+}
+
+__initcall(leds_init);
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/mm.c linux/arch/arm/mach-integrator/mm.c
--- v2.4.2/linux/arch/arm/mach-integrator/mm.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/mm.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,78 @@
+/*
+ * linux/arch/arm/mach-integrator/mm.c
+ *
+ * Extra MM routines for the ARM Integrator board
+ *
+ * Copyright (C) 1999,2000 Arm Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+/*
+ * Logical Physical
+ * e8000000 40000000 PCI memory
+ * ec000000 62000000 PCI config space
+ * ed000000 61000000 PCI V3 regs
+ * ee000000 60000000 PCI IO
+ * ef000000 Cache flush
+ * f1000000 10000000 Core module registers
+ * f1100000 11000000 System controller registers
+ * f1200000 12000000 EBI registers
+ * f1300000 13000000 Counter/Timer
+ * f1400000 14000000 Interrupt controller
+ * f1500000 15000000 RTC
+ * f1600000 16000000 UART 0
+ * f1700000 17000000 UART 1
+ * f1800000 18000000 Keyboard
+ * f1900000 19000000 Mouse
+ * f1a00000 1a000000 Debug LEDs
+ * f1b00000 1b000000 GPIO
+ */
+
+static struct map_desc integrator_io_desc[] __initdata = {
+ { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_RTC_BASE), INTEGRATOR_RTC_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_KBD_BASE), INTEGRATOR_KBD_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_MOUSE_BASE), INTEGRATOR_MOUSE_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K , DOMAIN_IO, 0, 1},
+ { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M , DOMAIN_IO, 0, 1},
+ { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M , DOMAIN_IO, 0, 1},
+ { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_512K , DOMAIN_IO, 0, 1},
+ { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K , DOMAIN_IO, 0, 1},
+ LAST_DESC
+};
+
+void __init integrator_map_io(void)
+{
+ iotable_init(integrator_io_desc);
+}
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/pci.c linux/arch/arm/mach-integrator/pci.c
--- v2.4.2/linux/arch/arm/mach-integrator/pci.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/pci.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,119 @@
+/*
+ * linux/arch/arm/mach-integrator/pci-integrator.c
+ *
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ *
+ * PCI functions for Integrator
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+/*
+ * A small note about bridges and interrupts. The DECchip 21050 (and
+ * later) adheres to the PCI-PCI bridge specification. This says that
+ * the interrupts on the other side of a bridge are swizzled in the
+ * following manner:
+ *
+ * Dev Interrupt Interrupt
+ * Pin on Pin on
+ * Device Connector
+ *
+ * 4 A A
+ * B B
+ * C C
+ * D D
+ *
+ * 5 A B
+ * B C
+ * C D
+ * D A
+ *
+ * 6 A C
+ * B D
+ * C A
+ * D B
+ *
+ * 7 A D
+ * B A
+ * C B
+ * D C
+ *
+ * Where A = pin 1, B = pin 2 and so on and pin=0 = default = A.
+ * Thus, each swizzle is ((pin-1) + (device#-4)) % 4
+ *
+ * The following code swizzles for exactly one bridge.
+ */
+static inline int bridge_swizzle(int pin, unsigned int slot)
+{
+ return (pin + slot) & 3;
+}
+
+/*
+ * This routine handles multiple bridges.
+ */
+static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp)
+{
+ int pin = *pinp;
+
+ if (pin == 0)
+ pin = 1;
+
+ pin -= 1;
+ while (dev->bus->self) {
+ pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
+ /*
+ * move up the chain of bridges, swizzling as we go.
+ */
+ dev = dev->bus->self;
+ }
+ *pinp = pin + 1;
+
+ return PCI_SLOT(dev->devfn);
+}
+
+static int irq_tab[4] __initdata = {
+ IRQ_PCIINT0, IRQ_PCIINT1, IRQ_PCIINT2, IRQ_PCIINT3
+};
+
+/*
+ * map the specified device/slot/pin to an IRQ. This works out such
+ * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1.
+ */
+static int __init integrator_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+ int intnr = ((slot - 9) + (pin - 1)) & 3;
+
+ return irq_tab[intnr];
+}
+
+extern void pci_v3_init(struct arm_pci_sysdata *);
+
+struct hw_pci integrator_pci __initdata = {
+ init: pci_v3_init,
+ swizzle: integrator_swizzle,
+ map_irq: integrator_map_irq,
+};
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/pci_v3.c linux/arch/arm/mach-integrator/pci_v3.c
--- v2.4.2/linux/arch/arm/mach-integrator/pci_v3.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/pci_v3.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,460 @@
+/*
+ * linux/arch/arm/mach-integrator/pci_v3.c
+ *
+ * PCI functions for V3 host PCI bridge
+ *
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+/*
+ * The V3 PCI interface chip in Integrator provides several windows from
+ * local bus memory into the PCI memory areas. Unfortunately, there
+ * are not really enough windows for our usage, therefore we reuse
+ * one of the windows for access to PCI configuration space. The
+ * memory map is as follows:
+ *
+ * Local Bus Memory Usage
+ *
+ * 40000000 - 4FFFFFFF PCI memory. 256M non-prefetchable
+ * 50000000 - 5FFFFFFF PCI memory. 256M prefetchable
+ * 60000000 - 60FFFFFF PCI IO. 16M
+ * 68000000 - 68FFFFFF PCI Configuration. 16M
+ *
+ * There are three V3 windows, each described by a pair of V3 registers.
+ * These are LB_BASE0/LB_MAP0, LB_BASE1/LB_MAP1 and LB_BASE2/LB_MAP2.
+ * Base0 and Base1 can be used for any type of PCI memory access. Base2
+ * can be used either for PCI I/O or for I20 accesses. By default, uHAL
+ * uses this only for PCI IO space.
+ *
+ * PCI Memory is mapped so that assigned addresses in PCI Memory match
+ * local bus memory addresses. In other words, if a PCI device is assigned
+ * address 80200000 then that address is a valid local bus address as well
+ * as a valid PCI Memory address. PCI IO addresses are mapped to start
+ * at zero. This means that local bus address 60000000 maps to PCI IO address
+ * 00000000 and so on. Device driver writers need to be aware of this
+ * distinction.
+ *
+ * Normally these spaces are mapped using the following base registers:
+ *
+ * Usage Local Bus Memory Base/Map registers used
+ *
+ * Mem 40000000 - 4FFFFFFF LB_BASE0/LB_MAP0
+ * Mem 50000000 - 5FFFFFFF LB_BASE1/LB_MAP1
+ * IO 60000000 - 60FFFFFF LB_BASE2/LB_MAP2
+ * Cfg 68000000 - 68FFFFFF
+ *
+ * This means that I20 and PCI configuration space accesses will fail.
+ * When PCI configuration accesses are needed (via the uHAL PCI
+ * configuration space primitives) we must remap the spaces as follows:
+ *
+ * Usage Local Bus Memory Base/Map registers used
+ *
+ * Mem 40000000 - 4FFFFFFF LB_BASE0/LB_MAP0
+ * Mem 50000000 - 5FFFFFFF LB_BASE0/LB_MAP0
+ * IO 60000000 - 60FFFFFF LB_BASE2/LB_MAP2
+ * Cfg 68000000 - 68FFFFFF LB_BASE1/LB_MAP1
+ *
+ * To make this work, the code depends on overlapping windows working.
+ * The V3 chip translates an address by checking its range within
+ * each of the BASE/MAP pairs in turn (in ascending register number
+ * order). It will use the first matching pair. So, for example,
+ * if the same address is mapped by both LB_BASE0/LB_MAP0 and
+ * LB_BASE1/LB_MAP1, the V3 will use the translation from
+ * LB_BASE0/LB_MAP0.
+ *
+ * To allow PCI Configuration space access, the code enlarges the
+ * window mapped by LB_BASE0/LB_MAP0 from 256M to 512M. This occludes
+ * the windows currently mapped by LB_BASE1/LB_MAP1 so that it can
+ * be remapped for use by configuration cycles.
+ *
+ * At the end of the PCI Configuration space accesses,
+ * LB_BASE1/LB_MAP1 is reset to map PCI Memory. Finally the window
+ * mapped by LB_BASE0/LB_MAP0 is reduced in size from 512M to 256M to
+ * reveal the now restored LB_BASE1/LB_MAP1 window.
+ *
+ * NOTE: We do not set up I2O mapping. I suspect that this is only
+ * for an intelligent (target) device. Using I2O disables most of
+ * the mappings into PCI memory.
+ */
+
+// V3 access routines
+#define _V3Write16(o,v) __raw_writew(v, PCI_V3_VADDR + (unsigned int)(o))
+#define _V3Read16(o) (__raw_readw(PCI_V3_VADDR + (unsigned int)(o)))
+
+#define _V3Write32(o,v) __raw_writel(v, PCI_V3_VADDR + (unsigned int)(o))
+#define _V3Read32(o) (__raw_readl(PCI_V3_VADDR + (unsigned int)(o)))
+
+/*============================================================================
+ *
+ * routine: uHALir_PCIMakeConfigAddress()
+ *
+ * parameters: bus = which bus
+ * device = which device
+ * function = which function
+ * offset = configuration space register we are interested in
+ *
+ * description: this routine will generate a platform dependant config
+ * address.
+ *
+ * calls: none
+ *
+ * returns: configuration address to play on the PCI bus
+ *
+ * To generate the appropriate PCI configuration cycles in the PCI
+ * configuration address space, you present the V3 with the following pattern
+ * (which is very nearly a type 1 (except that the lower two bits are 00 and
+ * not 01). In order for this mapping to work you need to set up one of
+ * the local to PCI aperatures to 16Mbytes in length translating to
+ * PCI configuration space starting at 0x0000.0000.
+ *
+ * PCI configuration cycles look like this:
+ *
+ * Type 0:
+ *
+ * 3 3|3 3 2 2|2 2 2 2|2 2 2 2|1 1 1 1|1 1 1 1|1 1
+ * 3 2|1 0 9 8|7 6 5 4|3 2 1 0|9 8 7 6|5 4 3 2|1 0 9 8|7 6 5 4|3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | | |D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|F|F|F|R|R|R|R|R|R|0|0|
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * 31:11 Device select bit.
+ * 10:8 Function number
+ * 7:2 Register number
+ *
+ * Type 1:
+ *
+ * 3 3|3 3 2 2|2 2 2 2|2 2 2 2|1 1 1 1|1 1 1 1|1 1
+ * 3 2|1 0 9 8|7 6 5 4|3 2 1 0|9 8 7 6|5 4 3 2|1 0 9 8|7 6 5 4|3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | | | | | | | | | | |B|B|B|B|B|B|B|B|D|D|D|D|D|F|F|F|R|R|R|R|R|R|0|1|
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * 31:24 reserved
+ * 23:16 bus number (8 bits = 128 possible buses)
+ * 15:11 Device number (5 bits)
+ * 10:8 function number
+ * 7:2 register number
+ *
+ */
+static spinlock_t v3_lock = SPIN_LOCK_UNLOCKED;
+
+#define PCI_BUS_NONMEM_START 0x00000000
+#define PCI_BUS_NONMEM_SIZE 0x10000000
+
+#define PCI_BUS_PREMEM_START 0x10000000
+#define PCI_BUS_PREMEM_SIZE 0x10000000
+
+#if PCI_BUS_NONMEM_START & 0x000fffff
+#error PCI_BUS_NONMEM_START must be megabyte aligned
+#endif
+#if PCI_BUS_PREMEM_START & 0x000fffff
+#error PCI_BUS_PREMEM_START must be megabyte aligned
+#endif
+
+static unsigned long v3_open_config_window(struct pci_dev *dev, int offset)
+{
+ unsigned int address, mapaddress, busnr;
+
+ busnr = dev->bus->number;
+
+ /*
+ * Trap out illegal values
+ */
+ if (offset > 255)
+ BUG();
+ if (busnr > 255)
+ BUG();
+ if (dev->devfn > 255)
+ BUG();
+
+ if (busnr == 0) {
+ int slot = PCI_SLOT(dev->devfn);
+
+ /*
+ * local bus segment so need a type 0 config cycle
+ *
+ * build the PCI configuration "address" with one-hot in
+ * A31-A11
+ *
+ * mapaddress:
+ * 3:1 = config cycle (101)
+ * 0 = PCI A1 & A0 are 0 (0)
+ */
+ address = PCI_FUNC(dev->devfn) << 8;
+ mapaddress = 0x0a;
+
+ if (slot > 12)
+ /*
+ * high order bits are handled by the MAP register
+ */
+ mapaddress |= 1 << (slot - 4);
+ else
+ /*
+ * low order bits handled directly in the address
+ */
+ address |= 1 << (slot + 11);
+ } else {
+ /*
+ * not the local bus segment so need a type 1 config cycle
+ *
+ * address:
+ * 23:16 = bus number
+ * 15:11 = slot number (7:3 of devfn)
+ * 10:8 = func number (2:0 of devfn)
+ *
+ * mapaddress:
+ * 3:1 = config cycle (101)
+ * 0 = PCI A1 & A0 from host bus (1)
+ */
+ mapaddress = 0x0b;
+ address = (busnr << 16) | (dev->devfn << 8);
+ }
+
+ /*
+ * Set up base0 to see all 512Mbytes of memory space (not prefetchable), this
+ * frees up base1 for re-use by configuration memory
+ */
+ _V3Write32(V3_LB_BASE0, (PHYS_PCI_MEM_BASE & 0xFFF00000) | 0x90 | V3_LB_BASE_M_ENABLE);
+
+ /*
+ * Set up base1/map1 to point into configuration space.
+ */
+ _V3Write32(V3_LB_BASE1, (PHYS_PCI_CONFIG_BASE & 0xFFF00000) | 0x40 | V3_LB_BASE_M_ENABLE);
+ _V3Write16(V3_LB_MAP1, mapaddress);
+
+ return PCI_CONFIG_VADDR + address + offset;
+}
+
+static void v3_close_config_window(void)
+{
+ /*
+ * Reassign base1 for use by prefetchable PCI memory
+ */
+ _V3Write32(V3_LB_BASE1, ((PHYS_PCI_MEM_BASE + SZ_256M) & 0xFFF00000) | 0x84 | V3_LB_BASE_M_ENABLE);
+ _V3Write16(V3_LB_MAP1, ((PCI_BUS_PREMEM_START & 0xFFF00000) >> 16) | 0x0006);
+
+ /*
+ * And shrink base0 back to a 256M window (NOTE: MAP0 already correct)
+ */
+ _V3Write32(V3_LB_BASE0, (PHYS_PCI_MEM_BASE & 0xFFF00000) | 0x80 | V3_LB_BASE_M_ENABLE);
+}
+
+static int v3_read_config_byte(struct pci_dev *dev, int where, u8 *val)
+{
+ unsigned long addr;
+ unsigned long flags;
+ u8 v;
+
+ spin_lock_irqsave(&v3_lock, flags);
+ addr = v3_open_config_window(dev, where);
+
+ v = __raw_readb(addr);
+
+ v3_close_config_window();
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ *val = v;
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static int v3_read_config_word(struct pci_dev *dev, int where, u16 *val)
+{
+ unsigned long addr;
+ unsigned long flags;
+ u16 v;
+
+ spin_lock_irqsave(&v3_lock, flags);
+ addr = v3_open_config_window(dev, where);
+
+ v = __raw_readw(addr);
+
+ v3_close_config_window();
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ *val = v;
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static int v3_read_config_dword(struct pci_dev *dev, int where, u32 *val)
+{
+ unsigned long addr;
+ unsigned long flags;
+ u32 v;
+
+ spin_lock_irqsave(&v3_lock, flags);
+ addr = v3_open_config_window(dev, where);
+
+ v = __raw_readl(addr);
+
+ v3_close_config_window();
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ *val = v;
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static int v3_write_config_byte(struct pci_dev *dev, int where, u8 val)
+{
+ unsigned long addr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&v3_lock, flags);
+ addr = v3_open_config_window(dev, where);
+
+ __raw_writeb(val, addr);
+ __raw_readb(addr);
+
+ v3_close_config_window();
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static int v3_write_config_word(struct pci_dev *dev, int where, u16 val)
+{
+ unsigned long addr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&v3_lock, flags);
+ addr = v3_open_config_window(dev, where);
+
+ __raw_writew(val, addr);
+ __raw_readw(addr);
+
+ v3_close_config_window();
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static int v3_write_config_dword(struct pci_dev *dev, int where, u32 val)
+{
+ unsigned long addr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&v3_lock, flags);
+ addr = v3_open_config_window(dev, where);
+
+ __raw_writel(val, addr);
+ __raw_readl(addr);
+
+ v3_close_config_window();
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops pci_v3_ops = {
+ read_byte: v3_read_config_byte,
+ read_word: v3_read_config_word,
+ read_dword: v3_read_config_dword,
+ write_byte: v3_write_config_byte,
+ write_word: v3_write_config_word,
+ write_dword: v3_write_config_dword,
+};
+
+static struct resource non_mem = {
+ name: "PCI non-prefetchable",
+ start: PCI_BUS_NONMEM_START,
+ end: PCI_BUS_NONMEM_START + PCI_BUS_NONMEM_SIZE - 1,
+ flags: IORESOURCE_MEM,
+};
+
+static struct resource pre_mem = {
+ name: "PCI prefetchable",
+ start: PCI_BUS_PREMEM_START,
+ end: PCI_BUS_PREMEM_START + PCI_BUS_PREMEM_SIZE - 1,
+ flags: IORESOURCE_MEM | IORESOURCE_PREFETCH,
+};
+
+/*
+ * V3_LB_BASE? - local bus address
+ * V3_LB_MAP? - pci bus address
+ */
+void __init pci_v3_init(struct arm_pci_sysdata *sysdata)
+{
+ struct pci_bus *bus;
+ unsigned int pci_cmd;
+ unsigned long flags;
+
+ spin_lock_irqsave(&v3_lock, flags);
+
+ /*
+ * Setup window 0 - PCI non-prefetchable memory
+ * Local: 0x40000000 Bus: 0x00000000 Size: 256MB
+ */
+ _V3Write32(V3_LB_BASE0, (PHYS_PCI_MEM_BASE & 0xfff00000) | 0x80 | V3_LB_BASE_M_ENABLE);
+ _V3Write16(V3_LB_MAP0, (PCI_BUS_NONMEM_START >> 16) | 0x0006);
+
+ /*
+ * Setup window 1 - PCI prefetchable memory
+ * Local: 0x50000000 Bus: 0x10000000 Size: 256MB
+ */
+ _V3Write32(V3_LB_BASE1, ((PHYS_PCI_MEM_BASE + SZ_256M) & 0xFFF00000) | 0x84 | V3_LB_BASE_M_ENABLE);
+ _V3Write16(V3_LB_MAP1, (PCI_BUS_PREMEM_START >> 16) | 0x0006);
+
+ /*
+ * Setup window 2 - PCI IO
+ */
+// _V3Write32(V3_LB_BASE2, (PHYS_PCI_IO_BASE & 0xff000000) | V3_LB_BASE_M_ENABLE);
+// _V3Write16(V3_LB_MAP2, 0);
+
+ spin_unlock_irqrestore(&v3_lock, flags);
+
+ bus = pci_scan_bus(0, &pci_v3_ops, sysdata);
+
+ if (request_resource(&iomem_resource, &non_mem))
+ printk("PCI: unable to allocate non-prefetchable memory region");
+ if (request_resource(&iomem_resource, &pre_mem))
+ printk("PCI: unable to allocate prefetchable memory region");
+
+ /*
+ * bus->resource[0] is the IO resource for this bus
+ * bus->resource[1] is the mem resource for this bus
+ * bus->resource[2] is the prefetch mem resource for this bus
+ */
+ bus->resource[1] = &non_mem;
+ bus->resource[2] = &pre_mem;
+
+ pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
+
+ pci_cmd |= sysdata->bus[0].features;
+
+ _V3Write16(V3_PCI_CMD, pci_cmd);
+
+ printk("PCI: Fast back to back transfers %sabled\n",
+ (sysdata->bus[0].features & PCI_COMMAND_FAST_BACK) ?
+ "en" : "dis");
+}
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-integrator/time.c linux/arch/arm/mach-integrator/time.c
--- v2.4.2/linux/arch/arm/mach-integrator/time.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/mach-integrator/time.c Fri Mar 2 18:38:39 2001
@@ -0,0 +1,45 @@
+/*
+ * linux/arch/arm/mach-integrator/time.c
+ *
+ * Copyright (C) 2000 Deep Blue Solutions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include
+#include
+#include
+
+#include
+
+#define RTC_DR (*(unsigned long *)(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 0))
+#define RTC_MR (*(unsigned long *)(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 4))
+#define RTC_STAT (*(unsigned long *)(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 8))
+#define RTC_EOI (*(unsigned long *)(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 8))
+#define RTC_LR (*(unsigned long *)(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 12))
+#define RTC_CR (*(unsigned long *)(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 16))
+
+#define RTC_CR_MIE 0x00000001
+
+extern int (*set_rtc)(void);
+
+static int integrator_set_rtc(void)
+{
+ RTC_LR = xtime.tv_sec;
+ return 1;
+}
+
+static int integrator_rtc_init(void)
+{
+ RTC_CR = 0;
+ RTC_EOI = 0;
+
+ xtime.tv_sec = RTC_DR;
+
+ set_rtc = integrator_set_rtc;
+
+ return 0;
+}
+
+__initcall(integrator_rtc_init);
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mach-sa1100/arch.c linux/arch/arm/mach-sa1100/arch.c
--- v2.4.2/linux/arch/arm/mach-sa1100/arch.c Mon Sep 18 15:15:25 2000
+++ linux/arch/arm/mach-sa1100/arch.c Fri Mar 2 11:12:06 2001
@@ -54,7 +54,7 @@
if (machine_is_assabet()) {
/*
* On Assabet, we must probe for the Neponset board *before*
- * paging_init() has occured to actually determine the amount
+ * paging_init() has occurred to actually determine the amount
* of RAM available.
*/
extern void map_sa1100_gpio_regs(void);
diff -u --recursive --new-file v2.4.2/linux/arch/arm/mm/mm-sa1100.c linux/arch/arm/mm/mm-sa1100.c
--- v2.4.2/linux/arch/arm/mm/mm-sa1100.c Mon Sep 18 15:15:25 2000
+++ linux/arch/arm/mm/mm-sa1100.c Fri Mar 2 11:12:06 2001
@@ -199,7 +199,7 @@
/*
* On Assabet, we must probe for the Neponset board *before* paging_init()
- * has occured to actually determine the amount of RAM available. To do so,
+ * has occurred to actually determine the amount of RAM available. To do so,
* we map the appropriate IO section in the page table here in order to
* access GPIO registers.
*/
diff -u --recursive --new-file v2.4.2/linux/arch/cris/drivers/serial.c linux/arch/cris/drivers/serial.c
--- v2.4.2/linux/arch/cris/drivers/serial.c Wed Feb 21 18:20:10 2001
+++ linux/arch/cris/drivers/serial.c Fri Mar 2 18:38:40 2001
@@ -146,7 +146,7 @@
*
* Revision 1.24 2000/02/09 18:02:28 bjornw
* * Clear serial errors (overrun, framing, parity) correctly. Before, the
- * receiver would get stuck if an error occured and we did not restart
+ * receiver would get stuck if an error occurred and we did not restart
* the input DMA.
* * Cosmetics (indentation, some code made into inlines)
* * Some more debug options
@@ -1371,7 +1371,7 @@
}
else { /* it was a valid byte, now let the dma do the rest */
#ifdef SERIAL_DEBUG_INTR
- printk("** OK, disabling ser_interupts\n");
+ printk("** OK, disabling ser_interrupts\n");
#endif
e100_disable_serial_data_irq(info);
}
diff -u --recursive --new-file v2.4.2/linux/arch/cris/kernel/entry.S linux/arch/cris/kernel/entry.S
--- v2.4.2/linux/arch/cris/kernel/entry.S Wed Feb 21 18:20:10 2001
+++ linux/arch/cris/kernel/entry.S Fri Mar 2 18:38:40 2001
@@ -23,7 +23,7 @@
* Revision 1.8 2000/11/17 16:53:35 bjornw
* Added detection of frame-type in Rexit, so that mmu_bus_fault can
* use ret_from_intr in the return-path to check for signals (like SEGV)
- * and other foul things that might have occured during the fault.
+ * and other foul things that might have occurred during the fault.
*
* Revision 1.7 2000/10/06 15:04:28 bjornw
* Include mof in register savings
diff -u --recursive --new-file v2.4.2/linux/arch/cris/mm/fault.c linux/arch/cris/mm/fault.c
--- v2.4.2/linux/arch/cris/mm/fault.c Wed Feb 21 18:20:11 2001
+++ linux/arch/cris/mm/fault.c Fri Mar 2 18:38:40 2001
@@ -146,7 +146,7 @@
* routines.
*
* Notice that the address we're given is aligned to the page the fault
- * occured in, since we only get the PFN in R_MMU_CAUSE not the complete
+ * occurred in, since we only get the PFN in R_MMU_CAUSE not the complete
* address.
*
* error_code:
@@ -381,7 +381,7 @@
pmd = pmd_offset(pgd, address);
pmd_k = pmd_offset(pgd_k, address);
- if (pmd_present(*pmd) || !pmd_present(*pmd_k))
+ if (!pmd_present(*pmd_k))
goto bad_area_nosemaphore;
set_pmd(pmd, *pmd_k);
return;
diff -u --recursive --new-file v2.4.2/linux/arch/i386/boot/Makefile linux/arch/i386/boot/Makefile
--- v2.4.2/linux/arch/i386/boot/Makefile Mon Dec 20 14:43:39 1999
+++ linux/arch/i386/boot/Makefile Thu Feb 22 00:25:29 2001
@@ -43,7 +43,7 @@
$(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include
bootsect: bootsect.o
- $(LD) -Ttext 0x0 -s -oformat binary -o $@ $<
+ $(LD) -Ttext 0x0 -s --oformat binary -o $@ $<
bootsect.o: bootsect.s
$(AS) -o $@ $<
@@ -52,7 +52,7 @@
$(CPP) $(CPPFLAGS) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
bbootsect: bbootsect.o
- $(LD) -Ttext 0x0 -s -oformat binary $< -o $@
+ $(LD) -Ttext 0x0 -s --oformat binary $< -o $@
bbootsect.o: bbootsect.s
$(AS) -o $@ $<
@@ -61,7 +61,7 @@
$(CPP) $(CPPFLAGS) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
setup: setup.o
- $(LD) -Ttext 0x0 -s -oformat binary -e begtext -o $@ $<
+ $(LD) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $<
setup.o: setup.s
$(AS) -o $@ $<
@@ -70,7 +70,7 @@
$(CPP) $(CPPFLAGS) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
bsetup: bsetup.o
- $(LD) -Ttext 0x0 -s -oformat binary -e begtext -o $@ $<
+ $(LD) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $<
bsetup.o: bsetup.s
$(AS) -o $@ $<
diff -u --recursive --new-file v2.4.2/linux/arch/i386/defconfig linux/arch/i386/defconfig
--- v2.4.2/linux/arch/i386/defconfig Wed Feb 21 18:20:11 2001
+++ linux/arch/i386/defconfig Sun Mar 4 14:30:18 2001
@@ -280,6 +280,7 @@
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
@@ -382,7 +383,6 @@
# CONFIG_NE3210 is not set
# CONFIG_ES3210 is not set
# CONFIG_8139TOO is not set
-# CONFIG_RTL8129 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
diff -u --recursive --new-file v2.4.2/linux/arch/i386/kernel/i386_ksyms.c linux/arch/i386/kernel/i386_ksyms.c
--- v2.4.2/linux/arch/i386/kernel/i386_ksyms.c Wed Feb 21 18:20:11 2001
+++ linux/arch/i386/kernel/i386_ksyms.c Fri Mar 2 12:03:49 2001
@@ -27,6 +27,7 @@
#include
#include
#include
+#include
extern void dump_thread(struct pt_regs *, struct user *);
extern spinlock_t rtc_lock;
@@ -134,6 +135,9 @@
EXPORT_SYMBOL(__global_save_flags);
EXPORT_SYMBOL(__global_restore_flags);
EXPORT_SYMBOL(smp_call_function);
+
+/* TLB flushing */
+EXPORT_SYMBOL(flush_tlb_page);
#endif
#ifdef CONFIG_MCA
diff -u --recursive --new-file v2.4.2/linux/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
--- v2.4.2/linux/arch/i386/kernel/i387.c Wed Feb 21 18:20:11 2001
+++ linux/arch/i386/kernel/i387.c Fri Feb 23 10:09:08 2001
@@ -179,7 +179,7 @@
unsigned short get_fpu_mxcsr( struct task_struct *tsk )
{
- if ( cpu_has_fxsr ) {
+ if ( cpu_has_xmm ) {
return tsk->thread.i387.fxsave.mxcsr;
} else {
return 0x1f80;
diff -u --recursive --new-file v2.4.2/linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- v2.4.2/linux/arch/i386/kernel/traps.c Wed Feb 21 18:20:11 2001
+++ linux/arch/i386/kernel/traps.c Thu Mar 1 16:54:35 2001
@@ -388,7 +388,7 @@
#if CONFIG_X86_IO_APIC
-int nmi_watchdog = 1;
+int nmi_watchdog = 0;
static int __init setup_nmi_watchdog(char *str)
{
diff -u --recursive --new-file v2.4.2/linux/arch/i386/lib/mmx.c linux/arch/i386/lib/mmx.c
--- v2.4.2/linux/arch/i386/lib/mmx.c Sat Feb 3 19:51:22 2001
+++ linux/arch/i386/lib/mmx.c Thu Mar 1 18:04:34 2001
@@ -3,6 +3,7 @@
#include
#include
+#include
/*
* MMX 3DNow! library helper functions
@@ -25,8 +26,14 @@
void *_mmx_memcpy(void *to, const void *from, size_t len)
{
- void *p=to;
- int i= len >> 6; /* len/64 */
+ void *p;
+ int i;
+
+ if (in_interrupt())
+ return __memcpy(to, from, len);
+
+ p = to;
+ i = len >> 6; /* len/64 */
kernel_fpu_begin();
diff -u --recursive --new-file v2.4.2/linux/arch/i386/mm/extable.c linux/arch/i386/mm/extable.c
--- v2.4.2/linux/arch/i386/mm/extable.c Wed Feb 21 18:20:11 2001
+++ linux/arch/i386/mm/extable.c Fri Mar 2 11:12:07 2001
@@ -49,7 +49,7 @@
spin_lock_irqsave(&modlist_lock, flags);
for (mp = module_list; mp != NULL; mp = mp->next) {
- if (mp->ex_table_start == NULL)
+ if (mp->ex_table_start == NULL || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING)))
continue;
ret = search_one_table(mp->ex_table_start,
mp->ex_table_end - 1, addr);
diff -u --recursive --new-file v2.4.2/linux/arch/mips/defconfig linux/arch/mips/defconfig
--- v2.4.2/linux/arch/mips/defconfig Thu Jul 27 18:36:54 2000
+++ linux/arch/mips/defconfig Sun Mar 4 14:30:18 2001
@@ -175,6 +175,7 @@
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
diff -u --recursive --new-file v2.4.2/linux/arch/mips/kernel/mips_ksyms.c linux/arch/mips/kernel/mips_ksyms.c
--- v2.4.2/linux/arch/mips/kernel/mips_ksyms.c Fri Aug 4 16:15:37 2000
+++ linux/arch/mips/kernel/mips_ksyms.c Fri Mar 2 11:15:47 2001
@@ -140,3 +140,4 @@
#endif
EXPORT_SYMBOL(get_wchan);
+EXPORT_SYMBOL(flush_tlb_page);
diff -u --recursive --new-file v2.4.2/linux/arch/mips64/defconfig linux/arch/mips64/defconfig
--- v2.4.2/linux/arch/mips64/defconfig Wed Feb 21 18:20:13 2001
+++ linux/arch/mips64/defconfig Sun Mar 4 14:30:18 2001
@@ -165,6 +165,7 @@
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
diff -u --recursive --new-file v2.4.2/linux/arch/mips64/kernel/mips64_ksyms.c linux/arch/mips64/kernel/mips64_ksyms.c
--- v2.4.2/linux/arch/mips64/kernel/mips64_ksyms.c Thu Jul 27 18:36:54 2000
+++ linux/arch/mips64/kernel/mips64_ksyms.c Fri Mar 2 11:15:47 2001
@@ -121,3 +121,4 @@
#endif
EXPORT_SYMBOL(get_wchan);
+EXPORT_SYMBOL(flush_tlb_page);
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/8xx_io/Config.in linux/arch/ppc/8xx_io/Config.in
--- v2.4.2/linux/arch/ppc/8xx_io/Config.in Thu Jul 13 09:42:50 2000
+++ linux/arch/ppc/8xx_io/Config.in Sat Mar 3 10:52:13 2001
@@ -7,24 +7,24 @@
if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
if [ "$CONFIG_SCC_ENET" = "y" ]; then
- bool 'Ethernet on SCC1' CONFIG_SCC1_ENET
- if [ "$CONFIG_SCC1_ENET" != "y" ]; then
- bool 'Ethernet on SCC2' CONFIG_SCC2_ENET
- fi
+ choice 'SCC used for Ethernet' \
+ "SCC1 CONFIG_SCC1_ENET \
+ SCC2 CONFIG_SCC2_ENET \
+ SCC3 CONFIG_SCC3_ENET" SCC1
fi
bool '860T FEC Ethernet' CONFIG_FEC_ENET
+ if [ "$CONFIG_FEC_ENET" = "y" ]; then
+ bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO
+ fi
bool 'Use Big CPM Ethernet Buffers' CONFIG_ENET_BIG_BUFFERS
fi
bool 'Use SMC2 for UART' CONFIG_8xxSMC2
if [ "$CONFIG_8xxSMC2" = "y" ]; then
bool 'Use Alternate SMC2 I/O (823/850)' CONFIG_8xx_ALTSMC2
+ bool 'Use SMC2 for Console' CONFIG_8xx_CONS_SMC2
fi
bool 'Enable SCC2 and SCC3 for UART' CONFIG_8xxSCC
-if [ "$CONFIG_TQM860" = "y" -o "$CONFIG_TQM860L" = "y" -o "$CONFIG_TQM8xxL" = "y" ]; then
- bool 'Use SMC2 for Console' TQM_SMC2_CONSOLE
-fi
-
# This doesn't really belong here, but it is convenient to ask
# 8xx specific questions.
@@ -32,4 +32,7 @@
bool 'Copy-Back Data Cache (else Writethrough)' CONFIG_8xx_COPYBACK
bool 'CPU6 Silicon Errata (860 Pre Rev. C)' CONFIG_8xx_CPU6
+if [ "$CONFIG_IDE" = "y" ]; then
+ bool 'MPC8xx direct IDE support on PCMCIA port' CONFIG_BLK_DEV_MPC8xx_IDE
+fi
endmenu
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/8xx_io/commproc.c linux/arch/ppc/8xx_io/commproc.c
--- v2.4.2/linux/arch/ppc/8xx_io/commproc.c Sat Nov 11 18:14:38 2000
+++ linux/arch/ppc/8xx_io/commproc.c Sat Mar 3 10:52:13 2001
@@ -61,22 +61,6 @@
imp = (immap_t *)IMAP_ADDR;
commproc = (cpm8xx_t *)&imp->im_cpm;
-#ifdef notdef
- /* We can't do this. It seems to blow away the microcode
- * patch that EPPC-Bug loaded for us. EPPC-Bug uses SCC1 for
- * Ethernet, SMC1 for the console, and I2C for serial EEPROM.
- * Our own drivers quickly reset all of these.
- */
-
- /* Perform a reset.
- */
- commproc->cp_cpcr = (CPM_CR_RST | CPM_CR_FLG);
-
- /* Wait for it.
- */
- while (commproc->cp_cpcr & CPM_CR_FLG);
-#endif
-
/* Set SDMA Bus Request priority 5.
* On 860T, this also enables FEC priority 6. I am not sure
* this is what we realy want for some applications, but the
@@ -168,6 +152,14 @@
void
cpm_install_handler(int vec, void (*handler)(void *), void *dev_id)
{
+
+ /* If null handler, assume we are trying to free the IRQ.
+ */
+ if (!handler) {
+ cpm_free_handler(vec);
+ return;
+ }
+
if (cpm_vecs[vec].handler != 0)
printk("CPM interrupt %x replacing %x\n",
(uint)handler, (uint)cpm_vecs[vec].handler);
@@ -226,8 +218,9 @@
* The internal baud rate clock is the system clock divided by 16.
* This assumes the baudrate is 16x oversampled by the uart.
*/
-#define BRG_INT_CLK (((bd_t *)__res)->bi_intfreq * 1000000)
-#define BRG_UART_CLK (BRG_INT_CLK/16)
+#define BRG_INT_CLK (((bd_t *)__res)->bi_intfreq * 1000000)
+#define BRG_UART_CLK (BRG_INT_CLK/16)
+#define BRG_UART_CLK_DIV16 (BRG_UART_CLK/16)
void
m8xx_cpm_setbrg(uint brg, uint rate)
@@ -238,6 +231,12 @@
*/
bp = (uint *)&cpmp->cp_brgc1;
bp += brg;
- *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
+ /* The BRG has a 12-bit counter. For really slow baud rates (or
+ * really fast processors), we may have to further divide by 16.
+ */
+ if (((BRG_UART_CLK / rate) - 1) < 4096)
+ *bp = (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN;
+ else
+ *bp = (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
+ CPM_BRG_EN | CPM_BRG_DIV16;
}
-
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/8xx_io/commproc.h linux/arch/ppc/8xx_io/commproc.h
--- v2.4.2/linux/arch/ppc/8xx_io/commproc.h Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/8xx_io/commproc.h Sat Mar 3 10:52:13 2001
@@ -324,7 +324,7 @@
*/
#define SCC_EB ((u_char)0x10) /* Set big endian byte order */
-/* CPM Ethernet through SCC1.
+/* CPM Ethernet through SCCx.
*/
typedef struct scc_enet {
sccp_t sen_genscc;
@@ -379,6 +379,8 @@
ushort sen_taddrl; /* temp address (LSB) */
} scc_enet_t;
+/*** MBX ************************************************************/
+
#ifdef CONFIG_MBX
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use. The TCLK and RCLK seem unique
@@ -399,7 +401,9 @@
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x0000003d)
-#endif
+#endif /* CONFIG_MBX */
+
+/*** RPXLITE ********************************************************/
#ifdef CONFIG_RPXLITE
/* This ENET stuff is for the MPC850 with ethernet on SCC2. Some of
@@ -416,7 +420,9 @@
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00003d00)
-#endif
+#endif /* CONFIG_RPXLITE */
+
+/*** BSEIP **********************************************************/
#ifdef CONFIG_BSEIP
/* This ENET stuff is for the MPC823 with ethernet on SCC2.
@@ -438,7 +444,9 @@
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002c00)
-#endif
+#endif /* CONFIG_BSEIP */
+
+/*** RPXCLASSIC *****************************************************/
#ifdef CONFIG_RPXCLASSIC
/* Bits in parallel I/O port registers that have to be set/cleared
@@ -457,27 +465,63 @@
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x0000003d)
-#endif
+#endif /* CONFIG_RPXCLASSIC */
+
+/*** TQM823L, TQM850L ***********************************************/
+
+#if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L)
+/* Bits in parallel I/O port registers that have to be set/cleared
+ * to configure the pins for SCC1 use.
+ */
+#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
+#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
+#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
+#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
+
+#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
+
+#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
+#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
+
+/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
+ * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
+ */
+#define SICR_ENET_MASK ((uint)0x0000ff00)
+#define SICR_ENET_CLKRT ((uint)0x00002600)
+#endif /* CONFIG_TQM823L, CONFIG_TQM850L */
+
+/*** FPS850L *********************************************************/
+
+#ifdef CONFIG_FPS850L
+/* Bits in parallel I/O port registers that have to be set/cleared
+ * to configure the pins for SCC1 use.
+ */
+#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
+#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
+#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
+#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
+
+#define PC_ENET_TENA ((ushort)0x0002) /* PC 14 */
+#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
+#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
-#if (defined(CONFIG_TQM860) || defined(CONFIG_TQM860L))
-/*
- * TQM860 and TQM860L Configuration:
- *
- * Signal PAR DIR ODR DAT Function
- * Port A, 5 1 0 - - TCLK (CLK3) for Ethernet
- * Port A, 7 1 0 - - RCLK (CLK1) for Ethernet
- * Port A, 14 1 0 - - TXD for Ethernet (SCC1)
- * Port A, 15 1 0 - - RXD for Ethernet (SCC1)
- * Port C, 7 0 0 0 - -> ETH-LOOP
- * Port C, 10 0 0 1 - CD for Ethernet (SCC1)
- * Port C, 11 0 0 1 - CTS for Ethernet (SCC1)
- * Port C, 15 * * 0 - TENA/RTS for Ethernet
+/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
+ * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
+#define SICR_ENET_MASK ((uint)0x0000ff00)
+#define SICR_ENET_CLKRT ((uint)0x00002600)
+#endif /* CONFIG_FPS850L */
+
+/*** TQM860L ********************************************************/
+#ifdef CONFIG_TQM860L
+/* Bits in parallel I/O port registers that have to be set/cleared
+ * to configure the pins for SCC1 use.
+ */
#define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
#define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
-#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
+#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
#define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
@@ -488,51 +532,59 @@
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x00000026)
+#endif /* CONFIG_TQM860L */
-#endif /* CONFIG_TQM860, TQM860L */
+/*** SPD823TS *******************************************************/
-#ifdef CONFIG_TQM8xxL
-/*
- * TQM8xxL Configuration (except TQM860L):
- *
- * Signal PAR DIR ODR DAT Function
- * Port A, 5 1 0 - - TCLK (CLK3) for Ethernet
- * Port A, 7 1 0 - - RCLK (CLK1) for Ethernet
- * Port A, 12 1 0 - - TXD for Ethernet (SCC2)
- * Port A, 13 1 0 - - RXD for Ethernet (SCC2)
- * Port B, 18 1 1 - - TENA/RTS for Ethernet on STK8xx
- * Port C, 7 0 0 0 - -> ETH-LOOP
- * Port C, 8 0 0 1 - CD for Ethernet (SCC2)
- * Port C, 9 0 0 1 - CTS for Ethernet (SCC2)
- * Port C, 14 * * 0 - TENA/RTS for Ethernet on FPS850
- *
- * Note: Using PC14 as RTS2 (TENA) does not work on the TQM850L when
- * used with the starter-kit mainboard; we *must* use PB18 instead.
- * For the FPS850 system, we *must* use PC14 :-(
+#ifdef CONFIG_SPD823TS
+/* Bits in parallel I/O port registers that have to be set/cleared
+ * to configure the pins for SCC2 use.
*/
-
+#define PA_ENET_MDC ((ushort)0x0001) /* PA 15 !!! */
+#define PA_ENET_MDIO ((ushort)0x0002) /* PA 14 !!! */
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
-#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
+#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
-#ifndef CONFIG_FPS850 /* not valid on FPS board */
-#define PB_ENET_TENA ((uint)0x00002000)
-#endif /* !CONFIG_FPS850 */
+#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
-#ifdef CONFIG_FPS850 /* FPS uses default configuration */
-#define PC_ENET_TENA ((ushort)0x0002) /* PC 14 */
-#endif /* CONFIG_FPS850 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
+#define PC_ENET_RESET ((ushort)0x0100) /* PC 7 !!! */
-/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
+/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK2) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
-#define SICR_ENET_CLKRT ((uint)0x00002600)
+#define SICR_ENET_CLKRT ((uint)0x00002E00)
+#endif /* CONFIG_SPD823TS */
+
+
+/*** SM850 *********************************************************/
-#endif /* CONFIG_TQM8xxL */
+/* The SM850 Service Module uses SCC2 for IrDA and SCC3 for Ethernet */
+
+#ifdef CONFIG_SM850
+#define PB_ENET_RXD ((uint)0x00000004) /* PB 29 */
+#define PB_ENET_TXD ((uint)0x00000002) /* PB 30 */
+#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
+#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
+
+#define PC_ENET_LBK ((ushort)0x0008) /* PC 12 */
+#define PC_ENET_TENA ((ushort)0x0004) /* PC 13 */
+
+#define PC_ENET_RENA ((ushort)0x0800) /* PC 4 */
+#define PC_ENET_CLSN ((ushort)0x0400) /* PC 5 */
+
+/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
+ * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero.
+ */
+#define SICR_ENET_MASK ((uint)0x00FF0000)
+#define SICR_ENET_CLKRT ((uint)0x00260000)
+#endif /* CONFIG_SM850 */
+
+/*********************************************************************/
/* SCC Event register as used by Ethernet.
*/
@@ -723,8 +775,6 @@
#define CPMVEC_PIO_PC4 ((ushort)0x01)
#define CPMVEC_ERROR ((ushort)0x00)
-extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
-
/* CPM interrupt configuration vector.
*/
#define CICR_SCD_SCC4 ((uint)0x00c00000) /* SCC4 @ SCCd */
@@ -735,4 +785,8 @@
#define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */
#define CICR_IEN ((uint)0x00000080) /* Int. enable */
#define CICR_SPS ((uint)0x00000001) /* SCC Spread */
+
+extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
+extern void cpm_free_handler(int vec);
+
#endif /* __CPM_8XX__ */
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/8xx_io/enet.c linux/arch/ppc/8xx_io/enet.c
--- v2.4.2/linux/arch/ppc/8xx_io/enet.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/8xx_io/enet.c Sat Mar 3 10:52:13 2001
@@ -154,20 +154,26 @@
/*static ushort my_enet_addr[] = { 0x0800, 0x3e26, 0x1559 };*/
/* Typically, 860(T) boards use SCC1 for Ethernet, and other 8xx boards
- * use SCC2. This is easily extended if necessary.
+ * use SCC2. Some even may use SCC3.
+ * This is easily extended if necessary.
*/
-#ifdef CONFIG_SCC2_ENET
+#if defined(CONFIG_SCC3_ENET)
+#define CPM_CR_ENET CPM_CR_CH_SCC3
+#define PROFF_ENET PROFF_SCC3
+#define SCC_ENET 2 /* Index, not number! */
+#define CPMVEC_ENET CPMVEC_SCC3
+#elif defined(CONFIG_SCC2_ENET)
#define CPM_CR_ENET CPM_CR_CH_SCC2
#define PROFF_ENET PROFF_SCC2
#define SCC_ENET 1 /* Index, not number! */
#define CPMVEC_ENET CPMVEC_SCC2
-#endif
-
-#ifdef CONFIG_SCC1_ENET
-#define CPM_CR_ENET CPM_CR_CH_SCC1
+#elif defined(CONFIG_SCC1_ENET)
+#define CPM_CR_ENET CPM_CR_CH_SCC1
#define PROFF_ENET PROFF_SCC1
-#define SCC_ENET 0
+#define SCC_ENET 0 /* Index, not number! */
#define CPMVEC_ENET CPMVEC_SCC1
+#else
+#error CONFIG_SCCx_ENET not defined
#endif
static int
@@ -642,10 +648,11 @@
volatile scc_t *sccp;
volatile scc_enet_t *ep;
volatile immap_t *immap;
+ extern unsigned long _get_IMMR(void);
cp = cpmp; /* Get pointer to Communication Processor */
- immap = (immap_t *)IMAP_ADDR; /* and to internal registers */
+ immap = (immap_t *)(_get_IMMR() & 0xFFFF0000); /* and to internal registers */
bd = (bd_t *)__res;
@@ -683,28 +690,47 @@
* It can't last though......
*/
+#if (defined(PA_ENET_RXD) && defined(PA_ENET_TXD))
/* Configure port A pins for Txd and Rxd.
*/
- immap->im_ioport.iop_papar |= (PA_ENET_RXD | PA_ENET_TXD);
+ immap->im_ioport.iop_papar |= (PA_ENET_RXD | PA_ENET_TXD);
immap->im_ioport.iop_padir &= ~(PA_ENET_RXD | PA_ENET_TXD);
- immap->im_ioport.iop_paodr &= ~PA_ENET_TXD;
+ immap->im_ioport.iop_paodr &= ~PA_ENET_TXD;
+#elif (defined(PB_ENET_RXD) && defined(PB_ENET_TXD))
+ /* Configure port B pins for Txd and Rxd.
+ */
+ immap->im_cpm.cp_pbpar |= (PB_ENET_RXD | PB_ENET_TXD);
+ immap->im_cpm.cp_pbdir &= ~(PB_ENET_RXD | PB_ENET_TXD);
+ immap->im_cpm.cp_pbodr &= ~PB_ENET_TXD;
+#else
+#error Exactly ONE pair of PA_ENET_[RT]XD, PB_ENET_[RT]XD must be defined
+#endif
+
+#if defined(PC_ENET_LBK)
+ /* Configure port C pins to disable External Loopback
+ */
+ immap->im_ioport.iop_pcpar &= ~PC_ENET_LBK;
+ immap->im_ioport.iop_pcdir |= PC_ENET_LBK;
+ immap->im_ioport.iop_pcso &= ~PC_ENET_LBK;
+ immap->im_ioport.iop_pcdat &= ~PC_ENET_LBK; /* Disable Loopback */
+#endif /* PC_ENET_LBK */
/* Configure port C pins to enable CLSN and RENA.
*/
immap->im_ioport.iop_pcpar &= ~(PC_ENET_CLSN | PC_ENET_RENA);
immap->im_ioport.iop_pcdir &= ~(PC_ENET_CLSN | PC_ENET_RENA);
- immap->im_ioport.iop_pcso |= (PC_ENET_CLSN | PC_ENET_RENA);
+ immap->im_ioport.iop_pcso |= (PC_ENET_CLSN | PC_ENET_RENA);
/* Configure port A for TCLK and RCLK.
*/
- immap->im_ioport.iop_papar |= (PA_ENET_TCLK | PA_ENET_RCLK);
+ immap->im_ioport.iop_papar |= (PA_ENET_TCLK | PA_ENET_RCLK);
immap->im_ioport.iop_padir &= ~(PA_ENET_TCLK | PA_ENET_RCLK);
/* Configure Serial Interface clock routing.
* First, clear all SCC bits to zero, then set the ones we want.
*/
cp->cp_sicr &= ~SICR_ENET_MASK;
- cp->cp_sicr |= SICR_ENET_CLKRT;
+ cp->cp_sicr |= SICR_ENET_CLKRT;
/* Manual says set SDDR, but I can't find anything with that
* name. I think it is a misprint, and should be SDCR. This
@@ -884,20 +910,17 @@
/* It is now OK to enable the Ethernet transmitter.
* Unfortunately, there are board implementation differences here.
*/
-#if (defined(CONFIG_MBX) || defined(CONFIG_TQM860) || defined(CONFIG_TQM860L) || defined(CONFIG_FPS850))
- immap->im_ioport.iop_pcpar |= PC_ENET_TENA;
+#if (!defined (PB_ENET_TENA) && defined (PC_ENET_TENA))
+ immap->im_ioport.iop_pcpar |= PC_ENET_TENA;
immap->im_ioport.iop_pcdir &= ~PC_ENET_TENA;
-#endif
-
-#if (defined(CONFIG_TQM8xxL) && !defined(CONFIG_FPS850))
+#elif ( defined (PB_ENET_TENA) && !defined (PC_ENET_TENA))
cp->cp_pbpar |= PB_ENET_TENA;
cp->cp_pbdir |= PB_ENET_TENA;
+#else
+#error Configuration Error: define exactly ONE of PB_ENET_TENA, PC_ENET_TENA
#endif
#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC)
- cp->cp_pbpar |= PB_ENET_TENA;
- cp->cp_pbdir |= PB_ENET_TENA;
-
/* And while we are here, set the configuration to enable ethernet.
*/
*((volatile uint *)RPX_CSR_ADDR) &= ~BCSR0_ETHLPBK;
@@ -906,9 +929,6 @@
#endif
#ifdef CONFIG_BSEIP
- cp->cp_pbpar |= PB_ENET_TENA;
- cp->cp_pbdir |= PB_ENET_TENA;
-
/* BSE uses port B and C for PHY control.
*/
cp->cp_pbpar &= ~(PB_BSE_POWERUP | PB_BSE_FDXDIS);
@@ -941,11 +961,12 @@
*/
sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT);
- printk("%s: CPM ENET Version 0.2, ", dev->name);
+ printk("%s: CPM ENET Version 0.2 on SCC%d, ", dev->name, SCC_ENET+1);
for (i=0; i<5; i++)
printk("%02x:", dev->dev_addr[i]);
printk("%02x\n", dev->dev_addr[5]);
return 0;
}
+
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/8xx_io/fec.c linux/arch/ppc/8xx_io/fec.c
--- v2.4.2/linux/arch/ppc/8xx_io/fec.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/8xx_io/fec.c Sat Mar 3 10:52:13 2001
@@ -8,7 +8,9 @@
* describes connections using the internal parallel port I/O, which
* is basically all of Port D.
*
- * Right now, I am very watseful with the buffers. I allocate memory
+ * Includes support for the following PHYs: QS6612, LXT970, LXT971/2.
+ *
+ * Right now, I am very wasteful with the buffers. I allocate memory
* pages and then divide them into 2K frame buffers. This way I know I
* have buffers large enough to hold one frame within one buffer descriptor.
* Once I get this working, I will use 64 or 128 byte CPM buffers, which
@@ -18,13 +20,16 @@
* Much better multiple PHY support by Magnus Damm.
* Copyright (c) 2000 Ericsson Radio Systems AB.
*
+ * Make use of MII for PHY control configurable.
+ * Some fixes.
+ * Copyright (c) 2000 Wolfgang Denk, DENX Software Engineering.
*/
/* List of PHYs we wish to support.
*/
-#define CONFIG_FEC_LXT970
-#define CONFIG_FEC_LXT971
-#define CONFIG_FEC_QS6612
+#undef CONFIG_FEC_LXT970
+#define CONFIG_FEC_LXT971
+#undef CONFIG_FEC_QS6612
#include
#include
@@ -54,6 +59,7 @@
#include
#include "commproc.h"
+#ifdef CONFIG_USE_MDIO
/* Forward declarations of some structures to support different PHYs
*/
@@ -71,6 +77,7 @@
const phy_cmd_t *ack_int;
const phy_cmd_t *shutdown;
} phy_info_t;
+#endif /* CONFIG_USE_MDIO */
/* The number of Tx and Rx buffers. These are allocated from the page
* pool. The code may assume these are power of two, so it is best
@@ -78,20 +85,20 @@
* We don't need to allocate pages for the transmitter. We just use
* the skbuffer directly.
*/
-#if 1
-#define FEC_ENET_RX_PAGES 4
+#ifdef CONFIG_ENET_BIG_BUFFERS
+#define FEC_ENET_RX_PAGES 16
#define FEC_ENET_RX_FRSIZE 2048
#define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE)
#define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
-#define TX_RING_SIZE 8 /* Must be power of two */
-#define TX_RING_MOD_MASK 7 /* for this to work */
+#define TX_RING_SIZE 16 /* Must be power of two */
+#define TX_RING_MOD_MASK 15 /* for this to work */
#else
-#define FEC_ENET_RX_PAGES 16
+#define FEC_ENET_RX_PAGES 4
#define FEC_ENET_RX_FRSIZE 2048
#define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE)
#define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
-#define TX_RING_SIZE 16 /* Must be power of two */
-#define TX_RING_MOD_MASK 15 /* for this to work */
+#define TX_RING_SIZE 8 /* Must be power of two */
+#define TX_RING_MOD_MASK 7 /* for this to work */
#endif
/* Interrupt events/masks.
@@ -107,6 +114,26 @@
#define FEC_ENET_MII ((uint)0x00800000) /* MII interrupt */
#define FEC_ENET_EBERR ((uint)0x00400000) /* SDMA bus error */
+/*
+*/
+#define FEC_ECNTRL_PINMUX 0x00000004
+#define FEC_ECNTRL_ETHER_EN 0x00000002
+#define FEC_ECNTRL_RESET 0x00000001
+
+#define FEC_RCNTRL_BC_REJ 0x00000010
+#define FEC_RCNTRL_PROM 0x00000008
+#define FEC_RCNTRL_MII_MODE 0x00000004
+#define FEC_RCNTRL_DRT 0x00000002
+#define FEC_RCNTRL_LOOP 0x00000001
+
+#define FEC_TCNTRL_FDEN 0x00000004
+#define FEC_TCNTRL_HBC 0x00000002
+#define FEC_TCNTRL_GTS 0x00000001
+
+/* Delay to wait for FEC reset command to complete (in us)
+*/
+#define FEC_RESET_DELAY 50
+
/* The FEC stores dest/src/type, data, and checksum for receive packets.
*/
#define PKT_MAXBUF_SIZE 1518
@@ -138,6 +165,7 @@
uint tx_full;
spinlock_t lock;
+#ifdef CONFIG_USE_MDIO
uint phy_id;
uint phy_id_done;
uint phy_status;
@@ -148,6 +176,7 @@
uint sequence_done;
uint phy_addr;
+#endif /* CONFIG_USE_MDIO */
int link;
int old_link;
@@ -165,7 +194,9 @@
static int fec_enet_open(struct net_device *dev);
static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
+#ifdef CONFIG_USE_MDIO
static void fec_enet_mii(struct net_device *dev);
+#endif /* CONFIG_USE_MDIO */
static void fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
#ifdef CONFIG_FEC_PACKETHOOK
static void fec_enet_tx(struct net_device *dev, __u32 regval);
@@ -181,6 +212,7 @@
static void fec_stop(struct net_device *dev);
static ushort my_enet_addr[3];
+#ifdef CONFIG_USE_MDIO
/* MII processing. We keep this as simple as possible. Requests are
* placed on the list (if there is room). When the request is finished
* by the MII, an optional function may be called.
@@ -197,7 +229,7 @@
mii_list_t *mii_head;
mii_list_t *mii_tail;
-static int mii_queue(struct net_device *dev, int request,
+static int mii_queue(struct net_device *dev, int request,
void (*func)(uint, struct net_device *));
/* Make MII read/write commands for the FEC.
@@ -206,11 +238,13 @@
#define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | \
(VAL & 0xffff))
#define mk_mii_end 0
+#endif /* CONFIG_USE_MDIO */
/* Transmitter timeout.
*/
#define TX_TIMEOUT (2*HZ)
+#ifdef CONFIG_USE_MDIO
/* Register definitions for the PHY.
*/
@@ -218,7 +252,7 @@
#define MII_REG_SR 1 /* Status Register */
#define MII_REG_PHYIR1 2 /* PHY Identification Register 1 */
#define MII_REG_PHYIR2 3 /* PHY Identification Register 2 */
-#define MII_REG_ANAR 4 /* A-N Advertisement Register */
+#define MII_REG_ANAR 4 /* A-N Advertisement Register */
#define MII_REG_ANLPAR 5 /* A-N Link Partner Ability Register */
#define MII_REG_ANER 6 /* A-N Expansion Register */
#define MII_REG_ANNPTR 7 /* A-N Next Page Transmit Register */
@@ -230,18 +264,19 @@
#define PHY_CONF_LOOP 0x0002 /* 1 loopback mode enabled */
#define PHY_CONF_SPMASK 0x00f0 /* mask for speed */
#define PHY_CONF_10HDX 0x0010 /* 10 Mbit half duplex supported */
-#define PHY_CONF_10FDX 0x0020 /* 10 Mbit full duplex supported */
+#define PHY_CONF_10FDX 0x0020 /* 10 Mbit full duplex supported */
#define PHY_CONF_100HDX 0x0040 /* 100 Mbit half duplex supported */
-#define PHY_CONF_100FDX 0x0080 /* 100 Mbit full duplex supported */
+#define PHY_CONF_100FDX 0x0080 /* 100 Mbit full duplex supported */
#define PHY_STAT_LINK 0x0100 /* 1 up - 0 down */
#define PHY_STAT_FAULT 0x0200 /* 1 remote fault */
#define PHY_STAT_ANC 0x0400 /* 1 auto-negotiation complete */
#define PHY_STAT_SPMASK 0xf000 /* mask for speed */
#define PHY_STAT_10HDX 0x1000 /* 10 Mbit half duplex selected */
-#define PHY_STAT_10FDX 0x2000 /* 10 Mbit full duplex selected */
+#define PHY_STAT_10FDX 0x2000 /* 10 Mbit full duplex selected */
#define PHY_STAT_100HDX 0x4000 /* 100 Mbit half duplex selected */
-#define PHY_STAT_100FDX 0x8000 /* 100 Mbit full duplex selected */
+#define PHY_STAT_100FDX 0x8000 /* 100 Mbit full duplex selected */
+#endif /* CONFIG_USE_MDIO */
#ifdef CONFIG_FEC_PACKETHOOK
int
@@ -291,7 +326,7 @@
fep->ph_proto = 0;
fep->ph_regaddr = NULL;
fep->ph_priv = NULL;
-
+
fep->ph_lock = 0;
return retval;
@@ -345,7 +380,7 @@
fep->stats.tx_bytes += skb->len;
fep->skb_cur = (fep->skb_cur+1) & TX_RING_MOD_MASK;
-
+
/* Push the data cache so the CPM does not get stale memory
* data.
*/
@@ -404,7 +439,7 @@
bdp = fep->tx_bd_base;
printk(" tx: %u buffers\n", TX_RING_SIZE);
for (i = 0 ; i < TX_RING_SIZE; i++) {
- printk(" %08x: %04x %04x %08x\n",
+ printk(" %08x: %04x %04x %08x\n",
(uint) bdp,
bdp->cbd_sc,
bdp->cbd_datlen,
@@ -443,7 +478,6 @@
if (fep->ph_regaddr) regval = *fep->ph_regaddr;
#endif
-
fecp = (volatile fec_t*)dev->base_addr;
/* Get the interrupt events that caused us to be here.
@@ -478,9 +512,13 @@
}
if (int_events & FEC_ENET_MII) {
+#ifdef CONFIG_USE_MDIO
fec_enet_mii(dev);
+#else
+printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__,__LINE__,__FUNCTION__);
+#endif /* CONFIG_USE_MDIO */
}
-
+
}
}
@@ -541,23 +579,23 @@
*/
if (bdp->cbd_sc & BD_ENET_TX_DEF)
fep->stats.collisions++;
-
+
/* Free the sk buffer associated with this last transmit.
*/
#if 0
printk("TXI: %x %x %x\n", bdp, skb, fep->skb_dirty);
#endif
- dev_kfree_skb(skb/*, FREE_WRITE*/);
+ dev_kfree_skb_irq (skb/*, FREE_WRITE*/);
fep->tx_skbuff[fep->skb_dirty] = NULL;
fep->skb_dirty = (fep->skb_dirty + 1) & TX_RING_MOD_MASK;
-
+
/* Update pointer to next buffer descriptor to be transmitted.
*/
if (bdp->cbd_sc & BD_ENET_TX_WRAP)
bdp = fep->tx_bd_base;
else
bdp++;
-
+
/* Since we have freed up a buffer, the ring is no longer
* full.
*/
@@ -617,7 +655,7 @@
/* Check for errors. */
if (bdp->cbd_sc & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
BD_ENET_RX_CR | BD_ENET_RX_OV)) {
- fep->stats.rx_errors++;
+ fep->stats.rx_errors++;
if (bdp->cbd_sc & (BD_ENET_RX_LG | BD_ENET_RX_SH)) {
/* Frame too long or too short. */
fep->stats.rx_length_errors++;
@@ -703,7 +741,7 @@
bdp = fep->rx_bd_base;
else
bdp++;
-
+
#if 1
/* Doing this here will keep the FEC running while we process
* incoming frames. On a heavily loaded network, we should be
@@ -732,6 +770,7 @@
}
+#ifdef CONFIG_USE_MDIO
static void
fec_enet_mii(struct net_device *dev)
{
@@ -743,7 +782,7 @@
fep = (struct fec_enet_private *)dev->priv;
ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
mii_reg = ep->fec_mii_data;
-
+
if ((mip = mii_head) == NULL) {
printk("MII and no head!\n");
return;
@@ -756,8 +795,9 @@
mip->mii_next = mii_free;
mii_free = mip;
- if ((mip = mii_head) != NULL)
+ if ((mip = mii_head) != NULL) {
ep->fec_mii_data = mip->mii_regval;
+ }
}
static int
@@ -786,13 +826,11 @@
if (mii_head) {
mii_tail->mii_next = mip;
mii_tail = mip;
- }
- else {
+ } else {
mii_head = mii_tail = mip;
(&(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec))->fec_mii_data = regval;
}
- }
- else {
+ } else {
retval = 1;
}
@@ -808,7 +846,7 @@
if(!c)
return;
- for(k = 0; (c+k)->mii_data != mk_mii_end; k++)
+ for(k = 0; (c+k)->mii_data != mk_mii_end; k++)
mii_queue(dev, (c+k)->mii_data, (c+k)->funct);
}
@@ -896,7 +934,7 @@
}
static phy_info_t phy_info_lxt970 = {
- 0x07810000,
+ 0x07810000,
"LXT970",
(const phy_cmd_t []) { /* config */
@@ -919,12 +957,12 @@
},
(const phy_cmd_t []) { /* ack_int */
/* read SR and ISR to acknowledge */
-
+
{ mk_mii_read(MII_REG_SR), mii_parse_sr },
{ mk_mii_read(MII_LXT970_ISR), NULL },
/* find out the current status */
-
+
{ mk_mii_read(MII_LXT970_CSR), mii_parse_lxt970_csr },
{ mk_mii_end, }
},
@@ -933,7 +971,7 @@
{ mk_mii_end, }
},
};
-
+
#endif /* CONFIG_FEC_LXT970 */
/* ------------------------------------------------------------------------- */
@@ -950,7 +988,7 @@
#define MII_LXT971_LCR 20 /* LED Control Register */
#define MII_LXT971_TCR 30 /* Transmit Control Register */
-/*
+/*
* I had some nice ideas of running the MDIO faster...
* The 971 should support 8MHz and I tried it, but things acted really
* weird, so 2.5 MHz ought to be enough for anyone...
@@ -980,14 +1018,11 @@
}
static phy_info_t phy_info_lxt971 = {
- 0x0001378e,
+ 0x0001378e,
"LXT971",
-
- (const phy_cmd_t []) { /* config */
- /* limit to 10MBit because my protorype board
- * doesn't work with 100. */
- { mk_mii_write(MII_REG_ANAR, 0x061), NULL }, /* 10 MBit */
+ (const phy_cmd_t []) { /* config */
+// { mk_mii_write(MII_REG_ANAR, 0x021), NULL }, /* 10 Mbps, HD */
{ mk_mii_read(MII_REG_CR), mii_parse_cr },
{ mk_mii_read(MII_REG_ANAR), mii_parse_anar },
{ mk_mii_end, }
@@ -995,12 +1030,12 @@
(const phy_cmd_t []) { /* startup - enable interrupts */
{ mk_mii_write(MII_LXT971_IER, 0x00f2), NULL },
{ mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */
-
+
/* Somehow does the 971 tell me that the link is down
* the first read after power-up.
* read here to get a valid value in ack_int */
- { mk_mii_read(MII_REG_SR), mii_parse_sr },
+ { mk_mii_read(MII_REG_SR), mii_parse_sr },
{ mk_mii_end, }
},
(const phy_cmd_t []) { /* ack_int */
@@ -1008,9 +1043,9 @@
{ mk_mii_read(MII_REG_SR), mii_parse_sr },
{ mk_mii_read(MII_LXT971_SR2), mii_parse_lxt971_sr2 },
-
+
/* we only need to read ISR to acknowledge */
-
+
{ mk_mii_read(MII_LXT971_ISR), NULL },
{ mk_mii_end, }
},
@@ -1053,13 +1088,13 @@
}
static phy_info_t phy_info_qs6612 = {
- 0x00181440,
+ 0x00181440,
"QS6612",
-
- (const phy_cmd_t []) { /* config */
-// { mk_mii_write(MII_REG_ANAR, 0x061), NULL }, /* 10 MBit */
- /* The PHY powers up isolated on the RPX,
+ (const phy_cmd_t []) { /* config */
+// { mk_mii_write(MII_REG_ANAR, 0x061), NULL }, /* 10 Mbps */
+
+ /* The PHY powers up isolated on the RPX,
* so send a command to allow operation.
*/
@@ -1077,9 +1112,9 @@
{ mk_mii_end, }
},
(const phy_cmd_t []) { /* ack_int */
-
+
/* we need to read ISR, SR and ANER to acknowledge */
-
+
{ mk_mii_read(MII_QS6612_ISR), NULL },
{ mk_mii_read(MII_REG_SR), mii_parse_sr },
{ mk_mii_read(MII_REG_ANER), NULL },
@@ -1134,10 +1169,10 @@
printk("link up");
switch(*s & PHY_STAT_SPMASK) {
- case PHY_STAT_100FDX: printk(", 100MBit Full Duplex"); break;
- case PHY_STAT_100HDX: printk(", 100MBit Half Duplex"); break;
- case PHY_STAT_10FDX: printk(", 10MBit Full Duplex"); break;
- case PHY_STAT_10HDX: printk(", 10MBit Half Duplex"); break;
+ case PHY_STAT_100FDX: printk(", 100 Mbps Full Duplex"); break;
+ case PHY_STAT_100HDX: printk(", 100 Mbps Half Duplex"); break;
+ case PHY_STAT_10FDX: printk(", 10 Mbps Full Duplex"); break;
+ case PHY_STAT_10HDX: printk(", 10 Mbps Half Duplex"); break;
default:
printk(", Unknown speed/duplex");
}
@@ -1177,7 +1212,7 @@
if (*s & PHY_CONF_LOOP)
printk(", loopback enabled");
-
+
printk(".\n");
fep->sequence_done = 1;
@@ -1194,7 +1229,7 @@
if (fep->link) {
duplex = 0;
- if (fep->phy_status
+ if (fep->phy_status
& (PHY_STAT_100FDX | PHY_STAT_10FDX))
duplex = 1;
fec_restart(dev, duplex);
@@ -1245,18 +1280,20 @@
fep = dev->priv;
fep->phy_id |= (mii_reg & 0xffff);
- printk("fec: Phy @ 0x%x, type 0x%08x\n", fep->phy_addr, fep->phy_id);
for(i = 0; phy_info[i]; i++)
if(phy_info[i]->id == (fep->phy_id >> 4))
break;
if(!phy_info[i])
- panic("%s: PHY id 0x%08x is not supported!\n",
+ panic("%s: PHY id 0x%08x is not supported!\n",
dev->name, fep->phy_id);
-
+
fep->phy = phy_info[i];
fep->phy_id_done = 1;
+
+ printk("%s: Phy @ 0x%x, type %s (0x%08x)\n",
+ dev->name, fep->phy_addr, fep->phy->name, fep->phy_id);
}
/* Scan all of the MII PHY addresses looking for someone to respond
@@ -1270,25 +1307,23 @@
fep = dev->priv;
- if (fep->phy_addr < 32) {
- if ((phytype = (mii_reg & 0xffff)) != 0xffff) {
-
- /* Got first part of ID, now get remainder.
- */
- fep->phy_id = phytype << 16;
- mii_queue(dev, mk_mii_read(MII_REG_PHYIR2),
- mii_discover_phy3);
- }
- else {
- fep->phy_addr++;
+ if ((phytype = (mii_reg & 0xffff)) != 0xffff) {
+
+ /* Got first part of ID, now get remainder.
+ */
+ fep->phy_id = phytype << 16;
+ mii_queue(dev, mk_mii_read(MII_REG_PHYIR2), mii_discover_phy3);
+ } else {
+ fep->phy_addr++;
+ if (fep->phy_addr < 32) {
mii_queue(dev, mk_mii_read(MII_REG_PHYIR1),
mii_discover_phy);
+ } else {
+ printk("fec: No PHY device found.\n");
}
}
- else {
- printk("FEC: No PHY device found.\n");
- }
}
+#endif /* CONFIG_USE_MDIO */
/* This interrupt occurs when the PHY detects a link change.
*/
@@ -1299,16 +1334,36 @@
mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
#endif
{
+#ifdef CONFIG_USE_MDIO
struct net_device *dev = dev_id;
struct fec_enet_private *fep = dev->priv;
+ volatile immap_t *immap = (immap_t *)IMAP_ADDR;
+ volatile fec_t *fecp = &(immap->im_cpm.cp_fec);
+ unsigned int ecntrl = fecp->fec_ecntrl;
+
+ /* We need the FEC enabled to access the MII
+ */
+ if ((ecntrl & FEC_ECNTRL_ETHER_EN) == 0) {
+ fecp->fec_ecntrl |= FEC_ECNTRL_ETHER_EN;
+ }
+#endif /* CONFIG_USE_MDIO */
#if 0
disable_irq(fep->mii_irq); /* disable now, enable later */
#endif
+
+#ifdef CONFIG_USE_MDIO
mii_do_cmd(dev, fep->phy->ack_int);
mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */
+ if ((ecntrl & FEC_ECNTRL_ETHER_EN) == 0) {
+ fecp->fec_ecntrl = ecntrl; /* restore old settings */
+ }
+#else
+printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__,__LINE__,__FUNCTION__);
+#endif /* CONFIG_USE_MDIO */
+
}
static int
@@ -1320,6 +1375,7 @@
* a simple way to do that.
*/
+#ifdef CONFIG_USE_MDIO
fep->sequence_done = 0;
fep->link = 0;
@@ -1327,7 +1383,6 @@
mii_do_cmd(dev, fep->phy->ack_int);
mii_do_cmd(dev, fep->phy->config);
mii_do_cmd(dev, phy_cmd_config); /* display configuration */
-
while(!fep->sequence_done)
schedule();
@@ -1335,8 +1390,12 @@
netif_start_queue(dev);
return 0; /* Success */
}
-
return -ENODEV; /* No PHY we understand */
+#else
+ fep->link = 1;
+ netif_start_queue(dev);
+ return 0; /* Success */
+#endif /* CONFIG_USE_MDIO */
}
@@ -1377,13 +1436,13 @@
ep = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec);
if (dev->flags&IFF_PROMISC) {
-
+
/* Log any net taps. */
printk("%s: Promiscuous mode enabled.\n", dev->name);
- ep->fec_r_cntrl |= 0x0008;
+ ep->fec_r_cntrl |= FEC_RCNTRL_PROM;
} else {
- ep->fec_r_cntrl &= ~0x0008;
+ ep->fec_r_cntrl &= ~FEC_RCNTRL_PROM;
if (dev->flags & IFF_ALLMULTI) {
/* Catch all multicast addresses, so set the
@@ -1404,7 +1463,7 @@
dmi = dev->mc_list;
for (i=0; imc_count; i++) {
-
+
/* Only support group multicast for now.
*/
if (!(dmi->dmi_addr[0] & 1))
@@ -1448,7 +1507,7 @@
volatile fec_t *fecp;
bd_t *bd;
extern uint _get_IMMR(void);
-#ifdef CONFIG_RPXCLASSIC
+#ifdef CONFIG_SCC_ENET
unsigned char tmpaddr[6];
#endif
@@ -1472,8 +1531,15 @@
/* Whack a reset. We should wait for this.
*/
- fecp->fec_ecntrl = 1;
- udelay(10);
+ fecp->fec_ecntrl = FEC_ECNTRL_PINMUX | FEC_ECNTRL_RESET;
+ for (i = 0;
+ (fecp->fec_ecntrl & FEC_ECNTRL_RESET) && (i < FEC_RESET_DELAY);
+ ++i) {
+ udelay(1);
+ }
+ if (i == FEC_RESET_DELAY) {
+ printk ("FEC Reset timeout!\n");
+ }
/* Set the Ethernet address. If using multiple Enets on the 8xx,
* this needs some work to get unique addresses.
@@ -1481,12 +1547,13 @@
eap = (unsigned char *)my_enet_addr;
iap = bd->bi_enetaddr;
-#ifdef CONFIG_RPXCLASSIC
- /* The Embedded Planet boards have only one MAC address in
- * the EEPROM, but can have two Ethernet ports. For the
- * FEC port, we create another address by setting one of
- * the address bits above something that would have (up to
- * now) been allocated.
+#ifdef CONFIG_SCC_ENET
+ /*
+ * If a board has Ethernet configured both on a SCC and the
+ * FEC, it needs (at least) 2 MAC addresses (we know that Sun
+ * disagrees, but anyway). For the FEC port, we create
+ * another address by setting one of the address bits above
+ * something that would have (up to now) been allocated.
*/
for (i=0; i<6; i++)
tmpaddr[i] = *iap++;
@@ -1494,8 +1561,9 @@
iap = tmpaddr;
#endif
- for (i=0; i<6; i++)
+ for (i=0; i<6; i++) {
dev->dev_addr[i] = *eap++ = *iap++;
+ }
/* Allocate memory for buffer descriptors.
*/
@@ -1518,9 +1586,6 @@
fep->rx_bd_base = cbd_base;
fep->tx_bd_base = cbd_base + RX_RING_SIZE;
- fep->dirty_tx = fep->cur_tx = fep->tx_bd_base;
- fep->cur_rx = fep->rx_bd_base;
-
fep->skb_cur = fep->skb_dirty = 0;
/* Initialize the receive buffer descriptors.
@@ -1565,22 +1630,27 @@
*/
if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0)
panic("Could not allocate FEC IRQ!");
+
#ifdef CONFIG_RPXCLASSIC
/* Make Port C, bit 15 an input that causes interrupts.
*/
immap->im_ioport.iop_pcpar &= ~0x0001;
immap->im_ioport.iop_pcdir &= ~0x0001;
- immap->im_ioport.iop_pcso &= ~0x0001;
- immap->im_ioport.iop_pcint |= 0x0001;
+ immap->im_ioport.iop_pcso &= ~0x0001;
+ immap->im_ioport.iop_pcint |= 0x0001;
cpm_install_handler(CPMVEC_PIO_PC15, mii_link_interrupt, dev);
/* Make LEDS reflect Link status.
*/
*((uint *) RPX_CSR_ADDR) &= ~BCSR2_FETHLEDMODE;
#endif
-#ifdef CONFIG_FADS
- if (request_8xxirq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0)
+
+#ifdef PHY_INTERRUPT
+ if (request_8xxirq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) != 0)
panic("Could not allocate MII IRQ!");
+
+ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel |=
+ (0x80000000 >> PHY_INTERRUPT);
#endif
dev->base_addr = (unsigned long)fecp;
@@ -1595,9 +1665,11 @@
dev->get_stats = fec_enet_get_stats;
dev->set_multicast_list = set_multicast_list;
+#ifdef CONFIG_USE_MDIO
for (i=0; iim_ioport.iop_pddir = 0x1c58; /* Pre rev. D */
else
immap->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */
-
+
+#ifdef CONFIG_USE_MDIO
/* Set MII speed to 2.5 MHz
*/
- fecp->fec_mii_speed = fep->phy_speed =
- ((bd->bi_busfreq * 1000000) / 2500000) & 0x7e;
+ fecp->fec_mii_speed = fep->phy_speed =
+ (
+ ( ((bd->bi_intfreq * 1000000) + 500000) / 2500000 / 2 )
+ & 0x3F
+ ) << 1;
+#else
+ fecp->fec_mii_speed = 0; /* turn off MDIO */
+#endif /* CONFIG_USE_MDIO */
- printk("%s: FEC ENET Version 0.2, ", dev->name);
- for (i=0; i<5; i++)
- printk("%02x:", dev->dev_addr[i]);
- printk("%02x\n", dev->dev_addr[5]);
+ printk ("%s: FEC ENET Version 0.2, FEC irq %d"
+#ifdef PHY_INTERRUPT
+ ", MII irq %d"
+#endif
+ ", addr ",
+ dev->name, FEC_INTERRUPT
+#ifdef PHY_INTERRUPT
+ , PHY_INTERRUPT
+#endif
+ );
+ for (i=0; i<6; i++)
+ printk("%02x%c", dev->dev_addr[i], (i==5) ? '\n' : ':');
+#ifdef CONFIG_USE_MDIO /* start in full duplex mode, and negotiate speed */
+ fec_restart (dev, 1);
+#else /* always use half duplex mode only */
+ fec_restart (dev, 0);
+#endif
+
+#ifdef CONFIG_USE_MDIO
/* Queue up command to detect the PHY and initialize the
* remainder of the interface.
*/
fep->phy_id_done = 0;
fep->phy_addr = 0;
mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy);
+#endif /* CONFIG_USE_MDIO */
return 0;
}
@@ -1639,7 +1734,6 @@
{
struct fec_enet_private *fep;
int i;
- unsigned char *eap;
volatile cbd_t *bdp;
volatile immap_t *immap;
volatile fec_t *fecp;
@@ -1652,33 +1746,25 @@
/* Whack a reset. We should wait for this.
*/
- fecp->fec_ecntrl = 1;
- udelay(10);
-
- /* Enable interrupts we wish to service.
- */
- fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB |
- FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
-
- /* Clear any outstanding interrupt.
- */
- fecp->fec_ievent = 0xffc0;
-
- fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
+ fecp->fec_ecntrl = FEC_ECNTRL_PINMUX | FEC_ECNTRL_RESET;
+ for (i = 0;
+ (fecp->fec_ecntrl & FEC_ECNTRL_RESET) && (i < FEC_RESET_DELAY);
+ ++i) {
+ udelay(1);
+ }
+ if (i == FEC_RESET_DELAY) {
+ printk ("FEC Reset timeout!\n");
+ }
/* Set station address.
*/
- fecp->fec_addr_low = (my_enet_addr[0] << 16) | my_enet_addr[1];
- fecp->fec_addr_high = my_enet_addr[2];
-
- eap = (unsigned char *)&my_enet_addr[0];
- for (i=0; i<6; i++)
- dev->dev_addr[i] = *eap++;
+ fecp->fec_addr_low = (my_enet_addr[0] << 16) | my_enet_addr[1];
+ fecp->fec_addr_high = my_enet_addr[2];
/* Reset all multicast.
*/
fecp->fec_hash_table_high = 0;
- fecp->fec_hash_table_low = 0;
+ fecp->fec_hash_table_low = 0;
/* Set maximum receive buffer size.
*/
@@ -1739,12 +1825,12 @@
/* Enable MII mode.
*/
if (duplex) {
- fecp->fec_r_cntrl = 0x04; /* MII enable */
- fecp->fec_x_cntrl = 0x04; /* FD enable */
+ fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE; /* MII enable */
+ fecp->fec_x_cntrl = FEC_TCNTRL_FDEN; /* FD enable */
}
else {
- fecp->fec_r_cntrl = 0x06; /* MII enable|No Rcv on Xmit */
- fecp->fec_x_cntrl = 0x00;
+ fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE | FEC_RCNTRL_DRT;
+ fecp->fec_x_cntrl = 0;
}
fep->full_duplex = duplex;
@@ -1752,13 +1838,26 @@
*/
fecp->fec_fun_code = 0x78000000;
+#ifdef CONFIG_USE_MDIO
/* Set MII speed.
*/
fecp->fec_mii_speed = fep->phy_speed;
+#endif /* CONFIG_USE_MDIO */
+
+ /* Clear any outstanding interrupt.
+ */
+ fecp->fec_ievent = 0xffc0;
+
+ fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
+
+ /* Enable interrupts we wish to service.
+ */
+ fecp->fec_imask = ( FEC_ENET_TXF | FEC_ENET_TXB |
+ FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII );
/* And last, enable the transmit and receive processing.
*/
- fecp->fec_ecntrl = 6;
+ fecp->fec_ecntrl = FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN;
fecp->fec_r_des_active = 0x01000000;
}
@@ -1768,33 +1867,45 @@
volatile immap_t *immap;
volatile fec_t *fecp;
struct fec_enet_private *fep;
+ int i;
immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */
-
+
fecp = &(immap->im_cpm.cp_fec);
-
+
+ if ((fecp->fec_ecntrl & FEC_ECNTRL_ETHER_EN) == 0)
+ return; /* already down */
+
fep = dev->priv;
fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */
- while(!(fecp->fec_ievent & 0x10000000));
-
- /* Whack a reset. We should wait for this.
- */
- fecp->fec_ecntrl = 1;
- udelay(10);
+ for (i = 0;
+ ((fecp->fec_ievent & 0x10000000) == 0) && (i < FEC_RESET_DELAY);
+ ++i) {
+ udelay(1);
+ }
+ if (i == FEC_RESET_DELAY) {
+ printk ("FEC timeout on graceful transmit stop\n");
+ }
/* Clear outstanding MII command interrupts.
*/
fecp->fec_ievent = FEC_ENET_MII;
- /* Enable MII command finihed interrupt
+ /* Enable MII command finished interrupt
*/
fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
fecp->fec_imask = FEC_ENET_MII;
+#ifdef CONFIG_USE_MDIO
/* Set MII speed.
*/
fecp->fec_mii_speed = fep->phy_speed;
+#endif /* CONFIG_USE_MDIO */
+
+ /* Disable FEC
+ */
+ fecp->fec_ecntrl &= ~(FEC_ECNTRL_ETHER_EN);
}
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/8xx_io/uart.c linux/arch/ppc/8xx_io/uart.c
--- v2.4.2/linux/arch/ppc/8xx_io/uart.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/8xx_io/uart.c Sat Mar 3 10:52:13 2001
@@ -53,10 +53,22 @@
/* this defines the index into rs_table for the port to use
*/
-#ifndef CONFIG_SERIAL_CONSOLE_PORT
-#define CONFIG_SERIAL_CONSOLE_PORT 0
-#endif
-#endif
+# ifndef CONFIG_SERIAL_CONSOLE_PORT
+# ifdef CONFIG_SCC3_ENET
+# ifdef CONFIG_8xx_CONS_SMC2
+# define CONFIG_SERIAL_CONSOLE_PORT 0 /* Console on SMC2 is 1st port */
+# else
+# error "Can't use SMC1 for console with Ethernet on SCC3"
+# endif
+# else /* ! CONFIG_SCC3_ENET */
+# ifdef CONFIG_8xx_CONS_SMC2 /* Console on SMC2 */
+# define CONFIG_SERIAL_CONSOLE_PORT 1
+# else /* Console on SMC1 */
+# define CONFIG_SERIAL_CONSOLE_PORT 0
+# endif /* CONFIG_8xx_CONS_SMC2 */
+# endif /* CONFIG_SCC3_ENET */
+# endif /* CONFIG_SERIAL_CONSOLE_PORT */
+#endif /* CONFIG_SERIAL_CONSOLE */
#if 0
/* SCC2 for console
@@ -118,14 +130,22 @@
*/
static struct serial_state rs_table[] = {
/* UART CLK PORT IRQ FLAGS NUM */
- { 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, 0 }, /* SMC1 ttyS0 */
-#ifdef CONFIG_8xxSMC2
- { 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, 1 }, /* SMC2 ttyS1 */
-#endif
-#ifdef CONFIG_8xxSCC
- { 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, (NUM_IS_SCC | 1) }, /* SCC2 ttyS2 */
- { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */
+#ifndef CONFIG_SCC3_ENET /* SMC1 not usable with Ethernet on SCC3 */
+ { 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, 0 }, /* SMC1 ttyS0 */
#endif
+#if !defined(CONFIG_USB_MPC8xx) && !defined(CONFIG_USB_CLIENT_MPC8xx)
+# ifdef CONFIG_8xxSMC2
+ { 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, 1 }, /* SMC2 ttyS1 */
+# endif
+# ifdef CONFIG_8xxSCC
+ { 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, (NUM_IS_SCC | 1) }, /* SCC2 ttyS2 */
+ { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */
+# endif
+ #else /* CONFIG_USB_xxx */
+# ifdef CONFIG_8xxSCC
+ { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */
+# endif
+#endif /* CONFIG_USB_xxx */
};
#define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state))
@@ -2733,10 +2753,10 @@
cp->cp_pbdir &= ~iobits;
cp->cp_pbodr &= ~iobits;
#else
+ iobits = 0xc0;
if (idx == 0) {
/* SMC1 on Port B, like all 8xx.
*/
- iobits = 0xc0;
cp->cp_pbpar |= iobits;
cp->cp_pbdir &= ~iobits;
cp->cp_pbodr &= ~iobits;
@@ -2744,7 +2764,6 @@
else {
/* SMC2 is on Port A.
*/
- iobits = 0x300;
immap->im_ioport.iop_papar |= iobits;
immap->im_ioport.iop_padir &= ~iobits;
immap->im_ioport.iop_paodr &= ~iobits;
@@ -2836,6 +2855,9 @@
for (bidx = 0; bidx < (sizeof(baud_table) / sizeof(int)); bidx++)
if (bd->bi_baudrate == baud_table[bidx])
break;
+ /* make sure we have a useful value */
+ if (bidx == (sizeof(baud_table) / sizeof(int)))
+ bidx = 13; /* B9600 */
co->cflag = CREAD|CLOCAL|bidx|CS8;
baud_idx = bidx;
@@ -2958,7 +2980,7 @@
*/
chan = smc_chan_map[idx];
cp->cp_cpcr = mk_cr_cmd(chan, CPM_CR_INIT_TRX) | CPM_CR_FLG;
- printk("");
+ printk("%s", "");
while (cp->cp_cpcr & CPM_CR_FLG);
/* Set UART mode, 8 bit, no parity, one stop.
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/config.in linux/arch/ppc/config.in
--- v2.4.2/linux/arch/ppc/config.in Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/config.in Sat Mar 3 10:52:13 2001
@@ -57,14 +57,25 @@
"RPX-Lite CONFIG_RPXLITE \
RPX-Classic CONFIG_RPXCLASSIC \
BSE-IP CONFIG_BSEIP \
- TQM8xxL CONFIG_TQM8xxL \
- TQM860L CONFIG_TQM860L \
- TQM860 CONFIG_TQM860 \
+ TQM823L CONFIG_TQM823L \
+ TQM850L CONFIG_TQM850L \
+ TQM855L CONFIG_TQM855L \
+ TQM860L CONFIG_TQM860L \
+ FPS850L CONFIG_FPS850L \
+ TQM860 CONFIG_TQM860 \
+ SPD823TS CONFIG_SPD823TS \
+ IVMS8 CONFIG_IVMS8 \
+ SM850 CONFIG_SM850 \
MBX CONFIG_MBX \
WinCept CONFIG_WINCEPT" RPX-Lite
-
- if [ "$CONFIG_TQM8xxL" = "y" ]; then
- bool 'FPS850 Mainboard' CONFIG_FPS850
+
+ if [ "$CONFIG_TQM823L" = "y" -o \
+ "$CONFIG_TQM850L" = "y" -o \
+ "$CONFIG_FPS850L" = "y" -o \
+ "$CONFIG_TQM855L" = "y" -o \
+ "$CONFIG_TQM860L" = "y" -o \
+ "$CONFIG_SM850" = "y" ]; then
+ define_bool CONFIG_TQM8xxL y
fi
fi
@@ -298,6 +309,11 @@
else
bool ' Support for ADB keyboard (old driver)' CONFIG_ADB_KEYBOARD
fi
+ fi
+ # This is for drivers/macintosh/mac_hid.o, which is needed if the input
+ # layer is used.
+ if [ "$CONFIG_INPUT" != "n" ]; then
+ define_bool CONFIG_MAC_HID y
fi
fi
endmenu
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/IVMS8_defconfig linux/arch/ppc/configs/IVMS8_defconfig
--- v2.4.2/linux/arch/ppc/configs/IVMS8_defconfig Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/configs/IVMS8_defconfig Sat Mar 3 10:52:13 2001
@@ -0,0 +1,452 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+# CONFIG_6xx is not set
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8260 is not set
+CONFIG_8xx=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_RPXLITE is not set
+# CONFIG_RPXCLASSIC is not set
+# CONFIG_BSEIP is not set
+# CONFIG_TQM823L is not set
+# CONFIG_TQM850L is not set
+# CONFIG_TQM855L is not set
+# CONFIG_TQM860L is not set
+# CONFIG_FPS850L is not set
+# CONFIG_TQM860 is not set
+# CONFIG_SPD823TS is not set
+CONFIG_IVMS8=y
+# CONFIG_SM850 is not set
+# CONFIG_MBX is not set
+# CONFIG_WINCEPT is not set
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_SASH=y
+CONFIG_SASH_PATH="/bin/sash"
+
+#
+# General setup
+#
+# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_PCI is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+
+#
+#
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+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_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
+# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
+# CONFIG_BLK_DEV_IDEDISK_IBM is not set
+# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
+# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
+# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
+# CONFIG_BLK_DEV_IDEDISK_WD is not set
+# CONFIG_BLK_DEV_COMMERIAL is not set
+# CONFIG_BLK_DEV_TIVO is not set
+# CONFIG_BLK_DEV_IDECS is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_ISAPNP is not set
+CONFIG_BLK_DEV_MPC8xx_IDE=y
+# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_DMA_NONPCI is not set
+CONFIG_BLK_DEV_IDE_MODES=y
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_NCR885E is not set
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# 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=32
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_FLASH is not set
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS 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_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+CONFIG_ISO9660_FS=y
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+CONFIG_MAC_PARTITION=y
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC8xx CPM Options
+#
+# CONFIG_SCC_ENET is not set
+CONFIG_FEC_ENET=y
+CONFIG_USE_MDIO=y
+CONFIG_ENET_BIG_BUFFERS=y
+# CONFIG_8xxSMC2 is not set
+# CONFIG_8xxSCC is not set
+
+#
+# Generic MPC8xx Options
+#
+CONFIG_8xx_COPYBACK=y
+# CONFIG_8xx_CPU6 is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/SM850_defconfig linux/arch/ppc/configs/SM850_defconfig
--- v2.4.2/linux/arch/ppc/configs/SM850_defconfig Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/configs/SM850_defconfig Sat Mar 3 10:52:13 2001
@@ -0,0 +1,420 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+# CONFIG_6xx is not set
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8260 is not set
+CONFIG_8xx=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_RPXLITE is not set
+# CONFIG_RPXCLASSIC is not set
+# CONFIG_BSEIP is not set
+# CONFIG_TQM823L is not set
+# CONFIG_TQM850L is not set
+# CONFIG_TQM855L is not set
+# CONFIG_TQM860L is not set
+# CONFIG_FPS850L is not set
+# CONFIG_TQM860 is not set
+# CONFIG_SPD823TS is not set
+CONFIG_SM850=y
+# CONFIG_MBX is not set
+# CONFIG_WINCEPT is not set
+CONFIG_TQM8xxL=y
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_SASH=y
+CONFIG_SASH_PATH="/bin/sash"
+
+#
+# General setup
+#
+# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_PCI is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+
+#
+#
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_NCR885E is not set
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# 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=32
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+CONFIG_FLASH=y
+CONFIG_AMD_FLASH=y
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS 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_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_EXT2_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC8xx CPM Options
+#
+CONFIG_SCC_ENET=y
+# CONFIG_SCC1_ENET is not set
+# CONFIG_SCC2_ENET is not set
+CONFIG_SCC3_ENET=y
+# CONFIG_FEC_ENET is not set
+CONFIG_ENET_BIG_BUFFERS=y
+CONFIG_8xxSMC2=y
+CONFIG_8xx_ALTSMC2=y
+CONFIG_8xx_CONS_SMC2=y
+# CONFIG_8xxSCC is not set
+
+#
+# Generic MPC8xx Options
+#
+CONFIG_8xx_COPYBACK=y
+CONFIG_8xx_CPU6=y
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/SPD823TS_defconfig linux/arch/ppc/configs/SPD823TS_defconfig
--- v2.4.2/linux/arch/ppc/configs/SPD823TS_defconfig Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/configs/SPD823TS_defconfig Sat Mar 3 10:52:13 2001
@@ -0,0 +1,416 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+# CONFIG_6xx is not set
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8260 is not set
+CONFIG_8xx=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_RPXLITE is not set
+# CONFIG_RPXCLASSIC is not set
+# CONFIG_BSEIP is not set
+# CONFIG_TQM823L is not set
+# CONFIG_TQM850L is not set
+# CONFIG_TQM855L is not set
+# CONFIG_TQM860L is not set
+# CONFIG_FPS850L is not set
+# CONFIG_TQM860 is not set
+CONFIG_SPD823TS=y
+# CONFIG_MBX is not set
+# CONFIG_WINCEPT is not set
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_SASH=y
+CONFIG_SASH_PATH="/bin/sash"
+
+#
+# General setup
+#
+# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_PCI is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+
+#
+#
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_NCR885E is not set
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# 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=32
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_FLASH is not set
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS 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_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_EXT2_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC8xx CPM Options
+#
+CONFIG_SCC_ENET=y
+# CONFIG_SCC1_ENET is not set
+CONFIG_SCC2_ENET=y
+# CONFIG_FEC_ENET is not set
+CONFIG_ENET_BIG_BUFFERS=y
+CONFIG_8xxSMC2=y
+CONFIG_8xx_ALTSMC2=y
+# CONFIG_8xx_CONS_SMC2 is not set
+# CONFIG_8xxSCC is not set
+
+#
+# Generic MPC8xx Options
+#
+CONFIG_8xx_COPYBACK=y
+# CONFIG_8xx_CPU6 is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/TQM823L_defconfig linux/arch/ppc/configs/TQM823L_defconfig
--- v2.4.2/linux/arch/ppc/configs/TQM823L_defconfig Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/configs/TQM823L_defconfig Sat Mar 3 10:52:13 2001
@@ -0,0 +1,419 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+# CONFIG_6xx is not set
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8260 is not set
+CONFIG_8xx=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_RPXLITE is not set
+# CONFIG_RPXCLASSIC is not set
+# CONFIG_BSEIP is not set
+CONFIG_TQM823L=y
+# CONFIG_TQM850L is not set
+# CONFIG_TQM855L is not set
+# CONFIG_TQM860L is not set
+# CONFIG_FPS850L is not set
+# CONFIG_TQM860 is not set
+# CONFIG_SPD823TS is not set
+# CONFIG_MBX is not set
+# CONFIG_WINCEPT is not set
+CONFIG_TQM8xxL=y
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_SASH=y
+CONFIG_SASH_PATH="/bin/sash"
+
+#
+# General setup
+#
+# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_PCI is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+
+#
+#
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_NCR885E is not set
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# 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=32
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+CONFIG_FLASH=y
+CONFIG_AMD_FLASH=y
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS 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_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_EXT2_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC8xx CPM Options
+#
+CONFIG_SCC_ENET=y
+# CONFIG_SCC1_ENET is not set
+CONFIG_SCC2_ENET=y
+# CONFIG_SCC3_ENET is not set
+# CONFIG_FEC_ENET is not set
+CONFIG_ENET_BIG_BUFFERS=y
+CONFIG_8xxSMC2=y
+CONFIG_8xx_ALTSMC2=y
+# CONFIG_8xx_CONS_SMC2 is not set
+# CONFIG_8xxSCC is not set
+
+#
+# Generic MPC8xx Options
+#
+CONFIG_8xx_COPYBACK=y
+# CONFIG_8xx_CPU6 is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/TQM850L_defconfig linux/arch/ppc/configs/TQM850L_defconfig
--- v2.4.2/linux/arch/ppc/configs/TQM850L_defconfig Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/configs/TQM850L_defconfig Sat Mar 3 10:52:13 2001
@@ -0,0 +1,419 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+# CONFIG_6xx is not set
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8260 is not set
+CONFIG_8xx=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_RPXLITE is not set
+# CONFIG_RPXCLASSIC is not set
+# CONFIG_BSEIP is not set
+# CONFIG_TQM823L is not set
+CONFIG_TQM850L=y
+# CONFIG_TQM855L is not set
+# CONFIG_TQM860L is not set
+# CONFIG_FPS850L is not set
+# CONFIG_TQM860 is not set
+# CONFIG_SPD823TS is not set
+# CONFIG_MBX is not set
+# CONFIG_WINCEPT is not set
+CONFIG_TQM8xxL=y
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_SASH=y
+CONFIG_SASH_PATH="/bin/sash"
+
+#
+# General setup
+#
+# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_PCI is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+
+#
+#
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_NCR885E is not set
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# 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=32
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+CONFIG_FLASH=y
+CONFIG_AMD_FLASH=y
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS 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_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_EXT2_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC8xx CPM Options
+#
+CONFIG_SCC_ENET=y
+# CONFIG_SCC1_ENET is not set
+CONFIG_SCC2_ENET=y
+# CONFIG_SCC3_ENET is not set
+# CONFIG_FEC_ENET is not set
+CONFIG_ENET_BIG_BUFFERS=y
+CONFIG_8xxSMC2=y
+CONFIG_8xx_ALTSMC2=y
+# CONFIG_8xx_CONS_SMC2 is not set
+# CONFIG_8xxSCC is not set
+
+#
+# Generic MPC8xx Options
+#
+CONFIG_8xx_COPYBACK=y
+CONFIG_8xx_CPU6=y
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/TQM860L_defconfig linux/arch/ppc/configs/TQM860L_defconfig
--- v2.4.2/linux/arch/ppc/configs/TQM860L_defconfig Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/configs/TQM860L_defconfig Sat Mar 3 10:52:13 2001
@@ -0,0 +1,419 @@
+#
+# Automatically generated make config: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+# CONFIG_6xx is not set
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8260 is not set
+CONFIG_8xx=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_RPXLITE is not set
+# CONFIG_RPXCLASSIC is not set
+# CONFIG_BSEIP is not set
+# CONFIG_TQM823L is not set
+# CONFIG_TQM850L is not set
+# CONFIG_TQM855L is not set
+CONFIG_TQM860L=y
+# CONFIG_FPS850L is not set
+# CONFIG_TQM860 is not set
+# CONFIG_SPD823TS is not set
+# CONFIG_MBX is not set
+# CONFIG_WINCEPT is not set
+CONFIG_TQM8xxL=y
+# CONFIG_ALL_PPC is not set
+# CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_MATH_EMULATION=y
+CONFIG_SASH=y
+CONFIG_SASH_PATH="/bin/sash"
+
+#
+# General setup
+#
+# CONFIG_ISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_PCI is not set
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_ROUTER is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_ALIAS is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+
+#
+#
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+# CONFIG_NCR885E is not set
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_YELLOWFIN is not set
+# CONFIG_ACENIC is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# 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=32
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+CONFIG_FLASH=y
+CONFIG_AMD_FLASH=y
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS 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_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_EXT2_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# MPC8xx CPM Options
+#
+CONFIG_SCC_ENET=y
+CONFIG_SCC1_ENET=y
+# CONFIG_SCC2_ENET is not set
+# CONFIG_SCC3_ENET is not set
+# CONFIG_FEC_ENET is not set
+CONFIG_ENET_BIG_BUFFERS=y
+CONFIG_8xxSMC2=y
+# CONFIG_8xx_ALTSMC2 is not set
+# CONFIG_8xx_CONS_SMC2 is not set
+# CONFIG_8xxSCC is not set
+
+#
+# Generic MPC8xx Options
+#
+CONFIG_8xx_COPYBACK=y
+# CONFIG_8xx_CPU6 is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/configs/common_defconfig linux/arch/ppc/configs/common_defconfig
--- v2.4.2/linux/arch/ppc/configs/common_defconfig Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/configs/common_defconfig Sun Mar 4 14:30:18 2001
@@ -295,11 +295,11 @@
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
-CONFIG_SCSI_AIC7XXX=y
-# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_PROC_STATS=y
-CONFIG_AIC7XXX_RESET_DELAY=15
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_SCSI_AIC7XXX_OLD=m
+# CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT is not set
+CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_OLD_PROC_STATS=y
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/defconfig linux/arch/ppc/defconfig
--- v2.4.2/linux/arch/ppc/defconfig Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/defconfig Sun Mar 4 14:30:18 2001
@@ -296,10 +296,9 @@
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
CONFIG_SCSI_AIC7XXX=y
-# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_PROC_STATS=y
-CONFIG_AIC7XXX_RESET_DELAY=15
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
+CONFIG_AIC7XXX_RESET_DELAY=15000
+# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/Makefile linux/arch/ppc/kernel/Makefile
--- v2.4.2/linux/arch/ppc/kernel/Makefile Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/Makefile Sat Mar 3 10:52:13 2001
@@ -70,6 +70,7 @@
include $(TOPDIR)/Rules.make
+entry.o: entry.S ppc_defs.h
head.o: head.S ppc_defs.h
head_4xx.o: head_4xx.S ppc_defs.h
head_8xx.o: head_8xx.S ppc_defs.h
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/chrp_pci.c linux/arch/ppc/kernel/chrp_pci.c
--- v2.4.2/linux/arch/ppc/kernel/chrp_pci.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/chrp_pci.c Sat Mar 3 10:52:13 2001
@@ -298,8 +298,9 @@
bus->resource[1] = &gg2_resources.pci_mem;
}
-static void process_bridge_ranges(struct pci_controller *hose,
- struct device_node *dev, int index)
+/* this is used by the pmac_pci code too... - paulus */
+void process_bridge_ranges(struct pci_controller *hose,
+ struct device_node *dev, int primary)
{
unsigned int *ranges;
int rlen = 0;
@@ -316,31 +317,34 @@
break;
hose->io_base_phys = ranges[3];
hose->io_base_virt = ioremap(ranges[3], ranges[5]);
- if (index == 0) {
+ if (primary)
isa_io_base = (unsigned long) hose->io_base_virt;
- printk("isa_io_base=%lx\n", isa_io_base);
- }
res = &hose->io_resource;
res->flags = IORESOURCE_IO;
+ res->start = ranges[2];
break;
case 2: /* memory space */
- if (index == 0 && ranges[1] == 0 && ranges[2] == 0){
- isa_mem_base = ranges[3];
- printk("isa_mem_base=%lx\n", isa_mem_base);
+ memno = 0;
+ if (ranges[1] == 0 && ranges[2] == 0
+ && ranges[5] <= (16 << 20)) {
+ /* 1st 16MB, i.e. ISA memory area */
+ if (primary)
+ isa_mem_base = ranges[3];
+ memno = 1;
}
- if (memno == 0) {
+ while (memno < 3 && hose->mem_resources[memno].flags)
+ ++memno;
+ if (memno == 0)
hose->pci_mem_offset = ranges[3] - ranges[2];
- printk("pci_mem_offset=%lx for this bridge\n",
- hose->pci_mem_offset);
+ if (memno < 3) {
+ res = &hose->mem_resources[memno];
+ res->flags = IORESOURCE_MEM;
+ res->start = ranges[3];
}
- res = &hose->mem_resources[memno];
- res->flags = IORESOURCE_MEM;
- ++memno;
break;
}
if (res != NULL) {
res->name = dev->full_name;
- res->start = ranges[3];
res->end = res->start + ranges[5] - 1;
res->parent = NULL;
res->sibling = NULL;
@@ -401,7 +405,7 @@
hose->cfg_addr = (volatile unsigned int *) cfg;
hose->cfg_data = cfg + 0x10;
- process_bridge_ranges(hose, dev, index);
+ process_bridge_ranges(hose, dev, index == 0);
#ifdef CONFIG_POWER3
openpic_setup_ISU(index, opprop[index+1]);
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c
--- v2.4.2/linux/arch/ppc/kernel/chrp_setup.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/chrp_setup.c Sat Mar 3 10:52:13 2001
@@ -237,7 +237,6 @@
void __init
chrp_setup_arch(void)
{
- extern char cmd_line[];
struct device_node *device;
/* init to some ~sane value until calibrate_delay() runs */
@@ -252,7 +251,6 @@
else
#endif
ROOT_DEV = to_kdev_t(0x0802); /* sda2 (sda1 is for the kernel) */
- printk("Boot arguments: %s\n", cmd_line);
/* Lookup PCI host bridges */
chrp_find_bridges();
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S
--- v2.4.2/linux/arch/ppc/kernel/head.S Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/head.S Sat Mar 3 10:52:13 2001
@@ -1135,7 +1135,7 @@
#ifdef CONFIG_APUS
/*
* On APUS the physical base address of the kernel is not known at compile
- * time, which means the __pa/__va constants used are incorect. In the
+ * time, which means the __pa/__va constants used are incorrect. In the
* __init section is recorded the virtual addresses of instructions using
* these constants, so all that has to be done is fix these before
* continuing the kernel boot.
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/head_8xx.S linux/arch/ppc/kernel/head_8xx.S
--- v2.4.2/linux/arch/ppc/kernel/head_8xx.S Sun Sep 17 09:48:06 2000
+++ linux/arch/ppc/kernel/head_8xx.S Sat Mar 3 10:52:14 2001
@@ -968,26 +968,6 @@
SYNC
blr
-/* Jump into the system reset for the rom.
- * We first disable the MMU, and then jump to the ROM reset address.
- *
- * r3 is the board info structure, r4 is the location for starting.
- * I use this for building a small kernel that can load other kernels,
- * rather than trying to write or rely on a rom monitor that can tftp load.
- */
- .globl m8xx_gorom
-m8xx_gorom:
- li r5,MSR_KERNEL & ~(MSR_IR|MSR_DR)
- lis r6,2f@h
- addis r6,r6,-KERNELBASE@h
- ori r6,r6,2f@l
- mtspr SRR0,r6
- mtspr SRR1,r5
- rfi
-2:
- mtlr r4
- blr
-
#ifdef CONFIG_8xx_CPU6
/* It's here because it is unique to the 8xx.
* It is important we get called with interrupts disabled. I used to
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/irq.c linux/arch/ppc/kernel/irq.c
--- v2.4.2/linux/arch/ppc/kernel/irq.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/irq.c Sat Mar 3 10:52:14 2001
@@ -7,8 +7,8 @@
* Copyright (C) 1992 Linus Torvalds
* Adapted from arch/i386 by Gary Thomas
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
- * Updated and modified by Cort Dougan (cort@cs.nmt.edu)
- * Copyright (C) 1996 Cort Dougan
+ * Updated and modified by Cort Dougan
+ * Copyright (C) 1996-2001 Cort Dougan
* Adapted for Power Macintosh by Paul Mackerras
* Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
* Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
@@ -258,7 +258,10 @@
retval = setup_irq(irq, action);
if (retval)
+ {
kfree(action);
+ return retval;
+ }
return 0;
}
@@ -464,13 +467,11 @@
ppc_spurious_interrupts++;
printk(KERN_DEBUG "Unhandled interrupt %x, disabled\n", irq);
/* We can't call disable_irq here, it would deadlock */
- if (!desc->depth)
- desc->depth = 1;
+ ++desc->depth;
desc->status |= IRQ_DISABLED;
- /* This is not a real spurrious interrupt, we
- * have to eoi it, so we jump to out
- */
mask_irq(irq);
+ /* This is a real interrupt, we have to eoi it,
+ so we jump to out */
goto out;
}
status &= ~IRQ_PENDING; /* we commit to handling */
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/m8260_setup.c linux/arch/ppc/kernel/m8260_setup.c
--- v2.4.2/linux/arch/ppc/kernel/m8260_setup.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/m8260_setup.c Sat Mar 3 10:52:14 2001
@@ -85,10 +85,6 @@
void __init
m8260_setup_arch(void)
{
- extern char cmd_line[];
-
- printk("Boot arguments: %s\n", cmd_line);
-
/* Reset the Communication Processor Module.
*/
m8260_cpm_reset();
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/m8xx_setup.c linux/arch/ppc/kernel/m8xx_setup.c
--- v2.4.2/linux/arch/ppc/kernel/m8xx_setup.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/m8xx_setup.c Sat Mar 3 10:52:14 2001
@@ -32,6 +32,7 @@
#include
#include
#include
+#include /* Before ide.h to avoid warning: `MAX_HWIFS' redefined */
#include
#include
@@ -41,7 +42,6 @@
#include
#include
#include
-#include
#include
#include
@@ -52,19 +52,65 @@
unsigned long m8xx_get_rtc_time(void);
void m8xx_calibrate_decr(void);
-#if 0
-extern int mackbd_setkeycode(unsigned int scancode, unsigned int keycode);
-extern int mackbd_getkeycode(unsigned int scancode);
-extern int mackbd_pretranslate(unsigned char scancode, char raw_mode);
-extern int mackbd_translate(unsigned char scancode, unsigned char *keycode,
- char raw_mode);
-extern char mackbd_unexpected_up(unsigned char keycode);
-extern void mackbd_leds(unsigned char leds);
-extern void mackbd_init_hw(void);
-#endif
-
unsigned char __res[sizeof(bd_t)];
unsigned long empty_zero_page[1024];
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
+#include "../../../drivers/ide/ide_modes.h"
+
+static void m8xx_ide_tuneproc(ide_drive_t *drive, byte pio);
+
+typedef struct ide_ioport_desc {
+ unsigned long base_off; /* Offset to PCMCIA memory */
+ ide_ioreg_t reg_off[IDE_NR_PORTS]; /* controller reg. offsets */
+ int irq; /* IRQ */
+} ide_ioport_desc_t;
+
+ide_ioport_desc_t ioport_dsc[MAX_HWIFS] = {
+#ifdef IDE0_BASE_OFFSET
+ { IDE0_BASE_OFFSET,
+ {
+ IDE0_DATA_REG_OFFSET,
+ IDE0_ERROR_REG_OFFSET,
+ IDE0_NSECTOR_REG_OFFSET,
+ IDE0_SECTOR_REG_OFFSET,
+ IDE0_LCYL_REG_OFFSET,
+ IDE0_HCYL_REG_OFFSET,
+ IDE0_SELECT_REG_OFFSET,
+ IDE0_STATUS_REG_OFFSET,
+ IDE0_CONTROL_REG_OFFSET,
+ IDE0_IRQ_REG_OFFSET,
+ },
+ IDE0_INTERRUPT,
+ },
+# ifdef IDE1_BASE_OFFSET
+ { IDE1_BASE_OFFSET,
+ {
+ IDE1_DATA_REG_OFFSET,
+ IDE1_ERROR_REG_OFFSET,
+ IDE1_NSECTOR_REG_OFFSET,
+ IDE1_SECTOR_REG_OFFSET,
+ IDE1_LCYL_REG_OFFSET,
+ IDE1_HCYL_REG_OFFSET,
+ IDE1_SELECT_REG_OFFSET,
+ IDE1_STATUS_REG_OFFSET,
+ IDE1_CONTROL_REG_OFFSET,
+ IDE1_IRQ_REG_OFFSET,
+ },
+ IDE1_INTERRUPT,
+ },
+# endif /* IDE1_BASE_OFFSET */
+#endif /* IDE0_BASE_OFFSET */
+};
+
+ide_pio_timings_t ide_pio_clocks[6];
+
+/* Make clock cycles and always round up */
+#define PCMCIA_MK_CLKS( t, T ) (( (t) * (T) + 999U ) / 1000U )
+
+#endif /* CONFIG_BLK_DEV_MPC8xx_IDE */
+#endif /* CONFIG_BLK_DEV_IDE || CONFIG_BLK_DEV_IDE_MODULE */
#ifdef CONFIG_BLK_DEV_RAM
extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
@@ -77,6 +123,8 @@
extern unsigned long find_available_memory(void);
extern void m8xx_cpm_reset(uint);
+static void ide_interrupt_handler(void* dev_id);
+
void __init adbdev_init(void)
{
}
@@ -85,12 +133,9 @@
m8xx_setup_arch(void)
{
int cpm_page;
- extern char cmd_line[];
cpm_page = (int) alloc_bootmem_pages(PAGE_SIZE);
- printk("Boot arguments: %s\n", cmd_line);
-
/* Reset the Communication Processor Module.
*/
m8xx_cpm_reset(cpm_page);
@@ -137,7 +182,7 @@
*/
void timebase_interrupt(int irq, void * dev, struct pt_regs * regs)
{
- printk("timebase_interrupt()\n");
+ printk ("timebase_interrupt()\n");
}
/* The decrementer counts at the system (internal) clock frequency divided by
@@ -164,7 +209,7 @@
fp = (binfo->bi_intfreq * 1000000) / 16;
freq = fp*60; /* try to make freq/1e6 an integer */
divisor = 60;
- printk("time_init: decrementer frequency = %d/%d\n", freq, divisor);
+ printk("Decrementer Frequency = %d/%d\n", freq, divisor);
tb_ticks_per_jiffy = freq / HZ / divisor;
tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
@@ -232,9 +277,21 @@
void
m8xx_restart(char *cmd)
{
- extern void m8xx_gorom(void);
+ __volatile__ unsigned char dummy;
+ uint msr;
- m8xx_gorom();
+ cli();
+ ((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr |= 0x00000080;
+
+ /* Clear the ME bit in MSR to cause checkstop on machine check
+ */
+ __asm__("mfmsr %0" : "=r" (msr) );
+ msr &= ~0x1000;
+ __asm__("mtmsr %0" : : "r" (msr) );
+
+ dummy = ((immap_t *)IMAP_ADDR)->im_clkrst.res[0];
+ printk("Restart failed\n");
+ while(1);
}
void
@@ -257,8 +314,8 @@
bp = (bd_t *)__res;
- len += sprintf(len+buffer,"clock\t\t: %dMHz\n"
- "bus clock\t: %dMHz\n",
+ len += sprintf(len+buffer,"clock\t\t: %ldMHz\n"
+ "bus clock\t: %ldMHz\n",
bp->bi_intfreq /*/ 1000000*/,
bp->bi_busfreq /*/ 1000000*/);
@@ -298,17 +355,13 @@
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-/* Define this to make a PCMCIA ATA Flash card work.
-*/
-#define ATA_FLASH 1
-
/*
* IDE stuff.
*/
void
m8xx_ide_insw(ide_ioreg_t port, void *buf, int ns)
{
-#ifdef ATA_FLASH
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
ide_insw(port, buf, ns);
#else
ide_insw(port+_IO_BASE, buf, ns);
@@ -318,7 +371,7 @@
void
m8xx_ide_outsw(ide_ioreg_t port, void *buf, int ns)
{
-#ifdef ATA_FLASH
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
ide_outsw(port, buf, ns);
#else
ide_outsw(port+_IO_BASE, buf, ns);
@@ -328,8 +381,11 @@
int
m8xx_ide_default_irq(ide_ioreg_t base)
{
-#ifdef ATA_FLASH
- return PCMCIA_INTERRUPT;
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
+ if (base >= MAX_HWIFS)
+ return 0;
+
+ return (ioport_dsc[base].irq);
#else
return 14;
#endif
@@ -348,60 +404,105 @@
const char *device,
void *dev_id)
{
-#ifdef ATA_FLASH
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
return request_8xxirq(irq, handler, flags, device, dev_id);
#else
return request_irq(irq, handler, flags, device, dev_id);
#endif
}
-/* We can use an external IDE controller or wire the IDE interface to
- * the internal PCMCIA controller.
+/* We can use an external IDE controller
+ * or wire the IDE interface to the internal PCMCIA controller.
+ *
+ * See include/linux/ide.h for definition of hw_regs_t (p, base)
*/
-void __init m8xx_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+void m8xx_ide_init_hwif_ports(hw_regs_t *hw,
+ ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
{
- ide_ioreg_t port = base;
+ ide_ioreg_t *p = hw->io_ports;
int i;
-#ifdef ATA_FLASH
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
volatile pcmconf8xx_t *pcmp;
+
+ static unsigned long pcmcia_base = 0;
+#else
+ ide_ioreg_t port = data_port; /* ??? XXX ??? XXX */
#endif
+ unsigned long base;
-#ifdef ATA_FLASH
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
*p = 0;
- *irq = 0;
+ if (irq)
+ *irq = 0;
+
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)IMAP_ADDR)->im_pcmcia));
- if (base != 0) /* Only map the first ATA flash drive */
+ if (!pcmcia_base) {
+ /* relies PCMCIA registers being set up by firmware */
+ pcmcia_base = (unsigned long) ioremap(PCMCIA_MEM_ADDR,
+ PCMCIA_MEM_SIZE);
+
+ /* Compute clock cycles for PIO timings */
+ for (i=0; i<6; ++i) {
+ bd_t *binfo = (bd_t *)__res;
+
+ ide_pio_clocks[i].hold_time =
+ PCMCIA_MK_CLKS (ide_pio_timings[i].hold_time,
+ binfo->bi_busfreq);
+ ide_pio_clocks[i].setup_time =
+ PCMCIA_MK_CLKS (ide_pio_timings[i].setup_time,
+ binfo->bi_busfreq);
+ ide_pio_clocks[i].active_time =
+ PCMCIA_MK_CLKS (ide_pio_timings[i].active_time,
+ binfo->bi_busfreq);
+ ide_pio_clocks[i].cycle_time =
+ PCMCIA_MK_CLKS (ide_pio_timings[i].cycle_time,
+ binfo->bi_busfreq);
+#if 0
+ printk ("PIO mode %d timings: %d/%d/%d => %d/%d/%d\n",
+ i,
+ ide_pio_clocks[i].setup_time,
+ ide_pio_clocks[i].active_time,
+ ide_pio_clocks[i].hold_time,
+ ide_pio_clocks[i].cycle_time,
+ ide_pio_timings[i].setup_time,
+ ide_pio_timings[i].active_time,
+ ide_pio_timings[i].hold_time,
+ ide_pio_timings[i].cycle_time);
+#endif
+ }
+ }
+
+ if (data_port >= MAX_HWIFS)
return;
- pcmp = (pcmconf8xx_t *)(&(((immap_t *)IMAP_ADDR)->im_pcmcia));
+ base = pcmcia_base + ioport_dsc[data_port].base_off;
+
+# if (!defined(CONFIG_SPD823TS) && !defined(CONFIG_IVMS8))
+ /* SPD823TS and IVMS8 have a direct connection */
if (pcmp->pcmc_pipr & 0x18000000)
return; /* No card in slot */
+# endif /* CONFIG_SPD823TS, CONFIG_IVMS8 */
- base = (unsigned long) ioremap(PCMCIA_MEM_ADDR, 0x200);
+ for (i = 0; i < IDE_NR_PORTS; ++i) {
+ *p++ = base + ioport_dsc[data_port].reg_off[i];
+ }
- /* For the M-Systems ATA card, the first 8 registers map 1:1.
- * The following register, control/Altstatus, is located at 0x0e.
- * Following that, the irq offset, is not used, so we place it in
- * an unused location, 0x0a.
- */
- *p++ = base + 8;
- for (i = 1; i < 8; ++i)
- *p++ = base + i;
- *p++ = base + 0x0e; /* control/altstatus */
- *p = base + 0x0a; /* IRQ, not used */
- if (irq)
- *irq = PCMCIA_INTERRUPT;
+ if (irq) {
+ *irq = ioport_dsc[data_port].irq;
+ }
- /* Configure the interface for this interrupt.
- */
- pcmp->pcmc_pgcra = (mk_int_int_mask(PCMCIA_INTERRUPT) << 24) |
- (mk_int_int_mask(PCMCIA_INTERRUPT) << 16);
+ /* register routine to tune PIO mode */
+ ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc;
- /* Enable status change interrupt from slot A.
- */
- pcmp->pcmc_per = 0xff100000;
- pcmp->pcmc_pscr = ~0;
-#else
+ /* Enable Harddisk Interrupt,
+ * and make it edge sensitive
+ */
+ hw->ack_intr = (ide_ack_intr_t *)ide_interrupt_handler;
+ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel |=
+ (0x80000000 >> ioport_dsc[data_port].irq);
+
+#else /* ! CONFIG_BLK_DEV_MPC8xx_IDE */
/* Just a regular IDE drive on some I/O port.
*/
@@ -411,10 +512,84 @@
*p++ = base + 0x206;
if (irq != NULL)
*irq = 0;
-#endif
+#endif /* CONFIG_BLK_DEV_MPC8xx_IDE */
}
+#endif /* CONFIG_BLK_DEV_IDE || CONFIG_BLK_DEV_IDE_MODULE */
+
+
+/* -------------------------------------------------------------------- */
+
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
+
+/* PCMCIA Timing */
+#ifndef PCMCIA_SHT
+#define PCMCIA_SHT(t) ((t & 0x0F)<<16) /* Strobe Hold Time */
+#define PCMCIA_SST(t) ((t & 0x0F)<<12) /* Strobe Setup Time */
+#define PCMCIA_SL(t) ((t==32) ? 0 : ((t & 0x1F)<<7)) /* Strobe Length */
#endif
+
+/* Calculate PIO timings */
+static void
+m8xx_ide_tuneproc(ide_drive_t *drive, byte pio)
+{
+ volatile pcmconf8xx_t *pcmp;
+ ide_pio_data_t d;
+ ulong timing, mask, reg;
+
+ pio = ide_get_best_pio_mode(drive, pio, 4, &d);
+
+#if 1
+ printk("%s[%d] %s: best PIO mode: %d\n",
+ __FILE__,__LINE__,__FUNCTION__, pio);
+#endif
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)IMAP_ADDR)->im_pcmcia));
+
+ mask = ~(PCMCIA_SHT(0xFF) | PCMCIA_SST(0xFF) | PCMCIA_SL(0xFF));
+
+ timing = PCMCIA_SHT(ide_pio_clocks[pio].hold_time )
+ | PCMCIA_SST(ide_pio_clocks[pio].setup_time )
+ | PCMCIA_SL (ide_pio_clocks[pio].active_time)
+ ;
+
+#if 1
+ printk ("Setting timing bits 0x%08lx in PCMCIA controller\n", timing);
+#endif
+ if ((reg = pcmp->pcmc_por0 & mask) != 0)
+ pcmp->pcmc_por0 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por1 & mask) != 0)
+ pcmp->pcmc_por1 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por2 & mask) != 0)
+ pcmp->pcmc_por2 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por3 & mask) != 0)
+ pcmp->pcmc_por3 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por4 & mask) != 0)
+ pcmp->pcmc_por4 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por5 & mask) != 0)
+ pcmp->pcmc_por5 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por6 & mask) != 0)
+ pcmp->pcmc_por6 = reg | timing;
+
+ if ((reg = pcmp->pcmc_por7 & mask) != 0)
+ pcmp->pcmc_por7 = reg | timing;
+}
+
+void ide_interrupt_handler (void *dev)
+{
+}
+
+#endif /* CONFIG_BLK_DEV_MPC8xx_IDE */
+#endif /* CONFIG_BLK_DEV_IDE || CONFIG_BLK_DEV_IDE_MODULE */
+
+/* -------------------------------------------------------------------- */
+
void __init
m8xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
@@ -490,7 +665,6 @@
ppc_ide_md.default_io_base = m8xx_ide_default_io_base;
ppc_ide_md.fix_driveid = ppc_generic_ide_fix_driveid;
ppc_ide_md.ide_init_hwif = m8xx_ide_init_hwif_ports;
- ppc_ide_md.ide_request_irq = m8xx_ide_request_irq;
ppc_ide_md.io_base = _IO_BASE;
#endif
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/open_pic.c linux/arch/ppc/kernel/open_pic.c
--- v2.4.2/linux/arch/ppc/kernel/open_pic.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/open_pic.c Sat Mar 3 10:52:14 2001
@@ -42,6 +42,45 @@
OpenPIC_SourcePtr ISU[OPENPIC_MAX_ISU];
+/* Global Operations */
+static void openpic_disable_8259_pass_through(void);
+static u_int openpic_irq(void);
+static void openpic_eoi(void);
+static void openpic_set_priority(u_int pri);
+static void openpic_set_spurious(u_int vector);
+
+#ifdef CONFIG_SMP
+/* Interprocessor Interrupts */
+static void openpic_initipi(u_int ipi, u_int pri, u_int vector);
+static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs);
+#endif
+
+/* Timer Interrupts */
+static void openpic_inittimer(u_int timer, u_int pri, u_int vector);
+static void openpic_maptimer(u_int timer, u_int cpumask);
+
+/* Interrupt Sources */
+static void openpic_enable_irq(u_int irq);
+static void openpic_disable_irq(u_int irq);
+static void openpic_initirq(u_int irq, u_int pri, u_int vector, int polarity,
+ int is_level);
+static void openpic_mapirq(u_int irq, u_int cpumask);
+
+/*
+ * These functions are not used but the code is kept here
+ * for completeness and future reference.
+ */
+#ifdef notused
+static void openpic_reset(void);
+static void openpic_enable_8259_pass_through(void);
+static u_int openpic_get_priority(void);
+static u_int openpic_get_spurious(void);
+static void openpic_set_sense(u_int irq, int sense);
+#endif /* notused */
+
+/*
+ * Description of the openpic for the higher-level irq code
+ */
static void openpic_end_irq(unsigned int irq_nr);
static void openpic_ack_irq(unsigned int irq_nr);
static void openpic_set_affinity(unsigned int irq_nr, unsigned long cpumask);
@@ -370,17 +409,19 @@
#endif
}
-static inline void openpic_reset(void)
+#ifdef notused
+static void openpic_reset(void)
{
openpic_setfield(&OpenPIC->Global.Global_Configuration0,
OPENPIC_CONFIG_RESET);
}
-static inline void openpic_enable_8259_pass_through(void)
+static void openpic_enable_8259_pass_through(void)
{
openpic_clearfield(&OpenPIC->Global.Global_Configuration0,
OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE);
}
+#endif /* notused */
static void openpic_disable_8259_pass_through(void)
{
@@ -412,8 +453,8 @@
(void)openpic_read(&OpenPIC->THIS_CPU.EOI);
}
-
-static inline u_int openpic_get_priority(void)
+#ifdef notused
+static u_int openpic_get_priority(void)
{
DECL_THIS_CPU;
@@ -421,6 +462,7 @@
return openpic_readfield(&OpenPIC->THIS_CPU.Current_Task_Priority,
OPENPIC_CURRENT_TASK_PRIORITY_MASK);
}
+#endif /* notused */
static void openpic_set_priority(u_int pri)
{
@@ -435,11 +477,13 @@
/*
* Get/set the spurious vector
*/
-static inline u_int openpic_get_spurious(void)
+#ifdef notused
+static u_int openpic_get_spurious(void)
{
return openpic_readfield(&OpenPIC->Global.Spurious_Vector,
OPENPIC_VECTOR_MASK);
}
+#endif /* notused */
static void openpic_set_spurious(u_int vec)
{
@@ -604,21 +648,6 @@
static void openpic_enable_irq(u_int irq)
{
check_arg_irq(irq);
-
- /*
- * Never want to disable a timer or ipi irq
- * (only want to disable irqs within an ISU).
- */
- if (((irq >= OPENPIC_VEC_IPI+open_pic_irq_offset) &&
- (irq < OPENPIC_VEC_IPI+open_pic_irq_offset+OPENPIC_NUM_IPI)) ||
- ((irq >= OPENPIC_VEC_TIMER+open_pic_irq_offset) &&
- (irq < OPENPIC_VEC_TIMER+open_pic_irq_offset+OPENPIC_NUM_TIMERS)))
- {
- /* silently ignore the enable of the timer or ipi irq. */
- return;
- }
-
-
openpic_clearfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, OPENPIC_MASK);
/* make sure mask gets to controller before we return to user */
do {
@@ -632,19 +661,6 @@
u32 vp;
check_arg_irq(irq);
- /*
- * Never want to disable a timer or ipi irq
- * (only want to disable irqs within an ISU).
- */
- if (((irq >= OPENPIC_VEC_IPI+open_pic_irq_offset) &&
- (irq < OPENPIC_VEC_IPI+open_pic_irq_offset+OPENPIC_NUM_IPI)) ||
- ((irq >= OPENPIC_VEC_TIMER+open_pic_irq_offset) &&
- (irq < OPENPIC_VEC_TIMER+open_pic_irq_offset+OPENPIC_NUM_TIMERS)))
- {
- panic("openpic_disable_irq - disabling non-ISU irq");
- }
-
-
openpic_setfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, OPENPIC_MASK);
/* make sure mask gets to controller before we return to user */
do {
@@ -667,11 +683,13 @@
openpic_clearfield_IPI(&OpenPIC->Global.IPI_Vector_Priority(irq), OPENPIC_MASK);
}
+
void openpic_disable_ipi(u_int irq)
{
- /* NEVER disable an IPI... that's just plain wrong! */
+ irq -= (OPENPIC_VEC_IPI+open_pic_irq_offset);
+ check_arg_ipi(irq);
+ openpic_setfield_IPI(&OpenPIC->Global.IPI_Vector_Priority(irq), OPENPIC_MASK);
}
-
#endif
/*
@@ -702,39 +720,33 @@
openpic_write(&GET_ISU(irq).Destination, physmask);
}
+#ifdef notused
/*
* Set the sense for an interrupt source (and disable it!)
*
* sense: 1 for level, 0 for edge
*/
-static inline void openpic_set_sense(u_int irq, int sense)
+static void openpic_set_sense(u_int irq, int sense)
{
openpic_safe_writefield(&GET_ISU(irq).Vector_Priority,
OPENPIC_SENSE_LEVEL,
(sense ? OPENPIC_SENSE_LEVEL : 0));
}
+#endif /* notused */
/* No spinlocks, should not be necessary with the OpenPIC
* (1 register = 1 interrupt and we have the desc lock).
*/
static void openpic_ack_irq(unsigned int irq_nr)
{
-#if 1 /* masking should be unnecessary, but I still get spurrious */
openpic_disable_irq(irq_nr);
-#endif
- if ((irq_desc[irq_nr].status & IRQ_LEVEL) == 0)
- openpic_eoi();
+ openpic_eoi();
}
static void openpic_end_irq(unsigned int irq_nr)
{
- if ((irq_desc[irq_nr].status & IRQ_LEVEL) != 0)
- openpic_eoi();
-
-#if 1 /* masking should be unnecessary, but I still get spurrious */
if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
openpic_enable_irq(irq_nr);
-#endif
}
static void openpic_set_affinity(unsigned int irq_nr, unsigned long cpumask)
@@ -745,23 +757,11 @@
#ifdef CONFIG_SMP
static void openpic_ack_ipi(unsigned int irq_nr)
{
+ openpic_eoi();
}
static void openpic_end_ipi(unsigned int irq_nr)
{
- /* IPIs are marked IRQ_PER_CPU. This has the side effect of
- * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from
- * applying to them. We EOI them late to avoid re-entering.
- * however, I'm wondering if we could simply let them have the
- * SA_INTERRUPT flag and let them execute with all interrupts OFF.
- * This would have the side effect of either running cross-CPU
- * functions with interrupts off, or we can re-enable them explicitely
- * with a __sti() in smp_call_function_interrupt(), since
- * smp_call_function() is protected by a spinlock.
- * Or maybe we shouldn't set the IRQ_PER_CPU flag on cross-CPU
- * function calls IPI at all but that would make a special case.
- */
- openpic_eoi();
}
static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
@@ -791,8 +791,11 @@
irq = i8259_irq( smp_processor_id() );
openpic_eoi();
}
- if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset)
+ if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset) {
irq = -1;
+ /* That's not SMP safe ... but who cares ? */
+ ppc_spurious_interrupts++;
+ }
return irq;
}
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/open_pic_defs.h linux/arch/ppc/kernel/open_pic_defs.h
--- v2.4.2/linux/arch/ppc/kernel/open_pic_defs.h Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/open_pic_defs.h Sat Mar 3 10:52:14 2001
@@ -28,8 +28,6 @@
#ifdef __KERNEL__
-#include
-
/*
* OpenPIC supports up to 2048 interrupt sources and up to 32 processors
*/
@@ -288,40 +286,6 @@
/* Interrupt Source Registers */
#define Vector_Priority _Vector_Priority.Reg
#define Destination _Destination.Reg
-
- /*
- * Local (static) OpenPIC Operations
- */
-
-
-/* Global Operations */
-static void openpic_reset(void);
-static void openpic_enable_8259_pass_through(void);
-static void openpic_disable_8259_pass_through(void);
-static u_int openpic_irq(void);
-static void openpic_eoi(void);
-static u_int openpic_get_priority(void);
-static void openpic_set_priority(u_int pri);
-static u_int openpic_get_spurious(void);
-static void openpic_set_spurious(u_int vector);
-
-#ifdef CONFIG_SMP
-/* Interprocessor Interrupts */
-static void openpic_initipi(u_int ipi, u_int pri, u_int vector);
-static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs);
-#endif
-
-/* Timer Interrupts */
-static void openpic_inittimer(u_int timer, u_int pri, u_int vector);
-static void openpic_maptimer(u_int timer, u_int cpumask);
-
-/* Interrupt Sources */
-static void openpic_enable_irq(u_int irq);
-static void openpic_disable_irq(u_int irq);
-static void openpic_initirq(u_int irq, u_int pri, u_int vector, int polarity,
- int is_level);
-static void openpic_mapirq(u_int irq, u_int cpumask);
-static void openpic_set_sense(u_int irq, int sense);
#endif /* __KERNEL__ */
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/pci.c linux/arch/ppc/kernel/pci.c
--- v2.4.2/linux/arch/ppc/kernel/pci.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/pci.c Sat Mar 3 10:52:14 2001
@@ -109,7 +109,7 @@
struct resource *res = dev->resource + i;
if (!res->start)
continue;
- if (res->flags & IORESOURCE_MEM) {
+ if ((res->flags & IORESOURCE_MEM) && hose->pci_mem_offset) {
res->start += hose->pci_mem_offset;
res->end += hose->pci_mem_offset;
#ifdef DEBUG
@@ -121,7 +121,9 @@
if ((res->flags & IORESOURCE_IO)
&& (unsigned long) hose->io_base_virt != isa_io_base) {
- unsigned long offs = (unsigned long) hose->io_base_virt - isa_io_base;
+ unsigned long offs;
+
+ offs = (unsigned long)hose->io_base_virt - isa_io_base;
res->start += offs;
res->end += offs;
printk("Fixup IO res, dev: %x.%x, res_start: %lx->%lx\n",
@@ -245,13 +247,30 @@
}
}
+static inline void alloc_resource(struct pci_dev *dev, int idx)
+{
+ struct resource *pr, *r = &dev->resource[idx];
+
+ DBG("PCI:%x:%x:%x: Resource %08lx-%08lx (f=%lx)\n",
+ dev->bus->number, dev->devfn >> 3, dev->devfn & 7,
+ r->start, r->end, r->flags);
+ pr = pci_find_parent_resource(dev, r);
+ if (!pr || request_resource(pr, r) < 0) {
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d"
+ " of device %s\n", idx, dev->slot_name);
+ /* We'll assign a new address later */
+ r->end -= r->start;
+ r->start = 0;
+ }
+}
+
static void __init
pcibios_allocate_resources(int pass)
{
struct pci_dev *dev;
int idx, disabled;
u16 command;
- struct resource *r, *pr;
+ struct resource *r;
pci_for_each_dev(dev) {
pci_read_config_word(dev, PCI_COMMAND, &command);
@@ -259,7 +278,7 @@
r = &dev->resource[idx];
if (r->parent) /* Already allocated */
continue;
- if (!r->start) /* Address not assigned at all */
+ if (!r->start) /* Not assigned at all */
continue;
if (r->end == 0xffffffff) {
/* LongTrail OF quirk: unassigned */
@@ -273,28 +292,19 @@
disabled = !(command & PCI_COMMAND_IO);
else
disabled = !(command & PCI_COMMAND_MEMORY);
- if (pass == disabled) {
- DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
- r->start, r->end, r->flags, disabled, pass);
- pr = pci_find_parent_resource(dev, r);
- if (!pr || request_resource(pr, r) < 0) {
- printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, dev->slot_name);
- /* We'll assign a new address later */
- r->end -= r->start;
- r->start = 0;
- }
- }
+ if (pass == disabled)
+ alloc_resource(dev, idx);
}
- if (!pass) {
- r = &dev->resource[PCI_ROM_RESOURCE];
- if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
- /* Turn the ROM off, leave the resource region, but keep it unregistered. */
- u32 reg;
- DBG("PCI: Switching off ROM of %s\n", dev->slot_name);
- r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
- pci_read_config_dword(dev, dev->rom_base_reg, ®);
- pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
- }
+ if (pass)
+ continue;
+ r = &dev->resource[PCI_ROM_RESOURCE];
+ if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
+ /* Turn the ROM off, leave the resource region, but keep it unregistered. */
+ u32 reg;
+ DBG("PCI: Switching off ROM of %s\n", dev->slot_name);
+ r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
+ pci_read_config_dword(dev, dev->rom_base_reg, ®);
+ pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
}
}
}
@@ -315,17 +325,18 @@
for(idx=0; idx<6; idx++) {
r = &dev->resource[idx];
-
+#if 0 /* we don't need this PC-ism */
/*
* Don't touch IDE controllers and I/O ports of video cards!
*/
if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) ||
(class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO)))
continue;
+#endif
/*
* We shall assign a new address to this resource, either because
- * the BIOS forgot to do so or because we have decided the old
+ * the BIOS (sic) forgot to do so or because we have decided the old
* address was unusable for some reason.
*/
if (!r->start && r->end &&
@@ -572,7 +583,7 @@
{
struct pci_controller *hose;
struct pci_bus *bus;
- int next_busno;
+ int next_busno, i;
printk("PCI: Probing PCI hardware\n");
@@ -582,6 +593,17 @@
hose->first_busno = next_busno;
hose->last_busno = 0xff;
bus = pci_scan_bus(hose->first_busno, hose->ops, hose);
+ if (hose->io_resource.flags) {
+ unsigned long offs;
+
+ offs = (unsigned long)hose->io_base_virt - isa_io_base;
+ hose->io_resource.start += offs;
+ hose->io_resource.end += offs;
+ bus->resource[0] = &hose->io_resource;
+ }
+ for (i = 0; i < 3; ++i)
+ if (hose->mem_resources[i].flags)
+ bus->resource[i+1] = &hose->mem_resources[i];
hose->bus = bus;
hose->last_busno = bus->subordinate;
if (pci_assign_all_busses || next_busno <= hose->last_busno)
@@ -654,8 +676,20 @@
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
+ struct pci_controller *hose;
+
pci_read_bridge_bases(bus);
-
+
+ hose = pci_bus_to_hose(bus->number);
+
+ /* Apply pci_mem_offset to bridge mem resource */
+ if (hose->first_busno != bus->number)
+ if (bus->resource[1]->start && (bus->resource[1]->end != -1))
+ {
+ bus->resource[1]->start += hose->pci_mem_offset;
+ bus->resource[1]->end += hose->pci_mem_offset;
+ }
+
if ( ppc_md.pcibios_fixup_bus )
ppc_md.pcibios_fixup_bus(bus);
}
@@ -773,6 +807,32 @@
/* Obsolete functions. Should be removed once the symbios driver
* is fixed
*/
+unsigned long
+phys_to_bus(unsigned long pa)
+{
+ struct pci_controller *hose;
+ int i;
+
+ for (hose = hose_head; hose; hose = hose->next) {
+ for (i = 0; i < 3; ++i) {
+ if (pa >= hose->mem_resources[i].start
+ && pa <= hose->mem_resources[i].end) {
+ /*
+ * XXX the hose->pci_mem_offset really
+ * only applies to mem_resources[0].
+ * We need a way to store an offset for
+ * the others. -- paulus
+ */
+ if (i == 0)
+ pa -= hose->pci_mem_offset;
+ return pa;
+ }
+ }
+ }
+ /* hmmm, didn't find it */
+ return 0;
+}
+
unsigned long
pci_phys_to_bus(unsigned long pa, int busnr)
{
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/pmac_pci.c linux/arch/ppc/kernel/pmac_pci.c
--- v2.4.2/linux/arch/ppc/kernel/pmac_pci.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/pmac_pci.c Sat Mar 3 10:52:14 2001
@@ -29,6 +29,8 @@
#undef DEBUG
+extern void process_bridge_ranges(struct pci_controller *hose,
+ struct device_node *dev, int primary);
static void add_bridges(struct device_node *dev);
/* XXX Could be per-controller, but I don't think we risk anything by
@@ -372,7 +374,7 @@
(void)in_le32((volatile unsigned int *)bp->cfg_data);
}
-static void __init
+static int __init
setup_uninorth(struct pci_controller* hose, struct reg_property* addr)
{
pci_assign_all_busses = 1;
@@ -380,6 +382,7 @@
hose->ops = ¯isc_pci_ops;
hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
+#if 0 /* done in process_bridge_ranges now - paulus */
hose->io_base_phys = addr->address;
/* is 0x10000 enough for io space ? */
hose->io_base_virt = (void *)ioremap(addr->address, 0x10000);
@@ -389,6 +392,9 @@
*/
if (addr->address == 0xf2000000)
isa_io_base = (unsigned long)hose->io_base_virt;
+#endif
+ /* We "know" that the bridge at f2000000 has the PCI slots. */
+ return addr->address == 0xf2000000;
}
static void __init
@@ -399,8 +405,10 @@
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = (volatile unsigned char *)
ioremap(addr->address + 0xc00000, 0x1000);
+#if 0 /* done in process_bridge_ranges now - paulus */
hose->io_base_phys = addr->address;
hose->io_base_virt = (void *) ioremap(addr->address, 0x10000);
+#endif
init_bandit(hose);
}
@@ -413,19 +421,23 @@
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = (volatile unsigned char *)
ioremap(addr->address + 0xc00000, 0x1000);
+#if 0 /* done in process_bridge_ranges now - paulus */
hose->io_base_phys = addr->address;
hose->io_base_virt = (void *) ioremap(addr->address, 0x10000);
+#endif
}
void __init
setup_grackle(struct pci_controller *hose, unsigned io_space_size)
{
setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
+#if 0 /* done in process_bridge_ranges now - paulus */
hose->io_base_phys = 0xfe000000;
hose->io_base_virt = (void *) ioremap(0xfe000000, io_space_size);
pci_dram_offset = 0;
isa_mem_base = 0xfd000000;
isa_io_base = (unsigned long) hose->io_base_virt;
+#endif
if (machine_is_compatible("AAPL,PowerBook1998"))
grackle_set_loop_snoop(hose, 1);
#if 0 /* Disabled for now, HW problems ??? */
@@ -445,6 +457,7 @@
struct reg_property *addr;
char* disp_name;
int *bus_range;
+ int first = 1, primary;
for (; dev != NULL; dev = dev->next) {
addr = (struct reg_property *) get_property(dev, "reg", &len);
@@ -467,8 +480,9 @@
hose->last_busno = bus_range ? bus_range[1] : 0xff;
disp_name = NULL;
+ primary = first;
if (device_is_compatible(dev, "uni-north")) {
- setup_uninorth(hose, addr);
+ primary = setup_uninorth(hose, addr);
disp_name = "UniNorth";
} else if (strcmp(dev->name, "pci") == 0) {
/* XXX assume this is a mpc106 (grackle) */
@@ -480,6 +494,7 @@
} else if (strcmp(dev->name, "chaos") == 0) {
setup_chaos(hose, addr);
disp_name = "Chaos";
+ primary = 0;
}
printk(KERN_INFO "Found %s PCI host bridge at 0x%08x. Firmware bus number: %d->%d\n",
disp_name, addr->address, hose->first_busno, hose->last_busno);
@@ -488,12 +503,14 @@
hose, hose->cfg_addr, hose->cfg_data);
#endif
- /* Setup a default isa_io_base */
- if (isa_io_base == 0)
- isa_io_base = (unsigned long)hose->io_base_virt;
+ /* Interpret the "ranges" property */
+ /* This also maps the I/O region and sets isa_io/mem_base */
+ process_bridge_ranges(hose, dev, primary);
/* Fixup "bus-range" OF property */
fixup_bus_range(dev);
+
+ first &= !primary;
}
}
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/pmac_setup.c linux/arch/ppc/kernel/pmac_setup.c
--- v2.4.2/linux/arch/ppc/kernel/pmac_setup.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/pmac_setup.c Sat Mar 3 10:52:14 2001
@@ -81,7 +81,7 @@
extern int mackbd_getkeycode(unsigned int scancode);
extern int mackbd_translate(unsigned char keycode, unsigned char *keycodep,
char raw_mode);
-extern int mackbd_unexpected_up(unsigned char keycode);
+extern char mackbd_unexpected_up(unsigned char keycode);
extern void mackbd_leds(unsigned char leds);
extern void __init mackbd_init_hw(void);
extern int mac_hid_kbd_translate(unsigned char scancode, unsigned char *keycode,
@@ -253,6 +253,7 @@
#endif
+#ifdef CONFIG_VT
/*
* Dummy mksound function that does nothing.
* The real one is in the dmasound driver.
@@ -262,6 +263,7 @@
pmac_mksound(unsigned int hz, unsigned int ticks)
{
}
+#endif /* CONFIG_VT */
static volatile u32 *sysctrl_regs;
@@ -345,9 +347,9 @@
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
-
+#ifdef CONFIG_VT
kd_mksound = pmac_mksound;
-
+#endif
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/ppc8xx_pic.c linux/arch/ppc/kernel/ppc8xx_pic.c
--- v2.4.2/linux/arch/ppc/kernel/ppc8xx_pic.c Tue May 2 13:05:40 2000
+++ linux/arch/ppc/kernel/ppc8xx_pic.c Sat Mar 3 10:52:14 2001
@@ -153,6 +153,20 @@
irq += i8259_pic.irq_offset;
return (request_8xxirq(irq, handler, irqflags, devname, dev_id));
#else
- panic("request_irq");
+ /*
+ * Handle other "well-known" interrupts, but panic on unknown ones.
+ */
+ switch (irq) {
+#ifdef IDE0_INTERRUPT
+ case IDE0_INTERRUPT: /* fall through */
+#endif
+#ifdef IDE1_INTERRUPT
+ case IDE1_INTERRUPT: /* fall through */
+#endif
+ return (request_8xxirq(irq, handler, irqflags, devname, dev_id));
+
+ default: /* unknown IRQ -> panic */
+ panic("request_irq");
+ }
#endif
}
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/ppc_ksyms.c linux/arch/ppc/kernel/ppc_ksyms.c
--- v2.4.2/linux/arch/ppc/kernel/ppc_ksyms.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/ppc_ksyms.c Sat Mar 3 10:52:14 2001
@@ -46,6 +46,10 @@
#endif /* CONFIG_SMP */
#include
+#ifdef CONFIG_8xx
+#include "../8xx_io/commproc.h"
+#endif
+
/* Tell string.h we don't want memcpy etc. as cpp defines */
#define EXPORT_SYMTAB_STROPS
@@ -94,7 +98,7 @@
EXPORT_SYMBOL_NOVERS(pci_dram_offset);
#endif
EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
-EXPORT_SYMBOL(DMA_MODE_READ);
+EXPORT_SYMBOL_NOVERS(DMA_MODE_READ);
EXPORT_SYMBOL(DMA_MODE_WRITE);
#ifndef CONFIG_8xx
#if defined(CONFIG_ALL_PPC)
@@ -192,6 +196,9 @@
EXPORT_SYMBOL(giveup_altivec);
#endif /* CONFIG_ALTIVEC */
#ifdef CONFIG_SMP
+EXPORT_SYMBOL(global_irq_lock);
+EXPORT_SYMBOL(global_irq_count);
+EXPORT_SYMBOL(global_irq_holder);
EXPORT_SYMBOL(__global_cli);
EXPORT_SYMBOL(__global_sti);
EXPORT_SYMBOL(__global_save_flags);
@@ -242,11 +249,11 @@
EXPORT_SYMBOL(set_backlight_enable);
EXPORT_SYMBOL(register_backlight_controller);
#endif /* CONFIG_PMAC_BACKLIGHT */
-EXPORT_SYMBOL_NOVERS(sys_ctrler);
#ifndef CONFIG_MACH_SPECIFIC
EXPORT_SYMBOL_NOVERS(have_of);
#endif /* CONFIG_MACH_SPECIFIC */
#if defined(CONFIG_ALL_PPC)
+EXPORT_SYMBOL_NOVERS(sys_ctrler);
EXPORT_SYMBOL(find_devices);
EXPORT_SYMBOL(find_type_devices);
EXPORT_SYMBOL(find_compatible_devices);
@@ -280,7 +287,9 @@
#if defined(CONFIG_SCSI) && defined(CONFIG_ALL_PPC)
EXPORT_SYMBOL(note_scsi_host);
#endif
+#ifdef CONFIG_VT
EXPORT_SYMBOL(kd_mksound);
+#endif
#ifdef CONFIG_NVRAM
EXPORT_SYMBOL(nvram_read_byte);
EXPORT_SYMBOL(nvram_write_byte);
@@ -342,11 +351,18 @@
EXPORT_SYMBOL(debugger_fault_handler);
#endif
+#ifdef CONFIG_8xx
+EXPORT_SYMBOL(request_8xxirq);
+EXPORT_SYMBOL(cpm_install_handler);
+EXPORT_SYMBOL(cpm_free_handler);
+#endif /* CONFIG_8xx */
+
EXPORT_SYMBOL(ret_to_user_hook);
EXPORT_SYMBOL(do_softirq);
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context);
EXPORT_SYMBOL(mmu_context_overflow);
+EXPORT_SYMBOL_NOVERS(disarm_decr);
#if !defined(CONFIG_8xx) && !defined(CONFIG_4xx)
extern long *intercept_table;
EXPORT_SYMBOL(intercept_table);
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/prep_pci.c linux/arch/ppc/kernel/prep_pci.c
--- v2.4.2/linux/arch/ppc/kernel/prep_pci.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/prep_pci.c Sat Mar 3 10:52:14 2001
@@ -37,6 +37,10 @@
/* How is the 82378 PIRQ mapping setup? */
unsigned char *Motherboard_routes;
+void (*Motherboard_non0)(struct pci_dev *);
+
+void Powerplus_Map_Non0(struct pci_dev *);
+
/* Used for Motorola to store system config register */
static unsigned long *ProcInfo;
@@ -505,6 +509,52 @@
13 /* Line 4 */
};
+/* Motorola PowerPlus architecture PCI IRQ tables */
+/* Interrupt line values for INTA-D on primary/secondary MPIC inputs */
+
+struct powerplus_irq_list
+{
+ unsigned char primary[4]; /* INT A-D */
+ unsigned char secondary[4]; /* INT A-D */
+};
+
+/*
+ * For standard PowerPlus boards, bus 0 PCI INTs A-D are routed to
+ * OpenPIC inputs 9-12. PCI INTs A-D from the on board P2P bridge
+ * are routed to OpenPIC inputs 5-8. These values are offset by
+ * 16 in the table to reflect the Linux kernel interrupt value.
+ */
+struct powerplus_irq_list Powerplus_pci_IRQ_list =
+{
+ {25, 26, 27, 28},
+ {21, 22, 23, 24}
+};
+
+/*
+ * For the MCP750 (system slot board), cPCI INTs A-D are routed to
+ * OpenPIC inputs 8-11 and the PMC INTs A-D are routed to OpenPIC
+ * input 3. On a hot swap MCP750, the companion card PCI INTs A-D
+ * are routed to OpenPIC inputs 12-15. These values are offset by
+ * 16 in the table to reflect the Linux kernel interrupt value.
+ */
+struct powerplus_irq_list Mesquite_pci_IRQ_list =
+{
+ {24, 25, 26, 27},
+ {28, 29, 30, 31}
+};
+
+/*
+ * This table represents the standard PCI swizzle defined in the
+ * PCI bus specification.
+ */
+static unsigned char prep_pci_intpins[4][4] =
+{
+ { 1, 2, 3, 4}, /* Buses 0, 4, 8, ... */
+ { 2, 3, 4, 1}, /* Buses 1, 5, 9, ... */
+ { 3, 4, 1, 2}, /* Buses 2, 6, 10 ... */
+ { 4, 1, 2, 3}, /* Buses 3, 7, 11 ... */
+};
+
/* We have to turn on LEVEL mode for changed IRQ's */
/* All PCI IRQ's need to be level mode, so this should be something
* other than hard-coded as well... IRQ's are individually mappable
@@ -599,6 +649,7 @@
#define MOT_RAVEN_PRESENT 0x1
#define MOT_HAWK_PRESENT 0x2
+int mot_entry = -1;
int prep_keybd_present = 1;
int MotMPIC;
int mot_multi;
@@ -682,33 +733,36 @@
const char *name;
unsigned char *map;
unsigned char *routes;
+ void (*map_non0_bus)(struct pci_dev *); /* For boards with more than bus 0 devices. */
+ struct powerplus_irq_list *pci_irq_list; /* List of PCI MPIC inputs */
+ unsigned char secondary_bridge_devfn; /* devfn of secondary bus transparent bridge */
} mot_info[] = {
- {0x300, 0x00, 0x00, "MVME 2400", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x010, 0x00, 0x00, "Genesis", Genesis_pci_IRQ_map, Genesis_pci_IRQ_routes},
- {0x020, 0x00, 0x00, "Powerstack (Series E)", Comet_pci_IRQ_map, Comet_pci_IRQ_routes},
- {0x040, 0x00, 0x00, "Blackhawk (Powerstack)", Blackhawk_pci_IRQ_map, Blackhawk_pci_IRQ_routes},
- {0x050, 0x00, 0x00, "Omaha (PowerStack II Pro3000)", Omaha_pci_IRQ_map, Omaha_pci_IRQ_routes},
- {0x060, 0x00, 0x00, "Utah (Powerstack II Pro4000)", Utah_pci_IRQ_map, Utah_pci_IRQ_routes},
- {0x0A0, 0x00, 0x00, "Powerstack (Series EX)", Comet2_pci_IRQ_map, Comet2_pci_IRQ_routes},
- {0x1E0, 0xE0, 0x00, "Mesquite cPCI (MCP750)", Mesquite_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xE1, 0x00, "Sitka cPCI (MCPN750)", Sitka_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xE2, 0x00, "Mesquite cPCI (MCP750) w/ HAC", Mesquite_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF6, 0x80, "MTX Plus", MTXplus_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF6, 0x81, "Dual MTX Plus", MTXplus_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF7, 0x80, "MTX wo/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF7, 0x81, "Dual MTX wo/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF8, 0x80, "MTX w/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF8, 0x81, "Dual MTX w/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xF9, 0x00, "MVME 2300", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFA, 0x00, "MVME 2300SC/2600", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFB, 0x00, "MVME 2600 with MVME712M", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFC, 0x00, "MVME 2600/2700 with MVME761", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFD, 0x80, "MVME 3600 with MVME712M", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFD, 0x81, "MVME 4600 with MVME712M", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFE, 0x80, "MVME 3600 with MVME761", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFE, 0x81, "MVME 4600 with MVME761", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x1E0, 0xFF, 0x00, "MVME 1600-001 or 1600-011", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes},
- {0x000, 0x00, 0x00, "", NULL, NULL}
+ {0x300, 0x00, 0x00, "MVME 2400", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x010, 0x00, 0x00, "Genesis", Genesis_pci_IRQ_map, Genesis_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00},
+ {0x020, 0x00, 0x00, "Powerstack (Series E)", Comet_pci_IRQ_map, Comet_pci_IRQ_routes, NULL, NULL, 0x00},
+ {0x040, 0x00, 0x00, "Blackhawk (Powerstack)", Blackhawk_pci_IRQ_map, Blackhawk_pci_IRQ_routes, NULL, NULL, 0x00},
+ {0x050, 0x00, 0x00, "Omaha (PowerStack II Pro3000)", Omaha_pci_IRQ_map, Omaha_pci_IRQ_routes, NULL, NULL, 0x00},
+ {0x060, 0x00, 0x00, "Utah (Powerstack II Pro4000)", Utah_pci_IRQ_map, Utah_pci_IRQ_routes, NULL, NULL, 0x00},
+ {0x0A0, 0x00, 0x00, "Powerstack (Series EX)", Comet2_pci_IRQ_map, Comet2_pci_IRQ_routes, NULL, NULL, 0x00},
+ {0x1E0, 0xE0, 0x00, "Mesquite cPCI (MCP750)", Mesquite_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Mesquite_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xE1, 0x00, "Sitka cPCI (MCPN750)", Sitka_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xE2, 0x00, "Mesquite cPCI (MCP750) w/ HAC", Mesquite_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Mesquite_pci_IRQ_list, 0xC0},
+ {0x1E0, 0xF6, 0x80, "MTX Plus", MTXplus_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xA0},
+ {0x1E0, 0xF6, 0x81, "Dual MTX Plus", MTXplus_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xA0},
+ {0x1E0, 0xF7, 0x80, "MTX wo/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00},
+ {0x1E0, 0xF7, 0x81, "Dual MTX wo/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00},
+ {0x1E0, 0xF8, 0x80, "MTX w/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00},
+ {0x1E0, 0xF8, 0x81, "Dual MTX w/ Parallel Port", MTX_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00},
+ {0x1E0, 0xF9, 0x00, "MVME 2300", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFA, 0x00, "MVME 2300SC/2600", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFB, 0x00, "MVME 2600 with MVME712M", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFC, 0x00, "MVME 2600/2700 with MVME761", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFD, 0x80, "MVME 3600 with MVME712M", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00},
+ {0x1E0, 0xFD, 0x81, "MVME 4600 with MVME712M", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFE, 0x80, "MVME 3600 with MVME761", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFE, 0x81, "MVME 4600 with MVME761", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x1E0, 0xFF, 0x00, "MVME 1600-001 or 1600-011", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF},
+ {0x000, 0x00, 0x00, "", NULL, NULL, NULL, NULL, 0x00}
};
unsigned long __init prep_route_pci_interrupts(void)
@@ -723,7 +777,6 @@
unsigned char cpu_type;
unsigned char base_mod;
int entry;
- int mot_entry = -1;
cpu_type = inb(MOTOROLA_CPUTYPE_REG) & 0xF0;
base_mod = inb(MOTOROLA_BASETYPE_REG);
@@ -769,6 +822,7 @@
Motherboard_map_name = (unsigned char *)mot_info[mot_entry].name;
Motherboard_map = mot_info[mot_entry].map;
Motherboard_routes = mot_info[mot_entry].routes;
+ Motherboard_non0 = mot_info[mot_entry].map_non0_bus;
if (!(mot_info[entry].cpu_type & 0x100)) {
/* AJF adjust level/edge control according to routes */
@@ -836,6 +890,157 @@
}
void __init
+prep_pib_init(void)
+{
+unsigned char reg;
+unsigned short short_reg;
+
+struct pci_dev *dev = NULL;
+
+ if (( _prep_type == _PREP_Motorola) && (OpenPIC_Addr)) {
+ /*
+ * Perform specific configuration for the Via Tech or
+ * or Winbond PCI-ISA-Bridge part.
+ */
+ if ((dev = pci_find_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C586_1, dev))) {
+ /*
+ * PPCBUG does not set the enable bits
+ * for the IDE device. Force them on here.
+ */
+ pcibios_read_config_byte(dev->bus->number,
+ dev->devfn, 0x40, ®);
+
+ reg |= 0x03; /* IDE: Chip Enable Bits */
+ pcibios_write_config_byte(dev->bus->number,
+ dev->devfn, 0x40, reg);
+
+ /* Force correct IDE function interrupt */
+ dev->irq = 14;
+ pcibios_write_config_byte(dev->bus->number,
+ dev->devfn,
+ PCI_INTERRUPT_LINE,
+ dev->irq);
+
+ } else if ((dev = pci_find_device(PCI_VENDOR_ID_WINBOND,
+ PCI_DEVICE_ID_WINBOND_83C553, dev))) {
+ /*
+ * Clear the PCI Interrupt Routing Control Register.
+ */
+ short_reg = 0x0000;
+ pci_write_config_word(dev, 0x44, short_reg);
+ if (OpenPIC_Addr){
+ /*
+ * Route both IDE interrupts to IRQ 14
+ */
+ reg = 0xEE;
+ pci_write_config_byte(dev, 0x44, reg);
+ }
+ }
+ if ((dev = pci_find_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C586_2,
+ dev)))
+ {
+ /* Force correct USB function interrupt */
+ dev->irq = 11;
+ pcibios_write_config_byte(dev->bus->number,
+ dev->devfn,
+ PCI_INTERRUPT_LINE,
+ dev->irq);
+ }
+ }
+ if ((dev = pci_find_device(PCI_VENDOR_ID_WINBOND,
+ PCI_DEVICE_ID_WINBOND_82C105, dev))){
+ if (OpenPIC_Addr){
+ /* Disable LEGIRQ mode so PCI INTs are routed to
+ the 8259 */
+ printk("Set winbond IDE to native mode\n");
+ pci_write_config_dword(dev, 0x40, 0x10ff00a1);
+ }else{
+ /* Enable LEGIRQ for PCI INT -> 8259 IRQ routing */
+ pci_write_config_dword(dev, 0x40, 0x10ff08a1);
+ }
+ }
+}
+
+void
+Powerplus_Map_Non0(struct pci_dev *dev)
+{
+ struct pci_bus *pbus; /* Parent bus structure pointer */
+ struct pci_dev *tdev = dev; /* Temporary device structure */
+ unsigned int devnum; /* Accumulated device number */
+ unsigned char intline; /* Linux interrupt value */
+ unsigned char intpin; /* PCI interrupt pin */
+
+ /* Check for valid PCI dev pointer */
+ if (dev == NULL) return;
+
+ /* Initialize bridge IDSEL variable */
+ devnum = PCI_SLOT(tdev->devfn);
+
+ /* Read the interrupt pin of the device and adjust for indexing */
+ pcibios_read_config_byte(dev->bus->number, dev->devfn,
+ PCI_INTERRUPT_PIN, &intpin);
+
+ /* If device doesn't request an interrupt, return */
+ if ( (intpin < 1) || (intpin > 4) )
+ return;
+
+ intpin--;
+
+ /*
+ * Walk up to bus 0, adjusting the interrupt pin for the standard
+ * PCI bus swizzle.
+ */
+ do {
+ intpin = (prep_pci_intpins[devnum % 4][intpin]) - 1;
+ pbus = tdev->bus; /* up one level */
+ tdev = pbus->self;
+ devnum = PCI_SLOT(tdev->devfn);
+ } while(tdev->bus->number);
+
+ /* Use the primary interrupt inputs by default */
+ intline = mot_info[mot_entry].pci_irq_list->primary[intpin];
+
+ /*
+ * If the board has secondary interrupt inputs, walk the bus and
+ * note the devfn of the bridge from bus 0. If it is the same as
+ * the devfn of the bus bridge with secondary inputs, use those.
+ * Otherwise, assume it's a PMC site and get the interrupt line
+ * value from the interrupt routing table.
+ */
+ if (mot_info[mot_entry].secondary_bridge_devfn)
+ {
+ pbus = dev->bus;
+
+ while (pbus->primary != 0)
+ pbus = pbus->parent;
+
+ if ((pbus->self)->devfn != 0xA0)
+ {
+ if ((pbus->self)->devfn == mot_info[mot_entry].secondary_bridge_devfn)
+ intline = mot_info[mot_entry].pci_irq_list->secondary[intpin];
+ else
+ {
+ if ((char *)(mot_info[mot_entry].map) == (char *)Mesquite_pci_IRQ_map)
+ intline = mot_info[mot_entry].map[((pbus->self)->devfn)/8] + 16;
+ else
+ {
+ int i;
+ for (i=0;i<3;i++)
+ intpin = (prep_pci_intpins[devnum % 4][intpin]) - 1;
+ intline = mot_info[mot_entry].pci_irq_list->primary[intpin];
+ }
+ }
+ }
+ }
+
+ /* Write calculated interrupt value to header and device list */
+ dev->irq = intline;
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, (u8)dev->irq);
+}
+
+void __init
prep_pcibios_fixup(void)
{
struct pci_dev *dev;
@@ -849,11 +1054,21 @@
if (OpenPIC_Addr) {
/* PCI interrupts are controlled by the OpenPIC */
pci_for_each_dev(dev) {
- if (dev->bus->number == 0) {
+ if (dev->bus->number == 0)
+ {
dev->irq = openpic_to_irq(Motherboard_map[PCI_SLOT(dev->devfn)]);
- pcibios_write_config_byte(dev->bus->number, dev->devfn, PCI_INTERRUPT_PIN, dev->irq);
+ pcibios_write_config_byte(dev->bus->number, dev->devfn, PCI_INTERRUPT_LINE, dev->irq);
+ }
+ else
+ {
+ if (Motherboard_non0 != NULL)
+ Motherboard_non0(dev);
}
}
+
+ /* Setup the Winbond or Via PIB */
+ prep_pib_init();
+
return;
}
@@ -912,6 +1127,7 @@
hose->first_busno = 0;
hose->last_busno = 0xff;
hose->pci_mem_offset = PREP_ISA_MEM_BASE;
+ hose->io_base_virt = (void *)PREP_ISA_IO_BASE;
printk("PReP architecture\n");
{
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/prep_setup.c linux/arch/ppc/kernel/prep_setup.c
--- v2.4.2/linux/arch/ppc/kernel/prep_setup.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/prep_setup.c Sat Mar 3 10:52:14 2001
@@ -215,7 +215,6 @@
void __init
prep_setup_arch(void)
{
- extern char cmd_line[];
unsigned char reg;
#if 0 /* unused?? */
unsigned char ucMothMemType;
@@ -272,8 +271,6 @@
}
}
- printk("Boot arguments: %s\n", cmd_line);
-
#ifdef CONFIG_SOUND_CS4232
/*
* setup proper values for the cs4232 driver so we don't have
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/prom.c linux/arch/ppc/kernel/prom.c
--- v2.4.2/linux/arch/ppc/kernel/prom.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/prom.c Sat Mar 3 10:52:14 2001
@@ -757,8 +757,11 @@
setup_disp_fake_bi(RELOC(prom_disp_node));
#endif
- /* If OpenFirmware version >= 3, then use quiesce call */
- if (prom_version >= 3) {
+ /* If pmac, then use quiesce call. We can't rely on prom_version
+ * since some old iMacs appear to have an incorrect /openprom/model
+ * entry in the device tree
+ */
+ if (!chrp) {
prom_print(RELOC("Calling quiesce ...\n"));
call_prom(RELOC("quiesce"), 0, 0);
}
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/setup.c linux/arch/ppc/kernel/setup.c
--- v2.4.2/linux/arch/ppc/kernel/setup.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/setup.c Sat Mar 3 10:52:14 2001
@@ -386,8 +386,8 @@
if ( i )
len += sprintf(buffer+len, "\n");
len += sprintf(buffer+len,"total bogomips\t: %lu.%02lu\n",
- (bogosum+2500)/500000,
- (bogosum+2500)/5000 % 100);
+ (bogosum+2500)/(500000/HZ),
+ (bogosum+2500)/(5000/HZ) % 100);
#endif /* CONFIG_SMP */
/*
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/smp.c linux/arch/ppc/kernel/smp.c
--- v2.4.2/linux/arch/ppc/kernel/smp.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/smp.c Sat Mar 3 10:52:14 2001
@@ -100,14 +100,14 @@
#define PSURGE_QUAD_CKSTOP_RDBK 8
#define PSURGE_QUAD_RESET_CTL 11
-#define PSURGE_QUAD_OUT(r, v) (out_8((u8 *)(quad_base+((r)<<2)+1), (v)))
-#define PSURGE_QUAD_IN(r) (in_8((u8 *)(quad_base+((r)<<2)+1)) & 0x0f)
+#define PSURGE_QUAD_OUT(r, v) (out_8(quad_base + ((r) << 4) + 4, (v)))
+#define PSURGE_QUAD_IN(r) (in_8(quad_base + ((r) << 4) + 4) & 0x0f)
#define PSURGE_QUAD_BIS(r, v) (PSURGE_QUAD_OUT((r), PSURGE_QUAD_IN(r) | (v)))
#define PSURGE_QUAD_BIC(r, v) (PSURGE_QUAD_OUT((r), PSURGE_QUAD_IN(r) & ~(v)))
/* virtual addresses for the above */
static volatile u8 *hhead_base;
-static volatile u32 *quad_base;
+static volatile u8 *quad_base;
static volatile u32 *psurge_pri_intr;
static volatile u8 *psurge_sec_intr;
static volatile u32 *psurge_start;
@@ -216,7 +216,7 @@
/*
* Determine a quad card presence. We read the board ID register, we
- * for the data bus to change to something else, and we read it again.
+ * force the data bus to change to something else, and we read it again.
* It it's stable, then the register probably exist (ugh !)
*/
static int __init psurge_quad_probe(void)
@@ -303,11 +303,7 @@
psurge_type = psurge_quad_probe();
if (psurge_type != PSURGE_DUAL) {
psurge_quad_init();
- /* I believe we could "count" CPUs by counting 1 bits
- * in procbits on a quad board. For now, we assume 4,
- * non-present CPUs will just be seen as "stuck".
- * (hope they are the higher-numbered ones -- paulus)
- */
+ /* All released cards using this HW design have 4 CPUs */
ncpus = 4;
} else {
iounmap((void *) quad_base);
@@ -424,11 +420,10 @@
break;
case MSG_ALL_BUT_SELF:
openpic_cause_IPI(msg,
- 0xffffffff & ~(1 << smp_hw_index[smp_processor_id()]));
-
+ 0xffffffff & ~(1 << smp_processor_id()));
break;
default:
- openpic_cause_IPI(msg, smp_hw_index[1< */
-
cpus = find_type_devices("cpu");
- if (cpus){
- for ( ncpus = 1; cpus->next; cpus = cpus->next ){
- ncpus++;
- }
- }
-#endif
- printk("smp_core99_probe: OF reports %d cpus\n", ncpus);
+ if (cpus)
+ while ((cpus = cpus->next) != NULL)
+ ++ncpus;
+ printk("smp_core99_probe: found %d cpus\n", ncpus);
if (ncpus > 1) {
openpic_request_IPIs();
for (i = 1; i < ncpus; ++i)
@@ -1010,6 +992,9 @@
/* Setup CPU 0 last (important) */
smp_ops->setup_cpu(0);
+
+ if (smp_num_cpus < 2)
+ smp_tb_synchronized = 1;
}
void __init smp_software_tb_sync(int cpu)
@@ -1027,17 +1012,6 @@
register unsigned long start = 0;
register unsigned long stop = 0;
register unsigned long temp = 0;
-
- if (smp_num_cpus < 2) {
- smp_tb_synchronized = 1;
- return;
- }
-
- /* This code need fixing on >2 CPUs --BenH/paulus */
- if (smp_num_cpus > 2) {
- smp_tb_synchronized = 0;
- return;
- }
set_tb(0, 0);
@@ -1107,6 +1081,7 @@
if (ppc_md.progress) ppc_md.progress("smp_commence", 0x370);
wmb();
smp_commenced = 1;
+
/* if the smp_ops->setup_cpu function has not already synched the
* timebases with a nicer hardware-based method, do so now
*
@@ -1117,9 +1092,9 @@
* since if this code runs pretty early and needs all cpus that
* reported in in smp_callin_map to be working
*
- * NOTE2: this code doesn't seem to work on > 2 cpus. -- paulus
+ * NOTE2: this code doesn't seem to work on > 2 cpus. -- paulus/BenH
*/
- if (!smp_tb_synchronized) {
+ if (!smp_tb_synchronized && smp_num_cpus == 2) {
unsigned long flags;
__save_and_cli(flags);
smp_software_tb_sync(0);
@@ -1142,7 +1117,7 @@
while(!smp_commenced)
barrier();
/* see smp_commence for more info */
- if (!smp_tb_synchronized){
+ if (!smp_tb_synchronized && smp_num_cpus == 2) {
smp_software_tb_sync(cpu);
}
__sti();
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/softemu8xx.c linux/arch/ppc/kernel/softemu8xx.c
--- v2.4.2/linux/arch/ppc/kernel/softemu8xx.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/softemu8xx.c Sat Mar 3 10:52:14 2001
@@ -75,12 +75,12 @@
sdisp = (instword & 0xffff);
ea = (uint *)(regs->gpr[idxreg] + sdisp);
if (copy_from_user(ip, ea, sizeof(double)))
- retval = EFAULT;
+ retval = -EFAULT;
break;
case LFDU:
if (copy_from_user(ip, ea, sizeof(double)))
- retval = EFAULT;
+ retval = -EFAULT;
else
regs->gpr[idxreg] = (uint)ea;
break;
@@ -88,7 +88,7 @@
sdisp = (instword & 0xffff);
ea = (uint *)(regs->gpr[idxreg] + sdisp);
if (copy_from_user(ip, ea, sizeof(float)))
- retval = EFAULT;
+ retval = -EFAULT;
break;
case STFD:
/* this is a 16 bit quantity that is sign extended
@@ -97,12 +97,12 @@
sdisp = (instword & 0xffff);
ea = (uint *)(regs->gpr[idxreg] + sdisp);
if (copy_to_user(ea, ip, sizeof(double)))
- retval = EFAULT;
+ retval = -EFAULT;
break;
case STFDU:
if (copy_to_user(ea, ip, sizeof(double)))
- retval = EFAULT;
+ retval = -EFAULT;
else
regs->gpr[idxreg] = (uint)ea;
break;
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/time.c linux/arch/ppc/kernel/time.c
--- v2.4.2/linux/arch/ppc/kernel/time.c Sat Feb 3 19:51:23 2001
+++ linux/arch/ppc/kernel/time.c Sat Mar 3 10:52:14 2001
@@ -67,6 +67,8 @@
#include
+unsigned long disarm_decr[NR_CPUS];
+
#ifdef CONFIG_SMP
extern void smp_local_timer_interrupt(struct pt_regs *);
extern int smp_tb_synchronized;
@@ -147,7 +149,6 @@
if (!user_mode(regs))
ppc_do_profile(instruction_pointer(regs));
-
do {
jiffy_stamp += tb_ticks_per_jiffy;
if (smp_processor_id()) continue;
@@ -184,7 +185,8 @@
}
write_unlock(&xtime_lock);
} while((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0);
- set_dec(next_dec);
+ if ( !disarm_decr[smp_processor_id()] )
+ set_dec(next_dec);
last_jiffy_stamp(cpu) = jiffy_stamp;
#ifdef CONFIG_SMP
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
--- v2.4.2/linux/arch/ppc/kernel/traps.c Wed Feb 21 18:20:14 2001
+++ linux/arch/ppc/kernel/traps.c Sat Mar 3 10:52:14 2001
@@ -237,7 +237,7 @@
return retval;
if (get_user(instword, (uint *)(regs->nip)))
- return EFAULT;
+ return -EFAULT;
/* Emulate the mfspr rD, PVR.
*/
@@ -281,7 +281,7 @@
/* Try to emulate it if we should. */
int errcode;
if ((errcode = emulate_instruction(regs))) {
- if (errcode == EFAULT)
+ if (errcode == -EFAULT)
_exception(SIGBUS, regs);
else
_exception(SIGILL, regs);
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
--- v2.4.2/linux/arch/ppc/mm/fault.c Sat Feb 3 19:51:24 2001
+++ linux/arch/ppc/mm/fault.c Sat Mar 3 10:52:14 2001
@@ -276,7 +276,7 @@
pte = va_to_pte(address);
if (pte)
- return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK-1)));
+ return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK)));
return (0);
}
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/mm/init.c linux/arch/ppc/mm/init.c
--- v2.4.2/linux/arch/ppc/mm/init.c Sat Feb 3 19:51:24 2001
+++ linux/arch/ppc/mm/init.c Sat Mar 3 10:52:14 2001
@@ -889,13 +889,14 @@
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
+ printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
+
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
set_page_count(virt_to_page(start), 1);
free_page(start);
totalram_pages++;
}
- printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
}
#endif
diff -u --recursive --new-file v2.4.2/linux/arch/ppc/treeboot/mkevimg linux/arch/ppc/treeboot/mkevimg
--- v2.4.2/linux/arch/ppc/treeboot/mkevimg Mon May 15 14:53:30 2000
+++ linux/arch/ppc/treeboot/mkevimg Sat Mar 3 10:52:14 2001
@@ -431,7 +431,7 @@
close(BOOT);
- print("\nBoot image file \"$ofile\" built successfuly.\n\n");
+ print("\nBoot image file \"$ofile\" built successfully.\n\n");
exit(0);
}
diff -u --recursive --new-file v2.4.2/linux/arch/s390/kernel/entry.S linux/arch/s390/kernel/entry.S
--- v2.4.2/linux/arch/s390/kernel/entry.S Wed Feb 21 18:20:14 2001
+++ linux/arch/s390/kernel/entry.S Fri Mar 2 11:12:06 2001
@@ -687,7 +687,7 @@
lr %r3,%r8
la %r0,0x7f
nr %r3,%r0 # clear per-event-bit
- be BASED(pgm_dn) # none of Martins exceptions occured bypass
+ be BASED(pgm_dn) # none of Martins exceptions occurred bypass
l %r9,BASED(.Ljump_table)
sll %r3,2
l %r9,0(%r3,%r9) # load address of handler routine
diff -u --recursive --new-file v2.4.2/linux/arch/s390/tools/dasdfmt/dasdfmt.c linux/arch/s390/tools/dasdfmt/dasdfmt.c
--- v2.4.2/linux/arch/s390/tools/dasdfmt/dasdfmt.c Wed Feb 21 18:20:14 2001
+++ linux/arch/s390/tools/dasdfmt/dasdfmt.c Fri Mar 2 11:12:06 2001
@@ -477,7 +477,7 @@
rc=stat(dev_name,&stat_buf);
if (rc) {
- ERRMSG_EXIT(EXIT_FAILURE,"%s: error occured during stat: " \
+ ERRMSG_EXIT(EXIT_FAILURE,"%s: error occurred during stat: " \
"%s\n",prog_name,strerror(errno));
} else {
if (!S_ISBLK(stat_buf.st_mode))
diff -u --recursive --new-file v2.4.2/linux/arch/s390x/kernel/entry.S linux/arch/s390x/kernel/entry.S
--- v2.4.2/linux/arch/s390x/kernel/entry.S Wed Feb 21 18:20:14 2001
+++ linux/arch/s390x/kernel/entry.S Fri Mar 2 11:12:06 2001
@@ -724,7 +724,7 @@
stosm 48(%r15),0x03 # reenable interrupts
lghi %r3,0x7f
nr %r3,%r8 # clear per-event-bit & move to r3
- je pgm_dn # none of Martins exceptions occured bypass
+ je pgm_dn # none of Martins exceptions occurred bypass
sll %r3,3
larl %r9,pgm_check_table
lg %r9,0(%r3,%r9) # load address of handler routine
diff -u --recursive --new-file v2.4.2/linux/arch/s390x/tools/dasdfmt/dasdfmt.c linux/arch/s390x/tools/dasdfmt/dasdfmt.c
--- v2.4.2/linux/arch/s390x/tools/dasdfmt/dasdfmt.c Wed Feb 21 18:20:15 2001
+++ linux/arch/s390x/tools/dasdfmt/dasdfmt.c Fri Mar 2 11:12:06 2001
@@ -477,7 +477,7 @@
rc=stat(dev_name,&stat_buf);
if (rc) {
- ERRMSG_EXIT(EXIT_FAILURE,"%s: error occured during stat: " \
+ ERRMSG_EXIT(EXIT_FAILURE,"%s: error occurred during stat: " \
"%s\n",prog_name,strerror(errno));
} else {
if (!S_ISBLK(stat_buf.st_mode))
diff -u --recursive --new-file v2.4.2/linux/arch/sh/kernel/sh_ksyms.c linux/arch/sh/kernel/sh_ksyms.c
--- v2.4.2/linux/arch/sh/kernel/sh_ksyms.c Sat Feb 3 19:51:24 2001
+++ linux/arch/sh/kernel/sh_ksyms.c Fri Mar 2 11:15:47 2001
@@ -77,3 +77,4 @@
/* needed by some modules */
EXPORT_SYMBOL(flush_dcache_page);
#endif
+EXPORT_SYMBOL(flush_tlb_page);
diff -u --recursive --new-file v2.4.2/linux/arch/sparc64/config.in linux/arch/sparc64/config.in
--- v2.4.2/linux/arch/sparc64/config.in Wed Feb 21 18:20:15 2001
+++ linux/arch/sparc64/config.in Sun Mar 4 14:30:18 2001
@@ -165,12 +165,14 @@
dep_tristate 'PTI Qlogic, ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
if [ "$CONFIG_PCI" != "n" ]; then
- dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
- if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
- bool ' Enable tagged command queueing (TCQ) by default' CONFIG_AIC7XXX_TAGGED_QUEUEING
- int ' Maximum number of TCQ commands per device' CONFIG_AIC7XXX_CMDS_PER_DEVICE 8
- bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS
- int ' Delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 5
+ source drivers/scsi/aic7xxx/Config.in
+ if [ "$CONFIG_SCSI_AIC7XXX" != "y" ]; then
+ dep_tristate 'Old Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX_OLD $CONFIG_SCSI
+ if [ "$CONFIG_SCSI_AIC7XXX_OLD" != "n" ]; then
+ bool ' Enable Tagged Command Queueing (TCQ) by default' CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT
+ int ' Maximum number of TCQ commands per device' CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE 8
+ bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_OLD_PROC_STATS
+ fi
fi
dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
diff -u --recursive --new-file v2.4.2/linux/arch/sparc64/defconfig linux/arch/sparc64/defconfig
--- v2.4.2/linux/arch/sparc64/defconfig Sat Feb 3 19:51:24 2001
+++ linux/arch/sparc64/defconfig Sun Mar 4 14:30:18 2001
@@ -305,10 +305,12 @@
CONFIG_SCSI_SUNESP=y
CONFIG_SCSI_QLOGICPTI=m
CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_TAGGED_QUEUEING=y
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_PROC_STATS=y
-CONFIG_AIC7XXX_RESET_DELAY=5
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
+CONFIG_AIC7XXX_RESET_DEALY=5000
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_AIC7XXX_OLD_TAGGED_QUEUEING=y
+CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_OLD_PROC_STATS=y
CONFIG_SCSI_NCR53C8XX=m
CONFIG_SCSI_SYM53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4
diff -u --recursive --new-file v2.4.2/linux/drivers/acorn/char/i2c.c linux/drivers/acorn/char/i2c.c
--- v2.4.2/linux/drivers/acorn/char/i2c.c Mon Sep 18 15:15:21 2000
+++ linux/drivers/acorn/char/i2c.c Fri Mar 2 18:38:37 2001
@@ -122,43 +122,62 @@
#define SCL 0x02
#define SDA 0x01
-static int ioc_control;
+/*
+ * We must preserve all non-i2c output bits in IOC_CONTROL.
+ * Note also that we need to preserve the value of SCL and
+ * SDA outputs as well (which may be different from the
+ * values read back from IOC_CONTROL).
+ */
+static u_int force_ones;
static void ioc_setscl(void *data, int state)
{
+ u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA);
+ u_int ones = force_ones;
+
if (state)
- ioc_control |= SCL;
+ ones |= SCL;
else
- ioc_control &= ~SCL;
- outb(ioc_control, IOC_CONTROL);
+ ones &= ~SCL;
+
+ force_ones = ones;
+
+ ioc_writeb(ioc_control | ones, IOC_CONTROL);
}
static void ioc_setsda(void *data, int state)
{
+ u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA);
+ u_int ones = force_ones;
+
if (state)
- ioc_control |= SDA;
+ ones |= SDA;
else
- ioc_control &= ~SDA;
- outb(ioc_control, IOC_CONTROL);
+ ones &= ~SDA;
+
+ force_ones = ones;
+
+ ioc_writeb(ioc_control | ones, IOC_CONTROL);
}
static int ioc_getscl(void *data)
{
- return (inb(IOC_CONTROL) & SCL) != 0;
+ return (ioc_readb(IOC_CONTROL) & SCL) != 0;
}
static int ioc_getsda(void *data)
{
- return (inb(IOC_CONTROL) & SDA) != 0;
+ return (ioc_readb(IOC_CONTROL) & SDA) != 0;
}
static struct i2c_algo_bit_data ioc_data = {
- NULL,
- ioc_setsda,
- ioc_setscl,
- ioc_getsda,
- ioc_getscl,
- 80, 80, 100
+ setsda: ioc_setsda,
+ setscl: ioc_setscl,
+ getsda: ioc_getsda,
+ getscl: ioc_getscl,
+ udelay: 80,
+ mdelay: 80,
+ timeout: 100
};
static int ioc_client_reg(struct i2c_client *client)
@@ -184,22 +203,16 @@
}
static struct i2c_adapter ioc_ops = {
- "IOC/IOMD",
- I2C_HW_B_IOC,
- NULL,
- &ioc_data,
- NULL,
- NULL,
- ioc_client_reg,
- ioc_client_unreg
+ name: "IOC/IOMD",
+ id: I2C_HW_B_IOC,
+ algo_data: &ioc_data,
+ client_register: ioc_client_reg,
+ client_unregister: ioc_client_unreg
};
static int __init i2c_ioc_init(void)
{
- ioc_control = inb(IOC_CONTROL) | FORCE_ONES;
-
- ioc_setscl(NULL, 1);
- ioc_setsda(NULL, 1);
+ force_ones = FORCE_ONES | SCL | SDA;
return i2c_bit_add_bus(&ioc_ops);
}
diff -u --recursive --new-file v2.4.2/linux/drivers/acorn/char/pcf8583.c linux/drivers/acorn/char/pcf8583.c
--- v2.4.2/linux/drivers/acorn/char/pcf8583.c Wed Feb 21 18:20:16 2001
+++ linux/drivers/acorn/char/pcf8583.c Fri Mar 2 18:38:37 2001
@@ -20,16 +20,16 @@
static struct i2c_driver pcf8583_driver;
static unsigned short ignore[] = { I2C_CLIENT_END };
-static unsigned short normal_addr[] = { 0x50, 0x51, I2C_CLIENT_END };
+static unsigned short normal_addr[] = { 0x50, I2C_CLIENT_END };
static struct i2c_client_address_data addr_data = {
- force: ignore,
+ normal_i2c: normal_addr,
+ normal_i2c_range: ignore,
+ probe: ignore,
+ probe_range: ignore,
ignore: ignore,
ignore_range: ignore,
- normal_i2c: ignore,
- normal_i2c_range: normal_addr,
- probe: ignore,
- probe_range: ignore
+ force: ignore,
};
#define DAT(x) ((unsigned int)(x->data))
@@ -86,7 +86,10 @@
};
int ret = -EIO;
- if (i2c_transfer(client->adapter, msgs, 2) == 2) {
+ memset(buf, 0, sizeof(buf));
+
+ ret = i2c_transfer(client->adapter, msgs, 2);
+ if (ret == 2) {
dt->year_off = buf[4] >> 6;
dt->wday = buf[5] >> 5;
@@ -126,6 +129,8 @@
}
ret = i2c_master_send(client, (char *)buf, len);
+ if (ret == len)
+ ret = 0;
buf[1] = DAT(client);
i2c_master_send(client, (char *)buf, 2);
@@ -219,12 +224,12 @@
}
static struct i2c_driver pcf8583_driver = {
- "PCF8583",
- I2C_DRIVERID_PCF8583,
- I2C_DF_NOTIFY,
- pcf8583_probe,
- pcf8583_detach,
- pcf8583_command
+ name: "PCF8583",
+ id: I2C_DRIVERID_PCF8583,
+ flags: I2C_DF_NOTIFY,
+ attach_adapter: pcf8583_probe,
+ detach_client: pcf8583_detach,
+ command: pcf8583_command
};
static __init int pcf8583_init(void)
diff -u --recursive --new-file v2.4.2/linux/drivers/acorn/scsi/acornscsi.c linux/drivers/acorn/scsi/acornscsi.c
--- v2.4.2/linux/drivers/acorn/scsi/acornscsi.c Mon Sep 18 15:15:22 2000
+++ linux/drivers/acorn/scsi/acornscsi.c Fri Mar 2 18:38:37 2001
@@ -1248,7 +1248,7 @@
/*
* Function: void acornscsi_dma_adjust(AS_Host *host)
- * Purpose : adjust DMA pointers & count for bytes transfered to
+ * Purpose : adjust DMA pointers & count for bytes transferred to
* SBIC but not SCSI bus.
* Params : host - host to adjust DMA count for
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/acorn/scsi/cumana_2.c linux/drivers/acorn/scsi/cumana_2.c
--- v2.4.2/linux/drivers/acorn/scsi/cumana_2.c Wed Feb 21 18:20:16 2001
+++ linux/drivers/acorn/scsi/cumana_2.c Fri Mar 2 18:38:37 2001
@@ -90,7 +90,7 @@
/*
* Use term=0,1,0,0,0 to turn terminators on/off
*/
-int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
#define NR_SG 256
diff -u --recursive --new-file v2.4.2/linux/drivers/acorn/scsi/eesox.c linux/drivers/acorn/scsi/eesox.c
--- v2.4.2/linux/drivers/acorn/scsi/eesox.c Wed Feb 21 18:20:16 2001
+++ linux/drivers/acorn/scsi/eesox.c Fri Mar 2 18:38:37 2001
@@ -88,7 +88,7 @@
/*
* Use term=0,1,0,0,0 to turn terminators on/off
*/
-int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
#define NR_SG 256
diff -u --recursive --new-file v2.4.2/linux/drivers/acorn/scsi/powertec.c linux/drivers/acorn/scsi/powertec.c
--- v2.4.2/linux/drivers/acorn/scsi/powertec.c Wed Feb 21 18:20:16 2001
+++ linux/drivers/acorn/scsi/powertec.c Fri Mar 2 18:38:37 2001
@@ -87,7 +87,7 @@
/*
* Use term=0,1,0,0,0 to turn terminators on/off
*/
-int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
#define NR_SG 256
diff -u --recursive --new-file v2.4.2/linux/drivers/acpi/Makefile linux/drivers/acpi/Makefile
--- v2.4.2/linux/drivers/acpi/Makefile Sat Feb 3 19:51:25 2001
+++ linux/drivers/acpi/Makefile Sat Mar 3 17:46:47 2001
@@ -20,14 +20,6 @@
EXTRA_CFLAGS += $(ACPI_CFLAGS)
-# genksyms only reads $(CFLAGS), it should really read $(EXTRA_CFLAGS) as well.
-# Without EXTRA_CFLAGS the gcc pass for genksyms fails, resulting in an empty
-# include/linux/modules/acpi_ksyms.ver. Changing genkyms to use EXTRA_CFLAGS
-# will hit everything, too risky in 2.4.0-prerelease. Bandaid by tweaking
-# CFLAGS only for .ver targets. Review after 2.4.0 release. KAO
-
-$(MODINCL)/%.ver: CFLAGS := -I./include $(CFLAGS)
-
acpi-subdirs := common dispatcher events hardware \
interpreter namespace parser resources tables
diff -u --recursive --new-file v2.4.2/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
--- v2.4.2/linux/drivers/block/ll_rw_blk.c Wed Feb 21 18:20:18 2001
+++ linux/drivers/block/ll_rw_blk.c Fri Mar 2 15:16:59 2001
@@ -1239,9 +1239,6 @@
#ifdef CONFIG_BLK_DEV_RAM
rd_init();
#endif
-#ifdef CONFIG_BLK_DEV_LOOP
- loop_init();
-#endif
#ifdef CONFIG_ISP16_CDI
isp16_init();
#endif
diff -u --recursive --new-file v2.4.2/linux/drivers/block/loop.c linux/drivers/block/loop.c
--- v2.4.2/linux/drivers/block/loop.c Wed Feb 21 18:20:18 2001
+++ linux/drivers/block/loop.c Fri Mar 2 15:16:59 2001
@@ -31,11 +31,14 @@
* max_loop=<1-255> to the kernel on boot.
* Erik I. Bolsĝ, , Oct 31, 1999
*
+ * Completely rewrite request handling to be make_request_fn style and
+ * non blocking, pushing work to a helper thread. Lots of fixes from
+ * Al Viro too.
+ * Jens Axboe , Nov 2000
+ *
* Still To Fix:
* - Advisory locking is ignored here.
* - Should use an own CAP_* category instead of CAP_SYS_ADMIN
- * - Should use the underlying filesystems/devices read function if possible
- * to support read ahead (and for write)
*
* WARNING/FIXME:
* - The block number as IV passing to low level transfer functions is broken:
@@ -48,6 +51,7 @@
* number.
*/
+#include
#include
#include
@@ -56,9 +60,13 @@
#include
#include
#include
-
+#include
+#include
#include
#include
+#include
+#include
+#include
#include
@@ -66,40 +74,28 @@
#define MAJOR_NR LOOP_MAJOR
-#define DEVICE_NAME "loop"
-#define DEVICE_REQUEST do_lo_request
-#define DEVICE_NR(device) (MINOR(device))
-#define DEVICE_ON(device)
-#define DEVICE_OFF(device)
-#define DEVICE_NO_RANDOM
-#define TIMEOUT_VALUE (6 * HZ)
-#include
-
-#include
static int max_loop = 8;
static struct loop_device *loop_dev;
static int *loop_sizes;
static int *loop_blksizes;
static devfs_handle_t devfs_handle; /* For the directory */
-#define FALSE 0
-#define TRUE (!FALSE)
-
/*
* Transfer functions
*/
static int transfer_none(struct loop_device *lo, int cmd, char *raw_buf,
- char *loop_buf, int size, int real_block)
+ char *loop_buf, int size, int real_block)
{
if (cmd == READ)
memcpy(loop_buf, raw_buf, size);
else
memcpy(raw_buf, loop_buf, size);
+
return 0;
}
static int transfer_xor(struct loop_device *lo, int cmd, char *raw_buf,
- char *loop_buf, int size, int real_block)
+ char *loop_buf, int size, int real_block)
{
char *in, *out, *key;
int i, keysize;
@@ -111,17 +107,18 @@
in = loop_buf;
out = raw_buf;
}
+
key = lo->lo_encrypt_key;
keysize = lo->lo_encrypt_key_size;
- for (i=0; i < size; i++)
+ for (i = 0; i < size; i++)
*out++ = *in++ ^ key[(i & 511) % keysize];
return 0;
}
static int none_status(struct loop_device *lo, struct loop_info *info)
{
- return 0;
-}
+ return 0;
+}
static int xor_status(struct loop_device *lo, struct loop_info *info)
{
@@ -133,7 +130,7 @@
struct loop_func_table none_funcs = {
number: LO_CRYPT_NONE,
transfer: transfer_none,
- init: none_status
+ init: none_status,
};
struct loop_func_table xor_funcs = {
@@ -150,29 +147,27 @@
#define MAX_DISK_SIZE 1024*1024*1024
-static void figure_loop_size(struct loop_device *lo)
+static int compute_loop_size(struct loop_device *lo, struct dentry * lo_dentry, kdev_t lodev)
{
- int size;
-
- if (S_ISREG(lo->lo_dentry->d_inode->i_mode))
- size = (lo->lo_dentry->d_inode->i_size - lo->lo_offset) >> BLOCK_SIZE_BITS;
- else {
- kdev_t lodev = lo->lo_device;
- if (blk_size[MAJOR(lodev)])
- size = blk_size[MAJOR(lodev)][MINOR(lodev)] -
+ if (S_ISREG(lo_dentry->d_inode->i_mode))
+ return (lo_dentry->d_inode->i_size - lo->lo_offset) >> BLOCK_SIZE_BITS;
+ if (blk_size[MAJOR(lodev)])
+ return blk_size[MAJOR(lodev)][MINOR(lodev)] -
(lo->lo_offset >> BLOCK_SIZE_BITS);
- else
- size = MAX_DISK_SIZE;
- }
+ return MAX_DISK_SIZE;
+}
- loop_sizes[lo->lo_number] = size;
+static void figure_loop_size(struct loop_device *lo)
+{
+ loop_sizes[lo->lo_number] = compute_loop_size(lo,
+ lo->lo_backing_file->f_dentry,
+ lo->lo_device);
}
-static int lo_send(struct loop_device *lo, char *data, int len, loff_t pos,
- int blksize)
+static int lo_send(struct loop_device *lo, char *data, int len, loff_t pos)
{
struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
- struct address_space *mapping = lo->lo_dentry->d_inode->i_mapping;
+ struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
struct address_space_operations *aops = mapping->a_ops;
struct page *page;
char *kaddr;
@@ -182,7 +177,8 @@
index = pos >> PAGE_CACHE_SHIFT;
offset = pos & (PAGE_CACHE_SIZE - 1);
while (len > 0) {
- int IV = index * (PAGE_CACHE_SIZE/blksize) + offset/blksize;
+ int IV = index * (PAGE_CACHE_SIZE/lo->lo_blksize) + offset/lo->lo_blksize;
+ IV >>= 2;
size = PAGE_CACHE_SIZE - offset;
if (size > len)
size = len;
@@ -193,7 +189,8 @@
if (aops->prepare_write(file, page, offset, offset+size))
goto unlock;
kaddr = page_address(page);
- if ((lo->transfer)(lo, WRITE, kaddr+offset, data, size, IV))
+ flush_dcache_page(page);
+ if (lo_do_transfer(lo, WRITE, kaddr + offset, data, size, IV))
goto write_fail;
if (aops->commit_write(file, page, offset, offset+size))
goto unlock;
@@ -203,6 +200,7 @@
index++;
pos += size;
UnlockPage(page);
+ deactivate_page(page);
page_cache_release(page);
}
return 0;
@@ -213,6 +211,7 @@
kunmap(page);
unlock:
UnlockPage(page);
+ deactivate_page(page);
page_cache_release(page);
fail:
return -1;
@@ -221,7 +220,6 @@
struct lo_read_data {
struct loop_device *lo;
char *data;
- int blksize;
};
static int lo_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
@@ -230,16 +228,17 @@
unsigned long count = desc->count;
struct lo_read_data *p = (struct lo_read_data*)desc->buf;
struct loop_device *lo = p->lo;
- int IV = page->index * (PAGE_CACHE_SIZE/p->blksize) + offset/p->blksize;
+ int IV = page->index * (PAGE_CACHE_SIZE/lo->lo_blksize) + offset/lo->lo_blksize;
+
+ IV >>= 2;
if (size > count)
size = count;
kaddr = kmap(page);
- if ((lo->transfer)(lo,READ,kaddr+offset,p->data,size,IV)) {
+ if (lo_do_transfer(lo, READ, kaddr + offset, p->data, size, IV)) {
size = 0;
- printk(KERN_ERR "loop: transfer error block %ld\n",
- page->index);
+ printk(KERN_ERR "loop: transfer error block %ld\n",page->index);
desc->error = -EINVAL;
}
kunmap(page);
@@ -250,160 +249,314 @@
return size;
}
-static int lo_receive(struct loop_device *lo, char *data, int len, loff_t pos,
- int blksize)
+static int lo_receive(struct loop_device *lo, char *data, int len, loff_t pos)
{
- struct file *file = lo->lo_backing_file;
struct lo_read_data cookie;
read_descriptor_t desc;
+ struct file *file;
cookie.lo = lo;
cookie.data = data;
- cookie.blksize = blksize;
desc.written = 0;
desc.count = len;
desc.buf = (char*)&cookie;
desc.error = 0;
+ spin_lock_irq(&lo->lo_lock);
+ file = lo->lo_backing_file;
+ spin_unlock_irq(&lo->lo_lock);
do_generic_file_read(file, &pos, &desc, lo_read_actor);
return desc.error;
}
-static void do_lo_request(request_queue_t * q)
+static int do_bh_filebacked(struct loop_device *lo, struct buffer_head *bh, int rw)
{
- int block, offset, len, blksize, size;
- char *dest_addr;
- struct loop_device *lo;
- struct buffer_head *bh;
- struct request *current_request;
loff_t pos;
+ int ret;
+
+ pos = ((loff_t) bh->b_rsector << 9) + lo->lo_offset;
+
+ if (rw == WRITE)
+ ret = lo_send(lo, bh->b_data, bh->b_size, pos);
+ else
+ ret = lo_receive(lo, bh->b_data, bh->b_size, pos);
+
+ return ret;
+}
+
+static void loop_put_buffer(struct buffer_head *bh)
+{
+ if (bh) {
+ kunmap(bh->b_page);
+ __free_page(bh->b_page);
+ kmem_cache_free(bh_cachep, bh);
+ }
+}
+
+/*
+ * Add buffer_head to back of pending list
+ */
+static void loop_add_bh(struct loop_device *lo, struct buffer_head *bh)
+{
+ unsigned long flags;
-repeat:
- INIT_REQUEST;
- current_request=CURRENT;
- blkdev_dequeue_request(current_request);
- if (MINOR(current_request->rq_dev) >= max_loop)
- goto error_out;
- lo = &loop_dev[MINOR(current_request->rq_dev)];
- if (!lo->lo_dentry || !lo->transfer)
- goto error_out;
- if (current_request->cmd == WRITE) {
+ spin_lock_irqsave(&lo->lo_lock, flags);
+ if (lo->lo_bhtail) {
+ lo->lo_bhtail->b_reqnext = bh;
+ lo->lo_bhtail = bh;
+ } else
+ lo->lo_bh = lo->lo_bhtail = bh;
+ spin_unlock_irqrestore(&lo->lo_lock, flags);
+
+ atomic_inc(&lo->lo_pending);
+ up(&lo->lo_bh_mutex);
+}
+
+/*
+ * Grab first pending buffer
+ */
+static struct buffer_head *loop_get_bh(struct loop_device *lo)
+{
+ struct buffer_head *bh;
+
+ spin_lock_irq(&lo->lo_lock);
+ if ((bh = lo->lo_bh)) {
+ if (bh == lo->lo_bhtail)
+ lo->lo_bhtail = NULL;
+ lo->lo_bh = bh->b_reqnext;
+ bh->b_reqnext = NULL;
+ }
+ spin_unlock_irq(&lo->lo_lock);
+
+ return bh;
+}
+
+/*
+ * when buffer i/o has completed. if BH_Dirty is set, this was a WRITE
+ * and lo->transfer stuff has already been done. if not, it was a READ
+ * so queue it for the loop thread and let it do the transfer out of
+ * b_end_io context (we don't want to do decrypt of a page with irqs
+ * disabled)
+ */
+static void loop_end_io_transfer(struct buffer_head *bh, int uptodate)
+{
+ struct loop_device *lo = &loop_dev[MINOR(bh->b_dev)];
+
+ if (!uptodate || test_bit(BH_Dirty, &bh->b_state)) {
+ struct buffer_head *rbh = bh->b_private;
+
+ rbh->b_end_io(rbh, uptodate);
+ if (atomic_dec_and_test(&lo->lo_pending))
+ up(&lo->lo_bh_mutex);
+ loop_put_buffer(bh);
+ } else
+ loop_add_bh(lo, bh);
+}
+
+static struct buffer_head *loop_get_buffer(struct loop_device *lo,
+ struct buffer_head *rbh)
+{
+ struct buffer_head *bh;
+
+ do {
+ bh = kmem_cache_alloc(bh_cachep, SLAB_BUFFER);
+ if (bh)
+ break;
+
+ run_task_queue(&tq_disk);
+ schedule_timeout(HZ);
+ } while (1);
+ memset(bh, 0, sizeof(*bh));
+
+ bh->b_size = rbh->b_size;
+ bh->b_dev = rbh->b_dev;
+ spin_lock_irq(&lo->lo_lock);
+ bh->b_rdev = lo->lo_device;
+ spin_unlock_irq(&lo->lo_lock);
+ bh->b_state = (1 << BH_Req) | (1 << BH_Mapped) | (1 << BH_Lock);
+
+ /*
+ * easy way out, although it does waste some memory for < PAGE_SIZE
+ * blocks... if highmem bounce buffering can get away with it,
+ * so can we :-)
+ */
+ bh->b_page = alloc_page(GFP_BUFFER);
+ bh->b_data = kmap(bh->b_page);
+
+ bh->b_end_io = loop_end_io_transfer;
+ bh->b_rsector = rbh->b_rsector + (lo->lo_offset >> 9);
+ init_waitqueue_head(&bh->b_wait);
+
+ return bh;
+}
+
+static int loop_make_request(request_queue_t *q, int rw, struct buffer_head *rbh)
+{
+ struct buffer_head *bh = NULL;
+ struct loop_device *lo;
+ unsigned long IV;
+
+ if (!buffer_locked(rbh))
+ BUG();
+
+ if (MINOR(rbh->b_rdev) >= max_loop)
+ goto out;
+
+ lo = &loop_dev[MINOR(rbh->b_rdev)];
+ spin_lock_irq(&lo->lo_lock);
+ if (lo->lo_state != Lo_bound)
+ goto inactive;
+ spin_unlock_irq(&lo->lo_lock);
+
+ if (rw == WRITE) {
if (lo->lo_flags & LO_FLAGS_READ_ONLY)
- goto error_out;
- } else if (current_request->cmd != READ) {
- printk(KERN_ERR "unknown loop device command (%d)?!?",
- current_request->cmd);
- goto error_out;
+ goto err;
+ } else if (rw == READA) {
+ rw = READ;
+ } else if (rw != READ) {
+ printk(KERN_ERR "loop: unknown command (%d)\n", rw);
+ goto err;
}
- dest_addr = current_request->buffer;
- len = current_request->current_nr_sectors << 9;
+#if CONFIG_HIGHMEM
+ rbh = create_bounce(rw, rbh);
+#endif
+
+ if (lo->lo_blksize != rbh->b_size)
+ lo->lo_blksize = rbh->b_size;
+
+ /*
+ * file backed, queue for loop_thread to handle
+ */
+ if (lo->lo_flags & LO_FLAGS_DO_BMAP) {
+ if (rw == WRITE)
+ set_bit(BH_Dirty, &rbh->b_state);
+ loop_add_bh(lo, rbh);
+ return 0;
+ }
- blksize = BLOCK_SIZE;
- if (blksize_size[MAJOR(lo->lo_device)]) {
- blksize = blksize_size[MAJOR(lo->lo_device)][MINOR(lo->lo_device)];
- if (!blksize)
- blksize = BLOCK_SIZE;
+ /*
+ * piggy old buffer on original, and submit for I/O
+ */
+ bh = loop_get_buffer(lo, rbh);
+ bh->b_private = rbh;
+ IV = (bh->b_rsector / (lo->lo_blksize >> 9));
+ IV += lo->lo_offset / lo->lo_blksize;
+ IV >>= 2;
+ if (rw == WRITE) {
+ set_bit(BH_Dirty, &bh->b_state);
+ if (lo_do_transfer(lo, WRITE, bh->b_data, rbh->b_data, bh->b_size, IV))
+ goto err;
}
- if (lo->lo_flags & LO_FLAGS_DO_BMAP)
- goto file_backed;
+ generic_make_request(rw, bh);
+ return 0;
- if (blksize < 512) {
- block = current_request->sector * (512/blksize);
- offset = 0;
+err:
+ loop_put_buffer(bh);
+out:
+ buffer_IO_error(rbh);
+ return 0;
+inactive:
+ spin_unlock_irq(&lo->lo_lock);
+ goto out;
+}
+
+static inline void loop_handle_bh(struct loop_device *lo,struct buffer_head *bh)
+{
+ int ret;
+
+ /*
+ * For block backed loop, we know this is a READ
+ */
+ if (lo->lo_flags & LO_FLAGS_DO_BMAP) {
+ int rw = !!test_and_clear_bit(BH_Dirty, &bh->b_state);
+
+ ret = do_bh_filebacked(lo, bh, rw);
+ bh->b_end_io(bh, !ret);
} else {
- block = current_request->sector / (blksize >> 9);
- offset = (current_request->sector % (blksize >> 9)) << 9;
- }
- block += lo->lo_offset / blksize;
- offset += lo->lo_offset % blksize;
- if (offset >= blksize) {
- block++;
- offset -= blksize;
+ struct buffer_head *rbh = bh->b_private;
+ unsigned long IV;
+
+ IV = (bh->b_rsector / (bh->b_size >> 9));
+ IV += lo->lo_offset / bh->b_size;
+ IV >>= 2;
+
+ ret = lo_do_transfer(lo, READ, bh->b_data, rbh->b_data,
+ bh->b_size, IV);
+
+ rbh->b_end_io(rbh, !ret);
+ loop_put_buffer(bh);
}
- spin_unlock_irq(&io_request_lock);
+}
- while (len > 0) {
+/*
+ * worker thread that handles reads/writes to file backed loop devices,
+ * to avoid blocking in our make_request_fn. it also does loop decrypting
+ * on reads for block backed loop, as that is too heavy to do from
+ * b_end_io context where irqs may be disabled.
+ */
+static int loop_thread(void *data)
+{
+ struct loop_device *lo = data;
+ struct buffer_head *bh;
- size = blksize - offset;
- if (size > len)
- size = len;
+ daemonize();
+ exit_files(current);
- bh = getblk(lo->lo_device, block, blksize);
- if (!bh) {
- printk(KERN_ERR "loop: device %s: getblk(-, %d, %d) returned NULL",
- kdevname(lo->lo_device),
- block, blksize);
- goto error_out_lock;
- }
- if (!buffer_uptodate(bh) && ((current_request->cmd == READ) ||
- (offset || (len < blksize)))) {
- ll_rw_block(READ, 1, &bh);
- wait_on_buffer(bh);
- if (!buffer_uptodate(bh)) {
- brelse(bh);
- goto error_out_lock;
- }
- }
+ sprintf(current->comm, "loop%d", lo->lo_number);
- if ((lo->transfer)(lo, current_request->cmd,
- bh->b_data + offset,
- dest_addr, size, block)) {
- printk(KERN_ERR "loop: transfer error block %d\n",
- block);
- brelse(bh);
- goto error_out_lock;
- }
+ spin_lock_irq(¤t->sigmask_lock);
+ sigfillset(¤t->blocked);
+ flush_signals(current);
+ spin_unlock_irq(¤t->sigmask_lock);
+
+ current->policy = SCHED_OTHER;
+ current->nice = -20;
+
+ spin_lock_irq(&lo->lo_lock);
+ lo->lo_state = Lo_bound;
+ atomic_inc(&lo->lo_pending);
+ spin_unlock_irq(&lo->lo_lock);
+
+ /*
+ * up sem, we are running
+ */
+ up(&lo->lo_sem);
+
+ for (;;) {
+ down_interruptible(&lo->lo_bh_mutex);
+ if (!atomic_read(&lo->lo_pending))
+ break;
- if (current_request->cmd == WRITE) {
- mark_buffer_uptodate(bh, 1);
- mark_buffer_dirty(bh);
+ bh = loop_get_bh(lo);
+ atomic_dec(&lo->lo_pending);
+ if (!bh) {
+ printk("missing bh\n");
+ continue;
}
- brelse(bh);
- dest_addr += size;
- len -= size;
- offset = 0;
- block++;
+ loop_handle_bh(lo, bh);
}
- goto done;
-file_backed:
- pos = ((loff_t)current_request->sector << 9) + lo->lo_offset;
- spin_unlock_irq(&io_request_lock);
- if (current_request->cmd == WRITE) {
- if (lo_send(lo, dest_addr, len, pos, blksize))
- goto error_out_lock;
- } else {
- if (lo_receive(lo, dest_addr, len, pos, blksize))
- goto error_out_lock;
- }
-done:
- spin_lock_irq(&io_request_lock);
- current_request->sector += current_request->current_nr_sectors;
- current_request->nr_sectors -= current_request->current_nr_sectors;
- list_add(¤t_request->queue, &q->queue_head);
- end_request(1);
- goto repeat;
-error_out_lock:
- spin_lock_irq(&io_request_lock);
-error_out:
- list_add(¤t_request->queue, &q->queue_head);
- end_request(0);
- goto repeat;
+ up(&lo->lo_sem);
+ return 0;
}
-static int loop_set_fd(struct loop_device *lo, kdev_t dev, unsigned int arg)
+static int loop_set_fd(struct loop_device *lo, struct file *lo_file, kdev_t dev,
+ unsigned int arg)
{
struct file *file;
struct inode *inode;
- int error;
+ kdev_t lo_device;
+ int lo_flags = 0;
+ int error;
+ int bs;
MOD_INC_USE_COUNT;
error = -EBUSY;
- if (lo->lo_dentry)
+ if (lo->lo_state != Lo_unbound)
goto out;
-
+
error = -EBADF;
file = fget(arg);
if (!file)
@@ -412,24 +565,13 @@
error = -EINVAL;
inode = file->f_dentry->d_inode;
- if (S_ISBLK(inode->i_mode)) {
- /* dentry will be wired, so... */
- error = blkdev_get(inode->i_bdev, file->f_mode,
- file->f_flags, BDEV_FILE);
-
- lo->lo_device = inode->i_rdev;
- lo->lo_flags = 0;
-
- /* Backed by a block device - don't need to hold onto
- a file structure */
- lo->lo_backing_file = NULL;
+ if (!(file->f_mode & FMODE_WRITE))
+ lo_flags |= LO_FLAGS_READ_ONLY;
- if (error)
- goto out_putf;
+ if (S_ISBLK(inode->i_mode)) {
+ lo_device = inode->i_rdev;
} else if (S_ISREG(inode->i_mode)) {
- struct address_space_operations *aops;
-
- aops = inode->i_mapping->a_ops;
+ struct address_space_operations *aops = inode->i_mapping->a_ops;
/*
* If we can't read - sorry. If we only can't write - well,
* it's going to be read-only.
@@ -439,57 +581,51 @@
goto out_putf;
if (!aops->prepare_write || !aops->commit_write)
- lo->lo_flags |= LO_FLAGS_READ_ONLY;
-
- error = get_write_access(inode);
- if (error)
- goto out_putf;
-
- /* Backed by a regular file - we need to hold onto a file
- structure for this file. Friggin' NFS can't live without
- it on write and for reading we use do_generic_file_read(),
- so... We create a new file structure based on the one
- passed to us via 'arg'. This is to avoid changing the file
- structure that the caller is using */
-
- lo->lo_device = inode->i_dev;
- lo->lo_flags |= LO_FLAGS_DO_BMAP;
-
- error = -ENFILE;
- lo->lo_backing_file = get_empty_filp();
- if (lo->lo_backing_file == NULL) {
- put_write_access(inode);
- goto out_putf;
- }
-
- lo->lo_backing_file->f_mode = file->f_mode;
- lo->lo_backing_file->f_pos = file->f_pos;
- lo->lo_backing_file->f_flags = file->f_flags;
- lo->lo_backing_file->f_owner = file->f_owner;
- lo->lo_backing_file->f_dentry = file->f_dentry;
- lo->lo_backing_file->f_vfsmnt = mntget(file->f_vfsmnt);
- lo->lo_backing_file->f_op = fops_get(file->f_op);
- lo->lo_backing_file->private_data = file->private_data;
- file_moveto(lo->lo_backing_file, file);
+ lo_flags |= LO_FLAGS_READ_ONLY;
+ lo_device = inode->i_dev;
+ lo_flags |= LO_FLAGS_DO_BMAP;
error = 0;
- }
+ } else
+ goto out_putf;
- if (IS_RDONLY (inode) || is_read_only(lo->lo_device))
- lo->lo_flags |= LO_FLAGS_READ_ONLY;
+ get_file(file);
- set_device_ro(dev, (lo->lo_flags & LO_FLAGS_READ_ONLY)!=0);
+ if (IS_RDONLY (inode) || is_read_only(lo_device)
+ || !(lo_file->f_mode & FMODE_WRITE))
+ lo_flags |= LO_FLAGS_READ_ONLY;
- lo->lo_dentry = dget(file->f_dentry);
+ set_device_ro(dev, (lo_flags & LO_FLAGS_READ_ONLY)!=0);
+
+ lo->lo_device = lo_device;
+ lo->lo_flags = lo_flags;
+ lo->lo_backing_file = file;
lo->transfer = NULL;
lo->ioctl = NULL;
figure_loop_size(lo);
+ lo->old_gfp_mask = inode->i_mapping->gfp_mask;
+ inode->i_mapping->gfp_mask = GFP_BUFFER;
+
+ bs = 0;
+ if (blksize_size[MAJOR(inode->i_rdev)])
+ bs = blksize_size[MAJOR(inode->i_rdev)][MINOR(inode->i_rdev)];
+ if (!bs)
+ bs = BLOCK_SIZE;
+
+ lo->lo_blksize = bs;
+ set_blocksize(dev, bs);
+
+ lo->lo_bh = lo->lo_bhtail = NULL;
+ kernel_thread(loop_thread, lo, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+ down(&lo->lo_sem);
+
+ fput(file);
+ return 0;
out_putf:
fput(file);
out:
- if (error)
- MOD_DEC_USE_COUNT;
+ MOD_DEC_USE_COUNT;
return error;
}
@@ -525,27 +661,25 @@
static int loop_clr_fd(struct loop_device *lo, kdev_t dev)
{
- struct dentry *dentry = lo->lo_dentry;
+ struct file *filp = lo->lo_backing_file;
+ int gfp = lo->old_gfp_mask;
- if (!dentry)
+ if (lo->lo_state != Lo_bound)
return -ENXIO;
if (lo->lo_refcnt > 1) /* we needed one fd for the ioctl */
return -EBUSY;
+ if (filp==NULL)
+ return -EINVAL;
- if (S_ISBLK(dentry->d_inode->i_mode))
- blkdev_put(dentry->d_inode->i_bdev, BDEV_FILE);
+ spin_lock_irq(&lo->lo_lock);
+ lo->lo_state = Lo_rundown;
+ if (atomic_dec_and_test(&lo->lo_pending))
+ up(&lo->lo_bh_mutex);
+ spin_unlock_irq(&lo->lo_lock);
- lo->lo_dentry = NULL;
+ down(&lo->lo_sem);
- if (lo->lo_backing_file != NULL) {
- struct file *filp = lo->lo_backing_file;
- if ((filp->f_mode & FMODE_WRITE) == 0)
- put_write_access(filp->f_dentry->d_inode);
- fput(filp);
- lo->lo_backing_file = NULL;
- } else {
- dput(dentry);
- }
+ lo->lo_backing_file = NULL;
loop_release_xfer(lo);
lo->transfer = NULL;
@@ -554,10 +688,14 @@
lo->lo_encrypt_type = 0;
lo->lo_offset = 0;
lo->lo_encrypt_key_size = 0;
+ lo->lo_flags = 0;
memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
memset(lo->lo_name, 0, LO_NAME_SIZE);
loop_sizes[lo->lo_number] = 0;
invalidate_buffers(dev);
+ filp->f_dentry->d_inode->i_mapping->gfp_mask = gfp;
+ lo->lo_state = Lo_unbound;
+ fput(filp);
MOD_DEC_USE_COUNT;
return 0;
}
@@ -571,7 +709,7 @@
if (lo->lo_encrypt_key_size && lo->lo_key_owner != current->uid &&
!capable(CAP_SYS_ADMIN))
return -EPERM;
- if (!lo->lo_dentry)
+ if (lo->lo_state != Lo_bound)
return -ENXIO;
if (copy_from_user(&info, arg, sizeof (struct loop_info)))
return -EFAULT;
@@ -608,15 +746,16 @@
static int loop_get_status(struct loop_device *lo, struct loop_info *arg)
{
struct loop_info info;
+ struct file *file = lo->lo_backing_file;
- if (!lo->lo_dentry)
+ if (lo->lo_state != Lo_bound)
return -ENXIO;
if (!arg)
return -EINVAL;
memset(&info, 0, sizeof(info));
info.lo_number = lo->lo_number;
- info.lo_device = kdev_t_to_nr(lo->lo_dentry->d_inode->i_dev);
- info.lo_inode = lo->lo_dentry->d_inode->i_ino;
+ info.lo_device = kdev_t_to_nr(file->f_dentry->d_inode->i_dev);
+ info.lo_inode = file->f_dentry->d_inode->i_ino;
info.lo_rdevice = kdev_t_to_nr(lo->lo_device);
info.lo_offset = lo->lo_offset;
info.lo_flags = lo->lo_flags;
@@ -634,7 +773,7 @@
unsigned int cmd, unsigned long arg)
{
struct loop_device *lo;
- int dev;
+ int dev, err;
if (!inode)
return -EINVAL;
@@ -647,25 +786,36 @@
if (dev >= max_loop)
return -ENODEV;
lo = &loop_dev[dev];
+ down(&lo->lo_ctl_mutex);
switch (cmd) {
case LOOP_SET_FD:
- return loop_set_fd(lo, inode->i_rdev, arg);
+ err = loop_set_fd(lo, file, inode->i_rdev, arg);
+ break;
case LOOP_CLR_FD:
- return loop_clr_fd(lo, inode->i_rdev);
+ err = loop_clr_fd(lo, inode->i_rdev);
+ break;
case LOOP_SET_STATUS:
- return loop_set_status(lo, (struct loop_info *) arg);
+ err = loop_set_status(lo, (struct loop_info *) arg);
+ break;
case LOOP_GET_STATUS:
- return loop_get_status(lo, (struct loop_info *) arg);
- case BLKGETSIZE: /* Return device size */
- if (!lo->lo_dentry)
- return -ENXIO;
- if (!arg)
- return -EINVAL;
- return put_user(loop_sizes[lo->lo_number] << 1, (long *) arg);
+ err = loop_get_status(lo, (struct loop_info *) arg);
+ break;
+ case BLKGETSIZE:
+ if (lo->lo_state != Lo_bound) {
+ err = -ENXIO;
+ break;
+ }
+ if (!arg) {
+ err = -EINVAL;
+ break;
+ }
+ err = put_user(loop_sizes[lo->lo_number] << 1, (long *) arg);
+ break;
default:
- return lo->ioctl ? lo->ioctl(lo, cmd, arg) : -EINVAL;
+ err = lo->ioctl ? lo->ioctl(lo, cmd, arg) : -EINVAL;
}
- return 0;
+ up(&lo->lo_ctl_mutex);
+ return err;
}
static int lo_open(struct inode *inode, struct file *file)
@@ -673,7 +823,6 @@
struct loop_device *lo;
int dev, type;
-
if (!inode)
return -EINVAL;
if (MAJOR(inode->i_rdev) != MAJOR_NR) {
@@ -681,23 +830,25 @@
return -ENODEV;
}
dev = MINOR(inode->i_rdev);
- if (dev >= max_loop) {
+ if (dev >= max_loop)
return -ENODEV;
- }
+
lo = &loop_dev[dev];
+ MOD_INC_USE_COUNT;
+ down(&lo->lo_ctl_mutex);
type = lo->lo_encrypt_type;
if (type && xfer_funcs[type] && xfer_funcs[type]->lock)
xfer_funcs[type]->lock(lo);
lo->lo_refcnt++;
- MOD_INC_USE_COUNT;
+ up(&lo->lo_ctl_mutex);
return 0;
}
static int lo_release(struct inode *inode, struct file *file)
{
struct loop_device *lo;
- int dev;
+ int dev, type;
if (!inode)
return 0;
@@ -709,17 +860,16 @@
dev = MINOR(inode->i_rdev);
if (dev >= max_loop)
return 0;
+
lo = &loop_dev[dev];
- if (lo->lo_refcnt <= 0)
- printk(KERN_ERR "lo_release: refcount(%d) <= 0\n",
- lo->lo_refcnt);
- else {
- int type = lo->lo_encrypt_type;
- --lo->lo_refcnt;
- if (xfer_funcs[type] && xfer_funcs[type]->unlock)
- xfer_funcs[type]->unlock(lo);
- MOD_DEC_USE_COUNT;
- }
+ down(&lo->lo_ctl_mutex);
+ type = lo->lo_encrypt_type;
+ --lo->lo_refcnt;
+ if (xfer_funcs[type] && xfer_funcs[type]->unlock)
+ xfer_funcs[type]->unlock(lo);
+
+ up(&lo->lo_ctl_mutex);
+ MOD_DEC_USE_COUNT;
return 0;
}
@@ -732,11 +882,8 @@
/*
* And now the modules code and kernel interface.
*/
-#ifdef MODULE
-#define loop_init init_module
MODULE_PARM(max_loop, "i");
MODULE_PARM_DESC(max_loop, "Maximum number of loop devices (1-255)");
-#endif
int loop_register_transfer(struct loop_func_table *funcs)
{
@@ -767,88 +914,88 @@
EXPORT_SYMBOL(loop_register_transfer);
EXPORT_SYMBOL(loop_unregister_transfer);
-static void no_plug_device(request_queue_t *q, kdev_t device)
-{
-}
-
int __init loop_init(void)
{
int i;
- if (devfs_register_blkdev(MAJOR_NR, "loop", &lo_fops)) {
- printk(KERN_WARNING "Unable to get major number %d for loop device\n",
- MAJOR_NR);
- return -EIO;
- }
- devfs_handle = devfs_mk_dir (NULL, "loop", NULL);
- devfs_register_series (devfs_handle, "%u", max_loop, DEVFS_FL_DEFAULT,
- MAJOR_NR, 0,
- S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP,
- &lo_fops, NULL);
-
if ((max_loop < 1) || (max_loop > 255)) {
- printk (KERN_WARNING "loop: invalid max_loop (must be between 1 and 255), using default (8)\n");
+ printk(KERN_WARNING "loop: invalid max_loop (must be between"
+ " 1 and 255), using default (8)\n");
max_loop = 8;
}
- printk(KERN_INFO "loop: enabling %d loop devices\n", max_loop);
-
- loop_dev = kmalloc (max_loop * sizeof(struct loop_device), GFP_KERNEL);
- if (!loop_dev) {
- printk (KERN_ERR "loop: Unable to create loop_dev\n");
- return -ENOMEM;
+ if (devfs_register_blkdev(MAJOR_NR, "loop", &lo_fops)) {
+ printk(KERN_WARNING "Unable to get major number %d for loop"
+ " device\n", MAJOR_NR);
+ return -EIO;
}
- loop_sizes = kmalloc(max_loop * sizeof(int), GFP_KERNEL);
- if (!loop_sizes) {
- printk (KERN_ERR "loop: Unable to create loop_sizes\n");
- kfree (loop_dev);
- return -ENOMEM;
- }
+ devfs_handle = devfs_mk_dir(NULL, "loop", NULL);
+ devfs_register_series(devfs_handle, "%u", max_loop, DEVFS_FL_DEFAULT,
+ MAJOR_NR, 0,
+ S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP,
+ &lo_fops, NULL);
- loop_blksizes = kmalloc (max_loop * sizeof(int), GFP_KERNEL);
- if (!loop_blksizes) {
- printk (KERN_ERR "loop: Unable to create loop_blksizes\n");
- kfree (loop_dev);
- kfree (loop_sizes);
+ loop_dev = kmalloc(max_loop * sizeof(struct loop_device), GFP_KERNEL);
+ if (!loop_dev)
return -ENOMEM;
- }
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
- blk_queue_pluggable(BLK_DEFAULT_QUEUE(MAJOR_NR), no_plug_device);
- blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
- for (i=0; i < max_loop; i++) {
- memset(&loop_dev[i], 0, sizeof(struct loop_device));
- loop_dev[i].lo_number = i;
+ loop_sizes = kmalloc(max_loop * sizeof(int), GFP_KERNEL);
+ if (!loop_sizes)
+ goto out_sizes;
+
+ loop_blksizes = kmalloc(max_loop * sizeof(int), GFP_KERNEL);
+ if (!loop_blksizes)
+ goto out_blksizes;
+
+ blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), loop_make_request);
+
+ for (i = 0; i < max_loop; i++) {
+ struct loop_device *lo = &loop_dev[i];
+ memset(lo, 0, sizeof(struct loop_device));
+ init_MUTEX(&lo->lo_ctl_mutex);
+ init_MUTEX_LOCKED(&lo->lo_sem);
+ init_MUTEX_LOCKED(&lo->lo_bh_mutex);
+ lo->lo_number = i;
+ spin_lock_init(&lo->lo_lock);
}
+
memset(loop_sizes, 0, max_loop * sizeof(int));
memset(loop_blksizes, 0, max_loop * sizeof(int));
blk_size[MAJOR_NR] = loop_sizes;
blksize_size[MAJOR_NR] = loop_blksizes;
- for (i=0; i < max_loop; i++)
- register_disk(NULL, MKDEV(MAJOR_NR,i), 1, &lo_fops, 0);
+ for (i = 0; i < max_loop; i++)
+ register_disk(NULL, MKDEV(MAJOR_NR, i), 1, &lo_fops, 0);
+ printk(KERN_INFO "loop: loaded (max %d devices)\n", max_loop);
return 0;
+
+out_sizes:
+ kfree(loop_dev);
+out_blksizes:
+ kfree(loop_sizes);
+ printk(KERN_ERR "loop: ran out of memory\n");
+ return -ENOMEM;
}
-#ifdef MODULE
-void cleanup_module(void)
+void loop_exit(void)
{
- devfs_unregister (devfs_handle);
- if (devfs_unregister_blkdev(MAJOR_NR, "loop") != 0)
+ devfs_unregister(devfs_handle);
+ if (devfs_unregister_blkdev(MAJOR_NR, "loop"))
printk(KERN_WARNING "loop: cannot unregister blkdev\n");
- blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
- kfree (loop_dev);
- kfree (loop_sizes);
- kfree (loop_blksizes);
+ kfree(loop_dev);
+ kfree(loop_sizes);
+ kfree(loop_blksizes);
}
-#endif
+
+module_init(loop_init);
+module_exit(loop_exit);
#ifndef MODULE
static int __init max_loop_setup(char *str)
{
- max_loop = simple_strtol(str,NULL,0);
+ max_loop = simple_strtol(str, NULL, 0);
return 1;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/char/drm/r128_drv.h linux/drivers/char/drm/r128_drv.h
--- v2.4.2/linux/drivers/char/drm/r128_drv.h Thu Jan 4 13:03:20 2001
+++ linux/drivers/char/drm/r128_drv.h Fri Mar 2 18:38:37 2001
@@ -447,6 +447,11 @@
DRM_INFO( "ADVANCE_RING() tail=0x%06x wr=0x%06x\n", \
write, dev_priv->ring.tail ); \
} \
+ if ( write < 32 ) { \
+ memcpy( dev_priv->ring.end, \
+ dev_priv->ring.start, \
+ write * sizeof(u32) ); \
+ } \
r128_flush_write_combine(); \
dev_priv->ring.tail = write; \
R128_WRITE( R128_PM4_BUFFER_DL_WPTR, write ); \
diff -u --recursive --new-file v2.4.2/linux/drivers/char/dsp56k.c linux/drivers/char/dsp56k.c
--- v2.4.2/linux/drivers/char/dsp56k.c Wed Feb 21 18:20:19 2001
+++ linux/drivers/char/dsp56k.c Fri Mar 2 18:38:37 2001
@@ -265,7 +265,7 @@
}
default:
- printk("DSP56k driver: Unknown minor device: %d\n", dev);
+ printk(KERN_ERR "DSP56k driver: Unknown minor device: %d\n", dev);
return -ENXIO;
}
}
@@ -327,7 +327,7 @@
return -EFAULT;
}
default:
- printk("DSP56k driver: Unknown minor device: %d\n", dev);
+ printk(KERN_ERR "DSP56k driver: Unknown minor device: %d\n", dev);
return -ENXIO;
}
}
@@ -416,7 +416,7 @@
return 0;
default:
- printk("DSP56k driver: Unknown minor device: %d\n", dev);
+ printk(KERN_ERR "DSP56k driver: Unknown minor device: %d\n", dev);
return -ENXIO;
}
}
@@ -469,7 +469,7 @@
break;
default:
- printk("DSP56k driver: Unknown minor device: %d\n", dev);
+ printk(KERN_ERR "DSP56k driver: Unknown minor device: %d\n", dev);
return -ENXIO;
}
@@ -490,7 +490,7 @@
break;
default:
- printk("DSP56k driver: Unknown minor device: %d\n", dev);
+ printk(KERN_ERR "DSP56k driver: Unknown minor device: %d\n", dev);
return -ENXIO;
}
@@ -511,7 +511,9 @@
static devfs_handle_t devfs_handle;
-int __init dsp56k_init(void)
+static const char banner[] __initdata = KERN_INFO "DSP56k driver installed\n";
+
+static int __init dsp56k_init_driver(void)
{
if(!MACH_IS_ATARI || !ATARIHW_PRESENT(DSP56K)) {
printk("DSP56k driver: Hardware not present\n");
@@ -522,27 +524,19 @@
printk("DSP56k driver: Unable to register driver\n");
return -ENODEV;
}
- devfs_handle = devfs_register (NULL, "dsp56k", DEVFS_FL_DEFAULT,
- DSP56K_MAJOR, 0,
- S_IFCHR | S_IRUSR | S_IWUSR,
- &dsp56k_fops, NULL);
-
- dsp56k.in_use = 0;
-
- printk("DSP56k driver installed\n");
+ devfs_handle = devfs_register(NULL, "dsp56k", DEVFS_FL_DEFAULT,
+ DSP56K_MAJOR, 0,
+ S_IFCHR | S_IRUSR | S_IWUSR,
+ &dsp56k_fops, NULL);
+ printk(banner);
return 0;
}
+module_init(dsp56k_init_driver);
-#ifdef MODULE
-int init_module(void)
-{
- return dsp56k_init();
-}
-
-void cleanup_module(void)
+static void __exit dsp56k_cleanup_driver(void)
{
devfs_unregister_chrdev(DSP56K_MAJOR, "dsp56k");
- devfs_unregister (devfs_handle);
+ devfs_unregister(devfs_handle);
}
-#endif /* MODULE */
+module_exit(dsp56k_cleanup_driver);
diff -u --recursive --new-file v2.4.2/linux/drivers/char/dz.c linux/drivers/char/dz.c
--- v2.4.2/linux/drivers/char/dz.c Wed Feb 21 18:20:19 2001
+++ linux/drivers/char/dz.c Fri Mar 2 18:38:37 2001
@@ -847,10 +847,12 @@
if (!new_info)
return -EFAULT;
- copy_from_user (&new_serial, new_info, sizeof(new_serial));
+ if(copy_from_user (&new_serial, new_info, sizeof(new_serial)))
+ return -EFAULT;
+
old_info = *info;
- if (!suser())
+ if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (info->count > 1)
diff -u --recursive --new-file v2.4.2/linux/drivers/char/i810_rng.c linux/drivers/char/i810_rng.c
--- v2.4.2/linux/drivers/char/i810_rng.c Wed Feb 21 18:20:19 2001
+++ linux/drivers/char/i810_rng.c Sat Mar 3 10:53:47 2001
@@ -1,8 +1,8 @@
/*
Hardware driver for Intel i810 Random Number Generator (RNG)
- Copyright 2000 Jeff Garzik
- Copyright 2000 Philipp Rumpf
+ Copyright 2000,2001 Jeff Garzik
+ Copyright 2000,2001 Philipp Rumpf
Driver Web site: http://sourceforge.net/projects/gkernel/
@@ -114,15 +114,13 @@
Minimum interval is 1 jiffy, maximum interval is 24 hours.
* In order to unload the i810_rng module, you must first
- disable the hardware via sysctl i810_hw_enabled, as shown above,
+ disable the hardware via sysctl i810_rng_timer, as shown above,
and make sure all users of the character device have closed
* The timer and the character device may be used simultaneously,
if desired.
- * FIXME: support poll()
-
- * FIXME: should we be crazy and support mmap()?
+ * FIXME: support poll(2)
* FIXME: It is possible for the timer function to read,
and shove into the kernel entropy pool, 2499 bytes of data
@@ -135,11 +133,24 @@
* FIXME: module unload is racy. To fix this, struct ctl_table
needs an owner member a la struct file_operations.
+ * FIXME: Timer interval should not be in jiffies, but in a more
+ user-understandable value like milliseconds.
+
* Since the RNG is accessed from a timer as well as normal
kernel code, but not from interrupts, we use spin_lock_bh
in regular code, and spin_lock in the timer function, to
serialize access to the RNG hardware area.
+ NOTE: request_mem_region was removed, for two reasons:
+ 1) Only one RNG is supported by this driver, 2) The location
+ used by the RNG is a fixed location in MMIO-addressable memory,
+ 3) users with properly working BIOS e820 handling will always
+ have the region in which the RNG is located reserved, so
+ request_mem_region calls always fail for proper setups.
+ However, for people who use mem=XX, BIOS e820 information is
+ -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can
+ succeed.
+
----------------------------------------------------------
Change history:
@@ -179,6 +190,19 @@
Version 0.9.2:
* Simplify open blocking logic
+ Version 0.9.3:
+ * Clean up rng_read a bit.
+ * Update i810_rng driver Web site URL.
+ * Increase default timer interval to 4 samples per second.
+ * Abort if mem region is not available.
+ * BSS zero-initialization cleanup.
+ * Call misc_register() from rng_init_one.
+ * Fix O_NONBLOCK to occur before we schedule.
+
+ Version 0.9.4:
+ * Fix: Remove request_mem_region
+ * Fix: Horrible bugs in FIPS calculation and test execution
+
*/
@@ -202,7 +226,7 @@
/*
* core module and version information
*/
-#define RNG_VERSION "0.9.2"
+#define RNG_VERSION "0.9.4"
#define RNG_MODULE_NAME "i810_rng"
#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
#define PFX RNG_MODULE_NAME ": "
@@ -211,7 +235,7 @@
/*
* debugging macros
*/
-#undef RNG_DEBUG /* define to 1 to enable copious debugging info */
+#undef RNG_DEBUG /* define to enable copious debugging info */
#ifdef RNG_DEBUG
/* note: prints function name for you */
@@ -220,8 +244,8 @@
#define DPRINTK(fmt, args...)
#endif
-#define RNG_NDEBUG 0 /* define to 1 to disable lightweight runtime checks */
-#if RNG_NDEBUG
+#undef RNG_NDEBUG /* define to disable lightweight runtime checks */
+#ifdef RNG_NDEBUG
#define assert(expr)
#else
#define assert(expr) \
@@ -249,6 +273,9 @@
#define RNG_DATA_PRESENT 0x01
#define RNG_DATA 2
+/*
+ * Magic address at which Intel PCI bridges locate the RNG
+ */
#define RNG_ADDR 0xFFBC015F
#define RNG_ADDR_LEN 3
@@ -259,9 +286,9 @@
/*
* Frequency that data is added to kernel entropy pool
- * HZ>>1 == every half-second
+ * HZ>>1 == every quarter-second
*/
-#define RNG_DEF_TIMER_LEN (HZ >> 1)
+#define RNG_DEF_TIMER_LEN (HZ >> 2)
/*
@@ -283,7 +310,6 @@
static unsigned int rng_entropy = 8; /* number of entropy bits we submit to /dev/random */
static unsigned int rng_entropy_sysctl; /* sysctl for changing entropy bits */
static unsigned int rng_interval_sysctl; /* sysctl for changing timer interval */
-static int rng_have_mem_region; /* did we grab RNG region via request_mem_region? */
static unsigned int rng_fips_counter; /* size of internal FIPS test data pool */
static unsigned int rng_timer_len = RNG_DEF_TIMER_LEN; /* timer interval, in jiffies */
static void *rng_mem; /* token to our ioremap'd RNG register area */
@@ -356,8 +382,11 @@
/* fitness testing via FIPS, if we have enough data */
rng_fips_test_store (rng_data);
- if (rng_fips_counter > RNG_FIPS_TEST_THRESHOLD)
+ rng_fips_counter++;
+ if (rng_fips_counter == RNG_FIPS_TEST_THRESHOLD) {
rng_run_fips_test ();
+ rng_fips_counter = 0;
+ }
} else {
spin_unlock (&rng_lock);
}
@@ -622,12 +651,10 @@
static int rng_dev_open (struct inode *inode, struct file *filp)
{
- int rc = -EINVAL;
-
if ((filp->f_mode & FMODE_READ) == 0)
- return rc;
+ return -EINVAL;
if (filp->f_mode & FMODE_WRITE)
- return rc;
+ return -EINVAL;
/* wait for device to become free */
if (filp->f_flags & O_NONBLOCK) {
@@ -639,15 +666,11 @@
}
if (rng_enable (1)) {
- rc = -EIO;
- goto err_out;
+ up (&rng_open_sem);
+ return -EIO;
}
return 0;
-
-err_out:
- up (&rng_open_sem);
- return rc;
}
@@ -686,20 +709,35 @@
ret++;
}
+ if (filp->f_flags & O_NONBLOCK)
+ return ret ? : -EAGAIN;
+
if (current->need_resched)
schedule ();
if (signal_pending (current))
return ret ? : -ERESTARTSYS;
-
- if (filp->f_flags & O_NONBLOCK)
- return ret ? : -EAGAIN;
}
return ret;
}
+static struct file_operations rng_chrdev_ops = {
+ owner: THIS_MODULE,
+ open: rng_dev_open,
+ release: rng_dev_release,
+ read: rng_dev_read,
+};
+
+
+static struct miscdevice rng_miscdev = {
+ RNG_MISCDEV_MINOR,
+ RNG_MODULE_NAME,
+ &rng_chrdev_ops,
+};
+
+
/*
* rng_init_one - look for and attempt to init a single RNG
*/
@@ -713,16 +751,19 @@
if (pci_enable_device (dev))
return -EIO;
- /* XXX currently fails, investigate who has our mem region */
- if (request_mem_region (RNG_ADDR, RNG_ADDR_LEN, RNG_MODULE_NAME))
- rng_have_mem_region = 1;
+ rc = misc_register (&rng_miscdev);
+ if (rc) {
+ printk (KERN_ERR PFX "cannot register misc device\n");
+ DPRINTK ("EXIT, returning %d\n", rc);
+ goto err_out;
+ }
rng_mem = ioremap (RNG_ADDR, RNG_ADDR_LEN);
if (rng_mem == NULL) {
printk (KERN_ERR PFX "cannot ioremap RNG Memory\n");
DPRINTK ("EXIT, returning -EBUSY\n");
rc = -EBUSY;
- goto err_out_free_res;
+ goto err_out_free_miscdev;
}
/* Check for Intel 82802 */
@@ -756,9 +797,9 @@
err_out_free_map:
iounmap (rng_mem);
-err_out_free_res:
- if (rng_have_mem_region)
- release_mem_region (RNG_ADDR, RNG_ADDR_LEN);
+err_out_free_miscdev:
+ misc_deregister (&rng_miscdev);
+err_out:
return rc;
}
@@ -786,21 +827,6 @@
MODULE_PARM_DESC(rng_entropy, "Bits of entropy to add to random pool per RNG byte (range: 0-8, default 8)");
-static struct file_operations rng_chrdev_ops = {
- owner: THIS_MODULE,
- open: rng_dev_open,
- release: rng_dev_release,
- read: rng_dev_read,
-};
-
-
-static struct miscdevice rng_miscdev = {
- RNG_MISCDEV_MINOR,
- RNG_MODULE_NAME,
- &rng_chrdev_ops,
-};
-
-
/*
* rng_init - initialize RNG module
*/
@@ -826,15 +852,6 @@
if (rc)
return rc;
- rc = misc_register (&rng_miscdev);
- if (rc) {
- iounmap (rng_mem);
- if (rng_have_mem_region)
- release_mem_region (RNG_ADDR, RNG_ADDR_LEN);
- DPRINTK ("EXIT, returning %d\n", rc);
- return rc;
- }
-
printk (KERN_INFO RNG_DRIVER_NAME " loaded\n");
rng_pdev = pdev;
@@ -859,8 +876,8 @@
rng_sysctl (0);
iounmap (rng_mem);
- if (rng_have_mem_region)
- release_mem_region (RNG_ADDR, RNG_ADDR_LEN);
+
+ rng_pdev = NULL;
DPRINTK ("EXIT\n");
}
@@ -892,8 +909,8 @@
* random as random :)
*/
-static int poker[16] = { 0, }, runs[12] = { 0, };
-static int ones = 0, rlength = -1, current_bit = 0, rng_test = 0;
+static int poker[16], runs[12];
+static int ones, rlength = -1, current_bit, rng_test;
/*
@@ -927,7 +944,7 @@
/* Check if we just failed longrun test */
if (rlength >= 33)
- rng_test &= 8;
+ rng_test |= 8;
rlength = 0;
/* flip the current run type */
last_bit = current_bit;
@@ -955,16 +972,16 @@
else {
runs[5 + (6 * current_bit)]++;
if (rlength >= 33)
- rng_test &= 8;
+ rng_test |= 8;
}
/* Ones test */
if ((ones >= 10346) || (ones <= 9654))
- rng_test &= 1;
+ rng_test |= 1;
/* Poker calcs */
for (i = 0, j = 0; i < 16; i++)
j += poker[i] * poker[i];
if ((j >= 1580457) || (j <= 1562821))
- rng_test &= 2;
+ rng_test |= 2;
if ((runs[0] < 2267) || (runs[0] > 2733) ||
(runs[1] < 1079) || (runs[1] > 1421) ||
(runs[2] < 502) || (runs[2] > 748) ||
@@ -977,7 +994,7 @@
(runs[9] < 223) || (runs[9] > 402) ||
(runs[10] < 90) || (runs[10] > 223) ||
(runs[11] < 90) || (runs[11] > 223)) {
- rng_test &= 4;
+ rng_test |= 4;
}
rng_test = !rng_test;
diff -u --recursive --new-file v2.4.2/linux/drivers/char/istallion.c linux/drivers/char/istallion.c
--- v2.4.2/linux/drivers/char/istallion.c Wed Feb 21 18:20:19 2001
+++ linux/drivers/char/istallion.c Fri Mar 2 11:12:07 2001
@@ -213,12 +213,8 @@
* at 9600 baud, 8 data bits, no parity, 1 stop bit.
*/
static struct termios stli_deftermios = {
- 0,
- 0,
- (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
- 0,
- 0,
- INIT_C_CC
+ c_cflag: (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
+ c_cc: INIT_C_CC,
};
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/char/lp.c linux/drivers/char/lp.c
--- v2.4.2/linux/drivers/char/lp.c Wed Feb 21 18:20:20 2001
+++ linux/drivers/char/lp.c Fri Mar 2 18:43:11 2001
@@ -500,7 +500,7 @@
if (copy_to_user((int *) arg, &LP_STAT(minor),
sizeof(struct lp_stats)))
return -EFAULT;
- if (suser())
+ if (capable(CAP_SYS_ADMIN))
memset(&LP_STAT(minor), 0,
sizeof(struct lp_stats));
break;
diff -u --recursive --new-file v2.4.2/linux/drivers/char/mem.c linux/drivers/char/mem.c
--- v2.4.2/linux/drivers/char/mem.c Wed Feb 21 18:20:20 2001
+++ linux/drivers/char/mem.c Fri Mar 2 18:38:37 2001
@@ -642,6 +642,9 @@
#ifdef CONFIG_FTAPE
ftape_init();
#endif
+#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR)
+ tapechar_init();
+#endif
#if defined(CONFIG_ADB)
adbdev_init();
#endif
diff -u --recursive --new-file v2.4.2/linux/drivers/char/mxser.c linux/drivers/char/mxser.c
--- v2.4.2/linux/drivers/char/mxser.c Wed Dec 6 12:06:18 2000
+++ linux/drivers/char/mxser.c Fri Mar 2 11:12:07 2001
@@ -120,7 +120,7 @@
#define CI104J_ASIC_ID 5
enum {
- MXSER_BOARD_C168_ISA = 0,
+ MXSER_BOARD_C168_ISA = 1,
MXSER_BOARD_C104_ISA,
MXSER_BOARD_CI104J,
MXSER_BOARD_C168_PCI,
@@ -617,16 +617,18 @@
pdev = pci_find_device(mxser_pcibrds[b].vendor_id,
mxser_pcibrds[b].device_id, pdev);
if (!pdev)
- break;
+ {
+ b++;
+ continue;
+ }
if (pci_enable_device(pdev))
continue;
- b++;
hwconf.pdev = pdev;
printk("Found MOXA %s board(BusNo=%d,DevNo=%d)\n",
mxser_brdname[mxser_pcibrds[b].board_type - 1],
pdev->bus->number, PCI_SLOT(pdev->devfn >> 3));
if (m >= MXSER_BOARDS) {
- printk("Too many Smartio family boards find (maximum %d),board not configured\n", MXSER_BOARDS);
+ printk("Too many Smartio family boards found (maximum %d),board not configured\n", MXSER_BOARDS);
} else {
retval = mxser_get_PCI_conf(pdev,
mxser_pcibrds[b].board_type, &hwconf);
@@ -1457,7 +1459,9 @@
if (info->xmit_cnt < WAKEUP_CHARS) {
set_bit(MXSER_EVENT_TXLOW, &info->event);
- schedule_task(&info->tqueue);
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&info->tqueue) == 0)
+ MOD_DEC_USE_COUNT;
}
if (info->xmit_cnt <= 0) {
info->IER &= ~UART_IER_THRI;
@@ -1486,8 +1490,9 @@
else if (!((info->flags & ASYNC_CALLOUT_ACTIVE) &&
(info->flags & ASYNC_CALLOUT_NOHUP)))
set_bit(MXSER_EVENT_HANGUP, &info->event);
- schedule_task(&info->tqueue);
-
+ MOD_INC_USE_COUNT;
+ if (schedule_task(&info->tqueue) == 0)
+ MOD_DEC_USE_COUNT;
}
if (info->flags & ASYNC_CTS_FLOW) {
if (info->tty->hw_stopped) {
@@ -1671,7 +1676,7 @@
*/
if (inb(info->base + UART_LSR) == 0xff) {
restore_flags(flags);
- if (suser()) {
+ if (capable(CAP_SYS_ADMIN)) {
if (info->tty)
set_bit(TTY_IO_ERROR, &info->tty->flags);
return (0);
@@ -2188,8 +2193,7 @@
status = inb(info->base + UART_LSR);
restore_flags(flags);
result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0);
- put_user(result, value);
- return (0);
+ return put_user(result, value);
}
/*
@@ -2229,8 +2233,7 @@
((status & UART_MSR_RI) ? TIOCM_RNG : 0) |
((status & UART_MSR_DSR) ? TIOCM_DSR : 0) |
((status & UART_MSR_CTS) ? TIOCM_CTS : 0);
- put_user(result, value);
- return (0);
+ return put_user(result, value);
}
static int mxser_set_modem_info(struct mxser_struct *info, unsigned int cmd,
diff -u --recursive --new-file v2.4.2/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
--- v2.4.2/linux/drivers/char/pc_keyb.c Wed Feb 21 18:20:20 2001
+++ linux/drivers/char/pc_keyb.c Fri Mar 2 18:38:37 2001
@@ -908,6 +908,8 @@
controller. */
aux_write_ack(AUX_ENABLE_DEV); /* Enable aux device */
kbd_write_cmd(AUX_INTS_ON); /* Enable controller ints */
+
+ mdelay(2); /* Ensure we follow the kbc access delay rules.. */
send_data(KBD_CMD_ENABLE); /* try to workaround toshiba4030cdt problem */
diff -u --recursive --new-file v2.4.2/linux/drivers/char/stallion.c linux/drivers/char/stallion.c
--- v2.4.2/linux/drivers/char/stallion.c Wed Feb 21 18:20:20 2001
+++ linux/drivers/char/stallion.c Fri Mar 2 11:12:07 2001
@@ -165,12 +165,8 @@
* at 9600, 8 data bits, 1 stop bit.
*/
static struct termios stl_deftermios = {
- 0,
- 0,
- (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
- 0,
- 0,
- INIT_C_CC
+ c_cflag: (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
+ c_cc: INIT_C_CC,
};
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/char/tpqic02.c linux/drivers/char/tpqic02.c
--- v2.4.2/linux/drivers/char/tpqic02.c Wed Feb 21 18:20:21 2001
+++ linux/drivers/char/tpqic02.c Fri Mar 2 18:38:37 2001
@@ -30,6 +30,8 @@
*
* You are not allowed to change this line nor the text above.
*
+ * 2001/02/26 Minor s/suser/capable/
+ *
* 1996/10/10 Emerald changes
*
* 1996/05/21 Misc changes+merges+cleanups + I/O reservations
@@ -208,7 +210,7 @@
* must ensure that a large enough buffer is passed to the kernel, in order
* to reduce tape repositioning wear and tear.
*/
-static unsigned long buffaddr; /* physical address of buffer */
+static void *buffaddr; /* virtual address of buffer */
/* This translates minor numbers to the corresponding recording format: */
static const char *format_names[] = {
@@ -1376,7 +1378,7 @@
flags=claim_dma_lock();
clear_dma_ff(QIC02_TAPE_DMA);
set_dma_mode(QIC02_TAPE_DMA, dma_mode);
- set_dma_addr(QIC02_TAPE_DMA, buffaddr+dma_bytes_done); /* full address */
+ set_dma_addr(QIC02_TAPE_DMA, virt_to_bus(buffaddr) + dma_bytes_done);
set_dma_count(QIC02_TAPE_DMA, TAPE_BLKSIZE);
/* start tape DMA controller */
@@ -1921,7 +1923,7 @@
/* copy buffer to user-space in one go */
if (bytes_done>0)
{
- err = copy_to_user( (void *) buf, (void *) bus_to_virt(buffaddr), bytes_done);
+ err = copy_to_user(buf, buffaddr, bytes_done);
if (err)
{
return -EFAULT;
@@ -2074,7 +2076,7 @@
/* copy from user to DMA buffer and initiate transfer. */
if (bytes_todo>0)
{
- err = copy_from_user( (void *) bus_to_virt(buffaddr), (const void *) buf, bytes_todo);
+ err = copy_from_user(buffaddr, buf, bytes_todo);
if (err)
{
return -EFAULT;
@@ -2198,7 +2200,7 @@
if (MINOR(dev)==255) /* special case for resetting */
{
- if (suser())
+ if (capable(CAP_SYS_ADMIN))
{
return (tape_reset(1)==TE_OK) ? -EAGAIN : -ENXIO;
}
@@ -2607,7 +2609,7 @@
CHECK_IOC_SIZE(mtconfiginfo);
- if (!suser())
+ if (!capable(CAP_SYS_ADMIN))
{
return -EPERM;
}
@@ -2780,7 +2782,7 @@
release_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
if (buffaddr)
{
- free_pages(buffaddr, get_order(TPQBUF_SIZE));
+ free_pages((unsigned long)buffaddr, get_order(TPQBUF_SIZE));
}
buffaddr = 0; /* Better to cause a panic than overwite someone else */
status_zombie = YES;
@@ -2830,9 +2832,7 @@
request_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE, TPQIC02_NAME);
/* Setup the page-address for the dma transfer. */
-
- /*** TODO: does _get_dma_pages() really return the physical address?? ****/
- buffaddr = __get_dma_pages(GFP_KERNEL,get_order(TPQBUF_SIZE));
+ buffaddr = (void *)__get_dma_pages(GFP_KERNEL, get_order(TPQBUF_SIZE));
if (!buffaddr)
{
@@ -2840,7 +2840,7 @@
return -EBUSY; /* Not ideal, EAGAIN perhaps? */
}
- memset( (void*) buffaddr, 0, TPQBUF_SIZE );
+ memset(buffaddr, 0, TPQBUF_SIZE);
printk(TPQIC02_NAME ": Settings: IRQ %d, DMA %d, IO 0x%x, IFC %s\n",
QIC02_TAPE_IRQ, QIC02_TAPE_DMA,
diff -u --recursive --new-file v2.4.2/linux/drivers/ide/ide-probe.c linux/drivers/ide/ide-probe.c
--- v2.4.2/linux/drivers/ide/ide-probe.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/ide/ide-probe.c Fri Mar 2 18:38:38 2001
@@ -614,9 +614,14 @@
{
unsigned long flags;
unsigned int index;
- ide_hwgroup_t *hwgroup;
+ ide_hwgroup_t *hwgroup, *new_hwgroup;
ide_hwif_t *match = NULL;
+
+ /* Allocate the buffer and potentially sleep first */
+
+ new_hwgroup = kmalloc(sizeof(ide_hwgroup_t),GFP_KERNEL);
+
save_flags(flags); /* all CPUs */
cli(); /* all CPUs */
@@ -650,10 +655,14 @@
*/
if (match) {
hwgroup = match->hwgroup;
+ if(new_hwgroup)
+ kfree(new_hwgroup);
} else {
- hwgroup = kmalloc(sizeof(ide_hwgroup_t), GFP_KERNEL);
- if (!hwgroup)
+ hwgroup = new_hwgroup;
+ if (!hwgroup) {
+ restore_flags(flags); /* all CPUs */
return 1;
+ }
memset(hwgroup, 0, sizeof(ide_hwgroup_t));
hwgroup->hwif = hwif->next = hwif;
hwgroup->rq = NULL;
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/aic5800.c linux/drivers/ieee1394/aic5800.c
--- v2.4.2/linux/drivers/ieee1394/aic5800.c Wed Oct 11 16:49:47 2000
+++ linux/drivers/ieee1394/aic5800.c Fri Mar 2 18:38:38 2001
@@ -657,7 +657,7 @@
};
}
if ( interruptEvent & INT_BusReset ) {
- PRINT(KERN_INFO, aic->id, "bus reset occured");
+ PRINT(KERN_INFO, aic->id, "bus reset occurred");
if (!host->in_bus_reset) {
hpsb_bus_reset(host);
}
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/csr.c linux/drivers/ieee1394/csr.c
--- v2.4.2/linux/drivers/ieee1394/csr.c Tue Jan 2 16:45:38 2001
+++ linux/drivers/ieee1394/csr.c Thu Mar 1 16:57:11 2001
@@ -403,31 +403,30 @@
}
-struct hpsb_highlevel_ops csr_ops = {
+static struct hpsb_highlevel_ops csr_ops = {
add_host: add_host,
host_reset: host_reset,
};
-struct hpsb_address_ops map_ops = {
+static struct hpsb_address_ops map_ops = {
read: read_maps,
};
-struct hpsb_address_ops fcp_ops = {
+static struct hpsb_address_ops fcp_ops = {
write: write_fcp,
};
-struct hpsb_address_ops reg_ops = {
+static struct hpsb_address_ops reg_ops = {
read: read_regs,
write: write_regs,
lock: lock_regs,
};
+static struct hpsb_highlevel *hl;
void init_csr(void)
{
- struct hpsb_highlevel *hl;
-
hl = hpsb_register_highlevel("standard registers", &csr_ops);
if (hl == NULL) {
HPSB_ERR("out of memory during ieee1394 initialization");
@@ -448,4 +447,9 @@
hpsb_register_addrspace(hl, &map_ops,
CSR_REGISTER_BASE + CSR_SPEED_MAP,
CSR_REGISTER_BASE + CSR_SPEED_MAP_END);
+}
+
+void cleanup_csr(void)
+{
+ hpsb_unregister_highlevel(hl);
}
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/csr.h linux/drivers/ieee1394/csr.h
--- v2.4.2/linux/drivers/ieee1394/csr.h Wed Mar 22 00:02:48 2000
+++ linux/drivers/ieee1394/csr.h Thu Mar 1 16:57:11 2001
@@ -50,5 +50,6 @@
void init_csr(void);
+void cleanup_csr(void);
#endif /* _IEEE1394_CSR_H */
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/guid.c linux/drivers/ieee1394/guid.c
--- v2.4.2/linux/drivers/ieee1394/guid.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/ieee1394/guid.c Thu Mar 1 16:57:11 2001
@@ -219,11 +219,19 @@
host_reset: host_reset,
};
+static struct hpsb_highlevel *hl;
+
void init_ieee1394_guid(void)
{
atomic_set(&outstanding_requests, 0);
- if (!hpsb_register_highlevel("GUID manager", &guid_ops)) {
+ hl = hpsb_register_highlevel("GUID manager", &guid_ops);
+ if (!hl) {
HPSB_ERR("out of memory during ieee1394 initialization");
}
+}
+
+void cleanup_ieee1394_guid(void)
+{
+ hpsb_unregister_highlevel(hl);
}
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/guid.h linux/drivers/ieee1394/guid.h
--- v2.4.2/linux/drivers/ieee1394/guid.h Mon Jun 19 17:59:40 2000
+++ linux/drivers/ieee1394/guid.h Thu Mar 1 16:57:11 2001
@@ -49,6 +49,6 @@
void init_ieee1394_guid(void);
-
+void cleanup_ieee1394_guid(void);
#endif /* _IEEE1394_GUID_H */
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/ieee1394_core.c linux/drivers/ieee1394/ieee1394_core.c
--- v2.4.2/linux/drivers/ieee1394/ieee1394_core.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/ieee1394/ieee1394_core.c Thu Mar 1 16:57:11 2001
@@ -269,7 +269,7 @@
}
/* set self mapping */
- for (i = nodecount - 1; i; i--) {
+ for (i = 0; i < nodecount; i++) {
map[64*i + i] = speedcap[i];
}
@@ -802,6 +802,12 @@
init_ieee1394_guid();
return 0;
+}
+
+void cleanup_module(void)
+{
+ cleanup_ieee1394_guid();
+ cleanup_csr();
}
#endif
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/ohci1394.c linux/drivers/ieee1394/ohci1394.c
--- v2.4.2/linux/drivers/ieee1394/ohci1394.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/ieee1394/ohci1394.c Fri Mar 2 18:38:38 2001
@@ -1129,7 +1129,7 @@
/*
* Problem: How can I ensure that the AT bottom half will be
* executed before the AR bottom half (both events may have
- * occured within a single irq event)
+ * occurred within a single irq event)
* Quick hack: just launch it within the IRQ handler
*/
if (event & OHCI1394_reqTxComplete) {
diff -u --recursive --new-file v2.4.2/linux/drivers/ieee1394/pcilynx.c linux/drivers/ieee1394/pcilynx.c
--- v2.4.2/linux/drivers/ieee1394/pcilynx.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/ieee1394/pcilynx.c Fri Mar 2 18:38:38 2001
@@ -1127,7 +1127,7 @@
if (intmask & PCI_INT_1394) {
if (linkint & LINK_INT_PHY_TIMEOUT) {
- PRINT(KERN_INFO, lynx->id, "PHY timeout occured");
+ PRINT(KERN_INFO, lynx->id, "PHY timeout occurred");
}
if (linkint & LINK_INT_PHY_BUSRESET) {
PRINT(KERN_INFO, lynx->id, "bus reset interrupt");
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/Config.in linux/drivers/isdn/Config.in
--- v2.4.2/linux/drivers/isdn/Config.in Tue Jan 2 16:45:37 2001
+++ linux/drivers/isdn/Config.in Fri Mar 2 11:12:10 2001
@@ -9,7 +9,7 @@
if [ "$CONFIG_ISDN_PPP" != "n" ]; then
bool ' Use VJ-compression with synchronous PPP' CONFIG_ISDN_PPP_VJ
bool ' Support generic MP (RFC 1717)' CONFIG_ISDN_MPP
- dep_tristate ' Support BSD compression (module only)' CONFIG_ISDN_PPP_BSDCOMP m
+ dep_tristate ' Support BSD compression' CONFIG_ISDN_PPP_BSDCOMP $CONFIG_ISDN
fi
fi
bool ' Support audio via ISDN' CONFIG_ISDN_AUDIO
@@ -23,7 +23,7 @@
mainmenu_option next_comment
comment 'ISDN feature submodules'
dep_tristate 'isdnloop support' CONFIG_ISDN_DRV_LOOP $CONFIG_ISDN
- dep_tristate 'Support isdn diversion services' CONFIG_ISDN_DIVERSION $CONFIG_ISDN m
+ dep_tristate 'Support isdn diversion services' CONFIG_ISDN_DIVERSION $CONFIG_ISDN
endmenu
comment 'low-level hardware drivers'
@@ -77,6 +77,9 @@
fi
fi
fi
+
+dep_tristate 'Sedlbauer PCMCIA cards' CONFIG_HISAX_SEDLBAUER_CS $CONFIG_PCMCIA
+
endmenu
### Active ISDN cards
@@ -92,7 +95,7 @@
bool 'Eicon active card support' CONFIG_ISDN_DRV_EICON
if [ "$CONFIG_ISDN_DRV_EICON" != "n" ]; then
if [ "$CONFIG_ISDN_DRV_EICON_OLD" != "y" ]; then
- dep_tristate ' Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS $CONFIG_ISDN
+ dep_tristate ' Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS $CONFIG_ISDN $CONFIG_PCI
fi
if [ "$CONFIG_ISDN_DRV_EICON_DIVAS" != "y" ]; then
dep_tristate ' Legacy Eicon driver' CONFIG_ISDN_DRV_EICON_OLD $CONFIG_ISDN
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/Makefile linux/drivers/isdn/Makefile
--- v2.4.2/linux/drivers/isdn/Makefile Fri Dec 29 14:40:54 2000
+++ linux/drivers/isdn/Makefile Fri Mar 2 11:12:10 2001
@@ -11,8 +11,7 @@
# Multipart objects.
list-multi := isdn.o
-isdn-objs := isdn_net.o isdn_tty.o isdn_cards.o isdn_v110.o \
- isdn_common.o
+isdn-objs := isdn_net.o isdn_tty.o isdn_v110.o isdn_common.o
# Optional parts of multipart objects.
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/act2000/act2000.h linux/drivers/isdn/act2000/act2000.h
--- v2.4.2/linux/drivers/isdn/act2000/act2000.h Wed Feb 21 18:20:22 2001
+++ linux/drivers/isdn/act2000/act2000.h Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: act2000.h,v 1.8 2000/11/12 16:32:06 kai Exp $
+/* $Id: act2000.h,v 1.8.6.2 2001/02/16 16:43:23 kai Exp $
*
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/act2000/capi.c linux/drivers/isdn/act2000/capi.c
--- v2.4.2/linux/drivers/isdn/act2000/capi.c Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/act2000/capi.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: capi.c,v 1.9 2000/11/12 16:32:06 kai Exp $
+/* $Id: capi.c,v 1.9.6.1 2001/02/16 16:43:23 kai Exp $
*
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
* CAPI encoder/decoder
@@ -124,7 +124,7 @@
m->hdr.cmd.cmd = c; \
m->hdr.cmd.subcmd = s; \
m->hdr.msgnum = actcapi_nextsmsg(card); \
- } \
+ } else m = NULL;\
}
#define ACTCAPI_CHKSKB if (!skb) { \
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/act2000/capi.h linux/drivers/isdn/act2000/capi.h
--- v2.4.2/linux/drivers/isdn/act2000/capi.h Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/act2000/capi.h Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: capi.h,v 1.6 2000/11/12 16:32:06 kai Exp $
+/* $Id: capi.h,v 1.6.6.1 2001/02/16 16:43:23 kai Exp $
*
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
*
@@ -44,7 +44,7 @@
char *description;
} actcapi_msgdsc;
-/* CAPI Adress */
+/* CAPI Address */
typedef struct actcapi_addr {
__u8 len; /* Length of element */
__u8 tnp; /* Type/Numbering Plan */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/act2000/module.c linux/drivers/isdn/act2000/module.c
--- v2.4.2/linux/drivers/isdn/act2000/module.c Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/act2000/module.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: module.c,v 1.14 2000/11/12 16:32:06 kai Exp $
+/* $Id: module.c,v 1.14.6.2 2000/12/18 22:14:10 kai Exp $
*
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
*
@@ -24,6 +24,7 @@
#include "act2000.h"
#include "act2000_isa.h"
#include "capi.h"
+#include
static unsigned short act2000_isa_ports[] =
{
@@ -820,12 +821,7 @@
#define DRIVERNAME "IBM Active 2000 ISDN driver"
-#ifdef MODULE
-#define act2000_init init_module
-#endif
-
-int
-act2000_init(void)
+static int __init act2000_init(void)
{
printk(KERN_INFO "%s\n", DRIVERNAME);
if (!cards)
@@ -837,9 +833,7 @@
return 0;
}
-#ifdef MODULE
-void
-cleanup_module(void)
+static void __exit act2000_exit(void)
{
act2000_card *card = cards;
act2000_card *last;
@@ -858,34 +852,5 @@
printk(KERN_INFO "%s unloaded\n", DRIVERNAME);
}
-#else
-void
-act2000_setup(char *str, int *ints)
-{
- int i, j, argc, port, irq, bus;
-
- argc = ints[0];
- i = 1;
- if (argc)
- while (argc) {
- port = irq = -1;
- bus = 0;
- if (argc) {
- bus = ints[i];
- i++;
- argc--;
- }
- if (argc) {
- port = ints[i];
- i++;
- argc--;
- }
- if (argc) {
- irq = ints[i];
- i++;
- argc--;
- }
- act2000_addcard(bus, port, irq, act_id);
- }
-}
-#endif
+module_init(act2000_init);
+module_exit(act2000_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/avm_cs.c linux/drivers/isdn/avmb1/avm_cs.c
--- v2.4.2/linux/drivers/isdn/avmb1/avm_cs.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/isdn/avmb1/avm_cs.c Fri Mar 2 11:12:07 2001
@@ -138,6 +138,8 @@
/* Initialize the dev_link_t structure */
link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
+ if (!link)
+ return NULL;
memset(link, 0, sizeof(struct dev_link_t));
link->release.function = &avmcs_release;
link->release.data = (u_long)link;
@@ -169,6 +171,8 @@
/* Allocate space for private device-specific data */
local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
+ if (!local)
+ return NULL;
memset(local, 0, sizeof(local_info_t));
link->priv = local;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/b1.c linux/drivers/isdn/avmb1/b1.c
--- v2.4.2/linux/drivers/isdn/avmb1/b1.c Tue Nov 28 21:43:13 2000
+++ linux/drivers/isdn/avmb1/b1.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,14 @@
/*
- * $Id: b1.c,v 1.20 2000/11/23 20:45:14 kai Exp $
+ * $Id: b1.c,v 1.20.6.1 2001/02/13 11:43:29 kai Exp $
*
* Common module for AVM B1 cards.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1.c,v $
+ * Revision 1.20.6.1 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.20 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
@@ -117,7 +120,7 @@
#include "capicmd.h"
#include "capiutil.h"
-static char *revision = "$Revision: 1.20 $";
+static char *revision = "$Revision: 1.20.6.1 $";
/* ------------------------------------------------------------- */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/b1dma.c linux/drivers/isdn/avmb1/b1dma.c
--- v2.4.2/linux/drivers/isdn/avmb1/b1dma.c Tue Nov 28 21:43:13 2000
+++ linux/drivers/isdn/avmb1/b1dma.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,14 @@
/*
- * $Id: b1dma.c,v 1.11 2000/11/19 17:02:47 kai Exp $
+ * $Id: b1dma.c,v 1.11.6.1 2001/02/13 11:43:29 kai Exp $
*
* Common module for AVM B1 cards that support dma with AMCC
*
* (c) Copyright 2000 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1dma.c,v $
+ * Revision 1.11.6.1 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.11 2000/11/19 17:02:47 kai
* compatibility cleanup - part 3
*
@@ -62,7 +65,7 @@
#include "capicmd.h"
#include "capiutil.h"
-static char *revision = "$Revision: 1.11 $";
+static char *revision = "$Revision: 1.11.6.1 $";
/* ------------------------------------------------------------- */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/b1isa.c linux/drivers/isdn/avmb1/b1isa.c
--- v2.4.2/linux/drivers/isdn/avmb1/b1isa.c Tue Nov 28 21:43:13 2000
+++ linux/drivers/isdn/avmb1/b1isa.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,17 @@
/*
- * $Id: b1isa.c,v 1.10 2000/11/23 20:45:14 kai Exp $
+ * $Id: b1isa.c,v 1.10.6.2 2001/02/16 16:43:23 kai Exp $
*
* Module for AVM B1 ISA-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1isa.c,v $
+ * Revision 1.10.6.2 2001/02/16 16:43:23 kai
+ * Changes from -ac16, little bug fixes, typos and the like
+ *
+ * Revision 1.10.6.1 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.10 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
@@ -24,7 +30,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.6 2000/01/25 14:37:39 calle
- * new message after successfull detection including card revision and
+ * new message after successful detection including card revision and
* used resources.
*
* Revision 1.5 1999/11/05 16:38:01 calle
@@ -83,7 +89,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.10 $";
+static char *revision = "$Revision: 1.10.6.2 $";
/* ------------------------------------------------------------- */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/b1pcmcia.c linux/drivers/isdn/avmb1/b1pcmcia.c
--- v2.4.2/linux/drivers/isdn/avmb1/b1pcmcia.c Tue Nov 28 21:43:13 2000
+++ linux/drivers/isdn/avmb1/b1pcmcia.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,17 @@
/*
- * $Id: b1pcmcia.c,v 1.12 2000/11/23 20:45:14 kai Exp $
+ * $Id: b1pcmcia.c,v 1.12.6.2 2001/02/16 16:43:23 kai Exp $
*
* Module for AVM B1/M1/M2 PCMCIA-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1pcmcia.c,v $
+ * Revision 1.12.6.2 2001/02/16 16:43:23 kai
+ * Changes from -ac16, little bug fixes, typos and the like
+ *
+ * Revision 1.12.6.1 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.12 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
@@ -33,7 +39,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.6 2000/01/25 14:37:39 calle
- * new message after successfull detection including card revision and
+ * new message after successful detection including card revision and
* used resources.
*
* Revision 1.5 1999/11/05 16:38:01 calle
@@ -93,7 +99,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.12 $";
+static char *revision = "$Revision: 1.12.6.2 $";
/* ------------------------------------------------------------- */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/c4.c linux/drivers/isdn/avmb1/c4.c
--- v2.4.2/linux/drivers/isdn/avmb1/c4.c Tue Nov 28 21:44:41 2000
+++ linux/drivers/isdn/avmb1/c4.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,17 @@
/*
- * $Id: c4.c,v 1.20.6.1 2000/11/28 12:02:45 kai Exp $
+ * $Id: c4.c,v 1.20.6.3 2001/02/16 16:43:23 kai Exp $
*
* Module for AVM C4 card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: c4.c,v $
+ * Revision 1.20.6.3 2001/02/16 16:43:23 kai
+ * Changes from -ac16, little bug fixes, typos and the like
+ *
+ * Revision 1.20.6.2 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.20.6.1 2000/11/28 12:02:45 kai
* MODULE_DEVICE_TABLE for 2.4
*
@@ -75,7 +81,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.3 2000/01/25 14:37:39 calle
- * new message after successfull detection including card revision and
+ * new message after successful detection including card revision and
* used resources.
*
* Revision 1.2 2000/01/21 20:52:58 keil
@@ -106,7 +112,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.20.6.1 $";
+static char *revision = "$Revision: 1.20.6.3 $";
#undef CONFIG_C4_DEBUG
#undef CONFIG_C4_POLLDEBUG
@@ -1330,7 +1336,6 @@
add_card: 0, /* no add_card function */
};
-
static int ncards = 0;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/capi.c linux/drivers/isdn/avmb1/capi.c
--- v2.4.2/linux/drivers/isdn/avmb1/capi.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/isdn/avmb1/capi.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,17 @@
/*
- * $Id: capi.c,v 1.44.6.3 2000/12/17 22:45:08 kai Exp $
+ * $Id: capi.c,v 1.44.6.5 2001/02/13 11:43:29 kai Exp $
*
* CAPI 2.0 Interface for Linux
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capi.c,v $
+ * Revision 1.44.6.5 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
+ * Revision 1.44.6.4 2001/02/10 14:41:20 kai
+ * Changes from kernel tree
+ *
* Revision 1.44.6.3 2000/12/17 22:45:08 kai
* That's hopefully it for test13-4
*
@@ -253,7 +259,7 @@
#include "capifs.h"
#endif
-static char *revision = "$Revision: 1.44.6.3 $";
+static char *revision = "$Revision: 1.44.6.5 $";
MODULE_AUTHOR("Carsten Paeth (calle@calle.in-berlin.de)");
@@ -1317,7 +1323,6 @@
#ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capi_raw_open %d\n", GET_USE_COUNT(THIS_MODULE));
#endif
-
mp->datahandle = 0;
mp->file = file;
file->private_data = (void *)mp;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/capidrv.c linux/drivers/isdn/avmb1/capidrv.c
--- v2.4.2/linux/drivers/isdn/avmb1/capidrv.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/isdn/avmb1/capidrv.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,17 @@
/*
- * $Id: capidrv.c,v 1.39 2000/11/23 20:45:14 kai Exp $
+ * $Id: capidrv.c,v 1.39.6.2 2001/02/13 11:43:29 kai Exp $
*
* ISDN4Linux Driver, using capi20 interface (kernelcapi)
*
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capidrv.c,v $
+ * Revision 1.39.6.2 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
+ * Revision 1.39.6.1 2001/02/10 14:41:20 kai
+ * Changes from kernel tree
+ *
* Revision 1.39 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
@@ -219,7 +225,7 @@
#include "capicmd.h"
#include "capidrv.h"
-static char *revision = "$Revision: 1.39 $";
+static char *revision = "$Revision: 1.39.6.2 $";
static int debugmode = 0;
MODULE_AUTHOR("Carsten Paeth ");
@@ -488,7 +494,7 @@
}
-/* -------- controller managment ------------------------------------- */
+/* -------- controller management ------------------------------------- */
static inline capidrv_contr *findcontrbydriverid(int driverid)
{
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/capifs.c linux/drivers/isdn/avmb1/capifs.c
--- v2.4.2/linux/drivers/isdn/avmb1/capifs.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/isdn/avmb1/capifs.c Fri Mar 2 11:12:07 2001
@@ -1,11 +1,17 @@
/*
- * $Id: capifs.c,v 1.14.6.1 2000/11/28 12:02:45 kai Exp $
+ * $Id: capifs.c,v 1.14.6.3 2001/02/13 11:43:29 kai Exp $
*
* (c) Copyright 2000 by Carsten Paeth (calle@calle.de)
*
* Heavily based on devpts filesystem from H. Peter Anvin
*
* $Log: capifs.c,v $
+ * Revision 1.14.6.3 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
+ * Revision 1.14.6.2 2001/02/10 14:41:20 kai
+ * Changes from kernel tree
+ *
* Revision 1.14.6.1 2000/11/28 12:02:45 kai
* MODULE_DEVICE_TABLE for 2.4
*
@@ -93,7 +99,7 @@
MODULE_AUTHOR("Carsten Paeth ");
-static char *revision = "$Revision: 1.14.6.1 $";
+static char *revision = "$Revision: 1.14.6.3 $";
struct capifs_ncci {
struct inode *inode;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/capiutil.c linux/drivers/isdn/avmb1/capiutil.c
--- v2.4.2/linux/drivers/isdn/avmb1/capiutil.c Tue Nov 28 21:43:13 2000
+++ linux/drivers/isdn/avmb1/capiutil.c Fri Mar 2 11:12:07 2001
@@ -1,5 +1,5 @@
/*
- * $Id: capiutil.c,v 1.13 2000/11/23 20:45:14 kai Exp $
+ * $Id: capiutil.c,v 1.13.6.1 2001/02/13 11:43:29 kai Exp $
*
* CAPI 2.0 convert capi message to capi message struct
*
@@ -7,6 +7,9 @@
* Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capiutil.c,v $
+ * Revision 1.13.6.1 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.13 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/kcapi.c linux/drivers/isdn/avmb1/kcapi.c
--- v2.4.2/linux/drivers/isdn/avmb1/kcapi.c Fri Dec 29 14:07:22 2000
+++ linux/drivers/isdn/avmb1/kcapi.c Fri Mar 2 11:12:08 2001
@@ -1,11 +1,14 @@
/*
- * $Id: kcapi.c,v 1.21.6.1 2000/12/10 23:39:19 kai Exp $
+ * $Id: kcapi.c,v 1.21.6.2 2001/02/13 11:43:29 kai Exp $
*
* Kernel CAPI 2.0 Module
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: kcapi.c,v $
+ * Revision 1.21.6.2 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.21.6.1 2000/12/10 23:39:19 kai
* in 2.4 we don't have tq_scheduler anymore.
* also add one supported card to hfc_pci.c
@@ -136,7 +139,7 @@
#include
#endif
-static char *revision = "$Revision: 1.21.6.1 $";
+static char *revision = "$Revision: 1.21.6.2 $";
/* ------------------------------------------------------------- */
@@ -814,7 +817,7 @@
}
}
/*
- * ncci managment
+ * ncci management
*/
static void controllercb_new_ncci(struct capi_ctr * card,
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/t1isa.c linux/drivers/isdn/avmb1/t1isa.c
--- v2.4.2/linux/drivers/isdn/avmb1/t1isa.c Tue Nov 28 21:43:13 2000
+++ linux/drivers/isdn/avmb1/t1isa.c Fri Mar 2 11:12:08 2001
@@ -1,11 +1,17 @@
/*
- * $Id: t1isa.c,v 1.16 2000/11/23 20:45:14 kai Exp $
+ * $Id: t1isa.c,v 1.16.6.2 2001/02/16 16:43:24 kai Exp $
*
* Module for AVM T1 HEMA-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: t1isa.c,v $
+ * Revision 1.16.6.2 2001/02/16 16:43:24 kai
+ * Changes from -ac16, little bug fixes, typos and the like
+ *
+ * Revision 1.16.6.1 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.16 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
@@ -33,7 +39,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.9 2000/01/25 14:37:39 calle
- * new message after successfull detection including card revision and
+ * new message after successful detection including card revision and
* used resources.
*
* Revision 1.8 1999/11/05 16:38:01 calle
@@ -104,7 +110,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.16 $";
+static char *revision = "$Revision: 1.16.6.2 $";
/* ------------------------------------------------------------- */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/t1pci.c linux/drivers/isdn/avmb1/t1pci.c
--- v2.4.2/linux/drivers/isdn/avmb1/t1pci.c Tue Nov 28 21:44:41 2000
+++ linux/drivers/isdn/avmb1/t1pci.c Fri Mar 2 11:12:08 2001
@@ -1,11 +1,14 @@
/*
- * $Id: t1pci.c,v 1.13.6.1 2000/11/28 12:02:45 kai Exp $
+ * $Id: t1pci.c,v 1.13.6.2 2001/02/13 11:43:29 kai Exp $
*
* Module for AVM T1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: t1pci.c,v $
+ * Revision 1.13.6.2 2001/02/13 11:43:29 kai
+ * more compatility changes for 2.2.19
+ *
* Revision 1.13.6.1 2000/11/28 12:02:45 kai
* MODULE_DEVICE_TABLE for 2.4
*
@@ -88,7 +91,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.13.6.1 $";
+static char *revision = "$Revision: 1.13.6.2 $";
#undef CONFIG_T1PCI_DEBUG
#undef CONFIG_T1PCI_POLLDEBUG
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/divert/divert_init.c linux/drivers/isdn/divert/divert_init.c
--- v2.4.2/linux/drivers/isdn/divert/divert_init.c Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/divert/divert_init.c Fri Mar 2 11:12:08 2001
@@ -1,5 +1,5 @@
/*
- * $Id: divert_init.c,v 1.5 2000/11/13 22:51:47 kai Exp $
+ * $Id: divert_init.c,v 1.5.6.2 2001/01/24 22:18:17 kai Exp $
*
* Module init for DSS1 diversion services for i4l.
*
@@ -23,6 +23,7 @@
#include
#include
+#include
#include "isdn_divert.h"
/********************/
@@ -46,7 +47,7 @@
/* Module interface code */
/* no cmd line parms */
/*************************/
-int init_module(void)
+static int __init divert_init(void)
{ int i;
if (divert_dev_init())
@@ -63,12 +64,12 @@
#endif
printk(KERN_INFO "dss1_divert module successfully installed\n");
return(0);
-} /* init_module */
+}
/**********************/
/* Module deinit code */
/**********************/
-void cleanup_module(void)
+static void __exit divert_exit(void)
{ int flags;
int i;
@@ -89,6 +90,8 @@
deleterule(-1); /* delete all rules and free mem */
deleteprocs();
printk(KERN_INFO "dss1_divert module successfully removed \n");
-} /* cleanup_module */
+}
+module_init(divert_init);
+module_exit(divert_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/divert/isdn_divert.c linux/drivers/isdn/divert/isdn_divert.c
--- v2.4.2/linux/drivers/isdn/divert/isdn_divert.c Wed Feb 21 18:20:22 2001
+++ linux/drivers/isdn/divert/isdn_divert.c Fri Mar 2 11:12:08 2001
@@ -1,5 +1,5 @@
/*
- * $Id: isdn_divert.c,v 1.6.6.1 2001/02/07 11:31:31 kai Exp $
+ * $Id: isdn_divert.c,v 1.6.6.2 2001/02/16 16:43:25 kai Exp $
*
* DSS1 main diversion supplementary handling for i4l.
*
@@ -290,7 +290,7 @@
/* insert a new rule before idx */
/********************************/
int insertrule(int idx, divert_rule *newrule)
-{ struct deflect_struc *ds,*ds1;
+{ struct deflect_struc *ds,*ds1=NULL;
int flags;
if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc),
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/Divas_mod.c linux/drivers/isdn/eicon/Divas_mod.c
--- v2.4.2/linux/drivers/isdn/eicon/Divas_mod.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/eicon/Divas_mod.c Fri Mar 2 11:12:08 2001
@@ -1,13 +1,6 @@
/*
*
- * Copyright (C) Eicon Technology Corporation, 2000.
- *
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
- * Eicon File Revision : 1.15
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@@ -26,6 +19,7 @@
#include
+#include
#include
#undef N_DATA
@@ -40,27 +34,23 @@
#include "adapter.h"
#include "uxio.h"
+
#ifdef MODULE
#include "idi.h"
void DIVA_DIDD_Write(DESCRIPTOR *, int);
EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Read);
EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Write);
EXPORT_SYMBOL_NOVERS(DivasPrintf);
-#define Divas_init init_module
-#else
-#define Divas_init eicon_init
#endif
-extern char *file_check(void);
-
int DivasCardsDiscover(void);
-int
-Divas_init(void)
+static int __init
+divas_init(void)
{
printk(KERN_DEBUG "DIVA Server Driver - initialising\n");
- printk(KERN_DEBUG "DIVA Server Driver - Version 2.0.15 (%s)\n",file_check());
+ printk(KERN_DEBUG "DIVA Server Driver - Version 2.0.16\n");
#if !defined(CONFIG_PCI)
@@ -85,9 +75,8 @@
return 0;
}
-#ifdef MODULE
-void
-cleanup_module(void)
+static void __exit
+divas_exit(void)
{
card_t *pCard;
word wCardIndex;
@@ -156,15 +145,6 @@
unregister_chrdev(Divas_major, "Divas");
}
-void mod_inc_use_count(void)
-{
- MOD_INC_USE_COUNT;
-}
-
-void mod_dec_use_count(void)
-{
- MOD_DEC_USE_COUNT;
-}
-
-#endif
+module_init(divas_init);
+module_exit(divas_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/Makefile linux/drivers/isdn/eicon/Makefile
--- v2.4.2/linux/drivers/isdn/eicon/Makefile Fri Dec 29 14:40:54 2000
+++ linux/drivers/isdn/eicon/Makefile Fri Mar 2 11:12:08 2001
@@ -12,10 +12,9 @@
list-multi := eicon.o divas.o
eicon-objs := eicon_mod.o eicon_isa.o eicon_pci.o eicon_idi.o \
- eicon_io.o fcheck.o
+ eicon_io.o
divas-objs := common.o idi.o bri.o pri.o log.o xlog.o kprintf.o fpga.o \
- fourbri.o lincfg.o linchr.o linsys.o linio.o fcheck.o \
- Divas_mod.o
+ fourbri.o lincfg.o linchr.o linsys.o linio.o Divas_mod.o
# Optional parts of multipart objects.
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/adapter.h linux/drivers/isdn/eicon/adapter.h
--- v2.4.2/linux/drivers/isdn/eicon/adapter.h Mon Dec 11 13:21:41 2000
+++ linux/drivers/isdn/eicon/adapter.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.7
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/bri.c linux/drivers/isdn/eicon/bri.c
--- v2.4.2/linux/drivers/isdn/eicon/bri.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/bri.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.8
*
* This program is free software; you can redistribute it and/or modify
@@ -63,6 +60,7 @@
void io_inc(ADAPTER *a, void *adr);
static int diva_server_bri_test_int(card_t *card);
+static int bri_ISR (card_t* card);
#define PLX_IOBASE 0
#define DIVAS_IOBASE 1
@@ -80,7 +78,6 @@
void UxCardPortIoOutW(ux_diva_card_t *card, byte *base, int offset, word);
int DivasBRIInitPCI(card_t *card, dia_card_t *cfg);
-int bri_ISR (card_t* card);
static
int diva_server_bri_reset(card_t *card)
@@ -361,7 +358,7 @@
UxCardPortIoOut(card->hw, DivasIOBase, REG_DATA, config->nt2);
UxCardPortIoOutW(card->hw, DivasIOBase, REG_ADDRLO, 10);
- UxCardPortIoOut(card->hw, DivasIOBase, REG_DATA, 0);
+ UxCardPortIoOut(card->hw, DivasIOBase, REG_DATA, config->sig_flags);
UxCardPortIoOutW(card->hw, DivasIOBase, REG_ADDRLO, 11);
UxCardPortIoOut(card->hw, DivasIOBase, REG_DATA, config->watchdog);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/common.c linux/drivers/isdn/eicon/common.c
--- v2.4.2/linux/drivers/isdn/eicon/common.c Wed Sep 27 13:45:40 2000
+++ linux/drivers/isdn/eicon/common.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.15
*
* This program is free software; you can redistribute it and/or modify
@@ -101,7 +98,6 @@
return;
}
-static
void DIVA_DIDD_Write(DESCRIPTOR *table, int tablelength)
{
if (tablelength > sizeof(DIDD_Table))
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/constant.h linux/drivers/isdn/eicon/constant.h
--- v2.4.2/linux/drivers/isdn/eicon/constant.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/constant.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/divalog.h linux/drivers/isdn/eicon/divalog.h
--- v2.4.2/linux/drivers/isdn/eicon/divalog.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/divalog.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/divas.h linux/drivers/isdn/eicon/divas.h
--- v2.4.2/linux/drivers/isdn/eicon/divas.h Mon Dec 11 13:21:41 2000
+++ linux/drivers/isdn/eicon/divas.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.5
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/dsp_defs.h linux/drivers/isdn/eicon/dsp_defs.h
--- v2.4.2/linux/drivers/isdn/eicon/dsp_defs.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/dsp_defs.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/dspdids.h linux/drivers/isdn/eicon/dspdids.h
--- v2.4.2/linux/drivers/isdn/eicon/dspdids.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/dspdids.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/eicon.h linux/drivers/isdn/eicon/eicon.h
--- v2.4.2/linux/drivers/isdn/eicon/eicon.h Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/eicon/eicon.h Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon.h,v 1.23 2000/06/21 11:28:42 armin Exp $
+/* $Id: eicon.h,v 1.23.6.2 2001/02/13 11:43:30 kai Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
*
@@ -150,7 +150,6 @@
#include
#include
-
typedef struct {
__u16 length __attribute__ ((packed)); /* length of data/parameter field */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/eicon_idi.c linux/drivers/isdn/eicon/eicon_idi.c
--- v2.4.2/linux/drivers/isdn/eicon/eicon_idi.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/eicon_idi.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon_idi.c,v 1.41 2000/08/12 18:00:47 armin Exp $
+/* $Id: eicon_idi.c,v 1.41.6.1 2001/02/10 14:44:09 kai Exp $
*
* ISDN lowlevel-module for Eicon active cards.
* IDI interface
@@ -36,7 +36,7 @@
#undef EICON_FULL_SERVICE_OKTETT
-char *eicon_idi_revision = "$Revision: 1.41 $";
+char *eicon_idi_revision = "$Revision: 1.41.6.1 $";
eicon_manifbuf *manbuf;
@@ -2506,7 +2506,7 @@
case ISDN_PROTO_L2_TRANS:
idi_do_req(ccard, chan, N_CONNECT, 1);
break;
- default:
+ default:;
/* On most incoming calls we use automatic connect */
/* idi_do_req(ccard, chan, N_CONNECT, 1); */
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/eicon_io.c linux/drivers/isdn/eicon/eicon_io.c
--- v2.4.2/linux/drivers/isdn/eicon/eicon_io.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/eicon_io.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon_io.c,v 1.13 2000/05/07 08:51:04 armin Exp $
+/* $Id: eicon_io.c,v 1.13.6.1 2001/02/16 09:09:50 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
* Code for communicating with hardware.
@@ -6,7 +6,7 @@
* Copyright 1999,2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
- * Thanks to Eicon Technology GmbH & Co. oHG for
+ * Thanks to Eicon Networks for
* documents, informations and hardware.
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/eicon_mod.c linux/drivers/isdn/eicon/eicon_mod.c
--- v2.4.2/linux/drivers/isdn/eicon/eicon_mod.c Wed Sep 27 13:45:40 2000
+++ linux/drivers/isdn/eicon/eicon_mod.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon_mod.c,v 1.37 2000/09/02 11:16:47 armin Exp $
+/* $Id: eicon_mod.c,v 1.37.6.4 2001/02/16 09:09:50 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
*
@@ -6,7 +6,7 @@
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
- * Thanks to Eicon Technology GmbH & Co. oHG for
+ * Thanks to Eicon Networks for
* documents, informations and hardware.
*
* Deutsche Mailbox Saar-Lor-Lux GmbH
@@ -32,7 +32,7 @@
#define DRIVERNAME "Eicon active ISDN driver"
#define DRIVERRELEASE "2.0"
-#define DRIVERPATCH ".15"
+#define DRIVERPATCH ".16"
#include
@@ -55,7 +55,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
-static char *eicon_revision = "$Revision: 1.37 $";
+static char *eicon_revision = "$Revision: 1.37.6.4 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
@@ -64,9 +64,6 @@
extern int do_ioctl(struct inode *pDivasInode, struct file *pDivasFile,
unsigned int command, unsigned long arg);
extern void eicon_pci_init_conf(eicon_card *card);
-void mod_inc_use_count(void);
-void mod_dec_use_count(void);
-extern char *file_check(void);
#ifdef MODULE
#define MOD_USE_COUNT (GET_USE_COUNT (&__this_module))
@@ -377,7 +374,7 @@
#ifdef MODULE
case EICON_IOCTL_FREEIT:
while (MOD_USE_COUNT > 0) MOD_DEC_USE_COUNT;
- mod_inc_use_count();
+ MOD_INC_USE_COUNT;
return 0;
#endif
case EICON_IOCTL_LOADPCI:
@@ -573,14 +570,10 @@
eicon_log(card, 1, "eicon CMD_GETSIL not implemented\n");
return 0;
case ISDN_CMD_LOCK:
-#ifdef MODULE
- mod_inc_use_count();
-#endif
+ MOD_INC_USE_COUNT;
return 0;
case ISDN_CMD_UNLOCK:
-#ifdef MODULE
- mod_dec_use_count();
-#endif
+ MOD_DEC_USE_COUNT;
return 0;
#ifdef CONFIG_ISDN_TTY_FAX
case ISDN_CMD_FAXCMD:
@@ -1177,8 +1170,7 @@
return 0;
}
-#ifdef MODULE
-static void
+static void __exit
unregister_card(eicon_card * card)
{
isdn_ctrl cmd;
@@ -1204,7 +1196,6 @@
break;
}
}
-#endif /* MODULE */
static void
eicon_freecard(eicon_card *card) {
@@ -1311,11 +1302,7 @@
}
-#ifdef MODULE
-#define eicon_init init_module
-#endif
-
-int
+static int __init
eicon_init(void)
{
int card_count = 0;
@@ -1341,8 +1328,8 @@
#endif
strcpy(tmprev, eicon_idi_revision);
printk("%s\n", eicon_getrev(tmprev));
- printk(KERN_INFO "%s Release: %s%s (%s)\n", DRIVERNAME,
- DRIVERRELEASE, DRIVERPATCH, file_check());
+ printk(KERN_INFO "%s Release: %s%s\n", DRIVERNAME,
+ DRIVERRELEASE, DRIVERPATCH);
#ifdef CONFIG_ISDN_DRV_EICON_ISA
#ifdef CONFIG_MCA
@@ -1391,19 +1378,6 @@
return 0;
}
-
-#ifdef MODULE
-
-void mod_inc_use_count(void)
-{
- MOD_INC_USE_COUNT;
-}
-
-void mod_dec_use_count(void)
-{
- MOD_DEC_USE_COUNT;
-}
-
#ifdef CONFIG_ISDN_DRV_EICON_PCI
void DIVA_DIDD_Write(DESCRIPTOR *, int);
EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Read);
@@ -1414,8 +1388,8 @@
card_t DivasCards[1];
#endif
-void
-cleanup_module(void)
+static void __exit
+eicon_exit(void)
{
#if CONFIG_PCI
#ifdef CONFIG_ISDN_DRV_EICON_PCI
@@ -1499,7 +1473,7 @@
printk(KERN_INFO "%s unloaded\n", DRIVERNAME);
}
-#else /* no module */
+#ifndef MODULE
static int __init
eicon_setup(char *line)
@@ -1712,3 +1686,5 @@
#endif /* CONFIG_MCA */
#endif /* CONFIG_ISDN_DRV_EICON_ISA */
+module_init(eicon_init);
+module_exit(eicon_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/eicon_pci.c linux/drivers/isdn/eicon/eicon_pci.c
--- v2.4.2/linux/drivers/isdn/eicon/eicon_pci.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/eicon_pci.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: eicon_pci.c,v 1.15 2000/06/12 12:44:02 armin Exp $
+/* $Id: eicon_pci.c,v 1.15.6.2 2001/02/16 09:09:50 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
* Hardware-specific code for PCI cards.
@@ -6,7 +6,7 @@
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
- * Thanks to Eicon Technology GmbH & Co. oHG for
+ * Thanks to Eicon Networks for
* documents, informations and hardware.
*
* This program is free software; you can redistribute it and/or modify
@@ -35,7 +35,7 @@
#include "adapter.h"
#include "uxio.h"
-char *eicon_pci_revision = "$Revision: 1.15 $";
+char *eicon_pci_revision = "$Revision: 1.15.6.2 $";
#if CONFIG_PCI /* intire stuff is only for PCI */
#ifdef CONFIG_ISDN_DRV_EICON_PCI
@@ -86,7 +86,7 @@
printk(KERN_INFO "%s: DriverID='%s' CardID=%d\n",
eicon_ctype_name[ctype], did, card_id);
}
-err:
+err:;
}
pCard++;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/fcheck.c linux/drivers/isdn/eicon/fcheck.c
--- v2.4.2/linux/drivers/isdn/eicon/fcheck.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/fcheck.c Wed Dec 31 16:00:00 1969
@@ -1,31 +0,0 @@
-/* $Id: fcheck.c,v 1.3 2000/06/12 12:44:02 armin Exp $
- *
- * (c) 2000 Cytronics & Melware
- *
- * This file is (c) under GNU PUBLIC LICENSE
- * For changes and modifications please read
- * ../../../Documentation/isdn/README.eicon
- *
- *
- */
-
-#include
-
-char *
-file_check(void) {
-
-#ifdef FILECHECK
-#if FILECHECK == 0
- return("verified");
-#endif
-#if FILECHECK == 1
- return("modified");
-#endif
-#if FILECHECK == 127
- return("verification failed");
-#endif
-#else
- return("not verified");
-#endif
-}
-
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/fourbri.c linux/drivers/isdn/eicon/fourbri.c
--- v2.4.2/linux/drivers/isdn/eicon/fourbri.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/fourbri.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.7
*
* This program is free software; you can redistribute it and/or modify
@@ -67,7 +64,7 @@
void mem_inc(ADAPTER *a, void *adr);
int Divas4BRIInitPCI(card_t *card, dia_card_t *cfg);
-int fourbri_ISR (card_t* card);
+static int fourbri_ISR (card_t* card);
int FPGA_Download(word, dword, byte *, byte *, int);
extern byte FPGA_Bytes[];
@@ -113,7 +110,7 @@
UxCardMemOut(card->hw, &shared[ 8], config->tei);
UxCardMemOut(card->hw, &shared[ 9], config->nt2);
- UxCardMemOut(card->hw, &shared[10], 0);
+ UxCardMemOut(card->hw, &shared[10], config->sig_flags);
UxCardMemOut(card->hw, &shared[11], config->watchdog);
UxCardMemOut(card->hw, &shared[12], config->permanent);
UxCardMemOut(card->hw, &shared[13], config->x_interface);
@@ -561,23 +558,16 @@
}*/
-int fourbri_ISR (card_t* card)
+static int fourbri_ISR (card_t* card)
{
- int served = 0;
byte *ctl;
- byte *reg = UxCardMemAttach(card->hw, DIVAS_REG_MEMORY);
- if (UxCardPortIoIn(card->hw, reg, PLX9054_INTCSR) & 0x80)
- {
- served = 1;
- card->int_pend += 1;
- DivasDpcSchedule(); /* ISR DPC */
+ card->int_pend += 1;
+ DivasDpcSchedule(); /* ISR DPC */
- ctl = UxCardMemAttach(card->hw, DIVAS_CTL_MEMORY);
- UxCardMemOut(card->hw, &ctl[MQ_BREG_IRQ_TEST], MQ_IRQ_REQ_OFF);
- UxCardMemDetach(card->hw, ctl);
- }
+ ctl = UxCardMemAttach(card->hw, DIVAS_CTL_MEMORY);
+ UxCardMemOut(card->hw, &ctl[MQ_BREG_IRQ_TEST], MQ_IRQ_REQ_OFF);
+ UxCardMemDetach(card->hw, ctl);
- UxCardMemDetach(card->hw, reg);
- return (served != 0);
+ return (1);
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/fpga.c linux/drivers/isdn/eicon/fpga.c
--- v2.4.2/linux/drivers/isdn/eicon/fpga.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/fpga.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.2
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/idi.c linux/drivers/isdn/eicon/idi.c
--- v2.4.2/linux/drivers/isdn/eicon/idi.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/idi.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.8
*
* This program is free software; you can redistribute it and/or modify
@@ -248,13 +245,13 @@
/*
* IDI request function for active cards
*/
-
static
void request(card_t *card, ENTITY *e)
{
word *special_req;
int i;
int ipl;
+
if (card->log_types & DIVAS_LOG_IDI)
{
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/idi.h linux/drivers/isdn/eicon/idi.h
--- v2.4.2/linux/drivers/isdn/eicon/idi.h Mon Dec 11 13:21:41 2000
+++ linux/drivers/isdn/eicon/idi.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
@@ -65,7 +62,7 @@
struct postcall_s {
word command; /* command = 0x0300 */
word dummy; /* not used */
- IDI_CALL callback; /* routine adress to call back */
+ IDI_CALL callback; /* routine address to call back */
ENTITY *contxt; /* ptr to entity to use */
};
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/kprintf.c linux/drivers/isdn/eicon/kprintf.c
--- v2.4.2/linux/drivers/isdn/eicon/kprintf.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/kprintf.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.3
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/lincfg.c linux/drivers/isdn/eicon/lincfg.c
--- v2.4.2/linux/drivers/isdn/eicon/lincfg.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/lincfg.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.9
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/linchr.c linux/drivers/isdn/eicon/linchr.c
--- v2.4.2/linux/drivers/isdn/eicon/linchr.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/eicon/linchr.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.12
*
* This program is free software; you can redistribute it and/or modify
@@ -24,6 +21,8 @@
*
*/
+#define __NO_VERSION__
+#include
#include
#include
@@ -240,14 +239,12 @@
return 0;
}
-int private_usage_count;
-extern void mod_inc_use_count(void);
-extern void mod_dec_use_count(void);
+static int private_usage_count;
int do_open(struct inode *pInode, struct file *pFile)
{
-#if defined(MODULE)
- mod_inc_use_count();
+ MOD_INC_USE_COUNT;
+#ifdef MODULE
private_usage_count++;
#endif
return 0;
@@ -255,8 +252,8 @@
int do_release(struct inode *pInode, struct file *pFile)
{
-#if defined(MODULE)
- mod_dec_use_count();
+ MOD_DEC_USE_COUNT;
+#ifdef MODULE
private_usage_count--;
#endif
return 0;
@@ -267,8 +264,6 @@
while (private_usage_count > 0)
{
private_usage_count--;
-#if defined(MODULE)
- mod_dec_use_count();
-#endif
+ MOD_DEC_USE_COUNT;
}
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/linio.c linux/drivers/isdn/eicon/linio.c
--- v2.4.2/linux/drivers/isdn/eicon/linio.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/eicon/linio.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.16
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/linsys.c linux/drivers/isdn/eicon/linsys.c
--- v2.4.2/linux/drivers/isdn/eicon/linsys.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/linsys.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.10
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/log.c linux/drivers/isdn/eicon/log.c
--- v2.4.2/linux/drivers/isdn/eicon/log.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/log.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.5
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/md5sums.asc linux/drivers/isdn/eicon/md5sums.asc
--- v2.4.2/linux/drivers/isdn/eicon/md5sums.asc Wed Sep 27 13:45:40 2000
+++ linux/drivers/isdn/eicon/md5sums.asc Wed Dec 31 16:00:00 1969
@@ -1,16 +0,0 @@
-# These are valid md5sums to detect modifications
-# in eicon driver files provided by Eicon Technology.
-# For changes and modifications in these files please
-# read ../../../Documentation/isdn/README.eicon
-#
-34bfe8d08d337a97c699ac8326f1d9b6 common.c
-dbb92cba52db31ff8325a252b3f595c3 idi.c
-15687687ef82f099966ed42772001cd3 bri.c
-c3e3b720c3351b66635bd548195e29e8 pri.c
-b0a6d2ab49bcfcfd1825860f178a84b4 log.c
-673746176316b72271a09c0a27287a01 xlog.c
-07e1bbabdb4d69880db196ef31bfb241 kprintf.c
-b60b40ad630f26b7923369df95b4d1b9 fpga.c
-5013ecca0a38a8fcc4a61642754f2076 fourbri.c
-1501ae468a0c5eaab1e60720fa723a67 fcheck.c
-# end of md5sums
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/pc.h linux/drivers/isdn/eicon/pc.h
--- v2.4.2/linux/drivers/isdn/eicon/pc.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/pc.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.2
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/pc_maint.h linux/drivers/isdn/eicon/pc_maint.h
--- v2.4.2/linux/drivers/isdn/eicon/pc_maint.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/pc_maint.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/pr_pc.h linux/drivers/isdn/eicon/pr_pc.h
--- v2.4.2/linux/drivers/isdn/eicon/pr_pc.h Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/pr_pc.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.0
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/pri.c linux/drivers/isdn/eicon/pri.c
--- v2.4.2/linux/drivers/isdn/eicon/pri.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/pri.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.5
*
* This program is free software; you can redistribute it and/or modify
@@ -82,7 +79,7 @@
void mem_inc(ADAPTER *a, void *adr);
int DivasPRIInitPCI(card_t *card, dia_card_t *cfg);
-int pri_ISR (card_t* card);
+static int pri_ISR (card_t* card);
static int diva_server_reset(card_t *card)
{
@@ -156,7 +153,7 @@
UxCardMemOut(card->hw, &shared[ 8], config->tei);
UxCardMemOut(card->hw, &shared[ 9], config->nt2);
- UxCardMemOut(card->hw, &shared[10], 0);
+ UxCardMemOut(card->hw, &shared[10], config->sig_flags);
UxCardMemOut(card->hw, &shared[11], config->watchdog);
UxCardMemOut(card->hw, &shared[12], config->permanent);
UxCardMemOut(card->hw, &shared[13], config->x_interface);
@@ -509,7 +506,7 @@
}
-int pri_ISR (card_t* card)
+static int pri_ISR (card_t* card)
{
int served = 0;
byte* cfg = UxCardMemAttach(card->hw, DIVAS_CFG_MEMORY);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/sys.h linux/drivers/isdn/eicon/sys.h
--- v2.4.2/linux/drivers/isdn/eicon/sys.h Mon Dec 11 13:21:41 2000
+++ linux/drivers/isdn/eicon/sys.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.2
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/uxio.h linux/drivers/isdn/eicon/uxio.h
--- v2.4.2/linux/drivers/isdn/eicon/uxio.h Mon Dec 11 13:21:41 2000
+++ linux/drivers/isdn/eicon/uxio.h Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.6
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/xlog.c linux/drivers/isdn/eicon/xlog.c
--- v2.4.2/linux/drivers/isdn/eicon/xlog.c Sun Aug 13 10:05:32 2000
+++ linux/drivers/isdn/eicon/xlog.c Fri Mar 2 11:12:08 2001
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.2
*
* This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/Makefile linux/drivers/isdn/hisax/Makefile
--- v2.4.2/linux/drivers/isdn/hisax/Makefile Sat Feb 3 19:51:27 2001
+++ linux/drivers/isdn/hisax/Makefile Fri Mar 2 11:12:08 2001
@@ -34,6 +34,7 @@
hisax-objs-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o
hisax-objs-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o isar.o
+hisax-objs-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
hisax-objs-$(CONFIG_HISAX_SPORTSTER) += sportster.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_MIC) += mic.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_NETJET) += nj_s.o netjet.o isac.o arcofi.o
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/amd7930.c linux/drivers/isdn/hisax/amd7930.c
--- v2.4.2/linux/drivers/isdn/hisax/amd7930.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/amd7930.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: amd7930.c,v 1.5 2000/11/24 17:05:37 kai Exp $
+/* $Id: amd7930.c,v 1.5.6.1 2001/02/16 16:43:25 kai Exp $
*
* HiSax ISDN driver - chip specific routines for AMD 7930
*
@@ -14,7 +14,7 @@
*
* The code is unreliable enough to be consider alpha
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
* Advanced Micro Devices' Am79C30A is an ISDN/audio chip used in the
* SparcStation 1+. The chip provides microphone and speaker interfaces
@@ -94,7 +94,7 @@
#include "rawhdlc.h"
#include
-static const char *amd7930_revision = "$Revision: 1.5 $";
+static const char *amd7930_revision = "$Revision: 1.5.6.1 $";
#define RCV_BUFSIZE 1024 /* Size of raw receive buffer in bytes */
#define RCV_BUFBLKS 4 /* Number of blocks to divide buffer into
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/arcofi.c linux/drivers/isdn/hisax/arcofi.c
--- v2.4.2/linux/drivers/isdn/hisax/arcofi.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/arcofi.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: arcofi.c,v 1.12 2000/11/25 17:01:00 kai Exp $
+/* $Id: arcofi.c,v 1.12.6.1 2001/02/16 16:43:25 kai Exp $
*
* arcofi.c Ansteuerung ARCOFI 2165
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/arcofi.h linux/drivers/isdn/hisax/arcofi.h
--- v2.4.2/linux/drivers/isdn/hisax/arcofi.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/arcofi.h Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: arcofi.h,v 1.6 2000/06/26 08:59:12 keil Exp $
+/* $Id: arcofi.h,v 1.6.6.1 2001/02/16 16:43:25 kai Exp $
*
* arcofi.h Ansteuerung ARCOFI 2165
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/asuscom.c linux/drivers/isdn/hisax/asuscom.c
--- v2.4.2/linux/drivers/isdn/hisax/asuscom.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/asuscom.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: asuscom.c,v 1.11 2000/11/24 17:05:37 kai Exp $
+/* $Id: asuscom.c,v 1.11.6.1 2001/02/16 16:43:25 kai Exp $
*
* asuscom.c low level stuff for ASUSCOM NETWORK INC. ISDNLink cards
*
@@ -6,7 +6,7 @@
*
* Thanks to ASUSCOM NETWORK INC. Taiwan and Dynalink NL for informations
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -20,7 +20,7 @@
extern const char *CardType[];
-const char *Asuscom_revision = "$Revision: 1.11 $";
+const char *Asuscom_revision = "$Revision: 1.11.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/avm_a1.c linux/drivers/isdn/hisax/avm_a1.c
--- v2.4.2/linux/drivers/isdn/hisax/avm_a1.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/avm_a1.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: avm_a1.c,v 2.13 2000/11/24 17:05:37 kai Exp $
+/* $Id: avm_a1.c,v 2.13.6.1 2001/02/16 16:43:25 kai Exp $
*
* avm_a1.c low level stuff for AVM A1 (Fritz) isdn cards
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -15,7 +15,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-static const char *avm_revision = "$Revision: 2.13 $";
+static const char *avm_revision = "$Revision: 2.13.6.1 $";
#define AVM_A1_STAT_ISAC 0x01
#define AVM_A1_STAT_HSCX 0x02
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/avm_a1p.c linux/drivers/isdn/hisax/avm_a1p.c
--- v2.4.2/linux/drivers/isdn/hisax/avm_a1p.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/avm_a1p.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: avm_a1p.c,v 2.7 2000/11/24 17:05:37 kai Exp $
+/* $Id: avm_a1p.c,v 2.7.6.1 2001/02/16 16:43:25 kai Exp $
*
* avm_a1p.c low level stuff for the following AVM cards:
* A1 PCMCIA
@@ -7,7 +7,7 @@
*
* Author Carsten Paeth (calle@calle.in-berlin.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*/
#define __NO_VERSION__
#include
@@ -53,7 +53,7 @@
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
-static const char *avm_revision = "$Revision: 2.7 $";
+static const char *avm_revision = "$Revision: 2.7.6.1 $";
static inline u_char
ReadISAC(struct IsdnCardState *cs, u_char offset)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/avm_pci.c linux/drivers/isdn/hisax/avm_pci.c
--- v2.4.2/linux/drivers/isdn/hisax/avm_pci.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/avm_pci.c Fri Mar 2 11:12:08 2001
@@ -1,11 +1,11 @@
-/* $Id: avm_pci.c,v 1.22.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: avm_pci.c,v 1.22.6.4 2001/02/16 16:43:25 kai Exp $
*
* avm_pci.c low level stuff for AVM Fritz!PCI and ISA PnP isdn cards
* Thanks to AVM, Berlin for informations
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -18,7 +18,7 @@
#include
extern const char *CardType[];
-static const char *avm_pci_rev = "$Revision: 1.22.6.2 $";
+static const char *avm_pci_rev = "$Revision: 1.22.6.4 $";
#define AVM_FRITZ_PCI 1
#define AVM_FRITZ_PNP 2
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/bkm_a4t.c linux/drivers/isdn/hisax/bkm_a4t.c
--- v2.4.2/linux/drivers/isdn/hisax/bkm_a4t.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/bkm_a4t.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: bkm_a4t.c,v 1.13.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: bkm_a4t.c,v 1.13.6.4 2001/02/16 16:43:25 kai Exp $
* bkm_a4t.c low level stuff for T-Berkom A4T
* derived from the original file sedlbauer.c
* derived from the original file niccy.c
@@ -6,7 +6,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -24,7 +24,7 @@
extern const char *CardType[];
-const char *bkm_a4t_revision = "$Revision: 1.13.6.2 $";
+const char *bkm_a4t_revision = "$Revision: 1.13.6.4 $";
static inline u_char
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/bkm_a8.c linux/drivers/isdn/hisax/bkm_a8.c
--- v2.4.2/linux/drivers/isdn/hisax/bkm_a8.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/bkm_a8.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: bkm_a8.c,v 1.14.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: bkm_a8.c,v 1.14.6.4 2001/02/16 16:43:25 kai Exp $
* bkm_a8.c low level stuff for Scitel Quadro (4*S0, passive)
* derived from the original file sedlbauer.c
* derived from the original file niccy.c
@@ -6,7 +6,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -27,7 +27,7 @@
extern const char *CardType[];
-const char sct_quadro_revision[] = "$Revision: 1.14.6.2 $";
+const char sct_quadro_revision[] = "$Revision: 1.14.6.4 $";
static const char *sct_quadro_subtypes[] =
{
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/bkm_ax.h linux/drivers/isdn/hisax/bkm_ax.h
--- v2.4.2/linux/drivers/isdn/hisax/bkm_ax.h Tue Nov 28 21:44:41 2000
+++ linux/drivers/isdn/hisax/bkm_ax.h Fri Mar 2 18:38:37 2001
@@ -1,9 +1,9 @@
-/* $Id: bkm_ax.h,v 1.5.6.1 2000/11/28 12:02:46 kai Exp $
+/* $Id: bkm_ax.h,v 1.5.6.2 2001/02/16 16:43:25 kai Exp $
* bkm_ax.h low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive)
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/callc.c linux/drivers/isdn/hisax/callc.c
--- v2.4.2/linux/drivers/isdn/hisax/callc.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/callc.c Fri Mar 2 11:12:08 2001
@@ -1,9 +1,9 @@
-/* $Id: callc.c,v 2.51 2000/11/24 17:05:37 kai Exp $
+/* $Id: callc.c,v 2.51.6.1 2001/02/16 16:43:25 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -20,7 +20,7 @@
#define MOD_USE_COUNT ( GET_USE_COUNT (&__this_module))
#endif /* MODULE */
-const char *lli_revision = "$Revision: 2.51 $";
+const char *lli_revision = "$Revision: 2.51.6.1 $";
extern struct IsdnCard cards[];
extern int nrcards;
@@ -337,7 +337,7 @@
* RESUME
*/
-/* incomming call */
+/* incoming call */
static void
lli_deliver_call(struct FsmInst *fi, int event, void *arg)
@@ -1026,9 +1026,11 @@
printk(KERN_WARNING"call to dummy_pstack pr=%04x arg %lx\n", pr, (long)arg);
}
-static void
+static int
init_PStack(struct PStack **stp) {
*stp = kmalloc(sizeof(struct PStack), GFP_ATOMIC);
+ if (!*stp)
+ return -ENOMEM;
(*stp)->next = NULL;
(*stp)->l1.l1l2 = dummy_pstack;
(*stp)->l1.l1hw = dummy_pstack;
@@ -1041,16 +1043,20 @@
(*stp)->l3.l3l4 = dummy_pstack;
(*stp)->lli.l4l3 = dummy_pstack;
(*stp)->ma.layer = dummy_pstack;
+ return 0;
}
-static void
+static int
init_d_st(struct Channel *chanp)
{
struct PStack *st;
struct IsdnCardState *cs = chanp->cs;
char tmp[16];
+ int err;
- init_PStack(&chanp->d_st);
+ err = init_PStack(&chanp->d_st);
+ if (err)
+ return err;
st = chanp->d_st;
st->next = NULL;
HiSax_addlist(cs, st);
@@ -1075,6 +1081,8 @@
st->lli.userdata = chanp;
st->lli.l2writewakeup = NULL;
st->l3.l3l4 = dchan_l3l4;
+
+ return 0;
}
static void
@@ -1090,10 +1098,11 @@
va_end(args);
}
-static void
+static int
init_chan(int chan, struct IsdnCardState *csta)
{
struct Channel *chanp = csta->channel + chan;
+ int err;
chanp->cs = csta;
chanp->bcs = csta->bcs + chan;
@@ -1102,7 +1111,9 @@
chanp->debug = 0;
chanp->Flags = 0;
chanp->leased = 0;
- init_PStack(&chanp->b_st);
+ err = init_PStack(&chanp->b_st);
+ if (err)
+ return err;
chanp->b_st->l1.delay = DEFAULT_B_DELAY;
chanp->fi.fsm = &callcfsm;
chanp->fi.state = ST_NULL;
@@ -1112,31 +1123,41 @@
FsmInitTimer(&chanp->fi, &chanp->dial_timer);
FsmInitTimer(&chanp->fi, &chanp->drel_timer);
if (!chan || (test_bit(FLG_TWO_DCHAN, &csta->HW_Flags) && chan < 2)) {
- init_d_st(chanp);
+ err = init_d_st(chanp);
+ if (err)
+ return err;
} else {
chanp->d_st = csta->channel->d_st;
}
chanp->data_open = 0;
+ return 0;
}
int
CallcNewChan(struct IsdnCardState *csta) {
- int i;
+ int i, err;
chancount += 2;
- init_chan(0, csta);
- init_chan(1, csta);
+ err = init_chan(0, csta);
+ if (err)
+ return err;
+ err = init_chan(1, csta);
+ if (err)
+ return err;
printk(KERN_INFO "HiSax: 2 channels added\n");
- for (i = 0; i < MAX_WAITING_CALLS; i++)
- init_chan(i+2,csta);
+ for (i = 0; i < MAX_WAITING_CALLS; i++) {
+ err = init_chan(i+2,csta);
+ if (err)
+ return err;
+ }
printk(KERN_INFO "HiSax: MAX_WAITING_CALLS added\n");
if (test_bit(FLG_PTP, &csta->channel->d_st->l2.flag)) {
printk(KERN_INFO "LAYER2 WATCHING ESTABLISH\n");
csta->channel->d_st->lli.l4l3(csta->channel->d_st,
DL_ESTABLISH | REQUEST, NULL);
}
- return (2);
+ return (0);
}
static void
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/cert.c linux/drivers/isdn/hisax/cert.c
--- v2.4.2/linux/drivers/isdn/hisax/cert.c Mon Aug 21 07:49:02 2000
+++ linux/drivers/isdn/hisax/cert.c Fri Mar 2 11:12:08 2001
@@ -1,8 +1,8 @@
-/* $Id: cert.c,v 2.3 2000/06/26 08:59:12 keil Exp $
+/* $Id: cert.c,v 2.3.6.1 2001/02/16 16:43:25 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c
--- v2.4.2/linux/drivers/isdn/hisax/config.c Sat Feb 3 19:51:27 2001
+++ linux/drivers/isdn/hisax/config.c Fri Mar 2 11:12:08 2001
@@ -1,9 +1,9 @@
-/* $Id: config.c,v 2.57.6.6 2000/12/10 23:39:19 kai Exp $
+/* $Id: config.c,v 2.57.6.10 2001/02/16 16:43:25 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#include
@@ -11,7 +11,6 @@
#include
#include
#include
-#include
#include "hisax.h"
#include
#include
@@ -1195,7 +1194,12 @@
return (0);
}
init_tei(cs, cs->protocol);
- CallcNewChan(cs);
+ ret = CallcNewChan(cs);
+ if (ret) {
+ closecard(cardnr);
+ restore_flags(flags);
+ return 0;
+ }
/* ISAR needs firmware download first */
if (!test_bit(HW_ISAR, &cs->HW_Flags))
ll_run(cs, 0);
@@ -1326,8 +1330,7 @@
#endif
}
-int __init
-HiSax_init(void)
+static int __init HiSax_init(void)
{
int i,j;
int nzproto = 0;
@@ -1497,11 +1500,7 @@
}
}
-#ifdef MODULE
-int init_module(void) { return HiSax_init(); }
-
-void
-cleanup_module(void)
+static void __exit HiSax_exit(void)
{
int cardnr = nrcards -1;
long flags;
@@ -1518,7 +1517,6 @@
restore_flags(flags);
printk(KERN_INFO "HiSax module removed\n");
}
-#endif
#ifdef CONFIG_HISAX_ELSA
int elsa_init_pcmcia(void *pcm_iob, int pcm_irq, int *busy_flag, int prot)
@@ -1707,6 +1705,8 @@
return (ret);
}
+#include
+
static struct pci_device_id hisax_pci_tbl[] __initdata = {
#ifdef CONFIG_HISAX_FRITZPCI
{PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID},
@@ -1770,3 +1770,6 @@
};
MODULE_DEVICE_TABLE(pci, hisax_pci_tbl);
+
+module_init(HiSax_init);
+module_exit(HiSax_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/diva.c linux/drivers/isdn/hisax/diva.c
--- v2.4.2/linux/drivers/isdn/hisax/diva.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/diva.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: diva.c,v 1.25.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: diva.c,v 1.25.6.4 2001/02/16 16:43:25 kai Exp $
*
* diva.c low level stuff for Eicon.Diehl Diva Family ISDN cards
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -24,7 +24,7 @@
extern const char *CardType[];
-const char *Diva_revision = "$Revision: 1.25.6.2 $";
+const char *Diva_revision = "$Revision: 1.25.6.4 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/elsa.c linux/drivers/isdn/hisax/elsa.c
--- v2.4.2/linux/drivers/isdn/hisax/elsa.c Tue Nov 28 21:44:41 2000
+++ linux/drivers/isdn/hisax/elsa.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: elsa.c,v 2.26.6.1 2000/11/28 12:02:46 kai Exp $
+/* $Id: elsa.c,v 2.26.6.3 2001/02/16 16:43:25 kai Exp $
*
* elsa.c low level stuff for Elsa isdn cards
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -30,7 +30,7 @@
extern const char *CardType[];
-const char *Elsa_revision = "$Revision: 2.26.6.1 $";
+const char *Elsa_revision = "$Revision: 2.26.6.3 $";
const char *Elsa_Types[] =
{"None", "PC", "PCC-8", "PCC-16", "PCF", "PCF-Pro",
"PCMCIA", "QS 1000", "QS 3000", "Microlink PCI", "QS 3000 PCI",
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/elsa_ser.c linux/drivers/isdn/hisax/elsa_ser.c
--- v2.4.2/linux/drivers/isdn/hisax/elsa_ser.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/elsa_ser.c Fri Mar 2 11:12:08 2001
@@ -1,8 +1,8 @@
-/* $Id: elsa_ser.c,v 2.10 2000/11/19 17:02:47 kai Exp $
+/* $Id: elsa_ser.c,v 2.10.6.1 2001/02/16 16:43:26 kai Exp $
*
* stuff for the serial modem on ELSA cards
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#include
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/fsm.c linux/drivers/isdn/hisax/fsm.c
--- v2.4.2/linux/drivers/isdn/hisax/fsm.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/fsm.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: fsm.c,v 1.14 2000/11/24 17:05:37 kai Exp $
+/* $Id: fsm.c,v 1.14.6.1 2001/02/16 16:43:26 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
@@ -6,7 +6,7 @@
* Thanks to Jan den Ouden
* Fritz Elfert
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/gazel.c linux/drivers/isdn/hisax/gazel.c
--- v2.4.2/linux/drivers/isdn/hisax/gazel.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/gazel.c Fri Mar 2 11:12:08 2001
@@ -1,11 +1,11 @@
-/* $Id: gazel.c,v 2.11.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: gazel.c,v 2.11.6.4 2001/02/16 16:43:26 kai Exp $
*
* gazel.c low level stuff for Gazel isdn cards
*
* Author BeWan Systems
* based on source code from Karsten Keil
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#include
@@ -19,7 +19,7 @@
#include
extern const char *CardType[];
-const char *gazel_revision = "$Revision: 2.11.6.2 $";
+const char *gazel_revision = "$Revision: 2.11.6.4 $";
#define R647 1
#define R685 2
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hfc_2bds0.c linux/drivers/isdn/hisax/hfc_2bds0.c
--- v2.4.2/linux/drivers/isdn/hisax/hfc_2bds0.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/hfc_2bds0.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bds0.c,v 1.15 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfc_2bds0.c,v 1.15.6.1 2001/02/16 16:43:26 kai Exp $
*
* specific routines for CCD's HFC 2BDS0
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hfc_2bds0.h linux/drivers/isdn/hisax/hfc_2bds0.h
--- v2.4.2/linux/drivers/isdn/hisax/hfc_2bds0.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/hfc_2bds0.h Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bds0.h,v 1.4 2000/06/26 08:59:12 keil Exp $
+/* $Id: hfc_2bds0.h,v 1.4.6.1 2001/02/16 16:43:27 kai Exp $
*
* specific defines for CCD's HFC 2BDS0
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hfc_2bs0.c linux/drivers/isdn/hisax/hfc_2bs0.c
--- v2.4.2/linux/drivers/isdn/hisax/hfc_2bs0.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/hfc_2bs0.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bs0.c,v 1.17 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfc_2bs0.c,v 1.17.6.1 2001/02/16 16:43:27 kai Exp $
*
* specific routines for CCD's HFC 2BS0
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hfc_2bs0.h linux/drivers/isdn/hisax/hfc_2bs0.h
--- v2.4.2/linux/drivers/isdn/hisax/hfc_2bs0.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/hfc_2bs0.h Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hfc_2bs0.h,v 1.3 2000/06/26 08:59:13 keil Exp $
+/* $Id: hfc_2bs0.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
*
* specific defines for CCD's HFC 2BS0
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hfc_pci.c linux/drivers/isdn/hisax/hfc_pci.c
--- v2.4.2/linux/drivers/isdn/hisax/hfc_pci.c Fri Dec 29 14:07:22 2000
+++ linux/drivers/isdn/hisax/hfc_pci.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: hfc_pci.c,v 1.34.6.3 2000/12/10 23:39:19 kai Exp $
+/* $Id: hfc_pci.c,v 1.34.6.4 2001/02/13 10:33:58 kai Exp $
* hfc_pci.c low level driver for CCD´s hfc-pci based cards
*
@@ -35,7 +35,7 @@
extern const char *CardType[];
-static const char *hfcpci_revision = "$Revision: 1.34.6.3 $";
+static const char *hfcpci_revision = "$Revision: 1.34.6.4 $";
/* table entry in the PCI devices list */
typedef struct {
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hfcscard.c linux/drivers/isdn/hisax/hfcscard.c
--- v2.4.2/linux/drivers/isdn/hisax/hfcscard.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/hfcscard.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hfcscard.c,v 1.8 2000/11/24 17:05:37 kai Exp $
+/* $Id: hfcscard.c,v 1.8.6.1 2001/02/16 16:43:27 kai Exp $
*
* hfcscard.c low level stuff for hfcs based cards (Teles3c, ACER P10)
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -16,7 +16,7 @@
extern const char *CardType[];
-static const char *hfcs_revision = "$Revision: 1.8 $";
+static const char *hfcs_revision = "$Revision: 1.8.6.1 $";
static void
hfcs_interrupt(int intno, void *dev_id, struct pt_regs *regs)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hisax.h linux/drivers/isdn/hisax/hisax.h
--- v2.4.2/linux/drivers/isdn/hisax/hisax.h Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/hisax/hisax.h Fri Mar 2 11:12:08 2001
@@ -1,8 +1,8 @@
-/* $Id: hisax.h,v 2.52.6.1 2000/12/06 16:59:19 kai Exp $
+/* $Id: hisax.h,v 2.52.6.3 2001/02/16 16:43:27 kai Exp $
*
* Basic declarations, defines and prototypes
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#include
@@ -126,13 +126,13 @@
#define l3dss1_process
#include "l3dss1.h"
#undef l3dss1_process
-#endif CONFIG_HISAX_EURO
+#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
#define l3ni1_process
#include "l3ni1.h"
#undef l3ni1_process
-#endif CONFIG_HISAX_NI1
+#endif /* CONFIG_HISAX_NI1 */
#define MAX_DFRAME_LEN 260
#define MAX_DFRAME_LEN_L1 300
@@ -318,10 +318,10 @@
{ u_char uuuu; /* only as dummy */
#ifdef CONFIG_HISAX_EURO
dss1_stk_priv dss1; /* private dss1 data */
-#endif CONFIG_HISAX_EURO
+#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
ni1_stk_priv ni1; /* private ni1 data */
-#endif CONFIG_HISAX_NI1
+#endif /* CONFIG_HISAX_NI1 */
} prot;
};
@@ -342,10 +342,10 @@
{ u_char uuuu; /* only when euro not defined, avoiding empty union */
#ifdef CONFIG_HISAX_EURO
dss1_proc_priv dss1; /* private dss1 data */
-#endif CONFIG_HISAX_EURO
+#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
ni1_proc_priv ni1; /* private ni1 data */
-#endif CONFIG_HISAX_NI1
+#endif /* CONFIG_HISAX_NI1 */
} prot;
};
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hscx.c linux/drivers/isdn/hisax/hscx.c
--- v2.4.2/linux/drivers/isdn/hisax/hscx.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/hscx.c Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hscx.c,v 1.21 2000/11/24 17:05:37 kai Exp $
+/* $Id: hscx.c,v 1.21.6.1 2001/02/16 16:43:27 kai Exp $
*
* hscx.c HSCX specific routines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hscx.h linux/drivers/isdn/hisax/hscx.h
--- v2.4.2/linux/drivers/isdn/hisax/hscx.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/hscx.h Fri Mar 2 11:12:08 2001
@@ -1,10 +1,10 @@
-/* $Id: hscx.h,v 1.6 2000/06/26 08:59:13 keil Exp $
+/* $Id: hscx.h,v 1.6.6.1 2001/02/16 16:43:27 kai Exp $
*
* hscx.h HSCX specific defines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/hscx_irq.c linux/drivers/isdn/hisax/hscx_irq.c
--- v2.4.2/linux/drivers/isdn/hisax/hscx_irq.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/hscx_irq.c Fri Mar 2 11:12:08 2001
@@ -1,4 +1,4 @@
-/* $Id: hscx_irq.c,v 1.16 2000/11/19 17:02:47 kai Exp $
+/* $Id: hscx_irq.c,v 1.16.6.1 2001/02/16 16:43:27 kai Exp $
*
* hscx_irq.c low level b-channel stuff for Siemens HSCX
*
@@ -6,7 +6,7 @@
*
* This is an include file for fast inline IRQ stuff
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/icc.c linux/drivers/isdn/hisax/icc.c
--- v2.4.2/linux/drivers/isdn/hisax/icc.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/icc.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-// $Id: icc.c,v 1.5 2000/11/24 17:05:37 kai Exp $
+// $Id: icc.c,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
//-----------------------------------------------------------------------------
//
// ICC specific routines
@@ -7,10 +7,10 @@
// www.traverse.com.au
//
// 1999.6.25 Initial implementation of routines for Siemens ISDN
-// Communication Controler PEB 2070 based on the ISAC routines
+// Communication Controller PEB 2070 based on the ISAC routines
// written by Karsten Keil.
//
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/icc.h linux/drivers/isdn/hisax/icc.h
--- v2.4.2/linux/drivers/isdn/hisax/icc.h Mon Aug 21 07:49:03 2000
+++ linux/drivers/isdn/hisax/icc.h Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-// $Id: icc.h,v 1.2 2000/06/26 08:59:13 keil Exp $
+// $Id: icc.h,v 1.2.6.1 2001/02/16 16:43:27 kai Exp $
//-----------------------------------------------------------------------------
//
// ICC specific routines
@@ -7,10 +7,10 @@
// www.traverse.com.au
//
// 1999.7.14 Initial implementation of routines for Siemens ISDN
-// Communication Controler PEB 2070 based on the ISAC routines
+// Communication Controller PEB 2070 based on the ISAC routines
// written by Karsten Keil.
//
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/ipac.h linux/drivers/isdn/hisax/ipac.h
--- v2.4.2/linux/drivers/isdn/hisax/ipac.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/ipac.h Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: ipac.h,v 1.5 2000/06/26 08:59:13 keil Exp $
+/* $Id: ipac.h,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
*
* ipac.h IPAC specific defines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isac.c linux/drivers/isdn/hisax/isac.c
--- v2.4.2/linux/drivers/isdn/hisax/isac.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/isac.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: isac.c,v 1.28 2000/11/24 17:05:37 kai Exp $
+/* $Id: isac.c,v 1.28.6.1 2001/02/16 16:43:27 kai Exp $
*
* isac.c ISAC specific routines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*/
@@ -445,7 +445,7 @@
if (cs->debug & L1_DEB_MONITOR)
debugl1(cs, "ISAC %02x -> MOX1", cs->dc.isac.mon_tx[cs->dc.isac.mon_txp -1]);
}
- AfterMOX1:
+ AfterMOX1:;
#endif
}
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isac.h linux/drivers/isdn/hisax/isac.h
--- v2.4.2/linux/drivers/isdn/hisax/isac.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/isac.h Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: isac.h,v 1.7 2000/06/26 08:59:13 keil Exp $
+/* $Id: isac.h,v 1.7.6.1 2001/02/16 16:43:27 kai Exp $
*
* isac.h ISAC specific defines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isar.c linux/drivers/isdn/hisax/isar.c
--- v2.4.2/linux/drivers/isdn/hisax/isar.c Mon Nov 27 16:56:09 2000
+++ linux/drivers/isdn/hisax/isar.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: isar.c,v 1.17 2000/11/24 17:05:37 kai Exp $
+/* $Id: isar.c,v 1.17.6.1 2001/02/16 16:43:27 kai Exp $
*
* isar.c ISAR (Siemens PSB 7110) specific routines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isar.h linux/drivers/isdn/hisax/isar.h
--- v2.4.2/linux/drivers/isdn/hisax/isar.h Mon Aug 21 07:49:03 2000
+++ linux/drivers/isdn/hisax/isar.h Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: isar.h,v 1.9 2000/06/26 08:59:13 keil Exp $
+/* $Id: isar.h,v 1.9.6.1 2001/02/16 16:43:27 kai Exp $
*
* isar.h ISAR (Siemens PSB 7110) specific defines
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isdnl1.c linux/drivers/isdn/hisax/isdnl1.c
--- v2.4.2/linux/drivers/isdn/hisax/isdnl1.c Fri Dec 29 14:07:22 2000
+++ linux/drivers/isdn/hisax/isdnl1.c Fri Mar 2 11:12:09 2001
@@ -1,11 +1,11 @@
-/* $Id: isdnl1.c,v 2.41.6.1 2000/12/10 22:01:04 kai Exp $
+/* $Id: isdnl1.c,v 2.41.6.2 2001/02/16 16:43:27 kai Exp $
*
* isdnl1.c common low level stuff for Siemens Chipsetbased isdn cards
* based on the teles driver from Jan den Ouden
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -15,7 +15,7 @@
*
*/
-const char *l1_revision = "$Revision: 2.41.6.1 $";
+const char *l1_revision = "$Revision: 2.41.6.2 $";
#define __NO_VERSION__
#include
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isdnl1.h linux/drivers/isdn/hisax/isdnl1.h
--- v2.4.2/linux/drivers/isdn/hisax/isdnl1.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/isdnl1.h Fri Mar 2 11:12:09 2001
@@ -1,8 +1,8 @@
-/* $Id: isdnl1.h,v 2.9 2000/06/26 08:59:13 keil Exp $
+/* $Id: isdnl1.h,v 2.9.6.1 2001/02/16 16:43:27 kai Exp $
*
* Layer 1 defines
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isdnl2.c linux/drivers/isdn/hisax/isdnl2.c
--- v2.4.2/linux/drivers/isdn/hisax/isdnl2.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/isdnl2.c Fri Mar 2 11:12:09 2001
@@ -1,9 +1,9 @@
-/* $Id: isdnl2.c,v 2.25 2000/11/24 17:05:38 kai Exp $
+/* $Id: isdnl2.c,v 2.25.6.1 2001/02/16 16:43:27 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -16,7 +16,7 @@
#include "hisax.h"
#include "isdnl2.h"
-const char *l2_revision = "$Revision: 2.25 $";
+const char *l2_revision = "$Revision: 2.25.6.1 $";
static void l2m_debug(struct FsmInst *fi, char *fmt, ...);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isdnl2.h linux/drivers/isdn/hisax/isdnl2.h
--- v2.4.2/linux/drivers/isdn/hisax/isdnl2.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/isdnl2.h Fri Mar 2 11:12:09 2001
@@ -1,8 +1,8 @@
-/* $Id: isdnl2.h,v 1.3 2000/06/26 08:59:13 keil Exp $
+/* $Id: isdnl2.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
*
* Layer 2 defines
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isdnl3.c linux/drivers/isdn/hisax/isdnl3.c
--- v2.4.2/linux/drivers/isdn/hisax/isdnl3.c Sat Feb 3 19:51:27 2001
+++ linux/drivers/isdn/hisax/isdnl3.c Fri Mar 2 11:12:09 2001
@@ -1,9 +1,9 @@
-/* $Id: isdnl3.c,v 2.17 2000/11/24 17:05:38 kai Exp $
+/* $Id: isdnl3.c,v 2.17.6.2 2001/02/16 16:43:27 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -18,7 +18,7 @@
#include "isdnl3.h"
#include
-const char *l3_revision = "$Revision: 2.17 $";
+const char *l3_revision = "$Revision: 2.17.6.2 $";
static struct Fsm l3fsm;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isdnl3.h linux/drivers/isdn/hisax/isdnl3.h
--- v2.4.2/linux/drivers/isdn/hisax/isdnl3.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/isdnl3.h Fri Mar 2 11:12:09 2001
@@ -1,6 +1,6 @@
-/* $Id: isdnl3.h,v 2.6 2000/06/26 08:59:13 keil Exp $
+/* $Id: isdnl3.h,v 2.6.6.1 2001/02/16 16:43:27 kai Exp $
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/isurf.c linux/drivers/isdn/hisax/isurf.c
--- v2.4.2/linux/drivers/isdn/hisax/isurf.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/isurf.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: isurf.c,v 1.10 2000/11/24 17:05:38 kai Exp $
+/* $Id: isurf.c,v 1.10.6.1 2001/02/16 16:43:27 kai Exp $
*
* isurf.c low level stuff for Siemens I-Surf/I-Talk cards
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -17,7 +17,7 @@
extern const char *CardType[];
-static const char *ISurf_revision = "$Revision: 1.10 $";
+static const char *ISurf_revision = "$Revision: 1.10.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/ix1_micro.c linux/drivers/isdn/hisax/ix1_micro.c
--- v2.4.2/linux/drivers/isdn/hisax/ix1_micro.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/ix1_micro.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: ix1_micro.c,v 2.10 2000/11/24 17:05:38 kai Exp $
+/* $Id: ix1_micro.c,v 2.10.6.1 2001/02/16 16:43:27 kai Exp $
*
* ix1_micro.c low level stuff for ITK ix1-micro Rev.2 isdn cards
* derived from the original file teles3.c from Karsten Keil
@@ -14,7 +14,7 @@
/*
For the modification done by the author the following terms and conditions
- apply (GNU PUBLIC LICENSE)
+ apply (GNU General Public License)
This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-const char *ix1_revision = "$Revision: 2.10 $";
+const char *ix1_revision = "$Revision: 2.10.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/jade.c linux/drivers/isdn/hisax/jade.c
--- v2.4.2/linux/drivers/isdn/hisax/jade.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/jade.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: jade.c,v 1.6 2000/11/24 17:05:38 kai Exp $
+/* $Id: jade.c,v 1.6.6.1 2001/02/16 16:43:27 kai Exp $
*
* jade.c JADE stuff (derived from original hscx.c)
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/jade.h linux/drivers/isdn/hisax/jade.h
--- v2.4.2/linux/drivers/isdn/hisax/jade.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/jade.h Fri Mar 2 11:12:09 2001
@@ -1,9 +1,9 @@
-/* $Id: jade.h,v 1.3 2000/06/26 08:59:14 keil Exp $
+/* $Id: jade.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
* jade.h JADE specific defines
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/jade_irq.c linux/drivers/isdn/hisax/jade_irq.c
--- v2.4.2/linux/drivers/isdn/hisax/jade_irq.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/jade_irq.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: jade_irq.c,v 1.5 2000/11/19 17:02:48 kai Exp $
+/* $Id: jade_irq.c,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
*
* jade_irq.c Low level JADE IRQ stuff (derived from original hscx_irq.c)
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/l3_1tr6.c linux/drivers/isdn/hisax/l3_1tr6.c
--- v2.4.2/linux/drivers/isdn/hisax/l3_1tr6.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/l3_1tr6.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: l3_1tr6.c,v 2.13 2000/11/19 17:02:48 kai Exp $
+/* $Id: l3_1tr6.c,v 2.13.6.1 2001/02/16 16:43:27 kai Exp $
*
* German 1TR6 D-channel protocol
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -17,7 +17,7 @@
#include
extern char *HiSax_getrev(const char *revision);
-const char *l3_1tr6_revision = "$Revision: 2.13 $";
+const char *l3_1tr6_revision = "$Revision: 2.13.6.1 $";
#define MsgHead(ptr, cref, mty, dis) \
*ptr++ = dis; \
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/l3_1tr6.h linux/drivers/isdn/hisax/l3_1tr6.h
--- v2.4.2/linux/drivers/isdn/hisax/l3_1tr6.h Sun Aug 6 12:43:41 2000
+++ linux/drivers/isdn/hisax/l3_1tr6.h Fri Mar 2 11:12:09 2001
@@ -1,8 +1,8 @@
-/* $Id: l3_1tr6.h,v 2.2 2000/06/26 08:59:14 keil Exp $
+/* $Id: l3_1tr6.h,v 2.2.6.1 2001/02/16 16:43:27 kai Exp $
*
* German 1TR6 D-channel protocol defines
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#ifndef l3_1tr6
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/l3dss1.c linux/drivers/isdn/hisax/l3dss1.c
--- v2.4.2/linux/drivers/isdn/hisax/l3dss1.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/l3dss1.c Fri Mar 2 11:12:09 2001
@@ -1,11 +1,11 @@
-/* $Id: l3dss1.c,v 2.30 2000/11/19 17:02:48 kai Exp $
+/* $Id: l3dss1.c,v 2.30.6.1 2001/02/16 16:43:27 kai Exp $
*
* EURO/DSS1 D-channel protocol
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -22,7 +22,7 @@
#include
extern char *HiSax_getrev(const char *revision);
-const char *dss1_revision = "$Revision: 2.30 $";
+const char *dss1_revision = "$Revision: 2.30.6.1 $";
#define EXT_BEARER_CAPS 1
@@ -426,9 +426,9 @@
#undef FOO1
}
-#else not HISAX_DE_AOC
+#else /* not HISAX_DE_AOC */
l3_debug(st, "invoke break");
-#endif not HISAX_DE_AOC
+#endif /* not HISAX_DE_AOC */
break;
case 2: /* return result */
/* if no process available handle separately */
@@ -438,12 +438,12 @@
return;
}
if ((pc->prot.dss1.invoke_id) && (pc->prot.dss1.invoke_id == id))
- { /* Diversion successfull */
+ { /* Diversion successful */
free_invoke_id(st,pc->prot.dss1.invoke_id);
pc->prot.dss1.remote_result = 0; /* success */
pc->prot.dss1.invoke_id = 0;
pc->redir_result = pc->prot.dss1.remote_result;
- st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */
+ st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */
else
l3_debug(st,"return error unknown identifier");
break;
@@ -2112,7 +2112,7 @@
MsgHead(p, pc->callref, MT_FACILITY);
for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */
- if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */
+ if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */
*p++ = 0x1c; /* Facility info element */
*p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */
@@ -2138,7 +2138,7 @@
*p++ = pc->chan->setup.phone[l];
if (len_sub)
- { *p++ = 0x04; /* called party subadress */
+ { *p++ = 0x04; /* called party subaddress */
*p++ = len_sub - 2;
while (*subp) *p++ = *subp++;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/l3dss1.h linux/drivers/isdn/hisax/l3dss1.h
--- v2.4.2/linux/drivers/isdn/hisax/l3dss1.h Sun Aug 6 12:43:42 2000
+++ linux/drivers/isdn/hisax/l3dss1.h Fri Mar 2 11:12:09 2001
@@ -1,8 +1,8 @@
-/* $Id: l3dss1.h,v 1.10 2000/06/26 08:59:14 keil Exp $
+/* $Id: l3dss1.h,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
*
* DSS1 (Euro) D-channel protocol defines
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/l3ni1.c linux/drivers/isdn/hisax/l3ni1.c
--- v2.4.2/linux/drivers/isdn/hisax/l3ni1.c Fri Dec 29 14:07:22 2000
+++ linux/drivers/isdn/hisax/l3ni1.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-// $Id: l3ni1.c,v 2.5.6.1 2000/12/06 16:59:19 kai Exp $
+// $Id: l3ni1.c,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $
//
//-----------------------------------------------------------------------------
//
@@ -16,7 +16,7 @@
// Will Scales - beta tester extraordinaire
// Brett Whittacre - beta tester and remote devel system in Vegas
//
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------
#define __NO_VERSION__
@@ -26,7 +26,7 @@
#include
extern char *HiSax_getrev(const char *revision);
-const char *ni1_revision = "$Revision: 2.5.6.1 $";
+const char *ni1_revision = "$Revision: 2.5.6.2 $";
#define EXT_BEARER_CAPS 1
@@ -372,12 +372,12 @@
return;
}
if ((pc->prot.ni1.invoke_id) && (pc->prot.ni1.invoke_id == id))
- { /* Diversion successfull */
+ { /* Diversion successful */
free_invoke_id(st,pc->prot.ni1.invoke_id);
pc->prot.ni1.remote_result = 0; /* success */
pc->prot.ni1.invoke_id = 0;
pc->redir_result = pc->prot.ni1.remote_result;
- st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */
+ st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */
else
l3_debug(st,"return error unknown identifier");
break;
@@ -1973,7 +1973,7 @@
MsgHead(p, pc->callref, MT_FACILITY);
for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */
- if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */
+ if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */
*p++ = 0x1c; /* Facility info element */
*p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */
@@ -1999,7 +1999,7 @@
*p++ = pc->chan->setup.phone[l];
if (len_sub)
- { *p++ = 0x04; /* called party subadress */
+ { *p++ = 0x04; /* called party subaddress */
*p++ = len_sub - 2;
while (*subp) *p++ = *subp++;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/l3ni1.h linux/drivers/isdn/hisax/l3ni1.h
--- v2.4.2/linux/drivers/isdn/hisax/l3ni1.h Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/l3ni1.h Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-// $Id: l3ni1.h,v 2.3 2000/11/16 13:50:43 keil Exp $
+// $Id: l3ni1.h,v 2.3.6.1 2001/02/16 16:43:28 kai Exp $
//-----------------------------------------------------------------------------
//
// NI1 D-channel protocol
@@ -12,7 +12,7 @@
// code provided by Ragnar Paulson.
//
//
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/lmgr.c linux/drivers/isdn/hisax/lmgr.c
--- v2.4.2/linux/drivers/isdn/hisax/lmgr.c Sun Aug 6 12:43:42 2000
+++ linux/drivers/isdn/hisax/lmgr.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: lmgr.c,v 1.7 2000/06/26 08:59:14 keil Exp $
+/* $Id: lmgr.c,v 1.7.6.1 2001/02/16 16:43:28 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* Layermanagement module
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/mic.c linux/drivers/isdn/hisax/mic.c
--- v2.4.2/linux/drivers/isdn/hisax/mic.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/mic.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: mic.c,v 1.10 2000/11/24 17:05:38 kai Exp $
+/* $Id: mic.c,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
*
* mic.c low level stuff for mic cards
*
@@ -6,7 +6,7 @@
*
* Author Stephan von Krawczynski
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -19,7 +19,7 @@
extern const char *CardType[];
-const char *mic_revision = "$Revision: 1.10 $";
+const char *mic_revision = "$Revision: 1.10.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/netjet.c linux/drivers/isdn/hisax/netjet.c
--- v2.4.2/linux/drivers/isdn/hisax/netjet.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/hisax/netjet.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: netjet.c,v 1.24.6.2 2000/12/17 22:45:11 kai Exp $
+/* $Id: netjet.c,v 1.24.6.4 2001/02/16 16:43:28 kai Exp $
*
* netjet.c low level stuff for Traverse Technologie NETJet ISDN cards
*
@@ -6,7 +6,7 @@
*
* Thanks to Traverse Technologie Australia for documents and informations
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -22,7 +22,7 @@
#include
#include "netjet.h"
-const char *NETjet_revision = "$Revision: 1.24.6.2 $";
+const char *NETjet_revision = "$Revision: 1.24.6.4 $";
/* Interface functions */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/netjet.h linux/drivers/isdn/hisax/netjet.h
--- v2.4.2/linux/drivers/isdn/hisax/netjet.h Tue Nov 28 21:44:41 2000
+++ linux/drivers/isdn/hisax/netjet.h Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-// $Id: netjet.h,v 2.5.6.1 2000/11/28 12:02:46 kai Exp $
+// $Id: netjet.h,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $
//-----------------------------------------------------------------------------
//
// NETjet common header file
@@ -6,7 +6,7 @@
// Author Kerstern Keil repackaged by
// Matt Henderson - Traverse Technologies P/L www.traverse.com.au
//
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/niccy.c linux/drivers/isdn/hisax/niccy.c
--- v2.4.2/linux/drivers/isdn/hisax/niccy.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/niccy.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: niccy.c,v 1.15.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: niccy.c,v 1.15.6.4 2001/02/16 16:43:28 kai Exp $
*
* niccy.c low level stuff for Dr. Neuhaus NICCY PnP and NICCY PCI and
* compatible (SAGEM cybermodem)
@@ -7,7 +7,7 @@
*
* Thanks to Dr. Neuhaus and SAGEM for informations
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -22,7 +22,7 @@
#include
extern const char *CardType[];
-const char *niccy_revision = "$Revision: 1.15.6.2 $";
+const char *niccy_revision = "$Revision: 1.15.6.4 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/nj_s.c linux/drivers/isdn/hisax/nj_s.c
--- v2.4.2/linux/drivers/isdn/hisax/nj_s.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/hisax/nj_s.c Fri Mar 2 11:12:09 2001
@@ -1,6 +1,6 @@
-// $Id: nj_s.c,v 2.7.6.2 2001/02/07 11:31:31 kai Exp $
+// $Id: nj_s.c,v 2.7.6.4 2001/02/16 16:43:28 kai Exp $
//
-// This file is (c) under GNU PUBLIC LICENSE
+// This file is (c) under GNU General Public License
//
#define __NO_VERSION__
@@ -14,7 +14,7 @@
#include
#include "netjet.h"
-const char *NETjet_S_revision = "$Revision: 2.7.6.2 $";
+const char *NETjet_S_revision = "$Revision: 2.7.6.4 $";
static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
{
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/nj_u.c linux/drivers/isdn/hisax/nj_u.c
--- v2.4.2/linux/drivers/isdn/hisax/nj_u.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/hisax/nj_u.c Fri Mar 2 11:12:09 2001
@@ -1,6 +1,6 @@
-/* $Id: nj_u.c,v 2.8.6.2 2001/02/07 11:31:31 kai Exp $
+/* $Id: nj_u.c,v 2.8.6.4 2001/02/16 16:43:28 kai Exp $
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -15,7 +15,7 @@
#include
#include "netjet.h"
-const char *NETjet_U_revision = "$Revision: 2.8.6.2 $";
+const char *NETjet_U_revision = "$Revision: 2.8.6.4 $";
static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
{
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/q931.c linux/drivers/isdn/hisax/q931.c
--- v2.4.2/linux/drivers/isdn/hisax/q931.c Mon Aug 21 07:49:03 2000
+++ linux/drivers/isdn/hisax/q931.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: q931.c,v 1.10 2000/06/26 08:59:14 keil Exp $
+/* $Id: q931.c,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
*
* q931.c code to decode ITU Q.931 call control messages
*
* Author Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
* Changelog
*
@@ -1228,7 +1228,7 @@
finish = 1;
}
} else if (sapi == TEI_SAPI) {
- dp += sprintf(dp, "tei managment\n");
+ dp += sprintf(dp, "tei management\n");
finish = 1;
} else {
dp += sprintf(dp, "unknown sapi %d broadcast\n", sapi);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/rawhdlc.c linux/drivers/isdn/hisax/rawhdlc.c
--- v2.4.2/linux/drivers/isdn/hisax/rawhdlc.c Sun Aug 6 12:43:42 2000
+++ linux/drivers/isdn/hisax/rawhdlc.c Fri Mar 2 11:12:09 2001
@@ -1,11 +1,11 @@
-/* $Id: rawhdlc.c,v 1.5 2000/06/26 08:59:14 keil Exp $
+/* $Id: rawhdlc.c,v 1.5.6.1 2001/02/16 16:43:28 kai Exp $
*
* rawhdlc.c support routines for cards that don't support HDLC
*
* Author Karsten Keil (keil@isdn4linux.de)
* Brent Baccala
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
* Some passive ISDN cards, such as the Traverse NETJet and the AMD 7930,
* don't perform HDLC encapsulation over the B channel. Drivers for
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/rawhdlc.h linux/drivers/isdn/hisax/rawhdlc.h
--- v2.4.2/linux/drivers/isdn/hisax/rawhdlc.h Sun Aug 6 12:43:42 2000
+++ linux/drivers/isdn/hisax/rawhdlc.h Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: rawhdlc.h,v 1.3 2000/06/26 08:59:14 keil Exp $
+/* $Id: rawhdlc.h,v 1.3.6.1 2001/02/16 16:43:29 kai Exp $
*
* rawhdlc.h support routines for cards that don't support HDLC
*
* Author Brent Baccala
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/s0box.c linux/drivers/isdn/hisax/s0box.c
--- v2.4.2/linux/drivers/isdn/hisax/s0box.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/s0box.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: s0box.c,v 2.4 2000/11/24 17:05:38 kai Exp $
+/* $Id: s0box.c,v 2.4.6.1 2001/02/16 16:43:29 kai Exp $
*
* s0box.c low level stuff for Creatix S0BOX
*
* Author S0BOX specific stuff: Enrik Berkhan (enrik@starfleet.inka.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -15,7 +15,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-const char *s0box_revision = "$Revision: 2.4 $";
+const char *s0box_revision = "$Revision: 2.4.6.1 $";
static inline void
writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/saphir.c linux/drivers/isdn/hisax/saphir.c
--- v2.4.2/linux/drivers/isdn/hisax/saphir.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/saphir.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: saphir.c,v 1.8 2000/11/24 17:05:38 kai Exp $
+/* $Id: saphir.c,v 1.8.6.1 2001/02/16 16:43:29 kai Exp $
*
* saphir.c low level stuff for HST Saphir 1
*
@@ -6,7 +6,7 @@
*
* Thanks to HST High Soft Tech GmbH
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -19,7 +19,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-static char *saphir_rev = "$Revision: 1.8 $";
+static char *saphir_rev = "$Revision: 1.8.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/sedlbauer.c linux/drivers/isdn/hisax/sedlbauer.c
--- v2.4.2/linux/drivers/isdn/hisax/sedlbauer.c Wed Nov 29 10:35:15 2000
+++ linux/drivers/isdn/hisax/sedlbauer.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: sedlbauer.c,v 1.25.6.2 2000/11/29 17:48:59 kai Exp $
+/* $Id: sedlbauer.c,v 1.25.6.4 2001/02/16 16:43:29 kai Exp $
*
* sedlbauer.c low level stuff for Sedlbauer cards
* includes support for the Sedlbauer speed star (speed star II),
@@ -16,7 +16,7 @@
* Sedlbauer AG for informations
* Edgar Toernig
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -52,7 +52,7 @@
extern const char *CardType[];
-const char *Sedlbauer_revision = "$Revision: 1.25.6.2 $";
+const char *Sedlbauer_revision = "$Revision: 1.25.6.4 $";
const char *Sedlbauer_Types[] =
{"None", "speed card/win", "speed star", "speed fax+",
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/sedlbauer_cs.c linux/drivers/isdn/hisax/sedlbauer_cs.c
--- v2.4.2/linux/drivers/isdn/hisax/sedlbauer_cs.c Wed Dec 31 16:00:00 1969
+++ linux/drivers/isdn/hisax/sedlbauer_cs.c Fri Mar 2 11:12:09 2001
@@ -0,0 +1,682 @@
+/*======================================================================
+
+ A Sedlbauer PCMCIA client driver
+
+ This driver is for the Sedlbauer Speed Star and Speed Star II,
+ which are ISDN PCMCIA Cards.
+
+ sedlbauer_cs.c 1.1a 2001/01/28 15:04:04
+
+ The contents of this file are subject to the Mozilla Public
+ License Version 1.1 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS
+ IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ rights and limitations under the License.
+
+ The initial developer of the original code is David A. Hinds
+ . Portions created by David A. Hinds
+ are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
+
+ Modifications from dummy_cs.c are Copyright (C) 1999-2001 Marcus Niemann
+ . All Rights Reserved.
+
+ Alternatively, the contents of this file may be used under the
+ terms of the GNU Public License version 2 (the "GPL"), in which
+ case the provisions of the GPL are applicable instead of the
+ above. If you wish to allow the use of your version of this file
+ only under the terms of the GPL and not to allow others to use
+ your version of this file under the MPL, indicate your decision
+ by deleting the provisions above and replace them with the notice
+ and other provisions required by the GPL. If you do not delete
+ the provisions above, a recipient may use your version of this
+ file under either the MPL or the GPL.
+
+======================================================================*/
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
+ you do not define PCMCIA_DEBUG at all, all the debug code will be
+ left out. If you compile with PCMCIA_DEBUG=0, the debug code will
+ be present but disabled -- but it can then be enabled for specific
+ modules at load time with a 'pc_debug=#' option to insmod.
+*/
+
+#ifdef PCMCIA_DEBUG
+static int pc_debug = PCMCIA_DEBUG;
+MODULE_PARM(pc_debug, "i");
+#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
+static char *version =
+"sedlbauer_cs.c 1.1a 2001/01/28 15:04:04 (M.Niemann)";
+#else
+#define DEBUG(n, args...)
+#endif
+
+
+/*====================================================================*/
+
+/* Parameters that can be set with 'insmod' */
+
+/* The old way: bit map of interrupts to choose from */
+/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
+static u_int irq_mask = 0xdeb8;
+/* Newer, simpler way of listing specific interrupts */
+static int irq_list[4] = { -1 };
+
+MODULE_PARM(irq_mask, "i");
+MODULE_PARM(irq_list, "1-4i");
+
+static int protocol = 2; /* EURO-ISDN Default */
+MODULE_PARM(protocol, "i");
+
+extern int sedl_init_pcmcia(int, int, int*, int);
+
+/*====================================================================*/
+
+/*
+ The event() function is this driver's Card Services event handler.
+ It will be called by Card Services when an appropriate card status
+ event is received. The config() and release() entry points are
+ used to configure or release a socket, in response to card
+ insertion and ejection events. They are invoked from the sedlbauer
+ event handler.
+*/
+
+static void sedlbauer_config(dev_link_t *link);
+static void sedlbauer_release(u_long arg);
+static int sedlbauer_event(event_t event, int priority,
+ event_callback_args_t *args);
+
+/*
+ The attach() and detach() entry points are used to create and destroy
+ "instances" of the driver, where each instance represents everything
+ needed to manage one actual PCMCIA card.
+*/
+
+static dev_link_t *sedlbauer_attach(void);
+static void sedlbauer_detach(dev_link_t *);
+
+/*
+ You'll also need to prototype all the functions that will actually
+ be used to talk to your device. See 'memory_cs' for a good example
+ of a fully self-sufficient driver; the other drivers rely more or
+ less on other parts of the kernel.
+*/
+
+/*
+ The dev_info variable is the "key" that is used to match up this
+ device driver with appropriate cards, through the card configuration
+ database.
+*/
+
+static dev_info_t dev_info = "sedlbauer_cs";
+
+/*
+ A linked list of "instances" of the sedlbauer device. Each actual
+ PCMCIA card corresponds to one device instance, and is described
+ by one dev_link_t structure (defined in ds.h).
+
+ You may not want to use a linked list for this -- for example, the
+ memory card driver uses an array of dev_link_t pointers, where minor
+ device numbers are used to derive the corresponding array index.
+*/
+
+static dev_link_t *dev_list = NULL;
+
+/*
+ A dev_link_t structure has fields for most things that are needed
+ to keep track of a socket, but there will usually be some device
+ specific information that also needs to be kept track of. The
+ 'priv' pointer in a dev_link_t structure can be used to point to
+ a device-specific private data structure, like this.
+
+ To simplify the data structure handling, we actually include the
+ dev_link_t structure in the device's private data structure.
+
+ A driver needs to provide a dev_node_t structure for each device
+ on a card. In some cases, there is only one device per card (for
+ example, ethernet cards, modems). In other cases, there may be
+ many actual or logical devices (SCSI adapters, memory cards with
+ multiple partitions). The dev_node_t structures need to be kept
+ in a linked list starting at the 'dev' field of a dev_link_t
+ structure. We allocate them in the card's private data structure,
+ because they generally shouldn't be allocated dynamically.
+
+ In this case, we also provide a flag to indicate if a device is
+ "stopped" due to a power management event, or card ejection. The
+ device IO routines can use a flag like this to throttle IO to a
+ card that is not ready to accept it.
+
+ The bus_operations pointer is used on platforms for which we need
+ to use special socket-specific versions of normal IO primitives
+ (inb, outb, readb, writeb, etc) for card IO.
+*/
+
+typedef struct local_info_t {
+ dev_link_t link;
+ dev_node_t node;
+ int stop;
+ struct bus_operations *bus;
+} local_info_t;
+
+/*====================================================================*/
+
+static void cs_error(client_handle_t handle, int func, int ret)
+{
+ error_info_t err = { func, ret };
+ CardServices(ReportError, handle, &err);
+}
+
+/*======================================================================
+
+ sedlbauer_attach() creates an "instance" of the driver, allocating
+ local data structures for one device. The device is registered
+ with Card Services.
+
+ The dev_link structure is initialized, but we don't actually
+ configure the card at this point -- we wait until we receive a
+ card insertion event.
+
+======================================================================*/
+
+static dev_link_t *sedlbauer_attach(void)
+{
+ local_info_t *local;
+ dev_link_t *link;
+ client_reg_t client_reg;
+ int ret, i;
+
+ DEBUG(0, "sedlbauer_attach()\n");
+
+ /* Allocate space for private device-specific data */
+ local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
+ if (!local) return NULL;
+ memset(local, 0, sizeof(local_info_t));
+ link = &local->link; link->priv = local;
+
+ /* Initialize the dev_link_t structure */
+ link->release.function = &sedlbauer_release;
+ link->release.data = (u_long)link;
+
+ /* Interrupt setup */
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
+ link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID;
+ if (irq_list[0] == -1)
+ link->irq.IRQInfo2 = irq_mask;
+ else
+ for (i = 0; i < 4; i++)
+ link->irq.IRQInfo2 |= 1 << irq_list[i];
+ link->irq.Handler = NULL;
+
+ /*
+ General socket configuration defaults can go here. In this
+ client, we assume very little, and rely on the CIS for almost
+ everything. In most clients, many details (i.e., number, sizes,
+ and attributes of IO windows) are fixed by the nature of the
+ device, and can be hard-wired here.
+ */
+
+ /* from old sedl_cs
+ */
+ /* The io structure describes IO port mapping */
+ link->io.NumPorts1 = 8;
+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+ link->io.IOAddrLines = 3;
+
+
+ link->conf.Attributes = 0;
+ link->conf.Vcc = 50;
+ link->conf.IntType = INT_MEMORY_AND_IO;
+
+ /* Register with Card Services */
+ link->next = dev_list;
+ dev_list = link;
+ client_reg.dev_info = &dev_info;
+ client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
+ client_reg.EventMask =
+ CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
+ CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
+ CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
+ client_reg.event_handler = &sedlbauer_event;
+ client_reg.Version = 0x0210;
+ client_reg.event_callback_args.client_data = link;
+ ret = CardServices(RegisterClient, &link->handle, &client_reg);
+ if (ret != CS_SUCCESS) {
+ cs_error(link->handle, RegisterClient, ret);
+ sedlbauer_detach(link);
+ return NULL;
+ }
+
+ return link;
+} /* sedlbauer_attach */
+
+/*======================================================================
+
+ This deletes a driver "instance". The device is de-registered
+ with Card Services. If it has been released, all local data
+ structures are freed. Otherwise, the structures will be freed
+ when the device is released.
+
+======================================================================*/
+
+static void sedlbauer_detach(dev_link_t *link)
+{
+ dev_link_t **linkp;
+
+ DEBUG(0, "sedlbauer_detach(0x%p)\n", link);
+
+ /* Locate device structure */
+ for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
+ if (*linkp == link) break;
+ if (*linkp == NULL)
+ return;
+
+ /*
+ If the device is currently configured and active, we won't
+ actually delete it yet. Instead, it is marked so that when
+ the release() function is called, that will trigger a proper
+ detach().
+ */
+ if (link->state & DEV_CONFIG) {
+#ifdef PCMCIA_DEBUG
+ printk(KERN_DEBUG "sedlbauer_cs: detach postponed, '%s' "
+ "still locked\n", link->dev->dev_name);
+#endif
+ link->state |= DEV_STALE_LINK;
+ return;
+ }
+
+ /* Break the link with Card Services */
+ if (link->handle)
+ CardServices(DeregisterClient, link->handle);
+
+ /* Unlink device structure, and free it */
+ *linkp = link->next;
+ /* This points to the parent local_info_t struct */
+ kfree(link->priv);
+} /* sedlbauer_detach */
+
+/*======================================================================
+
+ sedlbauer_config() is scheduled to run after a CARD_INSERTION event
+ is received, to configure the PCMCIA socket, and to make the
+ device available to the system.
+
+======================================================================*/
+
+#define CS_CHECK(fn, args...) \
+while ((last_ret=CardServices(last_fn=(fn),args))!=0) goto cs_failed
+
+#define CFG_CHECK(fn, args...) \
+if (CardServices(fn, args) != 0) goto next_entry
+
+static void sedlbauer_config(dev_link_t *link)
+{
+ client_handle_t handle = link->handle;
+ local_info_t *dev = link->priv;
+ tuple_t tuple;
+ cisparse_t parse;
+ int last_fn, last_ret;
+ u_char buf[64];
+ config_info_t conf;
+ win_req_t req;
+ memreq_t map;
+
+
+ DEBUG(0, "sedlbauer_config(0x%p)\n", link);
+
+ /*
+ This reads the card's CONFIG tuple to find its configuration
+ registers.
+ */
+ tuple.DesiredTuple = CISTPL_CONFIG;
+ tuple.Attributes = 0;
+ tuple.TupleData = buf;
+ tuple.TupleDataMax = sizeof(buf);
+ tuple.TupleOffset = 0;
+ CS_CHECK(GetFirstTuple, handle, &tuple);
+ CS_CHECK(GetTupleData, handle, &tuple);
+ CS_CHECK(ParseTuple, handle, &tuple, &parse);
+ link->conf.ConfigBase = parse.config.base;
+ link->conf.Present = parse.config.rmask[0];
+
+ /* Configure card */
+ link->state |= DEV_CONFIG;
+
+ /* Look up the current Vcc */
+ CS_CHECK(GetConfigurationInfo, handle, &conf);
+ link->conf.Vcc = conf.Vcc;
+
+ /*
+ In this loop, we scan the CIS for configuration table entries,
+ each of which describes a valid card configuration, including
+ voltage, IO window, memory window, and interrupt settings.
+
+ We make no assumptions about the card to be configured: we use
+ just the information available in the CIS. In an ideal world,
+ this would work for any PCMCIA card, but it requires a complete
+ and accurate CIS. In practice, a driver usually "knows" most of
+ these things without consulting the CIS, and most client drivers
+ will only use the CIS to fill in implementation-defined details.
+ */
+ tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
+ CS_CHECK(GetFirstTuple, handle, &tuple);
+ while (1) {
+ cistpl_cftable_entry_t dflt = { 0 };
+ cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
+ CFG_CHECK(GetTupleData, handle, &tuple);
+ CFG_CHECK(ParseTuple, handle, &tuple, &parse);
+
+ if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
+ if (cfg->index == 0) goto next_entry;
+ link->conf.ConfigIndex = cfg->index;
+
+ /* Does this card need audio output? */
+ if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
+ link->conf.Attributes |= CONF_ENABLE_SPKR;
+ link->conf.Status = CCSR_AUDIO_ENA;
+ }
+
+ /* Use power settings for Vcc and Vpp if present */
+ /* Note that the CIS values need to be rescaled */
+ if (cfg->vcc.present & (1<vcc.param[CISTPL_POWER_VNOM]/10000)
+ goto next_entry;
+ } else if (dflt.vcc.present & (1<vpp1.present & (1<conf.Vpp1 = link->conf.Vpp2 =
+ cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
+ else if (dflt.vpp1.present & (1<conf.Vpp1 = link->conf.Vpp2 =
+ dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
+
+ /* Do we need to allocate an interrupt? */
+ if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1)
+ link->conf.Attributes |= CONF_ENABLE_IRQ;
+
+ /* IO window settings */
+ link->io.NumPorts1 = link->io.NumPorts2 = 0;
+ if ((cfg->io.nwin > 0) || (dflt.io.nwin > 0)) {
+ cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt.io;
+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
+ if (!(io->flags & CISTPL_IO_8BIT))
+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
+ if (!(io->flags & CISTPL_IO_16BIT))
+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+/* new in dummy.cs 2001/01/28 MN
+ link->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
+*/
+ link->io.BasePort1 = io->win[0].base;
+ link->io.NumPorts1 = io->win[0].len;
+ if (io->nwin > 1) {
+ link->io.Attributes2 = link->io.Attributes1;
+ link->io.BasePort2 = io->win[1].base;
+ link->io.NumPorts2 = io->win[1].len;
+ }
+ /* This reserves IO space but doesn't actually enable it */
+ CFG_CHECK(RequestIO, link->handle, &link->io);
+ }
+
+ /*
+ Now set up a common memory window, if needed. There is room
+ in the dev_link_t structure for one memory window handle,
+ but if the base addresses need to be saved, or if multiple
+ windows are needed, the info should go in the private data
+ structure for this device.
+
+ Note that the memory window base is a physical address, and
+ needs to be mapped to virtual space with ioremap() before it
+ is used.
+ */
+ if ((cfg->mem.nwin > 0) || (dflt.mem.nwin > 0)) {
+ cistpl_mem_t *mem =
+ (cfg->mem.nwin) ? &cfg->mem : &dflt.mem;
+ req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
+ req.Attributes |= WIN_ENABLE;
+ req.Base = mem->win[0].host_addr;
+ req.Size = mem->win[0].len;
+/* new in dummy.cs 2001/01/28 MN
+ if (req.Size < 0x1000)
+ req.Size = 0x1000;
+*/
+ req.AccessSpeed = 0;
+ link->win = (window_handle_t)link->handle;
+ CFG_CHECK(RequestWindow, &link->win, &req);
+ map.Page = 0; map.CardOffset = mem->win[0].card_addr;
+ CFG_CHECK(MapMemPage, link->win, &map);
+ }
+ /* If we got this far, we're cool! */
+ break;
+
+ next_entry:
+/* new in dummy.cs 2001/01/28 MN
+ if (link->io.NumPorts1)
+ CardServices(ReleaseIO, link->handle, &link->io);
+*/
+ CS_CHECK(GetNextTuple, handle, &tuple);
+ }
+
+ /*
+ Allocate an interrupt line. Note that this does not assign a
+ handler to the interrupt, unless the 'Handler' member of the
+ irq structure is initialized.
+ */
+ if (link->conf.Attributes & CONF_ENABLE_IRQ)
+ CS_CHECK(RequestIRQ, link->handle, &link->irq);
+
+ /*
+ This actually configures the PCMCIA socket -- setting up
+ the I/O windows and the interrupt mapping, and putting the
+ card and host interface into "Memory and IO" mode.
+ */
+ CS_CHECK(RequestConfiguration, link->handle, &link->conf);
+
+ /*
+ At this point, the dev_node_t structure(s) need to be
+ initialized and arranged in a linked list at link->dev.
+ */
+ sprintf(dev->node.dev_name, "sedlbauer");
+ dev->node.major = dev->node.minor = 0;
+ link->dev = &dev->node;
+
+ /* Finally, report what we've done */
+ printk(KERN_INFO "%s: index 0x%02x: Vcc %d.%d",
+ dev->node.dev_name, link->conf.ConfigIndex,
+ link->conf.Vcc/10, link->conf.Vcc%10);
+ if (link->conf.Vpp1)
+ printk(", Vpp %d.%d", link->conf.Vpp1/10, link->conf.Vpp1%10);
+ if (link->conf.Attributes & CONF_ENABLE_IRQ)
+ printk(", irq %d", link->irq.AssignedIRQ);
+ if (link->io.NumPorts1)
+ printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ link->io.BasePort1+link->io.NumPorts1-1);
+ if (link->io.NumPorts2)
+ printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ link->io.BasePort2+link->io.NumPorts2-1);
+ if (link->win)
+ printk(", mem 0x%06lx-0x%06lx", req.Base,
+ req.Base+req.Size-1);
+ printk("\n");
+
+ link->state &= ~DEV_CONFIG_PENDING;
+
+ sedl_init_pcmcia(link->io.BasePort1, link->irq.AssignedIRQ,
+ &(((local_info_t*)link->priv)->stop),
+ protocol);
+
+ return;
+
+cs_failed:
+ cs_error(link->handle, last_fn, last_ret);
+ sedlbauer_release((u_long)link);
+
+} /* sedlbauer_config */
+
+/*======================================================================
+
+ After a card is removed, sedlbauer_release() will unregister the
+ device, and release the PCMCIA configuration. If the device is
+ still open, this will be postponed until it is closed.
+
+======================================================================*/
+
+static void sedlbauer_release(u_long arg)
+{
+ dev_link_t *link = (dev_link_t *)arg;
+
+ DEBUG(0, "sedlbauer_release(0x%p)\n", link);
+
+ /*
+ If the device is currently in use, we won't release until it
+ is actually closed, because until then, we can't be sure that
+ no one will try to access the device or its data structures.
+ */
+ if (link->open) {
+ DEBUG(1, "sedlbauer_cs: release postponed, '%s' still open\n",
+ link->dev->dev_name);
+ link->state |= DEV_STALE_CONFIG;
+ return;
+ }
+
+ /* Unlink the device chain */
+ link->dev = NULL;
+
+ /*
+ In a normal driver, additional code may be needed to release
+ other kernel data structures associated with this device.
+ */
+
+ /* Don't bother checking to see if these succeed or not */
+ if (link->win)
+ CardServices(ReleaseWindow, link->win);
+ CardServices(ReleaseConfiguration, link->handle);
+ if (link->io.NumPorts1)
+ CardServices(ReleaseIO, link->handle, &link->io);
+ if (link->irq.AssignedIRQ)
+ CardServices(ReleaseIRQ, link->handle, &link->irq);
+ link->state &= ~DEV_CONFIG;
+
+ if (link->state & DEV_STALE_LINK)
+ sedlbauer_detach(link);
+
+} /* sedlbauer_release */
+
+/*======================================================================
+
+ The card status event handler. Mostly, this schedules other
+ stuff to run after an event is received.
+
+ When a CARD_REMOVAL event is received, we immediately set a
+ private flag to block future accesses to this device. All the
+ functions that actually access the device should check this flag
+ to make sure the card is still present.
+
+======================================================================*/
+
+static int sedlbauer_event(event_t event, int priority,
+ event_callback_args_t *args)
+{
+ dev_link_t *link = args->client_data;
+ local_info_t *dev = link->priv;
+
+ DEBUG(1, "sedlbauer_event(0x%06x)\n", event);
+
+ switch (event) {
+ case CS_EVENT_CARD_REMOVAL:
+ link->state &= ~DEV_PRESENT;
+ if (link->state & DEV_CONFIG) {
+ ((local_info_t *)link->priv)->stop = 1;
+ mod_timer(&link->release, jiffies + HZ/20);
+ }
+ break;
+ case CS_EVENT_CARD_INSERTION:
+ link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
+ dev->bus = args->bus;
+ sedlbauer_config(link);
+ break;
+ case CS_EVENT_PM_SUSPEND:
+ link->state |= DEV_SUSPEND;
+ /* Fall through... */
+ case CS_EVENT_RESET_PHYSICAL:
+ /* Mark the device as stopped, to block IO until later */
+ dev->stop = 1;
+ if (link->state & DEV_CONFIG)
+ CardServices(ReleaseConfiguration, link->handle);
+ break;
+ case CS_EVENT_PM_RESUME:
+ link->state &= ~DEV_SUSPEND;
+ /* Fall through... */
+ case CS_EVENT_CARD_RESET:
+ if (link->state & DEV_CONFIG)
+ CardServices(RequestConfiguration, link->handle, &link->conf);
+ dev->stop = 0;
+ /*
+ In a normal driver, additional code may go here to restore
+ the device state and restart IO.
+ */
+ break;
+ }
+ return 0;
+} /* sedlbauer_event */
+
+/*====================================================================*/
+
+static int __init init_sedlbauer_cs(void)
+{
+ servinfo_t serv;
+ DEBUG(0, "%s\n", version);
+ CardServices(GetCardServicesInfo, &serv);
+ if (serv.Revision != CS_RELEASE_CODE) {
+ printk(KERN_NOTICE "sedlbauer_cs: Card Services release "
+ "does not match!\n");
+ return -1;
+ }
+ register_pccard_driver(&dev_info, &sedlbauer_attach, &sedlbauer_detach);
+ return 0;
+}
+
+static void __exit exit_sedlbauer_cs(void)
+{
+ DEBUG(0, "sedlbauer_cs: unloading\n");
+ unregister_pccard_driver(&dev_info);
+ while (dev_list != NULL) {
+ del_timer(&dev_list->release);
+ if (dev_list->state & DEV_CONFIG)
+ sedlbauer_release((u_long)dev_list);
+ sedlbauer_detach(dev_list);
+ }
+}
+
+module_init(init_sedlbauer_cs);
+module_exit(exit_sedlbauer_cs);
+
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/sportster.c linux/drivers/isdn/hisax/sportster.c
--- v2.4.2/linux/drivers/isdn/hisax/sportster.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/sportster.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: sportster.c,v 1.14 2000/11/24 17:05:38 kai Exp $
+/* $Id: sportster.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $
*
* sportster.c low level stuff for USR Sportster internal TA
*
@@ -6,7 +6,7 @@
*
* Thanks to Christian "naddy" Weisgerber (3Com, US Robotics) for documentation
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -17,7 +17,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-const char *sportster_revision = "$Revision: 1.14 $";
+const char *sportster_revision = "$Revision: 1.14.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/tei.c linux/drivers/isdn/hisax/tei.c
--- v2.4.2/linux/drivers/isdn/hisax/tei.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/tei.c Fri Mar 2 11:12:09 2001
@@ -1,9 +1,9 @@
-/* $Id: tei.c,v 2.17 2000/11/24 17:05:38 kai Exp $
+/* $Id: tei.c,v 2.17.6.1 2001/02/16 16:43:29 kai Exp $
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@@ -17,7 +17,7 @@
#include
#include
-const char *tei_revision = "$Revision: 2.17 $";
+const char *tei_revision = "$Revision: 2.17.6.1 $";
#define ID_REQUEST 1
#define ID_ASSIGNED 2
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/teleint.c linux/drivers/isdn/hisax/teleint.c
--- v2.4.2/linux/drivers/isdn/hisax/teleint.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/teleint.c Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: teleint.c,v 1.14 2000/11/24 17:05:38 kai Exp $
+/* $Id: teleint.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $
*
* teleint.c low level stuff for TeleInt isdn cards
*
* Author Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -17,7 +17,7 @@
extern const char *CardType[];
-const char *TeleInt_revision = "$Revision: 1.14 $";
+const char *TeleInt_revision = "$Revision: 1.14.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/teles0.c linux/drivers/isdn/hisax/teles0.c
--- v2.4.2/linux/drivers/isdn/hisax/teles0.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/teles0.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: teles0.c,v 2.13 2000/11/24 17:05:38 kai Exp $
+/* $Id: teles0.c,v 2.13.6.1 2001/02/16 16:43:29 kai Exp $
*
* teles0.c low level stuff for Teles Memory IO isdn cards
* based on the teles driver from Jan den Ouden
@@ -9,7 +9,7 @@
* Fritz Elfert
* Beat Doebeli
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -21,7 +21,7 @@
extern const char *CardType[];
-const char *teles0_revision = "$Revision: 2.13 $";
+const char *teles0_revision = "$Revision: 2.13.6.1 $";
#define TELES_IOMEM_SIZE 0x400
#define byteout(addr,val) outb(val,addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/teles3.c linux/drivers/isdn/hisax/teles3.c
--- v2.4.2/linux/drivers/isdn/hisax/teles3.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hisax/teles3.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: teles3.c,v 2.17 2000/11/24 17:05:38 kai Exp $
+/* $Id: teles3.c,v 2.17.6.1 2001/02/16 16:43:29 kai Exp $
*
* teles3.c low level stuff for Teles 16.3 & PNP isdn cards
*
@@ -10,7 +10,7 @@
* Fritz Elfert
* Beat Doebeli
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -21,7 +21,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-const char *teles3_revision = "$Revision: 2.17 $";
+const char *teles3_revision = "$Revision: 2.17.6.1 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/telespci.c linux/drivers/isdn/hisax/telespci.c
--- v2.4.2/linux/drivers/isdn/hisax/telespci.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/telespci.c Fri Mar 2 11:12:09 2001
@@ -1,11 +1,11 @@
-/* $Id: telespci.c,v 2.16.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: telespci.c,v 2.16.6.4 2001/02/16 16:43:29 kai Exp $
*
* telespci.c low level stuff for Teles PCI isdn cards
*
* Author Ton van Rosmalen
* Karsten Keil (keil@isdn4linux.de)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__
@@ -18,7 +18,7 @@
#include
extern const char *CardType[];
-const char *telespci_revision = "$Revision: 2.16.6.2 $";
+const char *telespci_revision = "$Revision: 2.16.6.4 $";
#define ZORAN_PO_RQ_PEN 0x02000000
#define ZORAN_PO_WR 0x00800000
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/w6692.c linux/drivers/isdn/hisax/w6692.c
--- v2.4.2/linux/drivers/isdn/hisax/w6692.c Wed Nov 29 10:12:29 2000
+++ linux/drivers/isdn/hisax/w6692.c Fri Mar 2 11:12:09 2001
@@ -1,11 +1,11 @@
-/* $Id: w6692.c,v 1.12.6.2 2000/11/29 16:00:14 kai Exp $
+/* $Id: w6692.c,v 1.12.6.4 2001/02/16 16:43:29 kai Exp $
*
* w6692.c Winbond W6692 specific routines
*
* Author Petr Novak
* (based on HiSax driver by Karsten Keil)
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
@@ -35,7 +35,7 @@
extern const char *CardType[];
-const char *w6692_revision = "$Revision: 1.12.6.2 $";
+const char *w6692_revision = "$Revision: 1.12.6.4 $";
#define DBUSY_TIMER_VALUE 80
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hisax/w6692.h linux/drivers/isdn/hisax/w6692.h
--- v2.4.2/linux/drivers/isdn/hisax/w6692.h Sun Aug 6 12:43:42 2000
+++ linux/drivers/isdn/hisax/w6692.h Fri Mar 2 11:12:09 2001
@@ -1,10 +1,10 @@
-/* $Id: w6692.h,v 1.2 2000/06/26 08:59:15 keil Exp $
+/* $Id: w6692.h,v 1.2.6.1 2001/02/16 16:43:29 kai Exp $
*
* w6692.h Winbond W6692 specific defines
*
* Author Petr Novak
*
- * This file is (c) under GNU PUBLIC LICENSE
+ * This file is (c) under GNU General Public License
*
*/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/boardergo.c linux/drivers/isdn/hysdn/boardergo.c
--- v2.4.2/linux/drivers/isdn/hysdn/boardergo.c Fri Dec 29 14:07:22 2000
+++ linux/drivers/isdn/hysdn/boardergo.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: boardergo.c,v 1.5.6.1 2000/12/10 22:01:04 kai Exp $
+/* $Id: boardergo.c,v 1.5.6.2 2001/02/16 16:43:30 kai Exp $
* Linux driver for HYSDN cards, specific routines for ergo type boards.
*
@@ -270,7 +270,7 @@
return (-ERR_BOOTIMG_FAIL);
}
} /* start_boot_img */
- return (0); /* successfull */
+ return (0); /* successful */
} /* ergo_writebootimg */
/********************************************************************************/
@@ -337,7 +337,7 @@
/***********************************************************************************/
/* ergo_waitpofready waits for a maximum of 10 seconds for the completition of the */
-/* boot process. If the process has been successfull 0 is returned otherwise a */
+/* boot process. If the process has been successful 0 is returned otherwise a */
/* negative error code is returned. */
/***********************************************************************************/
static int
@@ -361,7 +361,7 @@
(dpr->ToPcSize < MIN_RDY_MSG_SIZE) ||
(dpr->ToPcSize > MAX_RDY_MSG_SIZE) ||
((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC))
- break; /* an error occured */
+ break; /* an error occurred */
/* Check for additional data delivered during SysReady */
msg_size = dpr->ToPcSize - RDY_MAGIC_SIZE;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hycapi.c linux/drivers/isdn/hysdn/hycapi.c
--- v2.4.2/linux/drivers/isdn/hysdn/hycapi.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hysdn/hycapi.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: hycapi.c,v 1.8 2000/11/22 17:13:13 kai Exp $
+/* $Id: hycapi.c,v 1.8.6.1 2001/02/16 16:43:30 kai Exp $
*
* Linux driver for HYSDN cards, CAPI2.0-Interface.
* written by Ulrich Albrecht (u.albrecht@hypercope.de) for Hypercope GmbH
@@ -41,7 +41,7 @@
#include "hysdn_defs.h"
#include
-static char hycapi_revision[]="$Revision: 1.8 $";
+static char hycapi_revision[]="$Revision: 1.8.6.1 $";
typedef struct _hycapi_appl {
unsigned int ctrl_mask;
@@ -522,7 +522,7 @@
/******************************************************************
hycapi_rx_capipkt
-Recieve a capi-message.
+Receive a capi-message.
All B3_DATA_IND are converted to 64K-extension compatible format.
New nccis are created if neccessary.
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hysdn_boot.c linux/drivers/isdn/hysdn/hysdn_boot.c
--- v2.4.2/linux/drivers/isdn/hysdn/hysdn_boot.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/hysdn/hysdn_boot.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_boot.c,v 1.4 2000/11/13 22:51:47 kai Exp $
+/* $Id: hysdn_boot.c,v 1.4.6.2 2001/02/16 16:43:30 kai Exp $
* Linux driver for HYSDN cards, specific routines for booting and pof handling.
*
@@ -49,7 +49,7 @@
uchar pof_state; /* actual state of read handler */
uchar is_crypted; /* card data is crypted */
int BufSize; /* actual number of bytes bufferd */
- int last_error; /* last occured error */
+ int last_error; /* last occurred error */
word pof_recid; /* actual pof recid */
ulong pof_reclen; /* total length of pof record data */
ulong pof_recoffset; /* actual offset inside pof record */
@@ -62,7 +62,7 @@
};
/*****************************************************/
-/* start decryption of sucessive POF file chuncks. */
+/* start decryption of successive POF file chuncks. */
/* */
/* to be called at start of POF file reading, */
/* before starting any decryption on any POF record. */
@@ -93,7 +93,7 @@
/********************************************************************************/
/* pof_handle_data executes the required actions dependant on the active record */
-/* id. If successfull 0 is returned, a negative value shows an error. */
+/* id. If successful 0 is returned, a negative value shows an error. */
/********************************************************************************/
static int
pof_handle_data(hysdn_card * card, int datlen)
@@ -182,7 +182,7 @@
/* number of data bytes. The number delivered is additionally supplied for */
/* verification. The functions handles the data and returns the needed number */
/* of bytes for the next action. If the returned value is 0 or less an error */
-/* occured and booting must be aborted. */
+/* occurred and booting must be aborted. */
/******************************************************************************/
int
pof_write_buffer(hysdn_card * card, int datlen)
@@ -253,7 +253,7 @@
break;
}
if ((boot->last_error = pof_handle_data(card, datlen)) < 0)
- return (boot->last_error); /* an error occured */
+ return (boot->last_error); /* an error occurred */
boot->pof_recoffset += datlen;
if (boot->pof_recoffset >= boot->pof_reclen) {
boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */
@@ -346,7 +346,7 @@
/*********************************************************************************/
/* EvalSysrTokData checks additional records delivered with the Sysready Message */
-/* when POF has been booted. A return value of 0 is used if no error occured. */
+/* when POF has been booted. A return value of 0 is used if no error occurred. */
/*********************************************************************************/
int
EvalSysrTokData(hysdn_card * card, uchar * cp, int len)
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hysdn_init.c linux/drivers/isdn/hysdn/hysdn_init.c
--- v2.4.2/linux/drivers/isdn/hysdn/hysdn_init.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/hysdn/hysdn_init.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_init.c,v 1.6.6.1 2000/11/28 12:02:47 kai Exp $
+/* $Id: hysdn_init.c,v 1.6.6.5 2001/02/16 16:43:30 kai Exp $
* Linux driver for HYSDN cards, init functions.
* written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
@@ -32,7 +32,7 @@
#include "hysdn_defs.h"
-static char *hysdn_init_revision = "$Revision: 1.6.6.1 $";
+static char *hysdn_init_revision = "$Revision: 1.6.6.5 $";
int cardmax; /* number of found cards */
hysdn_card *card_root = NULL; /* pointer to first card */
@@ -89,6 +89,7 @@
akt_pcidev)) != NULL) {
if (pci_enable_device(akt_pcidev))
continue;
+
if (!(card = kmalloc(sizeof(hysdn_card), GFP_KERNEL))) {
printk(KERN_ERR "HYSDN: unable to alloc device mem \n");
return;
@@ -173,7 +174,6 @@
/* image becomes smaller and the driver code is only loaded when needed. */
/* Additionally newer versions may be activated without rebooting. */
/****************************************************************************/
-#ifdef CONFIG_MODULES
/******************************************************/
/* extract revision number from string for log output */
@@ -197,12 +197,12 @@
/****************************************************************************/
/* init_module is called once when the module is loaded to do all necessary */
/* things like autodetect... */
-/* If the return value of this function is 0 the init has been successfull */
+/* If the return value of this function is 0 the init has been successful */
/* and the module is added to the list in /proc/modules, otherwise an error */
/* is assumed and the module will not be kept in memory. */
/****************************************************************************/
-int
-init_module(void)
+static int __init
+hysdn_init(void)
{
char tmp[50];
@@ -235,14 +235,14 @@
/***********************************************************************/
/* cleanup_module is called when the module is released by the kernel. */
-/* The routine is only called if init_module has been successfull and */
+/* The routine is only called if init_module has been successful and */
/* the module counter has a value of 0. Otherwise this function will */
/* not be called. This function must release all resources still allo- */
/* cated as after the return from this function the module code will */
/* be removed from memory. */
/***********************************************************************/
-void
-cleanup_module(void)
+static void __exit
+hysdn_exit(void)
{
#ifdef CONFIG_HYSDN_CAPI
hysdn_card *card;
@@ -261,4 +261,5 @@
printk(KERN_NOTICE "HYSDN: module unloaded\n");
} /* cleanup_module */
-#endif /* CONFIG_MODULES */
+module_init(hysdn_init);
+module_exit(hysdn_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hysdn_net.c linux/drivers/isdn/hysdn/hysdn_net.c
--- v2.4.2/linux/drivers/isdn/hysdn/hysdn_net.c Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/hysdn/hysdn_net.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: hysdn_net.c,v 1.8 2000/11/13 22:51:47 kai Exp $
+/* $Id: hysdn_net.c,v 1.8.6.1 2001/02/16 16:43:30 kai Exp $
* Linux driver for HYSDN cards, net (ethernet type) handling routines.
*
@@ -38,7 +38,7 @@
#include "hysdn_defs.h"
/* store the actual version for log reporting */
-char *hysdn_net_revision = "$Revision: 1.8 $";
+char *hysdn_net_revision = "$Revision: 1.8.6.1 $";
#define MAX_SKB_BUFFERS 20 /* number of buffers for keeping TX-data */
@@ -350,7 +350,7 @@
if (card->debug_flags & LOG_NET_INIT)
hysdn_addlog(card, "network device deleted");
- return (0); /* always successfull */
+ return (0); /* always successful */
} /* hysdn_net_release */
/*****************************************************************************/
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hysdn_procconf.c linux/drivers/isdn/hysdn/hysdn_procconf.c
--- v2.4.2/linux/drivers/isdn/hysdn/hysdn_procconf.c Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/hysdn/hysdn_procconf.c Fri Mar 2 11:12:10 2001
@@ -56,7 +56,7 @@
/***********************************************************************/
/* process_line parses one config line and transfers it to the card if */
/* necessary. */
-/* if the return value is negative an error occured. */
+/* if the return value is negative an error occurred. */
/***********************************************************************/
static int
process_line(struct conf_writedata *cnf)
@@ -130,7 +130,7 @@
if (ch == 0x1A) {
/* we detected a pof file */
if ((cnf->needed_size = pof_write_open(cnf->card, &cnf->pof_buffer)) <= 0)
- return (cnf->needed_size); /* an error occured -> exit */
+ return (cnf->needed_size); /* an error occurred -> exit */
cnf->buf_size = 0; /* buffer is empty */
cnf->state = CONF_STATE_POF; /* new state */
} else {
@@ -158,7 +158,7 @@
cnf->needed_size = pof_write_buffer(cnf->card, cnf->buf_size); /* write data */
if (cnf->needed_size <= 0) {
cnf->card->state = CARD_STATE_BOOTERR; /* show boot error */
- return (cnf->needed_size); /* an error occured */
+ return (cnf->needed_size); /* an error occurred */
}
cnf->buf_size = 0; /* buffer is empty again */
}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hysdn_procfs.c linux/drivers/isdn/hysdn/hysdn_procfs.c
--- v2.4.2/linux/drivers/isdn/hysdn/hysdn_procfs.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/isdn/hysdn/hysdn_procfs.c Fri Mar 2 11:12:10 2001
@@ -139,7 +139,7 @@
return (-ESPIPE);
if ((retval = pof_boot_write(card, buf, count)) < 0)
- retval = -EFAULT; /* an error occured */
+ retval = -EFAULT; /* an error occurred */
return (retval);
} /* hysdn_log_write */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/hysdn/hysdn_sched.c linux/drivers/isdn/hysdn/hysdn_sched.c
--- v2.4.2/linux/drivers/isdn/hysdn/hysdn_sched.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/hysdn/hysdn_sched.c Fri Mar 2 11:12:10 2001
@@ -141,7 +141,7 @@
/*****************************************************************************/
-/* send one config line to the card and return 0 if successfull, otherwise a */
+/* send one config line to the card and return 0 if successful, otherwise a */
/* negative error code. */
/* The function works with timeouts perhaps not giving the greatest speed */
/* sending the line, but this should be meaningless beacuse only some lines */
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/icn/icn.c linux/drivers/isdn/icn/icn.c
--- v2.4.2/linux/drivers/isdn/icn/icn.c Fri Nov 17 11:16:20 2000
+++ linux/drivers/isdn/icn/icn.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: icn.c,v 1.65 2000/11/13 22:51:48 kai Exp $
+/* $Id: icn.c,v 1.65.6.3 2001/02/16 16:43:31 kai Exp $
* ISDN low-level module for the ICN active ISDN-Card.
*
@@ -21,6 +21,7 @@
*/
#include "icn.h"
+#include
/*
* Verbose bootcode- and protocol-downloading.
@@ -33,7 +34,7 @@
#undef MAP_DEBUG
static char
-*revision = "$Revision: 1.65 $";
+*revision = "$Revision: 1.65.6.3 $";
static int icn_addcard(int, char *, char *);
@@ -867,7 +868,7 @@
SLEEP(1);
memcpy_toio(dev.shmem, codebuf, ICN_CODE_STAGE1); /* Copy code */
#ifdef BOOT_DEBUG
- printk(KERN_DEBUG "Bootloader transfered\n");
+ printk(KERN_DEBUG "Bootloader transferred\n");
#endif
if (card->doubleS0) {
SLEEP(1);
@@ -883,7 +884,7 @@
SLEEP(1);
memcpy_toio(dev.shmem, codebuf, ICN_CODE_STAGE1); /* Copy code */
#ifdef BOOT_DEBUG
- printk(KERN_DEBUG "Bootloader transfered\n");
+ printk(KERN_DEBUG "Bootloader transferred\n");
#endif
}
kfree(codebuf);
@@ -1638,10 +1639,7 @@
return 0;
}
-#ifdef MODULE
-#define icn_init init_module
-#else
-#include
+#ifndef MODULE
static int __init
icn_setup(char *line)
{
@@ -1667,10 +1665,9 @@
return(1);
}
__setup("icn=", icn_setup);
-#endif /* MODULES */
+#endif /* MODULE */
-int
-icn_init(void)
+static int __init icn_init(void)
{
char *p;
char rev[10];
@@ -1681,9 +1678,6 @@
dev.mcard = NULL;
dev.firstload = 1;
- /* No symbols to export, hide all symbols */
- EXPORT_NO_SYMBOLS;
-
if ((p = strchr(revision, ':'))) {
strcpy(rev, p + 1);
p = strchr(rev, '$');
@@ -1695,9 +1689,7 @@
return (icn_addcard(portbase, icn_id, icn_id2));
}
-#ifdef MODULE
-void
-cleanup_module(void)
+static void __exit icn_exit(void)
{
isdn_ctrl cmd;
icn_card *card = cards;
@@ -1731,4 +1723,6 @@
release_shmem((ulong) dev.shmem, 0x4000);
printk(KERN_NOTICE "ICN-ISDN-driver unloaded\n");
}
-#endif
+
+module_init(icn_init);
+module_exit(icn_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/icn/icn.h linux/drivers/isdn/icn/icn.h
--- v2.4.2/linux/drivers/isdn/icn/icn.h Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/icn/icn.h Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: icn.h,v 1.30 2000/11/13 22:51:48 kai Exp $
+/* $Id: icn.h,v 1.30.6.2 2001/02/16 16:43:31 kai Exp $
* ISDN lowlevel-module for the ICN active ISDN-Card.
*
@@ -217,9 +217,9 @@
#ifdef MODULE
MODULE_AUTHOR("Fritz Elfert");
MODULE_PARM(portbase, "i");
-MODULE_PARM_DESC(portbase, "Port adress of first card");
+MODULE_PARM_DESC(portbase, "Port address of first card");
MODULE_PARM(membase, "i");
-MODULE_PARM_DESC(membase, "Shared memory adress of all cards");
+MODULE_PARM_DESC(membase, "Shared memory address of all cards");
MODULE_PARM(icn_id, "s");
MODULE_PARM_DESC(icn_id, "ID-String of first card");
MODULE_PARM(icn_id2, "s");
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdn_bsdcomp.c linux/drivers/isdn/isdn_bsdcomp.c
--- v2.4.2/linux/drivers/isdn/isdn_bsdcomp.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/isdn_bsdcomp.c Fri Mar 2 11:12:09 2001
@@ -47,12 +47,8 @@
* SUCH DAMAGE.
*/
-#ifndef MODULE
-#error This file must be compiled as a module.
-#endif
-
#include
-
+#include
#include
#include
#include
@@ -919,7 +915,7 @@
* Module support routines
*************************************************************/
-int init_module(void)
+static int __init isdn_bsdcomp_init(void)
{
int answer = isdn_ppp_register_compressor (&ippp_bsd_compress);
if (answer == 0)
@@ -927,7 +923,10 @@
return answer;
}
-void cleanup_module(void)
+static void __exit isdn_bsdcomp_exit(void)
{
isdn_ppp_unregister_compressor (&ippp_bsd_compress);
}
+
+module_init(isdn_bsdcomp_init);
+module_exit(isdn_bsdcomp_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdn_cards.c linux/drivers/isdn/isdn_cards.c
--- v2.4.2/linux/drivers/isdn/isdn_cards.c Fri Dec 29 14:40:54 2000
+++ linux/drivers/isdn/isdn_cards.c Wed Dec 31 16:00:00 1969
@@ -1,63 +0,0 @@
-/* $Id: isdn_cards.c,v 1.14 2000/11/23 20:45:14 kai Exp $
-
- * Linux ISDN subsystem, initialization for non-modularized drivers.
- *
- * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include
-
-#ifdef CONFIG_ISDN_DRV_ICN
-extern void icn_init(void);
-#endif
-
-#ifdef CONFIG_ISDN_DRV_HISAX
-extern void HiSax_init(void);
-#endif
-
-#ifdef CONFIG_ISDN_DRV_PCBIT
-extern void pcbit_init(void);
-#endif
-
-#if defined(CONFIG_ISDN_DRV_EICON_OLD) || defined(CONFIG_ISDN_DRV_EICON_DIVAS)
-extern void eicon_init(void);
-#endif
-
-#if CONFIG_ISDN_DRV_ACT2000
-extern void act2000_init(void);
-#endif
-
-void
-isdn_cards_init(void)
-{
-#if CONFIG_ISDN_DRV_ICN
- icn_init();
-#endif
-#ifdef CONFIG_ISDN_DRV_HISAX
- HiSax_init();
-#endif
-#if CONFIG_ISDN_DRV_PCBIT
- pcbit_init();
-#endif
-#if CONFIG_ISDN_DRV_ACT2000
- act2000_init();
-#endif
-#if defined(CONFIG_ISDN_DRV_EICON_OLD) || defined(CONFIG_ISDN_DRV_EICON_DIVAS)
- eicon_init();
-#endif
-}
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdn_cards.h linux/drivers/isdn/isdn_cards.h
--- v2.4.2/linux/drivers/isdn/isdn_cards.h Sun Aug 6 12:43:42 2000
+++ linux/drivers/isdn/isdn_cards.h Wed Dec 31 16:00:00 1969
@@ -1,23 +0,0 @@
-/* $Id: isdn_cards.h,v 1.4 2000/05/11 22:29:20 kai Exp $
-
- * Linux ISDN subsystem, initialization for non-modularized drivers.
- *
- * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-extern void isdn_cards_init(void);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdn_common.c linux/drivers/isdn/isdn_common.c
--- v2.4.2/linux/drivers/isdn/isdn_common.c Wed Feb 21 18:20:23 2001
+++ linux/drivers/isdn/isdn_common.c Fri Mar 2 11:12:10 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_common.c,v 1.114.6.6 2001/02/07 11:31:30 kai Exp $
+/* $Id: isdn_common.c,v 1.114.6.8 2001/02/16 16:43:22 kai Exp $
* Linux ISDN subsystem, common used functions (linklevel).
*
@@ -42,9 +42,8 @@
#endif
#ifdef CONFIG_ISDN_DIVERSION
#include
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
#include "isdn_v110.h"
-#include "isdn_cards.h"
#include
/* Debugflags */
@@ -52,7 +51,7 @@
isdn_dev *dev;
-static char *isdn_revision = "$Revision: 1.114.6.6 $";
+static char *isdn_revision = "$Revision: 1.114.6.8 $";
extern char *isdn_net_revision;
extern char *isdn_tty_revision;
@@ -70,7 +69,7 @@
#ifdef CONFIG_ISDN_DIVERSION
static isdn_divert_if *divert_if; /* = NULL */
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
static int isdn_writebuf_stub(int, int, const u_char *, int, int);
@@ -520,7 +519,7 @@
if (divert_if)
if ((retval = divert_if->stat_callback(c)))
return(retval); /* processed */
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
if ((!retval) && (dev->drv[di]->flags & DRV_FLAG_REJBUS)) {
/* No tty responding */
cmd.driver = di;
@@ -593,7 +592,7 @@
#ifdef CONFIG_ISDN_DIVERSION
if (divert_if)
divert_if->stat_callback(c);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
break;
case ISDN_STAT_DISPLAY:
#ifdef ISDN_DEBUG_STATCALLB
@@ -603,7 +602,7 @@
#ifdef CONFIG_ISDN_DIVERSION
if (divert_if)
divert_if->stat_callback(c);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
break;
case ISDN_STAT_DCONN:
if (i < 0)
@@ -645,7 +644,7 @@
#ifdef CONFIG_ISDN_DIVERSION
if (divert_if)
divert_if->stat_callback(c);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
break;
break;
case ISDN_STAT_BCONN:
@@ -774,7 +773,7 @@
case ISDN_STAT_REDIR:
if (divert_if)
return(divert_if->stat_callback(c));
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
default:
return -1;
}
@@ -2160,7 +2159,7 @@
EXPORT_SYMBOL(DIVERT_REG_NAME);
-#endif CONFIG_ISDN_DIVERSION
+#endif /* CONFIG_ISDN_DIVERSION */
EXPORT_SYMBOL(register_isdn);
@@ -2409,7 +2408,6 @@
printk(" loaded\n");
#else
printk("\n");
- isdn_cards_init();
#endif
isdn_info_update();
return 0;
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdn_tty.c linux/drivers/isdn/isdn_tty.c
--- v2.4.2/linux/drivers/isdn/isdn_tty.c Mon Nov 27 16:53:43 2000
+++ linux/drivers/isdn/isdn_tty.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_tty.c,v 1.94 2000/11/25 17:00:59 kai Exp $
+/* $Id: isdn_tty.c,v 1.94.6.1 2001/02/16 16:43:22 kai Exp $
* Linux ISDN subsystem, tty functions and AT-command emulator (linklevel).
*
@@ -66,7 +66,7 @@
static int si2bit[8] =
{4, 1, 4, 4, 4, 4, 4, 4};
-char *isdn_tty_revision = "$Revision: 1.94 $";
+char *isdn_tty_revision = "$Revision: 1.94.6.1 $";
/* isdn_tty_try_read() is called from within isdn_tty_rcv_skb()
@@ -3773,7 +3773,7 @@
sprintf(ds, "\r\n%d", info->emu.charge);
isdn_tty_at_cout(ds, info);
break;
- default:
+ default:;
}
break;
#ifdef DUMMY_HAYES_AT
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdn_v110.c linux/drivers/isdn/isdn_v110.c
--- v2.4.2/linux/drivers/isdn/isdn_v110.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/isdn_v110.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: isdn_v110.c,v 1.5.6.1 2001/01/23 17:45:02 kai Exp $
+/* $Id: isdn_v110.c,v 1.5.6.3 2001/02/16 16:43:23 kai Exp $
* Linux ISDN subsystem, V.110 related functions (linklevel).
*
@@ -30,7 +30,7 @@
#undef ISDN_V110_DEBUG
-char *isdn_v110_revision = "$Revision: 1.5.6.1 $";
+char *isdn_v110_revision = "$Revision: 1.5.6.3 $";
#define V110_38400 255
#define V110_19200 15
@@ -70,7 +70,7 @@
* FlipBits reorders sequences of keylen bits in one byte.
* E.g. source order 7654321 will be converted to 45670123 when keylen = 4,
* and to 67452301 when keylen = 2. This is necessary because ordering on
- * the isdn line is the the other way.
+ * the isdn line is the other way.
*/
static __inline unsigned char
FlipBits(unsigned char c, int keylen)
@@ -600,7 +600,7 @@
case ISDN_PROTO_L2_V11038:
dev->v110[idx] = isdn_v110_open(V110_38400, hdrlen, maxsize);
break;
- default:
+ default:;
}
if ((v = dev->v110[idx])) {
while (v->SyncInit) {
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdnloop/isdnloop.c linux/drivers/isdn/isdnloop/isdnloop.c
--- v2.4.2/linux/drivers/isdn/isdnloop/isdnloop.c Fri Nov 17 11:16:21 2000
+++ linux/drivers/isdn/isdnloop/isdnloop.c Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.c,v 1.11 2000/11/13 22:51:50 kai Exp $
+/* $Id: isdnloop.c,v 1.11.6.2 2001/02/16 16:43:32 kai Exp $
* ISDN low-level module implementing a dummy loop driver.
*
@@ -21,10 +21,12 @@
*/
#include
+#include
+#include
#include "isdnloop.h"
static char
-*revision = "$Revision: 1.11 $";
+*revision = "$Revision: 1.11.6.2 $";
static int isdnloop_addcard(char *);
@@ -975,7 +977,7 @@
* user = flag: 1 = called form userlevel, 0 called from kernel.
* card = pointer to card struct.
* Return:
- * number of bytes transfered (currently always equals len).
+ * number of bytes transferred (currently always equals len).
*/
static int
isdnloop_writecmd(const u_char * buf, int len, int user, isdnloop_card * card)
@@ -1534,22 +1536,7 @@
return 0;
}
-#ifdef MODULE
-#define isdnloop_init init_module
-#else
-void
-isdnloop_setup(char *str, int *ints)
-{
- static char sid[20];
-
- if (strlen(str)) {
- strcpy(sid, str);
- isdnloop_id = sid;
- }
-}
-#endif
-
-int
+static int __init
isdnloop_init(void)
{
char *p;
@@ -1568,9 +1555,8 @@
return (isdnloop_addcard(isdnloop_id));
}
-#ifdef MODULE
-void
-cleanup_module(void)
+static void __exit
+isdnloop_exit(void)
{
isdn_ctrl cmd;
isdnloop_card *card = cards;
@@ -1598,4 +1584,6 @@
}
printk(KERN_NOTICE "isdnloop-ISDN-driver unloaded\n");
}
-#endif
+
+module_init(isdnloop_init);
+module_exit(isdnloop_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdnloop/isdnloop.h linux/drivers/isdn/isdnloop/isdnloop.h
--- v2.4.2/linux/drivers/isdn/isdnloop/isdnloop.h Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/isdnloop/isdnloop.h Fri Mar 2 11:12:09 2001
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.h,v 1.5 2000/11/13 22:51:50 kai Exp $
+/* $Id: isdnloop.h,v 1.5.6.1 2001/02/10 14:41:23 kai Exp $
* Loopback lowlevel module for testing of linklevel.
*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/callbacks.c linux/drivers/isdn/pcbit/callbacks.c
--- v2.4.2/linux/drivers/isdn/pcbit/callbacks.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/pcbit/callbacks.c Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/callbacks.h linux/drivers/isdn/pcbit/callbacks.h
--- v2.4.2/linux/drivers/isdn/pcbit/callbacks.h Tue Apr 23 02:31:35 1996
+++ linux/drivers/isdn/pcbit/callbacks.h Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/capi.c linux/drivers/isdn/pcbit/capi.c
--- v2.4.2/linux/drivers/isdn/pcbit/capi.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/pcbit/capi.c Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/capi.h linux/drivers/isdn/pcbit/capi.h
--- v2.4.2/linux/drivers/isdn/pcbit/capi.h Sat Jun 29 10:36:22 1996
+++ linux/drivers/isdn/pcbit/capi.h Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/drv.c linux/drivers/isdn/pcbit/drv.c
--- v2.4.2/linux/drivers/isdn/pcbit/drv.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/pcbit/drv.c Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/edss1.c linux/drivers/isdn/pcbit/edss1.c
--- v2.4.2/linux/drivers/isdn/pcbit/edss1.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/pcbit/edss1.c Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/edss1.h linux/drivers/isdn/pcbit/edss1.h
--- v2.4.2/linux/drivers/isdn/pcbit/edss1.h Tue Apr 23 02:31:35 1996
+++ linux/drivers/isdn/pcbit/edss1.h Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/layer2.c linux/drivers/isdn/pcbit/layer2.c
--- v2.4.2/linux/drivers/isdn/pcbit/layer2.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/isdn/pcbit/layer2.c Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/layer2.h linux/drivers/isdn/pcbit/layer2.h
--- v2.4.2/linux/drivers/isdn/pcbit/layer2.h Mon Dec 11 13:21:16 2000
+++ linux/drivers/isdn/pcbit/layer2.h Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/module.c linux/drivers/isdn/pcbit/module.c
--- v2.4.2/linux/drivers/isdn/pcbit/module.c Mon Aug 21 07:49:03 2000
+++ linux/drivers/isdn/pcbit/module.c Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
@@ -12,7 +12,7 @@
*/
#include
-
+#include
#include
#include
#include
@@ -26,21 +26,12 @@
static int irq[MAX_PCBIT_CARDS] = {0, };
static int num_boards;
-struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS] = {0, 0, 0, 0};
-
-int init_module(void);
-void cleanup_module(void);
+struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS] = {0, };
extern void pcbit_terminate(int board);
extern int pcbit_init_dev(int board, int mem_base, int irq);
-#ifdef MODULE
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
-#define pcbit_init init_module
-#endif
-
-int pcbit_init(void)
+static int __init pcbit_init(void)
{
int board;
@@ -83,15 +74,10 @@
else
return -EIO;
}
-
- /* No symbols to export, hide all symbols */
- EXPORT_NO_SYMBOLS;
-
return 0;
}
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit pcbit_exit(void)
{
int board;
@@ -101,9 +87,8 @@
"PCBIT-D module unloaded\n");
}
-#else
+#ifndef MODULE
#define MAX_PARA (MAX_PCBIT_CARDS * 2)
-#include
static int __init pcbit_setup(char *line)
{
int i, j, argc;
@@ -134,5 +119,9 @@
__setup("pcbit=", pcbit_setup);
#endif
+MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
+MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
+module_init(pcbit_init);
+module_exit(pcbit_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/pcbit/pcbit.h linux/drivers/isdn/pcbit/pcbit.h
--- v2.4.2/linux/drivers/isdn/pcbit/pcbit.h Thu Nov 18 21:03:01 1999
+++ linux/drivers/isdn/pcbit/pcbit.h Fri Mar 2 11:12:09 2001
@@ -4,7 +4,7 @@
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
- * the GNU Public License, incorporated herein by reference.
+ * the GNU General Public License, incorporated herein by reference.
*/
/*
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/sc/init.c linux/drivers/isdn/sc/init.c
--- v2.4.2/linux/drivers/isdn/sc/init.c Thu Oct 12 14:19:32 2000
+++ linux/drivers/isdn/sc/init.c Fri Mar 2 11:12:10 2001
@@ -1,3 +1,5 @@
+#include
+#include
#include "includes.h"
#include "hardware.h"
#include "card.h"
@@ -37,23 +39,12 @@
return 0;
}
-#ifdef MODULE
MODULE_PARM(io, "1-4i");
MODULE_PARM(irq, "1-4i");
MODULE_PARM(ram, "1-4i");
MODULE_PARM(do_reset, "i");
-#define init_sc init_module
-#else
-/*
-Initialization code for non-module version to be included
-void sc_setup(char *str, int *ints)
-{
-}
-*/
-#endif
-
-int init_sc(void)
+static int __init sc_init(void)
{
int b = -1;
int i, j;
@@ -410,8 +401,7 @@
return status;
}
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit sc_exit(void)
{
int i, j;
@@ -463,7 +453,6 @@
}
pr_info("SpellCaster ISA ISDN Adapter Driver Unloaded.\n");
}
-#endif
int identify_board(unsigned long rambase, unsigned int iobase)
{
@@ -579,3 +568,6 @@
return -1;
}
+
+module_init(sc_init);
+module_exit(sc_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/sc/interrupt.c linux/drivers/isdn/sc/interrupt.c
--- v2.4.2/linux/drivers/isdn/sc/interrupt.c Wed Apr 1 16:21:04 1998
+++ linux/drivers/isdn/sc/interrupt.c Fri Mar 2 11:12:10 2001
@@ -141,7 +141,7 @@
}
else if(callid>=0x0000 && callid<=0x7FFF)
{
- pr_debug("%s: Got Incomming Call\n", adapter[card]->devicename);
+ pr_debug("%s: Got Incoming Call\n", adapter[card]->devicename);
strcpy(setup.phone,&(rcvmsg.msg_data.byte_array[4]));
strcpy(setup.eazmsn,adapter[card]->channel[rcvmsg.phy_link_no-1].dn);
setup.si1 = 7;
diff -u --recursive --new-file v2.4.2/linux/drivers/md/md.c linux/drivers/md/md.c
--- v2.4.2/linux/drivers/md/md.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/md/md.c Fri Mar 2 11:16:25 2001
@@ -682,6 +682,8 @@
rdev->bdev = NULL;
}
+void md_autodetect_dev (kdev_t dev);
+
static void export_rdev (mdk_rdev_t * rdev)
{
printk("export_rdev(%s)\n",partition_name(rdev->dev));
@@ -696,6 +698,7 @@
md_list_del(&rdev->pending);
MD_INIT_LIST_HEAD(&rdev->pending);
}
+ md_autodetect_dev(rdev->dev);
rdev->dev = 0;
rdev->faulty = 0;
kfree(rdev);
@@ -3584,7 +3587,7 @@
static int detected_devices[128] md__initdata;
static int dev_cnt;
-void md_autodetect_dev(kdev_t dev)
+void md_autodetect_dev (kdev_t dev)
{
if (dev_cnt >= 0 && dev_cnt < 127)
detected_devices[dev_cnt++] = dev;
@@ -3598,7 +3601,7 @@
printk(KERN_INFO "autodetecting RAID arrays\n");
- for (i=0; ipending, &pending_raid_disks);
}
+ dev_cnt = 0;
autorun_devices(-1);
}
@@ -3656,7 +3660,7 @@
kdev_t device;
char *devnames, *pername = "";
- if(get_option(&str, &minor) != 2) { /* MD Number */
+ if (get_option(&str, &minor) != 2) { /* MD Number */
printk("md: Too few arguments supplied to md=.\n");
return 0;
}
@@ -3667,7 +3671,7 @@
printk ("md: Warning - md=%d,... has been specified twice;\n"
" will discard the first definition.\n", minor);
}
- switch(get_option(&str, &level)) { /* RAID Personality */
+ switch (get_option(&str, &level)) { /* RAID Personality */
case 2: /* could be 0 or -1.. */
if (level == 0 || level == -1) {
if (get_option(&str, &factor) != 2 || /* Chunk Size */
@@ -3820,7 +3824,6 @@
printk(KERN_INFO "skipping autodetection of RAID arrays\n");
else
autostart_arrays();
- dev_cnt = -1; /* make sure further calls to md_autodetect_dev are ignored */
md_setup_drive();
return 0;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/Config.in linux/drivers/media/radio/Config.in
--- v2.4.2/linux/drivers/media/radio/Config.in Tue Sep 19 08:01:34 2000
+++ linux/drivers/media/radio/Config.in Fri Mar 2 11:12:10 2001
@@ -21,6 +21,7 @@
if [ "$CONFIG_RADIO_GEMTEK" = "y" ]; then
hex ' GemTek i/o port (0x20c, 0x30c, 0x24c or 0x34c)' CONFIG_RADIO_GEMTEK_PORT 34c
fi
+dep_tristate ' Guillemot MAXI Radio FM 2000 radio' CONFIG_RADIO_MAXIRADIO $CONFIG_VIDEO_DEV
dep_tristate ' Maestro on board radio' CONFIG_RADIO_MAESTRO $CONFIG_VIDEO_DEV
dep_tristate ' Miro PCM20 Radio' CONFIG_RADIO_MIROPCM20 $CONFIG_VIDEO_DEV
dep_tristate ' SF16FMI Radio' CONFIG_RADIO_SF16FMI $CONFIG_VIDEO_DEV
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/Makefile linux/drivers/media/radio/Makefile
--- v2.4.2/linux/drivers/media/radio/Makefile Fri Dec 29 14:07:22 2000
+++ linux/drivers/media/radio/Makefile Fri Mar 2 11:12:10 2001
@@ -31,6 +31,7 @@
obj-$(CONFIG_RADIO_CADET) += radio-cadet.o
obj-$(CONFIG_RADIO_TYPHOON) += radio-typhoon.o
obj-$(CONFIG_RADIO_TERRATEC) += radio-terratec.o
+obj-$(CONFIG_RADIO_MAXIRADIO) += radio-maxiradio.o
obj-$(CONFIG_RADIO_RTRACK) += radio-aimslab.o
obj-$(CONFIG_RADIO_ZOLTRIX) += radio-zoltrix.o
obj-$(CONFIG_RADIO_MIROPCM20) += radio-miropcm20.o
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-aimslab.c linux/drivers/media/radio/radio-aimslab.c
--- v2.4.2/linux/drivers/media/radio/radio-aimslab.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-aimslab.c Fri Mar 2 11:12:10 2001
@@ -308,20 +308,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void rt_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct rt_device rtrack_unit;
static struct video_device rtrack_radio=
{
+ owner: THIS_MODULE,
name: "RadioTrack radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_RTRACK,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-aztech.c linux/drivers/media/radio/radio-aztech.c
--- v2.4.2/linux/drivers/media/radio/radio-aztech.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-aztech.c Fri Mar 2 11:12:10 2001
@@ -259,20 +259,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void az_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct az_device aztech_unit;
static struct video_device aztech_radio=
{
+ owner: THIS_MODULE,
name: "Aztech radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_AZTECH,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-cadet.c linux/drivers/media/radio/radio-cadet.c
--- v2.4.2/linux/drivers/media/radio/radio-cadet.c Mon Nov 27 17:47:38 2000
+++ linux/drivers/media/radio/radio-cadet.c Fri Mar 2 11:12:10 2001
@@ -16,6 +16,10 @@
* 2000-04-29 Russell Kroll
* Added ISAPnP detection for Linux 2.3/2.4
*
+ * 2001-01-10 Russell Kroll
+ * Removed dead CONFIG_RADIO_CADET_PORT code
+ * PnP detection on load is now default (no args necessary)
+ *
*/
#include /* Modules */
@@ -25,16 +29,12 @@
#include /* outb, outb_p */
#include /* copy to/from user */
#include /* kernel radio structs */
-#include /* CONFIG_RADIO_CADET_PORT */
#include
#include
-#ifndef CONFIG_RADIO_CADET_PORT
-#define CONFIG_RADIO_CADET_PORT 0x330
-#endif
#define RDS_BUFFER 256
-static int io=CONFIG_RADIO_CADET_PORT;
+static int io=-1; /* default to isapnp activation */
static int users=0;
static int curtuner=0;
static int tunestat=0;
@@ -518,7 +518,6 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
init_waitqueue_head(&readq);
return 0;
}
@@ -530,12 +529,12 @@
rdsstat=0;
}
users--;
- MOD_DEC_USE_COUNT;
}
static struct video_device cadet_radio=
{
+ owner: THIS_MODULE,
name: "Cadet radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_CADET,
@@ -587,6 +586,11 @@
return -1;
}
+ /*
+ * io should only be set if the user has used something like
+ * isapnp (the userspace program) to initialize this card for us
+ */
+
static int __init cadet_init(void)
{
/*
@@ -626,6 +630,14 @@
MODULE_DESCRIPTION("A driver for the ADS Cadet AM/FM/RDS radio card.");
MODULE_PARM(io, "i");
MODULE_PARM_DESC(io, "I/O address of Cadet card (0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e)");
+
+static struct isapnp_device_id id_table[] __devinitdata = {
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID,
+ ISAPNP_VENDOR('M','S','M'), ISAPNP_FUNCTION(0x0c24), 0 },
+ {0}
+};
+
+MODULE_DEVICE_TABLE(isapnp, id_table);
EXPORT_NO_SYMBOLS;
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-gemtek.c linux/drivers/media/radio/radio-gemtek.c
--- v2.4.2/linux/drivers/media/radio/radio-gemtek.c Sat Dec 30 11:19:13 2000
+++ linux/drivers/media/radio/radio-gemtek.c Fri Mar 2 11:12:10 2001
@@ -235,20 +235,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void gemtek_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct gemtek_device gemtek_unit;
static struct video_device gemtek_radio=
{
+ owner: THIS_MODULE,
name: "GemTek radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_GEMTEK,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-maestro.c linux/drivers/media/radio/radio-maestro.c
--- v2.4.2/linux/drivers/media/radio/radio-maestro.c Fri Nov 17 17:56:51 2000
+++ linux/drivers/media/radio/radio-maestro.c Fri Mar 2 11:12:10 2001
@@ -69,6 +69,7 @@
static struct video_device maestro_radio=
{
+ owner: THIS_MODULE,
name: "Maestro radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_SF16MI,
@@ -282,14 +283,12 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void radio_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-maxiradio.c linux/drivers/media/radio/radio-maxiradio.c
--- v2.4.2/linux/drivers/media/radio/radio-maxiradio.c Wed Dec 31 16:00:00 1969
+++ linux/drivers/media/radio/radio-maxiradio.c Fri Mar 2 11:12:10 2001
@@ -0,0 +1,388 @@
+/*
+ * Guillemot Maxi Radio FM 2000 PCI radio card driver for Linux
+ * (C) 2001 Dimitromanolakis Apostolos
+ *
+ * Based in the radio Maestro PCI driver. Actually it uses the same chip
+ * for radio but different pci controller.
+ *
+ * I didn't have any specs I reversed engineered the protocol from
+ * the windows driver (radio.dll).
+ *
+ * The card uses the TEA5757 chip that includes a search function but it
+ * is useless as I haven't found any way to read back the frequency. If
+ * anybody does please mail me.
+ *
+ * For the pdf file see:
+ * http://www.semiconductors.philips.com/pip/TEA5757H/V1
+ *
+ *
+ * CHANGES:
+ * 0.75b
+ * - better pci interface thanks to Francois Romieu
+ *
+ * 0.75
+ * - tiding up
+ * - removed support for multiple devices as it didn't work anyway
+ *
+ * BUGS:
+ * - card unmutes if you change frequency
+ *
+ */
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/* version 0.75 Sun Feb 4 22:51:27 EET 2001 */
+#define DRIVER_VERSION "0.75"
+
+#ifndef PCI_VENDOR_ID_GUILLEMOT
+#define PCI_VENDOR_ID_GUILLEMOT 0x5046
+#endif
+
+#ifndef PCI_DEVICE_ID_GUILLEMOT
+#define PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO 0x1001
+#endif
+
+
+/* TEA5757 pin mappings */
+const int clk = 1, data = 2, wren = 4, mo_st = 8, power = 16 ;
+
+
+#define FREQ_LO 50*16000
+#define FREQ_HI 150*16000
+
+#define FREQ_IF 171200 /* 10.7*16000 */
+#define FREQ_STEP 200 /* 12.5*16 */
+
+#define FREQ2BITS(x) ((( (unsigned int)(x)+FREQ_IF+(FREQ_STEP<<1))\
+ /(FREQ_STEP<<2))<<2) /* (x==fmhz*16*1000) -> bits */
+
+#define BITS2FREQ(x) ((x) * FREQ_STEP - FREQ_IF)
+
+
+static int radio_open(struct video_device *, int);
+static int radio_ioctl(struct video_device *, unsigned int, void *);
+static void radio_close(struct video_device *);
+
+static struct video_device maxiradio_radio=
+{
+ owner: THIS_MODULE,
+ name: "Maxi Radio FM2000 radio",
+ type: VID_TYPE_TUNER,
+ hardware: VID_HARDWARE_SF16MI,
+ open: radio_open,
+ close: radio_close,
+ ioctl: radio_ioctl,
+};
+
+static struct radio_device
+{
+ __u16 io, /* base of radio io */
+ muted, /* VIDEO_AUDIO_MUTE */
+ stereo, /* VIDEO_TUNER_STEREO_ON */
+ tuned; /* signal strength (0 or 0xffff) */
+
+ unsigned long freq;
+
+ struct semaphore lock;
+} radio_unit = {0, 0, 0, 0, };
+
+
+static void sleep_125ms(void)
+{
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(HZ >> 3);
+}
+
+
+static void outbit(unsigned long bit, __u16 io)
+{
+ if(bit != 0)
+ {
+ outb( power|wren|data ,io); udelay(4);
+ outb( power|wren|data|clk ,io); udelay(4);
+ outb( power|wren|data ,io); udelay(4);
+ }
+ else
+ {
+ outb( power|wren ,io); udelay(4);
+ outb( power|wren|clk ,io); udelay(4);
+ outb( power|wren ,io); udelay(4);
+ }
+}
+
+static void turn_power(__u16 io, int p)
+{
+ if(p != 0) outb(power, io); else outb(0,io);
+}
+
+
+static void set_freq(__u16 io, __u32 data)
+{
+ unsigned long int si;
+ int bl;
+
+ /* TEA5757 shift register bits (see pdf) */
+
+ outbit(0,io); // 24 search
+ outbit(1,io); // 23 search up/down
+
+ outbit(0,io); // 22 stereo/mono
+
+ outbit(0,io); // 21 band
+ outbit(0,io); // 20 band (only 00=FM works I think)
+
+ outbit(0,io); // 19 port ?
+ outbit(0,io); // 18 port ?
+
+ outbit(0,io); // 17 search level
+ outbit(0,io); // 16 search level
+
+ si = 0x8000;
+ for(bl = 1; bl <= 16 ; bl++) { outbit(data & si,io); si >>=1; }
+
+ outb(power,io);
+}
+
+static int get_stereo(__u16 io)
+{
+ outb(power,io); udelay(4);
+ return !(inb(io) & mo_st);
+}
+
+static int get_tune(__u16 io)
+{
+ outb(power+clk,io); udelay(4);
+ return !(inb(io) & mo_st);
+}
+
+
+inline static int radio_function(struct video_device *dev,
+ unsigned int cmd, void *arg)
+{
+ struct radio_device *card=dev->priv;
+ switch(cmd) {
+ case VIDIOCGCAP: {
+ struct video_capability v;
+
+ strcpy(v.name, "Maxi Radio FM2000 radio");
+ v.type=VID_TYPE_TUNER;
+ v.channels=v.audios=1;
+ v.maxwidth=v.maxheight=v.minwidth=v.minheight=0;
+
+ if(copy_to_user(arg,&v,sizeof(v)))
+ return -EFAULT;
+
+ return 0;
+ }
+ case VIDIOCGTUNER: {
+ struct video_tuner v;
+
+ if(copy_from_user(&v, arg,sizeof(v))!=0)
+ return -EFAULT;
+
+ if(v.tuner)
+ return -EINVAL;
+
+ card->stereo = 0xffff * get_stereo(card->io);
+ card->tuned = 0xffff * get_tune(card->io);
+
+ v.flags = VIDEO_TUNER_LOW | card->stereo;
+ v.signal = card->tuned;
+
+ strcpy(v.name, "FM");
+
+ v.rangelow = FREQ_LO;
+ v.rangehigh = FREQ_HI;
+ v.mode = VIDEO_MODE_AUTO;
+
+ if(copy_to_user(arg,&v, sizeof(v)))
+ return -EFAULT;
+
+ return 0;
+ }
+ case VIDIOCSTUNER: {
+ struct video_tuner v;
+
+ if(copy_from_user(&v, arg, sizeof(v)))
+ return -EFAULT;
+
+ if(v.tuner!=0)
+ return -EINVAL;
+
+ return 0;
+ }
+ case VIDIOCGFREQ: {
+ unsigned long tmp=card->freq;
+
+ if(copy_to_user(arg, &tmp, sizeof(tmp)))
+ return -EFAULT;
+
+ return 0;
+ }
+
+ case VIDIOCSFREQ: {
+ unsigned long tmp;
+
+ if(copy_from_user(&tmp, arg, sizeof(tmp)))
+ return -EFAULT;
+
+ if ( tmpFREQ_HI )
+ return -EINVAL;
+
+ card->freq = tmp;
+
+ set_freq(card->io, FREQ2BITS(card->freq));
+ sleep_125ms();
+
+ return 0;
+ }
+ case VIDIOCGAUDIO: {
+ struct video_audio v;
+ strcpy(v.name, "Radio");
+ v.audio=v.volume=v.bass=v.treble=v.balance=v.step=0;
+ v.flags=VIDEO_AUDIO_MUTABLE | card->muted;
+ v.mode=VIDEO_SOUND_STEREO;
+ if(copy_to_user(arg,&v, sizeof(v)))
+ return -EFAULT;
+ return 0;
+ }
+
+ case VIDIOCSAUDIO: {
+ struct video_audio v;
+
+ if(copy_from_user(&v, arg, sizeof(v)))
+ return -EFAULT;
+
+ if(v.audio)
+ return -EINVAL;
+
+
+ card->muted = v.flags & VIDEO_AUDIO_MUTE;
+
+ if(card->muted)
+ turn_power(card->io, 0);
+ else
+ set_freq(card->io, FREQ2BITS(card->freq));
+
+ return 0;
+ }
+
+ case VIDIOCGUNIT: {
+ struct video_unit v;
+ v.video=VIDEO_NO_UNIT;
+ v.vbi=VIDEO_NO_UNIT;
+ v.radio=dev->minor;
+ v.audio=0;
+ v.teletext=VIDEO_NO_UNIT;
+ if(copy_to_user(arg, &v, sizeof(v)))
+ return -EFAULT;
+ return 0;
+ }
+ default: return -ENOIOCTLCMD;
+ }
+}
+
+static int radio_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
+{
+ struct radio_device *card=dev->priv;
+ int ret;
+ down(&card->lock);
+ ret = radio_function(dev, cmd, arg);
+ up(&card->lock);
+ return ret;
+}
+
+static int radio_open(struct video_device *dev, int flags)
+{
+ return 0;
+}
+
+static void radio_close(struct video_device *dev)
+{
+}
+
+MODULE_AUTHOR("Dimitromanolakis Apostolos, apdim@grecian.net");
+MODULE_DESCRIPTION("Radio driver for the Guillemot Maxi Radio FM2000 radio.");
+
+EXPORT_NO_SYMBOLS;
+
+static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+ if(!request_region(pci_resource_start(pdev, 0),
+ pci_resource_len(pdev, 0), "Maxi Radio FM 2000")) {
+ printk(KERN_ERR "radio-maxiradio: can't reserve I/O ports\n");
+ goto err_out;
+ }
+
+ if (pci_enable_device(pdev))
+ goto err_out_free_region;
+
+ radio_unit.io = pci_resource_start(pdev, 0);
+ init_MUTEX(&radio_unit.lock);
+ maxiradio_radio.priv = &radio_unit;
+
+ if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO)==-1) {
+ printk("radio-maxiradio: can't register device!");
+ goto err_out_free_region;
+ }
+
+ printk(KERN_INFO "radio-maxiradio: version "
+ DRIVER_VERSION
+ " time "
+ __TIME__ " "
+ __DATE__
+ "\n");
+
+ printk(KERN_INFO "radio-maxiradio: found Guillemot MAXI Radio device (io = 0x%x)\n",
+ radio_unit.io);
+ return 0;
+
+err_out_free_region:
+ release_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
+err_out:
+ return -ENODEV;
+}
+
+static void __devexit maxiradio_remove_one(struct pci_dev *pdev)
+{
+ video_unregister_device(&maxiradio_radio);
+ release_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
+}
+
+static struct pci_device_id maxiradio_pci_tbl[] __devinitdata = {
+ { PCI_VENDOR_ID_GUILLEMOT, PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO,
+ PCI_ANY_ID, PCI_ANY_ID, },
+ { 0,}
+};
+
+MODULE_DEVICE_TABLE(pci, maxiradio_pci_tbl);
+
+static struct pci_driver maxiradio_driver = {
+ name: "radio-maxiradio",
+ id_table: maxiradio_pci_tbl,
+ probe: maxiradio_init_one,
+ remove: maxiradio_remove_one,
+};
+
+int __init maxiradio_radio_init(void)
+{
+ return pci_module_init(&maxiradio_driver);
+}
+
+void __exit maxiradio_radio_exit(void)
+{
+ pci_unregister_driver(&maxiradio_driver);
+}
+
+module_init(maxiradio_radio_init);
+module_exit(maxiradio_radio_exit);
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-miropcm20.c linux/drivers/media/radio/radio-miropcm20.c
--- v2.4.2/linux/drivers/media/radio/radio-miropcm20.c Fri Nov 17 17:56:51 2000
+++ linux/drivers/media/radio/radio-miropcm20.c Fri Mar 2 11:12:10 2001
@@ -178,20 +178,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void pcm20_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct pcm20_device pcm20_unit;
static struct video_device pcm20_radio=
{
+ owner: THIS_MODULE,
name: "Miro PCM 20 radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_RTRACK,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-rtrack2.c linux/drivers/media/radio/radio-rtrack2.c
--- v2.4.2/linux/drivers/media/radio/radio-rtrack2.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-rtrack2.c Fri Mar 2 11:12:10 2001
@@ -201,20 +201,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void rt_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct rt_device rtrack2_unit;
static struct video_device rtrack2_radio=
{
+ owner: THIS_MODULE,
name: "RadioTrack II radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_RTRACK2,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-sf16fmi.c linux/drivers/media/radio/radio-sf16fmi.c
--- v2.4.2/linux/drivers/media/radio/radio-sf16fmi.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-sf16fmi.c Fri Mar 2 11:12:10 2001
@@ -41,7 +41,7 @@
static struct semaphore lock;
/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */
-/* It is only usefull to give freq in intervall of 800 (=0.05Mhz),
+/* It is only useful to give freq in intervall of 800 (=0.05Mhz),
* other bits will be truncated, e.g 92.7400016 -> 92.7, but
* 92.7400017 -> 92.75
*/
@@ -262,20 +262,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void fmi_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct fmi_device fmi_unit;
static struct video_device fmi_radio=
{
+ owner: THIS_MODULE,
name: "SF16FMx radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_SF16MI,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-terratec.c linux/drivers/media/radio/radio-terratec.c
--- v2.4.2/linux/drivers/media/radio/radio-terratec.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-terratec.c Fri Mar 2 11:12:10 2001
@@ -280,20 +280,19 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void tt_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct tt_device terratec_unit;
static struct video_device terratec_radio=
{
+ owner: THIS_MODULE,
name: "TerraTec ActiveRadio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_TERRATEC,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-trust.c linux/drivers/media/radio/radio-trust.c
--- v2.4.2/linux/drivers/media/radio/radio-trust.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-trust.c Fri Mar 2 11:12:10 2001
@@ -274,18 +274,17 @@
if(users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void tr_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct video_device trust_radio=
{
+ owner: THIS_MODULE,
name: "Trust FM Radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_TRUST,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-typhoon.c linux/drivers/media/radio/radio-typhoon.c
--- v2.4.2/linux/drivers/media/radio/radio-typhoon.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-typhoon.c Fri Mar 2 11:12:10 2001
@@ -260,7 +260,6 @@
if (typhoon->users)
return -EBUSY;
typhoon->users++;
- MOD_INC_USE_COUNT;
return 0;
}
@@ -268,7 +267,6 @@
{
struct typhoon_device *typhoon = dev->priv;
typhoon->users--;
- MOD_DEC_USE_COUNT;
}
static struct typhoon_device typhoon_unit =
@@ -280,6 +278,7 @@
static struct video_device typhoon_radio =
{
+ owner: THIS_MODULE,
name: "Typhoon Radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_TYPHOON,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/radio/radio-zoltrix.c linux/drivers/media/radio/radio-zoltrix.c
--- v2.4.2/linux/drivers/media/radio/radio-zoltrix.c Mon Jan 1 10:14:31 2001
+++ linux/drivers/media/radio/radio-zoltrix.c Fri Mar 2 11:12:10 2001
@@ -327,20 +327,19 @@
if (users)
return -EBUSY;
users++;
- MOD_INC_USE_COUNT;
return 0;
}
static void zol_close(struct video_device *dev)
{
users--;
- MOD_DEC_USE_COUNT;
}
static struct zol_device zoltrix_unit;
static struct video_device zoltrix_radio =
{
+ owner: THIS_MODULE,
name: "Zoltrix Radio Plus",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_ZOLTRIX,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/bttv-driver.c linux/drivers/media/video/bttv-driver.c
--- v2.4.2/linux/drivers/media/video/bttv-driver.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/bttv-driver.c Fri Mar 2 11:12:10 2001
@@ -1352,7 +1352,6 @@
if (bttv_debug)
printk("bttv%d: open called\n",btv->nr);
- MOD_INC_USE_COUNT;
down(&btv->lock);
if (btv->user)
goto out_unlock;
@@ -1378,7 +1377,6 @@
out_unlock:
up(&btv->lock);
- MOD_DEC_USE_COUNT;
return ret;
}
@@ -1423,7 +1421,6 @@
rvfree((void *) btv->fbuffer, gbuffers*gbufsize);
btv->fbuffer=0;
up(&btv->lock);
- MOD_DEC_USE_COUNT;
}
@@ -2053,6 +2050,7 @@
static struct video_device bttv_template=
{
+ owner: THIS_MODULE,
name: "UNSET",
type: VID_TYPE_TUNER|VID_TYPE_CAPTURE|VID_TYPE_OVERLAY|VID_TYPE_TELETEXT,
hardware: VID_HARDWARE_BT848,
@@ -2140,7 +2138,6 @@
struct bttv *btv=(struct bttv *)(dev-2);
unsigned long irq_flags;
- MOD_INC_USE_COUNT;
down(&btv->lock);
if (btv->needs_restart)
bt848_restart(btv);
@@ -2164,7 +2161,6 @@
btv->vbi_on = 0;
bt848_set_risc_jmps(btv,-1);
spin_unlock_irqrestore(&btv->s_lock, irq_flags);
- MOD_DEC_USE_COUNT;
}
static int vbi_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
@@ -2202,6 +2198,7 @@
static struct video_device vbi_template=
{
+ owner: THIS_MODULE,
name: "bttv vbi",
type: VID_TYPE_CAPTURE|VID_TYPE_TELETEXT,
hardware: VID_HARDWARE_BT848,
@@ -2220,7 +2217,6 @@
struct bttv *btv = (struct bttv *)(dev-1);
unsigned long v;
- MOD_INC_USE_COUNT;
down(&btv->lock);
if (btv->user)
goto busy_unlock;
@@ -2237,7 +2233,6 @@
busy_unlock:
up(&btv->lock);
- MOD_DEC_USE_COUNT;
return -EBUSY;
}
@@ -2249,7 +2244,6 @@
btv->user--;
btv->radio = 0;
up(&btv->lock);
- MOD_DEC_USE_COUNT;
}
static long radio_read(struct video_device *v, char *buf, unsigned long count, int nonblock)
@@ -2320,6 +2314,7 @@
static struct video_device radio_template=
{
+ owner: THIS_MODULE,
name: "bttv radio",
type: VID_TYPE_TUNER,
hardware: VID_HARDWARE_BT848,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/bw-qcam.c linux/drivers/media/video/bw-qcam.c
--- v2.4.2/linux/drivers/media/video/bw-qcam.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/bw-qcam.c Fri Mar 2 11:12:10 2001
@@ -696,13 +696,11 @@
static int qcam_open(struct video_device *dev, int flags)
{
- MOD_INC_USE_COUNT;
return 0;
}
static void qcam_close(struct video_device *dev)
{
- MOD_DEC_USE_COUNT;
}
static long qcam_write(struct video_device *v, const char *buf, unsigned long count, int noblock)
@@ -918,6 +916,7 @@
static struct video_device qcam_template=
{
+ owner: THIS_MODULE,
name: "Connectix Quickcam",
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_QCAM_BW,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/c-qcam.c linux/drivers/media/video/c-qcam.c
--- v2.4.2/linux/drivers/media/video/c-qcam.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/c-qcam.c Fri Mar 2 11:12:10 2001
@@ -500,13 +500,11 @@
static int qcam_open(struct video_device *dev, int flags)
{
- MOD_INC_USE_COUNT;
return 0;
}
static void qcam_close(struct video_device *dev)
{
- MOD_DEC_USE_COUNT;
}
static long qcam_write(struct video_device *v, const char *buf, unsigned long count, int noblock)
@@ -725,6 +723,7 @@
/* video device template */
static struct video_device qcam_template=
{
+ owner: THIS_MODULE,
name: "Colour QuickCam",
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_QCAM_C,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/cpia.c linux/drivers/media/video/cpia.c
--- v2.4.2/linux/drivers/media/video/cpia.c Fri Nov 17 17:56:51 2000
+++ linux/drivers/media/video/cpia.c Fri Mar 2 11:12:10 2001
@@ -2499,9 +2499,6 @@
cam->mmap_kludge = 0;
++cam->open_count;
-#ifdef MODULE
- MOD_INC_USE_COUNT;
-#endif
return 0;
}
@@ -2554,9 +2551,6 @@
}
-#ifdef MODULE
- MOD_DEC_USE_COUNT;
-#endif
return;
}
@@ -3031,6 +3025,7 @@
}
static struct video_device cpia_template = {
+ owner: THIS_MODULE,
name: "CPiA Camera",
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_CPIA, /* FIXME */
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/cpia.h linux/drivers/media/video/cpia.h
--- v2.4.2/linux/drivers/media/video/cpia.h Mon Dec 11 13:15:37 2000
+++ linux/drivers/media/video/cpia.h Fri Mar 2 11:12:10 2001
@@ -62,7 +62,7 @@
/* transferCmd sends commands to the camera. command MUST point to
* an 8 byte buffer in kernel space. data can be NULL if no extra
* data is needed. The size of the data is given by the last 2
- * bytes of comand. data must also point to memory in kernel space.
+ * bytes of command. data must also point to memory in kernel space.
* Returns negative value on error, otherwise 0.
*/
int (*transferCmd)(void *privdata, u8 *command, u8 *data);
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/cpia_pp.c linux/drivers/media/video/cpia_pp.c
--- v2.4.2/linux/drivers/media/video/cpia_pp.c Mon Mar 27 10:22:31 2000
+++ linux/drivers/media/video/cpia_pp.c Fri Mar 2 11:12:10 2001
@@ -34,9 +34,7 @@
#include
#include
-#ifdef CONFIG_KMOD
#include
-#endif
/* #define _CPIA_DEBUG_ define for verbose debug output */
#include "cpia.h"
@@ -502,9 +500,6 @@
++cam->open_count;
-#ifdef MODULE
- MOD_INC_USE_COUNT;
-#endif
return 0;
}
@@ -535,9 +530,6 @@
static int cpia_pp_close(void *privdata)
{
struct pp_cam_entry *cam = privdata;
-#ifdef MODULE
- MOD_DEC_USE_COUNT;
-#endif
if (--cam->open_count == 0) {
parport_release(cam->pdev);
}
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/planb.c linux/drivers/media/video/planb.c
--- v2.4.2/linux/drivers/media/video/planb.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/planb.c Fri Mar 2 11:12:10 2001
@@ -2037,6 +2037,7 @@
static struct video_device planb_template=
{
+ owner: THIS_MODULE,
name: PLANB_DEVICE_NAME,
type: VID_TYPE_OVERLAY,
hardware: VID_HARDWARE_PLANB,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/pms.c linux/drivers/media/video/pms.c
--- v2.4.2/linux/drivers/media/video/pms.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/pms.c Fri Mar 2 11:12:10 2001
@@ -672,13 +672,11 @@
static int pms_open(struct video_device *dev, int flags)
{
- MOD_INC_USE_COUNT;
return 0;
}
static void pms_close(struct video_device *dev)
{
- MOD_DEC_USE_COUNT;
}
static long pms_write(struct video_device *v, const char *buf, unsigned long count, int noblock)
@@ -902,6 +900,7 @@
struct video_device pms_template=
{
+ owner: THIS_MODULE,
name: "Mediavision PMS",
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_PMS,
@@ -935,14 +934,15 @@
0xE4
};
- if(check_region(0x9A01,1))
+ if (!request_region(0x9A01, 1, "Mediavision PMS config"))
{
printk(KERN_WARNING "mediavision: unable to detect: 0x9A01 in use.\n");
return -EBUSY;
}
- if(check_region(io_port,3))
+ if (!request_region(io_port, 3, "Mediavision PMS"))
{
printk(KERN_WARNING "mediavision: I/O port %d in use.\n", io_port);
+ release_region(0x9A01, 1);
return -EBUSY;
}
outb(0xB8, 0x9A01); /* Unlock */
@@ -961,16 +961,16 @@
else
idec=0;
- printk(KERN_INFO "PMS type is %d\n", idec);
- if(idec==0)
- return -ENODEV;
+ printk(KERN_INFO "PMS type is %d\n", idec);
+ if(idec == 0) {
+ release_region(io_port, 3);
+ release_region(0x9A01, 1);
+ return -ENODEV;
+ }
/*
* Ok we have a PMS of some sort
*/
-
- request_region(io_port,3, "Mediavision PMS");
- request_region(0x9A01, 1, "Mediavision PMS config");
mvv_write(0x04, mem_base>>12); /* Set the memory area */
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/stradis.c linux/drivers/media/video/stradis.c
--- v2.4.2/linux/drivers/media/video/stradis.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/stradis.c Fri Mar 2 11:12:10 2001
@@ -672,7 +672,7 @@
/* auto mute off, power on, no de-emphasis */
/* I2S data up to 24-bit 64xFs internal SCLK */
I2CWrite(&(saa->i2c), 0x22, 0x01, 0x11, 2);
- /* ATAPI mixer setings */
+ /* ATAPI mixer settings */
I2CWrite(&(saa->i2c), 0x22, 0x02, 0x49, 2);
/* attenuation left 3db */
I2CWrite(&(saa->i2c), 0x22, 0x03, 0x00, 2);
@@ -1988,6 +1988,7 @@
/* template for video_device-structure */
static struct video_device saa_template =
{
+ owner: THIS_MODULE,
name: "SAA7146A",
type: VID_TYPE_CAPTURE | VID_TYPE_OVERLAY,
hardware: VID_HARDWARE_SAA7146,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/videodev.c linux/drivers/media/video/videodev.c
--- v2.4.2/linux/drivers/media/video/videodev.c Tue Jan 2 16:45:37 2001
+++ linux/drivers/media/video/videodev.c Fri Mar 2 11:12:10 2001
@@ -166,6 +166,9 @@
goto error_out;
}
vfl->busy=1; /* In case vfl->open sleeps */
+
+ if(vfl->owner)
+ __MOD_INC_USE_COUNT(vfl->owner);
unlock_kernel();
if(vfl->open)
@@ -174,6 +177,9 @@
if(err)
{
vfl->busy=0;
+ if(vfl->owner)
+ __MOD_DEC_USE_COUNT(vfl->owner);
+
return err;
}
}
@@ -195,6 +201,8 @@
if(vfl->close)
vfl->close(vfl);
vfl->busy=0;
+ if(vfl->owner)
+ __MOD_DEC_USE_COUNT(vfl->owner);
unlock_kernel();
return 0;
}
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/vino.c linux/drivers/media/video/vino.c
--- v2.4.2/linux/drivers/media/video/vino.c Fri Nov 17 17:56:51 2000
+++ linux/drivers/media/video/vino.c Fri Mar 2 11:12:10 2001
@@ -203,13 +203,11 @@
static int vino_open(struct video_device *dev, int flags)
{
- MOD_INC_USE_COUNT;
return 0;
}
static void vino_close(struct video_device *dev)
{
- MOD_DEC_USE_COUNT;
}
static int vino_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
@@ -224,6 +222,7 @@
}
static struct video_device vino_dev = {
+ owner: THIS_MODULE,
name: "Vino IndyCam/TV",
type: VID_TYPE_CAPTURE,
hardware: VID_HARDWARE_VINO,
diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/zr36120.c linux/drivers/media/video/zr36120.c
--- v2.4.2/linux/drivers/media/video/zr36120.c Wed Feb 21 18:20:24 2001
+++ linux/drivers/media/video/zr36120.c Fri Mar 2 11:12:10 2001
@@ -788,7 +788,6 @@
/* do the common part of all open's */
zoran_common_open(ztv, flags);
- MOD_INC_USE_COUNT;
return 0;
}
@@ -820,7 +819,6 @@
kfree( ztv->overinfo.overlay );
ztv->overinfo.overlay = 0;
- MOD_DEC_USE_COUNT;
}
/*
@@ -1482,6 +1480,7 @@
static struct video_device zr36120_template=
{
+ owner: THIS_MODULE,
name: "UNSET",
type: VID_TYPE_TUNER|VID_TYPE_CAPTURE|VID_TYPE_OVERLAY,
hardware: VID_HARDWARE_ZR36120,
@@ -1541,7 +1540,6 @@
/* start read-ahead */
zoran_cap(ztv, 1);
- MOD_INC_USE_COUNT;
return 0;
}
@@ -1573,7 +1571,6 @@
item->memadr = 0;
}
- MOD_DEC_USE_COUNT;
}
/*
@@ -1819,6 +1816,7 @@
static struct video_device vbi_template=
{
+ owner: THIS_MODULE,
name: "UNSET",
type: VID_TYPE_CAPTURE|VID_TYPE_TELETEXT,
hardware: VID_HARDWARE_ZR36120,
diff -u --recursive --new-file v2.4.2/linux/drivers/net/3c523.h linux/drivers/net/3c523.h
--- v2.4.2/linux/drivers/net/3c523.h Wed Feb 21 18:20:25 2001
+++ linux/drivers/net/3c523.h Sun Mar 4 14:05:04 2001
@@ -60,7 +60,7 @@
unsigned short cbl_offset; /* pointeroffset, command block list */
unsigned short rfa_offset; /* pointeroffset, receive frame area */
unsigned short crc_errs; /* CRC-Error counter */
- unsigned short aln_errs; /* allignmenterror counter */
+ unsigned short aln_errs; /* alignmenterror counter */
unsigned short rsc_errs; /* Resourceerror counter */
unsigned short ovrn_errs; /* OVerrunerror counter */
};
diff -u --recursive --new-file v2.4.2/linux/drivers/net/3c527.c linux/drivers/net/3c527.c
--- v2.4.2/linux/drivers/net/3c527.c Wed Feb 21 18:20:25 2001
+++ linux/drivers/net/3c527.c Sun Mar 4 14:05:04 2001
@@ -1,8 +1,9 @@
-/* 3c527.c: 3Com Etherlink/MC32 driver for Linux
+/* 3c527.c: 3Com Etherlink/MC32 driver for Linux 2.4
*
* (c) Copyright 1998 Red Hat Software Inc
- * Written by Alan Cox.
+ * Written by Alan Cox.
* Further debugging by Carl Drougge.
+ * Modified by Richard Procter (rnp@netlink.co.nz)
*
* Based on skeleton.c written 1993-94 by Donald Becker and ne2.c
* (for the MCA stuff) written by Wim Dumon.
@@ -16,7 +17,7 @@
*/
static const char *version =
- "3c527.c:v0.08 2000/02/22 Alan Cox (alan@redhat.com)\n";
+ "3c527.c:v0.6 2001/03/03 Richard Proctor (rnp@netlink.co.nz)\n";
/**
* DOC: Traps for the unwary
@@ -24,6 +25,13 @@
* The diagram (Figure 1-1) and the POS summary disagree with the
* "Interrupt Level" section in the manual.
*
+ * The manual contradicts itself when describing the minimum number
+ * buffers in the 'configure lists' command.
+ * My card accepts a buffer config of 4/4.
+ *
+ * Setting the SAV BP bit does not save bad packets, but
+ * only enables RX on-card stats collection.
+ *
* The documentation in places seems to miss things. In actual fact
* I've always eventually found everything is documented, it just
* requires careful study.
@@ -35,25 +43,39 @@
* Intel NIC. For performance we want to keep the transmit queue deep
* as the card can transmit packets while fetching others from main
* memory by bus master DMA. Transmission and reception are driven by
- * ring buffers. When updating the ring we are required to do some
- * housekeeping work using the mailboxes and the command register.
+ * circular buffer queues.
*
- * The mailboxes provide a method for sending control requests to the
- * card. The transmit mail box is used to update the transmit ring
- * pointers and the receive mail box to update the receive ring
- * pointers. The exec mailbox allows a variety of commands to be
- * executed. Each command must complete before the next is executed.
- * Primarily we use the exec mailbox for controlling the multicast lists.
- * We have to do a certain amount of interesting hoop jumping as the
- * multicast list changes can occur in interrupt state when the card
- * has an exec command pending. We defer such events until the command
- * completion interrupt.
- *
- * The control register is used to pass status information. It tells us
- * the transmit and receive status for packets and allows us to control
- * the card operation mode. You must stop the card when emptying the
- * receive ring, or you will race with the ring buffer and lose packets.
- */
+ * The mailboxes can be used for controlling how the card traverses
+ * its buffer rings, but are used only for inital setup in this
+ * implementation. The exec mailbox allows a variety of commands to
+ * be executed. Each command must complete before the next is
+ * executed. Primarily we use the exec mailbox for controlling the
+ * multicast lists. We have to do a certain amount of interesting
+ * hoop jumping as the multicast list changes can occur in interrupt
+ * state when the card has an exec command pending. We defer such
+ * events until the command completion interrupt.
+ *
+ * A copy break scheme (taken from 3c59x.c) is employed whereby
+ * received frames exceeding a configurable length are passed
+ * directly to the higher networking layers without incuring a copy,
+ * in what amounts to a time/space trade-off.
+ *
+ * The card also keeps a large amount of statistical information
+ * on-board. In a perfect world, these could be used safely at no
+ * cost. However, lacking information to the contrary, processing
+ * them without races would involve so much extra complexity as to
+ * make it unworthwhile to do so. In the end, a hybrid SW/HW
+ * implementation was made necessary --- see mc32_update_stats().
+ *
+ * DOC: Notes
+ *
+ * It should be possible to use two or more cards, but at this stage
+ * only by loading two copies of the same module.
+ *
+ * The on-board 82586 NIC has trouble receiving multiple
+ * back-to-back frames and so is likely to drop packets from fast
+ * senders.
+**/
#include
@@ -78,6 +100,7 @@
#include
#include
#include
+#include
#include "3c527.h"
@@ -91,23 +114,37 @@
#ifndef NET_DEBUG
#define NET_DEBUG 2
#endif
+
+#undef DEBUG_IRQ
+
static unsigned int mc32_debug = NET_DEBUG;
/* The number of low I/O ports used by the ethercard. */
-#define NETCARD_IO_EXTENT 8
+#define MC32_IO_EXTENT 8
+
+/* As implemented, values must be a power-of-2 -- 4/8/16/32 */
+#define TX_RING_LEN 32 /* Typically the card supports 37 */
+#define RX_RING_LEN 8 /* " " " */
+
+/* Copy break point, see above for details.
+ * Setting to > 1512 effectively disables this feature. */
+#define RX_COPYBREAK 200 /* Value from 3c59x.c */
+
+/* Issue the 82586 workaround command - this is for "busy lans", but
+ * basically means for all lans now days - has a performance (latency)
+ * cost, but best set. */
+static const int WORKAROUND_82586=1;
+/* Pointers to buffers and their on-card records */
-struct mc32_mailbox
+struct mc32_ring_desc
{
- u16 mbox __attribute((packed));
- u16 data[1] __attribute((packed));
+ volatile struct skb_header *p;
+ struct sk_buff *skb;
};
-/* Information that need to be kept for each board. */
-
-#define TX_RING_MAX 16 /* Typically the card supports 37 */
-#define RX_RING_MAX 32 /* " " " */
+/* Information that needs to be kept for each board. */
struct mc32_local
{
struct net_device_stats net_stats;
@@ -115,25 +152,28 @@
volatile struct mc32_mailbox *rx_box;
volatile struct mc32_mailbox *tx_box;
volatile struct mc32_mailbox *exec_box;
- volatile u16 *stats;
- u16 tx_chain;
- u16 rx_chain;
- u16 tx_len;
- u16 rx_len;
+ volatile struct mc32_stats *stats; /* Start of on-card statistics */
+ u16 tx_chain; /* Transmit list start offset */
+ u16 rx_chain; /* Receive list start offset */
+ u16 tx_len; /* Transmit list count */
+ u16 rx_len; /* Receive list count */
+
u32 base;
- u16 rx_halted;
- u16 tx_halted;
- u16 rx_pending;
u16 exec_pending;
u16 mc_reload_wait; /* a multicast load request is pending */
- atomic_t tx_count; /* buffers left */
+ u32 mc_list_valid; /* True when the mclist is set */
+ u16 xceiver_state; /* Current transceiver state. bitmapped */
+ u16 desired_state; /* The state we want the transceiver to be in */
+ atomic_t tx_count; /* buffers left */
wait_queue_head_t event;
- struct sk_buff *tx_skb[TX_RING_MAX]; /* Transmit ring */
- u16 tx_skb_top;
- u16 tx_skb_end;
- struct sk_buff *rx_skb[RX_RING_MAX]; /* Receive ring */
- void *rx_ptr[RX_RING_MAX]; /* Data pointers */
- u32 mc_list_valid; /* True when the mclist is set */
+
+ struct mc32_ring_desc tx_ring[TX_RING_LEN]; /* Host Transmit ring */
+ struct mc32_ring_desc rx_ring[RX_RING_LEN]; /* Host Receive ring */
+
+ u16 tx_ring_tail; /* index to tx de-queue end */
+ u16 tx_ring_head; /* index to tx en-queue end */
+
+ u16 rx_ring_tail; /* index to rx de-queue end */
};
/* The station (ethernet) address prefix, used for a sanity check. */
@@ -146,18 +186,25 @@
char *name;
};
-static struct mca_adapters_t mc32_adapters[] __initdata = {
+const struct mca_adapters_t mc32_adapters[] = {
{ 0x0041, "3COM EtherLink MC/32" },
{ 0x8EF5, "IBM High Performance Lan Adapter" },
{ 0x0000, NULL }
};
-/* Index to functions, as function prototypes. */
+/* Macros for ring index manipulations */
+static inline u16 next_rx(u16 rx) { return (rx+1)&(RX_RING_LEN-1); };
+static inline u16 prev_rx(u16 rx) { return (rx-1)&(RX_RING_LEN-1); };
+static inline u16 next_tx(u16 tx) { return (tx+1)&(TX_RING_LEN-1); };
+
+
+/* Index to functions, as function prototypes. */
extern int mc32_probe(struct net_device *dev);
static int mc32_probe1(struct net_device *dev, int ioaddr);
+static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len);
static int mc32_open(struct net_device *dev);
static void mc32_timeout(struct net_device *dev);
static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev);
@@ -167,9 +214,8 @@
static void mc32_set_multicast_list(struct net_device *dev);
static void mc32_reset_multicast_list(struct net_device *dev);
-
/**
- * mc32_probe:
+ * mc32_probe - Search for supported boards
* @dev: device to probe
*
* Because MCA bus is a real bus and we can scan for cards we could do a
@@ -212,7 +258,7 @@
}
/**
- * mc32_probe1:
+ * mc32_probe1 - Check a given slot for a board and test the card
* @dev: Device structure to fill in
* @slot: The MCA bus slot being used by this card
*
@@ -221,11 +267,11 @@
* in firmware so we have to wait for it to return and post us either a
* failure case or some addresses we use to find the board internals.
*/
-
+
static int __init mc32_probe1(struct net_device *dev, int slot)
{
static unsigned version_printed = 0;
- int i;
+ int i, err;
u8 POS;
u32 base;
struct mc32_local *lp;
@@ -258,7 +304,7 @@
"82586 initialisation failure",
"Adapter list configuration error"
};
-
+
/* Time to play MCA games */
if (mc32_debug && version_printed++ == 0)
@@ -301,6 +347,12 @@
dev->irq = ((POS>>2)&3)+9;
+ if(!request_region(dev->base_addr, MC32_IO_EXTENT, cardname))
+ {
+ printk("io 0x%3lX, which is busy.\n", dev->base_addr);
+ return -EBUSY;
+ }
+
printk("io 0x%3lX irq %d mem 0x%lX (%dK)\n",
dev->base_addr, dev->irq, dev->mem_start, i/1024);
@@ -349,18 +401,20 @@
* Grab the IRQ
*/
- i = request_irq(dev->irq, &mc32_interrupt, 0, dev->name, dev);
+ i = request_irq(dev->irq, &mc32_interrupt, SA_SHIRQ, dev->name, dev);
if (i) {
- printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
+ release_region(dev->base_addr, MC32_IO_EXTENT);
+ printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq);
return i;
}
+
/* Initialize the device structure. */
dev->priv = kmalloc(sizeof(struct mc32_local), GFP_KERNEL);
if (dev->priv == NULL)
{
- free_irq(dev->irq, dev);
- return -ENOMEM;
+ err = -ENOMEM;
+ goto err_exit_irq;
}
memset(dev->priv, 0, sizeof(struct mc32_local));
@@ -371,14 +425,14 @@
base = inb(dev->base_addr);
- while(base==0xFF)
+ while(base == 0xFF)
{
i++;
- if(i==1000)
+ if(i == 1000)
{
- printk("%s: failed to boot adapter.\n", dev->name);
- free_irq(dev->irq, dev);
- return -ENODEV;
+ printk(KERN_ERR "%s: failed to boot adapter.\n", dev->name);
+ err = -ENODEV;
+ goto err_exit_free;
}
udelay(1000);
if(inb(dev->base_addr+2)&(1<<5))
@@ -388,12 +442,12 @@
if(base>0)
{
if(base < 0x0C)
- printk("%s: %s%s.\n", dev->name, failures[base-1],
+ printk(KERN_ERR "%s: %s%s.\n", dev->name, failures[base-1],
base<0x0A?" test failure":"");
else
- printk("%s: unknown failure %d.\n", dev->name, base);
- free_irq(dev->irq, dev);
- return -ENODEV;
+ printk(KERN_ERR "%s: unknown failure %d.\n", dev->name, base);
+ err = -ENODEV;
+ goto err_exit_free;
}
base=0;
@@ -408,8 +462,8 @@
if(n>100)
{
printk(KERN_ERR "%s: mailbox read fail (%d).\n", dev->name, i);
- free_irq(dev->irq, dev);
- return -ENODEV;
+ err = -ENODEV;
+ goto err_exit_free;
}
}
@@ -418,11 +472,11 @@
lp->exec_box=bus_to_virt(dev->mem_start+base);
- base=lp->exec_box->data[1]<<16|lp->exec_box->data[0];
+ base=lp->exec_box->data[1]<<16|lp->exec_box->data[0];
lp->base = dev->mem_start+base;
- lp->rx_box=bus_to_virt(lp->base + lp->exec_box->data[2]);
+ lp->rx_box=bus_to_virt(lp->base + lp->exec_box->data[2]);
lp->tx_box=bus_to_virt(lp->base + lp->exec_box->data[3]);
lp->stats = bus_to_virt(lp->base + lp->exec_box->data[5]);
@@ -431,18 +485,16 @@
* Descriptor chains (card relative)
*/
- lp->tx_chain = lp->exec_box->data[8];
- lp->rx_chain = lp->exec_box->data[10];
- lp->tx_len = lp->exec_box->data[9];
- lp->rx_len = lp->exec_box->data[11];
+ lp->tx_chain = lp->exec_box->data[8]; /* Transmit list start offset */
+ lp->rx_chain = lp->exec_box->data[10]; /* Receive list start offset */
+ lp->tx_len = lp->exec_box->data[9]; /* Transmit list count */
+ lp->rx_len = lp->exec_box->data[11]; /* Receive list count */
+
init_waitqueue_head(&lp->event);
- printk("%s: %d RX buffers, %d TX buffers. Base of 0x%08X.\n",
- dev->name, lp->rx_len, lp->tx_len, lp->base);
-
- if(lp->tx_len > TX_RING_MAX)
- lp->tx_len = TX_RING_MAX;
-
+ printk("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n",
+ dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base);
+
dev->open = mc32_open;
dev->stop = mc32_close;
dev->hard_start_xmit = mc32_send_packet;
@@ -450,57 +502,65 @@
dev->set_multicast_list = mc32_set_multicast_list;
dev->tx_timeout = mc32_timeout;
dev->watchdog_timeo = HZ*5; /* Board does all the work */
+
- lp->rx_halted = 1;
- lp->tx_halted = 1;
- lp->rx_pending = 0;
+ lp->xceiver_state = HALTED;
+
+ lp->tx_ring_tail=lp->tx_ring_head=0;
/* Fill in the fields of the device structure with ethernet values. */
ether_setup(dev);
+
return 0;
+
+err_exit_free:
+ kfree(dev->priv);
+err_exit_irq:
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr, MC32_IO_EXTENT);
+ return err;
}
/**
- * mc32_ring_poll:
+ * mc32_ready_poll - wait until we can feed it a command
* @dev: The device to wait for
*
- * Wait until a command we issues to the control register is completed.
- * This actually takes very little time at all, which is fortunate as
- * we often have to busy wait it.
+ * Wait until the card becomes ready to accept a command via the
+ * command register. This tells us nothing about the completion
+ * status of any pending commands and takes very little time at all.
*/
-static void mc32_ring_poll(struct net_device *dev)
+static void mc32_ready_poll(struct net_device *dev)
{
int ioaddr = dev->base_addr;
while(!(inb(ioaddr+HOST_STATUS)&HOST_STATUS_CRR));
}
-
/**
- * mc32_command_nowait:
+ * mc32_command_nowait - send a command non blocking
* @dev: The 3c527 to issue the command to
* @cmd: The command word to write to the mailbox
* @data: A data block if the command expects one
* @len: Length of the data block
*
- * Send a command from interrupt state. If there is a command currently
- * being executed then we return an error of -1. It simply isnt viable
- * to wait around as commands may be slow. Providing we get in then
- * we send the command and busy wait for the board to acknowledge that
- * a command request is pending. We do not wait for the command to
- * complete, just for the card to admit to noticing it.
+ * Send a command from interrupt state. If there is a command
+ * currently being executed then we return an error of -1. It simply
+ * isn't viable to wait around as commands may be slow. Providing we
+ * get in, we busy wait for the board to become ready to accept the
+ * command and issue it. We do not wait for the command to complete
+ * --- the card will interrupt us when it's done.
*/
static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int len)
{
struct mc32_local *lp = (struct mc32_local *)dev->priv;
int ioaddr = dev->base_addr;
-
+
if(lp->exec_pending)
return -1;
-
+
lp->exec_pending=3;
lp->exec_box->mbox=0;
lp->exec_box->mbox=cmd;
@@ -515,7 +575,7 @@
/**
- * mc32_command:
+ * mc32_command - send a command and sleep until completion
* @dev: The 3c527 card to issue the command to
* @cmd: The command word to write to the mailbox
* @data: A data block if the command expects one
@@ -543,8 +603,6 @@
* 3 - command issued, trash reply. In which case the irq
* takes it back to state 0
*
- * Send command and block for results. On completion spot and reissue
- * multicasts
*/
static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
@@ -580,251 +638,287 @@
/* Send the command */
while(!(inb(ioaddr+HOST_STATUS)&HOST_STATUS_CRR));
outb(1<<6, ioaddr+HOST_CMD);
-
+
save_flags(flags);
cli();
+
while(lp->exec_pending!=2)
sleep_on(&lp->event);
lp->exec_pending=0;
restore_flags(flags);
-
- if(lp->exec_box->data[0]&(1<<13))
+ if(lp->exec_box->mbox&(1<<13))
ret = -1;
+
/*
* A multicast set got blocked - do it now
*/
if(lp->mc_reload_wait)
+ {
mc32_reset_multicast_list(dev);
+ }
return ret;
}
/**
- * mc32_rx_abort:
- * @dev: 3c527 to abort
+ * mc32_start_transceiver - tell board to restart tx/rx
+ * @dev: The 3c527 card to issue the command to
*
- * Peforms a receive abort sequence on the card. In fact after some
- * experimenting we now simply tell the card to suspend reception. When
- * issuing aborts occasionally odd things happened.
- */
-
-static void mc32_rx_abort(struct net_device *dev)
-{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
- int ioaddr = dev->base_addr;
+ * This may be called from the interrupt state, where it is used
+ * to restart the rx ring if the card runs out of rx buffers.
+ *
+ * First, we check if it's ok to start the transceiver. We then show
+ * the card where to start in the rx ring and issue the
+ * commands to start reception and transmission. We don't wait
+ * around for these to complete.
+ */
- while(!(inb(ioaddr+HOST_STATUS)&HOST_STATUS_CRR));
-
- lp->rx_box->mbox=0;
- outb(3<<3, ioaddr+HOST_CMD); /* Suspend reception */
-}
+static void mc32_start_transceiver(struct net_device *dev) {
-
-/**
- * mc32_rx_begin:
- * @dev: 3c527 to enable
- *
- * We wait for any pending command to complete and then issue
- * a start reception command to the board itself. At this point
- * receive handling continues as it was before.
- */
-
-static void mc32_rx_begin(struct net_device *dev)
-{
struct mc32_local *lp = (struct mc32_local *)dev->priv;
int ioaddr = dev->base_addr;
-
- while(!(inb(ioaddr+HOST_STATUS)&HOST_STATUS_CRR));
-
- lp->rx_box->mbox=0;
- outb(1<<3, ioaddr+HOST_CMD); /* GO */
- mc32_ring_poll(dev);
-
- lp->rx_halted=0;
- lp->rx_pending=0;
-}
-/**
- * mc32_tx_abort:
- * @dev: 3c527 to abort
- *
- * Peforms a receive abort sequence on the card. In fact after some
- * experimenting we now simply tell the card to suspend transmits . When
- * issuing aborts occasionally odd things happened. In theory we want
- * an abort to be sure we can recycle our buffers. As it happens we
- * just have to be careful to shut the card down on close, and
- * boot it carefully from scratch on setup.
- */
-
-static void mc32_tx_abort(struct net_device *dev)
-{
- struct mc32_local *lp = (struct mc32_local *)dev->priv;
- int ioaddr = dev->base_addr;
-
- while(!(inb(ioaddr+HOST_STATUS)&HOST_STATUS_CRR));
-
+ /* Ignore RX overflow on device closure */
+ if (lp->desired_state==HALTED)
+ return;
+
+ mc32_ready_poll(dev);
+
lp->tx_box->mbox=0;
- outb(3, ioaddr+HOST_CMD); /* Suspend */
-
- /* Ring empty */
-
- atomic_set(&lp->tx_count, lp->tx_len);
+ lp->rx_box->mbox=0;
+
+ /* Give the card the offset to the post-EOL-bit RX descriptor */
+ lp->rx_box->data[0]=lp->rx_ring[prev_rx(lp->rx_ring_tail)].p->next;
+
+ outb(HOST_CMD_START_RX, ioaddr+HOST_CMD);
+
+ mc32_ready_poll(dev);
+ outb(HOST_CMD_RESTRT_TX, ioaddr+HOST_CMD); /* card ignores this on RX restart */
- /* Flush */
- if(lp->tx_skb_top!=lp->tx_skb_end)
- {
- int i;
- if(lp->tx_skb_top<=lp->tx_skb_end)
- {
- for(i=lp->tx_skb_top;itx_skb_end;i++)
- {
- dev_kfree_skb(lp->tx_skb[i]);
- lp->tx_skb[i]=NULL;
- }
- }
- else
- {
- for(i=lp->tx_skb_end;i