home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / prept207.zip / PREPT207.GZ / PREPT207
Text File  |  1996-05-21  |  329KB  |  11,024 lines

  1. diff -u --recursive --new-file pre2.0.6/linux/CREDITS linux/CREDITS
  2. --- pre2.0.6/linux/CREDITS    Mon May 20 08:20:57 1996
  3. +++ linux/CREDITS    Sun May 19 23:40:51 1996
  4. @@ -683,6 +683,15 @@
  5.  E: rfkoenig@immd4.informatik.uni-erlangen.de
  6.  D: The Linux Support Team Erlangen
  7.  
  8. +N: Willy Konynenberg
  9. +E: willy@xos.nl
  10. +W: http://www.xos.nl/
  11. +D: IP transparent proxy support
  12. +S: X/OS Experts in Open Systems BV
  13. +S: Kruislaan 419
  14. +S: 1098 VA Amsterdam 
  15. +S: The Netherlands
  16. +
  17.  N: Gero Kuhlmann
  18.  E: gero@gkminix.han.de
  19.  D: mounting root via NFS
  20. @@ -1188,11 +1197,13 @@
  21.  S: Denmark
  22.  
  23.  N: Drew Sullivan
  24. -E: drew@lethe.north.net
  25. +W: http://www.ss.org/
  26. +E: drew@ss.org
  27.  D: iBCS2 developer
  28.  S: 22 Irvington Cres.
  29.  S: Willowdale, Ontario
  30.  S: Canada M2N 2Z1
  31. +P: 1024/ACFFA969 5A 9C 42 AB E4 24 82 31  99 56 00 BF D3 2B 25 46
  32.  
  33.  N: Tommy Thorn
  34.  E: Tommy.Thorn@irisa.fr
  35. @@ -1330,6 +1341,15 @@
  36.  S: 301 15th Street S.
  37.  S: Moorhead, Minnesota 56560
  38.  S: USA 
  39. +
  40. +N: Jos Vos
  41. +E: jos@xos.nl
  42. +W: http://www.xos.nl/
  43. +D: Various IP firewall updates, ipfwadm
  44. +S: X/OS Experts in Open Systems BV
  45. +S: Kruislaan 419
  46. +S: 1098 VA Amsterdam 
  47. +S: The Netherlands
  48.  
  49.  N: Juergen Weigert
  50.  E: jnweiger@immd4.informatik.uni-erlangen.de
  51. diff -u --recursive --new-file pre2.0.6/linux/Documentation/Changes linux/Documentation/Changes
  52. --- pre2.0.6/linux/Documentation/Changes    Mon May 20 08:20:57 1996
  53. +++ linux/Documentation/Changes    Mon May 20 20:29:31 1996
  54. @@ -1,8 +1,11 @@
  55. +Intro
  56. +=====
  57. +
  58.  This document contains a list of the latest releases of the most
  59.  important packages for Linux as well as instructions for newcomers to
  60.  the 1.3.x series of kernels.  By glancing through it, you should be
  61. -able to find out what you need to upgrade to successfully run the
  62. -latest kernels.
  63. +able to find out what you need to upgrade in order to successfully run
  64. +the latest kernels.
  65.  
  66.     It was originally based on material from the linux-kernel mailing
  67.  list, Jared Mauch's web page "Software Victims of the 1.3 Kernel
  68. @@ -11,13 +14,13 @@
  69.  and was originally written and maintained by Alessandro Sigala
  70.  (ssigala@globalnet.it).
  71.  
  72. -Last updated: May 10, 1996.
  73. +Last updated: May 20, 1996.
  74.  Current Author: Chris Ricker (gt1355b@prism.gatech.edu).
  75.  
  76.  Current Releases
  77.  ****************
  78.  
  79. -- Kernel modules     Stable: 1.3.57, Exp: 1.3.69g
  80. +- Kernel modules     Stable: 1.3.57, Exp: 1.3.69k
  81.  - PPP daemon         Stable: 2.2.0f
  82.  - Dynamic linker (ld.so) 1.7.14
  83.  - GNU CC         2.7.2
  84. @@ -26,16 +29,22 @@
  85.  - Linux C++ Library     2.7.1.4
  86.  - Termcap         2.0.8
  87.  - Procps         0.99a
  88. -- Kbd             0.91
  89.  - Gpm             1.06
  90.  - SysVinit         2.60
  91.  - Util-linux         2.5
  92. -- Mtools         3.0
  93. -- Fdutils         4.3
  94.  
  95.  Upgrade notes
  96.  *************
  97.  
  98. +Network errors with recent kernels
  99. +==================================
  100. +
  101. +   Many default network scripts are set up add a route to the localhost
  102. +at 127.0.0.1 at startup.  However, they do this incorrectly.  To fix
  103. +the error, which is now spotted by the kernel, look for a line like
  104. +`route add -net 127.0.0.1' in your network configuration files and
  105. +change it to `route add -net 127.0.0.0'.
  106. +
  107.  The Linux C Library
  108.  ===================
  109.  
  110. @@ -92,9 +101,9 @@
  111.     In the latest 1.3.x kernel releases the /proc file system structure
  112.  was changed, so you need to upgrade the procps package to version
  113.  0.99a.  In the very latest kernels, /proc has changed again.  There's
  114. -not yet an officially updated version of procps, so make do with
  115. -0.99a; you might want to look for one of the patches floating around to
  116. -update 0.99a for use with 1.3.94 and later kernels.
  117. +not yet an officially updated version of procps, so use 0.99a; you
  118. +might want to look for one of the patches floating around to update
  119. +0.99a for use with 1.3.94 and later kernels.
  120.  
  121.  Kernel Modules
  122.  ==============
  123. @@ -102,19 +111,19 @@
  124.     1.3.x is almost completely modularized, and kerneld is now
  125.  incorporated into the kernel.  To take advantage of this, you'll need
  126.  the latest version of the module support apps.  The latest non-beta is
  127. -modules-1.3.57.tar.gz, and the latest beta is modules-1.3.69g.tar.gz.
  128. +modules-1.3.57.tar.gz, and the latest beta is modules-1.3.69k.tar.gz.
  129.  These should be available at the same place you picked up your kernel
  130. -(ftp://ftp.cc.gatech.edu/pub/linux/kernel/) and the home page is
  131. +(ftp://ftp.funet.fi/pub/Linux/kernel/src/) and the home page is
  132.  http://www.pi.se/blox/modules/index.html.  Note:  If you try to load a
  133.  module and get a message like
  134.  
  135.     `gcc2_compiled, undefined Failed to load module!  The symbols from
  136.  kernel 1.3.foo don't match 1.3.foo'
  137.  
  138. -   where `foo' is a number between 1 and 100, then it's time to upgrade
  139. -module utilities from 1.3.57 to 1.3.69g; you'll only get this error if
  140. -you're running the latest binutils, so most people don't need to upgrade
  141. -past 1.3.57.
  142. +   where `foo' is a number for a recent kernel, then it's time to
  143. +upgrade module utilities from 1.3.57 to the latest beta 1.3.69; you'll
  144. +only get this error if you're running the latest binutils, so most
  145. +people don't need to upgrade past 1.3.57.
  146.  
  147.     Another little tip: you can't have both a.out *and* ELF support
  148.  compiled as modules.  Otherwise, you get a nice Catch-22 when you try
  149. @@ -149,9 +158,8 @@
  150.  ftp://ftp.cistron.nl/pub/people/miquels/debian/sysvinit-2.60.tar.gz.
  151.  
  152.     If you're trying to run NCSA httpd, you have to set pre-spawning of
  153. -daemons to zero, as it incorrectly assumes SunOS behavior.  Some people
  154. -have said that the Apache httpd has problems with the new named pipes,
  155. -but I've never noticed any.
  156. +daemons to zero, as it incorrectly assumes SunOS behavior.  I recommend
  157. +you just switch to Apache httpd.
  158.  
  159.     The new named pipe behavior also causes problems with Hylafax.  If
  160.  you're running the hylafax daemon, it will just keep eating up CPU time
  161. @@ -165,8 +173,8 @@
  162.     CONFIG_OPENFIFO="O_RDWR"
  163.  
  164.     A similar method (finding all named pipes opened read-only and
  165. -changing them to read-write) will fix any program that broke because of
  166. -this change.
  167. +changing them to read-write) will fix any program that is broken
  168. +because of this change.
  169.  
  170.  Uugetty
  171.  =======
  172. @@ -190,14 +198,6 @@
  173.     Better yet, just get the latest official Linux termcap from
  174.  ftp://sunsite.unc.edu/pub/Linux/GCC/termcap-2.0.8.tar.gz
  175.  
  176. -   The console driver keeps track of the correspondence between character
  177. -codes and glyph bitmaps loaded into the character ROM of your video card.
  178. -Say
  179. -
  180. -   loadunimap def
  181. -
  182. -to get back to the default correspondence.
  183. -
  184.  Hdparm
  185.  ======
  186.  
  187. @@ -208,9 +208,44 @@
  188.  IP Accounting
  189.  =============
  190.  
  191. -   IP accounting has now been integrated into the kernel.  To use this,
  192. -you'll need to get ipfwadm from ftp://ftp.xos.nl/pub/linux/ipfwadm.  Get
  193. -ipfwadm-2.0beta2.tar.gz if your kernel is 1.3.66 or later.
  194. +   All IP packets coming in or going out via one of the network
  195. +interfaces are now passing the accounting chain.  So, packets being
  196. +forwarded are passing this chain twice.  Since pre2.0.7 (aka 1.99.7),
  197. +accounting rules can be defined so that they will only match in one
  198. +direction (either incoming or outgoing).
  199. +
  200. +   There also exists a possibility to match on device names and/or
  201. +device addresses, so that only packets coming in/going out via that
  202. +device (network interface) match with a rule.
  203. +
  204. +   You'll need to get ipfwadm from ftp://ftp.xos.nl/pub/linux/ipfwadm. 
  205. +Use ipfwadm-2.1.tar.gz if your kernel is 1.3.66 or later.
  206. +
  207. +IP Firewalls
  208. +============
  209. +
  210. +   The IP firewall code has been changed drastically during 1.3.x.
  211. +There are now 3 categories of firewall rules: one for incoming packets,
  212. +one for outgoing packets, and one for packets being forwarded.
  213. +
  214. +   There also exists a possibility to match on device names and/or
  215. +device addresses, so that only packets coming in/going out via that
  216. +device (network interface) match with a rule.  This is especially
  217. +useful to prevent spoofing.
  218. +
  219. +   You'll need to get ipfwadm from ftp://ftp.xos.nl/pub/linux/ipfwadm. 
  220. +Use ipfwadm-2.1.tar.gz if your kernel is 1.3.66 or later.
  221. +
  222. +IP Masquerading
  223. +===============
  224. +
  225. +   IP masquerading is now part of the standard kernel.  Note that you
  226. +always need to load separate modules (ip_masq_ftp.o and/or ip_masq_irc.o)
  227. +if you are going to use FTP or IRC in combination with masquerading.
  228. +Use "make modules" to generated them.
  229. +
  230. +   You'll need to get ipfwadm from ftp://ftp.xos.nl/pub/linux/ipfwadm. 
  231. +Use ipfwadm-2.1.tar.gz if your kernel is 1.3.66 or later.
  232.  
  233.  Networking
  234.  ==========
  235. @@ -222,7 +257,7 @@
  236.  release is net-tools-1.3.6-BETA5.tar.gz.  If you need the upgrade, you
  237.  probably need the latest beta release.
  238.  
  239. -xntpd
  240. +Xntpd
  241.  =====
  242.  
  243.     Older versions of xntpd will not work with the latest kernels.
  244. @@ -236,7 +271,7 @@
  245.  To fix this problem, get a new version of the sndkit from
  246.  ftp://ftp.best.com/pub/front/tasd/snd-util-3.5.tar.gz
  247.  
  248. -tcsh
  249. +Tcsh
  250.  ====
  251.  
  252.     If tcsh acts funny, get the source from
  253. @@ -299,7 +334,7 @@
  254.  as well.  APM, which is primarily of use in laptops, provides access to
  255.  battery status information and may help to conserve battery power.  The
  256.  support files can be found in
  257. -ftp://tsx-11.mit.edu/pub/linux/packages/laptops/apm/apmd-2.2.tar.gz
  258. +ftp://tsx-11.mit.edu/pub/linux/packages/laptops/apm/apmd-2.4.tar.gz
  259.  
  260.  iBCS and Dosemu
  261.  ===============
  262. @@ -311,37 +346,40 @@
  263.  ever works ;-), get
  264.  ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/Development/dosemu-0.63.1.8.tgz.
  265.  
  266. -Please send info about any other packages that 1.3.x "broke" or about
  267. -any new features of 1.3.x that require extra or new packages for use to
  268. -Chris Ricker (gt1355b@prism.gatech.edu).
  269. -
  270. -Mtools and fdutils
  271. +Mtools and Fdutils
  272.  ==================
  273.  
  274. -   The floppy ioctl numbering scheme has changed in 1.3.x. For
  275. -backwards compatibility, the old numbering scheme was supported
  276. -throughout 1.3.x. A warning will be printed in 2.0.x when the old
  277. -numbers are used, and their use will be discontinued entirely in 2.1.x
  278. -
  279. -   In order to avoid trouble, you need to recompile any programs that
  280. -emit floppy ioctls. These include mtools, fdutils and dosemu. You can
  281. -get mtools at:
  282. -
  283. -ftp://ftp.imag.fr/pub/Linux/ZLIBC/mtools/mtools-3.0.src.tar.gz
  284. +   The floppy ioctl numbering scheme has changed in 1.3.x.  For
  285. +backwards compatibility, the old system was supported through 1.3.x and
  286. +will generate a warning in 2.0.  In 2.1.x, the old scheme will
  287. +disappear entirely.
  288. +
  289. +   To avoid trouble (or at least annoying messages), you'll need to
  290. +recompile any programs which emit floppy ioctls, including mtools and
  291. +fdutils.  For mtools, get
  292.  ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/mtools-3.0.src.tar.gz
  293. -ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/mtools-3.0.src.tar.gz
  294. -
  295. -You can get fdutils at:
  296. -
  297. -ftp://ftp.imag.fr/pub/Linux/ZLIBC/fdutils/fdutils-4.3.src.tar.gz
  298. -ftp://sunsite.unc.edu/pub/Linux/system/Misc/fdutils-4.3.src.tar.gz
  299. -ftp://tsx-11.mit.edu/pub/linux/sources/sbin/fdutils-4.3.src.tar.gz
  300. +and for fdutils, get
  301. +ftp://sunsite.unc.edu/pub/Linux/system/Misc/fdutils-4.3.src.tar.gz.
  302.  
  303. -   For dosemu, see above.
  304. -
  305. -   In the future, the ioctl used by fdformat might be discontinued
  306. -altogether. Please use superformat (included in fdutils) instead.
  307. +   In the future, fdformat might disappear entirely, so get used to
  308. +using superformat instead.
  309.  
  310. +Please send info about any other packages that 1.3.x "broke" or about
  311. +any new features of 1.3.x that require extra or new packages for use to
  312. +Chris Ricker (gt1355b@prism.gatech.edu).  I generate this from a
  313. +modified texinfo setup, so you don't need to bother generating a diff
  314. +against the current version before you send the additional information
  315. +to me.
  316. +
  317. +nfsd daemon doesn't work anymore
  318. +================================
  319. +   The RedHat distribution 2.x and 3.x have a bug that they do
  320. +route add -net 127.0.0.1 at startup. That is wrong. Correct is 
  321. +route add -net 127.0.0.0. 
  322. +
  323. +Workaround: Change in /etc/sysconfig/network-scripts/ifcup-lo
  324. +the "route add -net ${IPADDR}" into "route add -net 127.0.0.0"
  325. +  
  326.  How to know the version of the installed programs
  327.  *************************************************
  328.  
  329. @@ -385,7 +423,7 @@
  330.  
  331.  The latest 5.3.12 release:
  332.  ftp://sunsite.unc.edu/pub/Linux/GCC/libc-5.3.12.bin.tar.gz
  333. -Installation notes for 5.2.18:
  334. +Installation notes for 5.3.12:
  335.  ftp://sunsite.unc.edu/pub/Linux/GCC/release.libc-5.3.12
  336.  
  337.  Patched make sources:
  338. @@ -438,7 +476,6 @@
  339.  SysVinit utilities
  340.  ==================
  341.  
  342. -At the time of writing:
  343.  ftp://sunsite.unc.edu/pub/Linux/system/Daemons/init/sysvinit-2.60.tar.gz
  344.  
  345.  Util-linux
  346. @@ -449,13 +486,27 @@
  347.  Mtools
  348.  ======
  349.  
  350. -ftp://ftp.imag.fr/pub/Linux/ZLIBC/mtools/mtools-3.0.src.tar.gz
  351.  ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/mtools-3.0.src.tar.gz
  352. -ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/mtools-3.0.src.tar.gz
  353.  
  354.  Fdutils
  355.  =======
  356.  
  357. -ftp://ftp.imag.fr/pub/Linux/ZLIBC/fdutils/fdutils-4.3.src.tar.gz
  358.  ftp://sunsite.unc.edu/pub/Linux/system/Misc/fdutils-4.3.src.tar.gz
  359. -ftp://tsx-11.mit.edu/pub/linux/sources/sbin/fdutils-4.3.src.tar.gz
  360. +
  361. +Other Info
  362. +==========
  363. +
  364. +   Please remember that most of these utils are available on your
  365. +favorite local linux mirror.  If you can, please get them from a closer
  366. +site before checking sunsite.
  367. +
  368. +   Also, for those of you running Red Hat, most of these are available
  369. +in RPM format.  Check around your favorite Red Hat mirror site before
  370. +installing the non-RPM version.  Remember, you might need to use the
  371. +-force option to get the upgrade to install.
  372. +
  373. +
  374. +isdn-utils
  375. +==========
  376. +
  377. +ftp://ftp.franken.de/pub/isdn4linux/isdn4k-utils-1.3.97.tar.gz
  378. diff -u --recursive --new-file pre2.0.6/linux/Documentation/Configure.help linux/Documentation/Configure.help
  379. --- pre2.0.6/linux/Documentation/Configure.help    Mon May 20 08:20:57 1996
  380. +++ linux/Documentation/Configure.help    Tue May 21 08:43:01 1996
  381. @@ -831,6 +831,9 @@
  382.    completely invisible and avoids the need to allocate valid IP host
  383.    addresses for the machines on the local net) or to use the ip packet
  384.    accounting to see what is using all your network bandwidth.
  385. +  This option is also needed when you want to enable the transparent
  386. +  proxying support (via which non-local connections can be redirected
  387. +  to local proxy servers).
  388.  
  389.  IP: accounting
  390.  CONFIG_IP_ACCT
  391. @@ -863,6 +866,13 @@
  392.    packets it received. The information is handled by the klogd demon
  393.    which is responsible for kernel messages ("man klogd").
  394.  
  395. +IP: transparent proxying (ALPHA)
  396. +CONFIG_IP_TRANSPARENT_PROXY
  397. +  This enables you to redirect any network traffic to a local server,
  398. +  acting as a "transparent proxy server".  Redirection is activated
  399. +  by defining special input firewall rules (using the ipfwadm utility)
  400. +  and/or by doing an appropriate bind() system call.
  401. +
  402.  IP: masquerading (ALPHA)
  403.  CONFIG_IP_MASQUERADE
  404.    If one of the computers on your local network for which your Linux
  405. @@ -887,6 +897,20 @@
  406.    has nothing to do with the computer architecture of the same
  407.    name. If you want this, say Y.
  408.  
  409. +IP: always defragment
  410. +CONFIG_IP_ALWAYS_DEFRAG
  411. +   This option means that all incoming fragments will be reassembled
  412. +   (defragmented) before being processed, even if those packets
  413. +   should be forwarded.  This option is highly recommended if you
  414. +   have enabled CONFIG_IP_MASQUERADE, because these facilities requires
  415. +   that second and further fragments can be related to TCP or UDP port
  416. +   numbers, which are only stored in the first fragment.  When using
  417. +   CONFIG_IP_FIREWALL, you might also want to enable this option, to
  418. +   have a more reliable firewall (otherwise second and further fragments
  419. +   will always be accepted by the firewall).  When using transparent
  420. +   proxying (CONFIG_IP_TRANSPARENT_PROXY), this option is implicit,
  421. +   although it is safe to say Y here.
  422. +
  423.  IP: aliasing support
  424.  CONFIG_IP_ALIAS
  425.    Sometimes it is useful to give several addresses to a single network
  426. @@ -1062,22 +1086,20 @@
  427.    use a low speed TNC (a Terminal Node Controller acts as a kind of
  428.    modem connecting your computer's serial port to your radio's
  429.    microphone input and speaker output) supporting the KISS protocol or
  430. -  the  various SCC cards that are supported by the Ottawa PI, the
  431. -  Gracilis Packetwin and the generic Z8530 driver. 
  432. -  At the moment there is no driver for the Baycom modem serial and parallel
  433. -  port hacks although one is being written (see the HAM-HOWTO). The other
  434. -  Baycom cards (SCC) are supported by the Z8530 driver.
  435. -  In order to use AX.25, you need to get a set of all the software for 
  436. -  Linux amateur radio users as well as information about how to 
  437. -  configure an AX.25 port is contained in the HAM-HOWTO, available via
  438. -  ftp (user: anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. You
  439. -  might also want to check out the file Documentation/networking/ax25.txt
  440. -  in the kernel source. More information about digital amateur radio
  441. -  in general is on the WWW at  
  442. +  the various SCC cards that are supported by the Ottowa PI, the
  443. +  Gracilis Packetwin and the generic Z8530 driver. Another option are
  444. +  the Baycom modem serial and parallel port hacks (supported by their
  445. +  own driver) and the other baycom cards (SCC) (supported by the Z8530
  446. +  driver).  Information about where to get supporting software for
  447. +  Linux amateur radio as well as information about how to configure an
  448. +  AX.25 port is contained in the HAM-HOWTO, available via ftp (user:
  449. +  anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. You might also
  450. +  want to check out the file Documentation/networking/ax25.txt in the
  451. +  kernel source. More information about digital amateur radio in
  452. +  general is on the WWW at
  453.    http://www.cis.ohio-state.edu/hypertext/faq/usenet/radio/ham-radio/digital-faq/faq.html
  454.    (To browse the WWW, you need to have access to a machine on the
  455. -  Internet that has one of the programs lynx, netscape or
  456. -  Mosaic). 
  457. +  Internet that has one of the programs lynx, netscape or Mosaic).
  458.  
  459.  Amateur Radio NET/ROM
  460.  CONFIG_NETROM
  461. @@ -1428,10 +1450,28 @@
  462.    sunsite.unc.edu:/pub/Linux/docs/HOWTO. If it doesn't work out of the
  463.    box, you may have to change some settings in drivers/scsi/pas16.h.
  464.   
  465. -QLOGIC SCSI support
  466. -CONFIG_SCSI_QLOGIC
  467. -  Information about this SCSI driver is contained in
  468. -  drivers/scsi/README.qlogic. You should also read the SCSI-HOWTO,
  469. +Qlogic FAS SCSI support
  470. +CONFIG_SCSI_QLOGIC_FAS
  471. +  This driver works only with the ISA, VLB, and PCMCIA versions of the
  472. +  Qlogic FastSCSI! cards as well as any other card based on the FASXX
  473. +  chip (including the Control Concepts SCSI/IDE/SIO/PIO/FDC cards); it
  474. +  does NOT support the PCI version. The PCI versions are supported by
  475. +  the Qlogic ISP driver though.  Information about this driver is
  476. +  contained in drivers/scsi/README.qlogicfas.  You should also read
  477. +  the SCSI-HOWTO, available via ftp (user: anonymous) at
  478. +  sunsite.unc.edu:/pub/Linux/docs/HOWTO. This driver is also available
  479. +  as a module ( = code which can be inserted in and removed from the
  480. +  running kernel whenever you want). If you want to compile it as a
  481. +  module, say M here and read Documentation/modules.txt.
  482. +
  483. +Qlogic ISP SCSI support (EXPERIMENTAL)
  484. +CONFIG_SCSI_QLOGIC_ISP
  485. +  This driver works for all QLogic PCI SCSI host adaptors (IQ-PCI,
  486. +  IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card. (This latter
  487. +  card is supported by the "AM53/79C974 PCI SCSI" driver). If you say
  488. +  Y here, make sure to say Y to "PCI BIOS support" as well. More
  489. +  information is contained in the file
  490. +  drivers/scsi/README.qlogicisp. You should also read the SCSI-HOWTO,
  491.    available via ftp (user: anonymous) at
  492.    sunsite.unc.edu:/pub/Linux/docs/HOWTO. This driver is also available
  493.    as a module ( = code which can be inserted in and removed from the
  494. @@ -1721,14 +1761,15 @@
  495.  BAYCOM ser12 and par96 kiss emulation driver for AX.25
  496.  CONFIG_BAYCOM
  497.    This is an experimental driver for Baycom style simple amateur radio
  498. -  modems that connect to either a serial interface or a parallel 
  499. -  interface. The driver supports the ser12 and par96 designs. To configure
  500. -  the driver, use the setbaycom utility available from
  501. -  http://www.ife.ee.ethz.ch/~sailer/ham/ham.html#lnxbay. For informations
  502. -  on the modems, see http://www.baycom.de.
  503. -  If you want to compile this as a module ( = code which can be
  504. -  inserted in and removed from the running kernel whenever you want),
  505. -  say M here and read Documentation/modules.txt. This is recommended.
  506. +  modems that connect to either a serial interface or a parallel
  507. +  interface. The driver supports the ser12 and par96 designs. To
  508. +  configure the driver, use the setbaycom utility available from
  509. +  http://www.ife.ee.ethz.ch/~sailer/ham/ham.html#lnxbay. For
  510. +  informations on the modems, see http://www.baycom.de and
  511. +  drivers/char/README.baycom.  If you want to compile this as a module
  512. +  ( = code which can be inserted in and removed from the running
  513. +  kernel whenever you want), say M here and read
  514. +  Documentation/modules.txt. This is recommended.
  515.  
  516.  PLIP (parallel port) support
  517.  CONFIG_PLIP
  518. @@ -2625,6 +2666,14 @@
  519.    use it. Probably this is only useful for multi user systems. If
  520.    unsure, say N.
  521.  
  522. +Mandatory lock support
  523. +CONFIG_LOCK_MANDATORY
  524. +  Mandatory locking is used by some System 5 style database
  525. +  applications.  To use this option safely you must have newer NFS
  526. +  daemons, new samba, new netatalk, new mars-nwe and other file
  527. +  servers. At the time of writing none of these are available. Unless
  528. +  you need this feature say N.
  529. +
  530.  Minix fs support
  531.  CONFIG_MINIX_FS
  532.    Minix is a simple operating system used in many classes about
  533. @@ -2664,12 +2713,12 @@
  534.    which doesn't require ext2fs is a diskless Linux box which mounts
  535.    all files over the network using NFS (in this case it's sufficient
  536.    to enable NFS filesystem support below; if you are planning to do
  537. -  this, have a look at the package
  538. -  /pub/Linux/system/Linux-boot/netboot-nfs.tar.gz, available via ftp
  539. -  (user: anonymous) from sunsite.unc.edu, extract with "tar xzvf
  540. -  filename"). There is a short ext2fs-FAQ, available via ftp
  541. -  (user: anonymous) in sunsite.unc.edu:/pub/Linux/docs/faqs. This
  542. -  option will enlarge your kernel by about 41 kB. Default is Y.
  543. +  this, have a look at the netboot package in
  544. +  /pub/Linux/system/Linux-boot/, available via ftp (user: anonymous)
  545. +  from sunsite.unc.edu, extract with "tar xzvf filename"). There is a
  546. +  short ext2fs-FAQ, available via ftp (user: anonymous) in
  547. +  sunsite.unc.edu:/pub/Linux/docs/faqs. This option will enlarge your
  548. +  kernel by about 41 kB. Default is Y.
  549.  
  550.  xiafs filesystem support
  551.  CONFIG_XIA_FS
  552. @@ -3338,6 +3387,143 @@
  553.    sunsite.unc.edu:/pub/Linux/kernel/patches/console/pcsndrv-X.X.tar.gz,
  554.    to be extracted with "tar xzvf filename".
  555.  
  556. +ProAudioSpectrum 16 support
  557. +CONFIG_PAS
  558. +  Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio
  559. +  16 or Logitech SoundMan 16.  Don't answer 'y' if you have some other
  560. +  card made by Media Vision or Logitech since they are not PAS16
  561. +  compatible.
  562. +
  563. +SoundBlaster (SB, SBPro, SB16, clones) support
  564. +CONFIG_SB
  565. +  Answer "y" if you have an original SoundBlaster card made by
  566. +  Creative Labs or a 100% hardware compatible clone (like the
  567. +  Thunderboard or SM Games). If your card was in the list of supported
  568. +  cards look at the card specific instructions in the
  569. +  drivers/sound/Readme.cards file before answering this question. For
  570. +  an unknown card you may answer Y if the card claims to be
  571. +  SoundBlaster compatible.
  572. +
  573. +Generic OPL2/OPL3 FM synthesizer support
  574. +CONFIG_ADLIB
  575. +  Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
  576. +  Answering Y is usually a safe and recommended choice, however some
  577. +  cards may have software (TSR) FM emulation. Enabling FM support with
  578. +  these cards may cause trouble (I don't currently know of any such
  579. +  cards, however).
  580. +
  581. +Gravis Ultrasound support
  582. +CONFIG_GUS
  583. +  Enable this option for any type of Gravis Ultrasound card, including
  584. +  the GUS or GUS MAX.
  585. +
  586. +MPU-401 support (NOT for SB16)
  587. +CONFIG_MPU401
  588. +  Be careful with this question. The MPU401 interface is supported by
  589. +  all soundcards. However, some natively supported cards have their
  590. +  own driver for MPU401. Enabling the MPU401 option with these cards
  591. +  will cause a conflict. Also, enabling MPU401 on a system that
  592. +  doesn't really have a MPU401 could cause some trouble. If your card
  593. +  was in the list of supported cards, look at the card specific
  594. +  instructions in the drivers/sound/Readme.cards file. It's safe to
  595. +  answer Y if you have a true MPU401 MIDI interface card.
  596. +
  597. +6850 UART Midi support
  598. +CONFIG_UART6850
  599. +  This option enables support for MIDI interfaces based on the 6850
  600. +  UART chip. This interface is rarely found on sound cards.  It's safe
  601. +  to answer N to this question.
  602. +
  603. +PSS (ECHO-ADI2111) support
  604. +CONFIG_PSS
  605. +  Answer Y only if you have Orchid SW32, Cardinal DSP16 or some other
  606. +  card based on the PSS chipset (AD1848 codec + ADSP-2115 DSP chip +
  607. +  Echo ESC614 ASIC CHIP).
  608. +
  609. +16 bit sampling option of GUS (_NOT_ GUS MAX)
  610. +CONFIG_GUS16
  611. +  Answer Y if you have installed the 16 bit sampling daughtercard on
  612. +  your GUS.  Answer N if you have a GUS MAX, since enabling this
  613. +  option disables GUS MAX support.
  614. +
  615. +GUS MAX support
  616. +CONFIG_GUSMAX
  617. +  Answer Y only if you have a Gravis Ultrasound MAX.
  618. +
  619. +Microsoft Sound System support
  620. +CONFIG_MSS
  621. +  Again think carefully before answering Y to this question.  It's
  622. +  safe to answer Y if you have the original Windows Sound System card
  623. +  made by Microsoft or Aztech SG 16 Pro (or NX16 Pro).  Also you may
  624. +  answer Y in case your card is NOT among these:
  625. +     ATI Stereo F/X, AdLib, Audio Excell DSP16, Cardinal DSP16,
  626. +     Ensoniq SoundScape (and compatibles made by Reveal and Spea),
  627. +     Gravis Ultrasound, Gravis Ultrasound ACE, Gravis Ultrasound Max,
  628. +     Gravis Ultrasound with 16 bit option, Logitech Sound Man 16,
  629. +     Logitech SoundMan Games, Logitech SoundMan Wave, MAD16 Pro (OPTi
  630. +     82C929), Media Vision Jazz16, MediaTriX AudioTriX Pro, Microsoft
  631. +     Windows Sound System (MSS/WSS), Mozart (OAK OTI-601), Orchid
  632. +     SW32, Personal Sound System (PSS), Pro Audio Spectrum 16, Pro
  633. +     Audio Studio 16, Pro Sonic 16, Roland MPU-401 MIDI interface,
  634. +     Sound Blaster 1.0, Sound Blaster 16, Sound Blaster 16ASP, Sound
  635. +     Blaster 2.0, Sound Blaster AWE32, Sound Blaster Pro, TI TM4000M
  636. +     notebook, ThunderBoard, Turtle Beach Tropez, Yamaha FM
  637. +     synthesizers (OPL2, OPL3 and OPL4), 6850 UART MIDI Interface.
  638. +  For cards having native support in VoxWare, consult the card
  639. +  specific instructions in drivers/sound/Readme.cards. Some drivers
  640. +  have their own MSS support and enabling this option will cause a
  641. +  conflict.
  642. +
  643. +Ensoniq Soundscape support
  644. +CONFIG_SSCAPE
  645. +  Answer Y if you have a soundcard based on the Ensoniq SoundScape
  646. +  chipset. Such cards are being manufactured at least by Ensoniq, Spea
  647. +  and Reveal (Reveal makes also other cards).
  648. +
  649. +MediaTriX AudioTriX Pro support
  650. +CONFIG_TRIX
  651. +  Answer Y if you have the AudioTriX Pro sound card manufactured
  652. +  by MediaTrix.
  653. +
  654. +Support for MAD16 and/or Mozart based cards
  655. +CONFIG_MAD16
  656. +  Answer Y if your card has a Mozart (OAK OTI-601) or MAD16
  657. +  (OPTi 82C928 or 82C929) audio interface chip. These chips are
  658. +  currently quite common so it's possible that many no-name cards
  659. +  have one of them. In addition the MAD16 chip is used in some
  660. +  cards made by known manufacturers such as Turtle Beach (Tropez),
  661. +  Reveal (some models) and Diamond (latest ones).
  662. +
  663. +Support for Crystal CS4232 based (PnP) cards
  664. +CONFIG_CS4232
  665. +  Enable this if you have a card based on the Crystal CS4232 chip set.
  666. +
  667. +Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers
  668. +CONFIG_MAUI
  669. +  Enable this option if you have a Turtle Beach Wave Front, Maui, or 
  670. +  Tropez sound card.
  671. +
  672. +Support for Crystal CS4232 based (PnP) cards
  673. +CONFIG_CS4232
  674. +  Use this option to enable experimental support for cards that use
  675. +  the Plug and Play protocol.
  676. +
  677. +/dev/dsp and /dev/audio support
  678. +CONFIG_AUDIO
  679. +  Answering N disables /dev/dsp and /dev/audio, the A/D and D/A
  680. +  converter devices.  Answer Y only if you know you will not need
  681. +  the option.  They are usually required.  Answer Y.
  682. +
  683. +MIDI interface support
  684. +CONFIG_MIDI
  685. +  Answering N disables /dev/midixx devices and access to any MIDI
  686. +  ports using /dev/sequencer and /dev/music. This option also affects
  687. +  any MPU401 and/or General MIDI compatible devices.  Answer Y.
  688. +
  689. +FM synthesizer (YM3812/OPL-3) support
  690. +CONFIG_YM3812
  691. +  Answer Y here, unless you know you will not need the option.
  692. +
  693.  Sun Audio support
  694.  CONFIG_SUN_AUDIO
  695.    This is support for the soundcards on Sun workstations. The code
  696. @@ -3405,7 +3591,7 @@
  697.    With this option enabled, the modem-emulator supports a subset
  698.    of the EIA Class 8 Voice commands. Using a getty with voice-support
  699.    (mgetty+sendfax by gert@greenie.muc.de with an extension, available
  700. -  with the ISDN utily package for example), you will be able
  701. +  with the ISDN utility package for example), you will be able
  702.    to use your Linux box as an ISDN-answering machine. Of course, this
  703.    must be supported by the lowlevel driver also. Currently, the Teles
  704.    driver is the only voice-supporting one.
  705. @@ -3520,6 +3706,6 @@
  706.  # LocalWords:  NeXTstep disklabel disklabels SMD FFS tm AmigaOS diskfiles Un
  707.  # LocalWords:  Bernd informatik rwth aachen uae affs multihosting bytecode java
  708.  # LocalWords:  applets applet JDK ncsa cabi SNI Alphatronix readme LANs scarab
  709. -# LocalWords:  winsock RNIS caltech OSPF honour Honouring Mbit Localtalk Ottowa
  710. +# LocalWords:  winsock RNIS caltech OSPF honour Honouring Mbit Localtalk
  711.  # LocalWords:  localtalk download Packetwin Baycom baycom interwork ascii JNT
  712.  # LocalWords:  Camtec
  713. diff -u --recursive --new-file pre2.0.6/linux/Documentation/cdrom/mcdx linux/Documentation/cdrom/mcdx
  714. --- pre2.0.6/linux/Documentation/cdrom/mcdx    Tue Aug 29 07:01:32 1995
  715. +++ linux/Documentation/cdrom/mcdx    Tue May 21 11:49:03 1996
  716. @@ -1,44 +1,46 @@
  717. -This is a first attempt to create an `improved' driver for the Mitsumi drives.
  718. -It is able to "live together" with mcd.c, if you have at least two Mitsumi
  719. -drives: each driver can use his own drive.
  720. -
  721. -To allow this "coexistence" as long as mcdx.c is not a superset of mcd.c,
  722. -this driver has to use its own device files. We use MAJOR 20 for it. So,
  723. -you have to do
  724. +This actually is an `improved' driver for the Mitsumi CD-ROM drives. 
  725.  
  726. - # mknod /dev/mcdx0 b 20 0
  727. - # mknod /dev/mcdx1 b 20 1
  728. +We are using the major device number 20 for it. So, you have to do
  729. +
  730. +~# mknod /dev/mcdx0 b 20 0
  731. +~# mknod /dev/mcdx1 b 20 1
  732.  
  733.  and so on, one entry for each drive to support, once.
  734.  
  735. -If you are using the driver as a module, you can specify your ports and IRQs
  736. -like
  737. +If you are using the driver as a module, you can specify the ports and IRQs
  738. +like:
  739. +
  740. + # insmod mcdx.o mcdx=0x300,11
  741.  
  742. - # insmod mcdx.o mcdx=0x300,11,0x304,5
  743. +and so on ("address,IRQ" pairs). When You intend to use more then one
  744. +drive, it's necessary to edit the mcdx.h file found in
  745. +/usr/src/linux/include/linux. Instead of providing the values on the
  746. +command line, You can "hardwire" them all in mcdx.h. The command line
  747. +values take precedence over the values in mcdx.h. 
  748.  
  749. -and so on ("address,IRQ" pairs).
  750. -This will override the configuration in mcdx.h.
  751. +WARNING: BE CAREFUL TO SUPPLY THE CORRECT VALUES OTHERWISE THE WHOLE SYSTEM
  752. +WILL HANG DURING BOOT-UP OR LOADING OF THE DRIVER!!!
  753.  
  754.  This driver:
  755.  
  756. -    o    handles XA (and hopefully) multi session CDs as well as
  757. -        ordinary CDs;
  758. -    o    supports up to 5 drives (of course, you'll need free 
  759. -        IRQs, i/o ports and slots);
  760. -    o    uses much less kernel memory than the standard mcd driver
  761. -        (no extra driver internal buffers!).
  762. -    o   plays audio (like the `old' driver, I hope)
  763. +    o    Handles XA and multi session CDs as well as ordinary CDs.
  764. +    o    Supports up to 5 drives (of course, you'll need free 
  765. +        IRQs, i/o ports and slots).
  766. +    o    Uses *much* less kernel memory than the standard mcd driver.
  767. +    o     Plays audio like the `old' driver.
  768.  
  769.  This version doesn't support yet:
  770.  
  771. -    o    shared IRQs (but it seems to be possible - I've successfully
  772. -                connected two drives to the same irq.  So it's `only' a 
  773. -                problem of the driver.)
  774. +    o    Shared IRQs, due to the fact that otherwise it wouldn't be
  775. +        possible to distinguish the drives issuing the interrupt in the 
  776. +        corresponding handling routine.
  777.  
  778.  This driver never will:
  779.  
  780.      o    Read digital audio (i.e. copy directly), due to missing
  781.          hardware features. 
  782. +    o    Do DMA transfers. This is simply far less efficient with such 
  783. +        a slow device. Further, the SoundBlaster interfaces doesn't
  784. +        support it, so it's not worth the effort.
  785.  
  786. -
  787. -heiko@lotte.sax.de
  788. +1996/05/20 Marcin Dalecki <dalecki@namu03.gwdg.de>
  789. diff -u --recursive --new-file pre2.0.6/linux/Documentation/isdn/README linux/Documentation/isdn/README
  790. --- pre2.0.6/linux/Documentation/isdn/README    Mon May 20 08:20:58 1996
  791. +++ linux/Documentation/isdn/README    Mon May 20 08:38:42 1996
  792. @@ -192,7 +192,7 @@
  793.                                    Layer-2-protocol is automatically
  794.                                    changed to 4 regardless of the setting
  795.                                    of register 14. On outgoing calls,
  796. -                                  the most significant 1-bit is choosen to
  797. +                                  the most significant 1-bit is chosen to
  798.                                    select the outgoing service octet.
  799.               19   0         Service-Octet-2
  800.               20   0         Bit coded register (readonly)
  801. diff -u --recursive --new-file pre2.0.6/linux/Documentation/isdn/syncPPP.FAQ linux/Documentation/isdn/syncPPP.FAQ
  802. --- pre2.0.6/linux/Documentation/isdn/syncPPP.FAQ    Mon May 20 08:20:58 1996
  803. +++ linux/Documentation/isdn/syncPPP.FAQ    Mon May 20 08:38:42 1996
  804. @@ -6,7 +6,7 @@
  805.  Q03: strange information using 'ifconfig'
  806.  Q04: MPPP?? What's that and how can I use it ...
  807.  Q05: I tried MPPP but it doesn't work 
  808. -Q06: can I use asynchronous PPP encapuslation with network devices
  809. +Q06: can I use asynchronous PPP encapsulation with network devices
  810.  Q07: A SunISDN machine can't connect to my i4l system
  811.  Q08: I wanna talk to several machines, which need different configs
  812.  Q09: Starting the ipppd, I get only error messages from i4l
  813. @@ -18,7 +18,7 @@
  814.  
  815.  Q01: pppd,ipppd, syncPPP , asyncPPP .. what is that ?
  816.     what should I use?
  817. -A: The pppd is for asynchronous PPP .. asynchron means
  818. +A: The pppd is for asynchronous PPP .. asynchronous means
  819.     here, the framing is character based. (e.g when
  820.     using ttyI* or tty* devices)
  821.  
  822. @@ -27,7 +27,7 @@
  823.     in isdn4linux pushes all IP packets direct
  824.     to the network layer and all PPP protocol
  825.     frames to the /dev/ippp* device. 
  826. -   So, the ipppd is a simple externel network
  827. +   So, the ipppd is a simple external network
  828.     protocol handler.
  829.  
  830.     If you login into a remote machine using the
  831. @@ -39,7 +39,7 @@
  832.     syncPPP machine .. use the network device part
  833.     of isdn4linux with the 'syncppp' encapsulation
  834.     and make sure, that the ipppd is running and 
  835. -   conneted to at least one /dev/ippp*. Check the 
  836. +   connected to at least one /dev/ippp*. Check the 
  837.     isdn4linux manual on how to configure a network device.
  838.  
  839.  --
  840. @@ -62,7 +62,7 @@
  841.  Q03: when I list the netdevices with ifconfig I see, that
  842.     my ISDN interface has a HWaddr and IRQ=0 and Base 
  843.     address = 0 
  844. -A: The device is a fake ethernetdevice .. ignore IRQ and baseaddr
  845. +A: The device is a fake ethernet device .. ignore IRQ and baseaddr
  846.     You need the HWaddr only for ethernet encapsulation.
  847.     
  848.  --
  849. @@ -79,12 +79,12 @@
  850.     every additional channel. (see the i4l manual
  851.     for more)
  852.     To use channel bundling you must first activate
  853. -   the 'master' or inital call. Now you can add 
  854. +   the 'master' or initial call. Now you can add 
  855.     the slave channels with the command:
  856.         isdnctrl addlink <device>
  857.     e.g:
  858.         isdnctrl addlink ippp0
  859. -   This is different to other encapsualtions of
  860. +   This is different from other encapsulations of
  861.     isdn4linux! With syncPPP, there is no automatic
  862.     activation of slave devices.
  863.  
  864. @@ -100,7 +100,7 @@
  865.  
  866.  --
  867.  
  868. -Q06: can I use asynchronous PPP encapuslation
  869. +Q06: can I use asynchronous PPP encapsulation
  870.     over the network interface of isdn4linux ..
  871.  
  872.  A: No .. that's not possible .. Use the standard
  873. @@ -131,7 +131,7 @@
  874.  
  875.  A: you must bind a network interface explicitly to
  876.     an ippp device, where you can connect a (for this
  877. -   interface) individualy configured ipppd.
  878. +   interface) individually configured ipppd.
  879.  
  880.  --
  881.  
  882. @@ -171,7 +171,7 @@
  883.     tries to negotiate the local host address!
  884.     With the option 'noipdefault' it requests an address
  885.     from the remote machine. With 'useifip' it gets the
  886. -   addresses from the net interface. Or you set the addresse
  887. +   addresses from the net interface. Or you set the address
  888.     on the option line with the <a.b.c.d:e.f.g.h> option.
  889.     Note: the IP address of the remote machine must be configured
  890.     locally or the remote machine must send it in an IPCP request.
  891. @@ -205,7 +205,7 @@
  892.     - there are at least a few RECV messages in the log:
  893.       -> fine: your card is dialing and your remote machine
  894.          tries to talk with you. Maybe only a missing 
  895. -        authentification. Check your ipppd configuration again.
  896. +        authentication. Check your ipppd configuration again.
  897.     - the ipppd exits for some reason:
  898.       -> not good ... check /var/adm/syslog and /var/adm/daemon.
  899.          Could be a bug in the ipppd.
  900. diff -u --recursive --new-file pre2.0.6/linux/Makefile linux/Makefile
  901. --- pre2.0.6/linux/Makefile    Mon May 20 08:20:58 1996
  902. +++ linux/Makefile    Sun May 19 19:01:53 1996
  903. @@ -1,6 +1,6 @@
  904.  VERSION = 1
  905.  PATCHLEVEL = 99
  906. -SUBLEVEL = 6
  907. +SUBLEVEL = 7
  908.  
  909.  ARCH = i386
  910.  
  911. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/Makefile linux/arch/m68k/amiga/Makefile
  912. --- pre2.0.6/linux/arch/m68k/amiga/Makefile    Tue May  7 16:22:18 1996
  913. +++ linux/arch/m68k/amiga/Makefile    Mon May 20 07:54:25 1996
  914. @@ -12,4 +12,8 @@
  915.         chipram.o amisound.o amifb.o zorro.o
  916.  OX_OBJS = ksyms.o
  917.  
  918. +ifdef CONFIG_FB_CYBER
  919. +O_OBJS := $(O_OBJS) cyberfb.o
  920. +endif
  921. +
  922.  include $(TOPDIR)/Rules.make
  923. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/amifb.c linux/arch/m68k/amiga/amifb.c
  924. --- pre2.0.6/linux/arch/m68k/amiga/amifb.c    Sat Apr 27 15:19:44 1996
  925. +++ linux/arch/m68k/amiga/amifb.c    Mon May 20 07:54:25 1996
  926. @@ -30,7 +30,7 @@
  927.   *
  928.   *
  929.   * This file is subject to the terms and conditions of the GNU General Public
  930. - * License.  See the file README.legal in the main directory of this archive
  931. + * License.  See the file COPYING in the main directory of this archive
  932.   * for more details.
  933.   */
  934.  
  935. @@ -527,16 +527,16 @@
  936.  
  937.  
  938.     /*
  939. -    *    Chip RAM we reserve for the Frame Buffer
  940. +    *    Chip RAM we reserve for the Frame Buffer (must be a multiple of 4K!)
  941.      *
  942.      *    This defines the Maximum Virtual Screen Size
  943.      */
  944.  
  945. -#define VIDEOMEMSIZE_AGA_2M   (1280*1024)    /* AGA (2MB) : max 1280*1024*256 */
  946. -#define VIDEOMEMSIZE_AGA_1M   (1024*768)     /* AGA (1MB) : max 1024*768*256 */
  947. -#define VIDEOMEMSIZE_ECS_2M   (1280*1024/2)  /* ECS (2MB) : max 1280*1024*16 */
  948. -#define VIDEOMEMSIZE_ECS_1M   (1024*768/2)   /* ECS (1MB) : max 1024*768*16 */
  949. -#define VIDEOMEMSIZE_OCS      (800*600/2)    /* OCS      : max 800*600*16 */
  950. +#define VIDEOMEMSIZE_AGA_2M   (1310720)   /* AGA (2MB) : max 1280*1024*256 */
  951. +#define VIDEOMEMSIZE_AGA_1M    (393216)   /* AGA (1MB) : max 1024*768*256 */
  952. +#define VIDEOMEMSIZE_ECS_2M    (655360)   /* ECS (2MB) : max 1280*1024*16 */
  953. +#define VIDEOMEMSIZE_ECS_1M    (393216)   /* ECS (1MB) : max 1024*768*16 */
  954. +#define VIDEOMEMSIZE_OCS       (262144)   /* OCS       : max ca. 800*600*16 */
  955.  
  956.  
  957.  static u_long videomemory;
  958. @@ -682,9 +682,10 @@
  959.  
  960.     /*
  961.      *    The minimum period for audio depends on htotal (for OCS/ECS/AGA)
  962. +    *    (Imported from arch/m68k/amiga/amisound.c)
  963.      */
  964.  
  965. -volatile u_short amiga_audio_min_period = 124;   /* Default for pre-OCS */
  966. +extern volatile u_short amiga_audio_min_period;
  967.  
  968.  
  969.     /*
  970. @@ -1133,7 +1134,7 @@
  971.   *  Copyright (C) 1994 Martin Schaller & Roman Hodek & Geert Uytterhoeven
  972.   *  
  973.   * This file is subject to the terms and conditions of the GNU General Public
  974. - * License.  See the file README.legal in the main directory of this archive
  975. + * License.  See the file COPYING in the main directory of this archive
  976.   * for more details.
  977.   *
  978.   * History:
  979. @@ -3189,7 +3190,7 @@
  980.     u_long diwstrt_h, diwstrt_v, diwstop_h, diwstop_v;
  981.     u_long hsstrt, vsstrt, hsstop, vsstop, htotal, vtotal;
  982.     u_long ddfmin, ddfmax, ddfstrt, ddfstop, hscroll;
  983. -   double hrate, vrate;
  984. +   u_long hrate, vrate;
  985.     u_short loopcnt = 0;
  986.  
  987.     /*
  988. @@ -3342,8 +3343,8 @@
  989.        hsstop = hsstrt+hslen_n;
  990.        diwstop_h = htotal+hsstrt-right_n+1;
  991.        diwstrt_h = diwstop_h-xres_n-1;
  992. -      hrate = (double)amiga_masterclock/htotal;
  993. -      vrate = hrate/vtotal;
  994. +      hrate = (amiga_masterclock+htotal/2)/htotal;
  995. +      vrate = (amiga_masterclock+htotal*vtotal/2)/(htotal*vtotal);
  996.        par->bplcon3 |= BPC3_BRDRBLNK | BPC3_EXTBLKEN;
  997.        par->beamcon0 = BMC0_HARDDIS | BMC0_VARVBEN | BMC0_LOLDIS |
  998.                        BMC0_VARVSYEN | BMC0_VARHSYEN | BMC0_VARBEAMEN |
  999. @@ -3748,6 +3749,13 @@
  1000.        }
  1001.        custom.bplcon3 = par->bplcon3;
  1002.        full_vmode_change = 0;
  1003. +
  1004. +      /*
  1005. +       *    The minimum period for audio depends on htotal (for OCS/ECS/AGA)
  1006. +       */
  1007. +
  1008. +      if (boot_info.bi_amiga.chipset != CS_STONEAGE)
  1009. +         amiga_audio_min_period = (par->htotal>>1)+1;
  1010.     }
  1011.     custom.ddfstrt = par->ddfstrt;
  1012.     custom.ddfstop = par->ddfstop;
  1013. @@ -3760,13 +3768,6 @@
  1014.      */
  1015.  
  1016.     aga_update_clist_hdr(clist_hdr, par);
  1017. -
  1018. -   /*
  1019. -    *    The minimum period for audio depends on htotal (for OCS/ECS/AGA)
  1020. -    */
  1021. -
  1022. -   if ((boot_info.bi_amiga.chipset != CS_STONEAGE) && full_vmode_change)
  1023. -      amiga_audio_min_period = (par->htotal>>1)+1;
  1024.  }
  1025.  
  1026.  
  1027. @@ -4887,9 +4888,23 @@
  1028.      *    Calculate the Pixel Clock Values for this Machine
  1029.      */
  1030.  
  1031. -   pixclock[TAG_SHRES-1] = 25E9/amiga_eclock;   /* SHRES:  35 ns / 28 MHz */
  1032. -   pixclock[TAG_HIRES-1] = 50E9/amiga_eclock;   /* HIRES:  70 ns / 14 MHz */
  1033. -   pixclock[TAG_LORES-1] = 100E9/amiga_eclock;  /* LORES: 140 ns /  7 MHz */
  1034. +   __asm("movel %3,%%d0;"
  1035. +         "movel #0x00000005,%%d1;"     /*  25E9: SHRES:  35 ns / 28 MHz */
  1036. +         "movel #0xd21dba00,%%d2;"
  1037. +         "divul %%d0,%%d1,%%d2;"
  1038. +         "movel %%d2,%0;"
  1039. +         "movel #0x0000000b,%%d1;"     /*  50E9: HIRES:  70 ns / 14 MHz */
  1040. +         "movel #0xa43b7400,%%d2;"
  1041. +         "divul %%d0,%%d1,%%d2;"
  1042. +         "movel %%d2,%1;"
  1043. +         "movel #0x00000017,%%d1;"     /* 100E9: LORES: 140 ns /  7 MHz */
  1044. +         "movel #0x4876e800,%%d2;"
  1045. +         "divul %%d0,%%d1,%%d2;"
  1046. +         "movel %%d2,%2"
  1047. +         : "=r" (pixclock[TAG_SHRES-1]), "=r" (pixclock[TAG_HIRES-1]),
  1048. +           "=r" (pixclock[TAG_LORES-1])
  1049. +         : "r" (amiga_eclock)
  1050. +         : "%%d0", "%%d1", "%%d2");
  1051.  
  1052.     /*
  1053.      *    Replace the Tag Values with the Real Pixel Clock Values
  1054. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/amiints.c linux/arch/m68k/amiga/amiints.c
  1055. --- pre2.0.6/linux/arch/m68k/amiga/amiints.c    Tue Apr 23 13:57:02 1996
  1056. +++ linux/arch/m68k/amiga/amiints.c    Mon May 20 07:54:25 1996
  1057. @@ -2,7 +2,7 @@
  1058.   * amiints.c -- Amiga Linux interrupt handling code
  1059.   *
  1060.   * This file is subject to the terms and conditions of the GNU General Public
  1061. - * License.  See the file README.legal in the main directory of this archive
  1062. + * License.  See the file COPYING in the main directory of this archive
  1063.   * for more details.
  1064.   *
  1065.   */
  1066. @@ -336,6 +336,8 @@
  1067.      }
  1068.  
  1069.      p = new_isr_node();
  1070. +    if (p == NULL)
  1071. +    return 0;
  1072.      p->isr = isr;
  1073.      p->pri = pri;
  1074.      p->data = data;
  1075. @@ -356,6 +358,84 @@
  1076.  
  1077.      return 1;
  1078.  }
  1079. +
  1080. +int amiga_remove_isr (unsigned long source, isrfunc isr, void *data)
  1081. +{
  1082. +    unsigned long amiga_source = source & ~IRQ_MACHSPEC;
  1083. +
  1084. +    if (amiga_source > NUM_AMIGA_SOURCES) {
  1085. +    printk ("amiga_remove_isr: Unknown interrupt source %ld\n", source);
  1086. +    return 0;
  1087. +    }
  1088. +
  1089. +    delete_isr (&ami_lists[amiga_source], isr, data);
  1090. +
  1091. +    if (ami_lists[amiga_source] == NULL) {
  1092. +    /* disable the interrupt */
  1093. +    custom.intena = ami_intena_vals[amiga_source];
  1094. +
  1095. +    /* if a CIAA interrupt, disable the appropriate CIA ICR bit */
  1096. +    if (source >= IRQ_AMIGA_CIAA_TA && source <= IRQ_AMIGA_CIAA_FLG)
  1097. +        ciaa.icr = 1 << (source - IRQ_AMIGA_CIAA_TA);
  1098. +
  1099. +    /* if a CIAB interrupt, disable the appropriate CIA ICR bit */
  1100. +    if (source >= IRQ_AMIGA_CIAB_TA && source <= IRQ_AMIGA_CIAB_FLG)
  1101. +        ciab.icr = 1 << (source - IRQ_AMIGA_CIAB_TA);
  1102. +    }
  1103. +
  1104. +    return 1;
  1105. +}
  1106. +
  1107. +
  1108. +/*
  1109. + * Enable/disable a particular machine specific interrupt source.
  1110. + * Note that this may affect other interrupts in case of a shared interrupt.
  1111. + */
  1112. +
  1113. +void amiga_enable_irq(unsigned int source)
  1114. +{
  1115. +    unsigned long amiga_source = source & ~IRQ_MACHSPEC;
  1116. +
  1117. +    if (amiga_source > NUM_AMIGA_SOURCES) {
  1118. +    printk("amiga_enable_irq: Unknown interrupt source %d\n", source);
  1119. +    return;
  1120. +    }
  1121. +
  1122. +    /* enable the interrupt */
  1123. +    custom.intena = IF_SETCLR | ami_intena_vals[amiga_source];
  1124. +
  1125. +    /* if a CIAA interrupt, enable the appropriate CIA ICR bit */
  1126. +    if (source >= IRQ_AMIGA_CIAA_TA && source <= IRQ_AMIGA_CIAA_FLG)
  1127. +    ciaa.icr = 0x80 | (1 << (source - IRQ_AMIGA_CIAA_TA));
  1128. +
  1129. +    /* if a CIAB interrupt, enable the appropriate CIA ICR bit */
  1130. +    if (source >= IRQ_AMIGA_CIAB_TA && source <= IRQ_AMIGA_CIAB_FLG)
  1131. +    ciab.icr = 0x80 | (1 << (source - IRQ_AMIGA_CIAB_TA));
  1132. +
  1133. +}
  1134. +
  1135. +void amiga_disable_irq(unsigned int source)
  1136. +{
  1137. +    unsigned long amiga_source = source & ~IRQ_MACHSPEC;
  1138. +
  1139. +    if (amiga_source > NUM_AMIGA_SOURCES) {
  1140. +    printk("amiga_disable_irq: Unknown interrupt source %d\n", source);
  1141. +    return;
  1142. +    }
  1143. +
  1144. +    /* disable the interrupt */
  1145. +    custom.intena = ami_intena_vals[amiga_source];
  1146. +
  1147. +    /* if a CIAA interrupt, disable the appropriate CIA ICR bit */
  1148. +    if (source >= IRQ_AMIGA_CIAA_TA && source <= IRQ_AMIGA_CIAA_FLG)
  1149. +    ciaa.icr = 1 << (source - IRQ_AMIGA_CIAA_TA);
  1150. +
  1151. +    /* if a CIAB interrupt, disable the appropriate CIA ICR bit */
  1152. +    if (source >= IRQ_AMIGA_CIAB_TA && source <= IRQ_AMIGA_CIAB_FLG)
  1153. +    ciab.icr = 1 << (source - IRQ_AMIGA_CIAB_TA);
  1154. +
  1155. +}
  1156. +
  1157.  
  1158.  int amiga_get_irq_list( char *buf, int len )
  1159.  {    int            i;
  1160. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/amikeyb.c linux/arch/m68k/amiga/amikeyb.c
  1161. --- pre2.0.6/linux/arch/m68k/amiga/amikeyb.c    Tue Apr 23 13:57:02 1996
  1162. +++ linux/arch/m68k/amiga/amikeyb.c    Mon May 20 07:54:25 1996
  1163. @@ -4,7 +4,7 @@
  1164.   * Amiga Keyboard driver for 680x0 Linux
  1165.   *
  1166.   * This file is subject to the terms and conditions of the GNU General Public
  1167. - * License.  See the file README.legal in the main directory of this archive
  1168. + * License.  See the file COPYING in the main directory of this archive
  1169.   * for more details.
  1170.   */
  1171.  
  1172. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/amisound.c linux/arch/m68k/amiga/amisound.c
  1173. --- pre2.0.6/linux/arch/m68k/amiga/amisound.c    Tue Apr 23 13:57:02 1996
  1174. +++ linux/arch/m68k/amiga/amisound.c    Mon May 20 07:54:25 1996
  1175. @@ -4,7 +4,7 @@
  1176.   * amiga sound driver for 680x0 Linux
  1177.   *
  1178.   * This file is subject to the terms and conditions of the GNU General Public
  1179. - * License.  See the file README.legal in the main directory of this archive
  1180. + * License.  See the file COPYING in the main directory of this archive
  1181.   * for more details.
  1182.   */
  1183.  
  1184. @@ -22,8 +22,12 @@
  1185.  };
  1186.  #define DATA_SIZE    (sizeof(sine_data)/sizeof(sine_data[0]))
  1187.  
  1188. -/* Imported from arch/m68k/amiga/amifb.c */
  1189. -extern volatile u_short amiga_audio_min_period;
  1190. +    /*
  1191. +     * The minimum period for audio may be modified by the frame buffer
  1192. +     * device since it depends on htotal (for OCS/ECS/AGA)
  1193. +     */
  1194. +
  1195. +volatile u_short amiga_audio_min_period = 124;    /* Default for pre-OCS */
  1196.  
  1197.  #define MAX_PERIOD    (65535)
  1198.  
  1199. @@ -78,18 +82,18 @@
  1200.              period = MAX_PERIOD;
  1201.  
  1202.          /* setup pointer to data, period, length and volume */
  1203. -        custom.aud[0].audlc = snd_data;
  1204. -        custom.aud[0].audlen = sizeof(sine_data)/2;
  1205. -        custom.aud[0].audper = (u_short)period;
  1206. -        custom.aud[0].audvol = 64; /* maxvol */
  1207. +        custom.aud[2].audlc = snd_data;
  1208. +        custom.aud[2].audlen = sizeof(sine_data)/2;
  1209. +        custom.aud[2].audper = (u_short)period;
  1210. +        custom.aud[2].audvol = 64; /* maxvol */
  1211.      
  1212.          if (ticks) {
  1213.              sound_timer.expires = jiffies + ticks;
  1214.              add_timer( &sound_timer );
  1215.          }
  1216.  
  1217. -        /* turn on DMA for audio channel 0 */
  1218. -        custom.dmacon = DMAF_SETCLR | DMAF_AUD0;
  1219. +        /* turn on DMA for audio channel 2 */
  1220. +        custom.dmacon = DMAF_SETCLR | DMAF_AUD2;
  1221.  
  1222.          restore_flags(flags);
  1223.          return;
  1224. @@ -103,8 +107,8 @@
  1225.  
  1226.  static void nosound( unsigned long ignored )
  1227.  {
  1228. -    /* turn off DMA for audio channel 0 */
  1229. -    custom.dmacon = DMAF_AUD0;
  1230. +    /* turn off DMA for audio channel 2 */
  1231. +    custom.dmacon = DMAF_AUD2;
  1232.      /* restore period to previous value after beeping */
  1233. -    custom.aud[0].audper = amiga_audio_period;
  1234. +    custom.aud[2].audper = amiga_audio_period;
  1235.  }    
  1236. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/chipram.c linux/arch/m68k/amiga/chipram.c
  1237. --- pre2.0.6/linux/arch/m68k/amiga/chipram.c    Tue Apr 23 13:57:02 1996
  1238. +++ linux/arch/m68k/amiga/chipram.c    Mon May 20 07:54:25 1996
  1239. @@ -34,13 +34,9 @@
  1240.  
  1241.    /* initialize start boundary */
  1242.  
  1243. -  custom.color[0] = 0xfff;
  1244. -
  1245.    dp = DP(chipaddr);
  1246.    dp->first = 1;
  1247.  
  1248. -  custom.color[0] = 0x0f00;
  1249. -
  1250.    dp->alloced = 0;
  1251.    dp->length = chipsize - 2*sizeof(*dp);
  1252.  
  1253. @@ -48,12 +44,8 @@
  1254.    dp = DP(chipaddr + chipsize) - 1;
  1255.    dp->last = 1;
  1256.    
  1257. -  custom.color[0] = 0x00f0;
  1258. -
  1259.    dp->alloced = 0;
  1260.    dp->length = chipsize - 2*sizeof(*dp);
  1261. -
  1262. -  custom.color[0] = 0x000f;
  1263.  
  1264.  #ifdef DEBUG
  1265.    printk ("chipram end boundary is %p, length is %d\n", dp,
  1266. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/config.c linux/arch/m68k/amiga/config.c
  1267. --- pre2.0.6/linux/arch/m68k/amiga/config.c    Tue May  7 16:22:18 1996
  1268. +++ linux/arch/m68k/amiga/config.c    Mon May 20 07:54:25 1996
  1269. @@ -4,7 +4,7 @@
  1270.   *  Copyright (C) 1993 Hamish Macdonald
  1271.   *
  1272.   * This file is subject to the terms and conditions of the GNU General Public
  1273. - * License.  See the file README.legal in the main directory of this archive
  1274. + * License.  See the file COPYING in the main directory of this archive
  1275.   * for more details.
  1276.   */
  1277.  
  1278. @@ -40,7 +40,7 @@
  1279.  extern int amiga_kbdrate (struct kbd_repeat *);
  1280.  extern void amiga_init_INTS (void);
  1281.  extern int amiga_add_isr (unsigned long, isrfunc, int, void *, char *);
  1282. -extern int amiga_remove_isr (unsigned long, isrfunc);
  1283. +extern int amiga_remove_isr (unsigned long, isrfunc, void *);
  1284.  extern int amiga_get_irq_list (char *, int);
  1285.  extern void amiga_enable_irq(unsigned int);
  1286.  extern void amiga_disable_irq(unsigned int);
  1287. @@ -259,11 +259,9 @@
  1288.    mach_kbdrate         = amiga_kbdrate;
  1289.    mach_init_INTS       = amiga_init_INTS;
  1290.    mach_add_isr         = amiga_add_isr;
  1291. -#if 0 /* ++1.3++ */
  1292.    mach_remove_isr      = amiga_remove_isr;
  1293.    mach_enable_irq      = amiga_enable_irq;
  1294.    mach_disable_irq     = amiga_disable_irq;
  1295. -#endif
  1296.    mach_get_irq_list    = amiga_get_irq_list;
  1297.    mach_gettimeoffset   = amiga_gettimeoffset;
  1298.    if (AMIGAHW_PRESENT(A3000_CLK)){
  1299. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/cyberfb.c linux/arch/m68k/amiga/cyberfb.c
  1300. --- pre2.0.6/linux/arch/m68k/amiga/cyberfb.c    Thu Jan  1 02:00:00 1970
  1301. +++ linux/arch/m68k/amiga/cyberfb.c    Mon May 20 07:54:25 1996
  1302. @@ -0,0 +1,1234 @@
  1303. +/*
  1304. + * linux/arch/m68k/amiga/cyberfb.c -- Low level implementation of the
  1305. + *                                    Cybervision frame buffer device
  1306. + *
  1307. + *    Copyright (C) 1996 Martin Apel
  1308. + *                       Geert Uytterhoeven
  1309. + *
  1310. + *
  1311. + * This file is based on the Amiga frame buffer device (amifb.c):
  1312. + *
  1313. + *    Copyright (C) 1995 Geert Uytterhoeven
  1314. + *
  1315. + *
  1316. + * History:
  1317. + *   - 22 Dec 95: Original version by Martin Apel
  1318. + *   - 05 Jan 96: Geert: integration into the current source tree
  1319. + *
  1320. + *
  1321. + * This file is subject to the terms and conditions of the GNU General Public
  1322. + * License.  See the file COPYING in the main directory of this archive
  1323. + * for more details.
  1324. + */
  1325. +
  1326. +
  1327. +#include <linux/kernel.h>
  1328. +#include <linux/errno.h>
  1329. +#include <linux/string.h>
  1330. +#include <linux/mm.h>
  1331. +#include <linux/tty.h>
  1332. +#include <linux/malloc.h>
  1333. +#include <linux/delay.h>
  1334. +#include <linux/config.h>
  1335. +#include <asm/segment.h>
  1336. +#include <asm/system.h>
  1337. +#include <asm/irq.h>
  1338. +#include <asm/bootinfo.h>
  1339. +#include <asm/zorro.h>
  1340. +#include <asm/pgtable.h>
  1341. +#include <linux/fb.h>
  1342. +#include "s3blit.h"
  1343. +
  1344. +
  1345. +#define arraysize(x)    (sizeof(x)/sizeof(*(x)))
  1346. +
  1347. +struct Cyber_fb_par {
  1348. +   int xres;
  1349. +   int yres;
  1350. +   int bpp;
  1351. +};
  1352. +
  1353. +static struct Cyber_fb_par current_par;
  1354. +
  1355. +static int current_par_valid = 0;
  1356. +static int currcon = 0;
  1357. +
  1358. +static struct display disp[MAX_NR_CONSOLES];
  1359. +static struct fb_info fb_info;
  1360. +
  1361. +static int node;        /* node of the /dev/fb?current file */
  1362. +
  1363. +
  1364. +   /*
  1365. +    *    Switch for Chipset Independency
  1366. +    */
  1367. +
  1368. +static struct fb_hwswitch {
  1369. +
  1370. +   /* Initialisation */
  1371. +
  1372. +   int (*init)(void);
  1373. +
  1374. +   /* Display Control */
  1375. +
  1376. +   int (*encode_fix)(struct fb_fix_screeninfo *fix, struct Cyber_fb_par *par);
  1377. +   int (*decode_var)(struct fb_var_screeninfo *var, struct Cyber_fb_par *par);
  1378. +   int (*encode_var)(struct fb_var_screeninfo *var, struct Cyber_fb_par *par);
  1379. +   int (*getcolreg)(u_int regno, u_int *red, u_int *green, u_int *blue,
  1380. +                    u_int *transp);
  1381. +   int (*setcolreg)(u_int regno, u_int red, u_int green, u_int blue,
  1382. +                    u_int transp);
  1383. +   void (*blank)(int blank);
  1384. +} *fbhw;
  1385. +
  1386. +
  1387. +   /*
  1388. +    *    Frame Buffer Name
  1389. +    */
  1390. +
  1391. +static char Cyber_fb_name[16] = "Cybervision";
  1392. +
  1393. +
  1394. +   /*
  1395. +    *    Cybervision Graphics Board
  1396. +    */
  1397. +
  1398. +#define CYBER8_WIDTH 1152
  1399. +#define CYBER8_HEIGHT 886
  1400. +#define CYBER8_PIXCLOCK 12500    /* ++Geert: Just a guess */
  1401. +
  1402. +#define CYBER16_WIDTH 800
  1403. +#define CYBER16_HEIGHT 600
  1404. +#define CYBER16_PIXCLOCK 25000   /* ++Geert: Just a guess */
  1405. +
  1406. +
  1407. +static int CyberKey = 0;
  1408. +static u_char Cyber_colour_table [256][4];
  1409. +static unsigned long CyberMem;
  1410. +static unsigned long CyberSize;
  1411. +static volatile char *CyberRegs;
  1412. +
  1413. +static long *memstart;
  1414. +
  1415. +
  1416. +   /*
  1417. +    *    Predefined Video Mode Names
  1418. +    */
  1419. +
  1420. +static char *Cyber_fb_modenames[] = {
  1421. +
  1422. +   /*
  1423. +    *    Autodetect (Default) Video Mode
  1424. +    */
  1425. +
  1426. +   "default",
  1427. +
  1428. +   /*
  1429. +    *    Predefined Video Modes
  1430. +    */
  1431. +    
  1432. +   "cyber8",            /* Cybervision 8 bpp */
  1433. +   "cyber16",           /* Cybervision 16 bpp */
  1434. +
  1435. +   /*
  1436. +    *    Dummy Video Modes
  1437. +    */
  1438. +
  1439. +   "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
  1440. +   "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
  1441. +   "dummy", "dummy", "dummy", "dummy",
  1442. +
  1443. +   /*
  1444. +    *    User Defined Video Modes
  1445. +    *
  1446. +    *    This doesn't work yet!!
  1447. +    */
  1448. +
  1449. +   "user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7"
  1450. +};
  1451. +
  1452. +
  1453. +   /*
  1454. +    *    Predefined Video Mode Definitions
  1455. +    */
  1456. +
  1457. +static struct fb_var_screeninfo Cyber_fb_predefined[] = {
  1458. +
  1459. +   /*
  1460. +    *    Autodetect (Default) Video Mode
  1461. +    */
  1462. +
  1463. +   { 0, },
  1464. +
  1465. +   /*
  1466. +    *    Predefined Video Modes
  1467. +    */
  1468. +    
  1469. +   {
  1470. +      /* Cybervision 8 bpp */
  1471. +      CYBER8_WIDTH, CYBER8_HEIGHT, CYBER8_WIDTH, CYBER8_HEIGHT, 0, 0, 8, 0,
  1472. +      {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
  1473. +      0, 0, -1, -1, FB_ACCEL_NONE, CYBER8_PIXCLOCK, 64, 96, 35, 12, 112, 2,
  1474. +      FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
  1475. +   }, {
  1476. +      /* Cybervision 16 bpp */
  1477. +      CYBER16_WIDTH, CYBER16_HEIGHT, CYBER16_WIDTH, CYBER16_HEIGHT, 0, 0, 16, 0,
  1478. +      {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},
  1479. +      0, 0, -1, -1, FB_ACCEL_NONE, CYBER16_PIXCLOCK, 64, 96, 35, 12, 112, 2,
  1480. +      FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
  1481. +   },
  1482. +
  1483. +   /*
  1484. +    *    Dummy Video Modes
  1485. +    */
  1486. +
  1487. +   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
  1488. +   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, },
  1489. +   { 0, }, { 0, },
  1490. +
  1491. +   /*
  1492. +    *    User Defined Video Modes
  1493. +    */
  1494. +
  1495. +   { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }
  1496. +};
  1497. +
  1498. +
  1499. +#define NUM_TOTAL_MODES    arraysize(Cyber_fb_predefined)
  1500. +#define NUM_PREDEF_MODES   (3)
  1501. +
  1502. +
  1503. +static int Cyberfb_inverse = 0;
  1504. +static int Cyberfb_Cyber8 = 0;        /* Use Cybervision board */
  1505. +static int Cyberfb_Cyber16 = 0;       /* Use Cybervision board */
  1506. +static int Cyberfb_mode = 0;
  1507. +
  1508. +
  1509. +   /*
  1510. +    *    Some default modes
  1511. +    */
  1512. +
  1513. +#define CYBER8_DEFMODE     (1)
  1514. +#define CYBER16_DEFMODE    (2)
  1515. +
  1516. +
  1517. +   /*
  1518. +    *    Interface used by the world
  1519. +    */
  1520. +
  1521. +int Cyber_probe(void);
  1522. +void Cyber_video_setup(char *options, int *ints);
  1523. +
  1524. +static int Cyber_fb_get_fix(struct fb_fix_screeninfo *fix, int con);
  1525. +static int Cyber_fb_get_var(struct fb_var_screeninfo *var, int con);
  1526. +static int Cyber_fb_set_var(struct fb_var_screeninfo *var, int con);
  1527. +static int Cyber_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con);
  1528. +static int Cyber_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con);
  1529. +static int Cyber_fb_pan_display(struct fb_var_screeninfo *var, int con);
  1530. +static int Cyber_fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
  1531. +                          u_long arg, int con);
  1532. +
  1533. +
  1534. +   /*
  1535. +    *    Interface to the low level console driver
  1536. +    */
  1537. +
  1538. +struct fb_info *Cyber_fb_init(long *mem_start); /* Through amiga_fb_init() */
  1539. +static int Cyberfb_switch(int con);
  1540. +static int Cyberfb_updatevar(int con);
  1541. +static void Cyberfb_blank(int blank);
  1542. +
  1543. +
  1544. +   /*
  1545. +    *    Accelerated Functions used by the low level console driver
  1546. +    */
  1547. +
  1548. +void Cyber_WaitQueue(u_short fifo);
  1549. +void Cyber_WaitBlit(void);
  1550. +void Cyber_BitBLT(u_short curx, u_short cury, u_short destx, u_short desty,
  1551. +                  u_short width, u_short height, u_short mode);
  1552. +void Cyber_RectFill(u_short x, u_short y, u_short width, u_short height,
  1553. +                    u_short mode, u_short color);
  1554. +void Cyber_MoveCursor(u_short x, u_short y);
  1555. +
  1556. +
  1557. +   /*
  1558. +    *   Hardware Specific Routines
  1559. +    */
  1560. +
  1561. +static int Cyber_init(void);
  1562. +static int Cyber_encode_fix(struct fb_fix_screeninfo *fix,
  1563. +                          struct Cyber_fb_par *par);
  1564. +static int Cyber_decode_var(struct fb_var_screeninfo *var,
  1565. +                          struct Cyber_fb_par *par);
  1566. +static int Cyber_encode_var(struct fb_var_screeninfo *var,
  1567. +                          struct Cyber_fb_par *par);
  1568. +static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
  1569. +                         u_int *transp);
  1570. +static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
  1571. +                         u_int transp);
  1572. +static void Cyber_blank(int blank);
  1573. +
  1574. +
  1575. +   /*
  1576. +    *    Internal routines
  1577. +    */
  1578. +
  1579. +static void Cyber_fb_get_par(struct Cyber_fb_par *par);
  1580. +static void Cyber_fb_set_par(struct Cyber_fb_par *par);
  1581. +static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive);
  1582. +static struct fb_cmap *get_default_colormap(int bpp);
  1583. +static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
  1584. +                          int kspc);
  1585. +static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
  1586. +                          int kspc);
  1587. +static void do_install_cmap(int con);
  1588. +static void memcpy_fs(int fsfromto, void *to, void *from, int len);
  1589. +static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto);
  1590. +static int alloc_cmap(struct fb_cmap *cmap, int len, int transp);
  1591. +static void Cyber_fb_set_disp(int con);
  1592. +static int get_video_mode(const char *name);
  1593. +
  1594. +
  1595. +/* -------------------- Hardware specific routines -------------------------- */
  1596. +
  1597. +
  1598. +   /*
  1599. +    *    Initialization
  1600. +    *
  1601. +    *    Set the default video mode for this chipset. If a video mode was
  1602. +    *    specified on the command line, it will override the default mode.
  1603. +    */
  1604. +
  1605. +static int Cyber_init(void)
  1606. +{
  1607. +int i;
  1608. +char size;
  1609. +volatile u_long *CursorBase;
  1610. +unsigned long board_addr;
  1611. +struct ConfigDev *cd;
  1612. +
  1613. +if (Cyberfb_mode == -1)
  1614. +  {
  1615. +  if (Cyberfb_Cyber8)
  1616. +    Cyberfb_mode = CYBER8_DEFMODE;
  1617. +  else
  1618. +    Cyberfb_mode = CYBER16_DEFMODE;
  1619. +  }
  1620. +
  1621. +cd = zorro_get_board (CyberKey);
  1622. +zorro_config_board (CyberKey, 0);
  1623. +board_addr = (unsigned long)cd->cd_BoardAddr;
  1624. +
  1625. +for (i = 0; i < 256; i++)
  1626. +
  1627. +for (i = 0; i < 256; i++)
  1628. +  {
  1629. +  Cyber_colour_table [i][0] = i;
  1630. +  Cyber_colour_table [i][1] = i;
  1631. +  Cyber_colour_table [i][2] = i;
  1632. +  Cyber_colour_table [i][3] = 0;
  1633. +  }
  1634. +
  1635. +*memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
  1636. +CyberMem = kernel_map (board_addr + 0x01400000, 0x00400000,
  1637. +                       KERNELMAP_NOCACHE_SER, memstart);
  1638. +
  1639. +if (Cyberfb_Cyber8)
  1640. +  memset ((char*)CyberMem, 0, CYBER8_WIDTH * CYBER8_HEIGHT);
  1641. +else
  1642. +  memset ((char*)CyberMem, 0, CYBER16_WIDTH * CYBER16_HEIGHT);
  1643. +
  1644. +CyberRegs = (char*) kernel_map (board_addr + 0x02000000, 0xf000,
  1645. +                                KERNELMAP_NOCACHE_SER, memstart);
  1646. +
  1647. +/* Disable hardware cursor */
  1648. +*(CyberRegs + S3_CRTC_ADR)  = S3_REG_LOCK2;
  1649. +*(CyberRegs + S3_CRTC_DATA) = 0xa0;
  1650. +*(CyberRegs + S3_CRTC_ADR)  = S3_HGC_MODE;
  1651. +*(CyberRegs + S3_CRTC_DATA) = 0x00;
  1652. +*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_DX;
  1653. +*(CyberRegs + S3_CRTC_DATA) = 0x00;
  1654. +*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_DY;
  1655. +*(CyberRegs + S3_CRTC_DATA) = 0x00;
  1656. +
  1657. +/* Set clipping rectangle to current screen size */
  1658. +*((u_short volatile *)(CyberRegs + 0xbee8)) = 0x1000;
  1659. +*((u_short volatile *)(CyberRegs + 0xbee8)) = 0x2000;
  1660. +if (Cyberfb_Cyber8)
  1661. +  {
  1662. +  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x3000 | (CYBER8_HEIGHT - 1);
  1663. +  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x4000 | (CYBER8_WIDTH - 1);
  1664. +  }
  1665. +else
  1666. +  {
  1667. +  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x3000 | (CYBER16_HEIGHT - 1);
  1668. +  *((u_short volatile *)(CyberRegs + 0xbee8)) = 0x4000 | (CYBER16_WIDTH - 1);
  1669. +  }
  1670. +
  1671. +/* Get memory size (if not 2MB it is 4MB) */
  1672. +*(CyberRegs + S3_CRTC_ADR) = S3_LAW_CTL;
  1673. +size = *(CyberRegs + S3_CRTC_DATA);
  1674. +if ((size & 0x03) == 0x02)
  1675. +  CyberSize = 0x00200000; /* 2 MB */
  1676. +else
  1677. +  CyberSize = 0x00400000; /* 4 MB */
  1678. +
  1679. +/* Initialize hardware cursor */
  1680. +CursorBase = (u_long *)((char *)(CyberMem) + CyberSize - 0x400);
  1681. +for (i=0; i < 8; i++)
  1682. +  {
  1683. +  *(CursorBase  +(i*4)) = 0xffffff00;
  1684. +  *(CursorBase+1+(i*4)) = 0xffff0000;
  1685. +  *(CursorBase+2+(i*4)) = 0xffff0000;
  1686. +  *(CursorBase+3+(i*4)) = 0xffff0000;
  1687. +  }
  1688. +for (i=8; i < 64; i++)
  1689. +  {
  1690. +  *(CursorBase  +(i*4)) = 0xffff0000;
  1691. +  *(CursorBase+1+(i*4)) = 0xffff0000;
  1692. +  *(CursorBase+2+(i*4)) = 0xffff0000;
  1693. +  *(CursorBase+3+(i*4)) = 0xffff0000;
  1694. +  }
  1695. +
  1696. +Cyber_setcolreg (255, 56, 100, 160, 0);
  1697. +Cyber_setcolreg (254, 0, 0, 0, 0);
  1698. +
  1699. +return (0);
  1700. +}
  1701. +
  1702. +
  1703. +   /*
  1704. +    *    This function should fill in the `fix' structure based on the
  1705. +    *    values in the `par' structure.
  1706. +    */
  1707. +
  1708. +static int Cyber_encode_fix(struct fb_fix_screeninfo *fix,
  1709. +                          struct Cyber_fb_par *par)
  1710. +{
  1711. +   int i;
  1712. +
  1713. +   strcpy(fix->id, Cyber_fb_name);
  1714. +   fix->smem_start = CyberMem;
  1715. +   fix->smem_len = CyberSize;
  1716. +
  1717. +   fix->type = FB_TYPE_PACKED_PIXELS;
  1718. +   fix->type_aux = 0;
  1719. +   if (par->bpp == 8)
  1720. +      fix->visual = FB_VISUAL_PSEUDOCOLOR;
  1721. +   else
  1722. +      fix->visual = FB_VISUAL_DIRECTCOLOR;
  1723. +
  1724. +   fix->xpanstep = 0;
  1725. +   fix->ypanstep = 0;
  1726. +   fix->ywrapstep = 0;
  1727. +
  1728. +   for (i = 0; i < arraysize(fix->reserved); i++)
  1729. +      fix->reserved[i] = 0;
  1730. +
  1731. +   return(0);
  1732. +}
  1733. +
  1734. +
  1735. +   /*
  1736. +    *    Get the video params out of `var'. If a value doesn't fit, round
  1737. +    *    it up, if it's too big, return -EINVAL.
  1738. +    */
  1739. +
  1740. +static int Cyber_decode_var(struct fb_var_screeninfo *var,
  1741. +                          struct Cyber_fb_par *par)
  1742. +{
  1743. +   if (Cyberfb_Cyber8) {
  1744. +      par->xres = CYBER8_WIDTH;
  1745. +      par->yres = CYBER8_HEIGHT;
  1746. +      par->bpp = 8;
  1747. +   } else {
  1748. +      par->xres = CYBER16_WIDTH;
  1749. +      par->yres = CYBER16_HEIGHT;
  1750. +      par->bpp = 16;
  1751. +   }
  1752. +   return(0);
  1753. +}
  1754. +
  1755. +
  1756. +   /*
  1757. +    *    Fill the `var' structure based on the values in `par' and maybe
  1758. +    *    other values read out of the hardware.
  1759. +    */
  1760. +
  1761. +static int Cyber_encode_var(struct fb_var_screeninfo *var,
  1762. +                          struct Cyber_fb_par *par)
  1763. +{
  1764. +   int i;
  1765. +
  1766. +   var->xres = par->xres;
  1767. +   var->yres = par->yres;
  1768. +   var->xres_virtual = par->xres;
  1769. +   var->yres_virtual = par->yres;
  1770. +   var->xoffset = 0;
  1771. +   var->yoffset = 0;
  1772. +
  1773. +   var->bits_per_pixel = par->bpp;
  1774. +   var->grayscale = 0;
  1775. +
  1776. +   if (par->bpp == 8) {
  1777. +      var->red.offset = 0;
  1778. +      var->red.length = 8;
  1779. +      var->red.msb_right = 0;
  1780. +      var->blue = var->green = var->red;
  1781. +   } else {
  1782. +      var->red.offset = 11;
  1783. +      var->red.length = 5;
  1784. +      var->red.msb_right = 0;
  1785. +      var->green.offset = 5;
  1786. +      var->green.length = 6;
  1787. +      var->green.msb_right = 0;
  1788. +      var->blue.offset = 0;
  1789. +      var->blue.length = 5;
  1790. +      var->blue.msb_right = 0;
  1791. +   }
  1792. +   var->transp.offset = 0;
  1793. +   var->transp.length = 0;
  1794. +   var->transp.msb_right = 0;
  1795. +
  1796. +   var->nonstd = 0;
  1797. +   var->activate = 0;
  1798. +
  1799. +   var->height = -1;
  1800. +   var->width = -1;
  1801. +   var->accel = FB_ACCEL_CYBERVISION;
  1802. +   var->vmode = FB_VMODE_NONINTERLACED;
  1803. +
  1804. +   /* Dummy values */
  1805. +
  1806. +   if (par->bpp == 8)
  1807. +      var->pixclock = CYBER8_PIXCLOCK;
  1808. +   else
  1809. +      var->pixclock = CYBER16_PIXCLOCK;
  1810. +   var->sync = 0;
  1811. +   var->left_margin = 64;
  1812. +   var->right_margin = 96;
  1813. +   var->upper_margin = 35;
  1814. +   var->lower_margin = 12;
  1815. +   var->hsync_len = 112;
  1816. +   var->vsync_len = 2;
  1817. +
  1818. +   for (i = 0; i < arraysize(var->reserved); i++)
  1819. +      var->reserved[i] = 0;
  1820. +
  1821. +   return(0);
  1822. +}
  1823. +
  1824. +
  1825. +   /*
  1826. +    *    Set a single color register. The values supplied are already
  1827. +    *    rounded down to the hardware's capabilities (according to the
  1828. +    *    entries in the var structure). Return != 0 for invalid regno.
  1829. +    */
  1830. +
  1831. +static int Cyber_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
  1832. +                         u_int transp)
  1833. +{
  1834. +if (regno > 255)
  1835. +  return (1);
  1836. +
  1837. +*(CyberRegs + 0x3c8) = (char)regno;
  1838. +Cyber_colour_table [regno][0] = red & 0xff;
  1839. +Cyber_colour_table [regno][1] = green & 0xff;
  1840. +Cyber_colour_table [regno][2] = blue & 0xff;
  1841. +Cyber_colour_table [regno][3] = transp;
  1842. +
  1843. +*(CyberRegs + 0x3c9) = (red & 0xff) >> 2;
  1844. +*(CyberRegs + 0x3c9) = (green & 0xff) >> 2;
  1845. +*(CyberRegs + 0x3c9) = (blue & 0xff) >> 2;
  1846. +
  1847. +return (0);
  1848. +}
  1849. +
  1850. +
  1851. +   /*
  1852. +    *    Read a single color register and split it into
  1853. +    *    colors/transparent. Return != 0 for invalid regno.
  1854. +    */
  1855. +
  1856. +static int Cyber_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
  1857. +                         u_int *transp)
  1858. +{
  1859. +if (regno >= 256)
  1860. +  return (1);
  1861. +*red    = Cyber_colour_table [regno][0];
  1862. +*green  = Cyber_colour_table [regno][1];
  1863. +*blue   = Cyber_colour_table [regno][2];
  1864. +*transp = Cyber_colour_table [regno][3];
  1865. +return (0);
  1866. +}
  1867. +
  1868. +
  1869. +   /*
  1870. +    *    (Unb)Blank the screen
  1871. +    */
  1872. +
  1873. +void Cyber_blank(int blank)
  1874. +{
  1875. +int i;
  1876. +
  1877. +if (blank)
  1878. +  for (i = 0; i < 256; i++)
  1879. +    {
  1880. +    *(CyberRegs + 0x3c8) = i;
  1881. +    *(CyberRegs + 0x3c9) = 0;
  1882. +    *(CyberRegs + 0x3c9) = 0;
  1883. +    *(CyberRegs + 0x3c9) = 0;
  1884. +    }
  1885. +else
  1886. +  for (i = 0; i < 256; i++)
  1887. +    {
  1888. +    *(CyberRegs + 0x3c8) = i;
  1889. +    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][0] >> 2;
  1890. +    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][1] >> 2;
  1891. +    *(CyberRegs + 0x3c9) = Cyber_colour_table [i][2] >> 2;
  1892. +    }
  1893. +}
  1894. +
  1895. +
  1896. +/**************************************************************
  1897. + * We are waiting for "fifo" FIFO-slots empty
  1898. + */
  1899. +void Cyber_WaitQueue (u_short fifo)
  1900. +{
  1901. +u_short status;
  1902. +
  1903. +do
  1904. +  {
  1905. +  status = *((u_short volatile *)(CyberRegs + S3_GP_STAT));
  1906. +  }
  1907. +while (status & fifo);
  1908. +}
  1909. +
  1910. +/**************************************************************
  1911. + * We are waiting for Hardware (Graphics Engine) not busy
  1912. + */
  1913. +void Cyber_WaitBlit (void)
  1914. +{
  1915. +u_short status;
  1916. +
  1917. +do
  1918. +  {
  1919. +  status = *((u_short volatile *)(CyberRegs + S3_GP_STAT));
  1920. +  }
  1921. +while (status & S3_HDW_BUSY);
  1922. +}
  1923. +
  1924. +/**************************************************************
  1925. + * BitBLT - Through the Plane
  1926. + */
  1927. +void Cyber_BitBLT (u_short curx, u_short cury, u_short destx, u_short desty,
  1928. +                   u_short width, u_short height, u_short mode)
  1929. +{
  1930. +u_short blitcmd = S3_BITBLT;
  1931. +
  1932. +/* Set drawing direction */
  1933. +/* -Y, X maj, -X (default) */
  1934. +if (curx > destx)
  1935. +  blitcmd |= 0x0020;  /* Drawing direction +X */
  1936. +else
  1937. +  {
  1938. +  curx  += (width - 1);
  1939. +  destx += (width - 1);
  1940. +  }
  1941. +
  1942. +if (cury > desty)
  1943. +  blitcmd |= 0x0080;  /* Drawing direction +Y */
  1944. +else
  1945. +  {
  1946. +  cury  += (height - 1);
  1947. +  desty += (height - 1);
  1948. +  }
  1949. +
  1950. +Cyber_WaitQueue (0x8000);
  1951. +
  1952. +*((u_short volatile *)(CyberRegs + S3_PIXEL_CNTL)) = 0xa000;
  1953. +*((u_short volatile *)(CyberRegs + S3_FRGD_MIX)) = (0x0060 | mode);
  1954. +
  1955. +*((u_short volatile *)(CyberRegs + S3_CUR_X)) = curx;
  1956. +*((u_short volatile *)(CyberRegs + S3_CUR_Y)) = cury;
  1957. +
  1958. +*((u_short volatile *)(CyberRegs + S3_DESTX_DIASTP)) = destx;
  1959. +*((u_short volatile *)(CyberRegs + S3_DESTY_AXSTP)) = desty;
  1960. +
  1961. +*((u_short volatile *)(CyberRegs + S3_MIN_AXIS_PCNT)) = height - 1;
  1962. +*((u_short volatile *)(CyberRegs + S3_MAJ_AXIS_PCNT)) = width  - 1;
  1963. +
  1964. +*((u_short volatile *)(CyberRegs + S3_CMD)) = blitcmd;
  1965. +}
  1966. +
  1967. +/**************************************************************
  1968. + * Rectange Fill Solid
  1969. + */
  1970. +void Cyber_RectFill (u_short x, u_short y, u_short width, u_short height,
  1971. +                     u_short mode, u_short color)
  1972. +{
  1973. +u_short blitcmd = S3_FILLEDRECT;
  1974. +
  1975. +Cyber_WaitQueue (0x8000);
  1976. +
  1977. +*((u_short volatile *)(CyberRegs + S3_PIXEL_CNTL)) = 0xa000;
  1978. +*((u_short volatile *)(CyberRegs + S3_FRGD_MIX)) = (0x0020 | mode);
  1979. +
  1980. +*((u_short volatile *)(CyberRegs + S3_MULT_MISC)) = 0xe000;
  1981. +*((u_short volatile *)(CyberRegs + S3_FRGD_COLOR)) = color;
  1982. +
  1983. +*((u_short volatile *)(CyberRegs + S3_CUR_X)) = x;
  1984. +*((u_short volatile *)(CyberRegs + S3_CUR_Y)) = y;
  1985. +
  1986. +*((u_short volatile *)(CyberRegs + S3_MIN_AXIS_PCNT)) = height - 1;
  1987. +*((u_short volatile *)(CyberRegs + S3_MAJ_AXIS_PCNT)) = width  - 1;
  1988. +
  1989. +*((u_short volatile *)(CyberRegs + S3_CMD)) = blitcmd;
  1990. +}
  1991. +
  1992. +
  1993. +/**************************************************************
  1994. + * Move cursor to x, y
  1995. + */
  1996. +void Cyber_MoveCursor (u_short x, u_short y)
  1997. +{
  1998. +*(CyberRegs + S3_CRTC_ADR)  = 0x39;
  1999. +*(CyberRegs + S3_CRTC_DATA) = 0xa0;
  2000. +
  2001. +*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGX_H;
  2002. +*(CyberRegs + S3_CRTC_DATA) = (char)((x & 0x0700) >> 8);
  2003. +*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGX_L;
  2004. +*(CyberRegs + S3_CRTC_DATA) = (char)(x & 0x00ff);
  2005. +
  2006. +*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGY_H;
  2007. +*(CyberRegs + S3_CRTC_DATA) = (char)((y & 0x0700) >> 8);
  2008. +*(CyberRegs + S3_CRTC_ADR)  = S3_HWGC_ORGY_L;
  2009. +*(CyberRegs + S3_CRTC_DATA) = (char)(y & 0x00ff);
  2010. +}
  2011. +
  2012. +
  2013. +/* -------------------- Interfaces to hardware functions -------------------- */
  2014. +
  2015. +
  2016. +static struct fb_hwswitch Cyber_switch = {
  2017. +   Cyber_init, Cyber_encode_fix, Cyber_decode_var, Cyber_encode_var,
  2018. +   Cyber_getcolreg, Cyber_setcolreg, Cyber_blank
  2019. +};
  2020. +
  2021. +
  2022. +/* -------------------- Generic routines ------------------------------------ */
  2023. +
  2024. +
  2025. +   /*
  2026. +    *    Fill the hardware's `par' structure.
  2027. +    */
  2028. +
  2029. +static void Cyber_fb_get_par(struct Cyber_fb_par *par)
  2030. +{
  2031. +   if (current_par_valid)
  2032. +      *par = current_par;
  2033. +   else
  2034. +      fbhw->decode_var(&Cyber_fb_predefined[Cyberfb_mode], par);
  2035. +}
  2036. +
  2037. +
  2038. +static void Cyber_fb_set_par(struct Cyber_fb_par *par)
  2039. +{
  2040. +   current_par = *par;
  2041. +   current_par_valid = 1;
  2042. +}
  2043. +
  2044. +
  2045. +static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
  2046. +{
  2047. +   int err, activate;
  2048. +   struct Cyber_fb_par par;
  2049. +
  2050. +   if ((err = fbhw->decode_var(var, &par)))
  2051. +      return(err);
  2052. +   activate = var->activate;
  2053. +   if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW && isactive)
  2054. +      Cyber_fb_set_par(&par);
  2055. +   fbhw->encode_var(var, &par);
  2056. +   var->activate = activate;
  2057. +   return(0);
  2058. +}
  2059. +
  2060. +
  2061. +   /*
  2062. +    *    Default Colormaps
  2063. +    */
  2064. +
  2065. +static u_short red16[] =
  2066. +   { 0xc000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0x0000,
  2067. +     0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff};
  2068. +static u_short green16[] =
  2069. +   { 0xc000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0x0000,
  2070. +     0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff};
  2071. +static u_short blue16[] =
  2072. +   { 0xc000, 0x0000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0x0000,
  2073. +     0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff};
  2074. +
  2075. +
  2076. +static struct fb_cmap default_16_colors =
  2077. +   { 0, 16, red16, green16, blue16, NULL };
  2078. +
  2079. +
  2080. +static struct fb_cmap *get_default_colormap(int bpp)
  2081. +{
  2082. +   return(&default_16_colors);
  2083. +}
  2084. +
  2085. +
  2086. +#define CNVT_TOHW(val,width)     ((((val)<<(width))+0x7fff-(val))>>16)
  2087. +#define CNVT_FROMHW(val,width)   (((width) ? ((((val)<<16)-(val)) / \
  2088. +                                              ((1<<(width))-1)) : 0))
  2089. +
  2090. +static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
  2091. +                          int kspc)
  2092. +{
  2093. +   int i, start;
  2094. +   u_short *red, *green, *blue, *transp;
  2095. +   u_int hred, hgreen, hblue, htransp;
  2096. +
  2097. +   red = cmap->red;
  2098. +   green = cmap->green;
  2099. +   blue = cmap->blue;
  2100. +   transp = cmap->transp;
  2101. +   start = cmap->start;
  2102. +   if (start < 0)
  2103. +      return(-EINVAL);
  2104. +   for (i = 0; i < cmap->len; i++) {
  2105. +      if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp))
  2106. +         return(0);
  2107. +      hred = CNVT_FROMHW(hred, var->red.length);
  2108. +      hgreen = CNVT_FROMHW(hgreen, var->green.length);
  2109. +      hblue = CNVT_FROMHW(hblue, var->blue.length);
  2110. +      htransp = CNVT_FROMHW(htransp, var->transp.length);
  2111. +      if (kspc) {
  2112. +         *red = hred;
  2113. +         *green = hgreen;
  2114. +         *blue = hblue;
  2115. +         if (transp)
  2116. +            *transp = htransp;
  2117. +      } else {
  2118. +         put_fs_word(hred, red);
  2119. +         put_fs_word(hgreen, green);
  2120. +         put_fs_word(hblue, blue);
  2121. +         if (transp)
  2122. +            put_fs_word(htransp, transp);
  2123. +      }
  2124. +      red++;
  2125. +      green++;
  2126. +      blue++;
  2127. +      if (transp)
  2128. +         transp++;
  2129. +   }
  2130. +   return(0);
  2131. +}
  2132. +
  2133. +
  2134. +static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var,
  2135. +                          int kspc)
  2136. +{
  2137. +   int i, start;
  2138. +   u_short *red, *green, *blue, *transp;
  2139. +   u_int hred, hgreen, hblue, htransp;
  2140. +
  2141. +   red = cmap->red;
  2142. +   green = cmap->green;
  2143. +   blue = cmap->blue;
  2144. +   transp = cmap->transp;
  2145. +   start = cmap->start;
  2146. +
  2147. +   if (start < 0)
  2148. +      return(-EINVAL);
  2149. +   for (i = 0; i < cmap->len; i++) {
  2150. +      if (kspc) {
  2151. +         hred = *red;
  2152. +         hgreen = *green;
  2153. +         hblue = *blue;
  2154. +         htransp = transp ? *transp : 0;
  2155. +      } else {
  2156. +         hred = get_fs_word(red);
  2157. +         hgreen = get_fs_word(green);
  2158. +         hblue = get_fs_word(blue);
  2159. +         htransp = transp ? get_fs_word(transp) : 0;
  2160. +      }
  2161. +      hred = CNVT_TOHW(hred, var->red.length);
  2162. +      hgreen = CNVT_TOHW(hgreen, var->green.length);
  2163. +      hblue = CNVT_TOHW(hblue, var->blue.length);
  2164. +      htransp = CNVT_TOHW(htransp, var->transp.length);
  2165. +      red++;
  2166. +      green++;
  2167. +      blue++;
  2168. +      if (transp)
  2169. +         transp++;
  2170. +      if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp))
  2171. +         return(0);
  2172. +   }
  2173. +   return(0);
  2174. +}
  2175. +
  2176. +
  2177. +static void do_install_cmap(int con)
  2178. +{
  2179. +   if (con != currcon)
  2180. +      return;
  2181. +   if (disp[con].cmap.len)
  2182. +      do_fb_set_cmap(&disp[con].cmap, &disp[con].var, 1);
  2183. +   else
  2184. +      do_fb_set_cmap(get_default_colormap(disp[con].var.bits_per_pixel),
  2185. +                                          &disp[con].var, 1);
  2186. +}
  2187. +
  2188. +
  2189. +static void memcpy_fs(int fsfromto, void *to, void *from, int len)
  2190. +{
  2191. +   switch (fsfromto) {
  2192. +      case 0:
  2193. +         memcpy(to, from, len);
  2194. +         return;
  2195. +      case 1:
  2196. +         memcpy_fromfs(to, from, len);
  2197. +         return;
  2198. +      case 2:
  2199. +         memcpy_tofs(to, from, len);
  2200. +         return;
  2201. +   }
  2202. +}
  2203. +
  2204. +
  2205. +static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
  2206. +{
  2207. +   int size;
  2208. +   int tooff = 0, fromoff = 0;
  2209. +
  2210. +   if (to->start > from->start)
  2211. +      fromoff = to->start-from->start;
  2212. +   else
  2213. +      tooff = from->start-to->start;
  2214. +   size = to->len-tooff;
  2215. +   if (size > from->len-fromoff)
  2216. +      size = from->len-fromoff;
  2217. +   if (size < 0)
  2218. +      return;
  2219. +   size *= sizeof(u_short);
  2220. +   memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size);
  2221. +   memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size);
  2222. +   memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size);
  2223. +   if (from->transp && to->transp)
  2224. +      memcpy_fs(fsfromto, to->transp+tooff, from->transp+fromoff, size);
  2225. +}
  2226. +
  2227. +
  2228. +static int alloc_cmap(struct fb_cmap *cmap, int len, int transp)
  2229. +{
  2230. +   int size = len*sizeof(u_short);
  2231. +
  2232. +   if (cmap->len != len) {
  2233. +      if (cmap->red)
  2234. +         kfree(cmap->red);
  2235. +      if (cmap->green)
  2236. +         kfree(cmap->green);
  2237. +      if (cmap->blue)
  2238. +         kfree(cmap->blue);
  2239. +      if (cmap->transp)
  2240. +         kfree(cmap->transp);
  2241. +      cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
  2242. +      cmap->len = 0;
  2243. +      if (!len)
  2244. +         return(0);
  2245. +      if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
  2246. +         return(-1);
  2247. +      if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
  2248. +         return(-1);
  2249. +      if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
  2250. +         return(-1);
  2251. +      if (transp) {
  2252. +         if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
  2253. +            return(-1);
  2254. +      } else
  2255. +         cmap->transp = NULL;
  2256. +   }
  2257. +   cmap->start = 0;
  2258. +   cmap->len = len;
  2259. +   copy_cmap(get_default_colormap(len), cmap, 0);
  2260. +   return(0);
  2261. +}
  2262. +
  2263. +
  2264. +   /*
  2265. +    *    Get the Fixed Part of the Display
  2266. +    */
  2267. +
  2268. +static int Cyber_fb_get_fix(struct fb_fix_screeninfo *fix, int con)
  2269. +{
  2270. +   struct Cyber_fb_par par;
  2271. +   int error = 0;
  2272. +
  2273. +   if (con == -1)
  2274. +      Cyber_fb_get_par(&par);
  2275. +   else
  2276. +      error = fbhw->decode_var(&disp[con].var, &par);
  2277. +   return(error ? error : fbhw->encode_fix(fix, &par));
  2278. +}
  2279. +
  2280. +
  2281. +   /*
  2282. +    *    Get the User Defined Part of the Display
  2283. +    */
  2284. +
  2285. +static int Cyber_fb_get_var(struct fb_var_screeninfo *var, int con)
  2286. +{
  2287. +   struct Cyber_fb_par par;
  2288. +   int error = 0;
  2289. +
  2290. +   if (con == -1) {
  2291. +      Cyber_fb_get_par(&par);
  2292. +      error = fbhw->encode_var(var, &par);
  2293. +   } else
  2294. +      *var = disp[con].var;
  2295. +   return(error);
  2296. +}
  2297. +
  2298. +
  2299. +static void Cyber_fb_set_disp(int con)
  2300. +{
  2301. +   struct fb_fix_screeninfo fix;
  2302. +
  2303. +   Cyber_fb_get_fix(&fix, con);
  2304. +   if (con == -1)
  2305. +      con = 0;
  2306. +   disp[con].screen_base = (u_char *)fix.smem_start;
  2307. +   disp[con].visual = fix.visual;
  2308. +   disp[con].type = fix.type;
  2309. +   disp[con].type_aux = fix.type_aux;
  2310. +   disp[con].ypanstep = fix.ypanstep;
  2311. +   disp[con].ywrapstep = fix.ywrapstep;
  2312. +   disp[con].can_soft_blank = 1;
  2313. +   disp[con].inverse = Cyberfb_inverse;
  2314. +}
  2315. +
  2316. +
  2317. +   /*
  2318. +    *    Set the User Defined Part of the Display
  2319. +    */
  2320. +
  2321. +static int Cyber_fb_set_var(struct fb_var_screeninfo *var, int con)
  2322. +{
  2323. +   int err, oldxres, oldyres, oldvxres, oldvyres, oldbpp;
  2324. +
  2325. +   if ((err = do_fb_set_var(var, con == currcon)))
  2326. +      return(err);
  2327. +   if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
  2328. +      oldxres = disp[con].var.xres;
  2329. +      oldyres = disp[con].var.yres;
  2330. +      oldvxres = disp[con].var.xres_virtual;
  2331. +      oldvyres = disp[con].var.yres_virtual;
  2332. +      oldbpp = disp[con].var.bits_per_pixel;
  2333. +      disp[con].var = *var;
  2334. +      if (oldxres != var->xres || oldyres != var->yres ||
  2335. +          oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
  2336. +          oldbpp != var->bits_per_pixel) {
  2337. +         Cyber_fb_set_disp(con);
  2338. +         (*fb_info.changevar)(con);
  2339. +         alloc_cmap(&disp[con].cmap, 0, 0);
  2340. +         do_install_cmap(con);
  2341. +      }
  2342. +   }
  2343. +   var->activate = 0;
  2344. +   return(0);
  2345. +}
  2346. +
  2347. +
  2348. +   /*
  2349. +    *    Get the Colormap
  2350. +    */
  2351. +
  2352. +static int Cyber_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con)
  2353. +{
  2354. +   if (con == currcon) /* current console? */
  2355. +      return(do_fb_get_cmap(cmap, &disp[con].var, kspc));
  2356. +   else if (disp[con].cmap.len) /* non default colormap? */
  2357. +      copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2);
  2358. +   else
  2359. +      copy_cmap(get_default_colormap(disp[con].var.bits_per_pixel), cmap,
  2360. +                kspc ? 0 : 2);
  2361. +   return(0);
  2362. +}
  2363. +
  2364. +
  2365. +   /*
  2366. +    *    Set the Colormap
  2367. +    */
  2368. +
  2369. +static int Cyber_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con)
  2370. +{
  2371. +   int err;
  2372. +
  2373. +   if (!disp[con].cmap.len) {       /* no colormap allocated? */
  2374. +      if ((err = alloc_cmap(&disp[con].cmap, 1<<disp[con].var.bits_per_pixel,
  2375. +                            0)))
  2376. +         return(err);
  2377. +   }
  2378. +   if (con == currcon)              /* current console? */
  2379. +      return(do_fb_set_cmap(cmap, &disp[con].var, kspc));
  2380. +   else
  2381. +      copy_cmap(cmap, &disp[con].cmap, kspc ? 0 : 1);
  2382. +   return(0);
  2383. +}
  2384. +
  2385. +
  2386. +   /*
  2387. +    *    Pan or Wrap the Display
  2388. +    *
  2389. +    *    This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
  2390. +    */
  2391. +
  2392. +static int Cyber_fb_pan_display(struct fb_var_screeninfo *var, int con)
  2393. +{
  2394. +   return(-EINVAL);
  2395. +}
  2396. +
  2397. +
  2398. +   /*
  2399. +    *    Cybervision Frame Buffer Specific ioctls
  2400. +    */
  2401. +
  2402. +static int Cyber_fb_ioctl(struct inode *inode, struct file *file,
  2403. +                          u_int cmd, u_long arg, int con)
  2404. +{
  2405. +   return(-EINVAL);
  2406. +}
  2407. +
  2408. +
  2409. +static struct fb_ops Cyber_fb_ops = {
  2410. +   Cyber_fb_get_fix, Cyber_fb_get_var, Cyber_fb_set_var, Cyber_fb_get_cmap,
  2411. +   Cyber_fb_set_cmap, Cyber_fb_pan_display, Cyber_fb_ioctl
  2412. +};
  2413. +
  2414. +
  2415. +int Cyber_probe(void)
  2416. +{
  2417. +   CyberKey = zorro_find(MANUF_PHASE5, PROD_CYBERVISION, 0, 0);
  2418. +   return(CyberKey);
  2419. +}
  2420. +
  2421. +
  2422. +void Cyber_video_setup(char *options, int *ints)
  2423. +{
  2424. +   char *this_opt;
  2425. +   int i;
  2426. +
  2427. +   fb_info.fontname[0] = '\0';
  2428. +
  2429. +   if (!options || !*options)
  2430. +      return;
  2431. +
  2432. +   for (this_opt = strtok(options, ","); this_opt; this_opt = strtok(NULL, ","))
  2433. +      if (!strcmp(this_opt, "inverse")) {
  2434. +         Cyberfb_inverse = 1;
  2435. +         for (i = 0; i < 16; i++) {
  2436. +            red16[i] = ~red16[i];
  2437. +            green16[i] = ~green16[i];
  2438. +            blue16[i] = ~blue16[i];
  2439. +         }
  2440. +      } else if (!strncmp(this_opt, "font:", 5))
  2441. +         strcpy(fb_info.fontname, this_opt+5);
  2442. +      else if (!strcmp (this_opt, "cyber8"))
  2443. +         Cyberfb_Cyber8 = 1;
  2444. +      else if (!strcmp (this_opt, "cyber16"))
  2445. +         Cyberfb_Cyber16 = 1;
  2446. +      else
  2447. +         Cyberfb_mode = get_video_mode(this_opt);
  2448. +}
  2449. +
  2450. +
  2451. +   /*
  2452. +    *    Initialization
  2453. +    */
  2454. +
  2455. +struct fb_info *Cyber_fb_init(long *mem_start)
  2456. +{
  2457. +   int err;
  2458. +   struct Cyber_fb_par par;
  2459. +
  2460. +   memstart = mem_start;
  2461. +
  2462. +   fbhw = &Cyber_switch;
  2463. +
  2464. +   err = register_framebuffer(Cyber_fb_name, &node, &Cyber_fb_ops,
  2465. +                              NUM_TOTAL_MODES, Cyber_fb_predefined);
  2466. +   if (err < 0)
  2467. +      panic("Cannot register frame buffer\n");
  2468. +
  2469. +   fbhw->init();
  2470. +   fbhw->decode_var(&Cyber_fb_predefined[Cyberfb_mode], &par);
  2471. +   fbhw->encode_var(&Cyber_fb_predefined[0], &par);
  2472. +
  2473. +   strcpy(fb_info.modename, Cyber_fb_name);
  2474. +   fb_info.disp = disp;
  2475. +   fb_info.switch_con = &Cyberfb_switch;
  2476. +   fb_info.updatevar = &Cyberfb_updatevar;
  2477. +   fb_info.blank = &Cyberfb_blank;
  2478. +
  2479. +   do_fb_set_var(&Cyber_fb_predefined[0], 1);
  2480. +   Cyber_fb_get_var(&disp[0].var, -1);
  2481. +   Cyber_fb_set_disp(-1);
  2482. +   do_install_cmap(0);
  2483. +   return(&fb_info);
  2484. +}
  2485. +
  2486. +
  2487. +static int Cyberfb_switch(int con)
  2488. +{
  2489. +   /* Do we have to save the colormap? */
  2490. +   if (disp[currcon].cmap.len)
  2491. +      do_fb_get_cmap(&disp[currcon].cmap, &disp[currcon].var, 1);
  2492. +
  2493. +   do_fb_set_var(&disp[con].var, 1);
  2494. +   currcon = con;
  2495. +   /* Install new colormap */
  2496. +   do_install_cmap(con);
  2497. +   return(0);
  2498. +}
  2499. +
  2500. +
  2501. +   /*
  2502. +    *    Update the `var' structure (called by fbcon.c)
  2503. +    *
  2504. +    *    This call looks only at yoffset and the FB_VMODE_YWRAP flag in `var'.
  2505. +    *    Since it's called by a kernel driver, no range checking is done.
  2506. +    */
  2507. +
  2508. +static int Cyberfb_updatevar(int con)
  2509. +{
  2510. +   return(0);
  2511. +}
  2512. +
  2513. +
  2514. +   /*
  2515. +    *    Blank the display.
  2516. +    */
  2517. +
  2518. +static void Cyberfb_blank(int blank)
  2519. +{
  2520. +   fbhw->blank(blank);
  2521. +}
  2522. +
  2523. +
  2524. +   /*
  2525. +    *    Get a Video Mode
  2526. +    */
  2527. +
  2528. +static int get_video_mode(const char *name)
  2529. +{
  2530. +   int i;
  2531. +
  2532. +   for (i = 1; i < NUM_PREDEF_MODES; i++)
  2533. +      if (!strcmp(name, Cyber_fb_modenames[i]))
  2534. +         return(i);
  2535. +   return(0);
  2536. +}
  2537. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/ksyms.c linux/arch/m68k/amiga/ksyms.c
  2538. --- pre2.0.6/linux/arch/m68k/amiga/ksyms.c    Sat Apr 27 15:19:45 1996
  2539. +++ linux/arch/m68k/amiga/ksyms.c    Mon May 20 07:54:25 1996
  2540. @@ -1,4 +1,5 @@
  2541.  #include <linux/module.h>
  2542. +#include <asm/zorro.h>
  2543.  
  2544.  static struct symbol_table mach_amiga_symbol_table = {
  2545.  #include <linux/symtab_begin.h>
  2546. @@ -7,9 +8,15 @@
  2547.     * Add things here when you find the need for it.
  2548.     */
  2549.  
  2550. +  X(zorro_find),
  2551. +  X(zorro_get_board),
  2552. +  X(zorro_config_board),
  2553. +  X(zorro_unconfig_board),
  2554. +
  2555.    /* example
  2556.    X(something_you_need),
  2557.    */
  2558. +
  2559.  
  2560.  #include <linux/symtab_end.h>
  2561.  };
  2562. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/s3blit.h linux/arch/m68k/amiga/s3blit.h
  2563. --- pre2.0.6/linux/arch/m68k/amiga/s3blit.h    Thu Jan  1 02:00:00 1970
  2564. +++ linux/arch/m68k/amiga/s3blit.h    Mon May 20 07:54:25 1996
  2565. @@ -0,0 +1,74 @@
  2566. +/* s3 commands */
  2567. +#define S3_BITBLT       0xc011
  2568. +#define S3_TWOPOINTLINE 0x2811
  2569. +#define S3_FILLEDRECT   0x40b1
  2570. +
  2571. +#define S3_FIFO_EMPTY 0x0400
  2572. +#define S3_HDW_BUSY   0x0200
  2573. +
  2574. +/* Enhanced register mapping (MMIO mode) */
  2575. +
  2576. +#define S3_READ_SEL      0xbee8 /* offset f */
  2577. +#define S3_MULT_MISC     0xbee8 /* offset e */
  2578. +#define S3_ERR_TERM      0x92e8
  2579. +#define S3_FRGD_COLOR    0xa6e8
  2580. +#define S3_BKGD_COLOR    0xa2e8
  2581. +#define S3_PIXEL_CNTL    0xbee8 /* offset a */
  2582. +#define S3_FRGD_MIX      0xbae8
  2583. +#define S3_BKGD_MIX      0xb6e8
  2584. +#define S3_CUR_Y         0x82e8
  2585. +#define S3_CUR_X         0x86e8
  2586. +#define S3_DESTY_AXSTP   0x8ae8
  2587. +#define S3_DESTX_DIASTP  0x8ee8
  2588. +#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */
  2589. +#define S3_MAJ_AXIS_PCNT 0x96e8
  2590. +#define S3_CMD           0x9ae8
  2591. +#define S3_GP_STAT       0x9ae8
  2592. +#define S3_ADVFUNC_CNTL  0x4ae8
  2593. +#define S3_WRT_MASK      0xaae8
  2594. +#define S3_RD_MASK       0xaee8
  2595. +
  2596. +/* Enhanced register mapping (Packed MMIO mode, write only) */
  2597. +#define S3_ALT_CURXY     0x8100
  2598. +#define S3_ALT_CURXY2    0x8104
  2599. +#define S3_ALT_STEP      0x8108
  2600. +#define S3_ALT_STEP2     0x810c
  2601. +#define S3_ALT_ERR       0x8110
  2602. +#define S3_ALT_CMD       0x8118
  2603. +#define S3_ALT_MIX       0x8134
  2604. +#define S3_ALT_PCNT      0x8148
  2605. +#define S3_ALT_PAT       0x8168
  2606. +
  2607. +/* Drawing modes */
  2608. +#define S3_NOTCUR          0x0000
  2609. +#define S3_LOGICALZERO     0x0001
  2610. +#define S3_LOGICALONE      0x0002
  2611. +#define S3_LEAVEASIS       0x0003
  2612. +#define S3_NOTNEW          0x0004
  2613. +#define S3_CURXORNEW       0x0005
  2614. +#define S3_NOT_CURXORNEW   0x0006
  2615. +#define S3_NEW             0x0007
  2616. +#define S3_NOTCURORNOTNEW  0x0008
  2617. +#define S3_CURORNOTNEW     0x0009
  2618. +#define S3_NOTCURORNEW     0x000a
  2619. +#define S3_CURORNEW        0x000b
  2620. +#define S3_CURANDNEW       0x000c
  2621. +#define S3_NOTCURANDNEW    0x000d
  2622. +#define S3_CURANDNOTNEW    0x000e
  2623. +#define S3_NOTCURANDNOTNEW 0x000f
  2624. +
  2625. +#define S3_CRTC_ADR    0x03d4
  2626. +#define S3_CRTC_DATA   0x03d5
  2627. +
  2628. +#define S3_REG_LOCK2 0x39
  2629. +#define S3_HGC_MODE  0x45
  2630. +
  2631. +#define S3_HWGC_ORGX_H 0x46
  2632. +#define S3_HWGC_ORGX_L 0x47
  2633. +#define S3_HWGC_ORGY_H 0x48
  2634. +#define S3_HWGC_ORGY_L 0x49
  2635. +#define S3_HWGC_DX     0x4e
  2636. +#define S3_HWGC_DY     0x4f
  2637. +
  2638. +
  2639. +#define S3_LAW_CTL 0x58
  2640. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/amiga/zorro.c linux/arch/m68k/amiga/zorro.c
  2641. --- pre2.0.6/linux/arch/m68k/amiga/zorro.c    Tue Apr 23 13:57:02 1996
  2642. +++ linux/arch/m68k/amiga/zorro.c    Mon May 20 07:54:26 1996
  2643. @@ -4,7 +4,7 @@
  2644.   *    Copyright (C) 1995 Geert Uytterhoeven
  2645.   *
  2646.   *    This file is subject to the terms and conditions of the GNU General Public
  2647. - *    License.  See the file README.legal in the main directory of this archive
  2648. + *    License.  See the file COPYING in the main directory of this archive
  2649.   *    for more details.
  2650.   */
  2651.  
  2652. @@ -139,6 +139,7 @@
  2653.     PROD("Series II SCSI Controller", GVPIISCSI)
  2654.     PROD("Series II SCSI Controller", GVPIISCSI_2)
  2655.     PROD("Series II RAM", GVPIIRAM)
  2656. +   PROD("A2000 68030 Turbo Board", GVP_A2000_030)
  2657.     PROD("GFORCE 040 with SCSI Controller", GFORCE_040_SCSI)
  2658.     PROD("IV-24 Graphics Board", GVPIV_24)
  2659.  /*
  2660. @@ -195,6 +196,10 @@
  2661.     PROD("SCSI Controller", HARDITAL_SCSI)
  2662.  END
  2663.  
  2664. +BEGIN_PROD(HARDITAL2)
  2665. +   PROD("TQM 68030+68882 Turbo Board", TQM)
  2666. +END
  2667. +
  2668.  BEGIN_PROD(BSC2)
  2669.     PROD("Oktagon 2008 SCSI Controller", OKTAGON_SCSI)
  2670.     PROD("Tandem", TANDEM)
  2671. @@ -287,6 +292,7 @@
  2672.  BEGIN_PROD(PHASE5)
  2673.     PROD("FastLane RAM", FASTLANE_RAM)
  2674.     PROD("FastLane/Blizzard 1230-II SCSI Controller", FASTLANE_SCSI)
  2675. +   PROD("CyberStorm Fast SCSI-II Controller", CYBERSTORM_SCSI)
  2676.     PROD("Blizzard 1230-III Turbo Board", BLIZZARD_1230_III)
  2677.     PROD("Blizzard 1230-IV Turbo Board", BLIZZARD_1230_IV)
  2678.     PROD("CyberVision64 Graphics Board", CYBERVISION)
  2679. @@ -308,6 +314,7 @@
  2680.     PROD("Retina Z2 Graphics Board", RETINA_Z2)
  2681.     PROD("MultiEvolution", MULTI_EVOLUTION)
  2682.     PROD("Retina Z3 Graphics Board", RETINA_Z3)
  2683. +   PROD("Falcon '040 Turbo Board", FALCON_040)
  2684.  END
  2685.  
  2686.  BEGIN_MANUF
  2687. @@ -330,6 +337,7 @@
  2688.     MANUF("Checkpoint Technologies", CHECKPOINT)
  2689.     MANUF("Golem", GOLEM)
  2690.     MANUF("Hardital Synthesis", HARDITAL_SYNTHES)
  2691. +   MANUF("Hardital Synthesis", HARDITAL2)
  2692.     MANUF("BSC", BSC2)
  2693.     MANUF("Advanced Systems & Software", ADV_SYS_SOFT)
  2694.     MANUF("IVS", IVS)
  2695. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/atari/atafb.c linux/arch/m68k/atari/atafb.c
  2696. --- pre2.0.6/linux/arch/m68k/atari/atafb.c    Fri May 17 15:32:11 1996
  2697. +++ linux/arch/m68k/atari/atafb.c    Mon May 20 07:54:26 1996
  2698. @@ -4,7 +4,7 @@
  2699.   *  Copyright (C) 1994 Martin Schaller & Roman Hodek
  2700.   *  
  2701.   * This file is subject to the terms and conditions of the GNU General Public
  2702. - * License.  See the file README.legal in the main directory of this archive
  2703. + * License.  See the file COPYING in the main directory of this archive
  2704.   * for more details.
  2705.   *
  2706.   * History:
  2707. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/atari/ataints.c linux/arch/m68k/atari/ataints.c
  2708. --- pre2.0.6/linux/arch/m68k/atari/ataints.c    Sat Apr 27 15:19:45 1996
  2709. +++ linux/arch/m68k/atari/ataints.c    Mon May 20 07:54:26 1996
  2710. @@ -25,7 +25,7 @@
  2711.   *  below.
  2712.   *
  2713.   * This file is subject to the terms and conditions of the GNU General Public
  2714. - * License.  See the file README.legal in the main directory of this archive
  2715. + * License.  See the file COPYING in the main directory of this archive
  2716.   * for more details.
  2717.   *
  2718.   */
  2719. @@ -511,7 +511,7 @@
  2720.  }
  2721.  
  2722.  
  2723. -int atari_remove_isr(unsigned long source, isrfunc isr)
  2724. +int atari_remove_isr(unsigned long source, isrfunc isr, void *data)
  2725.  {
  2726.      unsigned long flags;
  2727.      int vector;
  2728. @@ -533,7 +533,8 @@
  2729.  
  2730.      if (irq_handler[source].isr != atari_call_isr_list) {
  2731.          /* It's the only handler for the interrupt */
  2732. -        if (irq_handler[source].isr != isr) {
  2733. +        if (irq_handler[source].isr != isr &&
  2734. +            irq_handler[source].data != data) {
  2735.              restore_flags(flags);
  2736.              goto not_found;
  2737.          }
  2738. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/atari/atakeyb.c linux/arch/m68k/atari/atakeyb.c
  2739. --- pre2.0.6/linux/arch/m68k/atari/atakeyb.c    Sat Apr 27 15:19:45 1996
  2740. +++ linux/arch/m68k/atari/atakeyb.c    Mon May 20 07:54:26 1996
  2741. @@ -4,7 +4,7 @@
  2742.   * Atari Keyboard driver for 680x0 Linux
  2743.   *
  2744.   * This file is subject to the terms and conditions of the GNU General Public
  2745. - * License.  See the file README.legal in the main directory of this archive
  2746. + * License.  See the file COPYING in the main directory of this archive
  2747.   * for more details.
  2748.   */
  2749.  
  2750. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/atari/atasound.c linux/arch/m68k/atari/atasound.c
  2751. --- pre2.0.6/linux/arch/m68k/atari/atasound.c    Sat Apr 27 15:19:45 1996
  2752. +++ linux/arch/m68k/atari/atasound.c    Mon May 20 07:54:26 1996
  2753. @@ -8,7 +8,7 @@
  2754.  (++roman: That's me... :-)
  2755.  
  2756.  This file is subject to the terms and conditions of the GNU General Public
  2757. -License.  See the file README.legal in the main directory of this archive
  2758. +License.  See the file COPYING in the main directory of this archive
  2759.  for more details.
  2760.  
  2761.  */
  2762. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/atari/config.c linux/arch/m68k/atari/config.c
  2763. --- pre2.0.6/linux/arch/m68k/atari/config.c    Fri May 17 15:32:11 1996
  2764. +++ linux/arch/m68k/atari/config.c    Mon May 20 07:54:26 1996
  2765. @@ -16,7 +16,7 @@
  2766.   *    atari_sched_init fixed to get precise clock.
  2767.   *
  2768.   * This file is subject to the terms and conditions of the GNU General Public
  2769. - * License.  See the file README.legal in the main directory of this archive
  2770. + * License.  See the file COPYING in the main directory of this archive
  2771.   * for more details.
  2772.   */
  2773.  
  2774. @@ -49,7 +49,7 @@
  2775.  extern void atari_kbd_leds (unsigned int);
  2776.  extern void atari_init_INTS (void);
  2777.  extern int atari_add_isr (unsigned long, isrfunc, int, void *, char *);
  2778. -extern int atari_remove_isr (unsigned long, isrfunc);
  2779. +extern int atari_remove_isr (unsigned long, isrfunc, void *);
  2780.  extern void atari_enable_irq (unsigned);
  2781.  extern void atari_disable_irq (unsigned);
  2782.  extern int atari_get_irq_list (char *buf, int len);
  2783. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/atari/stdma.c linux/arch/m68k/atari/stdma.c
  2784. --- pre2.0.6/linux/arch/m68k/atari/stdma.c    Sat Apr 27 15:19:45 1996
  2785. +++ linux/arch/m68k/atari/stdma.c    Mon May 20 07:54:26 1996
  2786. @@ -6,7 +6,7 @@
  2787.   *
  2788.   *
  2789.   * This file is subject to the terms and conditions of the GNU General Public
  2790. - * License.  See the file README.legal in the main directory of this archive
  2791. + * License.  See the file COPYING in the main directory of this archive
  2792.   * for more details.
  2793.   */
  2794.  
  2795. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/boot/amiga/bootstrap.c linux/arch/m68k/boot/amiga/bootstrap.c
  2796. --- pre2.0.6/linux/arch/m68k/boot/amiga/bootstrap.c    Sat Apr 27 15:19:45 1996
  2797. +++ linux/arch/m68k/boot/amiga/bootstrap.c    Mon May 20 07:54:26 1996
  2798. @@ -15,7 +15,7 @@
  2799.  **       (unless all block sizes are multiples of 1M :-)
  2800.  **
  2801.  ** This file is subject to the terms and conditions of the GNU General Public
  2802. -** License.  See the file README.legal in the main directory of this archive
  2803. +** License.  See the file COPYING in the main directory of this archive
  2804.  ** for more details.
  2805.  **
  2806.  */
  2807. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/boot/amiga/bootstrap.h linux/arch/m68k/boot/amiga/bootstrap.h
  2808. --- pre2.0.6/linux/arch/m68k/boot/amiga/bootstrap.h    Tue Apr 23 13:57:03 1996
  2809. +++ linux/arch/m68k/boot/amiga/bootstrap.h    Mon May 20 07:54:26 1996
  2810. @@ -9,7 +9,7 @@
  2811.  **     - inline Supervisor() call
  2812.  **
  2813.  ** This file is subject to the terms and conditions of the GNU General Public
  2814. -** License.  See the file README.legal in the main directory of this archive
  2815. +** License.  See the file COPYING in the main directory of this archive
  2816.  ** for more details.
  2817.  **
  2818.  */
  2819. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/boot/atari/bootstrap.c linux/arch/m68k/boot/atari/bootstrap.c
  2820. --- pre2.0.6/linux/arch/m68k/boot/atari/bootstrap.c    Sat Apr 27 15:19:46 1996
  2821. +++ linux/arch/m68k/boot/atari/bootstrap.c    Mon May 20 07:54:26 1996
  2822. @@ -4,7 +4,7 @@
  2823.  ** Copyright 1993 by Arjan Knor
  2824.  **
  2825.  ** This file is subject to the terms and conditions of the GNU General Public
  2826. -** License.  See the file README.legal in the main directory of this archive
  2827. +** License.  See the file COPYING in the main directory of this archive
  2828.  ** for more details.
  2829.  **
  2830.  ** History:
  2831. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/boot/atari/bootstrap.h linux/arch/m68k/boot/atari/bootstrap.h
  2832. --- pre2.0.6/linux/arch/m68k/boot/atari/bootstrap.h    Tue Apr 23 13:57:03 1996
  2833. +++ linux/arch/m68k/boot/atari/bootstrap.h    Mon May 20 07:54:26 1996
  2834. @@ -7,7 +7,7 @@
  2835.  ** - clear transparent translation registers
  2836.  **
  2837.  ** This file is subject to the terms and conditions of the GNU General Public
  2838. -** License.  See the file README.legal in the main directory of this archive
  2839. +** License.  See the file COPYING in the main directory of this archive
  2840.  ** for more details.
  2841.  **
  2842.  */
  2843. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/config.in linux/arch/m68k/config.in
  2844. --- pre2.0.6/linux/arch/m68k/config.in    Tue May  7 16:22:19 1996
  2845. +++ linux/arch/m68k/config.in    Mon May 20 07:54:26 1996
  2846. @@ -119,9 +119,9 @@
  2847.  fi
  2848.  tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
  2849.  if [ "$CONFIG_AMIGA" = "y" ]; then
  2850. -  bool 'Ariadne support' CONFIG_ARIADNE
  2851. -  bool 'A2065 support' CONFIG_A2065
  2852. -  bool 'Hydra support' CONFIG_HYDRA
  2853. +  tristate 'Ariadne support' CONFIG_ARIADNE
  2854. +  tristate 'A2065 support' CONFIG_A2065
  2855. +  tristate 'Hydra support' CONFIG_HYDRA
  2856.  fi
  2857.  if [ "$CONFIG_ATARI" = "y" ]; then
  2858.    bool 'Atari Lance support' CONFIG_ATARILANCE
  2859. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/console/Makefile linux/arch/m68k/console/Makefile
  2860. --- pre2.0.6/linux/arch/m68k/console/Makefile    Tue Apr 23 13:57:03 1996
  2861. +++ linux/arch/m68k/console/Makefile    Mon May 20 07:54:26 1996
  2862. @@ -9,7 +9,7 @@
  2863.  EXTRA_CFLAGS := -Wa,-m68030
  2864.  
  2865.  L_TARGET = console.a
  2866. -L_OBJS = fbcon.o fonts.o font_8x16.o font_8x8.o
  2867. +L_OBJS = fbcon.o fonts.o font_8x16.o font_8x8.o pearl_8x8.o
  2868.  M_OBJS =
  2869.  
  2870.  include $(TOPDIR)/Rules.make
  2871. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/console/fbcon.c linux/arch/m68k/console/fbcon.c
  2872. --- pre2.0.6/linux/arch/m68k/console/fbcon.c    Tue May  7 16:22:19 1996
  2873. +++ linux/arch/m68k/console/fbcon.c    Mon May 20 07:54:26 1996
  2874. @@ -27,7 +27,7 @@
  2875.   *
  2876.   *
  2877.   * This file is subject to the terms and conditions of the GNU General Public
  2878. - * License.  See the file README.legal in the main directory of this archive
  2879. + * License.  See the file COPYING in the main directory of this archive
  2880.   * for more details.
  2881.   */
  2882.  
  2883. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/console/fonts.c linux/arch/m68k/console/fonts.c
  2884. --- pre2.0.6/linux/arch/m68k/console/fonts.c    Tue Apr 23 13:57:04 1996
  2885. +++ linux/arch/m68k/console/fonts.c    Mon May 20 07:54:26 1996
  2886. @@ -5,7 +5,7 @@
  2887.   *    Created 1995 by Geert Uytterhoeven
  2888.   *
  2889.   * This file is subject to the terms and conditions of the GNU General Public
  2890. - * License.  See the file README.legal in the main directory of this archive
  2891. + * License.  See the file COPYING in the main directory of this archive
  2892.   * for more details.
  2893.   */
  2894.  
  2895. @@ -13,6 +13,7 @@
  2896.  #include <linux/types.h>
  2897.  #include <linux/string.h>
  2898.  #include <asm/font.h>
  2899. +#include <asm/bootinfo.h>
  2900.  
  2901.  
  2902.     /*
  2903. @@ -29,6 +30,11 @@
  2904.  extern int fontwidth_8x16, fontheight_8x16;
  2905.  extern u_char fontdata_8x16[];
  2906.  
  2907. +/* PEARL8x8 */
  2908. +extern char fontname_pearl8x8[];
  2909. +extern int fontwidth_pearl8x8, fontheight_pearl8x8;
  2910. +extern u_char fontdata_pearl8x8[];
  2911. +
  2912.  
  2913.     /*
  2914.      *    Font Descriptor Array
  2915. @@ -41,9 +47,15 @@
  2916.     u_char *data;
  2917.  };
  2918.  
  2919. +#define VGA8x8_IDX    0
  2920. +#define VGA8x16_IDX    1
  2921. +#define PEARL8x8_IDX    2
  2922. +
  2923.  static struct softfontdesc softfonts[] = {
  2924.     { fontname_8x8, &fontwidth_8x8, &fontheight_8x8, fontdata_8x8 },
  2925. -   { fontname_8x16, &fontwidth_8x16, &fontheight_8x16, fontdata_8x16 }
  2926. +   { fontname_8x16, &fontwidth_8x16, &fontheight_8x16, fontdata_8x16 },
  2927. +   { fontname_pearl8x8, &fontwidth_pearl8x8, &fontheight_pearl8x8,
  2928. +     fontdata_pearl8x8 },
  2929.  };
  2930.  
  2931.  static u_long numsoftfonts = sizeof(softfonts)/sizeof(*softfonts);
  2932. @@ -78,23 +90,19 @@
  2933.  void getdefaultfont(int xres, int yres, char *name[], int *width, int *height,
  2934.                      u_char *data[])
  2935.  {
  2936. -   if (yres < 400) {
  2937. -      if (name)
  2938. -          *name = fontname_8x8;
  2939. -       if (width)
  2940. -          *width = fontwidth_8x8;
  2941. -       if (height)
  2942. -          *height = fontheight_8x8;
  2943. -       if (data)
  2944. -         *data = fontdata_8x8;
  2945. -    } else {
  2946. -      if (name)
  2947. -          *name = fontname_8x16;
  2948. -       if (width)
  2949. -          *width = fontwidth_8x16;
  2950. -       if (height)
  2951. -          *height = fontheight_8x16;
  2952. -       if (data)
  2953. -         *data = fontdata_8x16;
  2954. -    }
  2955. +    int i;
  2956. +    
  2957. +    if (yres < 400)
  2958. +    i = MACH_IS_AMIGA ? PEARL8x8_IDX : VGA8x8_IDX;
  2959. +    else
  2960. +    i = VGA8x16_IDX;
  2961. +
  2962. +    if (name)
  2963. +    *name = softfonts[i].name;
  2964. +    if (width)
  2965. +    *width = *softfonts[i].width;
  2966. +    if (height)
  2967. +    *height = *softfonts[i].height;
  2968. +    if (data)
  2969. +    *data = softfonts[i].data;
  2970.  }
  2971. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/console/pearl_8x8.c linux/arch/m68k/console/pearl_8x8.c
  2972. --- pre2.0.6/linux/arch/m68k/console/pearl_8x8.c    Thu Jan  1 02:00:00 1970
  2973. +++ linux/arch/m68k/console/pearl_8x8.c    Mon May 20 07:54:26 1996
  2974. @@ -0,0 +1,2582 @@
  2975. +/**********************************************/
  2976. +/*                                            */
  2977. +/*       Font file generated by cpi2fnt       */
  2978. +/*       ------------------------------       */
  2979. +/*       Combined with the alpha-numeric      */
  2980. +/*       portion of Greg Harp's old PEARL     */
  2981. +/*       font (from earlier versions of       */
  2982. +/*       linux-m86k) by John Shifflett        */
  2983. +/*                                            */
  2984. +/**********************************************/
  2985. +
  2986. +#define FONTDATAMAX 2048
  2987. +
  2988. +char fontname_pearl8x8[] = "PEARL8x8";
  2989. +
  2990. +int  fontheight_pearl8x8 = 8;
  2991. +int  fontwidth_pearl8x8  = 8;
  2992. +
  2993. +unsigned char fontdata_pearl8x8[FONTDATAMAX] = {
  2994. +
  2995. +   /* 0 0x00 '^@' */
  2996. +   0x00, /* 00000000 */
  2997. +   0x00, /* 00000000 */
  2998. +   0x00, /* 00000000 */
  2999. +   0x00, /* 00000000 */
  3000. +   0x00, /* 00000000 */
  3001. +   0x00, /* 00000000 */
  3002. +   0x00, /* 00000000 */
  3003. +   0x00, /* 00000000 */
  3004. +
  3005. +   /* 1 0x01 '^A' */
  3006. +   0x7e, /* 01111110 */
  3007. +   0x81, /* 10000001 */
  3008. +   0xa5, /* 10100101 */
  3009. +   0x81, /* 10000001 */
  3010. +   0xbd, /* 10111101 */
  3011. +   0x99, /* 10011001 */
  3012. +   0x81, /* 10000001 */
  3013. +   0x7e, /* 01111110 */
  3014. +
  3015. +   /* 2 0x02 '^B' */
  3016. +   0x7e, /* 01111110 */
  3017. +   0xff, /* 11111111 */
  3018. +   0xdb, /* 11011011 */
  3019. +   0xff, /* 11111111 */
  3020. +   0xc3, /* 11000011 */
  3021. +   0xe7, /* 11100111 */
  3022. +   0xff, /* 11111111 */
  3023. +   0x7e, /* 01111110 */
  3024. +
  3025. +   /* 3 0x03 '^C' */
  3026. +   0x6c, /* 01101100 */
  3027. +   0xfe, /* 11111110 */
  3028. +   0xfe, /* 11111110 */
  3029. +   0xfe, /* 11111110 */
  3030. +   0x7c, /* 01111100 */
  3031. +   0x38, /* 00111000 */
  3032. +   0x10, /* 00010000 */
  3033. +   0x00, /* 00000000 */
  3034. +
  3035. +   /* 4 0x04 '^D' */
  3036. +   0x10, /* 00010000 */
  3037. +   0x38, /* 00111000 */
  3038. +   0x7c, /* 01111100 */
  3039. +   0xfe, /* 11111110 */
  3040. +   0x7c, /* 01111100 */
  3041. +   0x38, /* 00111000 */
  3042. +   0x10, /* 00010000 */
  3043. +   0x00, /* 00000000 */
  3044. +
  3045. +   /* 5 0x05 '^E' */
  3046. +   0x38, /* 00111000 */
  3047. +   0x7c, /* 01111100 */
  3048. +   0x38, /* 00111000 */
  3049. +   0xfe, /* 11111110 */
  3050. +   0xfe, /* 11111110 */
  3051. +   0xd6, /* 11010110 */
  3052. +   0x10, /* 00010000 */
  3053. +   0x38, /* 00111000 */
  3054. +
  3055. +   /* 6 0x06 '^F' */
  3056. +   0x10, /* 00010000 */
  3057. +   0x38, /* 00111000 */
  3058. +   0x7c, /* 01111100 */
  3059. +   0xfe, /* 11111110 */
  3060. +   0xfe, /* 11111110 */
  3061. +   0x7c, /* 01111100 */
  3062. +   0x10, /* 00010000 */
  3063. +   0x38, /* 00111000 */
  3064. +
  3065. +   /* 7 0x07 '^G' */
  3066. +   0x00, /* 00000000 */
  3067. +   0x00, /* 00000000 */
  3068. +   0x18, /* 00011000 */
  3069. +   0x3c, /* 00111100 */
  3070. +   0x3c, /* 00111100 */
  3071. +   0x18, /* 00011000 */
  3072. +   0x00, /* 00000000 */
  3073. +   0x00, /* 00000000 */
  3074. +
  3075. +   /* 8 0x08 '^H' */
  3076. +   0xff, /* 11111111 */
  3077. +   0xff, /* 11111111 */
  3078. +   0xe7, /* 11100111 */
  3079. +   0xc3, /* 11000011 */
  3080. +   0xc3, /* 11000011 */
  3081. +   0xe7, /* 11100111 */
  3082. +   0xff, /* 11111111 */
  3083. +   0xff, /* 11111111 */
  3084. +
  3085. +   /* 9 0x09 '^I' */
  3086. +   0x00, /* 00000000 */
  3087. +   0x3c, /* 00111100 */
  3088. +   0x66, /* 01100110 */
  3089. +   0x42, /* 01000010 */
  3090. +   0x42, /* 01000010 */
  3091. +   0x66, /* 01100110 */
  3092. +   0x3c, /* 00111100 */
  3093. +   0x00, /* 00000000 */
  3094. +
  3095. +   /* 10 0x0a '^J' */
  3096. +   0xff, /* 11111111 */
  3097. +   0xc3, /* 11000011 */
  3098. +   0x99, /* 10011001 */
  3099. +   0xbd, /* 10111101 */
  3100. +   0xbd, /* 10111101 */
  3101. +   0x99, /* 10011001 */
  3102. +   0xc3, /* 11000011 */
  3103. +   0xff, /* 11111111 */
  3104. +
  3105. +   /* 11 0x0b '^K' */
  3106. +   0x0f, /* 00001111 */
  3107. +   0x07, /* 00000111 */
  3108. +   0x0f, /* 00001111 */
  3109. +   0x7d, /* 01111101 */
  3110. +   0xcc, /* 11001100 */
  3111. +   0xcc, /* 11001100 */
  3112. +   0xcc, /* 11001100 */
  3113. +   0x78, /* 01111000 */
  3114. +
  3115. +   /* 12 0x0c '^L' */
  3116. +   0x3c, /* 00111100 */
  3117. +   0x66, /* 01100110 */
  3118. +   0x66, /* 01100110 */
  3119. +   0x66, /* 01100110 */
  3120. +   0x3c, /* 00111100 */
  3121. +   0x18, /* 00011000 */
  3122. +   0x7e, /* 01111110 */
  3123. +   0x18, /* 00011000 */
  3124. +
  3125. +   /* 13 0x0d '^M' */
  3126. +   0x3f, /* 00111111 */
  3127. +   0x33, /* 00110011 */
  3128. +   0x3f, /* 00111111 */
  3129. +   0x30, /* 00110000 */
  3130. +   0x30, /* 00110000 */
  3131. +   0x70, /* 01110000 */
  3132. +   0xf0, /* 11110000 */
  3133. +   0xe0, /* 11100000 */
  3134. +
  3135. +   /* 14 0x0e '^N' */
  3136. +   0x7f, /* 01111111 */
  3137. +   0x63, /* 01100011 */
  3138. +   0x7f, /* 01111111 */
  3139. +   0x63, /* 01100011 */
  3140. +   0x63, /* 01100011 */
  3141. +   0x67, /* 01100111 */
  3142. +   0xe6, /* 11100110 */
  3143. +   0xc0, /* 11000000 */
  3144. +
  3145. +   /* 15 0x0f '^O' */
  3146. +   0x18, /* 00011000 */
  3147. +   0xdb, /* 11011011 */
  3148. +   0x3c, /* 00111100 */
  3149. +   0xe7, /* 11100111 */
  3150. +   0xe7, /* 11100111 */
  3151. +   0x3c, /* 00111100 */
  3152. +   0xdb, /* 11011011 */
  3153. +   0x18, /* 00011000 */
  3154. +
  3155. +   /* 16 0x10 '^P' */
  3156. +   0x80, /* 10000000 */
  3157. +   0xe0, /* 11100000 */
  3158. +   0xf8, /* 11111000 */
  3159. +   0xfe, /* 11111110 */
  3160. +   0xf8, /* 11111000 */
  3161. +   0xe0, /* 11100000 */
  3162. +   0x80, /* 10000000 */
  3163. +   0x00, /* 00000000 */
  3164. +
  3165. +   /* 17 0x11 '^Q' */
  3166. +   0x02, /* 00000010 */
  3167. +   0x0e, /* 00001110 */
  3168. +   0x3e, /* 00111110 */
  3169. +   0xfe, /* 11111110 */
  3170. +   0x3e, /* 00111110 */
  3171. +   0x0e, /* 00001110 */
  3172. +   0x02, /* 00000010 */
  3173. +   0x00, /* 00000000 */
  3174. +
  3175. +   /* 18 0x12 '^R' */
  3176. +   0x18, /* 00011000 */
  3177. +   0x3c, /* 00111100 */
  3178. +   0x7e, /* 01111110 */
  3179. +   0x18, /* 00011000 */
  3180. +   0x18, /* 00011000 */
  3181. +   0x7e, /* 01111110 */
  3182. +   0x3c, /* 00111100 */
  3183. +   0x18, /* 00011000 */
  3184. +
  3185. +   /* 19 0x13 '^S' */
  3186. +   0x66, /* 01100110 */
  3187. +   0x66, /* 01100110 */
  3188. +   0x66, /* 01100110 */
  3189. +   0x66, /* 01100110 */
  3190. +   0x66, /* 01100110 */
  3191. +   0x00, /* 00000000 */
  3192. +   0x66, /* 01100110 */
  3193. +   0x00, /* 00000000 */
  3194. +
  3195. +   /* 20 0x14 '^T' */
  3196. +   0x7f, /* 01111111 */
  3197. +   0xdb, /* 11011011 */
  3198. +   0xdb, /* 11011011 */
  3199. +   0x7b, /* 01111011 */
  3200. +   0x1b, /* 00011011 */
  3201. +   0x1b, /* 00011011 */
  3202. +   0x1b, /* 00011011 */
  3203. +   0x00, /* 00000000 */
  3204. +
  3205. +   /* 21 0x15 '^U' */
  3206. +   0x3e, /* 00111110 */
  3207. +   0x61, /* 01100001 */
  3208. +   0x3c, /* 00111100 */
  3209. +   0x66, /* 01100110 */
  3210. +   0x66, /* 01100110 */
  3211. +   0x3c, /* 00111100 */
  3212. +   0x86, /* 10000110 */
  3213. +   0x7c, /* 01111100 */
  3214. +
  3215. +   /* 22 0x16 '^V' */
  3216. +   0x00, /* 00000000 */
  3217. +   0x00, /* 00000000 */
  3218. +   0x00, /* 00000000 */
  3219. +   0x00, /* 00000000 */
  3220. +   0x7e, /* 01111110 */
  3221. +   0x7e, /* 01111110 */
  3222. +   0x7e, /* 01111110 */
  3223. +   0x00, /* 00000000 */
  3224. +
  3225. +   /* 23 0x17 '^W' */
  3226. +   0x18, /* 00011000 */
  3227. +   0x3c, /* 00111100 */
  3228. +   0x7e, /* 01111110 */
  3229. +   0x18, /* 00011000 */
  3230. +   0x7e, /* 01111110 */
  3231. +   0x3c, /* 00111100 */
  3232. +   0x18, /* 00011000 */
  3233. +   0xff, /* 11111111 */
  3234. +
  3235. +   /* 24 0x18 '^X' */
  3236. +   0x18, /* 00011000 */
  3237. +   0x3c, /* 00111100 */
  3238. +   0x7e, /* 01111110 */
  3239. +   0x18, /* 00011000 */
  3240. +   0x18, /* 00011000 */
  3241. +   0x18, /* 00011000 */
  3242. +   0x18, /* 00011000 */
  3243. +   0x00, /* 00000000 */
  3244. +
  3245. +   /* 25 0x19 '^Y' */
  3246. +   0x18, /* 00011000 */
  3247. +   0x18, /* 00011000 */
  3248. +   0x18, /* 00011000 */
  3249. +   0x18, /* 00011000 */
  3250. +   0x7e, /* 01111110 */
  3251. +   0x3c, /* 00111100 */
  3252. +   0x18, /* 00011000 */
  3253. +   0x00, /* 00000000 */
  3254. +
  3255. +   /* 26 0x1a '^Z' */
  3256. +   0x00, /* 00000000 */
  3257. +   0x18, /* 00011000 */
  3258. +   0x0c, /* 00001100 */
  3259. +   0xfe, /* 11111110 */
  3260. +   0x0c, /* 00001100 */
  3261. +   0x18, /* 00011000 */
  3262. +   0x00, /* 00000000 */
  3263. +   0x00, /* 00000000 */
  3264. +
  3265. +   /* 27 0x1b '^[' */
  3266. +   0x00, /* 00000000 */
  3267. +   0x30, /* 00110000 */
  3268. +   0x60, /* 01100000 */
  3269. +   0xfe, /* 11111110 */
  3270. +   0x60, /* 01100000 */
  3271. +   0x30, /* 00110000 */
  3272. +   0x00, /* 00000000 */
  3273. +   0x00, /* 00000000 */
  3274. +
  3275. +   /* 28 0x1c '^\' */
  3276. +   0x00, /* 00000000 */
  3277. +   0x00, /* 00000000 */
  3278. +   0xc0, /* 11000000 */
  3279. +   0xc0, /* 11000000 */
  3280. +   0xc0, /* 11000000 */
  3281. +   0xfe, /* 11111110 */
  3282. +   0x00, /* 00000000 */
  3283. +   0x00, /* 00000000 */
  3284. +
  3285. +   /* 29 0x1d '^]' */
  3286. +   0x00, /* 00000000 */
  3287. +   0x24, /* 00100100 */
  3288. +   0x66, /* 01100110 */
  3289. +   0xff, /* 11111111 */
  3290. +   0x66, /* 01100110 */
  3291. +   0x24, /* 00100100 */
  3292. +   0x00, /* 00000000 */
  3293. +   0x00, /* 00000000 */
  3294. +
  3295. +   /* 30 0x1e '^^' */
  3296. +   0x00, /* 00000000 */
  3297. +   0x18, /* 00011000 */
  3298. +   0x3c, /* 00111100 */
  3299. +   0x7e, /* 01111110 */
  3300. +   0xff, /* 11111111 */
  3301. +   0xff, /* 11111111 */
  3302. +   0x00, /* 00000000 */
  3303. +   0x00, /* 00000000 */
  3304. +
  3305. +   /* 31 0x1f '^_' */
  3306. +   0x00, /* 00000000 */
  3307. +   0xff, /* 11111111 */
  3308. +   0xff, /* 11111111 */
  3309. +   0x7e, /* 01111110 */
  3310. +   0x3c, /* 00111100 */
  3311. +   0x18, /* 00011000 */
  3312. +   0x00, /* 00000000 */
  3313. +   0x00, /* 00000000 */
  3314. +
  3315. +   /* 32 0x20 ' ' */
  3316. +   0x00, /* 00000000 */
  3317. +   0x00, /* 00000000 */
  3318. +   0x00, /* 00000000 */
  3319. +   0x00, /* 00000000 */
  3320. +   0x00, /* 00000000 */
  3321. +   0x00, /* 00000000 */
  3322. +   0x00, /* 00000000 */
  3323. +   0x00, /* 00000000 */
  3324. +
  3325. +   /* 33 0x21 '!' */
  3326. +   0x18, /* 00011000 */
  3327. +   0x3c, /* 00111100 */
  3328. +   0x3c, /* 00111100 */
  3329. +   0x3c, /* 00111100 */
  3330. +   0x18, /* 00011000 */
  3331. +   0x00, /* 00000000 */
  3332. +   0x18, /* 00011000 */
  3333. +   0x00, /* 00000000 */
  3334. +
  3335. +   /* 34 0x22 '"' */
  3336. +   0x6c, /* 01101100 */
  3337. +   0x6c, /* 01101100 */
  3338. +   0x00, /* 00000000 */
  3339. +   0x00, /* 00000000 */
  3340. +   0x00, /* 00000000 */
  3341. +   0x00, /* 00000000 */
  3342. +   0x00, /* 00000000 */
  3343. +   0x00, /* 00000000 */
  3344. +
  3345. +   /* 35 0x23 '#' */
  3346. +   0x6c, /* 01101100 */
  3347. +   0x6c, /* 01101100 */
  3348. +   0xfe, /* 11111110 */
  3349. +   0x6c, /* 01101100 */
  3350. +   0xfe, /* 11111110 */
  3351. +   0x6c, /* 01101100 */
  3352. +   0x6c, /* 01101100 */
  3353. +   0x00, /* 00000000 */
  3354. +
  3355. +   /* 36 0x24 '$' */
  3356. +   0x18, /* 00011000 */
  3357. +   0x3e, /* 00111110 */
  3358. +   0x60, /* 01100000 */
  3359. +   0x3c, /* 00111100 */
  3360. +   0x06, /* 00000110 */
  3361. +   0x7c, /* 01111100 */
  3362. +   0x18, /* 00011000 */
  3363. +   0x00, /* 00000000 */
  3364. +
  3365. +   /* 37 0x25 '%' */
  3366. +   0x00, /* 00000000 */
  3367. +   0xc6, /* 11000110 */
  3368. +   0xcc, /* 11001100 */
  3369. +   0x18, /* 00011000 */
  3370. +   0x30, /* 00110000 */
  3371. +   0x66, /* 01100110 */
  3372. +   0xc6, /* 11000110 */
  3373. +   0x00, /* 00000000 */
  3374. +
  3375. +   /* 38 0x26 '&' */
  3376. +   0x38, /* 00111000 */
  3377. +   0x6c, /* 01101100 */
  3378. +   0x68, /* 01101000 */
  3379. +   0x76, /* 01110110 */
  3380. +   0xdc, /* 11011100 */
  3381. +   0xcc, /* 11001100 */
  3382. +   0x76, /* 01110110 */
  3383. +   0x00, /* 00000000 */
  3384. +
  3385. +   /* 39 0x27 ''' */
  3386. +   0x18, /* 00011000 */
  3387. +   0x18, /* 00011000 */
  3388. +   0x30, /* 00110000 */
  3389. +   0x00, /* 00000000 */
  3390. +   0x00, /* 00000000 */
  3391. +   0x00, /* 00000000 */
  3392. +   0x00, /* 00000000 */
  3393. +   0x00, /* 00000000 */
  3394. +
  3395. +   /* 40 0x28 '(' */
  3396. +   0x0c, /* 00001100 */
  3397. +   0x18, /* 00011000 */
  3398. +   0x30, /* 00110000 */
  3399. +   0x30, /* 00110000 */
  3400. +   0x30, /* 00110000 */
  3401. +   0x18, /* 00011000 */
  3402. +   0x0c, /* 00001100 */
  3403. +   0x00, /* 00000000 */
  3404. +
  3405. +   /* 41 0x29 ')' */
  3406. +   0x30, /* 00110000 */
  3407. +   0x18, /* 00011000 */
  3408. +   0x0c, /* 00001100 */
  3409. +   0x0c, /* 00001100 */
  3410. +   0x0c, /* 00001100 */
  3411. +   0x18, /* 00011000 */
  3412. +   0x30, /* 00110000 */
  3413. +   0x00, /* 00000000 */
  3414. +
  3415. +   /* 42 0x2a '*' */
  3416. +   0x00, /* 00000000 */
  3417. +   0x66, /* 01100110 */
  3418. +   0x3c, /* 00111100 */
  3419. +   0xff, /* 11111111 */
  3420. +   0x3c, /* 00111100 */
  3421. +   0x66, /* 01100110 */
  3422. +   0x00, /* 00000000 */
  3423. +   0x00, /* 00000000 */
  3424. +
  3425. +   /* 43 0x2b '+' */
  3426. +   0x00, /* 00000000 */
  3427. +   0x18, /* 00011000 */
  3428. +   0x18, /* 00011000 */
  3429. +   0x7e, /* 01111110 */
  3430. +   0x18, /* 00011000 */
  3431. +   0x18, /* 00011000 */
  3432. +   0x00, /* 00000000 */
  3433. +   0x00, /* 00000000 */
  3434. +
  3435. +   /* 44 0x2c ',' */
  3436. +   0x00, /* 00000000 */
  3437. +   0x00, /* 00000000 */
  3438. +   0x00, /* 00000000 */
  3439. +   0x00, /* 00000000 */
  3440. +   0x00, /* 00000000 */
  3441. +   0x18, /* 00011000 */
  3442. +   0x18, /* 00011000 */
  3443. +   0x30, /* 00110000 */
  3444. +
  3445. +   /* 45 0x2d '-' */
  3446. +   0x00, /* 00000000 */
  3447. +   0x00, /* 00000000 */
  3448. +   0x00, /* 00000000 */
  3449. +   0x7e, /* 01111110 */
  3450. +   0x00, /* 00000000 */
  3451. +   0x00, /* 00000000 */
  3452. +   0x00, /* 00000000 */
  3453. +   0x00, /* 00000000 */
  3454. +
  3455. +   /* 46 0x2e '.' */
  3456. +   0x00, /* 00000000 */
  3457. +   0x00, /* 00000000 */
  3458. +   0x00, /* 00000000 */
  3459. +   0x00, /* 00000000 */
  3460. +   0x00, /* 00000000 */
  3461. +   0x18, /* 00011000 */
  3462. +   0x18, /* 00011000 */
  3463. +   0x00, /* 00000000 */
  3464. +
  3465. +   /* 47 0x2f '/' */
  3466. +   0x03, /* 00000011 */
  3467. +   0x06, /* 00000110 */
  3468. +   0x0c, /* 00001100 */
  3469. +   0x18, /* 00011000 */
  3470. +   0x30, /* 00110000 */
  3471. +   0x60, /* 01100000 */
  3472. +   0xc0, /* 11000000 */
  3473. +   0x00, /* 00000000 */
  3474. +
  3475. +   /* 48 0x30 '0' */
  3476. +   0x7c, /* 01111100 */
  3477. +   0xc6, /* 11000110 */
  3478. +   0xde, /* 11011110 */
  3479. +   0xfe, /* 11111110 */
  3480. +   0xf6, /* 11110110 */
  3481. +   0xc6, /* 11000110 */
  3482. +   0x7c, /* 01111100 */
  3483. +   0x00, /* 00000000 */
  3484. +
  3485. +   /* 49 0x31 '1' */
  3486. +   0x18, /* 00011000 */
  3487. +   0x78, /* 01111000 */
  3488. +   0x18, /* 00011000 */
  3489. +   0x18, /* 00011000 */
  3490. +   0x18, /* 00011000 */
  3491. +   0x18, /* 00011000 */
  3492. +   0x18, /* 00011000 */
  3493. +   0x00, /* 00000000 */
  3494. +
  3495. +   /* 50 0x32 '2' */
  3496. +   0x7c, /* 01111100 */
  3497. +   0xc6, /* 11000110 */
  3498. +   0x0c, /* 00001100 */
  3499. +   0x18, /* 00011000 */
  3500. +   0x30, /* 00110000 */
  3501. +   0x60, /* 01100000 */
  3502. +   0xfe, /* 11111110 */
  3503. +   0x00, /* 00000000 */
  3504. +
  3505. +   /* 51 0x33 '3' */
  3506. +   0x7c, /* 01111100 */
  3507. +   0xc6, /* 11000110 */
  3508. +   0x06, /* 00000110 */
  3509. +   0x1c, /* 00011100 */
  3510. +   0x06, /* 00000110 */
  3511. +   0xc6, /* 11000110 */
  3512. +   0x7c, /* 01111100 */
  3513. +   0x00, /* 00000000 */
  3514. +
  3515. +   /* 52 0x34 '4' */
  3516. +   0x1c, /* 00011100 */
  3517. +   0x3c, /* 00111100 */
  3518. +   0x6c, /* 01101100 */
  3519. +   0xcc, /* 11001100 */
  3520. +   0xfe, /* 11111110 */
  3521. +   0x0c, /* 00001100 */
  3522. +   0x0c, /* 00001100 */
  3523. +   0x00, /* 00000000 */
  3524. +
  3525. +   /* 53 0x35 '5' */
  3526. +   0xfe, /* 11111110 */
  3527. +   0xc0, /* 11000000 */
  3528. +   0xfc, /* 11111100 */
  3529. +   0x06, /* 00000110 */
  3530. +   0x06, /* 00000110 */
  3531. +   0xc6, /* 11000110 */
  3532. +   0x7c, /* 01111100 */
  3533. +   0x00, /* 00000000 */
  3534. +
  3535. +   /* 54 0x36 '6' */
  3536. +   0x38, /* 00111000 */
  3537. +   0x60, /* 01100000 */
  3538. +   0xc0, /* 11000000 */
  3539. +   0xfc, /* 11111100 */
  3540. +   0xc6, /* 11000110 */
  3541. +   0xc6, /* 11000110 */
  3542. +   0x7c, /* 01111100 */
  3543. +   0x00, /* 00000000 */
  3544. +
  3545. +   /* 55 0x37 '7' */
  3546. +   0xfe, /* 11111110 */
  3547. +   0x06, /* 00000110 */
  3548. +   0x0c, /* 00001100 */
  3549. +   0x18, /* 00011000 */
  3550. +   0x30, /* 00110000 */
  3551. +   0x60, /* 01100000 */
  3552. +   0x60, /* 01100000 */
  3553. +   0x00, /* 00000000 */
  3554. +
  3555. +   /* 56 0x38 '8' */
  3556. +   0x7c, /* 01111100 */
  3557. +   0xc6, /* 11000110 */
  3558. +   0xc6, /* 11000110 */
  3559. +   0x7c, /* 01111100 */
  3560. +   0xc6, /* 11000110 */
  3561. +   0xc6, /* 11000110 */
  3562. +   0x7c, /* 01111100 */
  3563. +   0x00, /* 00000000 */
  3564. +
  3565. +   /* 57 0x39 '9' */
  3566. +   0x7c, /* 01111100 */
  3567. +   0xc6, /* 11000110 */
  3568. +   0xc6, /* 11000110 */
  3569. +   0x7e, /* 01111110 */
  3570. +   0x06, /* 00000110 */
  3571. +   0x0c, /* 00001100 */
  3572. +   0x38, /* 00111000 */
  3573. +   0x00, /* 00000000 */
  3574. +
  3575. +   /* 58 0x3a ':' */
  3576. +   0x00, /* 00000000 */
  3577. +   0x18, /* 00011000 */
  3578. +   0x18, /* 00011000 */
  3579. +   0x00, /* 00000000 */
  3580. +   0x00, /* 00000000 */
  3581. +   0x18, /* 00011000 */
  3582. +   0x18, /* 00011000 */
  3583. +   0x00, /* 00000000 */
  3584. +
  3585. +   /* 59 0x3b ';' */
  3586. +   0x00, /* 00000000 */
  3587. +   0x18, /* 00011000 */
  3588. +   0x18, /* 00011000 */
  3589. +   0x00, /* 00000000 */
  3590. +   0x00, /* 00000000 */
  3591. +   0x18, /* 00011000 */
  3592. +   0x18, /* 00011000 */
  3593. +   0x30, /* 00110000 */
  3594. +
  3595. +   /* 60 0x3c '<' */
  3596. +   0x0c, /* 00001100 */
  3597. +   0x18, /* 00011000 */
  3598. +   0x30, /* 00110000 */
  3599. +   0x60, /* 01100000 */
  3600. +   0x30, /* 00110000 */
  3601. +   0x18, /* 00011000 */
  3602. +   0x0c, /* 00001100 */
  3603. +   0x00, /* 00000000 */
  3604. +
  3605. +   /* 61 0x3d '=' */
  3606. +   0x00, /* 00000000 */
  3607. +   0x00, /* 00000000 */
  3608. +   0x7e, /* 01111110 */
  3609. +   0x00, /* 00000000 */
  3610. +   0x00, /* 00000000 */
  3611. +   0x7e, /* 01111110 */
  3612. +   0x00, /* 00000000 */
  3613. +   0x00, /* 00000000 */
  3614. +
  3615. +   /* 62 0x3e '>' */
  3616. +   0x30, /* 00110000 */
  3617. +   0x18, /* 00011000 */
  3618. +   0x0c, /* 00001100 */
  3619. +   0x06, /* 00000110 */
  3620. +   0x0c, /* 00001100 */
  3621. +   0x18, /* 00011000 */
  3622. +   0x30, /* 00110000 */
  3623. +   0x00, /* 00000000 */
  3624. +
  3625. +   /* 63 0x3f '?' */
  3626. +   0x3c, /* 00111100 */
  3627. +   0x66, /* 01100110 */
  3628. +   0x06, /* 00000110 */
  3629. +   0x0c, /* 00001100 */
  3630. +   0x18, /* 00011000 */
  3631. +   0x00, /* 00000000 */
  3632. +   0x18, /* 00011000 */
  3633. +   0x00, /* 00000000 */
  3634. +
  3635. +   /* 64 0x40 '@' */
  3636. +   0x7c, /* 01111100 */
  3637. +   0xc6, /* 11000110 */
  3638. +   0xde, /* 11011110 */
  3639. +   0xde, /* 11011110 */
  3640. +   0xde, /* 11011110 */
  3641. +   0xc0, /* 11000000 */
  3642. +   0x7c, /* 01111100 */
  3643. +   0x00, /* 00000000 */
  3644. +
  3645. +   /* 65 0x41 'A' */
  3646. +   0x10, /* 00010000 */
  3647. +   0x38, /* 00111000 */
  3648. +   0x6c, /* 01101100 */
  3649. +   0xc6, /* 11000110 */
  3650. +   0xfe, /* 11111110 */
  3651. +   0xc6, /* 11000110 */
  3652. +   0xc6, /* 11000110 */
  3653. +   0x00, /* 00000000 */
  3654. +
  3655. +   /* 66 0x42 'B' */
  3656. +   0xfc, /* 11111100 */
  3657. +   0xc6, /* 11000110 */
  3658. +   0xc6, /* 11000110 */
  3659. +   0xfc, /* 11111100 */
  3660. +   0xc6, /* 11000110 */
  3661. +   0xc6, /* 11000110 */
  3662. +   0xfc, /* 11111100 */
  3663. +   0x00, /* 00000000 */
  3664. +
  3665. +   /* 67 0x43 'C' */
  3666. +   0x7c, /* 01111100 */
  3667. +   0xc6, /* 11000110 */
  3668. +   0xc0, /* 11000000 */
  3669. +   0xc0, /* 11000000 */
  3670. +   0xc0, /* 11000000 */
  3671. +   0xc6, /* 11000110 */
  3672. +   0x7c, /* 01111100 */
  3673. +   0x00, /* 00000000 */
  3674. +
  3675. +   /* 68 0x44 'D' */
  3676. +   0xfc, /* 11111100 */
  3677. +   0xc6, /* 11000110 */
  3678. +   0xc6, /* 11000110 */
  3679. +   0xc6, /* 11000110 */
  3680. +   0xc6, /* 11000110 */
  3681. +   0xc6, /* 11000110 */
  3682. +   0xfc, /* 11111100 */
  3683. +   0x00, /* 00000000 */
  3684. +
  3685. +   /* 69 0x45 'E' */
  3686. +   0xfe, /* 11111110 */
  3687. +   0xc0, /* 11000000 */
  3688. +   0xc0, /* 11000000 */
  3689. +   0xf8, /* 11111000 */
  3690. +   0xc0, /* 11000000 */
  3691. +   0xc0, /* 11000000 */
  3692. +   0xfe, /* 11111110 */
  3693. +   0x00, /* 00000000 */
  3694. +
  3695. +   /* 70 0x46 'F' */
  3696. +   0xfe, /* 11111110 */
  3697. +   0xc0, /* 11000000 */
  3698. +   0xc0, /* 11000000 */
  3699. +   0xf8, /* 11111000 */
  3700. +   0xc0, /* 11000000 */
  3701. +   0xc0, /* 11000000 */
  3702. +   0xc0, /* 11000000 */
  3703. +   0x00, /* 00000000 */
  3704. +
  3705. +   /* 71 0x47 'G' */
  3706. +   0x7c, /* 01111100 */
  3707. +   0xc6, /* 11000110 */
  3708. +   0xc0, /* 11000000 */
  3709. +   0xce, /* 11001110 */
  3710. +   0xc6, /* 11000110 */
  3711. +   0xc6, /* 11000110 */
  3712. +   0x7c, /* 01111100 */
  3713. +   0x00, /* 00000000 */
  3714. +
  3715. +   /* 72 0x48 'H' */
  3716. +   0xc6, /* 11000110 */
  3717. +   0xc6, /* 11000110 */
  3718. +   0xc6, /* 11000110 */
  3719. +   0xfe, /* 11111110 */
  3720. +   0xc6, /* 11000110 */
  3721. +   0xc6, /* 11000110 */
  3722. +   0xc6, /* 11000110 */
  3723. +   0x00, /* 00000000 */
  3724. +
  3725. +   /* 73 0x49 'I' */
  3726. +   0x7e, /* 01111110 */
  3727. +   0x18, /* 00011000 */
  3728. +   0x18, /* 00011000 */
  3729. +   0x18, /* 00011000 */
  3730. +   0x18, /* 00011000 */
  3731. +   0x18, /* 00011000 */
  3732. +   0x7e, /* 01111110 */
  3733. +   0x00, /* 00000000 */
  3734. +
  3735. +   /* 74 0x4a 'J' */
  3736. +   0x06, /* 00000110 */
  3737. +   0x06, /* 00000110 */
  3738. +   0x06, /* 00000110 */
  3739. +   0x06, /* 00000110 */
  3740. +   0xc6, /* 11000110 */
  3741. +   0xc6, /* 11000110 */
  3742. +   0x7c, /* 01111100 */
  3743. +   0x00, /* 00000000 */
  3744. +
  3745. +   /* 75 0x4b 'K' */
  3746. +   0xc6, /* 11000110 */
  3747. +   0xcc, /* 11001100 */
  3748. +   0xd8, /* 11011000 */
  3749. +   0xf0, /* 11110000 */
  3750. +   0xd8, /* 11011000 */
  3751. +   0xcc, /* 11001100 */
  3752. +   0xc6, /* 11000110 */
  3753. +   0x00, /* 00000000 */
  3754. +
  3755. +   /* 76 0x4c 'L' */
  3756. +   0xc0, /* 11000000 */
  3757. +   0xc0, /* 11000000 */
  3758. +   0xc0, /* 11000000 */
  3759. +   0xc0, /* 11000000 */
  3760. +   0xc0, /* 11000000 */
  3761. +   0xc0, /* 11000000 */
  3762. +   0xfe, /* 11111110 */
  3763. +   0x00, /* 00000000 */
  3764. +
  3765. +   /* 77 0x4d 'M' */
  3766. +   0x82, /* 10000010 */
  3767. +   0xc6, /* 11000110 */
  3768. +   0xee, /* 11101110 */
  3769. +   0xfe, /* 11111110 */
  3770. +   0xd6, /* 11010110 */
  3771. +   0xc6, /* 11000110 */
  3772. +   0xc6, /* 11000110 */
  3773. +   0x00, /* 00000000 */
  3774. +
  3775. +   /* 78 0x4e 'N' */
  3776. +   0xc6, /* 11000110 */
  3777. +   0xe6, /* 11100110 */
  3778. +   0xf6, /* 11110110 */
  3779. +   0xde, /* 11011110 */
  3780. +   0xce, /* 11001110 */
  3781. +   0xc6, /* 11000110 */
  3782. +   0xc6, /* 11000110 */
  3783. +   0x00, /* 00000000 */
  3784. +
  3785. +   /* 79 0x4f 'O' */
  3786. +   0x7c, /* 01111100 */
  3787. +   0xc6, /* 11000110 */
  3788. +   0xc6, /* 11000110 */
  3789. +   0xc6, /* 11000110 */
  3790. +   0xc6, /* 11000110 */
  3791. +   0xc6, /* 11000110 */
  3792. +   0x7c, /* 01111100 */
  3793. +   0x00, /* 00000000 */
  3794. +
  3795. +   /* 80 0x50 'P' */
  3796. +   0xfc, /* 11111100 */
  3797. +   0xc6, /* 11000110 */
  3798. +   0xc6, /* 11000110 */
  3799. +   0xfc, /* 11111100 */
  3800. +   0xc0, /* 11000000 */
  3801. +   0xc0, /* 11000000 */
  3802. +   0xc0, /* 11000000 */
  3803. +   0x00, /* 00000000 */
  3804. +
  3805. +   /* 81 0x51 'Q' */
  3806. +   0x7c, /* 01111100 */
  3807. +   0xc6, /* 11000110 */
  3808. +   0xc6, /* 11000110 */
  3809. +   0xc6, /* 11000110 */
  3810. +   0xf6, /* 11110110 */
  3811. +   0xde, /* 11011110 */
  3812. +   0x7c, /* 01111100 */
  3813. +   0x06, /* 00000110 */
  3814. +
  3815. +   /* 82 0x52 'R' */
  3816. +   0xfc, /* 11111100 */
  3817. +   0xc6, /* 11000110 */
  3818. +   0xc6, /* 11000110 */
  3819. +   0xfc, /* 11111100 */
  3820. +   0xd8, /* 11011000 */
  3821. +   0xcc, /* 11001100 */
  3822. +   0xc6, /* 11000110 */
  3823. +   0x00, /* 00000000 */
  3824. +
  3825. +   /* 83 0x53 'S' */
  3826. +   0x7c, /* 01111100 */
  3827. +   0xc6, /* 11000110 */
  3828. +   0x60, /* 01100000 */
  3829. +   0x38, /* 00111000 */
  3830. +   0x0c, /* 00001100 */
  3831. +   0xc6, /* 11000110 */
  3832. +   0x7c, /* 01111100 */
  3833. +   0x00, /* 00000000 */
  3834. +
  3835. +   /* 84 0x54 'T' */
  3836. +   0x7e, /* 01111110 */
  3837. +   0x18, /* 00011000 */
  3838. +   0x18, /* 00011000 */
  3839. +   0x18, /* 00011000 */
  3840. +   0x18, /* 00011000 */
  3841. +   0x18, /* 00011000 */
  3842. +   0x18, /* 00011000 */
  3843. +   0x00, /* 00000000 */
  3844. +
  3845. +   /* 85 0x55 'U' */
  3846. +   0xc6, /* 11000110 */
  3847. +   0xc6, /* 11000110 */
  3848. +   0xc6, /* 11000110 */
  3849. +   0xc6, /* 11000110 */
  3850. +   0xc6, /* 11000110 */
  3851. +   0xc6, /* 11000110 */
  3852. +   0x7c, /* 01111100 */
  3853. +   0x00, /* 00000000 */
  3854. +
  3855. +   /* 86 0x56 'V' */
  3856. +   0xc3, /* 11000011 */
  3857. +   0xc3, /* 11000011 */
  3858. +   0x66, /* 01100110 */
  3859. +   0x66, /* 01100110 */
  3860. +   0x3c, /* 00111100 */
  3861. +   0x3c, /* 00111100 */
  3862. +   0x18, /* 00011000 */
  3863. +   0x00, /* 00000000 */
  3864. +
  3865. +   /* 87 0x57 'W' */
  3866. +   0xc6, /* 11000110 */
  3867. +   0xc6, /* 11000110 */
  3868. +   0xc6, /* 11000110 */
  3869. +   0xd6, /* 11010110 */
  3870. +   0xfe, /* 11111110 */
  3871. +   0xee, /* 11101110 */
  3872. +   0xc6, /* 11000110 */
  3873. +   0x00, /* 00000000 */
  3874. +
  3875. +   /* 88 0x58 'X' */
  3876. +   0xc3, /* 11000011 */
  3877. +   0x66, /* 01100110 */
  3878. +   0x3c, /* 00111100 */
  3879. +   0x18, /* 00011000 */
  3880. +   0x3c, /* 00111100 */
  3881. +   0x66, /* 01100110 */
  3882. +   0xc3, /* 11000011 */
  3883. +   0x00, /* 00000000 */
  3884. +
  3885. +   /* 89 0x59 'Y' */
  3886. +   0xc3, /* 11000011 */
  3887. +   0xc3, /* 11000011 */
  3888. +   0x66, /* 01100110 */
  3889. +   0x3c, /* 00111100 */
  3890. +   0x18, /* 00011000 */
  3891. +   0x18, /* 00011000 */
  3892. +   0x18, /* 00011000 */
  3893. +   0x00, /* 00000000 */
  3894. +
  3895. +   /* 90 0x5a 'Z' */
  3896. +   0xfe, /* 11111110 */
  3897. +   0x06, /* 00000110 */
  3898. +   0x0c, /* 00001100 */
  3899. +   0x18, /* 00011000 */
  3900. +   0x30, /* 00110000 */
  3901. +   0x60, /* 01100000 */
  3902. +   0xfe, /* 11111110 */
  3903. +   0x00, /* 00000000 */
  3904. +
  3905. +   /* 91 0x5b '[' */
  3906. +   0x3c, /* 00111100 */
  3907. +   0x30, /* 00110000 */
  3908. +   0x30, /* 00110000 */
  3909. +   0x30, /* 00110000 */
  3910. +   0x30, /* 00110000 */
  3911. +   0x30, /* 00110000 */
  3912. +   0x3c, /* 00111100 */
  3913. +   0x00, /* 00000000 */
  3914. +
  3915. +   /* 92 0x5c '\' */
  3916. +   0xc0, /* 11000000 */
  3917. +   0x60, /* 01100000 */
  3918. +   0x30, /* 00110000 */
  3919. +   0x18, /* 00011000 */
  3920. +   0x0c, /* 00001100 */
  3921. +   0x06, /* 00000110 */
  3922. +   0x03, /* 00000011 */
  3923. +   0x00, /* 00000000 */
  3924. +
  3925. +   /* 93 0x5d ']' */
  3926. +   0x3c, /* 00111100 */
  3927. +   0x0c, /* 00001100 */
  3928. +   0x0c, /* 00001100 */
  3929. +   0x0c, /* 00001100 */
  3930. +   0x0c, /* 00001100 */
  3931. +   0x0c, /* 00001100 */
  3932. +   0x3c, /* 00111100 */
  3933. +   0x00, /* 00000000 */
  3934. +
  3935. +   /* 94 0x5e '^' */
  3936. +   0x10, /* 00010000 */
  3937. +   0x38, /* 00111000 */
  3938. +   0x6c, /* 01101100 */
  3939. +   0xc6, /* 11000110 */
  3940. +   0x00, /* 00000000 */
  3941. +   0x00, /* 00000000 */
  3942. +   0x00, /* 00000000 */
  3943. +   0x00, /* 00000000 */
  3944. +
  3945. +   /* 95 0x5f '_' */
  3946. +   0x00, /* 00000000 */
  3947. +   0x00, /* 00000000 */
  3948. +   0x00, /* 00000000 */
  3949. +   0x00, /* 00000000 */
  3950. +   0x00, /* 00000000 */
  3951. +   0x00, /* 00000000 */
  3952. +   0x00, /* 00000000 */
  3953. +   0xfe, /* 11111110 */
  3954. +
  3955. +   /* 96 0x60 '`' */
  3956. +   0x18, /* 00011000 */
  3957. +   0x18, /* 00011000 */
  3958. +   0x0c, /* 00001100 */
  3959. +   0x00, /* 00000000 */
  3960. +   0x00, /* 00000000 */
  3961. +   0x00, /* 00000000 */
  3962. +   0x00, /* 00000000 */
  3963. +   0x00, /* 00000000 */
  3964. +
  3965. +   /* 97 0x61 'a' */
  3966. +   0x00, /* 00000000 */
  3967. +   0x00, /* 00000000 */
  3968. +   0x7c, /* 01111100 */
  3969. +   0x06, /* 00000110 */
  3970. +   0x7e, /* 01111110 */
  3971. +   0xc6, /* 11000110 */
  3972. +   0x7e, /* 01111110 */
  3973. +   0x00, /* 00000000 */
  3974. +
  3975. +   /* 98 0x62 'b' */
  3976. +   0xc0, /* 11000000 */
  3977. +   0xc0, /* 11000000 */
  3978. +   0xfc, /* 11111100 */
  3979. +   0xc6, /* 11000110 */
  3980. +   0xc6, /* 11000110 */
  3981. +   0xc6, /* 11000110 */
  3982. +   0xfc, /* 11111100 */
  3983. +   0x00, /* 00000000 */
  3984. +
  3985. +   /* 99 0x63 'c' */
  3986. +   0x00, /* 00000000 */
  3987. +   0x00, /* 00000000 */
  3988. +   0x7c, /* 01111100 */
  3989. +   0xc6, /* 11000110 */
  3990. +   0xc0, /* 11000000 */
  3991. +   0xc6, /* 11000110 */
  3992. +   0x7c, /* 01111100 */
  3993. +   0x00, /* 00000000 */
  3994. +
  3995. +   /* 100 0x64 'd' */
  3996. +   0x06, /* 00000110 */
  3997. +   0x06, /* 00000110 */
  3998. +   0x7e, /* 01111110 */
  3999. +   0xc6, /* 11000110 */
  4000. +   0xc6, /* 11000110 */
  4001. +   0xc6, /* 11000110 */
  4002. +   0x7e, /* 01111110 */
  4003. +   0x00, /* 00000000 */
  4004. +
  4005. +   /* 101 0x65 'e' */
  4006. +   0x00, /* 00000000 */
  4007. +   0x00, /* 00000000 */
  4008. +   0x7c, /* 01111100 */
  4009. +   0xc6, /* 11000110 */
  4010. +   0xfe, /* 11111110 */
  4011. +   0xc0, /* 11000000 */
  4012. +   0x7c, /* 01111100 */
  4013. +   0x00, /* 00000000 */
  4014. +
  4015. +   /* 102 0x66 'f' */
  4016. +   0x3c, /* 00111100 */
  4017. +   0x66, /* 01100110 */
  4018. +   0x60, /* 01100000 */
  4019. +   0xf0, /* 11110000 */
  4020. +   0x60, /* 01100000 */
  4021. +   0x60, /* 01100000 */
  4022. +   0x60, /* 01100000 */
  4023. +   0x00, /* 00000000 */
  4024. +
  4025. +   /* 103 0x67 'g' */
  4026. +   0x00, /* 00000000 */
  4027. +   0x00, /* 00000000 */
  4028. +   0x7e, /* 01111110 */
  4029. +   0xc6, /* 11000110 */
  4030. +   0xc6, /* 11000110 */
  4031. +   0x7e, /* 01111110 */
  4032. +   0x06, /* 00000110 */
  4033. +   0x7c, /* 01111100 */
  4034. +
  4035. +   /* 104 0x68 'h' */
  4036. +   0xc0, /* 11000000 */
  4037. +   0xc0, /* 11000000 */
  4038. +   0xfc, /* 11111100 */
  4039. +   0xc6, /* 11000110 */
  4040. +   0xc6, /* 11000110 */
  4041. +   0xc6, /* 11000110 */
  4042. +   0xc6, /* 11000110 */
  4043. +   0x00, /* 00000000 */
  4044. +
  4045. +   /* 105 0x69 'i' */
  4046. +   0x18, /* 00011000 */
  4047. +   0x00, /* 00000000 */
  4048. +   0x38, /* 00111000 */
  4049. +   0x18, /* 00011000 */
  4050. +   0x18, /* 00011000 */
  4051. +   0x18, /* 00011000 */
  4052. +   0x18, /* 00011000 */
  4053. +   0x00, /* 00000000 */
  4054. +
  4055. +   /* 106 0x6a 'j' */
  4056. +   0x06, /* 00000110 */
  4057. +   0x00, /* 00000000 */
  4058. +   0x06, /* 00000110 */
  4059. +   0x06, /* 00000110 */
  4060. +   0x06, /* 00000110 */
  4061. +   0x06, /* 00000110 */
  4062. +   0xc6, /* 11000110 */
  4063. +   0x7c, /* 01111100 */
  4064. +
  4065. +   /* 107 0x6b 'k' */
  4066. +   0xc0, /* 11000000 */
  4067. +   0xc0, /* 11000000 */
  4068. +   0xcc, /* 11001100 */
  4069. +   0xd8, /* 11011000 */
  4070. +   0xf0, /* 11110000 */
  4071. +   0xd8, /* 11011000 */
  4072. +   0xcc, /* 11001100 */
  4073. +   0x00, /* 00000000 */
  4074. +
  4075. +   /* 108 0x6c 'l' */
  4076. +   0x38, /* 00111000 */
  4077. +   0x18, /* 00011000 */
  4078. +   0x18, /* 00011000 */
  4079. +   0x18, /* 00011000 */
  4080. +   0x18, /* 00011000 */
  4081. +   0x18, /* 00011000 */
  4082. +   0x18, /* 00011000 */
  4083. +   0x00, /* 00000000 */
  4084. +
  4085. +   /* 109 0x6d 'm' */
  4086. +   0x00, /* 00000000 */
  4087. +   0x00, /* 00000000 */
  4088. +   0xec, /* 11101100 */
  4089. +   0xfe, /* 11111110 */
  4090. +   0xd6, /* 11010110 */
  4091. +   0xc6, /* 11000110 */
  4092. +   0xc6, /* 11000110 */
  4093. +   0x00, /* 00000000 */
  4094. +
  4095. +   /* 110 0x6e 'n' */
  4096. +   0x00, /* 00000000 */
  4097. +   0x00, /* 00000000 */
  4098. +   0xfc, /* 11111100 */
  4099. +   0xc6, /* 11000110 */
  4100. +   0xc6, /* 11000110 */
  4101. +   0xc6, /* 11000110 */
  4102. +   0xc6, /* 11000110 */
  4103. +   0x00, /* 00000000 */
  4104. +
  4105. +   /* 111 0x6f 'o' */
  4106. +   0x00, /* 00000000 */
  4107. +   0x00, /* 00000000 */
  4108. +   0x7c, /* 01111100 */
  4109. +   0xc6, /* 11000110 */
  4110. +   0xc6, /* 11000110 */
  4111. +   0xc6, /* 11000110 */
  4112. +   0x7c, /* 01111100 */
  4113. +   0x00, /* 00000000 */
  4114. +
  4115. +   /* 112 0x70 'p' */
  4116. +   0x00, /* 00000000 */
  4117. +   0x00, /* 00000000 */
  4118. +   0xfc, /* 11111100 */
  4119. +   0xc6, /* 11000110 */
  4120. +   0xc6, /* 11000110 */
  4121. +   0xfc, /* 11111100 */
  4122. +   0xc0, /* 11000000 */
  4123. +   0xc0, /* 11000000 */
  4124. +
  4125. +   /* 113 0x71 'q' */
  4126. +   0x00, /* 00000000 */
  4127. +   0x00, /* 00000000 */
  4128. +   0x7e, /* 01111110 */
  4129. +   0xc6, /* 11000110 */
  4130. +   0xc6, /* 11000110 */
  4131. +   0x7e, /* 01111110 */
  4132. +   0x06, /* 00000110 */
  4133. +   0x06, /* 00000110 */
  4134. +
  4135. +   /* 114 0x72 'r' */
  4136. +   0x00, /* 00000000 */
  4137. +   0x00, /* 00000000 */
  4138. +   0xdc, /* 11011100 */
  4139. +   0xe6, /* 11100110 */
  4140. +   0xc0, /* 11000000 */
  4141. +   0xc0, /* 11000000 */
  4142. +   0xc0, /* 11000000 */
  4143. +   0x00, /* 00000000 */
  4144. +
  4145. +   /* 115 0x73 's' */
  4146. +   0x00, /* 00000000 */
  4147. +   0x00, /* 00000000 */
  4148. +   0x7e, /* 01111110 */
  4149. +   0xc0, /* 11000000 */
  4150. +   0x7c, /* 01111100 */
  4151. +   0x06, /* 00000110 */
  4152. +   0xfc, /* 11111100 */
  4153. +   0x00, /* 00000000 */
  4154. +
  4155. +   /* 116 0x74 't' */
  4156. +   0x30, /* 00110000 */
  4157. +   0x30, /* 00110000 */
  4158. +   0x7c, /* 01111100 */
  4159. +   0x30, /* 00110000 */
  4160. +   0x30, /* 00110000 */
  4161. +   0x36, /* 00110110 */
  4162. +   0x1c, /* 00011100 */
  4163. +   0x00, /* 00000000 */
  4164. +
  4165. +   /* 117 0x75 'u' */
  4166. +   0x00, /* 00000000 */
  4167. +   0x00, /* 00000000 */
  4168. +   0xc6, /* 11000110 */
  4169. +   0xc6, /* 11000110 */
  4170. +   0xc6, /* 11000110 */
  4171. +   0xc6, /* 11000110 */
  4172. +   0x7c, /* 01111100 */
  4173. +   0x00, /* 00000000 */
  4174. +
  4175. +   /* 118 0x76 'v' */
  4176. +   0x00, /* 00000000 */
  4177. +   0x00, /* 00000000 */
  4178. +   0xc6, /* 11000110 */
  4179. +   0xc6, /* 11000110 */
  4180. +   0xc6, /* 11000110 */
  4181. +   0x6c, /* 01101100 */
  4182. +   0x38, /* 00111000 */
  4183. +   0x00, /* 00000000 */
  4184. +
  4185. +   /* 119 0x77 'w' */
  4186. +   0x00, /* 00000000 */
  4187. +   0x00, /* 00000000 */
  4188. +   0xc6, /* 11000110 */
  4189. +   0xc6, /* 11000110 */
  4190. +   0xd6, /* 11010110 */
  4191. +   0xfe, /* 11111110 */
  4192. +   0x6c, /* 01101100 */
  4193. +   0x00, /* 00000000 */
  4194. +
  4195. +   /* 120 0x78 'x' */
  4196. +   0x00, /* 00000000 */
  4197. +   0x00, /* 00000000 */
  4198. +   0xc6, /* 11000110 */
  4199. +   0x6c, /* 01101100 */
  4200. +   0x38, /* 00111000 */
  4201. +   0x6c, /* 01101100 */
  4202. +   0xc6, /* 11000110 */
  4203. +   0x00, /* 00000000 */
  4204. +
  4205. +   /* 121 0x79 'y' */
  4206. +   0x00, /* 00000000 */
  4207. +   0x00, /* 00000000 */
  4208. +   0xc3, /* 11000011 */
  4209. +   0x66, /* 01100110 */
  4210. +   0x3c, /* 00111100 */
  4211. +   0x18, /* 00011000 */
  4212. +   0x30, /* 00110000 */
  4213. +   0x60, /* 01100000 */
  4214. +
  4215. +   /* 122 0x7a 'z' */
  4216. +   0x00, /* 00000000 */
  4217. +   0x00, /* 00000000 */
  4218. +   0xfe, /* 11111110 */
  4219. +   0x0c, /* 00001100 */
  4220. +   0x38, /* 00111000 */
  4221. +   0x60, /* 01100000 */
  4222. +   0xfe, /* 11111110 */
  4223. +   0x00, /* 00000000 */
  4224. +
  4225. +   /* 123 0x7b '{' */
  4226. +   0x0e, /* 00001110 */
  4227. +   0x18, /* 00011000 */
  4228. +   0x18, /* 00011000 */
  4229. +   0x70, /* 01110000 */
  4230. +   0x18, /* 00011000 */
  4231. +   0x18, /* 00011000 */
  4232. +   0x0e, /* 00001110 */
  4233. +   0x00, /* 00000000 */
  4234. +
  4235. +   /* 124 0x7c '|' */
  4236. +   0x18, /* 00011000 */
  4237. +   0x18, /* 00011000 */
  4238. +   0x18, /* 00011000 */
  4239. +   0x18, /* 00011000 */
  4240. +   0x18, /* 00011000 */
  4241. +   0x18, /* 00011000 */
  4242. +   0x18, /* 00011000 */
  4243. +   0x00, /* 00000000 */
  4244. +
  4245. +   /* 125 0x7d '}' */
  4246. +   0x70, /* 01110000 */
  4247. +   0x18, /* 00011000 */
  4248. +   0x18, /* 00011000 */
  4249. +   0x0e, /* 00001110 */
  4250. +   0x18, /* 00011000 */
  4251. +   0x18, /* 00011000 */
  4252. +   0x70, /* 01110000 */
  4253. +   0x00, /* 00000000 */
  4254. +
  4255. +   /* 126 0x7e '~' */
  4256. +   0x72, /* 01110010 */
  4257. +   0x9c, /* 10011100 */
  4258. +   0x00, /* 00000000 */
  4259. +   0x00, /* 00000000 */
  4260. +   0x00, /* 00000000 */
  4261. +   0x00, /* 00000000 */
  4262. +   0x00, /* 00000000 */
  4263. +   0x00, /* 00000000 */
  4264. +
  4265. +   /* 127 0x7f '' */
  4266. +   0x00, /* 00000000 */
  4267. +   0x10, /* 00010000 */
  4268. +   0x38, /* 00111000 */
  4269. +   0x6c, /* 01101100 */
  4270. +   0xc6, /* 11000110 */
  4271. +   0xc6, /* 11000110 */
  4272. +   0xfe, /* 11111110 */
  4273. +   0x00, /* 00000000 */
  4274. +
  4275. +   /* 128 0x80 'Ç' */
  4276. +   0x7c, /* 01111100 */
  4277. +   0xc6, /* 11000110 */
  4278. +   0xc0, /* 11000000 */
  4279. +   0xc0, /* 11000000 */
  4280. +   0xc6, /* 11000110 */
  4281. +   0x7c, /* 01111100 */
  4282. +   0x0c, /* 00001100 */
  4283. +   0x78, /* 01111000 */
  4284. +
  4285. +   /* 129 0x81 'ü' */
  4286. +   0xcc, /* 11001100 */
  4287. +   0x00, /* 00000000 */
  4288. +   0xcc, /* 11001100 */
  4289. +   0xcc, /* 11001100 */
  4290. +   0xcc, /* 11001100 */
  4291. +   0xcc, /* 11001100 */
  4292. +   0x76, /* 01110110 */
  4293. +   0x00, /* 00000000 */
  4294. +
  4295. +   /* 130 0x82 'é' */
  4296. +   0x0c, /* 00001100 */
  4297. +   0x18, /* 00011000 */
  4298. +   0x7c, /* 01111100 */
  4299. +   0xc6, /* 11000110 */
  4300. +   0xfe, /* 11111110 */
  4301. +   0xc0, /* 11000000 */
  4302. +   0x7c, /* 01111100 */
  4303. +   0x00, /* 00000000 */
  4304. +
  4305. +   /* 131 0x83 'â' */
  4306. +   0x7c, /* 01111100 */
  4307. +   0x82, /* 10000010 */
  4308. +   0x78, /* 01111000 */
  4309. +   0x0c, /* 00001100 */
  4310. +   0x7c, /* 01111100 */
  4311. +   0xcc, /* 11001100 */
  4312. +   0x76, /* 01110110 */
  4313. +   0x00, /* 00000000 */
  4314. +
  4315. +   /* 132 0x84 'ä' */
  4316. +   0xc6, /* 11000110 */
  4317. +   0x00, /* 00000000 */
  4318. +   0x78, /* 01111000 */
  4319. +   0x0c, /* 00001100 */
  4320. +   0x7c, /* 01111100 */
  4321. +   0xcc, /* 11001100 */
  4322. +   0x76, /* 01110110 */
  4323. +   0x00, /* 00000000 */
  4324. +
  4325. +   /* 133 0x85 'à' */
  4326. +   0x30, /* 00110000 */
  4327. +   0x18, /* 00011000 */
  4328. +   0x78, /* 01111000 */
  4329. +   0x0c, /* 00001100 */
  4330. +   0x7c, /* 01111100 */
  4331. +   0xcc, /* 11001100 */
  4332. +   0x76, /* 01110110 */
  4333. +   0x00, /* 00000000 */
  4334. +
  4335. +   /* 134 0x86 'å' */
  4336. +   0x30, /* 00110000 */
  4337. +   0x30, /* 00110000 */
  4338. +   0x78, /* 01111000 */
  4339. +   0x0c, /* 00001100 */
  4340. +   0x7c, /* 01111100 */
  4341. +   0xcc, /* 11001100 */
  4342. +   0x76, /* 01110110 */
  4343. +   0x00, /* 00000000 */
  4344. +
  4345. +   /* 135 0x87 'ç' */
  4346. +   0x00, /* 00000000 */
  4347. +   0x00, /* 00000000 */
  4348. +   0x7e, /* 01111110 */
  4349. +   0xc0, /* 11000000 */
  4350. +   0xc0, /* 11000000 */
  4351. +   0x7e, /* 01111110 */
  4352. +   0x0c, /* 00001100 */
  4353. +   0x38, /* 00111000 */
  4354. +
  4355. +   /* 136 0x88 'ê' */
  4356. +   0x7c, /* 01111100 */
  4357. +   0x82, /* 10000010 */
  4358. +   0x7c, /* 01111100 */
  4359. +   0xc6, /* 11000110 */
  4360. +   0xfe, /* 11111110 */
  4361. +   0xc0, /* 11000000 */
  4362. +   0x7c, /* 01111100 */
  4363. +   0x00, /* 00000000 */
  4364. +
  4365. +   /* 137 0x89 'ë' */
  4366. +   0xc6, /* 11000110 */
  4367. +   0x00, /* 00000000 */
  4368. +   0x7c, /* 01111100 */
  4369. +   0xc6, /* 11000110 */
  4370. +   0xfe, /* 11111110 */
  4371. +   0xc0, /* 11000000 */
  4372. +   0x7c, /* 01111100 */
  4373. +   0x00, /* 00000000 */
  4374. +
  4375. +   /* 138 0x8a 'è' */
  4376. +   0x30, /* 00110000 */
  4377. +   0x18, /* 00011000 */
  4378. +   0x7c, /* 01111100 */
  4379. +   0xc6, /* 11000110 */
  4380. +   0xfe, /* 11111110 */
  4381. +   0xc0, /* 11000000 */
  4382. +   0x7c, /* 01111100 */
  4383. +   0x00, /* 00000000 */
  4384. +
  4385. +   /* 139 0x8b 'ï' */
  4386. +   0x66, /* 01100110 */
  4387. +   0x00, /* 00000000 */
  4388. +   0x38, /* 00111000 */
  4389. +   0x18, /* 00011000 */
  4390. +   0x18, /* 00011000 */
  4391. +   0x18, /* 00011000 */
  4392. +   0x3c, /* 00111100 */
  4393. +   0x00, /* 00000000 */
  4394. +
  4395. +   /* 140 0x8c 'î' */
  4396. +   0x7c, /* 01111100 */
  4397. +   0x82, /* 10000010 */
  4398. +   0x38, /* 00111000 */
  4399. +   0x18, /* 00011000 */
  4400. +   0x18, /* 00011000 */
  4401. +   0x18, /* 00011000 */
  4402. +   0x3c, /* 00111100 */
  4403. +   0x00, /* 00000000 */
  4404. +
  4405. +   /* 141 0x8d 'ì' */
  4406. +   0x30, /* 00110000 */
  4407. +   0x18, /* 00011000 */
  4408. +   0x00, /* 00000000 */
  4409. +   0x38, /* 00111000 */
  4410. +   0x18, /* 00011000 */
  4411. +   0x18, /* 00011000 */
  4412. +   0x3c, /* 00111100 */
  4413. +   0x00, /* 00000000 */
  4414. +
  4415. +   /* 142 0x8e 'Ä' */
  4416. +   0xc6, /* 11000110 */
  4417. +   0x38, /* 00111000 */
  4418. +   0x6c, /* 01101100 */
  4419. +   0xc6, /* 11000110 */
  4420. +   0xfe, /* 11111110 */
  4421. +   0xc6, /* 11000110 */
  4422. +   0xc6, /* 11000110 */
  4423. +   0x00, /* 00000000 */
  4424. +
  4425. +   /* 143 0x8f 'Å' */
  4426. +   0x38, /* 00111000 */
  4427. +   0x6c, /* 01101100 */
  4428. +   0x7c, /* 01111100 */
  4429. +   0xc6, /* 11000110 */
  4430. +   0xfe, /* 11111110 */
  4431. +   0xc6, /* 11000110 */
  4432. +   0xc6, /* 11000110 */
  4433. +   0x00, /* 00000000 */
  4434. +
  4435. +   /* 144 0x90 'É' */
  4436. +   0x18, /* 00011000 */
  4437. +   0x30, /* 00110000 */
  4438. +   0xfe, /* 11111110 */
  4439. +   0xc0, /* 11000000 */
  4440. +   0xf8, /* 11111000 */
  4441. +   0xc0, /* 11000000 */
  4442. +   0xfe, /* 11111110 */
  4443. +   0x00, /* 00000000 */
  4444. +
  4445. +   /* 145 0x91 'æ' */
  4446. +   0x00, /* 00000000 */
  4447. +   0x00, /* 00000000 */
  4448. +   0x7e, /* 01111110 */
  4449. +   0x18, /* 00011000 */
  4450. +   0x7e, /* 01111110 */
  4451. +   0xd8, /* 11011000 */
  4452. +   0x7e, /* 01111110 */
  4453. +   0x00, /* 00000000 */
  4454. +
  4455. +   /* 146 0x92 'Æ' */
  4456. +   0x3e, /* 00111110 */
  4457. +   0x6c, /* 01101100 */
  4458. +   0xcc, /* 11001100 */
  4459. +   0xfe, /* 11111110 */
  4460. +   0xcc, /* 11001100 */
  4461. +   0xcc, /* 11001100 */
  4462. +   0xce, /* 11001110 */
  4463. +   0x00, /* 00000000 */
  4464. +
  4465. +   /* 147 0x93 'ô' */
  4466. +   0x7c, /* 01111100 */
  4467. +   0x82, /* 10000010 */
  4468. +   0x7c, /* 01111100 */
  4469. +   0xc6, /* 11000110 */
  4470. +   0xc6, /* 11000110 */
  4471. +   0xc6, /* 11000110 */
  4472. +   0x7c, /* 01111100 */
  4473. +   0x00, /* 00000000 */
  4474. +
  4475. +   /* 148 0x94 'ö' */
  4476. +   0xc6, /* 11000110 */
  4477. +   0x00, /* 00000000 */
  4478. +   0x7c, /* 01111100 */
  4479. +   0xc6, /* 11000110 */
  4480. +   0xc6, /* 11000110 */
  4481. +   0xc6, /* 11000110 */
  4482. +   0x7c, /* 01111100 */
  4483. +   0x00, /* 00000000 */
  4484. +
  4485. +   /* 149 0x95 'ò' */
  4486. +   0x30, /* 00110000 */
  4487. +   0x18, /* 00011000 */
  4488. +   0x7c, /* 01111100 */
  4489. +   0xc6, /* 11000110 */
  4490. +   0xc6, /* 11000110 */
  4491. +   0xc6, /* 11000110 */
  4492. +   0x7c, /* 01111100 */
  4493. +   0x00, /* 00000000 */
  4494. +
  4495. +   /* 150 0x96 'û' */
  4496. +   0x78, /* 01111000 */
  4497. +   0x84, /* 10000100 */
  4498. +   0x00, /* 00000000 */
  4499. +   0xcc, /* 11001100 */
  4500. +   0xcc, /* 11001100 */
  4501. +   0xcc, /* 11001100 */
  4502. +   0x76, /* 01110110 */
  4503. +   0x00, /* 00000000 */
  4504. +
  4505. +   /* 151 0x97 'ù' */
  4506. +   0x60, /* 01100000 */
  4507. +   0x30, /* 00110000 */
  4508. +   0xcc, /* 11001100 */
  4509. +   0xcc, /* 11001100 */
  4510. +   0xcc, /* 11001100 */
  4511. +   0xcc, /* 11001100 */
  4512. +   0x76, /* 01110110 */
  4513. +   0x00, /* 00000000 */
  4514. +
  4515. +   /* 152 0x98 'ÿ' */
  4516. +   0xc6, /* 11000110 */
  4517. +   0x00, /* 00000000 */
  4518. +   0xc6, /* 11000110 */
  4519. +   0xc6, /* 11000110 */
  4520. +   0xc6, /* 11000110 */
  4521. +   0x7e, /* 01111110 */
  4522. +   0x06, /* 00000110 */
  4523. +   0xfc, /* 11111100 */
  4524. +
  4525. +   /* 153 0x99 'Ö' */
  4526. +   0xc6, /* 11000110 */
  4527. +   0x38, /* 00111000 */
  4528. +   0x6c, /* 01101100 */
  4529. +   0xc6, /* 11000110 */
  4530. +   0xc6, /* 11000110 */
  4531. +   0x6c, /* 01101100 */
  4532. +   0x38, /* 00111000 */
  4533. +   0x00, /* 00000000 */
  4534. +
  4535. +   /* 154 0x9a 'Ü' */
  4536. +   0xc6, /* 11000110 */
  4537. +   0x00, /* 00000000 */
  4538. +   0xc6, /* 11000110 */
  4539. +   0xc6, /* 11000110 */
  4540. +   0xc6, /* 11000110 */
  4541. +   0xc6, /* 11000110 */
  4542. +   0x7c, /* 01111100 */
  4543. +   0x00, /* 00000000 */
  4544. +
  4545. +   /* 155 0x9b '¢' */
  4546. +   0x18, /* 00011000 */
  4547. +   0x18, /* 00011000 */
  4548. +   0x7e, /* 01111110 */
  4549. +   0xc0, /* 11000000 */
  4550. +   0xc0, /* 11000000 */
  4551. +   0x7e, /* 01111110 */
  4552. +   0x18, /* 00011000 */
  4553. +   0x18, /* 00011000 */
  4554. +
  4555. +   /* 156 0x9c '£' */
  4556. +   0x38, /* 00111000 */
  4557. +   0x6c, /* 01101100 */
  4558. +   0x64, /* 01100100 */
  4559. +   0xf0, /* 11110000 */
  4560. +   0x60, /* 01100000 */
  4561. +   0x66, /* 01100110 */
  4562. +   0xfc, /* 11111100 */
  4563. +   0x00, /* 00000000 */
  4564. +
  4565. +   /* 157 0x9d '¥' */
  4566. +   0x66, /* 01100110 */
  4567. +   0x66, /* 01100110 */
  4568. +   0x3c, /* 00111100 */
  4569. +   0x7e, /* 01111110 */
  4570. +   0x18, /* 00011000 */
  4571. +   0x7e, /* 01111110 */
  4572. +   0x18, /* 00011000 */
  4573. +   0x18, /* 00011000 */
  4574. +
  4575. +   /* 158 0x9e '₧' */
  4576. +   0xf8, /* 11111000 */
  4577. +   0xcc, /* 11001100 */
  4578. +   0xcc, /* 11001100 */
  4579. +   0xfa, /* 11111010 */
  4580. +   0xc6, /* 11000110 */
  4581. +   0xcf, /* 11001111 */
  4582. +   0xc6, /* 11000110 */
  4583. +   0xc7, /* 11000111 */
  4584. +
  4585. +   /* 159 0x9f 'ƒ' */
  4586. +   0x0e, /* 00001110 */
  4587. +   0x1b, /* 00011011 */
  4588. +   0x18, /* 00011000 */
  4589. +   0x3c, /* 00111100 */
  4590. +   0x18, /* 00011000 */
  4591. +   0xd8, /* 11011000 */
  4592. +   0x70, /* 01110000 */
  4593. +   0x00, /* 00000000 */
  4594. +
  4595. +   /* 160 0xa0 'á' */
  4596. +   0x18, /* 00011000 */
  4597. +   0x30, /* 00110000 */
  4598. +   0x78, /* 01111000 */
  4599. +   0x0c, /* 00001100 */
  4600. +   0x7c, /* 01111100 */
  4601. +   0xcc, /* 11001100 */
  4602. +   0x76, /* 01110110 */
  4603. +   0x00, /* 00000000 */
  4604. +
  4605. +   /* 161 0xa1 'í' */
  4606. +   0x0c, /* 00001100 */
  4607. +   0x18, /* 00011000 */
  4608. +   0x00, /* 00000000 */
  4609. +   0x38, /* 00111000 */
  4610. +   0x18, /* 00011000 */
  4611. +   0x18, /* 00011000 */
  4612. +   0x3c, /* 00111100 */
  4613. +   0x00, /* 00000000 */
  4614. +
  4615. +   /* 162 0xa2 'ó' */
  4616. +   0x0c, /* 00001100 */
  4617. +   0x18, /* 00011000 */
  4618. +   0x7c, /* 01111100 */
  4619. +   0xc6, /* 11000110 */
  4620. +   0xc6, /* 11000110 */
  4621. +   0xc6, /* 11000110 */
  4622. +   0x7c, /* 01111100 */
  4623. +   0x00, /* 00000000 */
  4624. +
  4625. +   /* 163 0xa3 'ú' */
  4626. +   0x18, /* 00011000 */
  4627. +   0x30, /* 00110000 */
  4628. +   0xcc, /* 11001100 */
  4629. +   0xcc, /* 11001100 */
  4630. +   0xcc, /* 11001100 */
  4631. +   0xcc, /* 11001100 */
  4632. +   0x76, /* 01110110 */
  4633. +   0x00, /* 00000000 */
  4634. +
  4635. +   /* 164 0xa4 'ñ' */
  4636. +   0x76, /* 01110110 */
  4637. +   0xdc, /* 11011100 */
  4638. +   0x00, /* 00000000 */
  4639. +   0xdc, /* 11011100 */
  4640. +   0x66, /* 01100110 */
  4641. +   0x66, /* 01100110 */
  4642. +   0x66, /* 01100110 */
  4643. +   0x00, /* 00000000 */
  4644. +
  4645. +   /* 165 0xa5 'Ñ' */
  4646. +   0x76, /* 01110110 */
  4647. +   0xdc, /* 11011100 */
  4648. +   0x00, /* 00000000 */
  4649. +   0xe6, /* 11100110 */
  4650. +   0xf6, /* 11110110 */
  4651. +   0xde, /* 11011110 */
  4652. +   0xce, /* 11001110 */
  4653. +   0x00, /* 00000000 */
  4654. +
  4655. +   /* 166 0xa6 'ª' */
  4656. +   0x3c, /* 00111100 */
  4657. +   0x6c, /* 01101100 */
  4658. +   0x6c, /* 01101100 */
  4659. +   0x3e, /* 00111110 */
  4660. +   0x00, /* 00000000 */
  4661. +   0x7e, /* 01111110 */
  4662. +   0x00, /* 00000000 */
  4663. +   0x00, /* 00000000 */
  4664. +
  4665. +   /* 167 0xa7 'º' */
  4666. +   0x38, /* 00111000 */
  4667. +   0x6c, /* 01101100 */
  4668. +   0x6c, /* 01101100 */
  4669. +   0x38, /* 00111000 */
  4670. +   0x00, /* 00000000 */
  4671. +   0x7c, /* 01111100 */
  4672. +   0x00, /* 00000000 */
  4673. +   0x00, /* 00000000 */
  4674. +
  4675. +   /* 168 0xa8 '¿' */
  4676. +   0x18, /* 00011000 */
  4677. +   0x00, /* 00000000 */
  4678. +   0x18, /* 00011000 */
  4679. +   0x18, /* 00011000 */
  4680. +   0x30, /* 00110000 */
  4681. +   0x63, /* 01100011 */
  4682. +   0x3e, /* 00111110 */
  4683. +   0x00, /* 00000000 */
  4684. +
  4685. +   /* 169 0xa9 '⌐' */
  4686. +   0x00, /* 00000000 */
  4687. +   0x00, /* 00000000 */
  4688. +   0x00, /* 00000000 */
  4689. +   0xfe, /* 11111110 */
  4690. +   0xc0, /* 11000000 */
  4691. +   0xc0, /* 11000000 */
  4692. +   0x00, /* 00000000 */
  4693. +   0x00, /* 00000000 */
  4694. +
  4695. +   /* 170 0xaa '¬' */
  4696. +   0x00, /* 00000000 */
  4697. +   0x00, /* 00000000 */
  4698. +   0x00, /* 00000000 */
  4699. +   0xfe, /* 11111110 */
  4700. +   0x06, /* 00000110 */
  4701. +   0x06, /* 00000110 */
  4702. +   0x00, /* 00000000 */
  4703. +   0x00, /* 00000000 */
  4704. +
  4705. +   /* 171 0xab '½' */
  4706. +   0x63, /* 01100011 */
  4707. +   0xe6, /* 11100110 */
  4708. +   0x6c, /* 01101100 */
  4709. +   0x7e, /* 01111110 */
  4710. +   0x33, /* 00110011 */
  4711. +   0x66, /* 01100110 */
  4712. +   0xcc, /* 11001100 */
  4713. +   0x0f, /* 00001111 */
  4714. +
  4715. +   /* 172 0xac '¼' */
  4716. +   0x63, /* 01100011 */
  4717. +   0xe6, /* 11100110 */
  4718. +   0x6c, /* 01101100 */
  4719. +   0x7a, /* 01111010 */
  4720. +   0x36, /* 00110110 */
  4721. +   0x6a, /* 01101010 */
  4722. +   0xdf, /* 11011111 */
  4723. +   0x06, /* 00000110 */
  4724. +
  4725. +   /* 173 0xad '¡' */
  4726. +   0x18, /* 00011000 */
  4727. +   0x00, /* 00000000 */
  4728. +   0x18, /* 00011000 */
  4729. +   0x18, /* 00011000 */
  4730. +   0x3c, /* 00111100 */
  4731. +   0x3c, /* 00111100 */
  4732. +   0x18, /* 00011000 */
  4733. +   0x00, /* 00000000 */
  4734. +
  4735. +   /* 174 0xae '«' */
  4736. +   0x00, /* 00000000 */
  4737. +   0x33, /* 00110011 */
  4738. +   0x66, /* 01100110 */
  4739. +   0xcc, /* 11001100 */
  4740. +   0x66, /* 01100110 */
  4741. +   0x33, /* 00110011 */
  4742. +   0x00, /* 00000000 */
  4743. +   0x00, /* 00000000 */
  4744. +
  4745. +   /* 175 0xaf '»' */
  4746. +   0x00, /* 00000000 */
  4747. +   0xcc, /* 11001100 */
  4748. +   0x66, /* 01100110 */
  4749. +   0x33, /* 00110011 */
  4750. +   0x66, /* 01100110 */
  4751. +   0xcc, /* 11001100 */
  4752. +   0x00, /* 00000000 */
  4753. +   0x00, /* 00000000 */
  4754. +
  4755. +   /* 176 0xb0 '░' */
  4756. +   0x22, /* 00100010 */
  4757. +   0x88, /* 10001000 */
  4758. +   0x22, /* 00100010 */
  4759. +   0x88, /* 10001000 */
  4760. +   0x22, /* 00100010 */
  4761. +   0x88, /* 10001000 */
  4762. +   0x22, /* 00100010 */
  4763. +   0x88, /* 10001000 */
  4764. +
  4765. +   /* 177 0xb1 '▒' */
  4766. +   0x55, /* 01010101 */
  4767. +   0xaa, /* 10101010 */
  4768. +   0x55, /* 01010101 */
  4769. +   0xaa, /* 10101010 */
  4770. +   0x55, /* 01010101 */
  4771. +   0xaa, /* 10101010 */
  4772. +   0x55, /* 01010101 */
  4773. +   0xaa, /* 10101010 */
  4774. +
  4775. +   /* 178 0xb2 '▓' */
  4776. +   0x77, /* 01110111 */
  4777. +   0xdd, /* 11011101 */
  4778. +   0x77, /* 01110111 */
  4779. +   0xdd, /* 11011101 */
  4780. +   0x77, /* 01110111 */
  4781. +   0xdd, /* 11011101 */
  4782. +   0x77, /* 01110111 */
  4783. +   0xdd, /* 11011101 */
  4784. +
  4785. +   /* 179 0xb3 '│' */
  4786. +   0x18, /* 00011000 */
  4787. +   0x18, /* 00011000 */
  4788. +   0x18, /* 00011000 */
  4789. +   0x18, /* 00011000 */
  4790. +   0x18, /* 00011000 */
  4791. +   0x18, /* 00011000 */
  4792. +   0x18, /* 00011000 */
  4793. +   0x18, /* 00011000 */
  4794. +
  4795. +   /* 180 0xb4 '┤' */
  4796. +   0x18, /* 00011000 */
  4797. +   0x18, /* 00011000 */
  4798. +   0x18, /* 00011000 */
  4799. +   0x18, /* 00011000 */
  4800. +   0xf8, /* 11111000 */
  4801. +   0x18, /* 00011000 */
  4802. +   0x18, /* 00011000 */
  4803. +   0x18, /* 00011000 */
  4804. +
  4805. +   /* 181 0xb5 '╡' */
  4806. +   0x18, /* 00011000 */
  4807. +   0x18, /* 00011000 */
  4808. +   0xf8, /* 11111000 */
  4809. +   0x18, /* 00011000 */
  4810. +   0xf8, /* 11111000 */
  4811. +   0x18, /* 00011000 */
  4812. +   0x18, /* 00011000 */
  4813. +   0x18, /* 00011000 */
  4814. +
  4815. +   /* 182 0xb6 '╢' */
  4816. +   0x36, /* 00110110 */
  4817. +   0x36, /* 00110110 */
  4818. +   0x36, /* 00110110 */
  4819. +   0x36, /* 00110110 */
  4820. +   0xf6, /* 11110110 */
  4821. +   0x36, /* 00110110 */
  4822. +   0x36, /* 00110110 */
  4823. +   0x36, /* 00110110 */
  4824. +
  4825. +   /* 183 0xb7 '╖' */
  4826. +   0x00, /* 00000000 */
  4827. +   0x00, /* 00000000 */
  4828. +   0x00, /* 00000000 */
  4829. +   0x00, /* 00000000 */
  4830. +   0xfe, /* 11111110 */
  4831. +   0x36, /* 00110110 */
  4832. +   0x36, /* 00110110 */
  4833. +   0x36, /* 00110110 */
  4834. +
  4835. +   /* 184 0xb8 '╕' */
  4836. +   0x00, /* 00000000 */
  4837. +   0x00, /* 00000000 */
  4838. +   0xf8, /* 11111000 */
  4839. +   0x18, /* 00011000 */
  4840. +   0xf8, /* 11111000 */
  4841. +   0x18, /* 00011000 */
  4842. +   0x18, /* 00011000 */
  4843. +   0x18, /* 00011000 */
  4844. +
  4845. +   /* 185 0xb9 '╣' */
  4846. +   0x36, /* 00110110 */
  4847. +   0x36, /* 00110110 */
  4848. +   0xf6, /* 11110110 */
  4849. +   0x06, /* 00000110 */
  4850. +   0xf6, /* 11110110 */
  4851. +   0x36, /* 00110110 */
  4852. +   0x36, /* 00110110 */
  4853. +   0x36, /* 00110110 */
  4854. +
  4855. +   /* 186 0xba '║' */
  4856. +   0x36, /* 00110110 */
  4857. +   0x36, /* 00110110 */
  4858. +   0x36, /* 00110110 */
  4859. +   0x36, /* 00110110 */
  4860. +   0x36, /* 00110110 */
  4861. +   0x36, /* 00110110 */
  4862. +   0x36, /* 00110110 */
  4863. +   0x36, /* 00110110 */
  4864. +
  4865. +   /* 187 0xbb '╗' */
  4866. +   0x00, /* 00000000 */
  4867. +   0x00, /* 00000000 */
  4868. +   0xfe, /* 11111110 */
  4869. +   0x06, /* 00000110 */
  4870. +   0xf6, /* 11110110 */
  4871. +   0x36, /* 00110110 */
  4872. +   0x36, /* 00110110 */
  4873. +   0x36, /* 00110110 */
  4874. +
  4875. +   /* 188 0xbc '╝' */
  4876. +   0x36, /* 00110110 */
  4877. +   0x36, /* 00110110 */
  4878. +   0xf6, /* 11110110 */
  4879. +   0x06, /* 00000110 */
  4880. +   0xfe, /* 11111110 */
  4881. +   0x00, /* 00000000 */
  4882. +   0x00, /* 00000000 */
  4883. +   0x00, /* 00000000 */
  4884. +
  4885. +   /* 189 0xbd '╜' */
  4886. +   0x36, /* 00110110 */
  4887. +   0x36, /* 00110110 */
  4888. +   0x36, /* 00110110 */
  4889. +   0x36, /* 00110110 */
  4890. +   0xfe, /* 11111110 */
  4891. +   0x00, /* 00000000 */
  4892. +   0x00, /* 00000000 */
  4893. +   0x00, /* 00000000 */
  4894. +
  4895. +   /* 190 0xbe '╛' */
  4896. +   0x18, /* 00011000 */
  4897. +   0x18, /* 00011000 */
  4898. +   0xf8, /* 11111000 */
  4899. +   0x18, /* 00011000 */
  4900. +   0xf8, /* 11111000 */
  4901. +   0x00, /* 00000000 */
  4902. +   0x00, /* 00000000 */
  4903. +   0x00, /* 00000000 */
  4904. +
  4905. +   /* 191 0xbf '┐' */
  4906. +   0x00, /* 00000000 */
  4907. +   0x00, /* 00000000 */
  4908. +   0x00, /* 00000000 */
  4909. +   0x00, /* 00000000 */
  4910. +   0xf8, /* 11111000 */
  4911. +   0x18, /* 00011000 */
  4912. +   0x18, /* 00011000 */
  4913. +   0x18, /* 00011000 */
  4914. +
  4915. +   /* 192 0xc0 '└' */
  4916. +   0x18, /* 00011000 */
  4917. +   0x18, /* 00011000 */
  4918. +   0x18, /* 00011000 */
  4919. +   0x18, /* 00011000 */
  4920. +   0x1f, /* 00011111 */
  4921. +   0x00, /* 00000000 */
  4922. +   0x00, /* 00000000 */
  4923. +   0x00, /* 00000000 */
  4924. +
  4925. +   /* 193 0xc1 '┴' */
  4926. +   0x18, /* 00011000 */
  4927. +   0x18, /* 00011000 */
  4928. +   0x18, /* 00011000 */
  4929. +   0x18, /* 00011000 */
  4930. +   0xff, /* 11111111 */
  4931. +   0x00, /* 00000000 */
  4932. +   0x00, /* 00000000 */
  4933. +   0x00, /* 00000000 */
  4934. +
  4935. +   /* 194 0xc2 '┬' */
  4936. +   0x00, /* 00000000 */
  4937. +   0x00, /* 00000000 */
  4938. +   0x00, /* 00000000 */
  4939. +   0x00, /* 00000000 */
  4940. +   0xff, /* 11111111 */
  4941. +   0x18, /* 00011000 */
  4942. +   0x18, /* 00011000 */
  4943. +   0x18, /* 00011000 */
  4944. +
  4945. +   /* 195 0xc3 '├' */
  4946. +   0x18, /* 00011000 */
  4947. +   0x18, /* 00011000 */
  4948. +   0x18, /* 00011000 */
  4949. +   0x18, /* 00011000 */
  4950. +   0x1f, /* 00011111 */
  4951. +   0x18, /* 00011000 */
  4952. +   0x18, /* 00011000 */
  4953. +   0x18, /* 00011000 */
  4954. +
  4955. +   /* 196 0xc4 '─' */
  4956. +   0x00, /* 00000000 */
  4957. +   0x00, /* 00000000 */
  4958. +   0x00, /* 00000000 */
  4959. +   0x00, /* 00000000 */
  4960. +   0xff, /* 11111111 */
  4961. +   0x00, /* 00000000 */
  4962. +   0x00, /* 00000000 */
  4963. +   0x00, /* 00000000 */
  4964. +
  4965. +   /* 197 0xc5 '┼' */
  4966. +   0x18, /* 00011000 */
  4967. +   0x18, /* 00011000 */
  4968. +   0x18, /* 00011000 */
  4969. +   0x18, /* 00011000 */
  4970. +   0xff, /* 11111111 */
  4971. +   0x18, /* 00011000 */
  4972. +   0x18, /* 00011000 */
  4973. +   0x18, /* 00011000 */
  4974. +
  4975. +   /* 198 0xc6 '╞' */
  4976. +   0x18, /* 00011000 */
  4977. +   0x18, /* 00011000 */
  4978. +   0x1f, /* 00011111 */
  4979. +   0x18, /* 00011000 */
  4980. +   0x1f, /* 00011111 */
  4981. +   0x18, /* 00011000 */
  4982. +   0x18, /* 00011000 */
  4983. +   0x18, /* 00011000 */
  4984. +
  4985. +   /* 199 0xc7 '╟' */
  4986. +   0x36, /* 00110110 */
  4987. +   0x36, /* 00110110 */
  4988. +   0x36, /* 00110110 */
  4989. +   0x36, /* 00110110 */
  4990. +   0x37, /* 00110111 */
  4991. +   0x36, /* 00110110 */
  4992. +   0x36, /* 00110110 */
  4993. +   0x36, /* 00110110 */
  4994. +
  4995. +   /* 200 0xc8 '╚' */
  4996. +   0x36, /* 00110110 */
  4997. +   0x36, /* 00110110 */
  4998. +   0x37, /* 00110111 */
  4999. +   0x30, /* 00110000 */
  5000. +   0x3f, /* 00111111 */
  5001. +   0x00, /* 00000000 */
  5002. +   0x00, /* 00000000 */
  5003. +   0x00, /* 00000000 */
  5004. +
  5005. +   /* 201 0xc9 '╔' */
  5006. +   0x00, /* 00000000 */
  5007. +   0x00, /* 00000000 */
  5008. +   0x3f, /* 00111111 */
  5009. +   0x30, /* 00110000 */
  5010. +   0x37, /* 00110111 */
  5011. +   0x36, /* 00110110 */
  5012. +   0x36, /* 00110110 */
  5013. +   0x36, /* 00110110 */
  5014. +
  5015. +   /* 202 0xca '╩' */
  5016. +   0x36, /* 00110110 */
  5017. +   0x36, /* 00110110 */
  5018. +   0xf7, /* 11110111 */
  5019. +   0x00, /* 00000000 */
  5020. +   0xff, /* 11111111 */
  5021. +   0x00, /* 00000000 */
  5022. +   0x00, /* 00000000 */
  5023. +   0x00, /* 00000000 */
  5024. +
  5025. +   /* 203 0xcb '╦' */
  5026. +   0x00, /* 00000000 */
  5027. +   0x00, /* 00000000 */
  5028. +   0xff, /* 11111111 */
  5029. +   0x00, /* 00000000 */
  5030. +   0xf7, /* 11110111 */
  5031. +   0x36, /* 00110110 */
  5032. +   0x36, /* 00110110 */
  5033. +   0x36, /* 00110110 */
  5034. +
  5035. +   /* 204 0xcc '╠' */
  5036. +   0x36, /* 00110110 */
  5037. +   0x36, /* 00110110 */
  5038. +   0x37, /* 00110111 */
  5039. +   0x30, /* 00110000 */
  5040. +   0x37, /* 00110111 */
  5041. +   0x36, /* 00110110 */
  5042. +   0x36, /* 00110110 */
  5043. +   0x36, /* 00110110 */
  5044. +
  5045. +   /* 205 0xcd '═' */
  5046. +   0x00, /* 00000000 */
  5047. +   0x00, /* 00000000 */
  5048. +   0xff, /* 11111111 */
  5049. +   0x00, /* 00000000 */
  5050. +   0xff, /* 11111111 */
  5051. +   0x00, /* 00000000 */
  5052. +   0x00, /* 00000000 */
  5053. +   0x00, /* 00000000 */
  5054. +
  5055. +   /* 206 0xce '╬' */
  5056. +   0x36, /* 00110110 */
  5057. +   0x36, /* 00110110 */
  5058. +   0xf7, /* 11110111 */
  5059. +   0x00, /* 00000000 */
  5060. +   0xf7, /* 11110111 */
  5061. +   0x36, /* 00110110 */
  5062. +   0x36, /* 00110110 */
  5063. +   0x36, /* 00110110 */
  5064. +
  5065. +   /* 207 0xcf '╧' */
  5066. +   0x18, /* 00011000 */
  5067. +   0x18, /* 00011000 */
  5068. +   0xff, /* 11111111 */
  5069. +   0x00, /* 00000000 */
  5070. +   0xff, /* 11111111 */
  5071. +   0x00, /* 00000000 */
  5072. +   0x00, /* 00000000 */
  5073. +   0x00, /* 00000000 */
  5074. +
  5075. +   /* 208 0xd0 '╨' */
  5076. +   0x36, /* 00110110 */
  5077. +   0x36, /* 00110110 */
  5078. +   0x36, /* 00110110 */
  5079. +   0x36, /* 00110110 */
  5080. +   0xff, /* 11111111 */
  5081. +   0x00, /* 00000000 */
  5082. +   0x00, /* 00000000 */
  5083. +   0x00, /* 00000000 */
  5084. +
  5085. +   /* 209 0xd1 '╤' */
  5086. +   0x00, /* 00000000 */
  5087. +   0x00, /* 00000000 */
  5088. +   0xff, /* 11111111 */
  5089. +   0x00, /* 00000000 */
  5090. +   0xff, /* 11111111 */
  5091. +   0x18, /* 00011000 */
  5092. +   0x18, /* 00011000 */
  5093. +   0x18, /* 00011000 */
  5094. +
  5095. +   /* 210 0xd2 '╥' */
  5096. +   0x00, /* 00000000 */
  5097. +   0x00, /* 00000000 */
  5098. +   0x00, /* 00000000 */
  5099. +   0x00, /* 00000000 */
  5100. +   0xff, /* 11111111 */
  5101. +   0x36, /* 00110110 */
  5102. +   0x36, /* 00110110 */
  5103. +   0x36, /* 00110110 */
  5104. +
  5105. +   /* 211 0xd3 '╙' */
  5106. +   0x36, /* 00110110 */
  5107. +   0x36, /* 00110110 */
  5108. +   0x36, /* 00110110 */
  5109. +   0x36, /* 00110110 */
  5110. +   0x3f, /* 00111111 */
  5111. +   0x00, /* 00000000 */
  5112. +   0x00, /* 00000000 */
  5113. +   0x00, /* 00000000 */
  5114. +
  5115. +   /* 212 0xd4 '╘' */
  5116. +   0x18, /* 00011000 */
  5117. +   0x18, /* 00011000 */
  5118. +   0x1f, /* 00011111 */
  5119. +   0x18, /* 00011000 */
  5120. +   0x1f, /* 00011111 */
  5121. +   0x00, /* 00000000 */
  5122. +   0x00, /* 00000000 */
  5123. +   0x00, /* 00000000 */
  5124. +
  5125. +   /* 213 0xd5 '╒' */
  5126. +   0x00, /* 00000000 */
  5127. +   0x00, /* 00000000 */
  5128. +   0x1f, /* 00011111 */
  5129. +   0x18, /* 00011000 */
  5130. +   0x1f, /* 00011111 */
  5131. +   0x18, /* 00011000 */
  5132. +   0x18, /* 00011000 */
  5133. +   0x18, /* 00011000 */
  5134. +
  5135. +   /* 214 0xd6 '╓' */
  5136. +   0x00, /* 00000000 */
  5137. +   0x00, /* 00000000 */
  5138. +   0x00, /* 00000000 */
  5139. +   0x00, /* 00000000 */
  5140. +   0x3f, /* 00111111 */
  5141. +   0x36, /* 00110110 */
  5142. +   0x36, /* 00110110 */
  5143. +   0x36, /* 00110110 */
  5144. +
  5145. +   /* 215 0xd7 '╫' */
  5146. +   0x36, /* 00110110 */
  5147. +   0x36, /* 00110110 */
  5148. +   0x36, /* 00110110 */
  5149. +   0x36, /* 00110110 */
  5150. +   0xff, /* 11111111 */
  5151. +   0x36, /* 00110110 */
  5152. +   0x36, /* 00110110 */
  5153. +   0x36, /* 00110110 */
  5154. +
  5155. +   /* 216 0xd8 '╪' */
  5156. +   0x18, /* 00011000 */
  5157. +   0x18, /* 00011000 */
  5158. +   0xff, /* 11111111 */
  5159. +   0x18, /* 00011000 */
  5160. +   0xff, /* 11111111 */
  5161. +   0x18, /* 00011000 */
  5162. +   0x18, /* 00011000 */
  5163. +   0x18, /* 00011000 */
  5164. +
  5165. +   /* 217 0xd9 '┘' */
  5166. +   0x18, /* 00011000 */
  5167. +   0x18, /* 00011000 */
  5168. +   0x18, /* 00011000 */
  5169. +   0x18, /* 00011000 */
  5170. +   0xf8, /* 11111000 */
  5171. +   0x00, /* 00000000 */
  5172. +   0x00, /* 00000000 */
  5173. +   0x00, /* 00000000 */
  5174. +
  5175. +   /* 218 0xda '┌' */
  5176. +   0x00, /* 00000000 */
  5177. +   0x00, /* 00000000 */
  5178. +   0x00, /* 00000000 */
  5179. +   0x00, /* 00000000 */
  5180. +   0x1f, /* 00011111 */
  5181. +   0x18, /* 00011000 */
  5182. +   0x18, /* 00011000 */
  5183. +   0x18, /* 00011000 */
  5184. +
  5185. +   /* 219 0xdb '█' */
  5186. +   0xff, /* 11111111 */
  5187. +   0xff, /* 11111111 */
  5188. +   0xff, /* 11111111 */
  5189. +   0xff, /* 11111111 */
  5190. +   0xff, /* 11111111 */
  5191. +   0xff, /* 11111111 */
  5192. +   0xff, /* 11111111 */
  5193. +   0xff, /* 11111111 */
  5194. +
  5195. +   /* 220 0xdc '▄' */
  5196. +   0x00, /* 00000000 */
  5197. +   0x00, /* 00000000 */
  5198. +   0x00, /* 00000000 */
  5199. +   0x00, /* 00000000 */
  5200. +   0xff, /* 11111111 */
  5201. +   0xff, /* 11111111 */
  5202. +   0xff, /* 11111111 */
  5203. +   0xff, /* 11111111 */
  5204. +
  5205. +   /* 221 0xdd '▌' */
  5206. +   0xf0, /* 11110000 */
  5207. +   0xf0, /* 11110000 */
  5208. +   0xf0, /* 11110000 */
  5209. +   0xf0, /* 11110000 */
  5210. +   0xf0, /* 11110000 */
  5211. +   0xf0, /* 11110000 */
  5212. +   0xf0, /* 11110000 */
  5213. +   0xf0, /* 11110000 */
  5214. +
  5215. +   /* 222 0xde '▐' */
  5216. +   0x0f, /* 00001111 */
  5217. +   0x0f, /* 00001111 */
  5218. +   0x0f, /* 00001111 */
  5219. +   0x0f, /* 00001111 */
  5220. +   0x0f, /* 00001111 */
  5221. +   0x0f, /* 00001111 */
  5222. +   0x0f, /* 00001111 */
  5223. +   0x0f, /* 00001111 */
  5224. +
  5225. +   /* 223 0xdf '▀' */
  5226. +   0xff, /* 11111111 */
  5227. +   0xff, /* 11111111 */
  5228. +   0xff, /* 11111111 */
  5229. +   0xff, /* 11111111 */
  5230. +   0x00, /* 00000000 */
  5231. +   0x00, /* 00000000 */
  5232. +   0x00, /* 00000000 */
  5233. +   0x00, /* 00000000 */
  5234. +
  5235. +   /* 224 0xe0 'α' */
  5236. +   0x00, /* 00000000 */
  5237. +   0x00, /* 00000000 */
  5238. +   0x76, /* 01110110 */
  5239. +   0xdc, /* 11011100 */
  5240. +   0xc8, /* 11001000 */
  5241. +   0xdc, /* 11011100 */
  5242. +   0x76, /* 01110110 */
  5243. +   0x00, /* 00000000 */
  5244. +
  5245. +   /* 225 0xe1 'ß' */
  5246. +   0x78, /* 01111000 */
  5247. +   0xcc, /* 11001100 */
  5248. +   0xcc, /* 11001100 */
  5249. +   0xd8, /* 11011000 */
  5250. +   0xcc, /* 11001100 */
  5251. +   0xc6, /* 11000110 */
  5252. +   0xcc, /* 11001100 */
  5253. +   0x00, /* 00000000 */
  5254. +
  5255. +   /* 226 0xe2 'Γ' */
  5256. +   0xfe, /* 11111110 */
  5257. +   0xc6, /* 11000110 */
  5258. +   0xc0, /* 11000000 */
  5259. +   0xc0, /* 11000000 */
  5260. +   0xc0, /* 11000000 */
  5261. +   0xc0, /* 11000000 */
  5262. +   0xc0, /* 11000000 */
  5263. +   0x00, /* 00000000 */
  5264. +
  5265. +   /* 227 0xe3 'π' */
  5266. +   0x00, /* 00000000 */
  5267. +   0x00, /* 00000000 */
  5268. +   0xfe, /* 11111110 */
  5269. +   0x6c, /* 01101100 */
  5270. +   0x6c, /* 01101100 */
  5271. +   0x6c, /* 01101100 */
  5272. +   0x6c, /* 01101100 */
  5273. +   0x00, /* 00000000 */
  5274. +
  5275. +   /* 228 0xe4 'Σ' */
  5276. +   0xfe, /* 11111110 */
  5277. +   0xc6, /* 11000110 */
  5278. +   0x60, /* 01100000 */
  5279. +   0x30, /* 00110000 */
  5280. +   0x60, /* 01100000 */
  5281. +   0xc6, /* 11000110 */
  5282. +   0xfe, /* 11111110 */
  5283. +   0x00, /* 00000000 */
  5284. +
  5285. +   /* 229 0xe5 'σ' */
  5286. +   0x00, /* 00000000 */
  5287. +   0x00, /* 00000000 */
  5288. +   0x7e, /* 01111110 */
  5289. +   0xd8, /* 11011000 */
  5290. +   0xd8, /* 11011000 */
  5291. +   0xd8, /* 11011000 */
  5292. +   0x70, /* 01110000 */
  5293. +   0x00, /* 00000000 */
  5294. +
  5295. +   /* 230 0xe6 'µ' */
  5296. +   0x00, /* 00000000 */
  5297. +   0x00, /* 00000000 */
  5298. +   0x66, /* 01100110 */
  5299. +   0x66, /* 01100110 */
  5300. +   0x66, /* 01100110 */
  5301. +   0x66, /* 01100110 */
  5302. +   0x7c, /* 01111100 */
  5303. +   0xc0, /* 11000000 */
  5304. +
  5305. +   /* 231 0xe7 'τ' */
  5306. +   0x00, /* 00000000 */
  5307. +   0x76, /* 01110110 */
  5308. +   0xdc, /* 11011100 */
  5309. +   0x18, /* 00011000 */
  5310. +   0x18, /* 00011000 */
  5311. +   0x18, /* 00011000 */
  5312. +   0x18, /* 00011000 */
  5313. +   0x00, /* 00000000 */
  5314. +
  5315. +   /* 232 0xe8 'Φ' */
  5316. +   0x7e, /* 01111110 */
  5317. +   0x18, /* 00011000 */
  5318. +   0x3c, /* 00111100 */
  5319. +   0x66, /* 01100110 */
  5320. +   0x66, /* 01100110 */
  5321. +   0x3c, /* 00111100 */
  5322. +   0x18, /* 00011000 */
  5323. +   0x7e, /* 01111110 */
  5324. +
  5325. +   /* 233 0xe9 'Θ' */
  5326. +   0x38, /* 00111000 */
  5327. +   0x6c, /* 01101100 */
  5328. +   0xc6, /* 11000110 */
  5329. +   0xfe, /* 11111110 */
  5330. +   0xc6, /* 11000110 */
  5331. +   0x6c, /* 01101100 */
  5332. +   0x38, /* 00111000 */
  5333. +   0x00, /* 00000000 */
  5334. +
  5335. +   /* 234 0xea 'Ω' */
  5336. +   0x38, /* 00111000 */
  5337. +   0x6c, /* 01101100 */
  5338. +   0xc6, /* 11000110 */
  5339. +   0xc6, /* 11000110 */
  5340. +   0x6c, /* 01101100 */
  5341. +   0x6c, /* 01101100 */
  5342. +   0xee, /* 11101110 */
  5343. +   0x00, /* 00000000 */
  5344. +
  5345. +   /* 235 0xeb 'δ' */
  5346. +   0x0e, /* 00001110 */
  5347. +   0x18, /* 00011000 */
  5348. +   0x0c, /* 00001100 */
  5349. +   0x3e, /* 00111110 */
  5350. +   0x66, /* 01100110 */
  5351. +   0x66, /* 01100110 */
  5352. +   0x3c, /* 00111100 */
  5353. +   0x00, /* 00000000 */
  5354. +
  5355. +   /* 236 0xec '∞' */
  5356. +   0x00, /* 00000000 */
  5357. +   0x00, /* 00000000 */
  5358. +   0x7e, /* 01111110 */
  5359. +   0xdb, /* 11011011 */
  5360. +   0xdb, /* 11011011 */
  5361. +   0x7e, /* 01111110 */
  5362. +   0x00, /* 00000000 */
  5363. +   0x00, /* 00000000 */
  5364. +
  5365. +   /* 237 0xed 'φ' */
  5366. +   0x06, /* 00000110 */
  5367. +   0x0c, /* 00001100 */
  5368. +   0x7e, /* 01111110 */
  5369. +   0xdb, /* 11011011 */
  5370. +   0xdb, /* 11011011 */
  5371. +   0x7e, /* 01111110 */
  5372. +   0x60, /* 01100000 */
  5373. +   0xc0, /* 11000000 */
  5374. +
  5375. +   /* 238 0xee 'ε' */
  5376. +   0x1e, /* 00011110 */
  5377. +   0x30, /* 00110000 */
  5378. +   0x60, /* 01100000 */
  5379. +   0x7e, /* 01111110 */
  5380. +   0x60, /* 01100000 */
  5381. +   0x30, /* 00110000 */
  5382. +   0x1e, /* 00011110 */
  5383. +   0x00, /* 00000000 */
  5384. +
  5385. +   /* 239 0xef '∩' */
  5386. +   0x00, /* 00000000 */
  5387. +   0x7c, /* 01111100 */
  5388. +   0xc6, /* 11000110 */
  5389. +   0xc6, /* 11000110 */
  5390. +   0xc6, /* 11000110 */
  5391. +   0xc6, /* 11000110 */
  5392. +   0xc6, /* 11000110 */
  5393. +   0x00, /* 00000000 */
  5394. +
  5395. +   /* 240 0xf0 '≡' */
  5396. +   0x00, /* 00000000 */
  5397. +   0xfe, /* 11111110 */
  5398. +   0x00, /* 00000000 */
  5399. +   0xfe, /* 11111110 */
  5400. +   0x00, /* 00000000 */
  5401. +   0xfe, /* 11111110 */
  5402. +   0x00, /* 00000000 */
  5403. +   0x00, /* 00000000 */
  5404. +
  5405. +   /* 241 0xf1 '±' */
  5406. +   0x18, /* 00011000 */
  5407. +   0x18, /* 00011000 */
  5408. +   0x7e, /* 01111110 */
  5409. +   0x18, /* 00011000 */
  5410. +   0x18, /* 00011000 */
  5411. +   0x00, /* 00000000 */
  5412. +   0x7e, /* 01111110 */
  5413. +   0x00, /* 00000000 */
  5414. +
  5415. +   /* 242 0xf2 '≥' */
  5416. +   0x30, /* 00110000 */
  5417. +   0x18, /* 00011000 */
  5418. +   0x0c, /* 00001100 */
  5419. +   0x18, /* 00011000 */
  5420. +   0x30, /* 00110000 */
  5421. +   0x00, /* 00000000 */
  5422. +   0x7e, /* 01111110 */
  5423. +   0x00, /* 00000000 */
  5424. +
  5425. +   /* 243 0xf3 '≤' */
  5426. +   0x0c, /* 00001100 */
  5427. +   0x18, /* 00011000 */
  5428. +   0x30, /* 00110000 */
  5429. +   0x18, /* 00011000 */
  5430. +   0x0c, /* 00001100 */
  5431. +   0x00, /* 00000000 */
  5432. +   0x7e, /* 01111110 */
  5433. +   0x00, /* 00000000 */
  5434. +
  5435. +   /* 244 0xf4 '⌠' */
  5436. +   0x0e, /* 00001110 */
  5437. +   0x1b, /* 00011011 */
  5438. +   0x1b, /* 00011011 */
  5439. +   0x18, /* 00011000 */
  5440. +   0x18, /* 00011000 */
  5441. +   0x18, /* 00011000 */
  5442. +   0x18, /* 00011000 */
  5443. +   0x18, /* 00011000 */
  5444. +
  5445. +   /* 245 0xf5 '⌡' */
  5446. +   0x18, /* 00011000 */
  5447. +   0x18, /* 00011000 */
  5448. +   0x18, /* 00011000 */
  5449. +   0x18, /* 00011000 */
  5450. +   0x18, /* 00011000 */
  5451. +   0xd8, /* 11011000 */
  5452. +   0xd8, /* 11011000 */
  5453. +   0x70, /* 01110000 */
  5454. +
  5455. +   /* 246 0xf6 '÷' */
  5456. +   0x00, /* 00000000 */
  5457. +   0x18, /* 00011000 */
  5458. +   0x00, /* 00000000 */
  5459. +   0x7e, /* 01111110 */
  5460. +   0x00, /* 00000000 */
  5461. +   0x18, /* 00011000 */
  5462. +   0x00, /* 00000000 */
  5463. +   0x00, /* 00000000 */
  5464. +
  5465. +   /* 247 0xf7 '≈' */
  5466. +   0x00, /* 00000000 */
  5467. +   0x76, /* 01110110 */
  5468. +   0xdc, /* 11011100 */
  5469. +   0x00, /* 00000000 */
  5470. +   0x76, /* 01110110 */
  5471. +   0xdc, /* 11011100 */
  5472. +   0x00, /* 00000000 */
  5473. +   0x00, /* 00000000 */
  5474. +
  5475. +   /* 248 0xf8 '°' */
  5476. +   0x38, /* 00111000 */
  5477. +   0x6c, /* 01101100 */
  5478. +   0x6c, /* 01101100 */
  5479. +   0x38, /* 00111000 */
  5480. +   0x00, /* 00000000 */
  5481. +   0x00, /* 00000000 */
  5482. +   0x00, /* 00000000 */
  5483. +   0x00, /* 00000000 */
  5484. +
  5485. +   /* 249 0xf9 '∙' */
  5486. +   0x00, /* 00000000 */
  5487. +   0x00, /* 00000000 */
  5488. +   0x00, /* 00000000 */
  5489. +   0x18, /* 00011000 */
  5490. +   0x18, /* 00011000 */
  5491. +   0x00, /* 00000000 */
  5492. +   0x00, /* 00000000 */
  5493. +   0x00, /* 00000000 */
  5494. +
  5495. +   /* 250 0xfa '·' */
  5496. +   0x00, /* 00000000 */
  5497. +   0x00, /* 00000000 */
  5498. +   0x00, /* 00000000 */
  5499. +   0x18, /* 00011000 */
  5500. +   0x00, /* 00000000 */
  5501. +   0x00, /* 00000000 */
  5502. +   0x00, /* 00000000 */
  5503. +   0x00, /* 00000000 */
  5504. +
  5505. +   /* 251 0xfb '√' */
  5506. +   0x0f, /* 00001111 */
  5507. +   0x0c, /* 00001100 */
  5508. +   0x0c, /* 00001100 */
  5509. +   0x0c, /* 00001100 */
  5510. +   0xec, /* 11101100 */
  5511. +   0x6c, /* 01101100 */
  5512. +   0x3c, /* 00111100 */
  5513. +   0x1c, /* 00011100 */
  5514. +
  5515. +   /* 252 0xfc 'ⁿ' */
  5516. +   0x6c, /* 01101100 */
  5517. +   0x36, /* 00110110 */
  5518. +   0x36, /* 00110110 */
  5519. +   0x36, /* 00110110 */
  5520. +   0x36, /* 00110110 */
  5521. +   0x00, /* 00000000 */
  5522. +   0x00, /* 00000000 */
  5523. +   0x00, /* 00000000 */
  5524. +
  5525. +   /* 253 0xfd '²' */
  5526. +   0x78, /* 01111000 */
  5527. +   0x0c, /* 00001100 */
  5528. +   0x18, /* 00011000 */
  5529. +   0x30, /* 00110000 */
  5530. +   0x7c, /* 01111100 */
  5531. +   0x00, /* 00000000 */
  5532. +   0x00, /* 00000000 */
  5533. +   0x00, /* 00000000 */
  5534. +
  5535. +   /* 254 0xfe '■' */
  5536. +   0x00, /* 00000000 */
  5537. +   0x00, /* 00000000 */
  5538. +   0x3c, /* 00111100 */
  5539. +   0x3c, /* 00111100 */
  5540. +   0x3c, /* 00111100 */
  5541. +   0x3c, /* 00111100 */
  5542. +   0x00, /* 00000000 */
  5543. +   0x00, /* 00000000 */
  5544. +
  5545. +   /* 255 0xff ' ' */
  5546. +   0x00, /* 00000000 */
  5547. +   0x00, /* 00000000 */
  5548. +   0x00, /* 00000000 */
  5549. +   0x00, /* 00000000 */
  5550. +   0x00, /* 00000000 */
  5551. +   0x00, /* 00000000 */
  5552. +   0x00, /* 00000000 */
  5553. +   0x00, /* 00000000 */
  5554. +
  5555. +};
  5556. +
  5557. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/console/txtcon.c linux/arch/m68k/console/txtcon.c
  5558. --- pre2.0.6/linux/arch/m68k/console/txtcon.c    Tue Apr 23 13:57:04 1996
  5559. +++ linux/arch/m68k/console/txtcon.c    Mon May 20 07:54:26 1996
  5560. @@ -9,7 +9,7 @@
  5561.   *
  5562.   *
  5563.   * This file is subject to the terms and conditions of the GNU General Public
  5564. - * License.  See the file README.legal in the main directory of this archive
  5565. + * License.  See the file COPYING in the main directory of this archive
  5566.   * for more details.
  5567.   */
  5568.  
  5569. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/kernel/ints.c linux/arch/m68k/kernel/ints.c
  5570. --- pre2.0.6/linux/arch/m68k/kernel/ints.c    Tue Apr 23 13:57:07 1996
  5571. +++ linux/arch/m68k/kernel/ints.c    Mon May 20 07:54:26 1996
  5572. @@ -2,7 +2,7 @@
  5573.   * ints.c -- 680x0 Linux general interrupt handling code
  5574.   *
  5575.   * This file is subject to the terms and conditions of the GNU General Public
  5576. - * License.  See the file README.legal in the main directory of this archive
  5577. + * License.  See the file COPYING in the main directory of this archive
  5578.   * for more details.
  5579.   *
  5580.   * 07/03/96: Timer initialization, and thus mach_sched_init(),
  5581. @@ -76,7 +76,7 @@
  5582.      restore_flags(spl);
  5583.  }
  5584.  
  5585. -void delete_isr (isr_node_t **listp, isrfunc isr)
  5586. +void delete_isr (isr_node_t **listp, isrfunc isr, void *data)
  5587.  {
  5588.      unsigned long flags;
  5589.      isr_node_t *np;
  5590. @@ -84,7 +84,7 @@
  5591.      save_flags(flags);
  5592.      cli();
  5593.      for (np = *listp; np; listp = &np->next, np = *listp) {
  5594. -    if (np->isr == isr) {
  5595. +    if (np->isr == isr && np->data == data) {
  5596.          *listp = np->next;
  5597.          /* Mark it as free. */
  5598.          np->isr = NULL;
  5599. @@ -138,17 +138,17 @@
  5600.      return 1;
  5601.  }
  5602.  
  5603. -int remove_isr (unsigned long source, isrfunc isr)
  5604. +int remove_isr (unsigned long source, isrfunc isr, void *data)
  5605.  {
  5606.      if (source & IRQ_MACHSPEC)
  5607. -    return mach_remove_isr (source, isr);
  5608. +    return mach_remove_isr (source, isr, data);
  5609.  
  5610.      if (source < IRQ1 || source > IRQ7) {
  5611.      printk ("remove_isr: Incorrect IRQ source %ld\n", source);
  5612.      return 0;
  5613.      }
  5614.  
  5615. -    delete_isr (&isr_list[source - 1], isr);
  5616. +    delete_isr (&isr_list[source - 1], isr, data);
  5617.      return 1;
  5618.  }
  5619.  
  5620. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/kernel/ptrace.c linux/arch/m68k/kernel/ptrace.c
  5621. --- pre2.0.6/linux/arch/m68k/kernel/ptrace.c    Fri May 17 15:32:11 1996
  5622. +++ linux/arch/m68k/kernel/ptrace.c    Mon May 20 07:54:26 1996
  5623. @@ -6,7 +6,7 @@
  5624.   *  linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
  5625.   *
  5626.   * This file is subject to the terms and conditions of the GNU General
  5627. - * Public License.  See the file README.legal in the main directory of
  5628. + * Public License.  See the file COPYING in the main directory of
  5629.   * this archive for more details.
  5630.   */
  5631.  
  5632. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/kernel/setup.c linux/arch/m68k/kernel/setup.c
  5633. --- pre2.0.6/linux/arch/m68k/kernel/setup.c    Fri May 17 15:32:12 1996
  5634. +++ linux/arch/m68k/kernel/setup.c    Mon May 20 07:54:26 1996
  5635. @@ -53,7 +53,7 @@
  5636.  void (*mach_kbd_leds) (unsigned int) = NULL;
  5637.  void (*mach_init_INTS) (void);
  5638.  int (*mach_add_isr) (unsigned long, isrfunc, int, void *, char *);
  5639. -int (*mach_remove_isr) (unsigned long, isrfunc);
  5640. +int (*mach_remove_isr) (unsigned long, isrfunc, void *);
  5641.  void (*mach_process_int) (int, struct pt_regs *) = NULL;
  5642.  void (*mach_enable_irq) (unsigned) = NULL;
  5643.  void (*mach_disable_irq) (unsigned) = NULL;
  5644. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/kernel/signal.c linux/arch/m68k/kernel/signal.c
  5645. --- pre2.0.6/linux/arch/m68k/kernel/signal.c    Tue Apr 23 13:57:08 1996
  5646. +++ linux/arch/m68k/kernel/signal.c    Mon May 20 07:54:26 1996
  5647. @@ -4,7 +4,7 @@
  5648.   *  Copyright (C) 1991, 1992  Linus Torvalds
  5649.   *
  5650.   * This file is subject to the terms and conditions of the GNU General Public
  5651. - * License.  See the file README.legal in the main directory of this archive
  5652. + * License.  See the file COPYING in the main directory of this archive
  5653.   * for more details.
  5654.   */
  5655.  
  5656. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/kernel/traps.c linux/arch/m68k/kernel/traps.c
  5657. --- pre2.0.6/linux/arch/m68k/kernel/traps.c    Tue May  7 16:22:19 1996
  5658. +++ linux/arch/m68k/kernel/traps.c    Mon May 20 07:54:26 1996
  5659. @@ -9,7 +9,7 @@
  5660.   *  68060 fixes by Jesper Skov
  5661.   *
  5662.   * This file is subject to the terms and conditions of the GNU General Public
  5663. - * License.  See the file README.legal in the main directory of this archive
  5664. + * License.  See the file COPYING in the main directory of this archive
  5665.   * for more details.
  5666.   */
  5667.  
  5668. diff -u --recursive --new-file pre2.0.6/linux/arch/m68k/tools/amiga/dmesg.c linux/arch/m68k/tools/amiga/dmesg.c
  5669. --- pre2.0.6/linux/arch/m68k/tools/amiga/dmesg.c    Thu Jan  1 02:00:00 1970
  5670. +++ linux/arch/m68k/tools/amiga/dmesg.c    Mon May 20 07:54:27 1996
  5671. @@ -0,0 +1,74 @@
  5672. +/*
  5673. + *  linux/arch/m68k/tools/amiga/dmesg.c -- Retrieve the kernel messages stored
  5674. + *                       in Chip RAM with the kernel command
  5675. + *                       line option `debug=mem'.
  5676. + *
  5677. + *  ⌐ Copyright 1996 by Geert Uytterhoeven
  5678. + *               (Geert.Uytterhoeven@cs.kuleuven.ac.be)
  5679. + *
  5680. + *
  5681. + *  Compilation (under AmigaOS):
  5682. + *
  5683. + *    gcc -o dmesg dmesg.c -noixemul -idirafter INCLUDE: -Wall -s -O3
  5684. + *
  5685. + *  Usage:
  5686. + *
  5687. + *    dmesg
  5688. + *    dmesg <CHIPMEM_END>
  5689. + *
  5690. + *
  5691. + *  This file is subject to the terms and conditions of the GNU General Public
  5692. + *  License.  See the file COPYING in the main directory of the Linux
  5693. + *  distribution for more details.
  5694. + */
  5695. +
  5696. +
  5697. +#include <stdio.h>
  5698. +#include <stdlib.h>
  5699. +#include <unistd.h>
  5700. +
  5701. +
  5702. +#define CHIPMEM_START    0x00000000
  5703. +#define CHIPMEM_END    0x00200000    /* overridden by argv[1] */
  5704. +
  5705. +#define SAVEKMSG_MAGIC1    0x53415645    /* 'SAVE' */
  5706. +#define SAVEKMSG_MAGIC2    0x4B4D5347    /* 'KMSG' */
  5707. +
  5708. +struct savekmsg {
  5709. +    u_long magic1;    /* SAVEKMSG_MAGIC1 */
  5710. +    u_long magic2;    /* SAVEKMSG_MAGIC2 */
  5711. +    u_long magicptr;    /* address of magic1 */
  5712. +    u_long size;
  5713. +    char data[0];
  5714. +};
  5715. +
  5716. +
  5717. +int main(int argc, char *argv[])
  5718. +{
  5719. +    u_long start = CHIPMEM_START, end = CHIPMEM_END, p;
  5720. +    int found = 0;
  5721. +    struct savekmsg *m = NULL;
  5722. +
  5723. +    if (argc >= 2)
  5724. +    end = strtoul(argv[1], NULL, 0);
  5725. +    printf("Searching for SAVEKMSG magic...\n");
  5726. +    for (p = start; p <= end-sizeof(struct savekmsg); p += 4) {
  5727. +    m = (struct savekmsg *)p;
  5728. +    if ((m->magic1 == SAVEKMSG_MAGIC1) && (m->magic2 == SAVEKMSG_MAGIC2) &&
  5729. +        (m->magicptr == p)) {
  5730. +        found = 1;
  5731. +        break;
  5732. +    }
  5733. +    }
  5734. +    if (!found)
  5735. +    printf("Not found\n");
  5736. +    else {
  5737. +    printf("Found %ld bytes at 0x%08lx\n", m->size, (u_long)&m->data);
  5738. +    puts(">>>>>>>>>>>>>>>>>>>>");
  5739. +    fflush(stdout);
  5740. +    write(1, &m->data, m->size);
  5741. +    fflush(stdout);
  5742. +    puts("<<<<<<<<<<<<<<<<<<<<");
  5743. +    }
  5744. +    return(0);
  5745. +}
  5746. diff -u --recursive --new-file pre2.0.6/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
  5747. --- pre2.0.6/linux/drivers/block/floppy.c    Fri May 17 15:32:13 1996
  5748. +++ linux/drivers/block/floppy.c    Tue May 21 07:00:25 1996
  5749. @@ -3817,19 +3817,9 @@
  5750.      }
  5751.      switch (reply_buffer[0] >> 5) {
  5752.          case 0x0:
  5753. -            output_byte(FD_SAVE);
  5754. -            r = result();
  5755. -            if (r != 16) {
  5756. -                printk("FDC %d init: SAVE: unexpected return of %d bytes.\n", fdc, r);
  5757. -                return FDC_UNKNOWN;
  5758. -            }
  5759. -            if (!(reply_buffer[0] & 0x40)) {
  5760. -                printk(KERN_INFO "FDC %d is a 3Volt 82078SL.\n",fdc);
  5761. -                return FDC_82078;
  5762. -            }
  5763.              /* Either a 82078-1 or a 82078SL running at 5Volt */
  5764. -            printk(KERN_INFO "FDC %d is an 82078-1.\n",fdc);
  5765. -            return FDC_82078_1;
  5766. +            printk(KERN_INFO "FDC %d is an 82078.\n",fdc);
  5767. +            return FDC_82078;
  5768.          case 0x1:
  5769.              printk(KERN_INFO "FDC %d is a 44pin 82078\n",fdc);
  5770.              return FDC_82078;
  5771. diff -u --recursive --new-file pre2.0.6/linux/drivers/block/linear.c linux/drivers/block/linear.c
  5772. --- pre2.0.6/linux/drivers/block/linear.c    Fri May 17 15:32:13 1996
  5773. +++ linux/drivers/block/linear.c    Mon May 20 07:50:46 1996
  5774. @@ -33,7 +33,7 @@
  5775.    struct linear_data *data;
  5776.  
  5777.    MOD_INC_USE_COUNT;
  5778. -  
  5779. +
  5780.    mddev->private=kmalloc (sizeof (struct linear_data), GFP_KERNEL);
  5781.    data=(struct linear_data *) mddev->private;
  5782.  
  5783. @@ -43,10 +43,10 @@
  5784.       I moved it here... Any comment ? ;-)
  5785.     */
  5786.  
  5787. -  data->smallest=devices[minor];
  5788. +  data->smallest=mddev->devices;
  5789.    for (i=1; i<mddev->nb_dev; i++)
  5790. -    if (data->smallest->size > devices[minor][i].size)
  5791. -      data->smallest=devices[minor]+i;
  5792. +    if (data->smallest->size > mddev->devices[i].size)
  5793. +      data->smallest=mddev->devices+i;
  5794.    
  5795.    nb_zone=data->nr_zones=
  5796.      md_size[minor]/data->smallest->size +
  5797. @@ -54,12 +54,12 @@
  5798.    
  5799.    data->hash_table=kmalloc (sizeof (struct linear_hash)*nb_zone, GFP_KERNEL);
  5800.  
  5801. -  size=devices[minor][cur].size;
  5802. +  size=mddev->devices[cur].size;
  5803.  
  5804.    i=0;
  5805.    while (cur<mddev->nb_dev)
  5806.    {
  5807. -    data->hash_table[i].dev0=devices[minor]+cur;
  5808. +    data->hash_table[i].dev0=mddev->devices+cur;
  5809.  
  5810.      if (size>=data->smallest->size) /* If we completely fill the slot */
  5811.      {
  5812. @@ -69,7 +69,7 @@
  5813.        if (!size)
  5814.        {
  5815.      if (++cur==mddev->nb_dev) continue;
  5816. -    size=devices[minor][cur].size;
  5817. +    size=mddev->devices[cur].size;
  5818.        }
  5819.  
  5820.        continue;
  5821. @@ -82,8 +82,8 @@
  5822.      }
  5823.  
  5824.      dev0_size=size;        /* Here, we use a 2nd dev to fill the slot */
  5825. -    size=devices[minor][cur].size;
  5826. -    data->hash_table[i++].dev1=devices[minor]+cur;
  5827. +    size=mddev->devices[cur].size;
  5828. +    data->hash_table[i++].dev1=mddev->devices+cur;
  5829.      size-=(data->smallest->size - dev0_size);
  5830.    }
  5831.  
  5832. diff -u --recursive --new-file pre2.0.6/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
  5833. --- pre2.0.6/linux/drivers/block/ll_rw_blk.c    Mon May 20 08:20:58 1996
  5834. +++ linux/drivers/block/ll_rw_blk.c    Mon May 20 07:50:46 1996
  5835. @@ -489,8 +489,11 @@
  5836.  #ifdef CONFIG_BLK_DEV_MD
  5837.          if (major==MD_MAJOR &&
  5838.              md_map (MINOR(bh[i]->b_dev), &bh[i]->b_rdev,
  5839. -                &bh[i]->b_rsector, bh[i]->b_size >> 9))
  5840. +                &bh[i]->b_rsector, bh[i]->b_size >> 9)) {
  5841. +                printk (KERN_ERR
  5842. +                "Bad md_map in ll_rw_block\n");
  5843.                  goto sorry;
  5844. +        }
  5845.  #endif
  5846.      }
  5847.  
  5848. @@ -561,7 +564,7 @@
  5849.                  md_map (MINOR(dev), &rdev,
  5850.                      &rsector, buffersize >> 9)) {
  5851.                      printk (KERN_ERR
  5852. -                                        "Bad md_map in ll_rw_page_size\n");
  5853. +                                        "Bad md_map in ll_rw_swap_file\n");
  5854.                  return;
  5855.              }
  5856.  #endif
  5857. diff -u --recursive --new-file pre2.0.6/linux/drivers/block/md.c linux/drivers/block/md.c
  5858. --- pre2.0.6/linux/drivers/block/md.c    Sun Apr 21 19:22:02 1996
  5859. +++ linux/drivers/block/md.c    Mon May 20 07:50:46 1996
  5860. @@ -65,7 +65,6 @@
  5861.  
  5862.  static struct md_personality *pers[MAX_PERSONALITY]={NULL, };
  5863.  
  5864. -struct real_dev devices[MAX_MD_DEV][MAX_REAL];
  5865.  struct md_dev md_dev[MAX_MD_DEV];
  5866.  
  5867.  static struct gendisk *find_gendisk (kdev_t dev)
  5868. @@ -84,7 +83,6 @@
  5869.  }
  5870.  
  5871.  
  5872. -/* Picked up from genhd.c */
  5873.  char *partition_name (kdev_t dev)
  5874.  {
  5875.    static char name[40];        /* This should be long
  5876. @@ -112,21 +110,171 @@
  5877.        continue;
  5878.      
  5879.      for (j=0; j<md_dev[i].nb_dev; j++)
  5880. -      if (read_ahead[MAJOR(devices[i][j].dev)]<minra)
  5881. -    minra=read_ahead[MAJOR(devices[i][j].dev)];
  5882. +      if (read_ahead[MAJOR(md_dev[i].devices[j].dev)]<minra)
  5883. +    minra=read_ahead[MAJOR(md_dev[i].devices[j].dev)];
  5884.    }
  5885.    
  5886.    read_ahead[MD_MAJOR]=minra;
  5887.  }
  5888.  
  5889.  
  5890. +static int do_md_run (int minor, int repart)
  5891. +{
  5892. +  int pnum, i, min, current_ra, err;
  5893. +  
  5894. +  if (!md_dev[minor].nb_dev)
  5895. +    return -EINVAL;
  5896. +  
  5897. +  if (md_dev[minor].pers)
  5898. +    return -EBUSY;
  5899. +  
  5900. +  md_dev[minor].repartition=repart;
  5901. +  
  5902. +  if ((pnum=PERSONALITY(md_dev+minor) >> (PERSONALITY_SHIFT))
  5903. +      >= MAX_PERSONALITY)
  5904. +    return -EINVAL;
  5905. +  
  5906. +  if (!pers[pnum])
  5907. +  {
  5908. +#ifdef CONFIG_KERNELD
  5909. +    char module_name[80];
  5910. +    sprintf (module_name, "md-personality-%d", pnum);
  5911. +    request_module (module_name);
  5912. +    if (!pers[pnum])
  5913. +#endif
  5914. +      return -EINVAL;
  5915. +  }
  5916. +  
  5917. +  min=1 << FACTOR_SHIFT(FACTOR((md_dev+minor)));
  5918. +  
  5919. +  for (i=0; i<md_dev[minor].nb_dev; i++)
  5920. +    if (md_dev[minor].devices[i].size<min)
  5921. +    {
  5922. +      printk ("Dev %s smaller than %dk, cannot shrink\n",
  5923. +          partition_name (md_dev[minor].devices[i].dev), min);
  5924. +      return -EINVAL;
  5925. +    }
  5926. +  
  5927. +  /* Resize devices according to the factor. It is used to align
  5928. +     partitions size on a given chunk size. */
  5929. +  md_size[minor]=0;
  5930. +  
  5931. +  for (i=0; i<md_dev[minor].nb_dev; i++)
  5932. +  {
  5933. +    md_dev[minor].devices[i].size &= ~(min - 1);
  5934. +    md_size[minor] += md_dev[minor].devices[i].size;
  5935. +  }
  5936. +
  5937. +  md_dev[minor].pers=pers[pnum];
  5938. +  
  5939. +  if ((err=md_dev[minor].pers->run (minor, md_dev+minor)))
  5940. +  {
  5941. +    md_dev[minor].pers=NULL;
  5942. +    return (err);
  5943. +  }
  5944. +  
  5945. +  /* FIXME : We assume here we have blocks
  5946. +     that are twice as large as sectors.
  5947. +     THIS MAY NOT BE TRUE !!! */
  5948. +  md_hd_struct[minor].start_sect=0;
  5949. +  md_hd_struct[minor].nr_sects=md_size[minor]<<1;
  5950. +  
  5951. +  /* It would be better to have a per-md-dev read_ahead. Currently,
  5952. +     we only use the smallest read_ahead among md-attached devices */
  5953. +  
  5954. +  current_ra=read_ahead[MD_MAJOR];
  5955. +  
  5956. +  for (i=0; i<md_dev[minor].nb_dev; i++)
  5957. +    if (current_ra>read_ahead[MAJOR(md_dev[minor].devices[i].dev)])
  5958. +      current_ra=read_ahead[MAJOR(md_dev[minor].devices[i].dev)];
  5959. +  
  5960. +  read_ahead[MD_MAJOR]=current_ra;
  5961. +  
  5962. +  printk ("START_DEV md%x %s\n", minor, md_dev[minor].pers->name);
  5963. +  return (0);
  5964. +}
  5965. +
  5966. +
  5967. +static int do_md_stop (int minor, struct inode *inode)
  5968. +{
  5969. +  int i;
  5970. +  
  5971. +  if (inode->i_count>1 || md_dev[minor].busy>1) /* ioctl : one open channel */
  5972. +  {
  5973. +    printk ("STOP_MD md%x failed : i_count=%d, busy=%d\n", minor, inode->i_count, md_dev[minor].busy);
  5974. +    return -EBUSY;
  5975. +  }
  5976. +  
  5977. +  if (md_dev[minor].pers)
  5978. +  {
  5979. +    /*  The device won't exist anymore -> flush it now */
  5980. +    fsync_dev (inode->i_rdev);
  5981. +    invalidate_buffers (inode->i_rdev);
  5982. +    md_dev[minor].pers->stop (minor, md_dev+minor);
  5983. +  }
  5984. +  
  5985. +  /* Remove locks. */
  5986. +  for (i=0; i<md_dev[minor].nb_dev; i++)
  5987. +    clear_inode (md_dev[minor].devices[i].inode);
  5988. +  
  5989. +  md_dev[minor].nb_dev=md_size[minor]=0;
  5990. +  md_dev[minor].pers=NULL;
  5991. +  
  5992. +  set_ra ();            /* calculate new read_ahead */
  5993. +  
  5994. +  printk ("STOP_DEV md%x\n", minor);
  5995. +  return (0);
  5996. +}
  5997. +
  5998. +
  5999. +static int do_md_add (int minor, kdev_t dev)
  6000. +{
  6001. +  struct gendisk *gen_real;
  6002. +  int i;
  6003. +  
  6004. +  if (MAJOR(dev)==MD_MAJOR || md_dev[minor].nb_dev==MAX_REAL)
  6005. +    return -EINVAL;
  6006. +  
  6007. +  if (!fs_may_mount (dev) || md_dev[minor].pers)
  6008. +    return -EBUSY;
  6009. +  
  6010. +  if (!(gen_real=find_gendisk (dev)))
  6011. +    return -ENOENT;
  6012. +  
  6013. +  i=md_dev[minor].nb_dev++;
  6014. +  md_dev[minor].devices[i].dev=dev;
  6015. +  
  6016. +  /* Lock the device by inserting a dummy inode. This doesn't
  6017. +     smell very good, but I need to be consistent with the
  6018. +     mount stuff, specially with fs_may_mount. If someone have
  6019. +     a better idea, please help ! */
  6020. +  
  6021. +  md_dev[minor].devices[i].inode=get_empty_inode ();
  6022. +  md_dev[minor].devices[i].inode->i_dev=dev; /* don't care about
  6023. +                        other fields */
  6024. +  insert_inode_hash (md_dev[minor].devices[i].inode);
  6025. +  
  6026. +  /* Sizes are now rounded at run time */
  6027. +  
  6028. +  md_dev[minor].devices[i].size=gen_real->sizes[MINOR(dev)];
  6029. +  md_dev[minor].devices[i].offset=i ?
  6030. +    (md_dev[minor].devices[i-1].offset + md_dev[minor].devices[i-1].size) : 0;
  6031. +  
  6032. +  if (!i)
  6033. +    md_size[minor]=0;
  6034. +  
  6035. +  md_size[minor]+=md_dev[minor].devices[i].size;
  6036. +  
  6037. +  printk ("REGISTER_DEV %s to md%x done\n", partition_name(dev), minor);
  6038. +  return (0);
  6039. +}
  6040. +
  6041. +
  6042.  static int md_ioctl (struct inode *inode, struct file *file,
  6043.                       unsigned int cmd, unsigned long arg)
  6044.  {
  6045. -  int minor, index, err, current_ra;
  6046. -  struct gendisk *gen_real;
  6047. +  int minor, err;
  6048.    struct hd_geometry *loc = (struct hd_geometry *) arg;
  6049. -  kdev_t dev;
  6050.  
  6051.    if (!suser())
  6052.      return -EACCES;
  6053. @@ -143,145 +291,14 @@
  6054.    switch (cmd)
  6055.    {
  6056.      case REGISTER_DEV:
  6057. -    dev=to_kdev_t ((dev_t) arg);
  6058. -    if (MAJOR(dev)==MD_MAJOR || md_dev[minor].nb_dev==MAX_REAL)
  6059. -      return -EINVAL;
  6060. -
  6061. -    if (!fs_may_mount (dev) || md_dev[minor].pers)
  6062. -      return -EBUSY;
  6063. -
  6064. -    if (!(gen_real=find_gendisk (dev)))
  6065. -      return -ENOENT;
  6066. -
  6067. -    index=md_dev[minor].nb_dev++;
  6068. -    devices[minor][index].dev=dev;
  6069. -
  6070. -    /* Lock the device by inserting a dummy inode. This doesn't
  6071. -       smell very good, but I need to be consistent with the
  6072. -       mount stuff, specially with fs_may_mount. If someone have
  6073. -       a better idea, please help ! */
  6074. -    
  6075. -    devices[minor][index].inode=get_empty_inode ();
  6076. -    devices[minor][index].inode->i_dev=dev; /* don't care about
  6077. -                           other fields */
  6078. -    insert_inode_hash (devices[minor][index].inode);
  6079. -    
  6080. -    /* Devices sizes are rounded to a multiple of page (needed for
  6081. -       paging). This is NOT done by fdisk when partitioning,
  6082. -       but that's a DOS thing anyway... */
  6083. -    
  6084. -    devices[minor][index].size=gen_real->sizes[MINOR(dev)] & ~((PAGE_SIZE >> 10)-1);
  6085. -    devices[minor][index].offset=index ?
  6086. -      (devices[minor][index-1].offset + devices[minor][index-1].size) : 0;
  6087. -
  6088. -    if (!index)
  6089. -      md_size[minor]=devices[minor][index].size;
  6090. -    else
  6091. -      md_size[minor]+=devices[minor][index].size;
  6092. -
  6093. -    printk("REGISTER_DEV %s to md%x done\n", partition_name(dev), minor);
  6094. -    break;
  6095. +      return do_md_add (minor, to_kdev_t ((dev_t) arg));
  6096.  
  6097.      case START_MD:
  6098. -    if (!md_dev[minor].nb_dev)
  6099. -      return -EINVAL;
  6100. -
  6101. -    if (md_dev[minor].pers)
  6102. -      return -EBUSY;
  6103. -
  6104. -    md_dev[minor].repartition=(int) arg;
  6105. -    
  6106. -    if ((index=PERSONALITY(md_dev+minor) >> (PERSONALITY_SHIFT))
  6107. -    >= MAX_PERSONALITY)
  6108. -      return -EINVAL;
  6109. -
  6110. -    if (!pers[index])
  6111. -    {
  6112. -#ifdef CONFIG_KERNELD
  6113. -      char module_name[80];
  6114. -      sprintf (module_name, "md-personality-%d", index);
  6115. -      request_module (module_name);
  6116. -      if (!pers[index])
  6117. -#endif
  6118. -    return -EINVAL;
  6119. -    }
  6120. -
  6121. -    md_dev[minor].pers=pers[index];
  6122. -
  6123. -    if ((err=md_dev[minor].pers->run (minor, md_dev+minor)))
  6124. -    {
  6125. -      md_dev[minor].pers=NULL;
  6126. -      return (err);
  6127. -    }
  6128. -
  6129. -    /* FIXME : We assume here we have blocks
  6130. -       that are twice as large as sectors.
  6131. -       THIS MAY NOT BE TRUE !!! */
  6132. -    md_hd_struct[minor].start_sect=0;
  6133. -    md_hd_struct[minor].nr_sects=md_size[minor]<<1;
  6134. -
  6135. -    /* It would be better to have a per-md-dev read_ahead. Currently,
  6136. -       we only use the smallest read_ahead among md-attached devices */
  6137. -
  6138. -    current_ra=read_ahead[MD_MAJOR];
  6139. -    
  6140. -    for (index=0; index<md_dev[minor].nb_dev; index++)
  6141. -    {
  6142. -      if (current_ra>read_ahead[MAJOR(devices[minor][index].dev)])
  6143. -    current_ra=read_ahead[MAJOR(devices[minor][index].dev)];
  6144. -
  6145. -      devices[minor][index].fault_count=0;
  6146. -      devices[minor][index].invalid=VALID;
  6147. -    }
  6148. -
  6149. -    read_ahead[MD_MAJOR]=current_ra;
  6150. -
  6151. -    printk ("START_DEV md%x %s\n", minor, md_dev[minor].pers->name);
  6152. -    break;
  6153. +      return do_md_run (minor, (int) arg);
  6154.  
  6155.      case STOP_MD:
  6156. -    if (inode->i_count>1 || md_dev[minor].busy>1) /* ioctl : one open channel */
  6157. -    {
  6158. -      printk ("STOP_MD md%x failed : i_count=%d, busy=%d\n", minor, inode->i_count, md_dev[minor].busy);
  6159. -      return -EBUSY;
  6160. -    }
  6161. -
  6162. -    if (md_dev[minor].pers)
  6163. -    {
  6164. -      /*  The device won't exist anymore -> flush it now */
  6165. -      fsync_dev (inode->i_rdev);
  6166. -      invalidate_buffers (inode->i_rdev);
  6167. -      md_dev[minor].pers->stop (minor, md_dev+minor);
  6168. -    }
  6169. -
  6170. -    /* Remove locks. */
  6171. -    for (index=0; index<md_dev[minor].nb_dev; index++)
  6172. -      clear_inode (devices[minor][index].inode);
  6173. -
  6174. -    md_dev[minor].nb_dev=md_size[minor]=0;
  6175. -    md_dev[minor].pers=NULL;
  6176. -
  6177. -    set_ra ();            /* calculate new read_ahead */
  6178. -    
  6179. -    printk ("STOP_DEV md%x\n", minor);
  6180. -    break;
  6181. -
  6182. -#if defined(CONFIG_MD_SUPPORT_RAID1) || defined(CONFIG_MD_SUPPORT_RAID5)
  6183. -    case MD_INVALID:
  6184. -    dev=to_kdev_t ((dev_t) arg);
  6185. -    if (!(err=md_valid_device (minor, dev, INVALID_ALWAYS)))
  6186. -      printk ("md%d : %s disabled\n", minor, partition_name (dev));
  6187. -
  6188. -    return (err);
  6189. -
  6190. -    case MD_VALID:
  6191. -    dev=to_kdev_t ((dev_t) arg);
  6192. -    if (!(err=md_valid_device (minor, dev, VALID)))
  6193. -      printk ("md%d : %s enabled\n", minor, partition_name (dev));
  6194. -
  6195. -    return (err);
  6196. -#endif
  6197. -    
  6198. +      return do_md_stop (minor, inode);
  6199. +      
  6200.      case BLKGETSIZE:   /* Return device size */
  6201.      if  (!arg)  return -EINVAL;
  6202.      err=verify_area (VERIFY_WRITE, (long *) arg, sizeof(long));
  6203. @@ -309,6 +326,11 @@
  6204.      put_user (read_ahead[MAJOR(inode->i_rdev)], (long *) arg);
  6205.      break;
  6206.  
  6207. +    /* We have a problem here : there is no easy way to give a CHS
  6208. +       virtual geometry. We currently pretend that we have a 2 heads
  6209. +       4 sectors (with a BIG number of cylinders...). This drives dosfs
  6210. +       just mad... ;-) */
  6211. +    
  6212.      case HDIO_GETGEO:
  6213.      if (!loc)  return -EINVAL;
  6214.      err = verify_area(VERIFY_WRITE, loc, sizeof(*loc));
  6215. @@ -392,17 +414,11 @@
  6216.  {
  6217.  #include <linux/symtab_begin.h>
  6218.  
  6219. -  X(devices),
  6220.    X(md_size),
  6221.    X(register_md_personality),
  6222.    X(unregister_md_personality),
  6223.    X(partition_name),
  6224.  
  6225. -#if defined(CONFIG_MD_SUPPORT_RAID1) || defined(CONFIG_MD_SUPPORT_RAID5)
  6226. -  X(md_valid_device),
  6227. -  X(md_can_reemit),
  6228. -#endif
  6229. -
  6230.  #include <linux/symtab_end.h>
  6231.  };
  6232.  
  6233. @@ -414,11 +430,8 @@
  6234.    for(i=0;i<MAX_MD_DEV;i++)
  6235.    {
  6236.      md_blocksizes[i] = 1024;
  6237. -    md_gendisk.part[i].start_sect=-1;
  6238. +    md_gendisk.part[i].start_sect=-1; /* avoid partition check */
  6239.      md_dev[i].pers=NULL;
  6240. -#ifdef MD_COUNT_SIZES
  6241. -    md_dev[i].smallest_count=md_dev[i].biggest_count=md_dev[i].equal_count=0;
  6242. -#endif
  6243.    }
  6244.  
  6245.    blksize_size[MAJOR_NR] = md_blocksizes;
  6246. @@ -458,10 +471,8 @@
  6247.        sz+=sprintf (page+sz, " %s", md_dev[i].pers->name);
  6248.  
  6249.      for (j=0; j<md_dev[i].nb_dev; j++)
  6250. -      sz+=sprintf (page+sz, " %s%s%s",
  6251. -           (devices[i][j].invalid==VALID) ? "" : "(",
  6252. -           partition_name(devices[i][j].dev),
  6253. -           (devices[i][j].invalid==VALID) ? "" : ")");
  6254. +      sz+=sprintf (page+sz, " %s",
  6255. +           partition_name(md_dev[i].devices[j].dev));
  6256.      
  6257.      if (md_dev[i].nb_dev)
  6258.        sz+=sprintf (page+sz, " %d blocks", md_size[i]);
  6259. @@ -475,11 +486,10 @@
  6260.      if (md_dev[i].pers->max_invalid_dev)
  6261.        sz+=sprintf (page+sz, " maxfault=%ld", MAX_FAULT(md_dev+i));
  6262.  
  6263. -    if (md_dev[i].pers != pers[(LINEAR>>PERSONALITY_SHIFT)])
  6264. -    {
  6265. -      sz+=sprintf (page+sz, " %dk chunks", 1<<FACTOR_SHIFT(FACTOR(md_dev+i)));
  6266. -    }
  6267. -    sz+=sprintf (page+sz, "\n");
  6268. +    sz+=sprintf (page+sz, " %dk %s\n", 1<<FACTOR_SHIFT(FACTOR(md_dev+i)),
  6269. +         md_dev[i].pers == pers[LINEAR>>PERSONALITY_SHIFT] ?
  6270. +         "rounding" : "chunks");
  6271. +
  6272.      sz+=md_dev[i].pers->status (page+sz, i, md_dev+i);
  6273.    }
  6274.  
  6275. diff -u --recursive --new-file pre2.0.6/linux/drivers/block/raid0.c linux/drivers/block/raid0.c
  6276. --- pre2.0.6/linux/drivers/block/raid0.c    Fri May 17 15:32:13 1996
  6277. +++ linux/drivers/block/raid0.c    Mon May 20 07:50:46 1996
  6278. @@ -38,7 +38,7 @@
  6279.    for (i=1; i<mddev->nb_dev; i++)
  6280.    {
  6281.      for (j=0; j<i; j++)
  6282. -      if (devices[minor][i].size==devices[minor][j].size)
  6283. +      if (mddev->devices[i].size==mddev->devices[j].size)
  6284.        {
  6285.      c=1;
  6286.      break;
  6287. @@ -62,12 +62,12 @@
  6288.      c=0;
  6289.  
  6290.      for (j=0; j<mddev->nb_dev; j++)
  6291. -      if (devices[minor][j].size>current_offset)
  6292. +      if (mddev->devices[j].size>current_offset)
  6293.        {
  6294. -    data->strip_zone[i].dev[c++]=devices[minor]+j;
  6295. +    data->strip_zone[i].dev[c++]=mddev->devices+j;
  6296.      if (!smallest_by_zone ||
  6297. -        smallest_by_zone->size > devices[minor][j].size)
  6298. -      smallest_by_zone=devices[minor]+j;
  6299. +        smallest_by_zone->size > mddev->devices[j].size)
  6300. +      smallest_by_zone=mddev->devices+j;
  6301.        }
  6302.  
  6303.      data->strip_zone[i].nb_dev=c;
  6304. @@ -85,29 +85,10 @@
  6305.  
  6306.  static int raid0_run (int minor, struct md_dev *mddev)
  6307.  {
  6308. -  int cur=0, i=0, size, zone0_size, nb_zone, min;
  6309. +  int cur=0, i=0, size, zone0_size, nb_zone;
  6310.    struct raid0_data *data;
  6311.  
  6312. -  min=1 << FACTOR_SHIFT(FACTOR(mddev));
  6313. -
  6314. -  for (i=0; i<mddev->nb_dev; i++)
  6315. -    if (devices[minor][i].size<min)
  6316. -    {
  6317. -      printk ("Cannot use %dk chunks on dev %s\n", min,
  6318. -          partition_name (devices[minor][i].dev));
  6319. -      return -EINVAL;
  6320. -    }
  6321. -  
  6322.    MOD_INC_USE_COUNT;
  6323. -  
  6324. -  /* Resize devices according to the factor */
  6325. -  md_size[minor]=0;
  6326. -  
  6327. -  for (i=0; i<mddev->nb_dev; i++)
  6328. -  {
  6329. -    devices[minor][i].size &= ~((1 << FACTOR_SHIFT(FACTOR(mddev))) - 1);
  6330. -    md_size[minor] += devices[minor][i].size;
  6331. -  }
  6332.  
  6333.    mddev->private=kmalloc (sizeof (struct raid0_data), GFP_KERNEL);
  6334.    data=(struct raid0_data *) mddev->private;
  6335. diff -u --recursive --new-file pre2.0.6/linux/drivers/cdrom/aztcd.c linux/drivers/cdrom/aztcd.c
  6336. --- pre2.0.6/linux/drivers/cdrom/aztcd.c    Mon May 20 08:20:58 1996
  6337. +++ linux/drivers/cdrom/aztcd.c    Mon May 20 08:38:42 1996
  6338. @@ -151,7 +151,7 @@
  6339.          V2.40   Reorganized the placement of functions in the source code file
  6340.                  to reflect the layered approach; did not actually change code
  6341.                  Werner Zimmermann, May 1, 96
  6342. -        V2.50   Heiko Eissfeld suggested to remove some VERIFY_READs in 
  6343. +        V2.50   Heiko Eissfeldt suggested to remove some VERIFY_READs in 
  6344.                  aztcd_ioctl; check_aztcd_media_change modified 
  6345.                  Werner Zimmermann, May 16, 96       
  6346.  */
  6347. diff -u --recursive --new-file pre2.0.6/linux/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c
  6348. --- pre2.0.6/linux/drivers/cdrom/mcdx.c    Mon May 20 08:20:59 1996
  6349. +++ linux/drivers/cdrom/mcdx.c    Tue May 21 11:49:03 1996
  6350. @@ -1,7 +1,12 @@
  6351.  /*
  6352.   * The Mitsumi CDROM interface
  6353. + *
  6354. + * (H) Hackright 1996 by Marcin Dalecki <dalecki@namu03.gwdg.de>
  6355. + * 
  6356. + * Based on previous work (as of version 1.9) done by:
  6357.   * Copyright (C) 1995 Heiko Schlittermann <heiko@lotte.sax.de>
  6358. - * VERSION: 2.3
  6359. + *
  6360. + * VERSION: 2.5
  6361.   * 
  6362.   * This program is free software; you can redistribute it and/or modify
  6363.   * it under the terms of the GNU General Public License as published by
  6364. @@ -36,28 +41,31 @@
  6365.   *      Mostly fixes to some silly bugs in the previous release :-).
  6366.   *      (Hi Michael Thimm! Thank's for lending me Your's double speed drive.)
  6367.   * 2.3  1996/05/15 Marcin Dalecki <dalecki@namu03.gwdg.de>
  6368. - *    Fixed stereo support. 
  6369. + *      Fixed stereo support. 
  6370. + * 2.5  1996/05/19 Marcin Dalecki <dalecki@namu03.gwdg.de>
  6371. + *      Overall performance increased by a factor of 1.25 :-).
  6372. + *      I hope Heiko doesn't mind the Hackright change, but there isn't much of
  6373. + *      code left from his version 1.9 anymore. 
  6374. + *      Start speedup for Work(Man|Bone).
  6375. + *
  6376.   * NOTE:
  6377. - *    There will be probably a 3.0 adhering to the new generic non ATAPI
  6378. - *    cdrom interface in the unforeseen future.
  6379. + *      There will be probably a 3.0 adhering to the new generic non ATAPI
  6380. + *      CDROM interface in the unforeseen future.
  6381.   */
  6382. -#define VERSION "2.3"
  6383. +#define VERSION "2.5"
  6384.  
  6385.  #include <linux/version.h>
  6386.  #include <linux/module.h>
  6387.  
  6388.  #include <linux/errno.h>
  6389.  #include <linux/sched.h>
  6390. -#include <linux/timer.h>
  6391.  #include <linux/fs.h>
  6392.  #include <linux/kernel.h>
  6393.  #include <linux/cdrom.h>
  6394.  #include <linux/ioport.h>
  6395.  #include <linux/mm.h>
  6396.  #include <linux/malloc.h>
  6397. -#include <asm/system.h>
  6398.  #include <asm/io.h>
  6399. -#include <asm/segment.h>
  6400.  
  6401.  #include <linux/major.h>
  6402.  #define MAJOR_NR MITSUMI_X_CDROM_MAJOR
  6403. @@ -69,8 +77,7 @@
  6404.  #define    mcdx_drive_map mcdx
  6405.  #include <linux/mcdx.h>
  6406.  
  6407. -#define REQUEST_SIZE    200
  6408. -#define DIRECT_SIZE    200
  6409. +#define REQUEST_SIZE    400
  6410.  
  6411.  enum drivemodes {
  6412.      TOC, DATA, RAW, COOKED
  6413. @@ -110,11 +117,12 @@
  6414.  /* 
  6415.   * Per drive/controller stuff.
  6416.   */
  6417. -
  6418.  struct s_drive_stuff {
  6419.      struct wait_queue *busyq;
  6420. -    
  6421. +
  6422.      /* flags */
  6423. +    u_char used:1;        /* locks on open, we allow only
  6424. +                   exclusive usage of the drive */
  6425.      u_char introk:1;    /* status of last irq operation */
  6426.      u_char busy:1;        /* drive performs an operation */
  6427.      u_char eject_sw:1;    /* 1 - eject on last close (default 0) */
  6428. @@ -126,12 +134,12 @@
  6429.  
  6430.      /* drives capabilities */
  6431.      u_char door:1;        /* can close/lock tray */
  6432. -    u_char multi_cap:1;    /* multisession capable */
  6433. +    u_char multi_cap:1;    /* multi-session capable */
  6434.      u_char double_speed:1;    /* double speed drive */
  6435.  
  6436.      /* cd infos */
  6437. -    unsigned int n_first;
  6438. -    unsigned int n_last;
  6439. +    u_int first;
  6440. +    u_int last;
  6441.      struct cdrom_msf0 msf_leadout;
  6442.      struct s_multi multi;
  6443.  
  6444. @@ -141,26 +149,30 @@
  6445.      int audiostatus;
  6446.  
  6447.      /* `buffer' control */
  6448. -    unsigned int valid:1;
  6449. +    u_char valid:1;
  6450.      int pending;
  6451. -    int off_direct;
  6452. -    int off_requested;
  6453. +    int border;        /* the last sector in sequence we will read,
  6454. +                   without reissuing a read command */
  6455.  
  6456. +    u_int base;        /* base for all registers of the drive */
  6457.      int irq;        /* irq used by this drive */
  6458. -    unsigned int base;    /* base for all registers of the drive */
  6459. -    int users;        /* keeps track of open/close */
  6460. -    int lastsector;        /* last accessible blocks */
  6461. +    int lastsector;        /* last accessible block */
  6462.  };
  6463.  
  6464.  /*
  6465.   * Macros for accessing interface registers
  6466.   */
  6467. -
  6468.  #define DATA_REG    (stuffp->base)
  6469.  #define RESET_REG    (stuffp->base+1)
  6470.  #define STAT_REG    (stuffp->base+1)
  6471.  #define CHAN_REG    (stuffp->base+3)
  6472.  
  6473. +/*      
  6474. + * Access to elements of the mcdx_drive_map members 
  6475. + */
  6476. +#define PORT     0
  6477. +#define IRQ     1
  6478. +
  6479.  /* 
  6480.   * declared in blk.h 
  6481.   */
  6482. @@ -175,7 +187,7 @@
  6483.  /*      
  6484.   * Indirect exported functions. These functions are exported by their
  6485.   * addresses, such as mcdx_open and mcdx_close in the 
  6486. - *  structure fops. 
  6487. + * structure fops. 
  6488.   */
  6489.  
  6490.  /* 
  6491. @@ -184,7 +196,7 @@
  6492.  static void mcdx_intr(int, void *, struct pt_regs *);
  6493.  
  6494.  /* 
  6495. -   * exported by file_ops 
  6496. + * exported by file_ops 
  6497.   */
  6498.  static int mcdx_open(struct inode *, struct file *);
  6499.  static void mcdx_close(struct inode *, struct file *);
  6500. @@ -192,8 +204,7 @@
  6501.                unsigned int, unsigned long);
  6502.  static int mcdx_media_change(kdev_t);
  6503.  
  6504. -
  6505. -static int mcdx_blocksizes[MCDX_NDRIVES];
  6506. +static int mcdx_blksize_size[MCDX_NDRIVES];
  6507.  static int mcdx_drive_map[][2] = MCDX_DRIVEMAP;
  6508.  static struct s_drive_stuff *mcdx_stuffp[MCDX_NDRIVES];
  6509.  static struct s_drive_stuff *mcdx_irq_map[16] =
  6510. @@ -221,7 +232,7 @@
  6511.   * Misc number converters 
  6512.   */
  6513.  
  6514. -static unsigned int bcd2uint(unsigned char c)
  6515. +static unsigned int bcd2uint(unsigned int c)
  6516.  {
  6517.      return (c >> 4) * 10 + (c & 0x0f);
  6518.  }
  6519. @@ -239,20 +250,6 @@
  6520.          - CD_BLOCK_OFFSET;
  6521.  }
  6522.  
  6523. -/*      
  6524. - * Access to elements of the mcdx_drive_map members 
  6525. - */
  6526. -static inline unsigned int port(int *ip)
  6527. -{
  6528. -    return (unsigned int) ip[0];
  6529. -}
  6530. -
  6531. -static inline int irq(int *ip)
  6532. -{
  6533. -    return ip[1];
  6534. -}
  6535. -
  6536. -
  6537.  /*
  6538.   * Low level hardware related functions.
  6539.   */
  6540. @@ -287,6 +284,14 @@
  6541.      return (inb(DATA_REG) & 0xff);
  6542.  }
  6543.  
  6544. +static void release_toc(struct s_drive_stuff *stuffp)
  6545. +{
  6546. +    if (stuffp->toc) {
  6547. +        kfree(stuffp->toc);
  6548. +        stuffp->toc = 0;
  6549. +    }
  6550. +}
  6551. +
  6552.  /* Send a command to the drive, wait for the result.
  6553.   * returns -1 on timeout, drive status otherwise.
  6554.   * If buffer is not zero, the result (length size) is stored there.
  6555. @@ -301,10 +306,6 @@
  6556.  {
  6557.      int st;
  6558.  
  6559. -    while (stuffp->busy) {
  6560. -        interruptible_sleep_on(&stuffp->busyq);
  6561. -    }
  6562. -    stuffp->busy = 1;
  6563.      stuffp->valid = 0;
  6564.      outb(command, DATA_REG);
  6565.      if (parslen)
  6566. @@ -321,19 +322,15 @@
  6567.      /* audio status? */
  6568.      if (stuffp->audiostatus == CDROM_AUDIO_INVALID) {
  6569.          stuffp->audiostatus =
  6570. -            (st & MCDX_RBIT_AUDIOBS) ? CDROM_AUDIO_PLAY : CDROM_AUDIO_NO_STATUS;
  6571. +            (st & MCDX_RBIT_AUDIOBS) ?
  6572. +            CDROM_AUDIO_PLAY : CDROM_AUDIO_NO_STATUS;
  6573.      } else if (stuffp->audiostatus == CDROM_AUDIO_PLAY
  6574.             && !(st & MCDX_RBIT_AUDIOBS)) {
  6575.          stuffp->audiostatus = CDROM_AUDIO_COMPLETED;
  6576.      }
  6577.      /* media change? */
  6578. -    if (st & MCDX_RBIT_CHANGED) {
  6579. +    if (st & MCDX_RBIT_CHANGED)
  6580.          stuffp->xxx = 1;
  6581. -        if (stuffp->toc) {
  6582. -            kfree(stuffp->toc);
  6583. -            stuffp->toc = 0;
  6584. -        }
  6585. -    }
  6586.      /* now actually get the data */
  6587.      while (size--) {
  6588.          if (-1 == (st = get_status(stuffp, timeout))) {
  6589. @@ -342,11 +339,9 @@
  6590.          *((char *) buffer) = st;
  6591.          buffer++;
  6592.      }
  6593. -
  6594. +    /* The goto's make GCC generate better code.
  6595. +     */
  6596.        end_talk:
  6597. -    stuffp->busy = 0;
  6598. -    wake_up_interruptible(&stuffp->busyq);
  6599. -
  6600.      return st;
  6601.  }
  6602.  
  6603. @@ -387,11 +382,11 @@
  6604.  
  6605.      ans = get_command(stuffp, MCDX_CMD_GET_TOC, buf, sizeof(buf), 2 * HZ);
  6606.      if (ans == -1) {
  6607. -        stuffp->n_first = 0;
  6608. -        stuffp->n_last = 0;
  6609. +        stuffp->first = 0;
  6610. +        stuffp->last = 0;
  6611.      } else {
  6612. -        stuffp->n_first = bcd2uint(buf[0]);
  6613. -        stuffp->n_last = bcd2uint(buf[1]);
  6614. +        stuffp->first = bcd2uint(buf[0]);
  6615. +        stuffp->last = bcd2uint(buf[1]);
  6616.          memcpy(&(stuffp->msf_leadout), buf + 2, 3);
  6617.      }
  6618.      return ans;
  6619. @@ -445,7 +440,7 @@
  6620.  int read_toc(struct s_drive_stuff *stuffp)
  6621.  {
  6622.      int trk;
  6623. -    int retries;
  6624. +    int i;
  6625.  
  6626.      if (stuffp->toc)
  6627.          return 0;
  6628. @@ -454,21 +449,16 @@
  6629.      if (-1 == set_drive_mode(stuffp, TOC))
  6630.          return -EIO;
  6631.  
  6632. -    /* all seems to be ok so far ... malloc */
  6633. +    /* All seems to be OK so far ... malloc. When this fails all bets
  6634. +     * are off anyway, so we don't check for it.
  6635. +     */
  6636.      stuffp->toc = kmalloc(sizeof(struct s_subqcode) *
  6637. -             (stuffp->n_last - stuffp->n_first + 2), GFP_KERNEL);
  6638. -    if (!stuffp->toc) {
  6639. -        printk(KERN_ERR MCDX ": malloc for toc failed\n");
  6640. -        set_drive_mode(stuffp, DATA);
  6641. -        return -EIO;
  6642. -    }
  6643. +             (stuffp->last - stuffp->first + 1), GFP_KERNEL);
  6644.      /* now read actually the index tracks */
  6645. -    for (trk = 0;
  6646. -         trk < (stuffp->n_last - stuffp->n_first + 1);
  6647. -         trk++)
  6648. +    for (trk = 0; trk < stuffp->last - stuffp->first + 1; trk++)
  6649.          stuffp->toc[trk].index = 0;
  6650.  
  6651. -    for (retries = 300; retries; retries--) {    /* why 300? */
  6652. +    for (i = 300; i; --i) {    /* why 300? */
  6653.          struct s_subqcode q;
  6654.          unsigned int idx;
  6655.  
  6656. @@ -478,20 +468,17 @@
  6657.          }
  6658.          idx = bcd2uint(q.index);
  6659.  
  6660. -        if ((idx > 0)
  6661. -            && (idx <= stuffp->n_last)
  6662. -            && (q.tno == 0)
  6663. -            && (stuffp->toc[idx - stuffp->n_first].index == 0)) {
  6664. -            stuffp->toc[idx - stuffp->n_first] = q;
  6665. +        if (idx > 0 && idx <= stuffp->last && q.tno == 0
  6666. +            && stuffp->toc[idx - stuffp->first].index == 0) {
  6667. +            stuffp->toc[idx - stuffp->first] = q;
  6668.              trk--;
  6669.          }
  6670.          if (trk == 0)
  6671.              break;
  6672.      }
  6673. -    memset(&stuffp->toc[stuffp->n_last - stuffp->n_first + 1],
  6674. -           0, sizeof(stuffp->toc[0]));
  6675. -    stuffp->toc[stuffp->n_last - stuffp->n_first + 1].dt
  6676. -        = stuffp->msf_leadout;
  6677. +    i = stuffp->last - stuffp->first + 1;
  6678. +    memset(&stuffp->toc[i], 0, sizeof(stuffp->toc[0]));
  6679. +    stuffp->toc[i].dt = stuffp->msf_leadout;
  6680.  
  6681.      /* unset toc mode */
  6682.      if (-1 == set_drive_mode(stuffp, DATA))
  6683. @@ -512,9 +499,9 @@
  6684.              stuffp->audiostatus = CDROM_AUDIO_ERROR;
  6685.              return -EIO;
  6686.          }
  6687. -        times.start = stuffp->toc[ti->cdti_trk0 - stuffp->n_first].dt;
  6688. +        times.start = stuffp->toc[ti->cdti_trk0 - stuffp->first].dt;
  6689.          times.stop = stuffp->resume.stop =
  6690. -            stuffp->toc[ti->cdti_trk1 - stuffp->n_first + 1].dt;
  6691. +            stuffp->toc[ti->cdti_trk1 - stuffp->first + 1].dt;
  6692.      } else {
  6693.          times = stuffp->resume;
  6694.      }
  6695. @@ -535,9 +522,12 @@
  6696.          return set_command(stuffp, MCDX_CMD_LOCK_DOOR,
  6697.                     &lock, sizeof(lock), 5 * HZ);
  6698.      return 0;
  6699. -}                /* 
  6700. -                 * KERNEL INTERFACE FUNCTIONS
  6701. -                 */
  6702. +}
  6703. +
  6704. +/* 
  6705. + * KERNEL INTERFACE FUNCTIONS
  6706. + */
  6707. +
  6708.  static int mcdx_ioctl(struct inode *ip, struct file *fp,
  6709.                unsigned int command, unsigned long arg)
  6710.  {
  6711. @@ -560,19 +550,6 @@
  6712.      if (!ip)
  6713.          return -EINVAL;
  6714.  
  6715. -    /*
  6716. -     * Update disk information, when necessary.
  6717. -     * This part will only work, when the new disk is of the same type as 
  6718. -     * the one which was previously there, esp. also for audio disks.
  6719. -     * This doesn't hurt us, since otherwise the mounting/unmounting scheme 
  6720. -     * will ensure correct operation.
  6721. -     */
  6722. -    if (stuffp->xxx) {    /* disk changed */
  6723. -        if ((-1 == request_toc_data(stuffp)) ||
  6724. -            (-1 == read_toc(stuffp)))
  6725. -            return -EIO;
  6726. -        stuffp->xxx = 0;
  6727. -    }
  6728.      switch (command) {
  6729.      case CDROMSTART:    /* spin up the drive */
  6730.          MCDX_TRACE_IOCTL(("CDROMSTART\n"));
  6731. @@ -595,12 +572,12 @@
  6732.          if ((ans = verify_area(VERIFY_READ, (void *) arg, sizeof(ti))))
  6733.              return ans;
  6734.          memcpy_fromfs(&ti, (void *) arg, sizeof(ti));
  6735. -        if ((ti.cdti_trk0 < stuffp->n_first)
  6736. -            || (ti.cdti_trk0 > stuffp->n_last)
  6737. -            || (ti.cdti_trk1 < stuffp->n_first))
  6738. +        if (ti.cdti_trk0 < stuffp->first
  6739. +            || ti.cdti_trk0 > stuffp->last
  6740. +            || ti.cdti_trk1 < stuffp->first)
  6741.              return -EINVAL;
  6742. -        if (ti.cdti_trk1 > stuffp->n_last)
  6743. -            ti.cdti_trk1 = stuffp->n_last;
  6744. +        if (ti.cdti_trk1 > stuffp->last)
  6745. +            ti.cdti_trk1 = stuffp->last;
  6746.          return play_track(stuffp, &ti);
  6747.  
  6748.      case CDROMPLAYMSF:
  6749. @@ -613,12 +590,12 @@
  6750.          msf.cdmsf_min0 = uint2bcd(msf.cdmsf_min0);
  6751.          msf.cdmsf_sec0 = uint2bcd(msf.cdmsf_sec0);
  6752.          msf.cdmsf_frame0 = uint2bcd(msf.cdmsf_frame0);
  6753. -        msf.cdmsf_min1 = uint2bcd(msf.cdmsf_min1);
  6754. -        msf.cdmsf_sec1 = uint2bcd(msf.cdmsf_sec1);
  6755. -        msf.cdmsf_frame1 = uint2bcd(msf.cdmsf_frame1);
  6756. -        stuffp->resume.stop.minute = msf.cdmsf_min1;
  6757. -        stuffp->resume.stop.second = msf.cdmsf_sec1;
  6758. -        stuffp->resume.stop.frame = msf.cdmsf_frame1;
  6759. +        stuffp->resume.stop.minute =
  6760. +            msf.cdmsf_min1 = uint2bcd(msf.cdmsf_min1);
  6761. +        stuffp->resume.stop.second =
  6762. +            msf.cdmsf_sec1 = uint2bcd(msf.cdmsf_sec1);
  6763. +        stuffp->resume.stop.frame =
  6764. +            msf.cdmsf_frame1 = uint2bcd(msf.cdmsf_frame1);
  6765.          if (-1 == set_command(stuffp, MCDX_CMD_PLAY,
  6766.                        &msf, sizeof(msf), 3 * HZ)) {
  6767.              return -1;
  6768. @@ -658,15 +635,12 @@
  6769.          memcpy_fromfs(&entry, (void *) arg, sizeof(entry));
  6770.  
  6771.          if (entry.cdte_track == CDROM_LEADOUT)
  6772. -            tp = &stuffp->toc[stuffp->n_last - stuffp->n_first + 1];
  6773. -        else if (entry.cdte_track > stuffp->n_last
  6774. -             || entry.cdte_track < stuffp->n_first)
  6775. +            tp = &stuffp->toc[stuffp->last - stuffp->first + 1];
  6776. +        else if (entry.cdte_track > stuffp->last
  6777. +             || entry.cdte_track < stuffp->first)
  6778.              return -EINVAL;
  6779.          else
  6780. -            tp = &stuffp->toc[entry.cdte_track - stuffp->n_first];
  6781. -
  6782. -        if (NULL == tp)
  6783. -            printk(KERN_ERR MCDX ": FATAL.\n");
  6784. +            tp = &stuffp->toc[entry.cdte_track - stuffp->first];
  6785.  
  6786.          entry.cdte_adr = tp->adr;
  6787.          entry.cdte_ctrl = tp->ctrl;
  6788. @@ -717,8 +691,7 @@
  6789.          } else
  6790.              return -EINVAL;
  6791.  
  6792. -        if ((ans = verify_area(VERIFY_WRITE,
  6793. -                       (void *) arg, sizeof(sub))))
  6794. +        if ((ans = verify_area(VERIFY_WRITE, (void *) arg, sizeof(sub))))
  6795.              return ans;
  6796.          memcpy_tofs((void *) arg, &sub, sizeof(sub));
  6797.  
  6798. @@ -729,16 +702,22 @@
  6799.  
  6800.          if ((ans = verify_area(VERIFY_WRITE, (void *) arg, sizeof toc)))
  6801.              return ans;
  6802. +        /*
  6803. +         * Make sure, we really read it!
  6804. +         */
  6805. +        release_toc(stuffp);
  6806. +        if (-1 == request_toc_data(stuffp))
  6807. +            return -EIO;
  6808.  
  6809. -        toc.cdth_trk0 = stuffp->n_first;
  6810. -        toc.cdth_trk1 = stuffp->n_last;
  6811. +        toc.cdth_trk0 = stuffp->first;
  6812. +        toc.cdth_trk1 = stuffp->last;
  6813.          memcpy_tofs((void *) arg, &toc, sizeof toc);
  6814.          return 0;
  6815.  
  6816.      case CDROMMULTISESSION:
  6817.          MCDX_TRACE_IOCTL(("CDROMMULTISESSION\n"));
  6818.  
  6819. -        if (0 != (ans = verify_area(VERIFY_READ, (void *) arg,
  6820. +        if ((ans = verify_area(VERIFY_READ, (void *) arg,
  6821.                       sizeof(struct cdrom_multisession))))
  6822.               return ans;
  6823.  
  6824. @@ -757,7 +736,7 @@
  6825.              return -EINVAL;
  6826.          ms.xa_flag = !!stuffp->multi.multi;
  6827.  
  6828. -        if (0 != (ans = verify_area(VERIFY_WRITE, (void *) arg,
  6829. +        if ((ans = verify_area(VERIFY_WRITE, (void *) arg,
  6830.                       sizeof(struct cdrom_multisession))))
  6831.               return ans;
  6832.  
  6833. @@ -767,8 +746,6 @@
  6834.  
  6835.      case CDROMEJECT:
  6836.          MCDX_TRACE_IOCTL(("CDROMEJECT\n"));
  6837. -        if (stuffp->users > 1)
  6838. -            return -EBUSY;
  6839.          if (stuffp->door) {
  6840.              if (-1 == issue_command(stuffp, MCDX_CMD_EJECT, 5 * HZ))
  6841.                  return -EIO;
  6842. @@ -776,10 +753,8 @@
  6843.          /*
  6844.           * Force rereading of toc next time the disk gets accessed!
  6845.           */
  6846. -        if (stuffp->toc) {
  6847. -            kfree(stuffp->toc);
  6848. -            stuffp->toc = 0;
  6849. -        }
  6850. +        release_toc(stuffp);
  6851. +
  6852.          return 0;
  6853.  
  6854.      case CDROMEJECT_SW:
  6855. @@ -814,9 +789,6 @@
  6856.  /*   
  6857.   * This does actually the transfer from the drive.
  6858.   * Return:      -1 on timeout or other error
  6859. - * else status byte (as in stuff->st) 
  6860. - * FIXME: the excessive jumping through wait queues degrades the
  6861. - * performance significantly.
  6862.   */
  6863.  static int transfer_data(struct s_drive_stuff *stuffp,
  6864.               char *p, int sector, int nr_sectors)
  6865. @@ -824,65 +796,10 @@
  6866.      int off;
  6867.      int done = 0;
  6868.  
  6869. -    if (stuffp->valid
  6870. -        && (sector >= stuffp->pending)
  6871. -        && (sector < stuffp->off_direct)) {
  6872. -        off = stuffp->off_requested < (off = sector + nr_sectors)
  6873. -            ? stuffp->off_requested : off;
  6874. -
  6875. -        do {
  6876. -            /* wait for the drive become idle, but first
  6877. -             * check for possible occurred errors --- the drive
  6878. -             * seems to report them asynchronously
  6879. -             */
  6880. -            current->timeout = jiffies + 5 * HZ;
  6881. -            while (stuffp->introk && stuffp->busy
  6882. -                   && current->timeout) {
  6883. -                interruptible_sleep_on(&stuffp->busyq);
  6884. -            }
  6885. -
  6886. -            /* test for possible errors */
  6887. -            if (current->timeout == 0 || !stuffp->introk) {
  6888. -                if (current->timeout == 0) {
  6889. -                    printk(KERN_ERR MCDX ": transfer timeout\n");
  6890. -                } else if (!stuffp->introk) {
  6891. -                    printk(KERN_ERR MCDX
  6892. -                           ": error via irq in transfer reported\n");
  6893. -                }
  6894. -
  6895. -                stuffp->busy = 0;
  6896. -                stuffp->valid = 0;
  6897. -                stuffp->introk = 1;
  6898. -                return -1;
  6899. -            }
  6900. -            /* test if it's the first sector of a block,
  6901. -             * there we have to skip some bytes as we read raw data 
  6902. -             */
  6903. -            if (stuffp->xa && (0 == (stuffp->pending & 3))) {
  6904. -                insb(DATA_REG, p,
  6905. -                     CD_FRAMESIZE_RAW - CD_XA_TAIL - CD_FRAMESIZE);
  6906. -            }
  6907. -            /* now actually read the data */
  6908. -            insb(DATA_REG, p, 512);
  6909. -
  6910. -            /* test if it's the last sector of a block,
  6911. -             * if so, we have to expect an interrupt and to skip 
  6912. -             * some data too 
  6913. -             */
  6914. -            if ((stuffp->busy = (3 == (stuffp->pending & 3)))
  6915. -                && stuffp->xa) {
  6916. -                int i;
  6917. -                for (i = 0; i < CD_XA_TAIL; ++i)
  6918. -                    inb(DATA_REG);
  6919. -            }
  6920. -            if (stuffp->pending == sector) {
  6921. -                p += 512;
  6922. -                done++;
  6923. -                sector++;
  6924. -            }
  6925. -        } while (++(stuffp->pending) < off);
  6926. -    } else {
  6927. +    if (!stuffp->valid || sector < stuffp->pending
  6928. +        || sector > stuffp->border) {
  6929.          unsigned char cmd[6];
  6930. +
  6931.          stuffp->valid = 1;
  6932.          stuffp->pending = sector & ~3;
  6933.  
  6934. @@ -895,18 +812,14 @@
  6935.              stuffp->valid = 0;
  6936.              return -1;
  6937.          }
  6938. -        if ((stuffp->off_direct = stuffp->pending + DIRECT_SIZE)
  6939. -            > stuffp->lastsector + 1)
  6940. -            stuffp->off_direct = stuffp->lastsector + 1;
  6941. -        if ((stuffp->off_requested = stuffp->pending + REQUEST_SIZE)
  6942. -            > stuffp->lastsector + 1)
  6943. -            stuffp->off_requested = stuffp->lastsector + 1;
  6944. +        if ((stuffp->border = stuffp->pending + REQUEST_SIZE)
  6945. +            > stuffp->lastsector)
  6946. +            stuffp->border = stuffp->lastsector;
  6947.          {
  6948.              unsigned int l = (stuffp->pending / 4)
  6949.              + CD_BLOCK_OFFSET;
  6950.  
  6951. -            cmd[0] = uint2bcd(l / 4500), l %= 4500;
  6952. -            /* minute */
  6953. +            cmd[0] = uint2bcd(l / 4500), l %= 4500;        /* minute */
  6954.              cmd[1] = uint2bcd(l / 75);    /* second */
  6955.              cmd[2] = uint2bcd(l % 75);    /* frame */
  6956.          }
  6957. @@ -915,19 +828,66 @@
  6958.          /*
  6959.           * FIXME: What about the ominous frame length?!
  6960.           */
  6961. -        cmd[3] = ~0;
  6962. -        cmd[4] = ~0;
  6963. -        cmd[5] = ~0;
  6964. +        cmd[5] = cmd[4] = cmd[3] = ~0;
  6965.  
  6966.          outb(stuffp->double_speed ? MCDX_CMD_PLAY_2X : MCDX_CMD_PLAY,
  6967.               DATA_REG);
  6968.          outsb(DATA_REG, cmd, 6);
  6969.      }
  6970. +    off = sector + nr_sectors;
  6971. +    if (stuffp->border < off)
  6972. +        off = stuffp->border;
  6973. +    do {
  6974. +        /* wait for the drive become idle, but first
  6975. +         * check for possible occurred errors --- the drive
  6976. +         * seems to report them asynchronously
  6977. +         */
  6978. +        current->timeout = jiffies + 5 * HZ;
  6979. +        while (stuffp->introk && stuffp->busy
  6980. +               && current->timeout) {
  6981. +            interruptible_sleep_on(&stuffp->busyq);
  6982. +        }
  6983.  
  6984. -    stuffp->off_direct =
  6985. -        (stuffp->off_direct += done) < stuffp->off_requested
  6986. -        ? stuffp->off_direct
  6987. -        : stuffp->off_requested;
  6988. +        /* test for possible errors */
  6989. +        if (current->timeout == 0 || !stuffp->introk) {
  6990. +            if (current->timeout == 0) {
  6991. +                printk(KERN_ERR MCDX ": transfer timeout.\n");
  6992. +            }
  6993. +            /*
  6994. +             * We don't report about !stuffp->introk, sice this is
  6995. +             * allready done in the interrupt routine.
  6996. +             */
  6997. +            stuffp->busy = 0;
  6998. +            stuffp->valid = 0;
  6999. +            stuffp->introk = 1;
  7000. +            return -1;
  7001. +        }
  7002. +        /* test if it's the first sector of a block,
  7003. +         * there we have to skip some bytes as we read raw data 
  7004. +         */
  7005. +        if (stuffp->xa && (0 == (stuffp->pending & 3))) {
  7006. +            insb(DATA_REG, p,
  7007. +               CD_FRAMESIZE_RAW - CD_XA_TAIL - CD_FRAMESIZE);
  7008. +        }
  7009. +        /* now actually read the data */
  7010. +        insb(DATA_REG, p, 512);
  7011. +
  7012. +        /* test if it's the last sector of a block,
  7013. +         * if so, we have to expect an interrupt and to skip 
  7014. +         * some data too 
  7015. +         */
  7016. +        if ((stuffp->busy = (3 == (stuffp->pending & 3)))
  7017. +            && stuffp->xa) {
  7018. +            int i;
  7019. +            for (i = 0; i < CD_XA_TAIL; ++i)
  7020. +                inb(DATA_REG);
  7021. +        }
  7022. +        if (stuffp->pending == sector) {
  7023. +            p += 512;
  7024. +            done++;
  7025. +            sector++;
  7026. +        }
  7027. +    } while (++(stuffp->pending) < off);
  7028.  
  7029.      return done;
  7030.  }
  7031. @@ -946,21 +906,12 @@
  7032.  
  7033.      INIT_REQUEST;
  7034.      dev = MINOR(CURRENT->rq_dev);
  7035. -
  7036. -    if ((dev < 0) || (dev >= MCDX_NDRIVES) || (!stuffp)) {
  7037. -        printk(KERN_WARNING MCDX ": bad device requested: %s\n",
  7038. -               kdevname(CURRENT->rq_dev));
  7039. -        end_request(0);
  7040. -        goto again;
  7041. -    }
  7042. -    if (stuffp->audio) {
  7043. -        printk(KERN_WARNING MCDX ": attempt to read from audio cd\n");
  7044. +    if (dev < 0 || dev >= MCDX_NDRIVES || !stuffp || stuffp->audio) {
  7045.          end_request(0);
  7046.          goto again;
  7047.      }
  7048.      switch (CURRENT->cmd) {
  7049.      case WRITE:
  7050. -        printk(KERN_ERR MCDX ": attempt to write to cd!!\n");
  7051.          end_request(0);
  7052.          break;
  7053.  
  7054. @@ -969,18 +920,14 @@
  7055.          while (CURRENT->nr_sectors) {
  7056.              int i;
  7057.  
  7058. -            if (-1 == (i = transfer_data(stuffp,
  7059. -                             CURRENT->buffer,
  7060. -                             CURRENT->sector,
  7061. -                         CURRENT->nr_sectors))) {
  7062. +            i = transfer_data(stuffp, CURRENT->buffer,
  7063. +                   CURRENT->sector, CURRENT->nr_sectors);
  7064. +            if (i == -1) {
  7065.                  if (stuffp->eom) {
  7066.                      CURRENT->sector += CURRENT->nr_sectors;
  7067.                      CURRENT->nr_sectors = 0;
  7068. -                } else {
  7069. -                    /*
  7070. -                     * FIXME: TRY SOME ERROR RECOVERY HERE!
  7071. -                     */
  7072. -                }
  7073. +                } else
  7074. +                    break;    /* FIXME: drop down speed ??? */
  7075.                  end_request(0);
  7076.                  goto again;
  7077.              }
  7078. @@ -1002,6 +949,7 @@
  7079.  /*  
  7080.   * actions done on open:
  7081.   * 1)   get the drives status 
  7082. + * 2)   handle disk changes
  7083.   */
  7084.  static int mcdx_open(struct inode *ip, struct file *fp)
  7085.  {
  7086. @@ -1014,23 +962,31 @@
  7087.      if (!stuffp)
  7088.          return -ENXIO;
  7089.  
  7090. +    /* We don't allow multiple users of a drive. In case of data CD's they
  7091. +     * will be only used by mounting, which ensures anyway exclusive usage.
  7092. +     * In case of sound CD's it's anyway meaningless to try playing two
  7093. +     * different tracks at once! This saves us A LOT of trouble.
  7094. +     */
  7095. +    if (stuffp->used)
  7096. +        return -EBUSY;
  7097. +
  7098.      /* close the door, if necessary (get the door information
  7099.       * from the hardware status register). 
  7100.       * If we can't read the CD after an autoclose
  7101. -     * no further autocloses will be tried 
  7102. +     * no further auto-closes will be tried 
  7103.       */
  7104.      if (inb(STAT_REG) & MCDX_RBIT_DOOR) {
  7105.          if (stuffp->autoclose && (stuffp->door))
  7106. -            issue_command(stuffp, MCDX_CMD_CLOSE_DOOR, 10 * HZ);
  7107. +            issue_command(stuffp, MCDX_CMD_CLOSE_DOOR, 5 * HZ);
  7108.          else
  7109.              return -EIO;
  7110.      }
  7111.      /*
  7112.       * Check if a disk is in.
  7113. -     */ 
  7114. -    bang = jiffies + 10 * HZ;
  7115. +     */
  7116. +    bang = jiffies + 5 * HZ;
  7117.      while (jiffies < bang) {
  7118. -        st = issue_command(stuffp, MCDX_CMD_GET_STATUS, 5 * HZ);
  7119. +        st = issue_command(stuffp, MCDX_CMD_GET_STATUS, 1 * HZ);
  7120.          if (st != -1 && (st & MCDX_RBIT_DISKSET))
  7121.              break;
  7122.          current->state = TASK_INTERRUPTIBLE;
  7123. @@ -1057,75 +1013,62 @@
  7124.  
  7125.          if (stuffp->multi_cap) {
  7126.              int i = 6;    /* number of retries */
  7127. -            while (i && (-1 == get_command(stuffp,
  7128. -                         MCDX_CMD_GET_MDISK_INFO,
  7129. -            &stuffp->multi, sizeof(struct s_multi), 2 * HZ)))
  7130. -                --i;
  7131. +
  7132. +            while (i--)
  7133. +                if (-1 != get_command(stuffp, MCDX_CMD_GET_MDISK_INFO,
  7134. +                              &stuffp->multi,
  7135. +                          sizeof(struct s_multi),
  7136. +                              2 * HZ))
  7137. +                     break;
  7138. +
  7139.              if (!i) {
  7140. -                stuffp->autoclose = 0;
  7141. -                /*
  7142. -                 * No multidisk info
  7143. -                 */
  7144. +                stuffp->autoclose = 0;    /* don't try it again on next open */
  7145. +                if (stuffp->door)
  7146. +                    issue_command(stuffp, MCDX_CMD_EJECT, 5 * HZ);
  7147. +                return -EIO;
  7148.              }
  7149.          } else
  7150.              stuffp->multi.multi = 0;
  7151.  
  7152. -        if (stuffp->autoclose) {
  7153. -            /* we succeeded, so on next open(2) we could try  
  7154. -             * auto close again 
  7155. -             */
  7156. -
  7157. -            /* multisession ? */
  7158. -            if (!stuffp->multi.multi)
  7159. -                stuffp->multi.msf_last.second = 2;
  7160. -        }        /* got multisession information */
  7161. -        /* request the disks table of contents (aka diskinfo) */
  7162. -        if (-1 == request_toc_data(stuffp)) {
  7163. +        if (!stuffp->multi.multi)
  7164. +            stuffp->multi.msf_last.second = 2;
  7165. +        release_toc(stuffp);    /* force rereading */
  7166. +        if (-1 == request_toc_data(stuffp))
  7167.              stuffp->lastsector = -1;
  7168. -        } else {
  7169. +        else {
  7170.              stuffp->lastsector = (CD_FRAMESIZE / 512)
  7171.                  * msf2log(&stuffp->msf_leadout) - 1;
  7172.          }
  7173. -
  7174. -        if (stuffp->toc) {
  7175. -            kfree(stuffp->toc);
  7176. -            stuffp->toc = 0;
  7177. -        }
  7178.          if (-1 == config_drive(stuffp))
  7179.              return -EIO;
  7180.  
  7181.          /* try to get the first sector, iff any ... */
  7182.          if (stuffp->lastsector >= 0) {
  7183. -            char buf[512];
  7184. -            int ans;
  7185.              int tries;
  7186.  
  7187.              stuffp->xa = 0;
  7188.              stuffp->audio = 0;
  7189. -
  7190.              for (tries = 6; tries; tries--) {
  7191. +                char buf[512];
  7192. +                int st;
  7193.                  unsigned char c;
  7194.                  stuffp->introk = 1;
  7195.  
  7196.                  /* set data mode */
  7197.                  c = stuffp->xa ? MODE2 : MODE1;
  7198. -                ans = set_command(stuffp,
  7199. -                          MCDX_CMD_SET_DATA_MODE,
  7200. -                          &c, sizeof(c), 5 * HZ);
  7201. -
  7202. -                if (-1 == ans) {
  7203. -                    /* return -EIO; */
  7204. +                st = set_command(stuffp,
  7205. +                         MCDX_CMD_SET_DATA_MODE,
  7206. +                         &c, sizeof(c), 5 * HZ);
  7207. +                if (-1 == st) {
  7208.                      stuffp->xa = 0;
  7209. -                    break;
  7210. -                } else if (ans & MCDX_RBIT_AUDIOTR) {
  7211. +                    continue;
  7212. +                } else if (st & MCDX_RBIT_AUDIOTR) {
  7213.                      stuffp->audio = 1;
  7214.                      break;
  7215.                  }
  7216. -                 
  7217. -                while (0 == (ans = transfer_data(stuffp, buf,
  7218. -                                 0, 1)));
  7219. -
  7220. -                if (ans == 1)
  7221. +                while (0 == (st = transfer_data(stuffp, buf,
  7222. +                                0, 1)));
  7223. +                if (st == 1)
  7224.                      break;
  7225.                  stuffp->xa = !stuffp->xa;
  7226.              }
  7227. @@ -1137,10 +1080,10 @@
  7228.          stuffp->xxx = 0;
  7229.      }
  7230.      /* lock the door if not already done */
  7231. -    if (0 == stuffp->users && (-1 == lock_door(stuffp, DOOR_LOCK)))
  7232. +    if (!stuffp->used && (-1 == lock_door(stuffp, DOOR_LOCK)))
  7233.          return -EIO;
  7234.  
  7235. -    stuffp->users++;
  7236. +    stuffp->used = 1;
  7237.      MOD_INC_USE_COUNT;
  7238.      return 0;
  7239.  }
  7240. @@ -1151,26 +1094,22 @@
  7241.  
  7242.      MCDX_TRACE(("mcdx_close()\n"));
  7243.  
  7244. -    if (0 == --stuffp->users) {
  7245. -        sync_dev(ip->i_rdev);    /* needed for r/o device? */
  7246. +    sync_dev(ip->i_rdev);    /* needed for r/o device? */
  7247.  
  7248. -        /* invalidate_inodes(ip->i_rdev); */
  7249. -        invalidate_buffers(ip->i_rdev);
  7250. -        lock_door(stuffp, DOOR_UNLOCK);
  7251. -
  7252. -        /* eject if wished and possible */
  7253. -        if (stuffp->eject_sw && (stuffp->door)) {
  7254. -            issue_command(stuffp, MCDX_CMD_EJECT, 5 * HZ);
  7255. -        }
  7256. +    /* invalidate_inodes(ip->i_rdev); */
  7257. +    invalidate_buffers(ip->i_rdev);
  7258. +    lock_door(stuffp, DOOR_UNLOCK);
  7259. +
  7260. +    /* eject if wished and possible */
  7261. +    if (stuffp->eject_sw && (stuffp->door)) {
  7262. +        issue_command(stuffp, MCDX_CMD_EJECT, 5 * HZ);
  7263.      }
  7264. +    stuffp->used = 0;
  7265.      MOD_DEC_USE_COUNT;
  7266. -
  7267. -    return;
  7268.  }
  7269.  
  7270.  /*      
  7271. - * Return: 1 if media changed since last call to this function
  7272. - * 0 otherwise 
  7273. + * Return: 1 if media changed since last call to this function, 0 otherwise.
  7274.   */
  7275.  static int mcdx_media_change(kdev_t full_dev)
  7276.  {
  7277. @@ -1199,32 +1138,30 @@
  7278.      if (!(stuffp = mcdx_irq_map[irq])) {
  7279.          return;        /* huh? */
  7280.      }
  7281. -    
  7282.      /* NOTE: We only should get interrupts if data were requested.
  7283.       * But the drive seems to generate ``asynchronous'' interrupts
  7284.       * on several error conditions too.  (Despite the err int enable
  7285. -     * setting during initialisation) 
  7286. +     * setting during initialization) 
  7287.       */
  7288. -
  7289. -    /* get the interrupt status */
  7290. -    b = inb(STAT_REG);    
  7291. -    if (!(b & MCDX_RBIT_DTEN)) {
  7292. +    b = inb(STAT_REG);
  7293. +    if (!(b & MCDX_RBIT_DTEN))
  7294.          stuffp->introk = 1;
  7295. -    } else {
  7296. +    else {
  7297.          stuffp->introk = 0;
  7298.          if (!(b & MCDX_RBIT_STEN)) {
  7299. -            printk(KERN_DEBUG MCDX ": irq %d status 0x%02x\n",
  7300. -                   irq, inb(DATA_REG));
  7301. -        } else {
  7302. +            b = inb(DATA_REG);
  7303. +            if (stuffp->used)
  7304. +                printk(KERN_DEBUG MCDX
  7305. +                       ": irq %d status 0x%02x\n", irq, b);
  7306. +        } else
  7307.              MCDX_TRACE(("irq %d ambiguous hw status\n", irq));
  7308. -        }
  7309.      }
  7310.      stuffp->busy = 0;
  7311.      wake_up_interruptible(&stuffp->busyq);
  7312.  }
  7313.  
  7314.  /*
  7315. - * FIXME!
  7316. + * FIXME:
  7317.   * This seems to hang badly, when the driver is loaded with inappropriate
  7318.   * port/irq settings!
  7319.   */
  7320. @@ -1233,10 +1170,10 @@
  7321.      int drive;
  7322.  
  7323.  #ifdef MODULE
  7324. -    printk(KERN_INFO "Mitsumi driver version " VERSION " for %s\n",
  7325. +    printk(KERN_INFO "Mitsumi driver V" VERSION " for %s\n",
  7326.             kernel_version);
  7327.  #else
  7328. -    printk(KERN_INFO "Mitsumi driver version " VERSION "\n");
  7329. +    printk(KERN_INFO "Mitsumi driver V" VERSION "\n");
  7330.  #endif
  7331.      for (drive = 0; drive < MCDX_NDRIVES; drive++) {
  7332.          struct {
  7333. @@ -1247,21 +1184,20 @@
  7334.          struct s_drive_stuff *stuffp;
  7335.          int size;
  7336.  
  7337. -        mcdx_blocksizes[drive] = 0;
  7338. +        mcdx_blksize_size[drive] = 0;
  7339.          mcdx_stuffp[drive] = 0;
  7340.  
  7341.          size = sizeof(*stuffp);
  7342.  
  7343. -        if (!(stuffp = kmalloc(size, GFP_KERNEL))) {
  7344. -            printk(KERN_ERR MCDX
  7345. -                   ": malloc of drives data failed!\n");
  7346. +        if (!(stuffp = kmalloc(size, GFP_KERNEL)))
  7347.              break;
  7348. -        }
  7349. -        /* set default values */ memset(stuffp, 0, sizeof(*stuffp));
  7350. +
  7351. +        /* set default values */
  7352. +        memset(stuffp, 0, sizeof(*stuffp));
  7353.          stuffp->autoclose = 1;    /* close the door on open(2) */
  7354.  
  7355. -        stuffp->irq = irq(mcdx_drive_map[drive]);
  7356. -        stuffp->base = port(mcdx_drive_map[drive]);
  7357. +        stuffp->base = mcdx_drive_map[drive][PORT];
  7358. +        stuffp->irq = mcdx_drive_map[drive][IRQ];
  7359.  
  7360.          /* check if i/o addresses are available */
  7361.          if (check_region(stuffp->base, MCDX_IO_SIZE)) {
  7362. @@ -1311,10 +1247,13 @@
  7363.              kfree(stuffp);
  7364.              continue;    /* next drive */
  7365.          }
  7366. +        /*
  7367. +         * CD-ROM's are an example of non 1024 devices
  7368. +         */
  7369. +        mcdx_blksize_size[drive] = 1024;
  7370.          blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
  7371.          read_ahead[MAJOR_NR] = READ_AHEAD;
  7372. -
  7373. -        blksize_size[MAJOR_NR] = mcdx_blocksizes;
  7374. +        blksize_size[MAJOR_NR] = mcdx_blksize_size;
  7375.  
  7376.          mcdx_irq_map[stuffp->irq] = stuffp;
  7377.          if (request_irq(stuffp->irq, mcdx_intr,
  7378. @@ -1339,7 +1278,8 @@
  7379.  
  7380.          config_drive(stuffp);
  7381.  
  7382. -        printk(KERN_INFO MCDX "%d: at 0x%3x, irq %d, firmware: %c %x\n",
  7383. +        printk(KERN_INFO MCDX
  7384. +               "%d: at 0x%3x, irq %d, type: %c, firmware: %x\n",
  7385.                 drive, stuffp->base, stuffp->irq,
  7386.                 firmware.code, firmware.version);
  7387.          mcdx_stuffp[drive] = stuffp;
  7388. @@ -1377,9 +1317,7 @@
  7389.              continue;
  7390.          release_region(stuffp->base, MCDX_IO_SIZE);
  7391.          free_irq(stuffp->irq, NULL);
  7392. -        if (stuffp->toc) {
  7393. -            kfree(stuffp->toc);
  7394. -        }
  7395. +        release_toc(stuffp);
  7396.          mcdx_stuffp[i] = NULL;
  7397.          kfree(stuffp);
  7398.      }
  7399. diff -u --recursive --new-file pre2.0.6/linux/drivers/char/amigamouse.c linux/drivers/char/amigamouse.c
  7400. --- pre2.0.6/linux/drivers/char/amigamouse.c    Sat Apr 27 15:19:51 1996
  7401. +++ linux/drivers/char/amigamouse.c    Mon May 20 07:54:27 1996
  7402. @@ -334,7 +334,7 @@
  7403.  
  7404.  void cleanup_module(void)
  7405.  {
  7406. -  remove_isr(IRQ_AMIGA_VERTB, mouse_interrupt);
  7407. +  remove_isr(IRQ_AMIGA_VERTB, mouse_interrupt, NULL);
  7408.    misc_deregister(&amiga_mouse);
  7409.  }
  7410.  #endif
  7411. diff -u --recursive --new-file pre2.0.6/linux/drivers/char/fbmem.c linux/drivers/char/fbmem.c
  7412. --- pre2.0.6/linux/drivers/char/fbmem.c    Tue May  7 16:22:24 1996
  7413. +++ linux/drivers/char/fbmem.c    Mon May 20 07:54:27 1996
  7414. @@ -4,7 +4,7 @@
  7415.   *  Copyright (C) 1994 Martin Schaller
  7416.   *
  7417.   * This file is subject to the terms and conditions of the GNU General Public
  7418. - * License.  See the file README.legal in the main directory of this archive
  7419. + * License.  See the file COPYING in the main directory of this archive
  7420.   * for more details.
  7421.   */
  7422.  
  7423. diff -u --recursive --new-file pre2.0.6/linux/drivers/char/wd501p.h linux/drivers/char/wd501p.h
  7424. --- pre2.0.6/linux/drivers/char/wd501p.h    Tue Feb 13 10:47:12 1996
  7425. +++ linux/drivers/char/wd501p.h    Mon May 20 08:08:36 1996
  7426. @@ -58,15 +58,13 @@
  7427.  #define FEATUREMAP2        0
  7428.  #endif
  7429.  
  7430. +#ifndef CONFIG_WDT_501
  7431. +#define CONFIG_WDT_500
  7432. +#endif
  7433.  
  7434. -#ifdef CONFIG_WDT500        /* Minimal board */
  7435. +#ifdef CONFIG_WDT_500        /* Minimal board */
  7436.  #define FEATUREMAP1        (WDC_SR_TGOOD|WDC_SR_FANGOOD)
  7437.  #define FEATUREMAP2        (WDC_SR_PSUOVER|WDC_SR_PSUUNDR)
  7438. -#endif
  7439. -
  7440. -#ifdef CONFIG_SOFT_WATCHDOG
  7441. -#define FEATUREMAP1            0
  7442. -#define FEATUREMAP2            0
  7443.  #endif
  7444.  
  7445.  #ifndef FEATUREMAP1
  7446. diff -u --recursive --new-file pre2.0.6/linux/drivers/isdn/icn/icn.c linux/drivers/isdn/icn/icn.c
  7447. --- pre2.0.6/linux/drivers/isdn/icn/icn.c    Mon May 20 08:20:59 1996
  7448. +++ linux/drivers/isdn/icn/icn.c    Mon May 20 08:38:42 1996
  7449. @@ -25,7 +25,7 @@
  7450.   *
  7451.   * Revision 1.21  1996/05/02 04:01:20  fritz
  7452.   * Bugfix:
  7453. - *  - icn_addcard() evalueated wrong driverId.
  7454. + *  - icn_addcard() evaluated wrong driverId.
  7455.   *
  7456.   * Revision 1.20  1996/05/02 00:40:27  fritz
  7457.   * Major rewrite to support more than one card
  7458. @@ -273,7 +273,7 @@
  7459.  }
  7460.  
  7461.  /*
  7462. - * Release currend card/channel lock,
  7463. + * Release current card/channel lock,
  7464.   * then map same or other channel without locking.
  7465.   */
  7466.  static inline void icn_maprelease_channel(icn_card *card, int channel)
  7467. diff -u --recursive --new-file pre2.0.6/linux/drivers/isdn/isdn_tty.c linux/drivers/isdn/isdn_tty.c
  7468. --- pre2.0.6/linux/drivers/isdn/isdn_tty.c    Mon May 20 08:20:59 1996
  7469. +++ linux/drivers/isdn/isdn_tty.c    Mon May 20 08:38:42 1996
  7470. @@ -102,7 +102,7 @@
  7471.   * This routine MUST be called with interrupts off.
  7472.   * Return:
  7473.   *  1 = Success
  7474. - *  0 = Failure, data has to be bufferd and later processed by
  7475. + *  0 = Failure, data has to be buffered and later processed by
  7476.   *      isdn_tty_readmodem().
  7477.   */
  7478.  #define DLE 0x10
  7479. @@ -237,7 +237,7 @@
  7480.  
  7481.                          /* For now, ifmt is fixed to 1 (alaw), since this
  7482.                           * is used with ISDN everywhere in the world, except
  7483. -                         * US, Canadia and Japan.
  7484. +                         * US, Canada and Japan.
  7485.                           * Later, when US-ISDN protocols are implemented,
  7486.                           * this setting will depend on the D-channel protocol.
  7487.                           */
  7488. @@ -304,7 +304,7 @@
  7489.   *
  7490.   ************************************************************/
  7491.  
  7492. -/* The nex routine is called once from within timer-interrupt
  7493. +/* The next routine is called once from within timer-interrupt
  7494.   * triggered within isdn_tty_modem_ncarrier(). It calls
  7495.   * isdn_tty_modem_result() to stuff a "NO CARRIER" Message
  7496.   * into the tty's flip-buffer.
  7497. @@ -332,7 +332,7 @@
  7498.  }
  7499.  
  7500.  /* isdn_tty_dial() performs dialing of a tty an the necessary
  7501. - * setup of the lower levels befor that.
  7502. + * setup of the lower levels before that.
  7503.   */
  7504.  static void isdn_tty_dial(char *n, modem_info * info, atemu * m)
  7505.  {
  7506. @@ -600,7 +600,7 @@
  7507.          return count;
  7508.  }
  7509.  
  7510. -/* This routine is called wrom within isdn_tty_write() to perform
  7511. +/* This routine is called from within isdn_tty_write() to perform
  7512.   * DLE-decoding when sending audio-data.
  7513.   */
  7514.  static int isdn_tty_handleDLEdown(modem_info *info, atemu *m, struct sk_buff *skb)
  7515. @@ -683,7 +683,7 @@
  7516.   * to the lower level. Additional tasks done here:
  7517.   *  - If online, check for escape-sequence (+++)
  7518.   *  - If sending audio-data, call isdn_tty_DLEdown() to parse DLE-codes.
  7519. - *  - If receiving audio-data, call isdn_tty_end_vrx() to abor if needed.
  7520. + *  - If receiving audio-data, call isdn_tty_end_vrx() to abort if needed.
  7521.   *  - If dialing, abort dial.
  7522.   */
  7523.  static int isdn_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int count)
  7524. @@ -1043,7 +1043,7 @@
  7525.                          return isdn_tty_set_modem_info(info, cmd, (uint *) arg);
  7526.                  case TIOCSERGETLSR:    /* Get line status register */
  7527.  #ifdef ISDN_DEBUG_MODEM_IOCTL
  7528. -                        printk(KERN_DEBUG "ttyI%d ioctl TIOSERGETLSR\n", info->line);
  7529. +                        printk(KERN_DEBUG "ttyI%d ioctl TIOCSERGETLSR\n", info->line);
  7530.  #endif
  7531.                          error = verify_area(VERIFY_WRITE, (void *) arg, sizeof(uint));
  7532.                          if (error)
  7533. diff -u --recursive --new-file pre2.0.6/linux/drivers/isdn/teles/isdnl3.c linux/drivers/isdn/teles/isdnl3.c
  7534. --- pre2.0.6/linux/drivers/isdn/teles/isdnl3.c    Mon May 20 08:21:00 1996
  7535. +++ linux/drivers/isdn/teles/isdnl3.c    Mon May 20 08:38:42 1996
  7536. @@ -571,7 +571,7 @@
  7537.                    break;
  7538.            if (i == downsllen) {
  7539.                if (DEBUG_1TR6 > 0) {
  7540. -                  printk(KERN_INFO "isdnl3down unhandled E-DSS1 state %d primitiv %x\n", st->l3.state, pr);
  7541. +                  printk(KERN_INFO "isdnl3down unhandled E-DSS1 state %d primitive %x\n", st->l3.state, pr);
  7542.                }
  7543.            } else
  7544.                downstatelist[i].rout(st, pr, ibh);
  7545. diff -u --recursive --new-file pre2.0.6/linux/drivers/isdn/teles/llglue.c linux/drivers/isdn/teles/llglue.c
  7546. --- pre2.0.6/linux/drivers/isdn/teles/llglue.c    Mon May 20 08:21:01 1996
  7547. +++ linux/drivers/isdn/teles/llglue.c    Mon May 20 08:38:42 1996
  7548. @@ -2,7 +2,7 @@
  7549.   *
  7550.   * $Log: llglue.c,v $
  7551.   * Revision 1.3  1996/05/01 14:19:57  fritz
  7552. - * Added ISDN_FEADTURE_L2_TRANS
  7553. + * Added ISDN_FEATURE_L2_TRANS
  7554.   *
  7555.   * Revision 1.2  1996/04/29 23:01:46  fritz
  7556.   * Added driverId and channel to readstatus().
  7557. diff -u --recursive --new-file pre2.0.6/linux/drivers/isdn/teles/q931.c linux/drivers/isdn/teles/q931.c
  7558. --- pre2.0.6/linux/drivers/isdn/teles/q931.c    Mon May 20 08:21:01 1996
  7559. +++ linux/drivers/isdn/teles/q931.c    Mon May 20 08:38:42 1996
  7560. @@ -230,7 +230,7 @@
  7561.      {MT_N1_FAC_CAN, "FACility CANcel"},
  7562.      {MT_N1_FAC_REG, "FACility REGister"},
  7563.      {MT_N1_FAC_REJ, "FACility REJect"},
  7564. -    {MT_N1_INFO, "INFOmation"},
  7565. +    {MT_N1_INFO, "INFOrmation"},
  7566.      {MT_N1_REG_ACK, "REGister ACKnowledge"},
  7567.      {MT_N1_REG_REJ, "REGister REJect"},
  7568.      {MT_N1_STAT, "STATus"}
  7569. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/Config.in linux/drivers/net/Config.in
  7570. --- pre2.0.6/linux/drivers/net/Config.in    Fri May 17 15:32:15 1996
  7571. +++ linux/drivers/net/Config.in    Mon May 20 08:08:36 1996
  7572. @@ -24,10 +24,10 @@
  7573.  fi
  7574.  bool 'Radio network interfaces' CONFIG_NET_RADIO
  7575.  if [ "$CONFIG_NET_RADIO" != "n" ]; then
  7576. +  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  7577. +    tristate 'BAYCOM ser12 and par96 kiss emulation driver for AX.25' CONFIG_BAYCOM
  7578. +  fi
  7579.    if [ "$CONFIG_AX25" = "y" ]; then
  7580. -    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  7581. -      tristate 'BAYCOM ser12 and par96 kiss emulation driver for AX.25' CONFIG_BAYCOM
  7582. -    fi
  7583.      bool 'Gracilis PackeTwin support' CONFIG_PT
  7584.      bool 'Ottawa PI and PI/2 support' CONFIG_PI
  7585.    fi
  7586. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/a2065.c linux/drivers/net/a2065.c
  7587. --- pre2.0.6/linux/drivers/net/a2065.c    Sat Apr 27 15:19:53 1996
  7588. +++ linux/drivers/net/a2065.c    Mon May 20 07:54:28 1996
  7589. @@ -26,7 +26,7 @@
  7590.   * ----------------------------------------------------------------------------
  7591.   *
  7592.   * This file is subject to the terms and conditions of the GNU General Public
  7593. - * License.  See the file README.legal in the main directory of the Linux/68k
  7594. + * License.  See the file COPYING in the main directory of the Linux
  7595.   * distribution for more details.
  7596.   *
  7597.   * ----------------------------------------------------------------------------
  7598. @@ -37,8 +37,8 @@
  7599.   *      both 10BASE-2 (thin coax) and AUI (DB-15) connectors
  7600.   */
  7601.  
  7602. -#include <stddef.h>
  7603. -
  7604. +#include <linux/module.h>
  7605. +#include <linux/stddef.h>
  7606.  #include <linux/kernel.h>
  7607.  #include <linux/sched.h>
  7608.  #include <linux/string.h>
  7609. @@ -100,6 +100,7 @@
  7610.      struct enet_statistics stats;
  7611.      char tx_full;
  7612.      unsigned long lock;
  7613. +    int key;
  7614.  };
  7615.  
  7616.  
  7617. @@ -166,6 +167,7 @@
  7618.              memset(priv, 0, sizeof(struct a2065_private));
  7619.  
  7620.              priv->board = (struct A2065Board *)ZTWO_VADDR(board);
  7621. +            priv->key = key1 ? key1 : key2;
  7622.  
  7623.              dev->open = &a2065_open;
  7624.              dev->stop = &a2065_close;
  7625. @@ -185,7 +187,6 @@
  7626.  {
  7627.      struct a2065_private *priv = (struct a2065_private *)dev->priv;
  7628.      struct A2065Board *board = priv->board;
  7629. -    static int interruptinstalled = 0;
  7630.      struct lancedata *lancedata;        /* LANCE point of view */
  7631.      struct lancedata *alancedata;        /* Amiga point of view */
  7632.  
  7633. @@ -235,12 +236,8 @@
  7634.  
  7635.  
  7636.      /* Install the Interrupt handler */
  7637. -    if (!interruptinstalled) {
  7638. -        if (!add_isr(IRQ_AMIGA_PORTS, a2065_interrupt, 0, dev,
  7639. -                     "a2065 Ethernet"))
  7640. -            return(-EAGAIN);
  7641. -        interruptinstalled = 1;
  7642. -    }
  7643. +    if (!add_isr(IRQ_AMIGA_PORTS, a2065_interrupt, 0, dev, "a2065 Ethernet"))
  7644. +        return(-EAGAIN);
  7645.  
  7646.      /* Make the LANCE read the Init Block */
  7647.      board->Lance.RAP = CSR0;        /* LANCE Controller Status */
  7648. @@ -250,6 +247,8 @@
  7649.      dev->interrupt = 0;
  7650.      dev->start = 1;
  7651.  
  7652. +    MOD_INC_USE_COUNT;
  7653. +
  7654.      return(0);
  7655.  }
  7656.  
  7657. @@ -325,6 +324,10 @@
  7658.      /* We stop the LANCE here - it occasionally polls memory if we don't */
  7659.      board->Lance.RDP = STOP;
  7660.  
  7661. +    remove_isr(IRQ_AMIGA_PORTS, a2065_interrupt, dev);
  7662. +
  7663. +    MOD_DEC_USE_COUNT;
  7664. +
  7665.      return(0);
  7666.  }
  7667.  
  7668. @@ -796,3 +799,38 @@
  7669.      board->Lance.RAP = CSR0;            /* LANCE Controller Status */
  7670.      board->Lance.RDP = INEA|STRT|IDON|INIT;    /* Resume normal operation. */
  7671.  }
  7672. +
  7673. +
  7674. +#ifdef MODULE
  7675. +static char devicename[9] = { 0, };
  7676. +
  7677. +static struct device a2065_dev =
  7678. +{
  7679. +    devicename,            /* filled in by register_netdev() */
  7680. +    0, 0, 0, 0,            /* memory */
  7681. +    0, 0,                /* base, irq */
  7682. +    0, 0, 0, NULL, a2065_probe,
  7683. +};
  7684. +
  7685. +int init_module(void)
  7686. +{
  7687. +    int err;
  7688. +
  7689. +    if ((err = register_netdev(&a2065_dev))) {
  7690. +        if (err == -EIO)
  7691. +            printk("No A2065 board found. Module not loaded.\n");
  7692. +        return(err);
  7693. +    }
  7694. +    return(0);
  7695. +}
  7696. +
  7697. +void cleanup_module(void)
  7698. +{
  7699. +    struct a2065_private *priv = (struct a2065_private *)a2065_dev.priv;
  7700. +
  7701. +    unregister_netdev(&a2065_dev);
  7702. +    zorro_unconfig_board(priv->key, 0);
  7703. +    kfree(priv);
  7704. +}
  7705. +
  7706. +#endif /* MODULE */
  7707. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/a2065.h linux/drivers/net/a2065.h
  7708. --- pre2.0.6/linux/drivers/net/a2065.h    Tue Apr 23 13:57:09 1996
  7709. +++ linux/drivers/net/a2065.h    Mon May 20 07:54:28 1996
  7710. @@ -22,7 +22,7 @@
  7711.   * ---------------------------------------------------------------------------
  7712.   *
  7713.   * This file is subject to the terms and conditions of the GNU General Public
  7714. - * License.  See the file README.legal in the main directory of the Linux/68k
  7715. + * License.  See the file COPYING in the main directory of the Linux
  7716.   * distribution for more details.
  7717.   *
  7718.   * ---------------------------------------------------------------------------
  7719. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/ariadne.c linux/drivers/net/ariadne.c
  7720. --- pre2.0.6/linux/drivers/net/ariadne.c    Sat Apr 27 15:19:53 1996
  7721. +++ linux/drivers/net/ariadne.c    Mon May 20 07:54:28 1996
  7722. @@ -23,7 +23,7 @@
  7723.   *  ----------------------------------------------------------------------------------
  7724.   *
  7725.   *  This file is subject to the terms and conditions of the GNU General Public
  7726. - *  License.  See the file README.legal in the main directory of the Linux/m68k
  7727. + *  License.  See the file COPYING in the main directory of the Linux
  7728.   *  distribution for more details.
  7729.   *
  7730.   *  ----------------------------------------------------------------------------------
  7731. @@ -36,8 +36,8 @@
  7732.   *    - an MC68230 Parallel Interface/Timer configured as 2 parallel ports
  7733.   */
  7734.  
  7735. -#include <stddef.h>
  7736. -
  7737. +#include <linux/module.h>
  7738. +#include <linux/stddef.h>
  7739.  #include <linux/kernel.h>
  7740.  #include <linux/sched.h>
  7741.  #include <linux/string.h>
  7742. @@ -107,6 +107,7 @@
  7743.      struct enet_statistics stats;
  7744.      char tx_full;
  7745.      unsigned long lock;
  7746. +    int key;
  7747.  };
  7748.  
  7749.  
  7750. @@ -145,7 +146,7 @@
  7751.  }
  7752.  
  7753.  
  7754. -int long ariadne_probe(struct device *dev)
  7755. +int ariadne_probe(struct device *dev)
  7756.  {
  7757.      int key;
  7758.      struct ConfigDev *cd;
  7759. @@ -174,6 +175,7 @@
  7760.          memset(priv, 0, sizeof(struct ariadne_private));
  7761.  
  7762.          priv->board = (struct AriadneBoard *)ZTWO_VADDR(board);
  7763. +        priv->key = key;
  7764.  
  7765.          dev->open = &ariadne_open;
  7766.          dev->stop = &ariadne_close;
  7767. @@ -193,7 +195,6 @@
  7768.  {
  7769.      struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
  7770.      struct AriadneBoard *board = priv->board;
  7771. -    static int interruptinstalled = 0;
  7772.      struct lancedata *lancedata;
  7773.      u_short in;
  7774.      u_long version;
  7775. @@ -290,16 +291,15 @@
  7776.      dev->interrupt = 0;
  7777.      dev->start = 1;
  7778.  
  7779. -    if (!interruptinstalled) {
  7780. -    if (!add_isr(IRQ_AMIGA_PORTS, ariadne_interrupt, 0, dev,
  7781. -             "Ariadne Ethernet"))
  7782. -        return(-EAGAIN);
  7783. -    interruptinstalled = 1;
  7784. -    }
  7785. +    if (!add_isr(IRQ_AMIGA_PORTS, ariadne_interrupt, 0, dev,
  7786. +             "Ariadne Ethernet"))
  7787. +    return(-EAGAIN);
  7788.  
  7789.      board->Lance.RAP = CSR0;    /* PCnet-ISA Controller Status */
  7790.      board->Lance.RDP = INEA|STRT;
  7791.  
  7792. +    MOD_INC_USE_COUNT;
  7793. +
  7794.      return(0);
  7795.  }
  7796.  
  7797. @@ -373,6 +373,10 @@
  7798.      /* We stop the LANCE here -- it occasionally polls memory if we don't. */
  7799.      board->Lance.RDP = STOP;
  7800.  
  7801. +    remove_isr(IRQ_AMIGA_PORTS, ariadne_interrupt, dev);
  7802. +
  7803. +    MOD_DEC_USE_COUNT;
  7804. +
  7805.      return(0);
  7806.  }
  7807.  
  7808. @@ -834,3 +838,38 @@
  7809.      board->Lance.RAP = CSR0;        /* PCnet-ISA Controller Status */
  7810.      board->Lance.RDP = INEA|STRT|IDON;    /* Resume normal operation. */
  7811.  }
  7812. +
  7813. +
  7814. +#ifdef MODULE
  7815. +static char devicename[9] = { 0, };
  7816. +
  7817. +static struct device ariadne_dev =
  7818. +{
  7819. +    devicename,                /* filled in by register_netdev() */
  7820. +    0, 0, 0, 0,                /* memory */
  7821. +    0, 0,                /* base, irq */
  7822. +    0, 0, 0, NULL, ariadne_probe,
  7823. +};
  7824. +
  7825. +int init_module(void)
  7826. +{
  7827. +    int err;
  7828. +
  7829. +    if ((err = register_netdev(&ariadne_dev))) {
  7830. +    if (err == -EIO)
  7831. +        printk("No Ariadne board found. Module not loaded.\n");
  7832. +    return(err);
  7833. +    }
  7834. +    return(0);
  7835. +}
  7836. +
  7837. +void cleanup_module(void)
  7838. +{
  7839. +    struct ariadne_private *priv = (struct ariadne_private *)ariadne_dev.priv;
  7840. +
  7841. +    unregister_netdev(&ariadne_dev);
  7842. +    zorro_unconfig_board(priv->key, 0);
  7843. +    kfree(priv);
  7844. +}
  7845. +
  7846. +#endif /* MODULE */
  7847. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/ariadne.h linux/drivers/net/ariadne.h
  7848. --- pre2.0.6/linux/drivers/net/ariadne.h    Sat Apr 27 15:19:53 1996
  7849. +++ linux/drivers/net/ariadne.h    Mon May 20 07:54:28 1996
  7850. @@ -23,7 +23,7 @@
  7851.   *  ----------------------------------------------------------------------------------
  7852.   *
  7853.   *  This file is subject to the terms and conditions of the GNU General Public
  7854. - *  License.  See the file README.legal in the main directory of the Linux/m68k
  7855. + *  License.  See the file COPYING in the main directory of the Linux
  7856.   *  distribution for more details.
  7857.   *
  7858.   *  ----------------------------------------------------------------------------------
  7859. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/dummy.c linux/drivers/net/dummy.c
  7860. --- pre2.0.6/linux/drivers/net/dummy.c    Mon May 20 08:21:01 1996
  7861. +++ linux/drivers/net/dummy.c    Mon May 20 08:08:36 1996
  7862. @@ -88,8 +88,8 @@
  7863.      dev->get_stats        = dummy_get_stats;
  7864.  #endif
  7865.  
  7866. -    dev->open = &dummy_open;
  7867. -    dev->stop = &dummy_close;
  7868. +    dev->open = dummy_open;
  7869. +    dev->stop = dummy_close;
  7870.  
  7871.      /* Fill in the fields of the device structure with ethernet-generic values. */
  7872.      ether_setup(dev);
  7873. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/hydra.c linux/drivers/net/hydra.c
  7874. --- pre2.0.6/linux/drivers/net/hydra.c    Sun May 12 10:16:07 1996
  7875. +++ linux/drivers/net/hydra.c    Mon May 20 07:54:28 1996
  7876. @@ -15,6 +15,7 @@
  7877.  /* and 10BASE-2 (thin coax) and AUI connectors.                             */
  7878.  
  7879.  
  7880. +#include <linux/module.h>
  7881.  #include <linux/kernel.h>
  7882.  #include <linux/sched.h>
  7883.  #include <linux/string.h>
  7884. @@ -24,6 +25,7 @@
  7885.  #include <linux/malloc.h>
  7886.  #include <linux/interrupt.h>
  7887.  #include <linux/netdevice.h>
  7888. +#include <linux/etherdevice.h>
  7889.  #include <linux/skbuff.h>
  7890.  
  7891.  #include <asm/bitops.h>
  7892. @@ -43,8 +45,6 @@
  7893.  
  7894.  #define HYDRA_VERSION "v2.1 BETA"
  7895.  
  7896. -struct device *init_etherdev(struct device *dev, int sizeof_private, unsigned long *mem_startp);
  7897. -
  7898.  #undef HYDRA_DEBUG        /* define this for (lots of) debugging information */
  7899.  
  7900.  #if 0                         /* currently hardwired to one transmit buffer */
  7901. @@ -87,12 +87,13 @@
  7902.      u_short rx_page_stop;
  7903.      u_short next_pkt;
  7904.      struct enet_statistics stats;
  7905. +    int key;
  7906.      };
  7907.  
  7908.  static int hydra_open(struct device *dev);
  7909.  static int hydra_start_xmit(struct sk_buff *skb, struct device *dev);
  7910.  static void hydra_interrupt(int irq, struct pt_regs *fp, void *data);
  7911. -static void __inline__ hydra_rx(struct device *dev, struct hydra_private *priv, u_char *nicbase);
  7912. +static void __inline__ hydra_rx(struct device *dev, struct hydra_private *priv, volatile u_char *nicbase);
  7913.  static int hydra_close(struct device *dev);
  7914.  static struct enet_statistics *hydra_get_stats(struct device *dev);
  7915.  #ifdef HAVE_MULTICAST
  7916. @@ -147,7 +148,7 @@
  7917.  
  7918.  #endif
  7919.  
  7920. -unsigned long hydra_probe(struct device *dev)
  7921. +int hydra_probe(struct device *dev)
  7922.      {
  7923.      struct hydra_private *priv;
  7924.      u_long board;
  7925. @@ -170,7 +171,7 @@
  7926.             dev->name, (int)board, dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
  7927.             dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
  7928.  
  7929. -        init_etherdev(dev, 0, NULL);
  7930. +        init_etherdev(dev, 0);
  7931.          
  7932.          dev->priv = kmalloc(sizeof(struct hydra_private), GFP_KERNEL);
  7933.          priv = (struct hydra_private *)dev->priv;
  7934. @@ -178,6 +179,7 @@
  7935.          
  7936.          priv->hydra_base = (u_char *) ZTWO_VADDR(board);
  7937.          priv->hydra_nic_base = (u_char *) ZTWO_VADDR(board) + HYDRA_NIC_BASE;
  7938. +        priv->key = key;
  7939.          
  7940.          dev->open = &hydra_open;
  7941.          dev->stop = &hydra_close;
  7942. @@ -197,8 +199,7 @@
  7943.  static int hydra_open(struct device *dev)
  7944.    {
  7945.      struct hydra_private *priv = (struct hydra_private *)dev->priv;
  7946. -    static int interruptinstalled = 0;
  7947. -    u_char volatile *nicbase = priv->hydra_nic_base;
  7948. +    volatile u_char *nicbase = priv->hydra_nic_base;
  7949.  #ifdef HAVE_MULTICAST
  7950.      int i;
  7951.  #endif
  7952. @@ -271,12 +272,10 @@
  7953.      dev->interrupt = 0;
  7954.      dev->start = 1;
  7955.      
  7956. -    if(!interruptinstalled) {
  7957. -      if(!add_isr(IRQ_AMIGA_PORTS, hydra_interrupt, 0, dev,
  7958. -                  "Hydra Ethernet"))
  7959. -    return(-EAGAIN);
  7960. -      interruptinstalled = 1;
  7961. -    }
  7962. +    if(!add_isr(IRQ_AMIGA_PORTS, hydra_interrupt, 0, dev, "Hydra Ethernet"))
  7963. +      return(-EAGAIN);
  7964. +
  7965. +    MOD_INC_USE_COUNT;
  7966.  
  7967.      return(0);
  7968.    }
  7969. @@ -285,7 +284,7 @@
  7970.  static int hydra_close(struct device *dev)
  7971.  {
  7972.    struct hydra_private *priv = (struct hydra_private *)dev->priv;
  7973. -  u_char volatile *nicbase = priv->hydra_nic_base;
  7974. +  volatile u_char *nicbase = priv->hydra_nic_base;
  7975.    int n = 5000;
  7976.  
  7977.    dev->start = 0;
  7978. @@ -301,13 +300,17 @@
  7979.    /* wait for NIC to stop (what a nice timeout..) */
  7980.    while(((READ_REG(NIC_ISR) & ISR_RST) == 0) && --n);
  7981.      
  7982. +  remove_isr(IRQ_AMIGA_PORTS, hydra_interrupt, dev);
  7983. +
  7984. +  MOD_DEC_USE_COUNT;
  7985. +
  7986.    return(0);
  7987.  }
  7988.  
  7989.  
  7990.  static void hydra_interrupt(int irq, struct pt_regs *fp, void *data)
  7991.      {
  7992. -    u_char volatile *nicbase;
  7993. +    volatile u_char *nicbase;
  7994.    
  7995.      struct device *dev = (struct device *) data;
  7996.      struct hydra_private *priv;
  7997. @@ -421,7 +424,7 @@
  7998.  static int hydra_start_xmit(struct sk_buff *skb, struct device *dev)
  7999.      {
  8000.      struct hydra_private *priv = (struct hydra_private *)dev->priv;
  8001. -    u_char volatile *nicbase = priv->hydra_nic_base;
  8002. +    volatile u_char *nicbase = priv->hydra_nic_base;
  8003.      int len, len1;
  8004.  
  8005.      /* Transmitter timeout, serious problems. */
  8006. @@ -486,7 +489,7 @@
  8007.      if(len & 1) len++;
  8008.  
  8009.      if((u_long)(priv->hydra_base + (priv->tx_page_start << 8)) < 0x80000000)
  8010. -      printk("weirdness: memcpyw(txbuf, skbdata, len): txbuf = %0x\n", (priv->hydra_base+(priv->tx_page_start<<8)));
  8011. +      printk("weirdness: memcpyw(txbuf, skbdata, len): txbuf = 0x%x\n", (u_int)(priv->hydra_base+(priv->tx_page_start<<8)));
  8012.  
  8013.      /* copy the packet data to the transmit buffer
  8014.         in the ethernet card RAM */
  8015. @@ -520,9 +523,9 @@
  8016.      }
  8017.  
  8018.  
  8019. -static void __inline__ hydra_rx(struct device *dev, struct hydra_private *priv, u_char *nicbase)
  8020. +static void __inline__ hydra_rx(struct device *dev, struct hydra_private *priv, volatile u_char *nicbase)
  8021.      {
  8022. -    u_short volatile *board_ram_ptr;
  8023. +    volatile u_short *board_ram_ptr;
  8024.      struct sk_buff *skb;
  8025.      int hdr_next_pkt, pkt_len, len1, boundary;
  8026.  
  8027. @@ -653,3 +656,37 @@
  8028.      }
  8029.  #endif
  8030.  
  8031. +
  8032. +#ifdef MODULE
  8033. +static char devicename[9] = { 0, };
  8034. +
  8035. +static struct device hydra_dev =
  8036. +{
  8037. +    devicename,            /* filled in by register_netdev() */
  8038. +    0, 0, 0, 0,            /* memory */
  8039. +    0, 0,                /* base, irq */
  8040. +    0, 0, 0, NULL, hydra_probe,
  8041. +};
  8042. +
  8043. +int init_module(void)
  8044. +{
  8045. +    int err;
  8046. +
  8047. +    if ((err = register_netdev(&hydra_dev))) {
  8048. +        if (err == -EIO)
  8049. +            printk("No Hydra board found. Module not loaded.\n");
  8050. +        return(err);
  8051. +    }
  8052. +    return(0);
  8053. +}
  8054. +
  8055. +void cleanup_module(void)
  8056. +{
  8057. +    struct hydra_private *priv = (struct hydra_private *)hydra_dev.priv;
  8058. +
  8059. +    unregister_netdev(&hydra_dev);
  8060. +    zorro_unconfig_board(priv->key, 0);
  8061. +    kfree(priv);
  8062. +}
  8063. +
  8064. +#endif /* MODULE */
  8065. diff -u --recursive --new-file pre2.0.6/linux/drivers/net/lance.c linux/drivers/net/lance.c
  8066. --- pre2.0.6/linux/drivers/net/lance.c    Sun May 12 10:16:07 1996
  8067. +++ linux/drivers/net/lance.c    Tue May 21 07:02:01 1996
  8068. @@ -283,6 +283,7 @@
  8069.  static unsigned char lance_need_isa_bounce_buffers = 1;
  8070.  
  8071.  static int lance_open(struct device *dev);
  8072. +static int lance_open_fail(struct device *dev);
  8073.  static void lance_init_ring(struct device *dev);
  8074.  static int lance_start_xmit(struct sk_buff *skb, struct device *dev);
  8075.  static int lance_rx(struct device *dev);
  8076. @@ -422,6 +423,7 @@
  8077.      }
  8078.  
  8079.      dev = init_etherdev(0, 0);
  8080. +    dev->open = lance_open_fail;
  8081.      chipname = chip_table[lance_version].name;
  8082.      printk("%s: %s at %#3x,", dev->name, chipname, ioaddr);
  8083.  
  8084. @@ -588,14 +590,21 @@
  8085.          printk(version);
  8086.  
  8087.      /* The LANCE-specific entries in the device structure. */
  8088. -    dev->open = &lance_open;
  8089. -    dev->hard_start_xmit = &lance_start_xmit;
  8090. -    dev->stop = &lance_close;
  8091. -    dev->get_stats = &lance_get_stats;
  8092. -    dev->set_multicast_list = &set_multicast_list;
  8093. +    dev->open = lance_open;
  8094. +    dev->hard_start_xmit = lance_start_xmit;
  8095. +    dev->stop = lance_close;
  8096. +    dev->get_stats = lance_get_stats;
  8097. +    dev->set_multicast_list = set_multicast_list;
  8098.  
  8099.      return;
  8100.  }
  8101. +
  8102. +static int
  8103. +lance_open_fail(struct device *dev)
  8104. +{
  8105. +    return -ENODEV;
  8106. +}
  8107. +
  8108.  
  8109.  
  8110.  static int
  8111. diff -u --recursive --new-file pre2.0.6/linux/drivers/scsi/README.qlogicisp linux/drivers/scsi/README.qlogicisp
  8112. --- pre2.0.6/linux/drivers/scsi/README.qlogicisp    Mon May 20 08:21:02 1996
  8113. +++ linux/drivers/scsi/README.qlogicisp    Mon May 20 08:38:41 1996
  8114. @@ -11,7 +11,7 @@
  8115.      IQ-PCI-10
  8116.      IQ-PCI-D
  8117.  
  8118. -This driver should work for all these adpaters, except for the PCI-basic which
  8119. +This driver should work for all these adapters, except for the PCI-basic which
  8120.  does not use the ISP1020 chip.  If you have the QLogic PCI-basic there is a
  8121.  an am53c974 driver that supports your adapter.
  8122.  
  8123. diff -u --recursive --new-file pre2.0.6/linux/drivers/scsi/atari_scsi.c linux/drivers/scsi/atari_scsi.c
  8124. --- pre2.0.6/linux/drivers/scsi/atari_scsi.c    Fri May 17 15:32:16 1996
  8125. +++ linux/drivers/scsi/atari_scsi.c    Mon May 20 07:54:28 1996
  8126. @@ -9,7 +9,7 @@
  8127.   *    - lots of extensions and bug fixes.
  8128.   *
  8129.   * This file is subject to the terms and conditions of the GNU General Public
  8130. - * License.  See the file README.legal in the main directory of this archive
  8131. + * License.  See the file COPYING in the main directory of this archive
  8132.   * for more details.
  8133.   *
  8134.   */
  8135. @@ -746,7 +746,7 @@
  8136.  int atari_scsi_release (struct Scsi_Host *sh)
  8137.  {
  8138.      if (IS_A_TT())
  8139. -        remove_isr (IRQ_TT_MFP_SCSI, scsi_tt_intr);
  8140. +        remove_isr (IRQ_TT_MFP_SCSI, scsi_tt_intr, NULL);
  8141.      if (atari_dma_buffer)
  8142.          scsi_init_free (atari_dma_buffer, STRAM_BUFFER_SIZE);
  8143.      return 1;
  8144. diff -u --recursive --new-file pre2.0.6/linux/drivers/scsi/atari_scsi.h linux/drivers/scsi/atari_scsi.h
  8145. --- pre2.0.6/linux/drivers/scsi/atari_scsi.h    Mon May 20 08:21:02 1996
  8146. +++ linux/drivers/scsi/atari_scsi.h    Mon May 20 07:54:28 1996
  8147. @@ -6,7 +6,7 @@
  8148.   * (Loosely based on the work of Robert De Vries' team)
  8149.   *
  8150.   * This file is subject to the terms and conditions of the GNU General Public
  8151. - * License.  See the file README.legal in the main directory of this archive
  8152. + * License.  See the file COPYING in the main directory of this archive
  8153.   * for more details.
  8154.   *
  8155.   */
  8156. diff -u --recursive --new-file pre2.0.6/linux/drivers/scsi/qlogicisp.c linux/drivers/scsi/qlogicisp.c
  8157. --- pre2.0.6/linux/drivers/scsi/qlogicisp.c    Mon May 20 08:21:02 1996
  8158. +++ linux/drivers/scsi/qlogicisp.c    Mon May 20 08:38:41 1996
  8159. @@ -74,7 +74,7 @@
  8160.  
  8161.  #define MODULE            0
  8162.  
  8163. -/*  Macros used for debuging */
  8164. +/*  Macros used for debugging */
  8165.  
  8166.  #define DEBUG_ISP1020        0
  8167.  #define DEBUG_ISP1020_INT    0
  8168. @@ -454,7 +454,7 @@
  8169.   *  7   Disconnect Privilege
  8170.   *  6   Parity Checking
  8171.   *  5   Wide Data Transfers
  8172. - *  4   Syncronous Data Transfers
  8173. + *  4   Synchronous Data Transfers
  8174.   *  3   Tagged Queuing
  8175.   *  2   Automatic Request Sense
  8176.   *  1   Stop Queue on Check Condition
  8177. @@ -823,9 +823,9 @@
  8178.              }
  8179.          }
  8180.      }
  8181. -#endif /* RELOAD_FIRMEARE */
  8182. +#endif /* RELOAD_FIRMWARE */
  8183.  
  8184. -    DEBUG(printk("qlogicisp : verifing checksum\n");)
  8185. +    DEBUG(printk("qlogicisp : verifying checksum\n");)
  8186.  
  8187.      param[0] = MBOX_VERIFY_CHECKSUM;
  8188.      param[1] = risc_code_addr01;
  8189. @@ -1473,7 +1473,7 @@
  8190.  
  8191.      printk("qlogicisp : entry count = 0x%02x, type = 0x%02x, flags = 0x%02x\n",
  8192.          status->hdr.entry_cnt, status->hdr.entry_type, status->hdr.flags);
  8193. -    printk("qlogicisp : scsi status = 0x%04x, compeltion status = 0x%04x\n",
  8194. +    printk("qlogicisp : scsi status = 0x%04x, completion status = 0x%04x\n",
  8195.          status->scsi_status, status->completion_status);
  8196.      printk("qlogicisp : state flags = 0x%04x, status flags = 0x%04x\n",
  8197.          status->state_flags, status->status_flags);
  8198. diff -u --recursive --new-file pre2.0.6/linux/drivers/sound/dmasound.c linux/drivers/sound/dmasound.c
  8199. --- pre2.0.6/linux/drivers/sound/dmasound.c    Fri May 17 15:32:17 1996
  8200. +++ linux/drivers/sound/dmasound.c    Mon May 20 07:54:28 1996
  8201. @@ -21,7 +21,7 @@
  8202.  VoxWare family of drivers.
  8203.  
  8204.  This file is subject to the terms and conditions of the GNU General Public
  8205. -License.  See the file README.legal in the main directory of this archive
  8206. +License.  See the file COPYING in the main directory of this archive
  8207.  for more details.
  8208.  
  8209.  History:
  8210. diff -u --recursive --new-file pre2.0.6/linux/fs/affs/inode.c linux/fs/affs/inode.c
  8211. --- pre2.0.6/linux/fs/affs/inode.c    Mon May 20 08:21:04 1996
  8212. +++ linux/fs/affs/inode.c    Mon May 20 08:38:40 1996
  8213. @@ -267,7 +267,7 @@
  8214.      return 1;
  8215.  }
  8216.  
  8217. -/* This function definately needs to be split up. Some fine day I'll
  8218. +/* This function definitely needs to be split up. Some fine day I'll
  8219.   * hopefully have the guts to do so. Until then: sorry for the mess.
  8220.   */
  8221.  
  8222. diff -u --recursive --new-file pre2.0.6/linux/fs/ufs/ufs_dir.c linux/fs/ufs/ufs_dir.c
  8223. --- pre2.0.6/linux/fs/ufs/ufs_dir.c    Sat Apr 27 15:19:59 1996
  8224. +++ linux/fs/ufs/ufs_dir.c    Tue May 21 07:06:19 1996
  8225. @@ -28,7 +28,7 @@
  8226.      unsigned long offset, lblk, blk;
  8227.      int i, stored;
  8228.      struct buffer_head * bh;
  8229. -    struct direct * de;
  8230. +    struct ufs_direct * de;
  8231.      struct super_block * sb;
  8232.  
  8233.      if (!inode || !S_ISDIR(inode->i_mode))
  8234. @@ -66,7 +66,7 @@
  8235.           * to make sure. */
  8236.          if (filp->f_version != inode->i_version) {
  8237.              for (i = 0; i < sb->s_blocksize && i < offset; ) {
  8238. -                de = (struct direct *) 
  8239. +                de = (struct ufs_direct *) 
  8240.                      (bh->b_data + i);
  8241.                  /* It's too expensive to do a full
  8242.                   * dirent test each time round this
  8243. @@ -86,7 +86,7 @@
  8244.          
  8245.          while (!error && filp->f_pos < inode->i_size 
  8246.                 && offset < sb->s_blocksize) {
  8247. -            de = (struct direct *) (bh->b_data + offset);
  8248. +            de = (struct ufs_direct *) (bh->b_data + offset);
  8249.                      /* XXX - put in a real ufs_check_dir_entry() */
  8250.                      if ((de->d_reclen == 0) || (de->d_namlen == 0)) {
  8251.                              filp->f_pos = (filp->f_pos & (sb->s_blocksize - 1)) + sb->s_blocksize;
  8252. diff -u --recursive --new-file pre2.0.6/linux/fs/ufs/ufs_namei.c linux/fs/ufs/ufs_namei.c
  8253. --- pre2.0.6/linux/fs/ufs/ufs_namei.c    Sat Apr 27 15:19:59 1996
  8254. +++ linux/fs/ufs/ufs_namei.c    Tue May 21 07:07:02 1996
  8255. @@ -18,9 +18,9 @@
  8256.   * NOTE! unlike strncmp, ext2_match returns 1 for success, 0 for failure.
  8257.   * stolen from ext2fs
  8258.   */
  8259. -static int ufs_match (int len, const char * const name, struct direct * d)
  8260. +static int ufs_match (int len, const char * const name, struct ufs_direct * d)
  8261.  {
  8262. -    if (!d || len > MAXNAMLEN) /* XXX - name space */
  8263. +    if (!d || len > UFS_MAXNAMLEN)
  8264.          return 0;
  8265.      /*
  8266.       * "" means "." ---> so paths like "/usr/lib//libc.a" work
  8267. @@ -39,7 +39,7 @@
  8268.  {
  8269.      unsigned long int lfragno, fragno;
  8270.      struct buffer_head * bh;
  8271. -    struct direct * d;
  8272. +    struct ufs_direct * d;
  8273.  
  8274.      /*
  8275.       * Touching /xyzzy in a filesystem toggles debugging messages.
  8276. @@ -107,7 +107,7 @@
  8277.                             dir->i_ino, lfragno);
  8278.                      return(-EIO);
  8279.              }
  8280. -            d = (struct direct *)(bh->b_data);
  8281. +            d = (struct ufs_direct *)(bh->b_data);
  8282.              while (((char *)d - bh->b_data + d->d_reclen) <=
  8283.                     dir->i_sb->s_blocksize) {
  8284.                      /* XXX - skip block if d_reclen or d_namlen is 0 */
  8285. @@ -136,7 +136,7 @@
  8286.                                             name, len, d->d_name, d->d_namlen);
  8287.                              }
  8288.                      }
  8289. -                    d = (struct direct *)((char *)d + d->d_reclen);
  8290. +                    d = (struct ufs_direct *)((char *)d + d->d_reclen);
  8291.              }
  8292.              brelse(bh);
  8293.      }
  8294. diff -u --recursive --new-file pre2.0.6/linux/fs/ufs/ufs_super.c linux/fs/ufs/ufs_super.c
  8295. --- pre2.0.6/linux/fs/ufs/ufs_super.c    Tue May  7 16:22:36 1996
  8296. +++ linux/fs/ufs/ufs_super.c    Tue May 21 07:05:22 1996
  8297. @@ -279,7 +279,7 @@
  8298.      tmp.f_ffree = sb->u.ufs_sb.s_raw_sb->fs_cstotal.cs_nifree;
  8299.      tmp.f_fsid.val[0] = sb->u.ufs_sb.s_raw_sb->fs_id[0];
  8300.      tmp.f_fsid.val[1] = sb->u.ufs_sb.s_raw_sb->fs_id[1];
  8301. -    tmp.f_namelen = MAXNAMLEN;
  8302. +    tmp.f_namelen = UFS_MAXNAMLEN;
  8303.  /*        tmp.f_spare[6] */
  8304.  
  8305.      memcpy_tofs(buf, &tmp, bufsiz);
  8306. diff -u --recursive --new-file pre2.0.6/linux/include/asm-alpha/unaligned.h linux/include/asm-alpha/unaligned.h
  8307. --- pre2.0.6/linux/include/asm-alpha/unaligned.h    Mon May 20 08:21:04 1996
  8308. +++ linux/include/asm-alpha/unaligned.h    Tue May 21 11:40:04 1996
  8309. @@ -26,13 +26,12 @@
  8310.      __asm__("ldq_u %0,%3\n\t"
  8311.          "ldq_u %1,%4\n\t"
  8312.          "extql %0,%2,%0\n\t"
  8313. -        "extqh %1,%2,%1\n\t"
  8314. -        "bis %1,%0,%0"
  8315. +        "extqh %1,%2,%1"
  8316.          :"=&r" (r1), "=&r" (r2)
  8317.          :"r" (r11),
  8318.           "m" (*r11),
  8319.           "m" (*(const unsigned long *)(7+(char *) r11)));
  8320. -    return r1;
  8321. +    return r1 | r2;
  8322.  }
  8323.  
  8324.  extern inline unsigned long __uldl(const unsigned int * r11)
  8325. @@ -41,13 +40,12 @@
  8326.      __asm__("ldq_u %0,%3\n\t"
  8327.          "ldq_u %1,%4\n\t"
  8328.          "extll %0,%2,%0\n\t"
  8329. -        "extlh %1,%2,%1\n\t"
  8330. -        "bis %1,%0,%0"
  8331. +        "extlh %1,%2,%1"
  8332.          :"=&r" (r1), "=&r" (r2)
  8333.          :"r" (r11),
  8334.           "m" (*r11),
  8335.           "m" (*(const unsigned long *)(3+(char *) r11)));
  8336. -    return r1;
  8337. +    return r1 | r2;
  8338.  }
  8339.  
  8340.  extern inline unsigned long __uldw(const unsigned short * r11)
  8341. @@ -56,13 +54,12 @@
  8342.      __asm__("ldq_u %0,%3\n\t"
  8343.          "ldq_u %1,%4\n\t"
  8344.          "extwl %0,%2,%0\n\t"
  8345. -        "extwh %1,%2,%1\n\t"
  8346. -        "bis %1,%0,%0"
  8347. +        "extwh %1,%2,%1"
  8348.          :"=&r" (r1), "=&r" (r2)
  8349.          :"r" (r11),
  8350.           "m" (*r11),
  8351.           "m" (*(const unsigned long *)(1+(char *) r11)));
  8352. -    return r1;
  8353. +    return r1 | r2;
  8354.  }
  8355.  
  8356.  /*
  8357. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/amigahw.h linux/include/asm-m68k/amigahw.h
  8358. --- pre2.0.6/linux/include/asm-m68k/amigahw.h    Tue Apr 23 13:57:12 1996
  8359. +++ linux/include/asm-m68k/amigahw.h    Mon May 20 07:54:28 1996
  8360. @@ -7,7 +7,7 @@
  8361.  ** Copyright 1992 by Greg Harp
  8362.  **
  8363.  ** This file is subject to the terms and conditions of the GNU General Public
  8364. -** License.  See the file README.legal in the main directory of this archive
  8365. +** License.  See the file COPYING in the main directory of this archive
  8366.  ** for more details.
  8367.  **
  8368.  ** Created: 9/24/92 by Greg Harp
  8369. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/amigaints.h linux/include/asm-m68k/amigaints.h
  8370. --- pre2.0.6/linux/include/asm-m68k/amigaints.h    Tue Apr 23 13:57:12 1996
  8371. +++ linux/include/asm-m68k/amigaints.h    Mon May 20 07:54:28 1996
  8372. @@ -4,7 +4,7 @@
  8373.  ** Copyright 1992 by Greg Harp
  8374.  **
  8375.  ** This file is subject to the terms and conditions of the GNU General Public
  8376. -** License.  See the file README.legal in the main directory of this archive
  8377. +** License.  See the file COPYING in the main directory of this archive
  8378.  ** for more details.
  8379.  **
  8380.  ** Created 10/2/92 by Greg Harp
  8381. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/amigatypes.h linux/include/asm-m68k/amigatypes.h
  8382. --- pre2.0.6/linux/include/asm-m68k/amigatypes.h    Tue Apr 23 13:57:12 1996
  8383. +++ linux/include/asm-m68k/amigatypes.h    Mon May 20 07:54:28 1996
  8384. @@ -4,7 +4,7 @@
  8385.  ** Copyright 1992 by Greg Harp
  8386.  **
  8387.  ** This file is subject to the terms and conditions of the GNU General Public
  8388. -** License.  See the file README.legal in the main directory of this archive
  8389. +** License.  See the file COPYING in the main directory of this archive
  8390.  ** for more details.
  8391.  **
  8392.  ** Created 09/29/92 by Greg Harp
  8393. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/atarihw.h linux/include/asm-m68k/atarihw.h
  8394. --- pre2.0.6/linux/include/asm-m68k/atarihw.h    Sat Apr 27 15:19:59 1996
  8395. +++ linux/include/asm-m68k/atarihw.h    Mon May 20 07:54:28 1996
  8396. @@ -8,7 +8,7 @@
  8397.  **   Added definitions for TT specific chips.
  8398.  **
  8399.  ** This file is subject to the terms and conditions of the GNU General Public
  8400. -** License.  See the file README.legal in the main directory of this archive
  8401. +** License.  See the file COPYING in the main directory of this archive
  8402.  ** for more details.
  8403.  **
  8404.  */
  8405. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/atariints.h linux/include/asm-m68k/atariints.h
  8406. --- pre2.0.6/linux/include/asm-m68k/atariints.h    Sat Apr 27 15:19:59 1996
  8407. +++ linux/include/asm-m68k/atariints.h    Mon May 20 07:54:28 1996
  8408. @@ -10,7 +10,7 @@
  8409.  **   Adapted to new int handling scheme (see ataints.c); revised numbering
  8410.  **
  8411.  ** This file is subject to the terms and conditions of the GNU General Public
  8412. -** License.  See the file README.legal in the main directory of this archive
  8413. +** License.  See the file COPYING in the main directory of this archive
  8414.  ** for more details.
  8415.  **
  8416.  */
  8417. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/atarikb.h linux/include/asm-m68k/atarikb.h
  8418. --- pre2.0.6/linux/include/asm-m68k/atarikb.h    Tue Apr 23 13:57:12 1996
  8419. +++ linux/include/asm-m68k/atarikb.h    Mon May 20 07:54:28 1996
  8420. @@ -6,7 +6,7 @@
  8421.  ** Copyright 1994 by Robert de Vries
  8422.  **
  8423.  ** This file is subject to the terms and conditions of the GNU General Public
  8424. -** License.  See the file README.legal in the main directory of this archive
  8425. +** License.  See the file COPYING in the main directory of this archive
  8426.  ** for more details.
  8427.  **
  8428.  ** Created: 20 Feb 1994 by Robert de Vries
  8429. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/bitops.h linux/include/asm-m68k/bitops.h
  8430. --- pre2.0.6/linux/include/asm-m68k/bitops.h    Tue May  7 16:22:37 1996
  8431. +++ linux/include/asm-m68k/bitops.h    Mon May 20 07:54:29 1996
  8432. @@ -4,7 +4,7 @@
  8433.   * Copyright 1992, Linus Torvalds.
  8434.   *
  8435.   * This file is subject to the terms and conditions of the GNU General Public
  8436. - * License.  See the file README.legal in the main directory of this archive
  8437. + * License.  See the file COPYING in the main directory of this archive
  8438.   * for more details.
  8439.   */
  8440.  
  8441. @@ -109,54 +109,6 @@
  8442.      __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
  8443.                    : "=d" (res) : "d" (~word & -~word));
  8444.      return res ^ 31;
  8445. -}
  8446. -
  8447. -extern __inline__ int find_first_one_bit(void * vaddr, unsigned size)
  8448. -{
  8449. -    unsigned long *p = vaddr, *addr = vaddr;
  8450. -    int res;
  8451. -    unsigned long num;
  8452. -
  8453. -    if (!size)
  8454. -        return 0;
  8455. -
  8456. -    while (!*p++)
  8457. -    {
  8458. -        if (size <= 32)
  8459. -            return (p - addr) << 5;
  8460. -        size -= 32;
  8461. -    }
  8462. -
  8463. -    num = *--p;
  8464. -    __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
  8465. -                  : "=d" (res) : "d" (num & -num));
  8466. -    return ((p - addr) << 5) + (res ^ 31);
  8467. -}
  8468. -
  8469. -extern __inline__ int find_next_one_bit (void *vaddr, int size,
  8470. -                      int offset)
  8471. -{
  8472. -    unsigned long *addr = vaddr;
  8473. -    unsigned long *p = addr + (offset >> 5);
  8474. -    int set = 0, bit = offset & 31UL, res;
  8475. -
  8476. -    if (offset >= size)
  8477. -        return size;
  8478. -
  8479. -    if (bit) {
  8480. -        unsigned long num = *p & (~0UL << bit);
  8481. -
  8482. -        /* Look for one in first longword */
  8483. -        __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
  8484. -                      : "=d" (res) : "d" (num & -num));
  8485. -        if (res < 32)
  8486. -            return (offset & ~31UL) + (res ^ 31);
  8487. -                set = 32 - bit;
  8488. -        p++;
  8489. -    }
  8490. -    /* No one yet, search remaining full bytes for a one */
  8491. -    res = find_first_one_bit (p, size - 32 * (p - addr));
  8492. -    return (offset + set + res);
  8493.  }
  8494.  
  8495.  /* Bitmap functions for the minix filesystem */
  8496. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/bootinfo.h linux/include/asm-m68k/bootinfo.h
  8497. --- pre2.0.6/linux/include/asm-m68k/bootinfo.h    Fri May 17 15:32:18 1996
  8498. +++ linux/include/asm-m68k/bootinfo.h    Mon May 20 07:54:29 1996
  8499. @@ -4,7 +4,7 @@
  8500.  ** Copyright 1992 by Greg Harp
  8501.  **
  8502.  ** This file is subject to the terms and conditions of the GNU General Public
  8503. -** License.  See the file README.legal in the main directory of this archive
  8504. +** License.  See the file COPYING in the main directory of this archive
  8505.  ** for more details.
  8506.  **
  8507.  ** Created 09/29/92 by Greg Harp
  8508. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/font.h linux/include/asm-m68k/font.h
  8509. --- pre2.0.6/linux/include/asm-m68k/font.h    Sat Apr 27 15:19:59 1996
  8510. +++ linux/include/asm-m68k/font.h    Mon May 20 07:54:29 1996
  8511. @@ -4,7 +4,7 @@
  8512.   *  Created 1995 by Geert Uytterhoeven
  8513.   *
  8514.   *  This file is subject to the terms and conditions of the GNU General Public
  8515. - *  License.  See the file README.legal in the main directory of this archive
  8516. + *  License.  See the file COPYING in the main directory of this archive
  8517.   *  for more details.
  8518.   */
  8519.  
  8520. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/irq.h linux/include/asm-m68k/irq.h
  8521. --- pre2.0.6/linux/include/asm-m68k/irq.h    Tue Apr 23 13:57:12 1996
  8522. +++ linux/include/asm-m68k/irq.h    Mon May 20 07:54:29 1996
  8523. @@ -95,7 +95,7 @@
  8524.  /*
  8525.   * This routine will remove an isr for the specified interrupt source.
  8526.   */
  8527. -extern int remove_isr (unsigned long source, isrfunc isr);
  8528. +extern int remove_isr (unsigned long source, isrfunc isr, void *data);
  8529.  
  8530.  /*
  8531.   * This routine will insert an isr_node_t into a chain of nodes, using
  8532. @@ -106,7 +106,7 @@
  8533.  /*
  8534.   * This routine will delete the isr node for isr from a chain of nodes
  8535.   */
  8536. -extern void delete_isr (isr_node_t **listp, isrfunc isr);
  8537. +extern void delete_isr (isr_node_t **listp, isrfunc isr, void *data);
  8538.  
  8539.  /*
  8540.   * This routine may be used to call the isr routines in the passed list.
  8541. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/machdep.h linux/include/asm-m68k/machdep.h
  8542. --- pre2.0.6/linux/include/asm-m68k/machdep.h    Fri May 17 15:32:18 1996
  8543. +++ linux/include/asm-m68k/machdep.h    Mon May 20 07:54:29 1996
  8544. @@ -20,7 +20,8 @@
  8545.  extern void (*mach_init_INTS) (void);
  8546.  extern int (*mach_add_isr) (unsigned long source, isrfunc handler,
  8547.                  int pri, void *data, char *name);
  8548. -extern int (*mach_remove_isr) (unsigned long source, isrfunc handler);
  8549. +extern int (*mach_remove_isr) (unsigned long source, isrfunc handler,
  8550. +                   void *data);
  8551.  extern int (*mach_get_irq_list)(char *buf, int len);
  8552.  extern void (*mach_process_int) (int level, struct pt_regs *fp);
  8553.  extern void (*mach_enable_irq) (unsigned);
  8554. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/traps.h linux/include/asm-m68k/traps.h
  8555. --- pre2.0.6/linux/include/asm-m68k/traps.h    Sat Apr 27 15:19:59 1996
  8556. +++ linux/include/asm-m68k/traps.h    Mon May 20 07:54:29 1996
  8557. @@ -4,7 +4,7 @@
  8558.   *  Copyright (C) 1993        Hamish Macdonald
  8559.   *
  8560.   * This file is subject to the terms and conditions of the GNU General Public
  8561. - * License.  See the file README.legal in the main directory of this archive
  8562. + * License.  See the file COPYING in the main directory of this archive
  8563.   * for more details.
  8564.   */
  8565.  
  8566. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/unaligned.h linux/include/asm-m68k/unaligned.h
  8567. --- pre2.0.6/linux/include/asm-m68k/unaligned.h    Thu Jan  1 02:00:00 1970
  8568. +++ linux/include/asm-m68k/unaligned.h    Mon May 20 07:54:29 1996
  8569. @@ -0,0 +1,16 @@
  8570. +#ifndef __M68K_UNALIGNED_H
  8571. +#define __M68K_UNALIGNED_H
  8572. +
  8573. +/*
  8574. + * The m68k can do unaligned accesses itself. 
  8575. + *
  8576. + * The strange macros are there to make sure these can't
  8577. + * be misused in a way that makes them not work on other
  8578. + * architectures where unaligned accesses aren't as simple.
  8579. + */
  8580. +
  8581. +#define get_unaligned(ptr) (*(ptr))
  8582. +
  8583. +#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
  8584. +
  8585. +#endif
  8586. diff -u --recursive --new-file pre2.0.6/linux/include/asm-m68k/zorro.h linux/include/asm-m68k/zorro.h
  8587. --- pre2.0.6/linux/include/asm-m68k/zorro.h    Fri May 17 15:32:18 1996
  8588. +++ linux/include/asm-m68k/zorro.h    Mon May 20 07:54:29 1996
  8589. @@ -4,7 +4,7 @@
  8590.   * Copyright (C) 1995 Geert Uytterhoeven
  8591.   *
  8592.   * This file is subject to the terms and conditions of the GNU General Public
  8593. - * License.  See the file README.legal in the main directory of this archive
  8594. + * License.  See the file COPYING in the main directory of this archive
  8595.   * for more details.
  8596.   */
  8597.  
  8598. @@ -86,11 +86,12 @@
  8599.  #define PROD_GVPIISCSI_2       (0x09)    /* evidence that the driver works
  8600.                         for this product code also */
  8601.  #define PROD_GVPIIRAM          (0x0A)    /* GVP Series II RAM */
  8602. -#define PROD_GFORCE_040_SCSI   (0x16)    /* GForce 040 with SCSI (new) */
  8603. -#define PROD_GVPIV_24          (0x20)    /* GVP IV-24 Graphics Board */
  8604.  #define PROD_GVP               (0x0B)    /* This code is used by a wide range of
  8605.                         GVP products - use the epc to
  8606.                         identify it correctly */
  8607. +#define PROD_GVP_A2000_030     (0x0D)    /* GVP A2000 68030 Turbo Board */
  8608. +#define PROD_GFORCE_040_SCSI   (0x16)    /* GForce 040 with SCSI (new) */
  8609. +#define PROD_GVPIV_24          (0x20)    /* GVP IV-24 Graphics Board */
  8610.  /* #define PROD_GVPIO_EXT      (0xFF)*/    /* GVP I/O Extender */
  8611.  
  8612.  #define MANUF_PPI              (0x07EA)    /* Progressive Peripherals Inc. */
  8613. @@ -118,6 +119,9 @@
  8614.  #define MANUF_HARDITAL_SYNTHES (0x0817)    /* Hardital Synthesis */
  8615.  #define PROD_HARDITAL_SCSI     (0x01)    /* Hardital Synthesis SCSI Controller */
  8616.  
  8617. +#define MANUF_HARDITAL2        (0x0820)    /* Hardital Synthesis */
  8618. +#define PROD_TQM               (0x14)    /* TQM 68030+68882 Turbo Board */
  8619. +
  8620.  #define MANUF_BSC2             (0x082C)    /* BSC */
  8621.  #define PROD_OKTAGON_SCSI      (0x05)    /* BSC Oktagon 2008 SCSI Controller */
  8622.  #define PROD_TANDEM            (0x06)    /* BSC Tandem */
  8623. @@ -193,6 +197,7 @@
  8624.  #define MANUF_PHASE5           (0x2140)    /* Phase5 */
  8625.  #define PROD_FASTLANE_RAM      (0x0A)    /* FastLane RAM */
  8626.  #define PROD_FASTLANE_SCSI     (0x0B)    /* FastLane/Blizzard 1230-II SCSI */
  8627. +#define PROD_CYBERSTORM_SCSI   (0x0C)    /* CyberStorm Fast SCSI-II Controller */
  8628.  #define PROD_BLIZZARD_1230_III (0x0D)    /* Blizzard 1230-III Turbo Board */
  8629.  #define PROD_BLIZZARD_1230_IV  (0x11)    /* Blizzard 1230-IV Turbo Board */
  8630.  #define PROD_CYBERVISION       (0x22)    /* CyberVision64 Graphics Board */
  8631. @@ -211,6 +216,7 @@
  8632.  #define PROD_RETINA_Z2         (0x06)    /* Retina Z2 Graphics Board */
  8633.  #define PROD_MULTI_EVOLUTION   (0x08)    /* MultiEvolution */
  8634.  #define PROD_RETINA_Z3         (0x10)    /* Retina Z3 Graphics Board */
  8635. +#define PROD_FALCON_040        (0xFD)    /* Falcon '040 Turbo Board */
  8636.  
  8637.  
  8638.  /* Illegal Manufacturer IDs. These do NOT appear in amiga/zorro.c! */
  8639. diff -u --recursive --new-file pre2.0.6/linux/include/linux/affs_fs_sb.h linux/include/linux/affs_fs_sb.h
  8640. --- pre2.0.6/linux/include/linux/affs_fs_sb.h    Mon May 20 08:21:04 1996
  8641. +++ linux/include/linux/affs_fs_sb.h    Mon May 20 08:38:41 1996
  8642. @@ -49,10 +49,10 @@
  8643.      int s_bm_count;            /* Number of bitmap blocks. */
  8644.      int s_nextzone;            /* Next zone to look for free blocks. */
  8645.      int s_num_az;            /* Total number of alloc zones. */
  8646. -    struct affs_zone *s_zones;    /* The zones themselfes. */
  8647. +    struct affs_zone *s_zones;    /* The zones themselves. */
  8648.      struct affs_alloc_zone *s_alloc;/* The allocation zones. */
  8649.      char *s_zonemap;        /* Bitmap for allocation zones. */
  8650. -    char *s_prefix;            /* Prefix for volumes and assignes. */
  8651. +    char *s_prefix;            /* Prefix for volumes and assigns. */
  8652.      int s_prefix_len;        /* Length of prefix. */
  8653.      char s_volume[32];        /* Volume prefix for absolute symlinks. */
  8654.  };
  8655. diff -u --recursive --new-file pre2.0.6/linux/include/linux/console.h linux/include/linux/console.h
  8656. --- pre2.0.6/linux/include/linux/console.h    Sat Apr 27 15:20:04 1996
  8657. +++ linux/include/linux/console.h    Mon May 20 07:54:29 1996
  8658. @@ -4,7 +4,7 @@
  8659.   *  Copyright (C) 1993        Hamish Macdonald
  8660.   *
  8661.   * This file is subject to the terms and conditions of the GNU General Public
  8662. - * License.  See the file README.legal in the main directory of this archive
  8663. + * License.  See the file COPYING in the main directory of this archive
  8664.   * for more details.
  8665.   *
  8666.   * Changed:
  8667. diff -u --recursive --new-file pre2.0.6/linux/include/linux/ext2_fs.h linux/include/linux/ext2_fs.h
  8668. --- pre2.0.6/linux/include/linux/ext2_fs.h    Sun May  5 08:52:04 1996
  8669. +++ linux/include/linux/ext2_fs.h    Mon May 20 20:33:56 1996
  8670. @@ -428,15 +428,9 @@
  8671.   * Ok, these declarations are also in <linux/kernel.h> but none of the
  8672.   * ext2 source programs needs to include it so they are duplicated here.
  8673.   */
  8674. -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
  8675. -# define NORET_TYPE    __volatile__
  8676. -# define ATTRIB_NORET  /**/
  8677. -# define NORET_AND     /**/
  8678. -#else
  8679.  # define NORET_TYPE    /**/
  8680.  # define ATTRIB_NORET  __attribute__((noreturn))
  8681.  # define NORET_AND     noreturn,
  8682. -#endif
  8683.  
  8684.  /* acl.c */
  8685.  extern int ext2_permission (struct inode *, int);
  8686. diff -u --recursive --new-file pre2.0.6/linux/include/linux/firewall.h linux/include/linux/firewall.h
  8687. --- pre2.0.6/linux/include/linux/firewall.h    Mon Apr  8 19:01:46 1996
  8688. +++ linux/include/linux/firewall.h    Sun May 19 23:40:49 1996
  8689. @@ -8,18 +8,19 @@
  8690.  #define FW_BLOCK    0
  8691.  #define FW_ACCEPT    1
  8692.  #define FW_REJECT    (-1)
  8693. -#define FW_MASQUERADE    2
  8694. -#define FW_SKIP        3
  8695. +#define FW_REDIRECT    2
  8696. +#define FW_MASQUERADE    3
  8697. +#define FW_SKIP        4
  8698.  
  8699.  struct firewall_ops
  8700.  {
  8701.      struct firewall_ops *next;
  8702.      int (*fw_forward)(struct firewall_ops *this, int pf, 
  8703. -            struct device *dev, void *phdr);
  8704. +            struct device *dev, void *phdr, void *arg);
  8705.      int (*fw_input)(struct firewall_ops *this, int pf, 
  8706. -            struct device *dev, void *phdr);
  8707. +            struct device *dev, void *phdr, void *arg);
  8708.      int (*fw_output)(struct firewall_ops *this, int pf, 
  8709. -            struct device *dev, void *phdr);
  8710. +            struct device *dev, void *phdr, void *arg);
  8711.      /* Data falling in the second 486 cache line isn't used directly
  8712.         during a firewall call and scan, only by insert/delete and other
  8713.         unusual cases
  8714. @@ -31,9 +32,9 @@
  8715.  #ifdef __KERNEL__
  8716.  extern int register_firewall(int pf, struct firewall_ops *fw);
  8717.  extern int unregister_firewall(int pf, struct firewall_ops *fw);
  8718. -extern int call_fw_firewall(int pf, struct device *dev, void *phdr);
  8719. -extern int call_in_firewall(int pf, struct device *dev, void *phdr);
  8720. -extern int call_out_firewall(int pf, struct device *dev, void *phdr);
  8721. +extern int call_fw_firewall(int pf, struct device *dev, void *phdr, void *arg);
  8722. +extern int call_in_firewall(int pf, struct device *dev, void *phdr, void *arg);
  8723. +extern int call_out_firewall(int pf, struct device *dev, void *phdr, void *arg);
  8724.  extern void fwchain_init(void);
  8725.  #endif
  8726.  
  8727. diff -u --recursive --new-file pre2.0.6/linux/include/linux/ip_fw.h linux/include/linux/ip_fw.h
  8728. --- pre2.0.6/linux/include/linux/ip_fw.h    Wed May 15 11:01:15 1996
  8729. +++ linux/include/linux/ip_fw.h    Tue May 21 14:43:55 1996
  8730. @@ -21,6 +21,8 @@
  8731.   *                    commands to replace "add" commands,
  8732.   *                    add ICMP header to struct ip_fwpkt.
  8733.   *    Jos Vos            :    Add support for matching device names.
  8734. + *    Willy Konynenberg    :    Add transparent proxying support.
  8735. + *    Jos Vos            :    Add options for input/output accounting.
  8736.   *
  8737.   *    All the real work was done by .....
  8738.   */
  8739. @@ -79,31 +81,34 @@
  8740.   *    Values for "flags" field .
  8741.   */
  8742.  
  8743. -#define IP_FW_F_ALL    0x000    /* This is a universal packet firewall*/
  8744. -#define IP_FW_F_TCP    0x001    /* This is a TCP packet firewall      */
  8745. -#define IP_FW_F_UDP    0x002    /* This is a UDP packet firewall      */
  8746. -#define IP_FW_F_ICMP    0x003    /* This is a ICMP packet firewall     */
  8747. -#define IP_FW_F_KIND    0x003    /* Mask to isolate firewall kind      */
  8748. -#define IP_FW_F_ACCEPT    0x004    /* This is an accept firewall (as     *
  8749. +#define IP_FW_F_ALL    0x0000    /* This is a universal packet firewall*/
  8750. +#define IP_FW_F_TCP    0x0001    /* This is a TCP packet firewall      */
  8751. +#define IP_FW_F_UDP    0x0002    /* This is a UDP packet firewall      */
  8752. +#define IP_FW_F_ICMP    0x0003    /* This is a ICMP packet firewall     */
  8753. +#define IP_FW_F_KIND    0x0003    /* Mask to isolate firewall kind      */
  8754. +#define IP_FW_F_ACCEPT    0x0004    /* This is an accept firewall (as     *
  8755.                   *         opposed to a deny firewall)*
  8756.                   *                                    */
  8757. -#define IP_FW_F_SRNG    0x008    /* The first two src ports are a min  *
  8758. +#define IP_FW_F_SRNG    0x0008    /* The first two src ports are a min  *
  8759.                   * and max range (stored in host byte *
  8760.                   * order).                            *
  8761.                   *                                    */
  8762. -#define IP_FW_F_DRNG    0x010    /* The first two dst ports are a min  *
  8763. +#define IP_FW_F_DRNG    0x0010    /* The first two dst ports are a min  *
  8764.                   * and max range (stored in host byte *
  8765.                   * order).                            *
  8766.                   * (ports[0] <= port <= ports[1])     *
  8767.                   *                                    */
  8768. -#define IP_FW_F_PRN    0x020    /* In verbose mode print this firewall*/
  8769. -#define IP_FW_F_BIDIR    0x040    /* For bidirectional firewalls        */
  8770. -#define IP_FW_F_TCPSYN    0x080    /* For tcp packets-check SYN only     */
  8771. -#define IP_FW_F_ICMPRPL 0x100    /* Send back icmp unreachable packet  */
  8772. -#define IP_FW_F_MASQ    0x200    /* Masquerading                  */
  8773. -#define IP_FW_F_TCPACK    0x400    /* For tcp-packets match if ACK is set*/
  8774. +#define IP_FW_F_PRN    0x0020    /* In verbose mode print this firewall*/
  8775. +#define IP_FW_F_BIDIR    0x0040    /* For bidirectional firewalls        */
  8776. +#define IP_FW_F_TCPSYN    0x0080    /* For tcp packets-check SYN only     */
  8777. +#define IP_FW_F_ICMPRPL 0x0100    /* Send back icmp unreachable packet  */
  8778. +#define IP_FW_F_MASQ    0x0200    /* Masquerading                  */
  8779. +#define IP_FW_F_TCPACK    0x0400    /* For tcp-packets match if ACK is set*/
  8780. +#define IP_FW_F_REDIR    0x0800    /* Redirect to local port fw_pts[n]   */
  8781. +#define IP_FW_F_ACCTIN  0x1000    /* Account incoming packets only.     */
  8782. +#define IP_FW_F_ACCTOUT 0x2000    /* Account outgoing packets only.     */
  8783.  
  8784. -#define IP_FW_F_MASK    0x7FF    /* All possible flag bits mask        */
  8785. +#define IP_FW_F_MASK    0x3FFF    /* All possible flag bits mask        */
  8786.  
  8787.  /*    
  8788.   *    New IP firewall options for [gs]etsockopt at the RAW IP level.
  8789. @@ -186,6 +191,12 @@
  8790.  
  8791.  #ifdef __KERNEL__
  8792.  
  8793. +/* Modes used in the ip_fw_chk() routine. */
  8794. +#define IP_FW_MODE_FW        0x00    /* kernel firewall check */
  8795. +#define IP_FW_MODE_ACCT_IN    0x01    /* accounting (incoming) */
  8796. +#define IP_FW_MODE_ACCT_OUT    0x02    /* accounting (outgoing) */
  8797. +#define IP_FW_MODE_CHK        0x04    /* check requested by user */
  8798. +
  8799.  #include <linux/config.h>
  8800.  #ifdef CONFIG_IP_FIREWALL
  8801.  extern struct ip_fw *ip_fw_in_chain;
  8802. @@ -198,14 +209,11 @@
  8803.  #endif
  8804.  #ifdef CONFIG_IP_ACCT
  8805.  extern struct ip_fw *ip_acct_chain;
  8806. -extern void ip_acct_cnt(struct iphdr *, struct device *, struct ip_fw *);
  8807.  extern int ip_acct_ctl(int, void *, int);
  8808.  #endif
  8809.  
  8810. -
  8811. -extern int ip_fw_chk(struct iphdr *, struct device *rif,struct ip_fw *, int, int);
  8812. +extern int ip_fw_chk(struct iphdr *, struct device *, __u16 *, struct ip_fw *, int, int);
  8813.  extern void ip_fw_init(void);
  8814.  #endif /* KERNEL */
  8815. -
  8816.  
  8817.  #endif /* _IP_FW_H */
  8818. diff -u --recursive --new-file pre2.0.6/linux/include/linux/isdn.h linux/include/linux/isdn.h
  8819. --- pre2.0.6/linux/include/linux/isdn.h    Mon May 20 08:21:04 1996
  8820. +++ linux/include/linux/isdn.h    Mon May 20 08:38:41 1996
  8821. @@ -29,7 +29,7 @@
  8822.   * Added flags for DLE handling.
  8823.   *
  8824.   * Revision 1.8  1996/05/11 21:49:55  fritz
  8825. - * Removed queue mamagement variables.
  8826. + * Removed queue management variables.
  8827.   * Changed queue management to use sk_buffs.
  8828.   *
  8829.   * Revision 1.7  1996/05/07 09:10:06  fritz
  8830. diff -u --recursive --new-file pre2.0.6/linux/include/linux/kernel.h linux/include/linux/kernel.h
  8831. --- pre2.0.6/linux/include/linux/kernel.h    Tue May  7 16:22:38 1996
  8832. +++ linux/include/linux/kernel.h    Mon May 20 20:33:57 1996
  8833. @@ -29,15 +29,9 @@
  8834.  #define    KERN_INFO    "<6>"    /* informational            */
  8835.  #define    KERN_DEBUG    "<7>"    /* debug-level messages            */
  8836.  
  8837. -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
  8838. -# define NORET_TYPE    __volatile__
  8839. -# define ATTRIB_NORET  /**/
  8840. -# define NORET_AND     /**/
  8841. -#else
  8842.  # define NORET_TYPE    /**/
  8843.  # define ATTRIB_NORET  __attribute__((noreturn))
  8844.  # define NORET_AND     noreturn,
  8845. -#endif
  8846.  
  8847.  extern void math_error(void);
  8848.  NORET_TYPE void panic(const char * fmt, ...)
  8849. diff -u --recursive --new-file pre2.0.6/linux/include/linux/mcdx.h linux/include/linux/mcdx.h
  8850. --- pre2.0.6/linux/include/linux/mcdx.h    Mon May 20 08:21:04 1996
  8851. +++ linux/include/linux/mcdx.h    Tue May 21 11:49:03 1996
  8852. @@ -1,7 +1,7 @@
  8853.  /*
  8854.   * Definitions for the Mitsumi CDROM interface
  8855. - * Copyright (C) 1995 Heiko Schlittermann <heiko@lotte.sax.de>
  8856. - * VERSION: 2.3
  8857. + * (H) Hackright 1996 by Marcin Dalecki <dalecki@namu03.gwdg.de>
  8858. + * VERSION: 2.5
  8859.   * 
  8860.   * This program is free software; you can redistribute it and/or modify
  8861.   * it under the terms of the GNU General Public License as published by
  8862. @@ -16,20 +16,6 @@
  8863.   * You should have received a copy of the GNU General Public License
  8864.   * along with this program; see the file COPYING.  If not, write to
  8865.   * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  8866. - *
  8867. - * Thanks to
  8868. - *  The Linux Community at all and ...
  8869. - *  Martin Harris (he wrote the first Mitsumi Driver)
  8870. - *  Eberhard Moenkeberg (he gave me much support and the initial kick)
  8871. - *  Bernd Huebner, Ruediger Helsch (Unifix-Software Gmbh, they
  8872. - *      improved the original driver)
  8873. - *  Jon Tombs, Bjorn Ekwall (module support)
  8874. - *  Daniel v. Mosnenck (he sent me the Technical and Programming Reference)
  8875. - *  Gerd Knorr (he lent me his PhotoCD)
  8876. - *  Nils Faerber and Roger E. Wolff (extensively tested the LU portion)
  8877. - *  Andreas Kies (testing the mysterious hangups)
  8878. - *  ... somebody forgotten?
  8879. - *  
  8880.   */
  8881.  
  8882.  #ifndef __MCDX_H
  8883. @@ -121,11 +107,7 @@
  8884.  #define MCDX_CMD_CLOSE_DOOR        0xf8
  8885.  #define MCDX_CMD_LOCK_DOOR        0xfe
  8886.  
  8887. -#define READ_AHEAD            4    /* 8 Sectors (4K) */
  8888. -
  8889. -#define MCDX_CDBLK    2048    /* 2048 cooked data each blk */
  8890. -
  8891. -#define MCDX_DATA_TIMEOUT    (HZ/10)        /* 0.1 second */
  8892. +#define READ_AHEAD            8    /* 16 Sectors (4K) */
  8893.  
  8894.  #ifndef I_WAS_IN_MCDX_H
  8895.  #warning You have not edited mcdx.h
  8896. diff -u --recursive --new-file pre2.0.6/linux/include/linux/md.h linux/include/linux/md.h
  8897. --- pre2.0.6/linux/include/linux/md.h    Sun Apr 21 19:22:16 1996
  8898. +++ linux/include/linux/md.h    Mon May 20 07:50:46 1996
  8899. @@ -29,15 +29,13 @@
  8900.  #define REGISTER_DEV _IO (MD_MAJOR, 1)
  8901.  #define START_MD     _IO (MD_MAJOR, 2)
  8902.  #define STOP_MD      _IO (MD_MAJOR, 3)
  8903. -#define MD_INVALID   _IO (MD_MAJOR, 4)
  8904. -#define MD_VALID     _IO (MD_MAJOR, 5)
  8905.  
  8906.  /*
  8907.     personalities :
  8908.     Byte 0 : Chunk size factor
  8909.     Byte 1 : Fault tolerance count for each physical device
  8910.              (   0 means no fault tolerance,
  8911. -             0xFF means always tolerate faults)
  8912. +             0xFF means always tolerate faults), not used by now.
  8913.     Byte 2 : Personality
  8914.     Byte 3 : Reserved.
  8915.   */
  8916. @@ -52,7 +50,6 @@
  8917.  #define MD_RESERVED       0    /* Not used by now */
  8918.  #define LINEAR            (1UL << PERSONALITY_SHIFT)
  8919.  #define STRIPED           (2UL << PERSONALITY_SHIFT)
  8920. -#define STRIPPED          STRIPED /* Long lasting spelling mistake... */
  8921.  #define RAID0             STRIPED
  8922.  #define RAID1             (3UL << PERSONALITY_SHIFT)
  8923.  #define RAID5             (4UL << PERSONALITY_SHIFT)
  8924. @@ -73,18 +70,6 @@
  8925.  
  8926.  #define FACTOR_SHIFT(a) (PAGE_SHIFT + (a) - 10)
  8927.  
  8928. -/* Invalidation modes */
  8929. -#define VALID          0
  8930. -#define INVALID_NEXT   1
  8931. -#define INVALID_ALWAYS 2
  8932. -#define INVALID        3    /* Only useful to md_valid_device */
  8933. -
  8934. -/* Return values from personalities to md driver */
  8935. -#define REDIRECTED_BHREQ 0 /* Redirected individual buffers
  8936. -                  (shouldn't be used anymore since 0.31) */
  8937. -#define REDIRECTED_REQ   1 /* Redirected whole request */
  8938. -#define REDIRECT_FAILED -1 /* For RAID-1 */
  8939. -
  8940.  struct real_dev
  8941.  {
  8942.    kdev_t dev;            /* Device number */
  8943. @@ -92,12 +77,6 @@
  8944.    int offset;            /* Real device offset (in blocks) in md dev
  8945.                     (only used in linear mode) */
  8946.    struct inode *inode;        /* Lock inode */
  8947. -  int fault_count;        /* Fault counter for invalidation */
  8948. -  int invalid;            /* Indicate if the device is disabled :
  8949. -                   VALID          - valid
  8950. -                   INVALID_NEXT   - disabled for next access
  8951. -                   INVALID_ALWAYS - permanently disabled
  8952. -                   (for redundancy modes only) */
  8953.  };
  8954.  
  8955.  struct md_dev;
  8956. @@ -117,15 +96,14 @@
  8957.  
  8958.  struct md_dev
  8959.  {
  8960. +  struct real_dev devices[MAX_REAL];
  8961.    struct md_personality *pers;
  8962.    int repartition;
  8963. -  int invalid_dev_count;
  8964.    int busy;
  8965.    int nb_dev;
  8966.    void *private;
  8967.  };
  8968.  
  8969. -extern struct real_dev devices[MAX_MD_DEV][MAX_REAL];
  8970.  extern struct md_dev md_dev[MAX_MD_DEV];
  8971.  extern int md_size[MAX_MD_DEV];
  8972.  
  8973. diff -u --recursive --new-file pre2.0.6/linux/include/linux/module.h linux/include/linux/module.h
  8974. --- pre2.0.6/linux/include/linux/module.h    Fri May 17 15:32:18 1996
  8975. +++ linux/include/linux/module.h    Tue May 21 12:00:30 1996
  8976. @@ -75,9 +75,6 @@
  8977.      void (*cleanup)(void);        /* cleanup routine */
  8978.  };
  8979.  
  8980. -/* insert new symbol table */
  8981. -extern int register_symtab(struct symbol_table *);
  8982. -
  8983.  /*
  8984.   * The first word of the module contains the use count.
  8985.   */
  8986. @@ -108,6 +105,14 @@
  8987.  #define MOD_DEC_USE_COUNT    do { } while (0)
  8988.  #define MOD_IN_USE        1
  8989.  
  8990. +#endif
  8991. +
  8992. +/* insert new symbol table */
  8993. +extern int register_symtab_from(struct symbol_table *, long *);
  8994. +#ifdef MODULE
  8995. +#define register_symtab(symtab) register_symtab_from(symtab, &mod_use_count_)
  8996. +#else
  8997. +#define register_symtab(symtab) register_symtab_from(symtab, 0)
  8998.  #endif
  8999.  
  9000.  #endif
  9001. diff -u --recursive --new-file pre2.0.6/linux/include/linux/skbuff.h linux/include/linux/skbuff.h
  9002. --- pre2.0.6/linux/include/linux/skbuff.h    Mon May 13 23:02:49 1996
  9003. +++ linux/include/linux/skbuff.h    Tue May 21 14:38:11 1996
  9004. @@ -111,6 +111,7 @@
  9005.      unsigned char    *tail;            /* Tail pointer                    */
  9006.      unsigned char     *end;            /* End pointer                    */
  9007.      void         (*destructor)(struct sk_buff *);    /* Destruct function        */
  9008. +    __u16        redirport;        /* Redirect port                */
  9009.  };
  9010.  
  9011.  #ifdef CONFIG_SKB_LARGE
  9012. diff -u --recursive --new-file pre2.0.6/linux/include/linux/socket.h linux/include/linux/socket.h
  9013. --- pre2.0.6/linux/include/linux/socket.h    Fri May 17 15:32:19 1996
  9014. +++ linux/include/linux/socket.h    Sun May 19 23:40:49 1996
  9015. @@ -86,6 +86,7 @@
  9016.  #define MSG_PEEK    2
  9017.  #define MSG_DONTROUTE    4
  9018.  /*#define MSG_CTRUNC    8    - We need to support this for BSD oddments */
  9019. +#define MSG_PROXY    16    /* Supply or ask second address. */
  9020.  
  9021.  /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
  9022.  #define SOL_IP        0
  9023. diff -u --recursive --new-file pre2.0.6/linux/include/linux/ufs_fs.h linux/include/linux/ufs_fs.h
  9024. --- pre2.0.6/linux/include/linux/ufs_fs.h    Sat Apr 27 15:20:07 1996
  9025. +++ linux/include/linux/ufs_fs.h    Tue May 21 07:04:40 1996
  9026. @@ -64,19 +64,19 @@
  9027.  /* XXX - this can be optimized if s_ipg is a power of 2. */
  9028.  #define ufs_ino2cg(inode)  ((inode)->i_ino/(inode)->i_sb->u.ufs_sb.s_ipg)
  9029.  
  9030. -#define    MAXNAMLEN 255
  9031. +#define    UFS_MAXNAMLEN 255
  9032.  
  9033. -struct direct {
  9034. +struct ufs_direct {
  9035.      __u32  d_ino;            /* inode number of this entry */
  9036.      __u16  d_reclen;        /* length of this entry */
  9037.      __u16  d_namlen;        /* actual length of d_name */
  9038. -    char   d_name[MAXNAMLEN + 1];    /* file name */
  9039. +    char   d_name[UFS_MAXNAMLEN + 1];    /* file name */
  9040.  };
  9041.  
  9042.  #define MAXMNTLEN 512
  9043.  #define MAXCSBUFS 32
  9044.  
  9045. -struct csum {
  9046. +struct ufs_csum {
  9047.      __u32    cs_ndir;    /* number of directories */
  9048.      __u32    cs_nbfree;    /* number of free blocks */
  9049.      __u32    cs_nifree;    /* number of free inodes */
  9050. @@ -138,14 +138,14 @@
  9051.      __u32    fs_cpg;
  9052.      __u32    fs_ipg;
  9053.      __u32    fs_fpg;
  9054. -    struct csum fs_cstotal;
  9055. +    struct ufs_csum fs_cstotal;
  9056.      __u8    fs_fmod;
  9057.      __u8    fs_clean;
  9058.      __u8    fs_ronly;
  9059.      __u8    fs_flags;
  9060.      __u8    fs_fsmnt[MAXMNTLEN];
  9061.      __u32    fs_cgrotor;
  9062. -    struct csum * fs_csp[MAXCSBUFS];
  9063. +    struct ufs_csum * fs_csp[MAXCSBUFS];
  9064.      __u32    fs_cpc;
  9065.      __u16    fs_opostbl[16][8];    /* old rotation block list head */
  9066.      __s32    fs_sparecon[55];    /* reserved for future constants */
  9067. diff -u --recursive --new-file pre2.0.6/linux/include/net/icmp.h linux/include/net/icmp.h
  9068. --- pre2.0.6/linux/include/net/icmp.h    Mon Mar 25 10:26:32 1996
  9069. +++ linux/include/net/icmp.h    Tue May 21 14:43:19 1996
  9070. @@ -37,4 +37,7 @@
  9071.                 unsigned long arg);
  9072.  extern void    icmp_init(struct proto_ops *ops);
  9073.  
  9074. +/* CONFIG_IP_TRANSPARENT_PROXY */
  9075. +extern int    icmp_chkaddr(struct sk_buff *skb);
  9076. +
  9077.  #endif    /* _ICMP_H */
  9078. diff -u --recursive --new-file pre2.0.6/linux/include/net/sock.h linux/include/net/sock.h
  9079. --- pre2.0.6/linux/include/net/sock.h    Mon May 20 08:21:04 1996
  9080. +++ linux/include/net/sock.h    Tue May 21 14:40:09 1996
  9081. @@ -451,7 +451,8 @@
  9082.  extern void            put_sock(unsigned short, struct sock *); 
  9083.  extern struct sock        *get_sock(struct proto *, unsigned short,
  9084.                        unsigned long, unsigned short,
  9085. -                      unsigned long);
  9086. +                      unsigned long,
  9087. +                      unsigned long, unsigned short);
  9088.  extern struct sock        *get_sock_mcast(struct sock *, unsigned short,
  9089.                        unsigned long, unsigned short,
  9090.                        unsigned long);
  9091. diff -u --recursive --new-file pre2.0.6/linux/include/net/tcp.h linux/include/net/tcp.h
  9092. --- pre2.0.6/linux/include/net/tcp.h    Fri May 17 15:32:19 1996
  9093. +++ linux/include/net/tcp.h    Tue May 21 14:43:19 1996
  9094. @@ -165,6 +165,9 @@
  9095.  /* tcp_input.c */
  9096.  extern void tcp_cache_zap(void);
  9097.  
  9098. +/* CONFIG_IP_TRANSPARENT_PROXY */
  9099. +extern int tcp_chkaddr(struct sk_buff *);
  9100. +
  9101.  /* tcp_timer.c */
  9102.  #define     tcp_reset_msl_timer(x,y,z)    reset_timer(x,y,z)
  9103.  extern void tcp_reset_xmit_timer(struct sock *, int, unsigned long);
  9104. diff -u --recursive --new-file pre2.0.6/linux/include/net/udp.h linux/include/net/udp.h
  9105. --- pre2.0.6/linux/include/net/udp.h    Mon Sep 11 20:15:53 1995
  9106. +++ linux/include/net/udp.h    Mon May 20 08:32:19 1996
  9107. @@ -49,4 +49,7 @@
  9108.  extern int    udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
  9109.  extern void    udp_cache_zap(void);    /* Remove udp last socket cache */
  9110.  
  9111. +/* CONFIG_IP_TRANSPARENT_PROXY */
  9112. +extern int    udp_chkaddr(struct sk_buff *skb);
  9113. +
  9114.  #endif    /* _UDP_H */
  9115. diff -u --recursive --new-file pre2.0.6/linux/init/main.c linux/init/main.c
  9116. --- pre2.0.6/linux/init/main.c    Fri May 17 15:32:19 1996
  9117. +++ linux/init/main.c    Mon May 20 20:33:57 1996
  9118. @@ -5,6 +5,7 @@
  9119.   *
  9120.   *  GK 2/5/95  -  Changed to support mounting root fs via NFS
  9121.   *  Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96
  9122. + *  Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96
  9123.   */
  9124.  
  9125.  #define __KERNEL_SYSCALLS__
  9126. @@ -37,6 +38,16 @@
  9127.  #endif
  9128.  
  9129.  #include <asm/bugs.h>
  9130. +
  9131. +/*
  9132. + * Versions of gcc older than that listed below may actually compile
  9133. + * and link okay, but the end product can have subtle run time bugs.
  9134. + * To avoid associated bogus bug reports, we flatly refuse to compile
  9135. + * with a gcc that is known to be too old from the very beginning.
  9136. + */
  9137. +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
  9138. +#error sorry, your GCC is too old. It builds incorrect kernels.
  9139. +#endif
  9140.  
  9141.  extern char _stext, _etext;
  9142.  extern char *linux_banner;
  9143. diff -u --recursive --new-file pre2.0.6/linux/kernel/ksyms.c linux/kernel/ksyms.c
  9144. --- pre2.0.6/linux/kernel/ksyms.c    Mon May 13 23:02:50 1996
  9145. +++ linux/kernel/ksyms.c    Tue May 21 12:00:30 1996
  9146. @@ -84,7 +84,7 @@
  9147.  #endif
  9148.  
  9149.      /* stackable module support */
  9150. -    X(register_symtab),
  9151. +    X(register_symtab_from),
  9152.  #ifdef CONFIG_KERNELD
  9153.      X(kerneld_send),
  9154.  #endif
  9155. @@ -198,6 +198,9 @@
  9156.      X(get_blkfops),
  9157.      X(blkdev_open),
  9158.      X(blkdev_release),
  9159. +    X(gendisk_head),
  9160. +    X(resetup_one_dev),
  9161. +
  9162.  #ifdef CONFIG_SERIAL    
  9163.      /* Module creation of serial units */
  9164.      X(register_serial),
  9165. @@ -310,17 +313,6 @@
  9166.      /* Miscellaneous access points */
  9167.      X(si_meminfo),
  9168.  
  9169. -#ifndef CONFIG_SCSI
  9170. -    /*
  9171. -     * With no scsi configured, we still need to export a few
  9172. -     * symbols so that scsi can be loaded later via insmod.
  9173. -     * Don't remove this unless you are 100% sure of what you are
  9174. -     * doing.  If you want to remove this, you don't know what
  9175. -     * you are doing!
  9176. -     */
  9177. -    X(gendisk_head),
  9178. -    X(resetup_one_dev),
  9179. -#endif
  9180.      /* Added to make file system as module */
  9181.      X(set_writetime),
  9182.      X(sys_tz),
  9183. diff -u --recursive --new-file pre2.0.6/linux/kernel/module.c linux/kernel/module.c
  9184. --- pre2.0.6/linux/kernel/module.c    Mon May 20 08:21:04 1996
  9185. +++ linux/kernel/module.c    Tue May 21 12:00:30 1996
  9186. @@ -149,14 +149,6 @@
  9187.          symtab = NULL;
  9188.      }
  9189.  #endif
  9190. -
  9191. -    /*
  9192. -     * First reclaim any memory from dead modules that where not
  9193. -     * freed when deleted. Should I think be done by timers when
  9194. -     * the module was deleted - Jon.
  9195. -     */
  9196. -    free_modules();
  9197. -
  9198.      if ((error = get_mod_name(module_name, name)) != 0)
  9199.          return error;
  9200.      pr_debug("initializing module `%s', %d (0x%x) bytes\n",
  9201. @@ -291,7 +283,9 @@
  9202.      }
  9203.      /* for automatic reaping */
  9204.      else {
  9205. -        for (mp = module_list; mp != &kernel_module; mp = mp->next) {
  9206. +        struct module *mp_next;
  9207. +        for (mp = module_list; mp != &kernel_module; mp = mp_next) {
  9208. +            mp_next = mp->next;
  9209.              if ((mp->ref == NULL) && (mp->state == MOD_RUNNING) &&
  9210.                  ((GET_USE_COUNT(mp) & ~MOD_VISITED) == MOD_AUTOCLEAN)) {
  9211.                      if ((GET_USE_COUNT(mp) & MOD_VISITED)) {
  9212. @@ -302,10 +296,10 @@
  9213.                      GET_USE_COUNT(mp) &= ~(MOD_AUTOCLEAN | MOD_VISITED);
  9214.                      (*mp->cleanup)();
  9215.                      mp->state = MOD_DELETED;
  9216. +                    free_modules();
  9217.                  }
  9218.              }
  9219.          }
  9220. -        free_modules();
  9221.      }
  9222.      return 0;
  9223.  }
  9224. @@ -525,8 +519,8 @@
  9225.          while (*q)
  9226.              *p++ = *q++;
  9227.  
  9228. +        *p++ = '\t';
  9229.          if ((ref = mp->ref) != NULL) {
  9230. -            *p++ = '\t';
  9231.              *p++ = '[';
  9232.              for (; ref; ref = ref->next) {
  9233.                  q = ref->module->name;
  9234. @@ -627,7 +621,7 @@
  9235.  static struct symbol_table nulltab;
  9236.  
  9237.  int
  9238. -register_symtab(struct symbol_table *intab)
  9239. +register_symtab_from(struct symbol_table *intab, long *from)
  9240.  {
  9241.      struct module *mp;
  9242.      struct module *link;
  9243. @@ -644,13 +638,12 @@
  9244.              intab->n_symbols +=1;
  9245.      }
  9246.  
  9247. -    for (mp = module_list; intab && mp != &kernel_module; mp = mp->next) {
  9248. +    for (mp = module_list; mp != &kernel_module; mp = mp->next) {
  9249.          /*
  9250. -         * New table stored within memory belonging to a module?
  9251. -         * (Always true for a module)
  9252. +         * "from" points to "mod_use_count_" (== start of module)
  9253. +         * or is == 0 if called from a non-module
  9254.           */
  9255. -        if (((unsigned long)(mp->addr) < (unsigned long)intab) &&
  9256. -            ((unsigned long)intab < ((unsigned long)(mp->addr) + mp->size * PAGE_SIZE)))
  9257. +        if ((unsigned long)(mp->addr) == (unsigned long)from)
  9258.              break;
  9259.      }
  9260.  
  9261. @@ -782,7 +775,7 @@
  9262.      return -ENOSYS;
  9263.  }
  9264.  
  9265. -int register_symtab(struct symbol_table *intab)
  9266. +int register_symtab_from(struct symbol_table *intab, long *from)
  9267.  {
  9268.      return 0;
  9269.  }
  9270. diff -u --recursive --new-file pre2.0.6/linux/mm/filemap.c linux/mm/filemap.c
  9271. --- pre2.0.6/linux/mm/filemap.c    Fri May 17 15:32:19 1996
  9272. +++ linux/mm/filemap.c    Sun May 19 23:37:07 1996
  9273. @@ -745,7 +745,7 @@
  9274.      if (page)
  9275.          goto found_page;
  9276.      if (!new_page)
  9277. -        return 0;
  9278. +        goto failure;
  9279.      page = mem_map + MAP_NR(new_page);
  9280.      new_page = 0;
  9281.      add_to_page_cache(page, inode, offset);
  9282. @@ -757,7 +757,20 @@
  9283.          free_page(new_page);
  9284.  found_page_dont_free:
  9285.      wait_on_page(page);
  9286. -    return page_address(page);
  9287. +    if (PageUptodate(page)) {
  9288. +success:    
  9289. +        return page_address(page);
  9290. +    }
  9291. +    /* If not marked as error, try _once_ to read it again */
  9292. +    if (!PageError(page)) {
  9293. +        inode->i_op->readpage(inode, page);
  9294. +        wait_on_page(page);
  9295. +        if (PageUptodate(page))
  9296. +            goto success;
  9297. +    }
  9298. +    page->count--;
  9299. +failure:
  9300. +    return 0;
  9301.  }
  9302.  
  9303.  /*
  9304. diff -u --recursive --new-file pre2.0.6/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
  9305. --- pre2.0.6/linux/net/appletalk/ddp.c    Wed May 15 11:01:15 1996
  9306. +++ linux/net/appletalk/ddp.c    Sun May 19 23:40:50 1996
  9307. @@ -1451,7 +1451,7 @@
  9308.  
  9309.  #ifdef CONFIG_FIREWALL
  9310.      
  9311. -    if(call_in_firewall(AF_APPLETALK, skb->dev, ddp)!=FW_ACCEPT)
  9312. +    if(call_in_firewall(AF_APPLETALK, skb->dev, ddp, NULL)!=FW_ACCEPT)
  9313.      {
  9314.          kfree_skb(skb, FREE_READ);
  9315.          return 0;
  9316. @@ -1485,7 +1485,7 @@
  9317.           *    Check firewall allows this routing
  9318.           */
  9319.          
  9320. -        if(call_fw_firewall(AF_APPLETALK, skb->dev, ddp)!=FW_ACCEPT)
  9321. +        if(call_fw_firewall(AF_APPLETALK, skb->dev, ddp, NULL)!=FW_ACCEPT)
  9322.          {
  9323.              kfree_skb(skb, FREE_READ);
  9324.              return(0);
  9325. @@ -1746,7 +1746,7 @@
  9326.          
  9327.  #ifdef CONFIG_FIREWALL
  9328.  
  9329. -    if(call_out_firewall(AF_APPLETALK, skb->dev, ddp)!=FW_ACCEPT)
  9330. +    if(call_out_firewall(AF_APPLETALK, skb->dev, ddp, NULL)!=FW_ACCEPT)
  9331.      {
  9332.          kfree_skb(skb, FREE_WRITE);
  9333.          return -EPERM;
  9334. diff -u --recursive --new-file pre2.0.6/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
  9335. --- pre2.0.6/linux/net/ax25/af_ax25.c    Fri May 17 15:32:20 1996
  9336. +++ linux/net/ax25/af_ax25.c    Sun May 19 23:40:50 1996
  9337. @@ -1599,7 +1599,7 @@
  9338.      skb->h.raw = skb->data;
  9339.      
  9340.  #ifdef CONFIG_FIREWALL
  9341. -    if (call_in_firewall(PF_AX25, skb->dev, skb->h.raw) != FW_ACCEPT) {
  9342. +    if (call_in_firewall(PF_AX25, skb->dev, skb->h.raw, NULL) != FW_ACCEPT) {
  9343.          kfree_skb(skb, FREE_READ);
  9344.          return 0;
  9345.      }
  9346. @@ -1657,7 +1657,7 @@
  9347.  
  9348.              build_ax25_addr(skb->data, &src, &dest, &dp, type, MODULUS);
  9349.  #ifdef CONFIG_FIREWALL
  9350. -            if (call_fw_firewall(PF_AX25, skb->dev, skb->data) != FW_ACCEPT) {
  9351. +            if (call_fw_firewall(PF_AX25, skb->dev, skb->data, NULL) != FW_ACCEPT) {
  9352.                  kfree_skb(skb, FREE_READ);
  9353.                  return 0;
  9354.              }
  9355. @@ -2439,7 +2439,7 @@
  9356.      unsigned char *ptr;
  9357.      
  9358.  #ifdef CONFIG_FIREWALL
  9359. -    if (call_out_firewall(PF_AX25, skb->dev, skb->data) != FW_ACCEPT) {
  9360. +    if (call_out_firewall(PF_AX25, skb->dev, skb->data, NULL) != FW_ACCEPT) {
  9361.          dev_kfree_skb(skb, FREE_WRITE);
  9362.          return;
  9363.      }
  9364. diff -u --recursive --new-file pre2.0.6/linux/net/core/firewall.c linux/net/core/firewall.c
  9365. --- pre2.0.6/linux/net/core/firewall.c    Wed Apr 10 17:02:27 1996
  9366. +++ linux/net/core/firewall.c    Sun May 19 23:40:50 1996
  9367. @@ -99,13 +99,13 @@
  9368.      return -ENOENT;
  9369.  }
  9370.  
  9371. -int call_fw_firewall(int pf, struct device *dev, void *phdr)
  9372. +int call_fw_firewall(int pf, struct device *dev, void *phdr, void *arg)
  9373.  {
  9374.      struct firewall_ops *fw=firewall_chain[pf];
  9375.      
  9376.      while(fw!=NULL)
  9377.      {
  9378. -        int rc=fw->fw_forward(fw,pf,dev,phdr);
  9379. +        int rc=fw->fw_forward(fw,pf,dev,phdr,arg);
  9380.          if(rc!=FW_SKIP)
  9381.              return rc;
  9382.          fw=fw->next;
  9383. @@ -117,13 +117,13 @@
  9384.   *    Actual invocation of the chains
  9385.   */
  9386.   
  9387. -int call_in_firewall(int pf, struct device *dev, void *phdr)
  9388. +int call_in_firewall(int pf, struct device *dev, void *phdr, void *arg)
  9389.  {
  9390.      struct firewall_ops *fw=firewall_chain[pf];
  9391.      
  9392.      while(fw!=NULL)
  9393.      {
  9394. -        int rc=fw->fw_input(fw,pf,dev,phdr);
  9395. +        int rc=fw->fw_input(fw,pf,dev,phdr,arg);
  9396.          if(rc!=FW_SKIP)
  9397.              return rc;
  9398.          fw=fw->next;
  9399. @@ -131,13 +131,13 @@
  9400.      return firewall_policy[pf];
  9401.  }
  9402.  
  9403. -int call_out_firewall(int pf, struct device *dev, void *phdr)
  9404. +int call_out_firewall(int pf, struct device *dev, void *phdr, void *arg)
  9405.  {
  9406.      struct firewall_ops *fw=firewall_chain[pf];
  9407.      
  9408.      while(fw!=NULL)
  9409.      {
  9410. -        int rc=fw->fw_output(fw,pf,dev,phdr);
  9411. +        int rc=fw->fw_output(fw,pf,dev,phdr,arg);
  9412.          if(rc!=FW_SKIP)
  9413.              return rc;
  9414.          fw=fw->next;
  9415. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/Config.in linux/net/ipv4/Config.in
  9416. --- pre2.0.6/linux/net/ipv4/Config.in    Fri May 17 15:32:20 1996
  9417. +++ linux/net/ipv4/Config.in    Sun May 19 23:40:50 1996
  9418. @@ -5,17 +5,19 @@
  9419.  bool 'IP: multicasting' CONFIG_IP_MULTICAST
  9420.  if [ "$CONFIG_FIREWALL" = "y" ]; then
  9421.    bool 'IP: firewalling' CONFIG_IP_FIREWALL
  9422. -fi
  9423. -bool 'IP: accounting' CONFIG_IP_ACCT
  9424. -if [ "$CONFIG_IP_FORWARD" = "y" ]; then
  9425. -  bool 'IP: optimize as router not host' CONFIG_IP_ROUTER
  9426. -  tristate 'IP: tunneling' CONFIG_NET_IPIP
  9427.    if [ "$CONFIG_IP_FIREWALL" = "y" ]; then
  9428.      bool 'IP: firewall packet logging' CONFIG_IP_FIREWALL_VERBOSE
  9429.      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  9430.        bool 'IP: masquerading (ALPHA)' CONFIG_IP_MASQUERADE
  9431. +      bool 'IP: transparent proxy support (ALPHA)' CONFIG_IP_TRANSPARENT_PROXY
  9432.      fi
  9433. +    bool 'IP: always defragment' CONFIG_IP_ALWAYS_DEFRAG
  9434.    fi
  9435. +fi
  9436. +bool 'IP: accounting' CONFIG_IP_ACCT
  9437. +if [ "$CONFIG_IP_FORWARD" = "y" ]; then
  9438. +  bool 'IP: optimize as router not host' CONFIG_IP_ROUTER
  9439. +  tristate 'IP: tunneling' CONFIG_NET_IPIP
  9440.    if [ "$CONFIG_IP_MULTICAST" = "y" ]; then
  9441.        if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  9442.          bool 'IP: multicast routing (EXPERIMENTAL)' CONFIG_IP_MROUTE
  9443. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
  9444. --- pre2.0.6/linux/net/ipv4/af_inet.c    Wed May 15 11:01:15 1996
  9445. +++ linux/net/ipv4/af_inet.c    Mon May 20 08:08:36 1996
  9446. @@ -49,6 +49,7 @@
  9447.   *        Alan Cox    :    Locked down bind (see security list).
  9448.   *        Alan Cox    :    Loosened bind a little.
  9449.   *        Mike McLagan    :    ADD/DEL DLCI Ioctls
  9450. + *    Willy Konynenberg    :    Transparent proxying support.
  9451.   *
  9452.   *        This program is free software; you can redistribute it and/or
  9453.   *        modify it under the terms of the GNU General Public License
  9454. @@ -160,10 +161,10 @@
  9455.      struct sock *sk;
  9456.  
  9457.      if (base == 0) 
  9458. -        base = PROT_SOCK+1+(start % 1024);
  9459. +        base = PROT_SOCK+1+(start & 1023);
  9460.      if (base <= PROT_SOCK) 
  9461.      {
  9462. -        base += PROT_SOCK+(start % 1024);
  9463. +        base += PROT_SOCK+(start & 1023);
  9464.      }
  9465.  
  9466.      /*
  9467. @@ -181,7 +182,7 @@
  9468.          }
  9469.          if (j == 0) 
  9470.          {
  9471. -            start =(i+1+start )%1024;
  9472. +            start =(i+1+start )&1023;
  9473.              return(i+base+1);
  9474.          }
  9475.          if (j < size) 
  9476. @@ -841,11 +842,25 @@
  9477.      }
  9478.      
  9479.      chk_addr_ret = ip_chk_addr(addr->sin_addr.s_addr);
  9480. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9481. +    /*
  9482. +     * Superuser may bind to any address to allow transparent proxying.
  9483. +     */
  9484. +    if (addr->sin_addr.s_addr != 0 && chk_addr_ret != IS_MYADDR && chk_addr_ret != IS_MULTICAST && chk_addr_ret != IS_BROADCAST && !suser())
  9485. +#else
  9486.      if (addr->sin_addr.s_addr != 0 && chk_addr_ret != IS_MYADDR && chk_addr_ret != IS_MULTICAST && chk_addr_ret != IS_BROADCAST)
  9487. +#endif
  9488.          return(-EADDRNOTAVAIL);    /* Source address MUST be ours! */
  9489.  
  9490. +#ifndef CONFIG_IP_TRANSPARENT_PROXY
  9491. +    /*
  9492. +     * Am I just thick or is this test really always true after the one
  9493. +     * above?  Just taking the test out appears to be the easiest way to
  9494. +     * make binds to remote addresses for transparent proxying work.
  9495. +     */
  9496.      if (chk_addr_ret || addr->sin_addr.s_addr == 0)
  9497.      {
  9498. +#endif
  9499.          /*
  9500.           *      We keep a pair of addresses. rcv_saddr is the one
  9501.           *      used by get_sock_*(), and saddr is used for transmit.
  9502. @@ -859,7 +874,9 @@
  9503.              sk->saddr = 0;  /* Use device */
  9504.          else
  9505.              sk->saddr = addr->sin_addr.s_addr;
  9506. +#ifndef CONFIG_IP_TRANSPARENT_PROXY
  9507.      }
  9508. +#endif
  9509.      if(sock->type != SOCK_RAW)
  9510.      {
  9511.          /* Make sure we are allowed to bind here. */
  9512. @@ -1332,6 +1349,36 @@
  9513.      return(0);
  9514.  }
  9515.  
  9516. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9517. +/*
  9518. + * Some routines for the for loop in get_sock which sometimes needs to walk
  9519. + * two linked lists in sequence.  Could use macros as well.
  9520. + * Does anyone know a nicer way to code this?
  9521. + */
  9522. +static __inline__ struct sock *secondlist(unsigned short hpnum, struct sock *s,
  9523. +                int *pfirstpass, struct proto *prot)
  9524. +{
  9525. +    if (hpnum && s == NULL && (*pfirstpass)-- )
  9526. +        return prot->sock_array[hpnum & (SOCK_ARRAY_SIZE - 1)];
  9527. +    else
  9528. +        return s;
  9529. +}
  9530. +static __inline__ struct sock *get_sock_loop_init(unsigned short hnum,
  9531. +            unsigned short hpnum, struct sock *s,
  9532. +            int *pfirstpass, struct proto *prot)
  9533. +{
  9534. +    s = prot->sock_array[hnum & (SOCK_ARRAY_SIZE - 1)];
  9535. +    return secondlist(hpnum, s, pfirstpass, prot);
  9536. +}
  9537. +static __inline__ struct sock *get_sock_loop_next(unsigned short hnum,
  9538. +            unsigned short hpnum, struct sock *s,
  9539. +            int *pfirstpass, struct proto *prot)
  9540. +{
  9541. +    s = s->next;
  9542. +    return secondlist(hpnum, s, pfirstpass, prot);
  9543. +}
  9544. +#endif
  9545. +
  9546.  /*
  9547.   * This routine must find a socket given a TCP or UDP header.
  9548.   * Everything is assumed to be in net order.
  9549. @@ -1343,14 +1390,22 @@
  9550.  
  9551.  struct sock *get_sock(struct proto *prot, unsigned short num,
  9552.                  unsigned long raddr,
  9553. -                unsigned short rnum, unsigned long laddr)
  9554. +                unsigned short rnum, unsigned long laddr,
  9555. +                unsigned long paddr, unsigned short pnum)
  9556.  {
  9557. -    struct sock *s;
  9558. +    struct sock *s = 0;
  9559.      struct sock *result = NULL;
  9560.      int badness = -1;
  9561.      unsigned short hnum;
  9562. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9563. +    unsigned short hpnum;
  9564. +    int firstpass = 1;
  9565. +#endif 
  9566.  
  9567.      hnum = ntohs(num);
  9568. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9569. +    hpnum = ntohs(pnum);
  9570. +#endif 
  9571.  
  9572.      /*
  9573.       * SOCK_ARRAY_SIZE must be a power of two.  This will work better
  9574. @@ -1361,19 +1416,43 @@
  9575.       * socket number when we choose an arbitrary one.
  9576.       */
  9577.  
  9578. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9579. +    for(s = get_sock_loop_init(hnum, hpnum, s, &firstpass, prot);
  9580. +        s != NULL;
  9581. +        s = get_sock_loop_next(hnum, hpnum, s, &firstpass, prot))
  9582. +#else
  9583.      for(s = prot->sock_array[hnum & (SOCK_ARRAY_SIZE - 1)];
  9584.              s != NULL; s = s->next) 
  9585. +#endif
  9586.      {
  9587.          int score = 0;
  9588.  
  9589. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9590. +        /* accept the addressed port or the redirect (proxy) port */
  9591. +        if (s->num != hnum && (hpnum == 0 || s->num != hpnum))
  9592. +#else
  9593.          if (s->num != hnum) 
  9594. +#endif
  9595.              continue;
  9596.  
  9597.          if(s->dead && (s->state == TCP_CLOSE))
  9598.              continue;
  9599.          /* local address matches? */
  9600.          if (s->rcv_saddr) {
  9601. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9602. +            /*
  9603. +             * If this is redirected traffic, it must either
  9604. +             * match on the redirected port/ip-address or on
  9605. +             * the actual destination, not on a mixture.
  9606. +             * There must be a simpler way to express this...
  9607. +             */
  9608. +            if (hpnum
  9609. +                ? ((s->num != hpnum || s->rcv_saddr != paddr)
  9610. +                  && (s->num != hnum || s->rcv_saddr != laddr))
  9611. +                : (s->rcv_saddr != laddr))
  9612. +#else
  9613.              if (s->rcv_saddr != laddr)
  9614. +#endif
  9615.                  continue;
  9616.              score++;
  9617.          }
  9618. @@ -1390,11 +1469,23 @@
  9619.              score++;
  9620.          }
  9621.          /* perfect match? */
  9622. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9623. +        if (score == 3 && s->num == hnum)
  9624. +#else
  9625.          if (score == 3)
  9626. +#endif
  9627.              return s;
  9628.          /* no, check if this is the best so far.. */
  9629.          if (score <= badness)
  9630.              continue;
  9631. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9632. +        /* don't accept near matches on the actual destination
  9633. +         * port with IN_ADDR_ANY for redirected traffic, but do
  9634. +         * allow explicit remote address listens.  (disputable)
  9635. +         */
  9636. +        if (hpnum && s->num != hpnum && !s->rcv_saddr)
  9637. +            continue;
  9638. +#endif
  9639.          result = s;
  9640.          badness = score;
  9641.        }
  9642. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/arp.c linux/net/ipv4/arp.c
  9643. --- pre2.0.6/linux/net/ipv4/arp.c    Mon May 13 23:02:52 1996
  9644. +++ linux/net/ipv4/arp.c    Mon May 20 08:24:24 1996
  9645. @@ -262,7 +262,7 @@
  9646.  static void arp_run_bh(void);
  9647.  static void arp_check_expire (unsigned long);  
  9648.  static int  arp_update (u32 sip, char *sha, struct device * dev,
  9649. -        struct arp_table *ientry, int grat);
  9650. +        unsigned long updated, struct arp_table *ientry, int grat);
  9651.  
  9652.  static struct timer_list arp_timer =
  9653.      { NULL, NULL, ARP_CHECK_INTERVAL, 0L, &arp_check_expire };
  9654. @@ -680,17 +680,8 @@
  9655.      else
  9656.      {
  9657.          arp_fast_lock();
  9658. -        arp_update(retreq->ip, retreq->ha, dev, NULL, 0);
  9659. +        arp_update(retreq->ip, retreq->ha, dev, retreq->updated, NULL, 0);
  9660.          arp_unlock();
  9661. -
  9662. -/*
  9663. - *    Old mapping: we cannot trust it, send ARP broadcast to confirm it.
  9664. - *    If it will answer, the entry will be updated,
  9665. - *    if not ... we are lost. We will use it for ARP_CONFIRM_INTERVAL.
  9666. - */
  9667. -        if (jiffies - retreq->updated < ARPD_TIMEOUT)
  9668. -            arp_send(ARPOP_REQUEST, ETH_P_ARP, retreq->ip, dev, dev->pa_addr, NULL, 
  9669. -                 dev->dev_addr, NULL);
  9670.      }
  9671.  
  9672.      kfree_skb(skb, FREE_READ);
  9673. @@ -1137,10 +1128,17 @@
  9674.  
  9675.  static int
  9676.  arp_update (u32 sip, char *sha, struct device * dev,
  9677. -        struct arp_table *ientry, int grat)
  9678. +        unsigned long updated, struct arp_table *ientry, int grat)
  9679.  {
  9680.      struct arp_table * entry;
  9681.      unsigned long hash;
  9682. +    int do_arpd = 0;
  9683. +
  9684. +    if (updated == 0)
  9685. +    {
  9686. +        updated = jiffies;
  9687. +        do_arpd = 1;
  9688. +    }
  9689.  
  9690.      hash = HASH(sip);
  9691.  
  9692. @@ -1156,14 +1154,15 @@
  9693.          if (!(entry->flags & ATF_PERM)) 
  9694.          {
  9695.              del_timer(&entry->timer);
  9696. -            entry->last_updated = jiffies;
  9697. +            entry->last_updated = updated;
  9698.              if (memcmp(entry->ha, sha, dev->addr_len)!=0)
  9699.              {
  9700.                  memcpy(entry->ha, sha, dev->addr_len);
  9701.                  if (entry->flags & ATF_COM)
  9702.                      arp_update_hhs(entry);
  9703.              }
  9704. -            arpd_update(entry);
  9705. +            if (do_arpd)
  9706. +                arpd_update(entry);
  9707.          }
  9708.  
  9709.          if (!(entry->flags & ATF_COM))
  9710. @@ -1204,8 +1203,10 @@
  9711.          entry->dev = dev;
  9712.      }
  9713.  
  9714. -    entry->last_updated = entry->last_used = jiffies;
  9715. -    arpd_update(entry);
  9716. +    entry->last_updated = updated;
  9717. +    entry->last_used = jiffies;
  9718. +    if (do_arpd)
  9719. +        arpd_update(entry);
  9720.  
  9721.      if (!ARP_LOCKED())
  9722.      {
  9723. @@ -1548,7 +1549,7 @@
  9724.          while ((entry = arp_dequeue(&arp_backlog)) != NULL)
  9725.          {
  9726.              restore_flags(flags);
  9727. -            if (arp_update(entry->ip, entry->ha, entry->dev, entry, 0))
  9728. +            if (arp_update(entry->ip, entry->ha, entry->dev, 0, entry, 0))
  9729.                  arp_free_entry(entry);
  9730.              cli();
  9731.          }
  9732. @@ -1919,14 +1920,14 @@
  9733.   *    Handle gratuitous arp.
  9734.   */
  9735.          arp_fast_lock();
  9736. -        arp_update(sip, sha, dev, NULL, 1);
  9737. +        arp_update(sip, sha, dev, 0, NULL, 1);
  9738.          arp_unlock();
  9739.          kfree_skb(skb, FREE_READ);
  9740.          return 0;
  9741.      }
  9742.  
  9743.      arp_fast_lock();
  9744. -    arp_update(sip, sha, dev, NULL, ip_chk_addr(tip) != IS_MYADDR);
  9745. +    arp_update(sip, sha, dev, 0, NULL, ip_chk_addr(tip) != IS_MYADDR);
  9746.      arp_unlock();
  9747.      kfree_skb(skb, FREE_READ);
  9748.      return 0;
  9749. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/icmp.c linux/net/ipv4/icmp.c
  9750. --- pre2.0.6/linux/net/ipv4/icmp.c    Fri May 17 15:32:20 1996
  9751. +++ linux/net/ipv4/icmp.c    Mon May 20 08:52:58 1996
  9752. @@ -26,6 +26,7 @@
  9753.   *        Martin Mares    :    TOS and Precedence set correctly (RFC 1812).
  9754.   *        Martin Mares    :    Now copying as much data from the original packet
  9755.   *                    as we can without exceeding 576 bytes (RFC 1812).
  9756. + *    Willy Konynenberg    :    Transparent proxying support.
  9757.   *
  9758.   *
  9759.   *
  9760. @@ -232,6 +233,7 @@
  9761.  #include <net/protocol.h>
  9762.  #include <net/icmp.h>
  9763.  #include <net/tcp.h>
  9764. +#include <net/udp.h>
  9765.  #include <net/snmp.h>
  9766.  #include <linux/skbuff.h>
  9767.  #include <net/sock.h>
  9768. @@ -768,9 +770,9 @@
  9769.       */
  9770.  
  9771.  #if defined(CONFIG_IP_FORWARD) && !defined(CONFIG_IP_DUMB_ROUTER)
  9772. -    printk(KERN_INFO "icmp: ICMP redirect ignored. dest = %s, "
  9773. -           "orig gw = %s, \"new\" gw = %s, device = %s.\n", in_ntoa(ip),
  9774. -        in_ntoa(source), in_ntoa(icmph->un.gateway), dev->name);
  9775. +    NETDEBUG(printk(KERN_INFO "icmp: ICMP redirect ignored. dest = %lX, "
  9776. +           "orig gw = %lX, \"new\" gw = %lX, device = %s.\n", ntohl(ip),
  9777. +        ntohl(source), ntohl(icmph->un.gateway), dev->name));
  9778.  #else    
  9779.      switch(icmph->code & 7) 
  9780.      {
  9781. @@ -919,6 +921,63 @@
  9782.      kfree_skb(skb, FREE_READ);
  9783.  }
  9784.  
  9785. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9786. +/*
  9787. + *    Check incoming icmp packets not addressed locally, to check whether
  9788. + *    they relate to a (proxying) socket on our system.
  9789. + *    Needed for transparent proxying.
  9790. + *
  9791. + *    This code is presently ugly and needs cleanup.
  9792. + *    Probably should add a chkaddr entry to ipprot to call a chk routine
  9793. + *    in udp.c or tcp.c...
  9794. + */
  9795. +
  9796. +int icmp_chkaddr(struct sk_buff *skb)
  9797. +{
  9798. +    struct icmphdr *icmph=(struct icmphdr *)(skb->h.raw + skb->h.iph->ihl*4);
  9799. +    struct iphdr *iph = (struct iphdr *) (icmph + 1);
  9800. +    void (*handler)(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr, int len) = icmp_pointers[icmph->type].handler;
  9801. +
  9802. +    if (handler == icmp_unreach || handler == icmp_redirect) {
  9803. +        struct sock *sk;
  9804. +
  9805. +        switch (iph->protocol) {
  9806. +        case IPPROTO_TCP:
  9807. +            {
  9808. +            struct tcphdr *th = (struct tcphdr *)(((unsigned char *)iph)+(iph->ihl<<2));
  9809. +
  9810. +            sk = get_sock(&tcp_prot, th->source, iph->daddr,
  9811. +                        th->dest, iph->saddr, 0, 0);
  9812. +            if (!sk) return 0;
  9813. +            if (sk->saddr != iph->saddr) return 0;
  9814. +            if (sk->daddr != iph->daddr) return 0;
  9815. +            if (sk->dummy_th.dest != th->dest) return 0;
  9816. +            /*
  9817. +             * This packet came from us.
  9818. +             */
  9819. +            return 1;
  9820. +            }
  9821. +        case IPPROTO_UDP:
  9822. +            {
  9823. +            struct udphdr *uh = (struct udphdr *)(((unsigned char *)iph)+(iph->ihl<<2));
  9824. +
  9825. +            sk = get_sock(&udp_prot, uh->source, iph->daddr,
  9826. +                        uh->dest, iph->saddr, 0, 0);
  9827. +            if (!sk) return 0;
  9828. +            if (sk->saddr != iph->saddr && ip_chk_addr(iph->saddr) != IS_MYADDR)
  9829. +                return 0;
  9830. +            /*
  9831. +             * This packet may have come from us.
  9832. +             * Assume it did.
  9833. +             */
  9834. +            return 1;
  9835. +            }
  9836. +        }
  9837. +    }
  9838. +    return 0;
  9839. +}
  9840. +
  9841. +#endif
  9842.  /* 
  9843.   *    Deal with incoming ICMP packets. 
  9844.   */
  9845. @@ -928,6 +987,9 @@
  9846.       __u32 saddr, int redo, struct inet_protocol *protocol)
  9847.  {
  9848.      struct icmphdr *icmph=(void *)skb->h.raw;
  9849. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9850. +    int r;
  9851. +#endif
  9852.      icmp_statistics.IcmpInMsgs++;
  9853.      
  9854.        /*
  9855. @@ -960,7 +1022,16 @@
  9856.       *    Parse the ICMP message 
  9857.       */
  9858.  
  9859. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  9860. +    /*
  9861. +     *    We may get non-local addresses and still want to handle them
  9862. +     *    locally, due to transparent proxying.
  9863. +     *    Thus, narrow down the test to what is really meant.
  9864. +     */
  9865. +    if (daddr!=dev->pa_addr && ((r = ip_chk_addr(daddr)) == IS_BROADCAST || r == IS_MULTICAST))
  9866. +#else
  9867.      if (daddr!=dev->pa_addr && ip_chk_addr(daddr) != IS_MYADDR)
  9868. +#endif
  9869.      {
  9870.          /*
  9871.           *    RFC 1122: 3.2.2.6 An ICMP_ECHO to broadcast MAY be silently ignored (we don't as it is used
  9872. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/ip_forward.c linux/net/ipv4/ip_forward.c
  9873. --- pre2.0.6/linux/net/ipv4/ip_forward.c    Fri May 17 15:32:20 1996
  9874. +++ linux/net/ipv4/ip_forward.c    Sun May 19 23:40:50 1996
  9875. @@ -12,6 +12,8 @@
  9876.   *        Dave Gregorich    :    NULL ip_rt_put fix for multicast routing.
  9877.   *        Jos Vos        :    Add call_out_firewall before sending,
  9878.   *                    use output device for accounting.
  9879. + *        Jos Vos        :    Call forward firewall after routing
  9880. + *                    (always use output device).
  9881.   */
  9882.  
  9883.  #include <linux/config.h>
  9884. @@ -105,28 +107,6 @@
  9885.  #endif /* CONFIG_IP_MASQUERADE */
  9886.  #endif /* CONFIG_FIREWALL */
  9887.      
  9888. -    /* 
  9889. -     *    See if we are allowed to forward this.
  9890. -      *    Note: demasqueraded fragments are always 'back'warded.
  9891. -     */
  9892. -    
  9893. -#ifdef CONFIG_FIREWALL
  9894. -    if(!(is_frag&IPFWD_MASQUERADED))
  9895. -    {
  9896. -        fw_res=call_fw_firewall(PF_INET, dev, skb->h.iph);
  9897. -        switch (fw_res) {
  9898. -        case FW_ACCEPT:
  9899. -        case FW_MASQUERADE:
  9900. -            break;
  9901. -        case FW_REJECT:
  9902. -            icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, dev);
  9903. -            /* fall thru */
  9904. -        default:
  9905. -            return -1;
  9906. -        }
  9907. -    }
  9908. -#endif
  9909. -
  9910.      /*
  9911.       *    According to the RFC, we must first decrease the TTL field. If
  9912.       *    that reaches zero, we must reply an ICMP control message telling
  9913. @@ -237,6 +217,28 @@
  9914.      }
  9915.  #endif    
  9916.      
  9917. +    /* 
  9918. +     *    See if we are allowed to forward this.
  9919. +      *    Note: demasqueraded fragments are always 'back'warded.
  9920. +     */
  9921. +    
  9922. +#ifdef CONFIG_FIREWALL
  9923. +    if(!(is_frag&IPFWD_MASQUERADED))
  9924. +    {
  9925. +        fw_res=call_fw_firewall(PF_INET, dev2, iph, NULL);
  9926. +        switch (fw_res) {
  9927. +        case FW_ACCEPT:
  9928. +        case FW_MASQUERADE:
  9929. +            break;
  9930. +        case FW_REJECT:
  9931. +            icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, dev);
  9932. +            /* fall thru */
  9933. +        default:
  9934. +            return -1;
  9935. +        }
  9936. +    }
  9937. +#endif
  9938. +
  9939.      /*
  9940.       * We now may allocate a new buffer, and copy the datagram into it.
  9941.       * If the indicated interface is up and running, kick it.
  9942. @@ -361,7 +363,7 @@
  9943.  #endif            
  9944.          }
  9945.  #ifdef CONFIG_FIREWALL
  9946. -        if((fw_res = call_out_firewall(PF_INET, skb2->dev, iph)) < FW_ACCEPT)
  9947. +        if((fw_res = call_out_firewall(PF_INET, skb2->dev, iph, NULL)) < FW_ACCEPT)
  9948.          {
  9949.              /* FW_ACCEPT and FW_MASQUERADE are treated equal:
  9950.                 masquerading is only supported via forward rules */
  9951. @@ -444,7 +446,7 @@
  9952.               *    Count mapping we shortcut
  9953.               */
  9954.               
  9955. -            ip_fw_chk(iph,dev2,ip_acct_chain,IP_FW_F_ACCEPT,1);
  9956. +            ip_fw_chk(iph,dev2,NULL,ip_acct_chain,IP_FW_F_ACCEPT,IP_FW_MODE_ACCT_OUT);
  9957.  #endif            
  9958.              
  9959.              /*
  9960. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/ip_fw.c linux/net/ipv4/ip_fw.c
  9961. --- pre2.0.6/linux/net/ipv4/ip_fw.c    Fri Apr 12 15:52:12 1996
  9962. +++ linux/net/ipv4/ip_fw.c    Sun May 19 23:40:50 1996
  9963. @@ -33,6 +33,10 @@
  9964.   *        Jos Vos <jos@xos.nl> 8/2/1996.
  9965.   *    Add support for matching on device names.
  9966.   *        Jos Vos <jos@xos.nl> 15/2/1996.
  9967. + *    Transparent proxying support.
  9968. + *        Willy Konynenberg <willy@xos.nl> 10/5/96.
  9969. + *    Make separate accounting on incoming and outgoing packets possible.
  9970. + *        Jos Vos <jos@xos.nl> 18/5/1996.
  9971.   *
  9972.   *
  9973.   * Masquerading functionality
  9974. @@ -186,17 +190,18 @@
  9975.  
  9976.  
  9977.  /*
  9978. - *    Returns 0 if packet should be dropped, 1 if it should be accepted,
  9979. - *    and -1 if an ICMP host unreachable packet should be sent.
  9980. + *    Returns one of the generic firewall policies, like FW_ACCEPT.
  9981.   *    Also does accounting so you can feed it the accounting chain.
  9982. - *    If opt is set to 1, it means that we do this for accounting
  9983. - *    purposes (searches all entries and handles fragments different).
  9984. - *    If opt is set to 2, it doesn't count a matching packet, which
  9985. - *    is used when calling this for checking purposes (IP_FW_CHK_*).
  9986. + *
  9987. + *    The modes is either IP_FW_MODE_FW (normal firewall mode),
  9988. + *    IP_FW_MODE_ACCT_IN or IP_FW_MODE_ACCT_OUT (accounting mode,
  9989. + *    steps through the entire chain and handles fragments
  9990. + *    differently), or IP_FW_MODE_CHK (handles user-level check,
  9991. + *    counters are not updated).
  9992.   */
  9993.  
  9994.  
  9995. -int ip_fw_chk(struct iphdr *ip, struct device *rif, struct ip_fw *chain, int policy, int opt)
  9996. +int ip_fw_chk(struct iphdr *ip, struct device *rif, __u16 *redirport, struct ip_fw *chain, int policy, int mode)
  9997.  {
  9998.      struct ip_fw *f;
  9999.      struct tcphdr        *tcp=(struct tcphdr *)((unsigned long *)ip+ip->ihl);
  10000. @@ -245,8 +250,9 @@
  10001.      if (offset == 1 && ip->protocol == IPPROTO_TCP)
  10002.          return FW_BLOCK;
  10003.          
  10004. -    if (offset!=0 && (opt != 1) && (ip->protocol == IPPROTO_TCP ||
  10005. -            ip->protocol == IPPROTO_UDP || ip->protocol == IPPROTO_ICMP))
  10006. +    if (offset!=0 && !(mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT)) &&
  10007. +        (ip->protocol == IPPROTO_TCP || ip->protocol == IPPROTO_UDP ||
  10008. +            ip->protocol == IPPROTO_ICMP))
  10009.          return FW_ACCEPT;
  10010.          
  10011.      /*
  10012. @@ -358,37 +364,43 @@
  10013.              /* reverse direction */
  10014.              match |= 0x02;
  10015.  
  10016. -        if (match)
  10017. -        {
  10018. -            /*
  10019. -             *    Look for a VIA address match 
  10020. -             */
  10021. -            if(f->fw_via.s_addr && rif)
  10022. -            {
  10023. -                if(rif->pa_addr!=f->fw_via.s_addr)
  10024. -                    continue;    /* Mismatch */
  10025. -            }
  10026. +        if (!match)
  10027. +            continue;
  10028.  
  10029. -            /*
  10030. -             *    Look for a VIA device match 
  10031. -             */
  10032. -            if(f->fw_viadev)
  10033. -            {
  10034. -                if(rif!=f->fw_viadev)
  10035. -                    continue;    /* Mismatch */
  10036. -            }
  10037. +        /*
  10038. +         *    Look for a VIA address match 
  10039. +         */
  10040. +        if(f->fw_via.s_addr && rif)
  10041. +        {
  10042. +            if(rif->pa_addr!=f->fw_via.s_addr)
  10043. +                continue;    /* Mismatch */
  10044. +        }
  10045.  
  10046. -            /*
  10047. -             *    Drop through - this is a match
  10048. -             */
  10049. +        /*
  10050. +         *    Look for a VIA device match 
  10051. +         */
  10052. +        if(f->fw_viadev)
  10053. +        {
  10054. +            if(rif!=f->fw_viadev)
  10055. +                continue;    /* Mismatch */
  10056.          }
  10057. -        else
  10058. -            continue;
  10059.  
  10060.          /*
  10061.           *    Ok the chain addresses match.
  10062.           */
  10063.  
  10064. +#ifdef CONFIG_IP_ACCT
  10065. +        /*
  10066. +         *    See if we're in accounting mode and only want to
  10067. +         *    count incoming or outgoing packets.
  10068. +         */
  10069. +
  10070. +        if (mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT) &&
  10071. +           ((mode == IP_FW_MODE_ACCT_IN && f->fw_flg&IP_FW_F_ACCTOUT) ||
  10072. +            (mode == IP_FW_MODE_ACCT_OUT && f->fw_flg&IP_FW_F_ACCTIN)))
  10073. +            continue;
  10074. +
  10075. +#endif
  10076.          f_prt=f->fw_flg&IP_FW_F_KIND;
  10077.          if (f_prt!=IP_FW_F_ALL) 
  10078.          {
  10079. @@ -429,6 +441,7 @@
  10080.                  continue;
  10081.              }
  10082.          }
  10083. +
  10084.  #ifdef CONFIG_IP_FIREWALL_VERBOSE
  10085.          /*
  10086.           * VERY ugly piece of code which actually
  10087. @@ -437,53 +450,72 @@
  10088.  
  10089.          if (f->fw_flg & IP_FW_F_PRN)
  10090.          {
  10091. -            if(opt != 1) {
  10092. +            __u32 *opt = (__u32 *) (ip + 1);
  10093. +            int opti;
  10094. +
  10095. +            if(mode == IP_FW_MODE_ACCT_IN)
  10096. +                printk(KERN_INFO "IP acct in ");
  10097. +            else if(mode == IP_FW_MODE_ACCT_OUT)
  10098. +                printk(KERN_INFO "IP acct out ");
  10099. +            else {
  10100. +                if(chain == ip_fw_fwd_chain)
  10101. +                    printk(KERN_INFO "IP fw-fwd ");
  10102. +                else if(chain == ip_fw_in_chain)
  10103. +                    printk(KERN_INFO "IP fw-in ");
  10104. +                else
  10105. +                    printk(KERN_INFO "IP fw-out ");
  10106.                  if(f->fw_flg&IP_FW_F_ACCEPT) {
  10107. -                    if(f->fw_flg&IP_FW_F_MASQ)
  10108. -                        printk("masq ");
  10109. +                    if(f->fw_flg&IP_FW_F_REDIR)
  10110. +                        printk("acc/r%d ", f->fw_pts[f->fw_nsp+f->fw_ndp]);
  10111. +                    else if(f->fw_flg&IP_FW_F_MASQ)
  10112. +                        printk("acc/masq ");
  10113.                      else
  10114. -                        printk("acc  ");
  10115. +                        printk("acc ");
  10116.                  } else if(f->fw_flg&IP_FW_F_ICMPRPL)
  10117. -                    printk("rej  ");
  10118. +                    printk("rej ");
  10119.                  else
  10120.                      printk("deny ");
  10121.              }
  10122. -            if (rif)
  10123. -                printk("%s ", rif->name);
  10124. +            printk(rif ? rif->name : "-");
  10125.              switch(ip->protocol)
  10126.              {
  10127.                  case IPPROTO_TCP:
  10128. -                    printk("TCP ");
  10129. +                    printk(" TCP ");
  10130.                      break;
  10131.                  case IPPROTO_UDP:
  10132. -                    printk("UDP ");
  10133. +                    printk(" UDP ");
  10134.                      break;
  10135.                  case IPPROTO_ICMP:
  10136. -                    printk("ICMP:%d ", icmp_type);
  10137. +                    printk(" ICMP/%d ", icmp_type);
  10138.                      break;
  10139.                  default:
  10140. -                    printk("p=%d ",ip->protocol);
  10141. +                    printk(" PROTO=%d ", ip->protocol);
  10142.                      break;
  10143.              }
  10144.              print_ip(ip->saddr);
  10145.              if(ip->protocol == IPPROTO_TCP || ip->protocol == IPPROTO_UDP)
  10146. -                printk(":%d", src_port);
  10147. +                printk(":%hu", src_port);
  10148.              printk(" ");
  10149.              print_ip(ip->daddr);
  10150.              if(ip->protocol == IPPROTO_TCP || ip->protocol == IPPROTO_UDP)
  10151. -                printk(":%d",dst_port);
  10152. +                printk(":%hu", dst_port);
  10153. +            printk(" L=%hu S=0x%2.2hX I=%hu F=0x%4.4hX T=%hu",
  10154. +                ntohs(ip->tot_len), ip->tos, ntohs(ip->id),
  10155. +                ip->frag_off, ip->ttl);
  10156. +            for (opti = 0; opti < (ip->ihl - sizeof(struct iphdr) / 4); opti++)
  10157. +                printk(" O=0x%8.8X", *opt++);
  10158.              printk("\n");
  10159.          }
  10160.  #endif        
  10161. -        if (opt != 2) {
  10162. +        if (mode != IP_FW_MODE_CHK) {
  10163.              f->fw_bcnt+=ntohs(ip->tot_len);
  10164.              f->fw_pcnt++;
  10165.          }
  10166. -        if (opt != 1)
  10167. +        if (!(mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT)))
  10168.              break;
  10169.      } /* Loop */
  10170.      
  10171. -    if (opt != 1) {
  10172. +    if (!(mode & (IP_FW_MODE_ACCT_IN|IP_FW_MODE_ACCT_OUT))) {
  10173.  
  10174.          /*
  10175.           * We rely on policy defined in the rejecting entry or, if no match
  10176. @@ -506,7 +538,20 @@
  10177.              ip->tos = (old_tos & tosand) ^ tosxor;
  10178.              if (ip->tos != old_tos)
  10179.                   ip_send_check(ip);
  10180. -            answer=(policy&IP_FW_F_MASQ)?FW_MASQUERADE:FW_ACCEPT;
  10181. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10182. +            if (policy&IP_FW_F_REDIR) {
  10183. +                if (redirport)
  10184. +                    *redirport = htons(f->fw_pts[f->fw_nsp+f->fw_ndp]);
  10185. +                answer = FW_REDIRECT;
  10186. +            } else
  10187. +#endif
  10188. +#ifdef CONFIG_IP_MASQUERADE
  10189. +            if (policy&IP_FW_F_MASQ)
  10190. +                answer = FW_MASQUERADE;
  10191. +            else
  10192. +#endif
  10193. +                answer = FW_ACCEPT;
  10194. +            
  10195.          } else if(policy&IP_FW_F_ICMPRPL)
  10196.              answer = FW_REJECT;
  10197.          else
  10198. @@ -735,6 +780,24 @@
  10199.          return(NULL);
  10200.      }
  10201.  
  10202. +#ifndef CONFIG_IP_TRANSPARENT_PROXY
  10203. +    if (frwl->fw_flg & IP_FW_F_REDIR) {
  10204. +#ifdef DEBUG_CONFIG_IP_FIREWALL
  10205. +        printk("ip_fw_ctl: unsupported flag IP_FW_F_REDIR\n");
  10206. +#endif
  10207. +        return(NULL);
  10208. +    }
  10209. +#endif
  10210. +
  10211. +#ifndef CONFIG_IP_MASQUERADE
  10212. +    if (frwl->fw_flg & IP_FW_F_MASQ) {
  10213. +#ifdef DEBUG_CONFIG_IP_FIREWALL
  10214. +        printk("ip_fw_ctl: unsupported flag IP_FW_F_MASQ\n");
  10215. +#endif
  10216. +        return(NULL);
  10217. +    }
  10218. +#endif
  10219. +
  10220.      if ( (frwl->fw_flg & IP_FW_F_SRNG) && frwl->fw_nsp < 2 ) 
  10221.      {
  10222.  #ifdef DEBUG_CONFIG_IP_FIREWALL
  10223. @@ -753,7 +816,7 @@
  10224.          return(NULL);
  10225.      }
  10226.  
  10227. -    if ( frwl->fw_nsp + frwl->fw_ndp > IP_FW_MAX_PORTS ) 
  10228. +    if ( frwl->fw_nsp + frwl->fw_ndp > (frwl->fw_flg & IP_FW_F_REDIR ? IP_FW_MAX_PORTS - 1 : IP_FW_MAX_PORTS) ) 
  10229.      {
  10230.  #ifdef DEBUG_CONFIG_IP_FIREWALL
  10231.          printk("ip_fw_ctl: too many ports (%d+%d)\n",
  10232. @@ -770,14 +833,6 @@
  10233.  
  10234.  #ifdef CONFIG_IP_ACCT
  10235.  
  10236. -#if 0
  10237. -void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f)
  10238. -{
  10239. -    (void) ip_fw_chk(iph, dev, f, 0, 1);
  10240. -    return;
  10241. -}
  10242. -#endif
  10243. -
  10244.  int ip_acct_ctl(int stage, void *m, int len)
  10245.  {
  10246.      if ( stage == IP_ACCT_FLUSH )
  10247. @@ -826,7 +881,7 @@
  10248.  #ifdef CONFIG_IP_FIREWALL
  10249.  int ip_fw_ctl(int stage, void *m, int len)
  10250.  {
  10251. -    int ret, cmd, fwtype;
  10252. +    int cmd, fwtype;
  10253.  
  10254.      cmd = stage & IP_FW_COMMAND;
  10255.      fwtype = (stage & IP_FW_TYPE) >> IP_FW_SHIFT;
  10256. @@ -888,15 +943,20 @@
  10257.              return(EINVAL);
  10258.          }
  10259.  
  10260. -        if ((ret = ip_fw_chk(ip, viadev, *chains[fwtype],
  10261. -                *policies[fwtype], 2)) == FW_ACCEPT)
  10262. -            return(0);
  10263. -            else if (ret == FW_MASQUERADE)    
  10264. -            return(ECONNRESET);
  10265. -            else if (ret == FW_REJECT)    
  10266. -            return(ECONNREFUSED);
  10267. -        else /* ret == FW_BLOCK */
  10268. -            return(ETIMEDOUT);
  10269. +        switch (ip_fw_chk(ip, viadev, NULL, *chains[fwtype],
  10270. +                *policies[fwtype], IP_FW_MODE_CHK))
  10271. +        {
  10272. +            case FW_ACCEPT:
  10273. +                return(0);
  10274. +                case FW_REDIRECT:
  10275. +                return(ECONNABORTED);
  10276. +                case FW_MASQUERADE:
  10277. +                return(ECONNRESET);
  10278. +                case FW_REJECT:
  10279. +                return(ECONNREFUSED);
  10280. +            default: /* FW_BLOCK */
  10281. +                return(ETIMEDOUT);
  10282. +        }
  10283.      }
  10284.  
  10285.      if ( cmd == IP_FW_MASQ_TIMEOUTS )
  10286. @@ -1104,19 +1164,19 @@
  10287.   *    Interface to the generic firewall chains.
  10288.   */
  10289.   
  10290. -int ipfw_input_check(struct firewall_ops *this, int pf, struct device *dev, void *phdr)
  10291. +int ipfw_input_check(struct firewall_ops *this, int pf, struct device *dev, void *phdr, void *arg)
  10292.  {
  10293. -    return ip_fw_chk(phdr, dev, ip_fw_in_chain, ip_fw_in_policy, 0);
  10294. +    return ip_fw_chk(phdr, dev, arg, ip_fw_in_chain, ip_fw_in_policy, IP_FW_MODE_FW);
  10295.  }
  10296.  
  10297. -int ipfw_output_check(struct firewall_ops *this, int pf, struct device *dev, void *phdr)
  10298. +int ipfw_output_check(struct firewall_ops *this, int pf, struct device *dev, void *phdr, void *arg)
  10299.  {
  10300. -    return ip_fw_chk(phdr, dev, ip_fw_out_chain, ip_fw_out_policy, 0);
  10301. +    return ip_fw_chk(phdr, dev, arg, ip_fw_out_chain, ip_fw_out_policy, IP_FW_MODE_FW);
  10302.  }
  10303.  
  10304. -int ipfw_forward_check(struct firewall_ops *this, int pf, struct device *dev, void *phdr)
  10305. +int ipfw_forward_check(struct firewall_ops *this, int pf, struct device *dev, void *phdr, void *arg)
  10306.  {
  10307. -    return ip_fw_chk(phdr, dev, ip_fw_fwd_chain, ip_fw_fwd_policy, 0);
  10308. +    return ip_fw_chk(phdr, dev, arg, ip_fw_fwd_chain, ip_fw_fwd_policy, IP_FW_MODE_FW);
  10309.  }
  10310.   
  10311.  struct firewall_ops ipfw_ops=
  10312. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
  10313. --- pre2.0.6/linux/net/ipv4/ip_input.c    Fri Apr 12 15:52:12 1996
  10314. +++ linux/net/ipv4/ip_input.c    Mon May 20 09:17:34 1996
  10315. @@ -96,6 +96,7 @@
  10316.   *        A.N.Kuznetsov    :    IP_OPTIONS support throughout the kernel
  10317.   *        Alan Cox    :    Multicast routing hooks
  10318.   *        Jos Vos        :    Do accounting *before* call_in_firewall
  10319. + *    Willy Konynenberg    :    Transparent proxying support
  10320.   *
  10321.   *  
  10322.   *
  10323. @@ -189,6 +190,27 @@
  10324.      }
  10325.  }
  10326.  
  10327. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10328. +/*
  10329. + *    Check the packet against our socket administration to see
  10330. + *    if it is related to a connection on our system.
  10331. + *    Needed for transparent proxying.
  10332. + */
  10333. +
  10334. +int ip_chksock(struct sk_buff *skb)
  10335. +{
  10336. +    switch (skb->h.iph->protocol) {
  10337. +    case IPPROTO_ICMP:
  10338. +        return icmp_chkaddr(skb);
  10339. +    case IPPROTO_TCP:
  10340. +        return tcp_chkaddr(skb);
  10341. +    case IPPROTO_UDP:
  10342. +        return udp_chkaddr(skb);
  10343. +    default:
  10344. +        return 0;
  10345. +    }
  10346. +}
  10347. +#endif
  10348.  
  10349.  
  10350.  /*
  10351. @@ -211,7 +233,8 @@
  10352.      __u32 daddr;
  10353.  
  10354.  #ifdef CONFIG_FIREWALL
  10355. -    int err;
  10356. +    int fwres;
  10357. +    __u16 rport;
  10358.  #endif    
  10359.  #ifdef CONFIG_IP_MROUTE
  10360.      int mroute_pkt=0;
  10361. @@ -229,6 +252,15 @@
  10362.      ip_statistics.IpInReceives++;
  10363.  
  10364.      /*
  10365. +     *    Account for the packet (even if the packet is
  10366. +     *    not accepted by the firewall!).
  10367. +     */
  10368. +
  10369. +#ifdef CONFIG_IP_ACCT
  10370. +    ip_fw_chk(iph,dev,NULL,ip_acct_chain,IP_FW_F_ACCEPT,IP_FW_MODE_ACCT_IN);
  10371. +#endif    
  10372. +
  10373. +    /*
  10374.       *    Tag the ip header of this packet so we can find it
  10375.       */
  10376.  
  10377. @@ -289,31 +321,82 @@
  10378.  #endif                    
  10379.      }
  10380.      
  10381. +#if defined(CONFIG_IP_TRANSPARENT_PROXY) && !defined(CONFIG_IP_ALWAYS_DEFRAG)
  10382. +#define CONFIG_IP_ALWAYS_DEFRAG 1
  10383. +#endif
  10384. +#ifdef CONFIG_IP_ALWAYS_DEFRAG
  10385.      /*
  10386. -     *    Account for the packet (even if the packet is
  10387. -     *    not accepted by the firewall!).
  10388. +     * Defragment all incoming traffic before even looking at it.
  10389. +     * If you have forwarding enabled, this makes the system a
  10390. +     * defragmenting router.  Not a common thing.
  10391. +     * You probably DON'T want to enable this unless you have to.
  10392. +     * You NEED to use this if you want to use transparent proxying,
  10393. +     * otherwise, we can't vouch for your sanity.
  10394.       */
  10395.  
  10396. -#ifdef CONFIG_IP_ACCT
  10397. -    ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1);
  10398. -#endif    
  10399. +    /*
  10400. +     *    See if the frame is fragmented.
  10401. +     */
  10402. +     
  10403. +    if(iph->frag_off)
  10404. +    {
  10405. +        if (iph->frag_off & htons(IP_MF))
  10406. +            is_frag|=IPFWD_FRAGMENT;
  10407. +        /*
  10408. +         *    Last fragment ?
  10409. +         */
  10410. +    
  10411. +        if (iph->frag_off & htons(IP_OFFSET))
  10412. +            is_frag|=IPFWD_LASTFRAG;
  10413. +    
  10414. +        /*
  10415. +         *    Reassemble IP fragments.
  10416. +         */
  10417.  
  10418. +        if(is_frag)
  10419. +        {
  10420. +            /* Defragment. Obtain the complete packet if there is one */
  10421. +            skb=ip_defrag(iph,skb,dev);
  10422. +            if(skb==NULL)
  10423. +                return 0;
  10424. +            skb->dev = dev;
  10425. +            iph=skb->h.iph;
  10426. +            is_frag = 0;
  10427. +            /*
  10428. +             * When the reassembled packet gets forwarded, the ip
  10429. +             * header checksum should be correct.
  10430. +             * For better performance, this should actually only
  10431. +             * be done in that particular case, i.e. set a flag
  10432. +             * here and calculate the checksum in ip_forward.
  10433. +             */
  10434. +            ip_send_check(iph);
  10435. +        }
  10436. +    }
  10437. +
  10438. +#endif
  10439.      /*
  10440.       *    See if the firewall wants to dispose of the packet. 
  10441.       */
  10442.      
  10443.  #ifdef    CONFIG_FIREWALL
  10444.  
  10445. -    if ((err=call_in_firewall(PF_INET, skb->dev, iph))<FW_ACCEPT)
  10446. +    if ((fwres=call_in_firewall(PF_INET, skb->dev, iph, &rport))<FW_ACCEPT)
  10447.      {
  10448. -        if(err==FW_REJECT)
  10449. +        if(fwres==FW_REJECT)
  10450.              icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0, dev);
  10451.          kfree_skb(skb, FREE_WRITE);
  10452.          return 0;    
  10453.      }
  10454.  
  10455. +#ifdef    CONFIG_IP_TRANSPARENT_PROXY
  10456. +    if (fwres==FW_REDIRECT)
  10457. +        skb->redirport = rport;
  10458. +    else
  10459. +#endif
  10460. +        skb->redirport = 0;
  10461.  #endif
  10462.      
  10463. +#ifndef CONFIG_IP_ALWAYS_DEFRAG
  10464.      /*
  10465.       *    Remember if the frame is fragmented.
  10466.       */
  10467. @@ -330,6 +413,7 @@
  10468.              is_frag|=IPFWD_LASTFRAG;
  10469.      }
  10470.      
  10471. +#endif
  10472.      /*
  10473.       *    Do any IP forwarding required.  chk_addr() is expensive -- avoid it someday.
  10474.       *
  10475. @@ -342,7 +426,14 @@
  10476.       *    function entry.
  10477.       */
  10478.      daddr = iph->daddr;
  10479. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10480. +    /*
  10481. +     *    ip_chksock adds still more overhead for forwarded traffic...
  10482. +     */
  10483. +    if ( iph->daddr == skb->dev->pa_addr || skb->redirport || (brd = ip_chk_addr(iph->daddr)) != 0 || ip_chksock(skb))
  10484. +#else
  10485.      if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0)
  10486. +#endif
  10487.      {
  10488.          if (opt && opt->srr) 
  10489.              {
  10490. @@ -422,19 +513,7 @@
  10491.          }
  10492.  #endif
  10493.  
  10494. -#ifdef CONFIG_IP_MASQUERADE
  10495. -        /*
  10496. -         * Do we need to de-masquerade this fragment?
  10497. -         */
  10498. -        if (ip_fw_demasquerade(&skb,dev)) 
  10499. -        {
  10500. -            struct iphdr *iph=skb->h.iph;
  10501. -            if (ip_forward(skb, dev, is_frag|IPFWD_MASQUERADED, iph->daddr))
  10502. -                kfree_skb(skb, FREE_WRITE);
  10503. -            return(0);
  10504. -        }
  10505. -#endif
  10506. -
  10507. +#ifndef CONFIG_IP_ALWAYS_DEFRAG
  10508.          /*
  10509.           *    Reassemble IP fragments.
  10510.           */
  10511. @@ -447,16 +526,29 @@
  10512.                  return 0;
  10513.              skb->dev = dev;
  10514.              iph=skb->h.iph;
  10515. -#ifdef CONFIG_IP_MASQUERADE
  10516. -            if (ip_fw_demasquerade(&skb,dev))
  10517. -            {
  10518. -                struct iphdr *iph=skb->h.iph;
  10519. -                if (ip_forward(skb, dev, IPFWD_MASQUERADED, iph->daddr))
  10520. -                    kfree_skb(skb, FREE_WRITE);
  10521. -                return 0;
  10522. -            }
  10523. +        }
  10524. +
  10525.  #endif
  10526. +#ifdef CONFIG_IP_MASQUERADE
  10527. +    {
  10528. +        /*
  10529. +         * Do we need to de-masquerade this packet?
  10530. +         */
  10531. +        int ret = ip_fw_demasquerade(&skb,dev);
  10532. +        if (ret < 0) {
  10533. +            kfree_skb(skb, FREE_WRITE);
  10534. +            return 0;
  10535. +        }
  10536. +
  10537. +        if (ret)
  10538. +        {
  10539. +            struct iphdr *iph=skb->h.iph;
  10540. +            if (ip_forward(skb, dev, IPFWD_MASQUERADED, iph->daddr))
  10541. +                kfree_skb(skb, FREE_WRITE);
  10542. +            return 0;
  10543.          }
  10544. +    }
  10545. +#endif
  10546.  
  10547.          /*
  10548.           *    Point into the IP datagram, just past the header.
  10549. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/ip_output.c linux/net/ipv4/ip_output.c
  10550. --- pre2.0.6/linux/net/ipv4/ip_output.c    Tue May  7 16:22:41 1996
  10551. +++ linux/net/ipv4/ip_output.c    Sun May 19 23:40:50 1996
  10552. @@ -379,7 +379,7 @@
  10553.      skb->free = free;
  10554.  
  10555.  #ifdef CONFIG_FIREWALL
  10556. -    if(call_out_firewall(PF_INET, skb->dev, iph) < FW_ACCEPT) {
  10557. +    if(call_out_firewall(PF_INET, skb->dev, iph, NULL) < FW_ACCEPT) {
  10558.          /* just don't send this packet */
  10559.          /* and free socket buffers ;) <aldem@barnet.kharkov.ua> */
  10560.          if (free)
  10561. @@ -471,7 +471,7 @@
  10562.       
  10563.      ip_statistics.IpOutRequests++;
  10564.  #ifdef CONFIG_IP_ACCT
  10565. -    ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1);
  10566. +    ip_fw_chk(iph,dev,NULL,ip_acct_chain,IP_FW_F_ACCEPT,IP_FW_MODE_ACCT_OUT);
  10567.  #endif    
  10568.      
  10569.  #ifdef CONFIG_IP_MULTICAST    
  10570. @@ -712,14 +712,14 @@
  10571.              getfrag(frag,saddr,(void *)iph,0,length);
  10572.          dev_unlock_list();
  10573.  #ifdef CONFIG_FIREWALL
  10574. -        if(call_out_firewall(PF_INET, skb->dev, iph)< FW_ACCEPT)
  10575. +        if(call_out_firewall(PF_INET, skb->dev, iph, NULL)< FW_ACCEPT)
  10576.          {
  10577.              kfree_skb(skb, FREE_WRITE);
  10578.              return -EPERM;
  10579.          }
  10580.  #endif
  10581.  #ifdef CONFIG_IP_ACCT
  10582. -        ip_fw_chk(iph,dev,ip_acct_chain, IP_FW_F_ACCEPT,1);
  10583. +        ip_fw_chk(iph,dev,NULL,ip_acct_chain, IP_FW_F_ACCEPT,IP_FW_MODE_ACCT_OUT);
  10584.  #endif        
  10585.          if(dev->flags&IFF_UP)
  10586.              dev_queue_xmit(skb,dev,sk->priority);
  10587. @@ -916,7 +916,7 @@
  10588.           */
  10589.           
  10590.  #ifdef CONFIG_FIREWALL
  10591. -        if(!offset && call_out_firewall(PF_INET, skb->dev, iph) < FW_ACCEPT)
  10592. +        if(!offset && call_out_firewall(PF_INET, skb->dev, iph, NULL) < FW_ACCEPT)
  10593.          {
  10594.              kfree_skb(skb, FREE_WRITE);
  10595.              dev_unlock_list();
  10596. @@ -925,7 +925,7 @@
  10597.  #endif        
  10598.  #ifdef CONFIG_IP_ACCT
  10599.          if(!offset)
  10600. -            ip_fw_chk(iph, dev, ip_acct_chain, IP_FW_F_ACCEPT, 1);
  10601. +            ip_fw_chk(iph, dev, NULL, ip_acct_chain, IP_FW_F_ACCEPT, IP_FW_MODE_ACCT_OUT);
  10602.  #endif    
  10603.          offset -= (maxfraglen-fragheaderlen);
  10604.          fraglen = maxfraglen;
  10605. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/route.c linux/net/ipv4/route.c
  10606. --- pre2.0.6/linux/net/ipv4/route.c    Fri May 17 15:32:20 1996
  10607. +++ linux/net/ipv4/route.c    Mon May 20 08:24:24 1996
  10608. @@ -672,7 +672,7 @@
  10609.   *    discard it too.
  10610.   */
  10611.          if (f->fib_info->fib_dev != dev &&
  10612. -            (dev != &loopback_dev || f->fib_dst != dev->pa_addr)) {
  10613. +            (f->fib_info->fib_dev != &loopback_dev || f->fib_dst != dev->pa_addr)) {
  10614.              fp = &f->fib_next;
  10615.              continue;
  10616.          }
  10617. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
  10618. --- pre2.0.6/linux/net/ipv4/tcp.c    Fri May 17 15:32:20 1996
  10619. +++ linux/net/ipv4/tcp.c    Sun May 19 23:40:50 1996
  10620. @@ -201,6 +201,7 @@
  10621.   *                    and seems to result in general
  10622.   *                    improvement.
  10623.   *    Stefan Magdalinski    :    adjusted tcp_readable() to fix FIONREAD
  10624. + *    Willy Konynenberg    :    Transparent proxying support.
  10625.   *                    
  10626.   * To Fix:
  10627.   *        Fast path the code. Two things here - fix the window calculation
  10628. @@ -511,7 +512,7 @@
  10629.      struct iphdr *iph=(struct iphdr *)(header-sizeof(struct iphdr));
  10630.  #endif
  10631.      th =(struct tcphdr *)header;
  10632. -    sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
  10633. +    sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr, 0, 0);
  10634.  
  10635.      if (sk == NULL)
  10636.          return;
  10637. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
  10638. --- pre2.0.6/linux/net/ipv4/tcp_input.c    Mon May 20 08:21:05 1996
  10639. +++ linux/net/ipv4/tcp_input.c    Sun May 19 23:40:50 1996
  10640. @@ -146,14 +146,14 @@
  10641.   *    right...
  10642.   */
  10643.  
  10644. -static inline struct sock * get_tcp_sock(u32 saddr, u16 sport, u32 daddr, u16 dport)
  10645. +static inline struct sock * get_tcp_sock(u32 saddr, u16 sport, u32 daddr, u16 dport, u32 paddr, u16 pport)
  10646.  {
  10647.      struct sock * sk;
  10648.  
  10649.      sk = (struct sock *) th_cache_sk;
  10650.      if (!sk || saddr != th_cache_saddr || daddr != th_cache_daddr ||
  10651.          sport != th_cache_sport || dport != th_cache_dport) {
  10652. -        sk = get_sock(&tcp_prot, dport, saddr, sport, daddr);
  10653. +        sk = get_sock(&tcp_prot, dport, saddr, sport, daddr, paddr, pport);
  10654.          if (sk) {
  10655.              th_cache_saddr=saddr;
  10656.              th_cache_daddr=daddr;
  10657. @@ -461,6 +461,14 @@
  10658.      newsk->dummy_th.source = skb->h.th->dest;
  10659.      newsk->dummy_th.dest = skb->h.th->source;
  10660.      
  10661. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10662. +    /* 
  10663. +     *    Deal with possibly redirected traffic by setting num to
  10664. +     *    the intended destination port of the received packet.
  10665. +     */
  10666. +    newsk->num = ntohs(skb->h.th->dest);
  10667. +
  10668. +#endif
  10669.      /*
  10670.       *    Swap these two, they are from our point of view. 
  10671.       */
  10672. @@ -1628,6 +1636,27 @@
  10673.      }
  10674.  }
  10675.  
  10676. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10677. +/*
  10678. + *    Check whether a received TCP packet might be for one of our
  10679. + *    connections.
  10680. + */
  10681. +
  10682. +int tcp_chkaddr(struct sk_buff *skb)
  10683. +{
  10684. +    struct iphdr *iph = skb->h.iph;
  10685. +    struct tcphdr *th = (struct tcphdr *)(skb->h.raw + iph->ihl*4);
  10686. +    struct sock *sk;
  10687. +
  10688. +    sk = get_sock(&tcp_prot, th->dest, iph->saddr, th->source, iph->daddr, 0, 0);
  10689. +
  10690. +    if (!sk) return 0;
  10691. +    /* 0 means accept all LOCAL addresses here, not all the world... */
  10692. +    if (sk->rcv_saddr == 0) return 0;
  10693. +    return 1;
  10694. +}
  10695. +#endif
  10696. +
  10697.  /*
  10698.   *    A TCP packet has arrived.
  10699.   *        skb->h.raw is the TCP header.
  10700. @@ -1640,6 +1669,9 @@
  10701.      struct tcphdr *th;
  10702.      struct sock *sk;
  10703.      int syn_ok=0;
  10704. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10705. +    int r;
  10706. +#endif
  10707.  
  10708.      /*
  10709.       * "redo" is 1 if we have already seen this skb but couldn't
  10710. @@ -1673,7 +1705,7 @@
  10711.              default:
  10712.                  /* CHECKSUM_UNNECESSARY */
  10713.          }
  10714. -        sk = get_tcp_sock(saddr, th->source, daddr, th->dest);
  10715. +        sk = get_tcp_sock(saddr, th->source, daddr, th->dest, dev->pa_addr, skb->redirport);
  10716.          if (!sk)
  10717.              goto no_tcp_socket;
  10718.          skb->sk = sk;
  10719. @@ -1753,7 +1785,16 @@
  10720.               *    this problem so I'm ignoring it 
  10721.               */
  10722.                 
  10723. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10724. +            /*
  10725. +             * We may get non-local addresses and still want to
  10726. +             * handle them locally, due to transparent proxying.
  10727. +             * Thus, narrow down the test to what is really meant.
  10728. +             */
  10729. +            if(th->rst || !th->syn || th->ack || (r = ip_chk_addr(daddr) == IS_BROADCAST || r == IS_MULTICAST))
  10730. +#else
  10731.              if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
  10732. +#endif
  10733.              {
  10734.                  kfree_skb(skb, FREE_READ);
  10735.                  return 0;
  10736. @@ -1904,7 +1945,7 @@
  10737.              sk->err=ECONNRESET;
  10738.              tcp_set_state(sk, TCP_CLOSE);
  10739.              sk->shutdown = SHUTDOWN_MASK;
  10740. -            sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
  10741. +            sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr, dev->pa_addr, skb->redirport);
  10742.              /* this is not really correct: we should check sk->users */
  10743.              if (sk && sk->state==TCP_LISTEN)
  10744.              {
  10745. diff -u --recursive --new-file pre2.0.6/linux/net/ipv4/udp.c linux/net/ipv4/udp.c
  10746. --- pre2.0.6/linux/net/ipv4/udp.c    Sun Apr 21 12:39:03 1996
  10747. +++ linux/net/ipv4/udp.c    Sun May 19 23:40:50 1996
  10748. @@ -48,6 +48,7 @@
  10749.   *        Jon Peatfield    :    Minor efficiency fix to sendto().
  10750.   *        Mike Shaver    :    RFC1122 checks.
  10751.   *        Alan Cox    :    Nonblocking error fix.
  10752. + *    Willy Konynenberg    :    Transparent proxying support.
  10753.   *
  10754.   *
  10755.   *        This program is free software; you can redistribute it and/or
  10756. @@ -161,7 +162,7 @@
  10757.      
  10758.      uh = (struct udphdr *)header;  
  10759.     
  10760. -    sk = get_sock(&udp_prot, uh->source, daddr, uh->dest, saddr);
  10761. +    sk = get_sock(&udp_prot, uh->source, daddr, uh->dest, saddr, 0, 0);
  10762.  
  10763.      if (sk == NULL) 
  10764.            return;    /* No socket for error */
  10765. @@ -315,6 +316,29 @@
  10766.      ufh.from = from;
  10767.      ufh.wcheck = 0;
  10768.  
  10769. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10770. +    if (rt&MSG_PROXY)
  10771. +    {
  10772. +        /*
  10773. +         * We map the first 8 bytes of a second sockaddr_in
  10774. +         * into the last 8 (unused) bytes of a sockaddr_in.
  10775. +         * This _is_ ugly, but it's the only way to do it
  10776. +         * easily,  without adding system calls.
  10777. +         */
  10778. +        struct sockaddr_in *sinfrom =
  10779. +            (struct sockaddr_in *) sin->sin_zero;
  10780. +
  10781. +        if (!suser())
  10782. +            return(-EPERM);
  10783. +        if (sinfrom->sin_family && sinfrom->sin_family != AF_INET)
  10784. +            return(-EINVAL);
  10785. +        if (sinfrom->sin_port == 0)
  10786. +            return(-EINVAL);
  10787. +        saddr = sinfrom->sin_addr.s_addr;
  10788. +        ufh.uh.source = sinfrom->sin_port;
  10789. +    }
  10790. +#endif
  10791. +
  10792.      /* RFC1122: OK.  Provides the checksumming facility (MUST) as per */
  10793.      /* 4.1.3.4. It's configurable by the application via setsockopt() */
  10794.      /* (MAY) and it defaults to on (MUST).  Almost makes up for the */
  10795. @@ -344,7 +368,11 @@
  10796.       *    Check the flags. We support no flags for UDP sending
  10797.       */
  10798.  
  10799. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10800. +    if (flags&~(MSG_DONTROUTE|MSG_PROXY))
  10801. +#else
  10802.      if (flags&~MSG_DONTROUTE) 
  10803. +#endif
  10804.            return(-EINVAL);
  10805.      /*
  10806.       *    Get and verify the address. 
  10807. @@ -361,6 +389,11 @@
  10808.      } 
  10809.      else 
  10810.      {
  10811. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10812. +        /* We need to provide a sockaddr_in when using MSG_PROXY. */
  10813. +        if (flags&MSG_PROXY)
  10814. +            return(-EINVAL);
  10815. +#endif
  10816.          if (sk->state != TCP_ESTABLISHED) 
  10817.              return(-EINVAL);
  10818.          sin.sin_family = AF_INET;
  10819. @@ -535,6 +568,23 @@
  10820.          sin->sin_family = AF_INET;
  10821.          sin->sin_port = skb->h.uh->source;
  10822.          sin->sin_addr.s_addr = skb->daddr;
  10823. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10824. +        if (flags&MSG_PROXY)
  10825. +        {
  10826. +            /*
  10827. +             * We map the first 8 bytes of a second sockaddr_in
  10828. +             * into the last 8 (unused) bytes of a sockaddr_in.
  10829. +             * This _is_ ugly, but it's the only way to do it
  10830. +             * easily,  without adding system calls.
  10831. +             */
  10832. +            struct sockaddr_in *sinto =
  10833. +                (struct sockaddr_in *) sin->sin_zero;
  10834. +
  10835. +            sinto->sin_family = AF_INET;
  10836. +            sinto->sin_port = skb->h.uh->dest;
  10837. +            sinto->sin_addr.s_addr = skb->saddr;
  10838. +        }
  10839. +#endif
  10840.        }
  10841.    
  10842.        skb_free_datagram(sk, skb);
  10843. @@ -614,6 +664,27 @@
  10844.      udp_queue_rcv_skb(sk, skb);
  10845.  }
  10846.  
  10847. +#ifdef CONFIG_IP_TRANSPARENT_PROXY
  10848. +/*
  10849. + *    Check whether a received UDP packet might be for one of our
  10850. + *    sockets.
  10851. + */
  10852. +
  10853. +int udp_chkaddr(struct sk_buff *skb)
  10854. +{
  10855. +    struct iphdr *iph = skb->h.iph;
  10856. +    struct udphdr *uh = (struct udphdr *)(skb->h.raw + iph->ihl*4);
  10857. +    struct sock *sk;
  10858. +
  10859. +    sk = get_sock(&udp_prot, uh->dest, iph->saddr, uh->source, iph->daddr, 0, 0);
  10860. +
  10861. +    if (!sk) return 0;
  10862. +    /* 0 means accept all LOCAL addresses here, not all the world... */
  10863. +    if (sk->rcv_saddr == 0) return 0;
  10864. +    return 1;
  10865. +}
  10866. +#endif
  10867. +
  10868.  /*
  10869.   *    All we need to do is get the socket, and then do a checksum. 
  10870.   */
  10871. @@ -709,7 +780,7 @@
  10872.      skb_trim(skb,len);
  10873.  
  10874.  #ifdef CONFIG_IP_MULTICAST
  10875. -    if (addr_type!=IS_MYADDR)
  10876. +    if (addr_type==IS_BROADCAST || addr_type==IS_MULTICAST)
  10877.      {
  10878.          /*
  10879.           *    Multicasts and broadcasts go to each listener.
  10880. @@ -743,7 +814,7 @@
  10881.          sk=(struct sock *)uh_cache_sk;
  10882.      else
  10883.      {
  10884. -          sk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr);
  10885. +          sk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr, dev->pa_addr, skb->redirport);
  10886.            uh_cache_saddr=saddr;
  10887.            uh_cache_daddr=daddr;
  10888.            uh_cache_dport=uh->dest;
  10889. @@ -754,7 +825,7 @@
  10890.      if (sk == NULL) 
  10891.        {
  10892.            udp_statistics.UdpNoPorts++;
  10893. -        if (addr_type == IS_MYADDR) 
  10894. +        if (addr_type != IS_BROADCAST && addr_type != IS_MULTICAST) 
  10895.          {
  10896.              icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0, dev);
  10897.          }
  10898. diff -u --recursive --new-file pre2.0.6/linux/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
  10899. --- pre2.0.6/linux/net/ipx/af_ipx.c    Mon May 13 23:02:53 1996
  10900. +++ linux/net/ipx/af_ipx.c    Mon May 20 08:08:36 1996
  10901. @@ -43,6 +43,7 @@
  10902.   *            protocol private area for ipx data.
  10903.   *    Revision 0.34:    Module support. <Jim Freeman>
  10904.   *    Revision 0.35:  Checksum support. <Neil Turton>, hooked in by <Alan Cox>
  10905. + *            Handles WIN95 discovery packets <Volker Lendecke>
  10906.   *
  10907.   *    Protect the module by a MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT
  10908.   *    pair. Also, now usage count is managed this way
  10909. @@ -732,7 +733,7 @@
  10910.       *    We firewall first, ask questions later.
  10911.       */
  10912.       
  10913. -    if (call_in_firewall(PF_IPX, skb->dev, ipx)!=FW_ACCEPT)
  10914. +    if (call_in_firewall(PF_IPX, skb->dev, ipx, NULL)!=FW_ACCEPT)
  10915.      {
  10916.          kfree_skb(skb, FREE_READ);
  10917.          return 0;
  10918. @@ -776,7 +777,7 @@
  10919.          /*
  10920.           *    See if we are allowed to firewall forward
  10921.           */
  10922. -        if (call_fw_firewall(PF_IPX, skb->dev, ipx)!=FW_ACCEPT)
  10923. +        if (call_fw_firewall(PF_IPX, skb->dev, ipx, NULL)!=FW_ACCEPT)
  10924.          {
  10925.              kfree_skb(skb, FREE_READ);
  10926.              return 0;
  10927. @@ -1344,7 +1345,7 @@
  10928.          ipx->ipx_checksum=ipx_set_checksum(ipx, len+sizeof(ipx_packet));
  10929.  
  10930.  #ifdef CONFIG_FIREWALL    
  10931. -    if(call_out_firewall(PF_IPX, skb->dev, ipx)!=FW_ACCEPT)
  10932. +    if(call_out_firewall(PF_IPX, skb->dev, ipx, NULL)!=FW_ACCEPT)
  10933.      {
  10934.          kfree_skb(skb, FREE_WRITE);
  10935.          return -EPERM;
  10936. @@ -2068,7 +2069,9 @@
  10937.      intrfc = ipxitf_find_using_phys(dev, pt->type);
  10938.      if (intrfc == NULL) 
  10939.      {
  10940. -        if (ipxcfg_auto_create_interfaces) {
  10941. +        if (ipxcfg_auto_create_interfaces &&
  10942. +            ntohl(ipx->ipx_dest.net)!=0L) 
  10943. +        {
  10944.              intrfc = ipxitf_auto_create(dev, pt->type);
  10945.          }
  10946.  
  10947. diff -u --recursive --new-file pre2.0.6/linux/net/netrom/nr_route.c linux/net/netrom/nr_route.c
  10948. --- pre2.0.6/linux/net/netrom/nr_route.c    Mon Apr  8 19:01:47 1996
  10949. +++ linux/net/netrom/nr_route.c    Sun May 19 23:40:51 1996
  10950. @@ -656,9 +656,9 @@
  10951.      
  10952.  #ifdef CONFIG_FIREWALL
  10953.  
  10954. -    if(ax25 && call_in_firewall(PF_NETROM, skb->dev, skb->data)!=FW_ACCEPT)
  10955. +    if(ax25 && call_in_firewall(PF_NETROM, skb->dev, skb->data, NULL)!=FW_ACCEPT)
  10956.          return 0;
  10957. -    if(!ax25 && call_out_firewall(PF_NETROM, skb->dev, skb->data)!=FW_ACCEPT)
  10958. +    if(!ax25 && call_out_firewall(PF_NETROM, skb->dev, skb->data, NULL)!=FW_ACCEPT)
  10959.          return 0;
  10960.  #endif
  10961.      nr_src  = (ax25_address *)(skb->data + 0);
  10962. @@ -695,7 +695,7 @@
  10963.          return 0;
  10964.  
  10965.  #ifdef CONFIG_FIREWALL
  10966. -    if(ax25 && call_fw_firewall(PF_NETROM, skb->dev, skb->data)!=FW_ACCEPT)
  10967. +    if(ax25 && call_fw_firewall(PF_NETROM, skb->dev, skb->data, NULL)!=FW_ACCEPT)
  10968.          return 0;
  10969.  #endif
  10970.  
  10971. diff -u --recursive --new-file pre2.0.6/linux/scripts/depend.awk linux/scripts/depend.awk
  10972. --- pre2.0.6/linux/scripts/depend.awk    Fri Apr 12 15:52:13 1996
  10973. +++ linux/scripts/depend.awk    Mon May 20 08:37:40 1996
  10974. @@ -94,12 +94,12 @@
  10975.          LASTFILE=FILENAME
  10976.          depname=FILENAME
  10977.          relpath=FILENAME
  10978. -        sub("\\.c",".o: ",depname)
  10979. -        sub("\\.S",".o: ",depname)
  10980. +        sub("\\.c$",".o: ",depname)
  10981. +        sub("\\.S$",".o: ",depname)
  10982.          if (depname==FILENAME) {
  10983.              cmd="\n\t@touch "depname
  10984.          }
  10985. -        sub("\\.h",".h: ",depname)
  10986. +        sub("\\.h$",".h: ",depname)
  10987.          if(relpath ~ "^\\." ) {
  10988.              sub("[^/]*$","",  relpath)
  10989.              relpath=relpath"/"
  10990. @@ -114,21 +114,28 @@
  10991.      if (fname=="linux/config.h") {
  10992.          hasconfig=1
  10993.      }
  10994. -    if(fileExists(relpath""fname)) {
  10995. +    rfname=relpath""fname
  10996. +    if(fileExists(rfname)) {
  10997.          found=1
  10998.          if (!hasdep) {
  10999.              printf "%s", depname
  11000.          }
  11001.          hasdep=1
  11002. -        printf " \\\n   %s", relpath""fname
  11003. +        printf " \\\n   %s", rfname
  11004.          if(fname ~ "^\\." ) {
  11005. -            if(!relpath in ARGV) {
  11006. -                ARGV[ARGC]=relpath""fname
  11007. +            fnd=0;
  11008. +            for(i in ARGV) {
  11009. +                if(ARGV[i]==rfname) {
  11010. +                    fnd=1
  11011. +                }
  11012. +            }
  11013. +            if(fnd==0) {
  11014. +                ARGV[ARGC]=rfname
  11015.                  ++ARGC
  11016.              }
  11017.          }
  11018.      } else {
  11019. -        for(path in  parray) {
  11020. +        for(path in parray) {
  11021.              if(fileExists(parray[path]"/"fname)) {
  11022.                  shortp=parray[path]
  11023.                  found=1
  11024.