home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / kernel-s / v1.2 / patch-1.011 / patch-1.2.2
Text File  |  1995-03-27  |  154KB  |  4,409 lines

  1. diff -u --recursive --new-file v1.2.1/linux/CREDITS linux/CREDITS
  2. --- v1.2.1/linux/CREDITS    Thu Mar  9 20:37:33 1995
  3. +++ linux/CREDITS    Wed Mar 22 10:42:43 1995
  4. @@ -275,10 +275,11 @@
  5.  S: USA
  6.  
  7.  N: Nigel Gamble
  8. -E: nigel%gamble.uucp@gate.net
  9. +E: nigel@nrg.org
  10. +E: nigel@sgi.com
  11.  D: Interrupt-driven printer driver
  12. -S: 301 Norwood Terrace, Apartment N226
  13. -S: Boca Raton, Florida 33431-6588
  14. +S: 765 N Rengstorff Ave, Apartment 7
  15. +S: Mountain View, California 94043-2420
  16.  S: USA
  17.  
  18.  N: Jacques Gelinas
  19. diff -u --recursive --new-file v1.2.1/linux/Makefile linux/Makefile
  20. --- v1.2.1/linux/Makefile    Sat Mar 18 12:45:44 1995
  21. +++ linux/Makefile    Wed Mar 22 10:34:26 1995
  22. @@ -1,6 +1,6 @@
  23.  VERSION = 1
  24.  PATCHLEVEL = 2
  25. -SUBLEVEL = 1
  26. +SUBLEVEL = 2
  27.  
  28.  ARCH = i386
  29.  
  30. diff -u --recursive --new-file v1.2.1/linux/README linux/README
  31. --- v1.2.1/linux/README    Sat Mar 18 12:45:44 1995
  32. +++ linux/README    Wed Mar 22 11:43:35 1995
  33. @@ -59,7 +59,7 @@
  34.          rm -rf linux
  35.          rm -rf asm
  36.          ln -s /usr/src/linux/include/linux .
  37. -        ln -s /usr/src/linux/include/asm .
  38. +        ln -s /usr/src/linux/include/asm-i386 .
  39.  
  40.   - make sure you have no stale .o files and dependencies lying around:
  41.  
  42. diff -u --recursive --new-file v1.2.1/linux/README.modules linux/README.modules
  43. --- v1.2.1/linux/README.modules    Tue Jan 31 09:39:02 1995
  44. +++ linux/README.modules    Sun Mar 26 11:56:23 1995
  45. @@ -45,6 +45,9 @@
  46.      Some misc modules:
  47.          lp: line printer
  48.          binfmt_elf: elf loader
  49. +                sbpcd:     CDROM-driver for Matsushita,Panasonic CR52x,CR56x
  50. +                sonycd535: CDROM-driver for Sony CD535
  51. +                aztcd:     CDROM-driver for Aztech,Orchid,Okano,Wearnes
  52.  
  53.  When you have made the kernel, you create the modules by doing:
  54.  
  55. diff -u --recursive --new-file v1.2.1/linux/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
  56. --- v1.2.1/linux/arch/i386/kernel/vm86.c    Sun Feb  5 13:21:31 1995
  57. +++ linux/arch/i386/kernel/vm86.c    Wed Mar 22 14:11:42 1995
  58. @@ -69,26 +69,34 @@
  59.  
  60.  static void mark_screen_rdonly(struct task_struct * tsk)
  61.  {
  62. -    pgd_t *pg_dir;
  63. +    pgd_t *pgd;
  64. +    pmd_t *pmd;
  65. +    pte_t *pte;
  66. +    int i;
  67.  
  68. -    pg_dir = PAGE_DIR_OFFSET(tsk, 0);
  69. -    if (!pgd_none(*pg_dir)) {
  70. -        pte_t *pg_table;
  71. -        int i;
  72. -
  73. -        if (pgd_bad(*pg_dir)) {
  74. -            printk("vm86: bad page table directory entry %08lx\n", pgd_val(*pg_dir));
  75. -            pgd_clear(pg_dir);
  76. -            return;
  77. -        }
  78. -        pg_table = (pte_t *) pgd_page(*pg_dir);
  79. -        pg_table += 0xA0000 >> PAGE_SHIFT;
  80. -        for (i = 0 ; i < 32 ; i++) {
  81. -            if (pte_present(*pg_table))
  82. -                *pg_table = pte_wrprotect(*pg_table);
  83. -            pg_table++;
  84. -        }
  85. +    pgd = pgd_offset(tsk, 0xA0000);
  86. +    if (pgd_none(*pgd))
  87. +        return;
  88. +    if (pgd_bad(*pgd)) {
  89. +        printk("vm86: bad pgd entry [%p]:%08lx\n", pgd, pgd_val(*pgd));
  90. +        pgd_clear(pgd);
  91. +        return;
  92. +    }
  93. +    pmd = pmd_offset(pgd, 0xA0000);
  94. +    if (pmd_none(*pmd))
  95. +        return;
  96. +    if (pmd_bad(*pmd)) {
  97. +        printk("vm86: bad pmd entry [%p]:%08lx\n", pmd, pmd_val(*pmd));
  98. +        pmd_clear(pmd);
  99. +        return;
  100. +    }
  101. +    pte = pte_offset(pmd, 0xA0000);
  102. +    for (i = 0; i < 32; i++) {
  103. +        if (pte_present(*pte))
  104. +            *pte = pte_wrprotect(*pte);
  105. +        pte++;
  106.      }
  107. +    invalidate();
  108.  }
  109.  
  110.  asmlinkage int sys_vm86(struct vm86_struct * v86)
  111. diff -u --recursive --new-file v1.2.1/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
  112. --- v1.2.1/linux/arch/i386/mm/init.c    Tue Jan 31 09:39:01 1995
  113. +++ linux/arch/i386/mm/init.c    Wed Mar 22 14:54:33 1995
  114. @@ -45,7 +45,7 @@
  115.      __asm__ __volatile__("cld ; rep ; stosl":
  116.          :"a" (pte_val(BAD_PAGE)),
  117.           "D" ((long) empty_bad_page_table),
  118. -         "c" (PTRS_PER_PAGE)
  119. +         "c" (PAGE_SIZE/4)
  120.          :"di","cx");
  121.      return (pte_t *) empty_bad_page_table;
  122.  }
  123. @@ -57,7 +57,7 @@
  124.      __asm__ __volatile__("cld ; rep ; stosl":
  125.          :"a" (0),
  126.           "D" ((long) empty_bad_page),
  127. -         "c" (PTRS_PER_PAGE)
  128. +         "c" (PAGE_SIZE/4)
  129.          :"di","cx");
  130.      return pte_mkdirty(mk_pte((unsigned long) empty_bad_page, PAGE_SHARED));
  131.  }
  132. @@ -69,7 +69,7 @@
  133.      __asm__ __volatile__("cld ; rep ; stosl":
  134.          :"a" (0),
  135.           "D" ((long) empty_zero_page),
  136. -         "c" (PTRS_PER_PAGE)
  137. +         "c" (PAGE_SIZE/4)
  138.          :"di","cx");
  139.      return (unsigned long) empty_zero_page;
  140.  }
  141. @@ -132,17 +132,17 @@
  142.      pg_dir = swapper_pg_dir;
  143.      while (address < end_mem) {
  144.          /* map the memory at virtual addr 0xC0000000 */
  145. -        if (pgd_none(pg_dir[768])) {
  146. -            pgd_set(pg_dir+768, (pte_t *) start_mem);
  147. +        pg_table = (pte_t *) (PAGE_MASK & pgd_val(pg_dir[768]));
  148. +        if (!pg_table) {
  149. +            pg_table = (pte_t *) start_mem;
  150.              start_mem += PAGE_SIZE;
  151.          }
  152. -        pg_table = (pte_t *) pgd_page(pg_dir[768]);
  153.  
  154.          /* also map it temporarily at 0x0000000 for init */
  155. -        pgd_set(pg_dir+768, pg_table);
  156. -        pgd_set(pg_dir, pg_table);
  157. +        pgd_val(pg_dir[0])   = _PAGE_TABLE | (unsigned long) pg_table;
  158. +        pgd_val(pg_dir[768]) = _PAGE_TABLE | (unsigned long) pg_table;
  159.          pg_dir++;
  160. -        for (tmp = 0 ; tmp < PTRS_PER_PAGE ; tmp++,pg_table++) {
  161. +        for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) {
  162.              if (address < end_mem)
  163.                  *pg_table = mk_pte(address, PAGE_SHARED);
  164.              else
  165. diff -u --recursive --new-file v1.2.1/linux/drivers/block/Makefile linux/drivers/block/Makefile
  166. --- v1.2.1/linux/drivers/block/Makefile    Sat Mar 18 12:45:45 1995
  167. +++ linux/drivers/block/Makefile    Sun Mar 26 11:56:23 1995
  168. @@ -43,6 +43,8 @@
  169.  ifdef CONFIG_AZTCD
  170.  OBJS := $(OBJS) aztcd.o
  171.  SRCS := $(SRCS) aztcd.c
  172. +else
  173. +BLOCK_MODULE_OBJS := $(BLOCK_MODULE_OBJS) aztcd.o
  174.  endif
  175.  
  176.  ifdef CONFIG_SBPCD
  177. diff -u --recursive --new-file v1.2.1/linux/drivers/block/README.aztcd linux/drivers/block/README.aztcd
  178. --- v1.2.1/linux/drivers/block/README.aztcd    Fri Feb  3 15:15:09 1995
  179. +++ linux/drivers/block/README.aztcd    Sun Mar 26 11:56:23 1995
  180. @@ -1,7 +1,7 @@
  181.                         Readme-File README.aztcd
  182.     for Aztech CD-ROM CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110 
  183.                            CD-ROM  Driver 
  184. -                    BETA-Version 0.6 and newer
  185. +                       Version 1.0 and newer
  186.                     (for other drives see 6.-8.)
  187.  
  188.  NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE
  189. @@ -28,15 +28,13 @@
  190.  ----------------------------------------------------------------------------
  191.  
  192.  1. NOTE 
  193. -This software has now been tested in some different machines with AZTECH
  194. -CDA268-01A, ORCHID CDS-3110 and ORCHID/WEARNES CDD110 and has proven to be 
  195. -pretty stable with kernel versions 1.0.0 to 1.1.75. Nevertheless I'd only
  196. -assign BETA status to the software, as the number of known users is still 
  197. -small. So when in 'day to day' use or when used with different firmware
  198. -versions of the CD-ROM drives, there still may be some problems. So I'm 
  199. -quite sure I'll see some bug reports (see chapter BUG REPORTS) and you are
  200. -invited in helping us to increase the number of drives, which are supported,
  201. -and in debugging this software (see chapters OTHER DRIVES and DEBUGGING).
  202. +This software has been successfully in alpha and beta test for quite a long
  203. +time with AZTECH CDA268-01A, ORCHID CDS-3110 and ORCHID/WEARNES CDD110 
  204. +and has proven to be stable with kernel versions 1.0.9 to 1.2.0. But with
  205. +any software there still may be bugs in it. So if you encounter problems,
  206. +you are invited to help us improve this software. Please send me a detailed
  207. +bug report (see chapter BUG REPORTS). You are also invited in helping us to 
  208. +increase the number of drives, which are supported.
  209.  
  210.  Please read the README-files carefully and always keep a backup copy of your 
  211.  old kernel, in order to reboot if something goes wrong!
  212. @@ -54,7 +52,7 @@
  213.  your kernel needs to have the ISO9660-filesystem support included.
  214.  
  215.  
  216. -3. CONFIGURING YOUR KERNEL
  217. +3.  CONFIGURING YOUR KERNEL
  218.  If your kernel is already configured for using the AZTECH driver you will
  219.  see the following message while Linux boots:
  220.      Aztech CD-ROM Init: DriverVersion=<version number> BaseAddress=<baseaddress>
  221. @@ -88,6 +86,7 @@
  222.  Slackware from CDROM. You can find the disk images at 'sunsite.unc.edu'; 
  223.  see file 'aztech.gz.README' for instructions on how to use it.
  224.  
  225. +
  226.  4. RECOMPILING YOUR KERNEL
  227.  If your kernel is not yet configured for the AZTECH driver and the ISO9660-
  228.  filesystem, you have to recompile your kernel: 
  229. @@ -99,16 +98,22 @@
  230.    Users of other drives should read chapter OTHER DRIVES of this file.
  231.    You also can configure that address by LILO boot parameter aztcd=... 
  232.  - Build a new kernel, configure it for 'Aztech/Orchid/Okano/Wearnes support' 
  233. -  and include the ISO9660-filesystem. 
  234. +  (if you want aztcd to be part of the kernel). Do not configure it for
  235. +  'Aztech... support', if you want to use aztcd as a run time loadable module. 
  236. +  But in any case you must have the ISO9660-filesystem included in your
  237. +  kernel.
  238.  - Activate the new kernel, normally this is done by running lilo (don't for-
  239.    get to configure it before and to keep a copy of your old kernel in case
  240.    something goes wrong!).
  241.  - Reboot
  242. -- You now should see during boot some messages like
  243. +- If you've included aztcd in your kernel, you now should see during boot 
  244. +  some messages like
  245.      Aztech CD-ROM Init: DriverVersion=<version number> BaseAddress=<baseaddress>
  246.      Aztech CD-ROM Init: FirmwareVersion=<firmware version id of your I/O-card>
  247.      Aztech CD-ROM Init: <drive type> detected
  248.      Aztech CD-ROM Init: End
  249. +- If you have not included aztcd in your kernel, but want to load aztcd as a 
  250. +  run time loadable module see 4.1. 
  251.  - If the message looks correct, as user 'root' you should be able to mount 
  252.    the drive by
  253.            mount -t iso9660 -r /dev/aztcd0 /mnt
  254. @@ -118,6 +123,26 @@
  255.        mkdir /mnt                       
  256.  - If this still does not help, see chapters OTHER DRIVES and DEBUGGING.
  257.  
  258. +4.1 AZTCD AS A RUN-TIME LOADABLE MODULE
  259. +If you do not need aztcd permanently, you can also load and remove the driver
  260. +during runtime via insmod and rmmod. To build aztcd as a loadable module you 
  261. +must *not* configure your kernel for AZTECH support. But you need to have
  262. +the ISO9660-filesystem included! So rebuild your kernel, if necessary.
  263. +
  264. +Now edit the base adress of your AZTECH interface card in
  265. +/usr/src/linux/include/linux/aztcd.h to the appropriate value. Then change
  266. +to /usr/src/linux and do a 
  267. +                    make modules  
  268. +                make modules_install
  269. +After that you can run-time load the driver via
  270. +                    insmod /lib/modules/X.X.X/misc/aztcd.o
  271. +and remove it via   rmmod  aztcd.
  272. +If you have not configured the correct base address, you can also supply the
  273. +base address when loading the driver via
  274. +                    insmod /lib/modules/X.X.X/misc/aztcd.o aztcd=<base address>
  275. +In all commands 'X.X.X' is the current linux kernel version number. For details
  276. +see file README.modules in /usr/src/linux.
  277. +
  278.  
  279.  5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS
  280.  The driver does not support applications such as photo CD, multi session CD
  281. @@ -185,9 +210,7 @@
  282.  driver before (especially if combined with a sound card) and then do a warm 
  283.  boot (CTRL-ALT-RESET) or start Linux from DOS, e.g. with 'loadlin'.
  284.  
  285. -Please give me positive or negative feedback, if you have tried it. Especially
  286. -you should tell me, how the version string reads during initialization. If you
  287. -don't succeed, read chapter DEBUGGING. Thanks in advance!
  288. +If you do not succeed, read chapter DEBUGGING. Thanks in advance!
  289.  
  290.  Sorry for the inconvenience, but it is difficult to develop for hardware, 
  291.  which you don't have available for testing. So if you like, please help us.
  292. @@ -412,7 +435,7 @@
  293.  Werner Zimmermann
  294.  Fachhochschule fuer Technik Esslingen
  295.  (EMail: zimmerma@rz.fht-esslingen.de)
  296. -Jan. 8, 1994
  297. +Mar 24, 1995
  298.  
  299.  ---------------------------------------------------------------------------
  300.  APPENDIX: Source code of cdplay.c
  301. diff -u --recursive --new-file v1.2.1/linux/drivers/block/README.sbpcd linux/drivers/block/README.sbpcd
  302. --- v1.2.1/linux/drivers/block/README.sbpcd    Sat Mar 18 12:45:45 1995
  303. +++ linux/drivers/block/README.sbpcd    Sat Mar 18 12:45:05 1995
  304. @@ -18,7 +18,7 @@
  305.  
  306.  The quad-speed TEAC CD-55A drive uses the same interface types, but has a
  307.  totally different command and flow control scheme. Support is under
  308. -construction, but splitted: Greg Nowicki (nowicki@tardis.larc.nasa.gov)
  309. +construction, but split: Greg Nowicki (nowicki@tardis.larc.nasa.gov)
  310.  cares about the separate driver "teaccd". Please, do not mail him merely for
  311.  asking "user questions" at the moment - the project is still a "baby".
  312.  
  313. diff -u --recursive --new-file v1.2.1/linux/drivers/block/aztcd.c linux/drivers/block/aztcd.c
  314. --- v1.2.1/linux/drivers/block/aztcd.c    Mon Feb  6 20:42:52 1995
  315. +++ linux/drivers/block/aztcd.c    Sun Mar 26 11:56:23 1995
  316. @@ -1,5 +1,5 @@
  317. -#define AZT_VERSION "V0.9"
  318. -/*      $Id: aztcd.c,v 0.90 1995/02/02 18:14:17 root Exp $
  319. +#define AZT_VERSION "V1.0"
  320. +/*      $Id: aztcd.c,v 1.0 1995/03/25 08:27:11 root Exp $
  321.      linux/drivers/block/aztcd.c - AztechCD268 CDROM driver
  322.  
  323.      Copyright (C) 1994,1995 Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
  324. @@ -99,12 +99,25 @@
  325.                  the channels on and off. If it works better with your drive, 
  326.                  please mail me. Also implemented ACMD_CLOSE for CDROMSTART.
  327.                  W.Zimmermann, Jan. 24, 1995
  328. +        V1.00   Implemented close and lock tray commands. Patches supplied by
  329. +        Frank Racis        
  330. +                Added support for loadable MODULEs, so aztcd can now also be
  331. +                loaded by insmod and removed by rmmod during run time
  332. +                Werner Zimmermann, Mar. 24, 95
  333.      NOTE: 
  334.      Points marked with ??? are questionable !
  335.  */
  336.  #include <linux/major.h>
  337.  #include <linux/config.h>
  338.  
  339. +#ifdef MODULE
  340. +# include <linux/module.h>
  341. +# include <linux/version.h>
  342. +# ifndef CONFIG_MODVERSIONS
  343. +    char kernel_version[]= UTS_RELEASE;
  344. +# endif
  345. +#endif
  346. +
  347.  #include <linux/errno.h>
  348.  #include <linux/sched.h>
  349.  #include <linux/mm.h>
  350. @@ -121,7 +134,14 @@
  351.  
  352.  #define MAJOR_NR AZTECH_CDROM_MAJOR 
  353.  
  354. -#include "blk.h"
  355. +#ifdef MODULE
  356. +# include "/usr/src/linux/drivers/block/blk.h"
  357. +#else
  358. +# include "blk.h"
  359. +# define MOD_INC_USE_COUNT
  360. +# define MOD_DEC_USE_COUNT
  361. +#endif
  362. +
  363.  #include <linux/aztcd.h>
  364.  
  365.  static int aztPresent = 0;
  366. @@ -174,7 +194,9 @@
  367.  
  368.  #define READ_TIMEOUT 3000
  369.  
  370. +#define azt_port aztcd  /*needed for the modutils*/
  371.  static short azt_port = AZT_BASE_ADDR;
  372. +
  373.  static char  azt_cont = 0;
  374.  static char  azt_init_end = 0;
  375.  
  376. @@ -208,6 +230,9 @@
  377.  static int  aztGetToc(void);
  378.  static int  aztGetValue(unsigned char *result);
  379.  static void aztStatTimer(void);
  380. +static void aztCloseDoor(void);
  381. +static void aztLockDoor(void);
  382. +static void aztUnlockDoor(void);
  383.  
  384.  static unsigned char aztIndatum;
  385.  static unsigned long aztTimeOutCount;
  386. @@ -300,6 +325,36 @@
  387.        azt_cont = ints[2];
  388.  }
  389.  
  390. +/*
  391. + * Subroutines to automatically close the door (tray) and 
  392. + * lock it closed when the cd is mounted.  Leave the tray
  393. + * locking as an option
  394. + */
  395. +static void aztCloseDoor(void)
  396. +{
  397. +  aztSendCmd(ACMD_CLOSE);
  398. +  STEN_LOW;
  399. +  return;
  400. +}
  401. +
  402. +static void aztLockDoor(void)
  403. +{
  404. +#ifdef AZT_ALLOW_TRAY_LOCK
  405. +  aztSendCmd(ACMD_LOCK);
  406. +  STEN_LOW;
  407. +#endif
  408. +  return;
  409. +}
  410. +
  411. +static void aztUnlockDoor(void)
  412. +{
  413. +#ifdef AZT_ALLOW_TRAY_LOCK
  414. +  aztSendCmd(ACMD_UNLOCK);
  415. +  STEN_LOW;
  416. +#endif
  417. +  return;
  418. +}
  419. +
  420.  /* 
  421.   * Send a single command, return -1 on error, else 0
  422.  */
  423. @@ -653,6 +708,7 @@
  424.                  STEN_LOW_WAIT;
  425.                  break;
  426.      case CDROMEJECT:
  427. +                aztUnlockDoor(); /* Assume user knows what they're doing */
  428.             /* all drives can at least stop! */
  429.          if (aztAudioStatus == CDROM_AUDIO_PLAY) 
  430.          { if (aztSendCmd(ACMD_STOP)) return -1;
  431. @@ -1193,8 +1249,15 @@
  432.      if (st == -1)
  433.          return -EIO;                    /* drive doesn't respond */
  434.  
  435. +        if (st&AST_DOOR_OPEN)
  436. +          {
  437. +            /* close door, then get the status again. */
  438. +            aztCloseDoor();     
  439. +            st = getAztStatus();
  440. +          }        
  441. +
  442.      if ((st&AST_DOOR_OPEN)||(st&AST_NOT_READY)) /* no disk in drive or door open*/
  443. -    {       /*???*/
  444. +    {       /* Door should be closed, probably no disk in drive */
  445.          printk("aztcd: no disk in drive or door open\n");
  446.          return -EIO;
  447.      }
  448. @@ -1204,6 +1267,8 @@
  449.  
  450.      }
  451.      ++azt_open_count;
  452. +        MOD_INC_USE_COUNT;
  453. +    aztLockDoor();
  454.  #ifdef AZT_DEBUG
  455.      printk("aztcd: exiting aztcd_open\n");
  456.  #endif
  457. @@ -1220,10 +1285,12 @@
  458.    printk("aztcd: executing aztcd_release\n");
  459.    printk("inode: %p, inode->i_rdev: %x    file: %p\n",inode,inode->i_rdev,file);
  460.  #endif
  461. +  MOD_DEC_USE_COUNT;
  462.    if (!--azt_open_count) {
  463.      azt_invalidate_buffers();
  464.      sync_dev(inode->i_rdev);             /*??? isn't it a read only dev?*/
  465.      invalidate_buffers(inode -> i_rdev);
  466. +    aztUnlockDoor();
  467.          CLEAR_TIMER;
  468.    }
  469.    return;
  470. @@ -1249,14 +1316,22 @@
  471.  /*
  472.   * Test for presence of drive and initialize it.  Called at boot time.
  473.   */
  474. +#ifndef MODULE 
  475.  unsigned long aztcd_init(unsigned long mem_start, unsigned long mem_end)
  476. +#else
  477. +int init_module(void)
  478. +#endif
  479.  {       long int count, max_count;
  480.      unsigned char result[50];
  481.      int st;
  482.  
  483.      if (azt_port <= 0) {
  484.        printk("aztcd: no Aztech CD-ROM Initialization");
  485. +#ifndef MODULE
  486.        return (mem_start);
  487. +#else
  488. +          return -EIO;
  489. +#endif      
  490.      }
  491.      printk("Aztech CD-ROM Init: Aztech, Orchid, Okano, Wearnes CD-ROM Driver\n");
  492.      printk("Aztech CD-ROM Init: (C) 1994,1995 Werner Zimmermann\n");
  493. @@ -1265,7 +1340,11 @@
  494.      if (check_region(azt_port, 4)) {
  495.        printk("aztcd: conflict, I/O port (%X) already used\n",
  496.           azt_port);
  497. +#ifndef MODULE
  498.        return (mem_start);
  499. +#else
  500. +          return -EIO;
  501. +#endif      
  502.      }
  503.  
  504.      /* check for card */
  505. @@ -1287,12 +1366,20 @@
  506.         STEN_LOW;
  507.         if (inb(DATA_PORT)!=AFL_OP_OK)    /*OP_OK?*/
  508.          { printk("aztcd: no AZTECH CD-ROM drive found\n");
  509. +#ifndef MODULE
  510.            return (mem_start);
  511. +#else
  512. +              return -EIO;
  513. +#endif         
  514.          } 
  515.         for (count = 0; count < AZT_TIMEOUT; count++);  /* delay a bit */
  516.         if ((st=getAztStatus())==-1)
  517.          { printk("aztcd: Drive Status Error Status=%x\n",st);
  518. +#ifndef MODULE
  519.            return (mem_start);
  520. +#else
  521. +              return -EIO;
  522. +#endif          
  523.          }
  524.  #ifdef AZT_DEBUG
  525.         printk("aztcd: Status = %x\n",st);
  526. @@ -1337,14 +1424,22 @@
  527.             for (count=1;count<5;count++) printk("%c",result[count]);
  528.             printk("\n");
  529.             printk("Aztech CD-ROM Init: Aborted\n");
  530. -           return (mem_start);   
  531. +#ifndef MODULE
  532. +           return (mem_start);
  533. +#else
  534. +               return -EIO;
  535. +#endif               
  536.           }
  537.       }
  538.      if (register_blkdev(MAJOR_NR, "aztcd", &azt_fops) != 0)
  539.      {
  540.          printk("aztcd: Unable to get major %d for Aztech CD-ROM\n",
  541.                 MAJOR_NR);
  542. +#ifndef MODULE               
  543.          return (mem_start);
  544. +#else
  545. +                return -EIO;
  546. +#endif        
  547.      }
  548.      blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
  549.      read_ahead[MAJOR_NR] = 4;
  550. @@ -1353,8 +1448,13 @@
  551.  
  552.      azt_invalidate_buffers();
  553.      aztPresent = 1;
  554. +    aztCloseDoor();
  555.      printk("Aztech CD-ROM Init: End\n");
  556. +#ifndef MODULE
  557.      return (mem_start);
  558. +#else
  559. +        return (0);
  560. +#endif
  561.  }
  562.  
  563.  
  564. @@ -1552,8 +1652,10 @@
  565.  
  566.      i = DiskInfo.last + 3;
  567.  
  568. +/* Is there a good reason to stop motor before TOC read?
  569.      if (aztSendCmd(ACMD_STOP)) return -1;
  570.      STEN_LOW_WAIT;
  571. +*/
  572.  
  573.      azt_mode = 0x05;
  574.      if (aztSendCmd(ACMD_SEEK_TO_LEADIN)) return -1; /*???*/
  575. @@ -1595,3 +1697,17 @@
  576.      return limit > 0 ? 0 : -1;
  577.  }
  578.  
  579. +#ifdef MODULE
  580. +void cleanup_module(void)
  581. +{ if (MOD_IN_USE)
  582. +    { printk("aztcd module in use - can't remove it.\n");
  583. +      return;
  584. +    }
  585. +  if ((unregister_blkdev(MAJOR_NR, "aztcd") == -EINVAL))    
  586. +    { printk("What's that: can't unregister aztcd\n");
  587. +      return;
  588. +    }
  589. +   release_region(azt_port,4);
  590. +   printk("aztcd module released.\n");
  591. +}   
  592. +#endif MODULE
  593. diff -u --recursive --new-file v1.2.1/linux/drivers/block/sbpcd.c linux/drivers/block/sbpcd.c
  594. --- v1.2.1/linux/drivers/block/sbpcd.c    Sat Mar 18 12:45:45 1995
  595. +++ linux/drivers/block/sbpcd.c    Wed Mar 22 10:34:00 1995
  596. @@ -228,17 +228,17 @@
  597.  #endif SBPCD_ISSUE
  598.  
  599.  #include <linux/config.h>
  600. -#include <linux/errno.h>
  601.  
  602.  #ifdef MODULE
  603. -#include <linux/malloc.h>
  604.  #include <linux/module.h>
  605.  #include <linux/version.h>
  606. +#include <linux/malloc.h>
  607.  #ifndef CONFIG_MODVERSIONS
  608.  char kernel_version[]=UTS_RELEASE;
  609.  #endif
  610.  #endif MODULE
  611.  
  612. +#include <linux/errno.h>
  613.  #include <linux/sched.h>
  614.  #include <linux/mm.h>
  615.  #include <linux/timer.h>
  616. @@ -1081,7 +1081,7 @@
  617.    i=inb(CDi_info);
  618.    DPRINTF((DBG_STA,"SBPCD: ResponseStatus: response %2X.\n", i));
  619.    EvaluateStatus(i);
  620. -  return (0);
  621. +  return (i);
  622.  }
  623.  /*==========================================================================*/
  624.  static void xx_ReadStatus(void)
  625. diff -u --recursive --new-file v1.2.1/linux/drivers/char/cyclades.c linux/drivers/char/cyclades.c
  626. --- v1.2.1/linux/drivers/char/cyclades.c    Sat Mar 18 12:45:46 1995
  627. +++ linux/drivers/char/cyclades.c    Fri Mar 24 17:18:01 1995
  628. @@ -1,5 +1,5 @@
  629.  static char rcsid[] =
  630. -"$Revision: 1.36.1.1 $$Date: 1995/03/13 15:44:43 $";
  631. +"$Revision: 1.36.1.3 $$Date: 1995/03/23 22:15:35 $";
  632.  /*
  633.   *  linux/kernel/cyclades.c
  634.   *
  635. @@ -18,6 +18,14 @@
  636.   *   int  cy_open(struct tty_struct *tty, struct file *filp);
  637.   *
  638.   * $Log: cyclades.c,v $
  639. + * Revision 1.36.1.3  1995/03/23  22:15:35  bentson
  640. + * add missing break in modem control block in ioctl switch statement
  641. + * (discovered by Michael Edward Chastain <mec@jobe.shell.portal.com>);
  642. + *
  643. + * Revision 1.36.1.2  1995/03/22  19:16:22  bentson
  644. + * make sure CTS flow control is set as soon as possible (thanks
  645. + * to note from David Lambert <lambert@chesapeake.rps.slb.com>);
  646. + *
  647.   * Revision 1.36.1.1  1995/03/13  15:44:43  bentson
  648.   * initialize defaults for receive threshold and stale data timeout;
  649.   * cosmetic changes;
  650. @@ -26,7 +34,7 @@
  651.   * added support of chips 4-7 in 32 port Cyclom-Ye;
  652.   * fix cy_interrupt pointer dereference problem
  653.   * (Joe Portman <baron@aa.net>);
  654. - * give better error response if open is attempted on non-existant port
  655. + * give better error response if open is attempted on non-existent port
  656.   * (Zachariah Vaum <jchryslr@netcom.com>);
  657.   * correct command timeout (Kenneth Lerman <lerman@@seltd.newnet.com>);
  658.   * conditional compilation for -16Y on systems with fast, noisy bus;
  659. @@ -1386,15 +1394,27 @@
  660.      }
  661.      
  662.      /* CTS flow control flag */
  663. -    if (cflag & CRTSCTS)
  664. +    if (cflag & CRTSCTS){
  665.      info->flags |= ASYNC_CTS_FLOW;
  666. -    else
  667. +    info->cor2 |= CyCtsAE;
  668. +    }else{
  669.      info->flags &= ~ASYNC_CTS_FLOW;
  670. +    info->cor2 &= ~CyCtsAE;
  671. +    }
  672.      if (cflag & CLOCAL)
  673.      info->flags &= ~ASYNC_CHECK_CD;
  674.      else
  675.      info->flags |= ASYNC_CHECK_CD;
  676.  
  677. +     /***********************************************
  678. +    The hardware option, CyRtsAO, presents RTS when
  679. +    the chip has characters to send.  Since most modems
  680. +    use RTS as reverse (inbound) flow control, this
  681. +    option is not used.  If inbound flow control is
  682. +    necessary, DTR can be programmed to provide the
  683. +    appropriate signals for use with a non-standard
  684. +    cable.  Contact Marcio Saito for details.
  685. +     ***********************************************/
  686.  
  687.      card = info->card;
  688.      channel = (info->line) - (cy_card[card].first_line);
  689. @@ -1459,19 +1479,6 @@
  690.  #endif
  691.      }
  692.  
  693. -    /* The hardware option, CyRtsAO, presents RTS when
  694. -       the chip has characters to send.  Since most modems
  695. -       use RTS as reverse (inbound) flow control, this
  696. -       option is not used.  If inbound flow control is
  697. -       necessary, DTR can be programmed to provide the
  698. -       appropriate signals.  Contact Marcio Saito for
  699. -       details. */
  700. -    if (C_CRTSCTS(info->tty)) {
  701. -        info->cor2 |= CyCtsAE;
  702. -    }else{
  703. -        info->cor2 &= ~CyCtsAE;
  704. -    }
  705. -
  706.      if (info->tty){
  707.          clear_bit(TTY_IO_ERROR, &info->tty->flags);
  708.      }
  709. @@ -2155,6 +2162,7 @@
  710.          case TIOCMBIC:
  711.          case TIOCMSET:
  712.              ret_val = set_modem_info(info, cmd, (unsigned int *) arg);
  713. +            break;
  714.  
  715.  /* The following commands are incompletely implemented!!! */
  716.          case TIOCGSOFTCAR:
  717. diff -u --recursive --new-file v1.2.1/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
  718. --- v1.2.1/linux/drivers/char/vc_screen.c    Wed Feb 15 10:50:55 1995
  719. +++ linux/drivers/char/vc_screen.c    Wed Mar 22 10:34:00 1995
  720. @@ -80,6 +80,7 @@
  721.      if (!vc_cons_allocated(cons))
  722.          return -ENXIO;
  723.  
  724. +    clear_selection();
  725.      size = vcs_size(inode);
  726.      if (count < 0 || p > size)
  727.          return -EINVAL;
  728. @@ -138,6 +139,7 @@
  729.      if (!vc_cons_allocated(cons))
  730.          return -ENXIO;
  731.  
  732. +    clear_selection();
  733.      size = vcs_size(inode);
  734.      if (count < 0 || p > size)
  735.          return -EINVAL;
  736. diff -u --recursive --new-file v1.2.1/linux/drivers/net/README.arcnet linux/drivers/net/README.arcnet
  737. --- v1.2.1/linux/drivers/net/README.arcnet    Thu Jan  1 02:00:00 1970
  738. +++ linux/drivers/net/README.arcnet    Fri Mar 24 17:20:02 1995
  739. @@ -0,0 +1,204 @@
  740. +
  741. +---------------------------------------------------------------------------
  742. +NOTE:  See also README.arcnet-jumpers in this directory for jumper-setting
  743. +information if you're like most of us and didn't happen to get a manual with
  744. +your ARCnet card.
  745. +---------------------------------------------------------------------------
  746. +
  747. +Since no one seems to listen to me otherwise, perhaps a poem will get your
  748. +attention:
  749. +            This is scary software
  750. +            If it works I DO CARE.
  751. +            
  752. +Hmm, I think I'm allowed to call that a poem, even though it's only two
  753. +lines.  Hey, I'm in Computer Science, not English.  Give me a break.
  754. +
  755. +The point is:  I REALLY REALLY REALLY REALLY REALLY want to hear from you if
  756. +you test this and get it working.  Or if you don't.  Or anything.
  757. +
  758. +ARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was
  759. +nice, but after that even FEWER people started writing to me because they
  760. +didn't even have to install the patch.  <sigh>
  761. +
  762. +Come on, be a sport!  Send me a success report!
  763. +
  764. +(hey, that was even better than my original poem... this is getting bad!)
  765. +
  766. +Anyway, enough complaining.  Let's get started:
  767. +
  768. +---------------------------------------------------------------------------
  769. +            
  770. +These are the ARCnet drivers for Linux.
  771. +
  772. +This is the first non-ALPHA release, so please be careful, and send all
  773. +possible success/failure reports to me.  If I don't know when/if/how it
  774. +works, I won't be able to answer people's questions.  Do we want that?  Of
  775. +course not.
  776. +
  777. +Once again:  DO send me success reports!  I want to know if this is working!
  778. +(You know, it might be argued that I'm pushing this point a little too much. 
  779. +If you think so, why not flame me in a quick little email?  Please also
  780. +include the type of card(s) you're using, software, size of network, and
  781. +whether it's working or not.)
  782. +
  783. +My e-mail address is:
  784. +    apenwarr@tourism.807-city.on.ca
  785. +
  786. +
  787. +Where do I discuss these drivers?
  788. +---------------------------------
  789. +
  790. +As of the 0.22 release, we have a mailing list specifically for discussion
  791. +of the ARCnet drivers for Linux, and anything you might want to interface
  792. +them with (ie. DOS).  I'll also post new versions of the Linux-ARCnet
  793. +distribution to the list in tar-gzip-uuencode format.
  794. +
  795. +To subscribe to the list, send a message to listserv@tourism.807-city.on.ca
  796. +with the following line in the BODY (not the SUBJECT) of your message:
  797. +    subscribe linux-arcnet YOUR REAL NAME
  798. +Remember to remove your signature, or you'll get an error back.
  799. +
  800. +Send all bug (or success) reports to me or to the list.
  801. +
  802. +You're free to use the comp.os.linux.development newsgroup too, but I can't
  803. +guarantee I'll see it there.  (Hopefully, if my news server stays sane, I
  804. +will.)
  805. +
  806. +Also, SMC (one of the companies that makes ARCnet cards) has a WorldWideWeb
  807. +site you might be interested in, which includes several drivers for various
  808. +cards including ARCnet.  Try:
  809. +    http://www.smc.com/
  810. +    
  811. +Novell makes a networking stack for DOS which includes ARCnet drivers.  Try
  812. +ftp'ing to ftp.novell.com.
  813. +
  814. +You can get the Crynwr packet driver collection (including arcether.com, the
  815. +one you'll want for arcnet cards) from oak.oakland.edu:/pub/msdos/pktdrvr. 
  816. +It won't work perfectly on a 386+ without patches, though, and also doesn't
  817. +like several cards.  Mail me if you want a fixed version.
  818. +
  819. +
  820. +Last warning:  This driver may be extremely dangerous, crash your computer,
  821. +or kill your dog!  (although I'm pretty sure that I've worked that one
  822. +out...)
  823. +
  824. +
  825. +Loadable Module Support
  826. +-----------------------
  827. +
  828. +This is a new feature as of 0.42 ALPHA.
  829. +
  830. +Configure and rebuild Linux.  When asked, say NO to "arcnet support" if you
  831. +want loadable module support.
  832. +
  833. +    make config
  834. +    make dep
  835. +    make clean    
  836. +    make zImage
  837. +    make modules
  838. +    
  839. +    
  840. +Booting into your "ARCnet" Kernel
  841. +---------------------------------
  842. +
  843. +If you're using a loadable module, you need to use insmod to load the
  844. +module, and you need to specify various characteristics of your card on the
  845. +command line.  For example:
  846. +    cd /usr/src/linux/modules
  847. +    insmod arcnet.o io=0x300 irqnum=2 shmem=0xd0000
  848. +You can also add a num=1, num=2 etc for additional arcnet cards that will
  849. +use arc1, arc2 etc for their device names (instead of the default, arc0).
  850. +    
  851. +Otherwise the driver will load and probe for your card automatically.
  852. +    
  853. +Now go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be
  854. +available where you picked up this driver.  Think of your ARCnet as a
  855. +souped-up (or down, as the case may be) ethernet card.
  856. +
  857. +By the way, be sure to change all references from "eth0" to "arc0" in the
  858. +HOWTOs.  Remember that ARCnet isn't a "true" ethernet, and the device name
  859. +is DIFFERENT.
  860. +
  861. +
  862. +How do I get it to work with...?
  863. +--------------------------------
  864. +
  865. +NFS: Should be fine linux->linux, just pretend you're using ethernet cards. 
  866. +        oak.oakland.edu:/pub/msdos/nfs has some nice DOS clients.  I can't
  867. +        get SOSS (dos-based server) to work, although someone has and can't
  868. +        figure out why it won't work for me.
  869. +
  870. +DOS: If you're using the freeware arcether.com, you might want to install
  871. +        the source code patch.  It helps with PC/TCP, and also can get
  872. +        arcether to load if it timed out too quickly.  Mail me if you need a
  873. +        precompiled version of arcether.com. (ie. you if don't have a DOS
  874. +        assembler)
  875. +    
  876. +Windows:  See DOS :)
  877. +
  878. +OS2: May work okay.  Please e-mail me if you find a freeware TCP/IP stack
  879. +        for OS/2.
  880. +        
  881. +LAN Manager and Windows for Workgroups: These programs use protocols that
  882. +        are incompatible with ARCnet for Linux.  Rather than using the
  883. +        internet-standard ARCnet protocol, they try to pretend the cards are
  884. +        ethernet, and confuse everyone else on the network.
  885. +        
  886. +        An upcoming release of ARCnet for Linux may have workarounds for
  887. +    this stupid behaviour.
  888. +
  889. +
  890. +It works: what now?
  891. +-------------------
  892. +
  893. +Send mail describing your setup, preferably including driver version, kernel
  894. +version, ARCnet card model, CPU type, number of systems on your network, and
  895. +list of software in use to me at the following address:
  896. +    apenwarr@tourism.807-city.on.ca
  897. +
  898. +I do send (sometimes automated) replies to all messages I receive.  My mail
  899. +host is quite weird, so if you don't get a reply within a reasonable time,
  900. +please resend.
  901. +
  902. +
  903. +It doesn't work: what now?
  904. +--------------------------
  905. +
  906. +Do the same as above, but also include the output of the ifconfig and route
  907. +commands, as well as any pertinent log entries (ie: anything that starts
  908. +with "arcnet:" and has shown up since the last reboot) in your mail.
  909. +
  910. +If you want to try fixing it yourself (I highly recommend that you mail me
  911. +about the problem first, since it might already have been solved) you may
  912. +want to try some of the debug levels available.  For heavy testing on
  913. +DEBUG_DURING or more, it would be a REALLY good idea to kill your klogd
  914. +daemon first!  DEBUG_DURING displays 4-5 lines for each packet sent or
  915. +received.  DEBUG_TX and RX actually DISPLAY each packet as it is sent or
  916. +received, which is obviously quite big.
  917. +
  918. +You can run the arcdump shell script (available from me) as root to list the
  919. +contents of the arcnet buffers at any time.  To make any sense at all out of
  920. +this, you should grab the pertinent RFC's. (some are listed near the top of
  921. +arcnet.c).  arcdump assumes your card is at 0xD0000.  If it isn't, edit the
  922. +script.
  923. +
  924. +Buffers #0 and 1 are used for receiving, and Buffers #2 and 3 are for
  925. +sending.  Ping-pong buffers are implemented both ways, just to confuse you.
  926. +
  927. +If your debug level is DEBUG_DURING or more, the buffers are cleared to a
  928. +constant value of 0x42 every time the card is reset (which should only
  929. +happen when you do an ifconfig up, or when Linux decides that the driver is
  930. +broken).  This is to make it easier to figure out which bytes are being used
  931. +by a packet.
  932. +
  933. +You can change the debug level without recompiling the kernel by typing:
  934. +    ifconfig arc0 down metric 1x
  935. +    /etc/rc.d/rc.inet1
  936. +where "x" is the debug level you want.  For example, "metric 14" would put
  937. +you at debug level 4.  Debug level 3 is the default (D_EXTRA).
  938. +
  939. +
  940. +I want to send money: what now?
  941. +-------------------------------
  942. +
  943. +Go take a nap or something.  You'll feel better in the morning.
  944. diff -u --recursive --new-file v1.2.1/linux/drivers/net/README.arcnet-jumpers linux/drivers/net/README.arcnet-jumpers
  945. --- v1.2.1/linux/drivers/net/README.arcnet-jumpers    Thu Jan  1 02:00:00 1970
  946. +++ linux/drivers/net/README.arcnet-jumpers    Fri Mar 24 17:20:02 1995
  947. @@ -0,0 +1,1561 @@
  948. +
  949. +-----------------------------------------------------------------------------
  950. +This file is a supplement to README.arcnet.  Please read that for general
  951. +driver configuration help.
  952. +-----------------------------------------------------------------------------
  953. +
  954. +Because so many people (myself included) seem to have obtained ARCnet cards
  955. +without manuals, this will be a quick listing of all jumper settings I can
  956. +find.  Please e-mail apenwarr@tourism.807-city.on.ca with any settings for
  957. +your particular card.
  958. +
  959. +Even if your ARCnet model isn't listed, but has the same jumpers, please
  960. +e-mail me to say so.
  961. +
  962. +If your model isn't listed, and has different settings, PLEASE PLEASE tell
  963. +me.  I had to figure mine out without the manual, and it WASN'T FUN!
  964. +
  965. +Cards Listed in this file:
  966. +
  967. +    Manufacturer    Model #        Bits
  968. +    ------------    -------        ----
  969. +    SMC        PC100        8
  970. +    SMC        PC110        8
  971. +    SMC        PC120        8
  972. +    SMC        PC130        8
  973. +    SMC        PC270E        8
  974. +    SMC        PC500        16
  975. +    SMC        PC500Longboard    16
  976. +    SMC        PC550Longboard    16
  977. +    SMC        PC600        16
  978. +    Puredata    PDI507        16
  979. +    CNet Tech    CN120-Series    8
  980. +    CNet Tech    CN160-Series    16
  981. +    No Name        --        8/16
  982. +
  983. +** SMC = Standard Microsystems Corp.
  984. +** CNet Tech = CNet Technology, Inc.
  985. +
  986. +The model # is listed right above specifics for that card.  Don't forget to
  987. +read "quick briefing" first, since it applies to all ARCnets.
  988. +
  989. +
  990. +Unclassified Stuff
  991. +------------------
  992. +  - Please send any other information you can find.
  993. +  
  994. +  - And some unknowns (other info is welcome!):
  995. +     From: root@ultraworld.xs4all.nl (Timo Hilbrink)
  996. +     To: apenwarr@tourism.807-city.on.ca (Avery Pennarun)
  997. +     Date: Wed, 26 Oct 1994 02:10:32 +0000 (GMT)
  998. +     Reply-To: timoh@xs4all.nl
  999. +
  1000. +     [...parts deleted...]
  1001. +
  1002. +     About the jumpers: On my PC130 there is one more jumper, located near the
  1003. +     cable-connector and it's for changing to star or bus topology; 
  1004. +     closed: star - open: bus
  1005. +     On the PC500 are some more jumper-pins, one block labled with RX,PDN,TXI
  1006. +     and another with ALE,LA17,LA18,LA19 these are undocumented..
  1007. +
  1008. +     [...more parts deleted...]
  1009. +
  1010. +     --- CUT ---
  1011. +
  1012. +
  1013. +Quick Briefing:
  1014. +---------------
  1015. +
  1016. +All ARCnet cards should have a total of four different settings:
  1017. +  - the I/O address:  this is the "port" your ARCnet card is on.  Probed
  1018. +    values, as of v0.14, are only from 0x200 through 0x3F0. (If your card
  1019. +    has additional ones, which is possible, please tell me.) This should not
  1020. +    be the same as any other device on your system.  Supposedly MS Windows
  1021. +    prefers values of 0x300 or more, eating netconnections on my system
  1022. +    otherwise.
  1023. +    - Avery's favourite: 0x300.
  1024. +
  1025. +  - the IRQ:  on 8-bit cards, it might be 2 (9), 3, 4, 5, or 7.
  1026. +             on 16-bit cards, it might be 2 (9), 3, 4, 5, 7, or 9-15.  Make
  1027. +    sure this is different from any other card on your system.  Note that
  1028. +    IRQ2 is the same as IRQ9, as far as Linux is concerned.
  1029. +    - Avery's favourite: IRQ2.
  1030. +
  1031. +  - the memory address:  Unlike most cards, ARCnets use "shared memory" for
  1032. +    copying buffers around.  Make SURE it doesn't conflict with any other
  1033. +    used memory in your system!
  1034. +    A0000        - VGA graphics memory (ok if you don't have VGA)
  1035. +        B0000        - Monochrome text mode
  1036. +        C0000        \  One of these is your VGA BIOS - usually C0000.
  1037. +        E0000        /
  1038. +        F0000        - System BIOS
  1039. +
  1040. +    Anything less than 0xA0000 is, well, a BAD idea since it isn't above
  1041. +    640k.
  1042. +    - Avery's favourite: 0xD0000
  1043. +
  1044. +  - the station address:  Every ARCnet card has its own "unique" network
  1045. +    address from 0 to 255.  Unlike ethernet, you can set this address
  1046. +    yourself.  Since it's only 8 bits, you can only have 254 ARCnet cards on
  1047. +    a network.  DON'T use 0 or 255, since these are reserved. (although neat
  1048. +    stuff will probably happen if you DO use them).  By the way, if you
  1049. +    haven't already guessed, don't set this the same as any other ARCnet on
  1050. +    your network!
  1051. +    - Avery's favourite:  3 and 4.  Not that it matters.
  1052. +
  1053. +
  1054. +** Standard Microsystems Corp (SMC) **
  1055. +PC100, PC110, PC120, PC130 (8-bit cards)
  1056. +PC500, PC600 (16-bit cards)
  1057. +---------------------------------
  1058. +  - mainly from Avery Pennarun <apenwarr@tourism.807-city.on.ca>
  1059. +  - values depicted are from Avery's setup.
  1060. +  - special thanks to Timo Hilbrink <timoh@xs4all.nl> for noting that PC120,
  1061. +    130, 500, and 600 all have the same switches as Avery's PC100. 
  1062. +    PC500/600 have several extra, undocumented pins though. (?)
  1063. +  - PC110 settings were verified by Stephen A. Wood <saw@cebaf.gov>
  1064. +  
  1065. +
  1066. +     JP5               [|]    :    :    :    :
  1067. +(IRQ Setting)              IRQ2  IRQ3 IRQ4 IRQ5 IRQ7
  1068. +        Put exactly one jumper on exactly one set of pins.
  1069. +
  1070. +                          1  2   3  4  5  6   7  8  9 10
  1071. +     S1                /----------------------------------\
  1072. +(I/O and Memory        |  1  1 * 0  0  0  0 * 1  1  0  1  |
  1073. + addresses)            \----------------------------------/
  1074. +                          |--|   |--------|   |--------|
  1075. +                          (a)       (b)           (m)
  1076. +
  1077. +        a: The first digit of the I/O address.
  1078. +            Setting        Value
  1079. +            -------        -----
  1080. +            00        0
  1081. +            01        1
  1082. +            10        2
  1083. +            11        3
  1084. +
  1085. +        b: The second digit of the I/O address.
  1086. +            Setting        Value
  1087. +            -------        -----
  1088. +            0000        0
  1089. +            0001        1
  1090. +            0010        2
  1091. +            ...        ...
  1092. +            1110        E
  1093. +            1111        F
  1094. +
  1095. +        The I/O address is in the form ab0.  For example, if
  1096. +        a is 0x2 and b is 0xE, the address will be 0x2E0.
  1097. +
  1098. +        DO NOT SET THIS LESS THAN 0x200!!!!!
  1099. +
  1100. +
  1101. +        m: The first digit of the memory address.
  1102. +            Setting        Value
  1103. +            -------        -----
  1104. +            0000        0
  1105. +            0001        1
  1106. +            0010        2
  1107. +            ...        ...
  1108. +            1110        E
  1109. +            1111        F
  1110. +
  1111. +        The memory address is in the form m0000.  For example, if
  1112. +        m is D, the address will be 0xD0000.
  1113. +
  1114. +        DO NOT SET THIS TO C0000, F0000, OR LESS THAN A0000!
  1115. +
  1116. +                          1  2  3  4  5  6  7  8
  1117. +     S2                /--------------------------\
  1118. +(Station Address)      |  1  1  0  0  0  0  0  0  |
  1119. +                       \--------------------------/
  1120. +
  1121. +            Setting        Value
  1122. +            -------        -----
  1123. +            00000000    00
  1124. +            10000000    01
  1125. +            01000000    02
  1126. +            ...
  1127. +            01111111    FE
  1128. +            11111111    FF
  1129. +
  1130. +        Note that this is binary with the digits reversed!
  1131. +
  1132. +        DO NOT SET THIS TO 0 OR 255 (0xFF)!
  1133. +
  1134. +*****************************************************************************
  1135. +
  1136. +** Standard Microsystems Corp (SMC) **
  1137. +PC130E/PC270E (8-bit cards)
  1138. +---------------------------
  1139. +  - from Juergen Seifert <seifert@htwm.de>
  1140. +
  1141. +
  1142. +STANDARD MICROSYSTEMS CORPORATION (SMC) ARCNET(R)-PC130E/PC270E
  1143. +===============================================================
  1144. +
  1145. +This description has been written by Juergen Seifert <seifert@htwm.de>
  1146. +using information from the following Original SMC Manual 
  1147. +
  1148. +             "Configuration Guide for
  1149. +             ARCNET(R)-PC130E/PC270
  1150. +            Network Controller Boards
  1151. +                Pub. # 900.044A
  1152. +                   June, 1989"
  1153. +
  1154. +ARCNET is a registered trademark of the Datapoint Corporation
  1155. +SMC is a registered trademark of the Standard Microsystems Corporation  
  1156. +
  1157. +The PC130E is an enhanced version of the PC130 board, is equipped with a 
  1158. +standard BNC female connector for connection to RG-62/U coax cable.
  1159. +Since this board is designed both for point-to-point connection in star
  1160. +networks and for connection to bus networks, it is downwardly compatible 
  1161. +with all the other standard boards designed for coax networks (that is,
  1162. +the PC120, PC110 and PC100 star topology boards and the PC220, PC210 and 
  1163. +PC200 bus topology boards).
  1164. +
  1165. +The PC270E is an enhanced version of the PC260 board, is equipped with two 
  1166. +modular RJ11-type jacks for connection to twisted pair wiring.
  1167. +It can be used in a star or a daisy-chained network.
  1168. +
  1169. +
  1170. +         8 7 6 5 4 3 2 1
  1171. +    ________________________________________________________________
  1172. +   |   |       S1        |                                          |
  1173. +   |   |_________________|                                          |
  1174. +   |    Offs|Base |I/O Addr                                         |
  1175. +   |     RAM Addr |                                              ___|
  1176. +   |         ___  ___                                       CR3 |___|
  1177. +   |        |   \/   |                                      CR4 |___|
  1178. +   |        |  PROM  |                                           ___|
  1179. +   |        |        |                                        N |   | 8
  1180. +   |        | SOCKET |                                        o |   | 7
  1181. +   |        |________|                                        d |   | 6
  1182. +   |                   ___________________                    e |   | 5
  1183. +   |                  |                   |                   A | S | 4
  1184. +   |       |oo| EXT2  |                   |                   d | 2 | 3
  1185. +   |       |oo| EXT1  |       SMC         |                   d |   | 2
  1186. +   |       |oo| ROM   |      90C63        |                   r |___| 1
  1187. +   |       |oo| IRQ7  |                   |               |o|  _____|
  1188. +   |       |oo| IRQ5  |                   |               |o| | J1  |
  1189. +   |       |oo| IRQ4  |                   |              STAR |_____|
  1190. +   |       |oo| IRQ3  |                   |                   | J2  |
  1191. +   |       |oo| IRQ2  |___________________|                   |_____|
  1192. +   |___                                               ______________|
  1193. +       |                                             |
  1194. +       |_____________________________________________|
  1195. +
  1196. +Legend:
  1197. +
  1198. +SMC 90C63    ARCNET Controller / Transceiver /Logic
  1199. +S1    1-3:    I/O Base Address Select
  1200. +    4-6:    Memory Base Address Select
  1201. +    7-8:    RAM Offset Select
  1202. +S2    1-8:    Node ID Select
  1203. +EXT        Extended Timeout Select
  1204. +ROM        ROM Enable Select
  1205. +STAR        Selected - Star Topology    (PC130E only)
  1206. +        Deselected - Bus Topology    (PC130E only)
  1207. +CR3/CR4        Diagnostic LEDs
  1208. +J1        BNC RG62/U Connector        (PC130E only)
  1209. +J1        6-position Telephone Jack    (PC270E only)
  1210. +J2        6-position Telephone Jack    (PC270E only)
  1211. +
  1212. +Setting one of the switches to Off/Open means "1", On/Closed means "0".
  1213. +
  1214. +
  1215. +Setting the Node ID
  1216. +-------------------
  1217. +
  1218. +The eight switches in group S2 are used to set the node ID.
  1219. +Each node attached to the network must have an unique node ID which
  1220. +must be diffrent from 0.
  1221. +Switch 1 serves as the least significant bit (LSB).
  1222. +
  1223. +The node ID is the sum of the values of all switches set to "1"  
  1224. +These values are:
  1225. +    Switch | Value
  1226. +    -------|-------
  1227. +      1    |   1
  1228. +      2    |   2
  1229. +      3    |   4
  1230. +      4    |   8
  1231. +      5    |  16
  1232. +      6    |  32
  1233. +      7    |  64
  1234. +      8    | 128
  1235. +
  1236. +Some Examples:
  1237. +
  1238. +    Switch         | Hex     | Decimal 
  1239. +   8 7 6 5 4 3 2 1 | Node ID | Node ID
  1240. +   ----------------|---------|---------
  1241. +   0 0 0 0 0 0 0 0 |    not allowed
  1242. +   0 0 0 0 0 0 0 1 |    1    |    1 
  1243. +   0 0 0 0 0 0 1 0 |    2    |    2
  1244. +   0 0 0 0 0 0 1 1 |    3    |    3
  1245. +       . . .       |         |
  1246. +   0 1 0 1 0 1 0 1 |   55    |   85
  1247. +       . . .       |         |
  1248. +   1 0 1 0 1 0 1 0 |   AA    |  170
  1249. +       . . .       |         |  
  1250. +   1 1 1 1 1 1 0 1 |   FD    |  253
  1251. +   1 1 1 1 1 1 1 0 |   FE    |  254
  1252. +   1 1 1 1 1 1 1 1 |   FF    |  255
  1253. +
  1254. +
  1255. +Setting the I/O Base Address
  1256. +----------------------------
  1257. +
  1258. +The first three switches in switch group S1 are used to select one
  1259. +of eight possible I/O Base addresses using the followig table
  1260. +
  1261. +
  1262. +   Switch | Hex I/O
  1263. +   1 2 3  | Address
  1264. +   -------|--------
  1265. +   0 0 0  |  260
  1266. +   0 0 1  |  290
  1267. +   0 1 0  |  2E0  (Manufactor's default)
  1268. +   0 1 1  |  2F0
  1269. +   1 0 0  |  300
  1270. +   1 0 1  |  350
  1271. +   1 1 0  |  380
  1272. +   1 1 1  |  3E0
  1273. +
  1274. +
  1275. +Setting the Base Memory (RAM) buffer Address
  1276. +--------------------------------------------
  1277. +
  1278. +The memory buffer requires 2K of a 16K block of RAM. The base of this
  1279. +16K block can be located in any of eight positions.
  1280. +Switches 4-6 of switch group S1 select the Base of the 16K block.
  1281. +Within that 16K address space, the buffer may be assigned any one of four 
  1282. +positions, determined by the offset, switches 7 and 8 of group S1.
  1283. +
  1284. +   Switch     | Hex RAM | Hex ROM
  1285. +   4 5 6  7 8 | Address | Address *)
  1286. +   -----------|---------|-----------
  1287. +   0 0 0  0 0 |  C0000  |  C2000
  1288. +   0 0 0  0 1 |  C0800  |  C2000
  1289. +   0 0 0  1 0 |  C1000  |  C2000
  1290. +   0 0 0  1 1 |  C1800  |  C2000
  1291. +              |         |
  1292. +   0 0 1  0 0 |  C4000  |  C6000
  1293. +   0 0 1  0 1 |  C4800  |  C6000
  1294. +   0 0 1  1 0 |  C5000  |  C6000
  1295. +   0 0 1  1 1 |  C5800  |  C6000
  1296. +              |         |
  1297. +   0 1 0  0 0 |  CC000  |  CE000
  1298. +   0 1 0  0 1 |  CC800  |  CE000
  1299. +   0 1 0  1 0 |  CD000  |  CE000
  1300. +   0 1 0  1 1 |  CD800  |  CE000
  1301. +              |         |
  1302. +   0 1 1  0 0 |  D0000  |  D2000  (Manufactor's default)
  1303. +   0 1 1  0 1 |  D0800  |  D2000
  1304. +   0 1 1  1 0 |  D1000  |  D2000
  1305. +   0 1 1  1 1 |  D1800  |  D2000
  1306. +              |         |
  1307. +   1 0 0  0 0 |  D4000  |  D6000
  1308. +   1 0 0  0 1 |  D4800  |  D6000
  1309. +   1 0 0  1 0 |  D5000  |  D6000
  1310. +   1 0 0  1 1 |  D5800  |  D6000
  1311. +              |         |
  1312. +   1 0 1  0 0 |  D8000  |  DA000
  1313. +   1 0 1  0 1 |  D8800  |  DA000
  1314. +   1 0 1  1 0 |  D9000  |  DA000
  1315. +   1 0 1  1 1 |  D9800  |  DA000
  1316. +              |         |
  1317. +   1 1 0  0 0 |  DC000  |  DE000
  1318. +   1 1 0  0 1 |  DC800  |  DE000
  1319. +   1 1 0  1 0 |  DD000  |  DE000
  1320. +   1 1 0  1 1 |  DD800  |  DE000
  1321. +              |         |
  1322. +   1 1 1  0 0 |  E0000  |  E2000
  1323. +   1 1 1  0 1 |  E0800  |  E2000
  1324. +   1 1 1  1 0 |  E1000  |  E2000
  1325. +   1 1 1  1 1 |  E1800  |  E2000
  1326. +  
  1327. +*) To enable the 8K Boot PROM install the jumper ROM.
  1328. +   The default is jumper ROM not installed.
  1329. +
  1330. +
  1331. +Setting the Timeouts and Interrupt
  1332. +----------------------------------
  1333. +
  1334. +The jumpers labeled EXT1 and EXT2 are used to determine the timeout 
  1335. +parameters. These two jumpers are normally left open.
  1336. +Refer to the COM9026 Data Sheet for alternate configurations.
  1337. +
  1338. +To select a hardware interrupt level set one (only one!) of the jumpers
  1339. +IRQ2, IRQ3, IRQ4, IRQ5, IRQ7. The Manufactor's default is IRQ2.
  1340. +
  1341. +Configuring the PC130E for Star or Bus Topology
  1342. +-----------------------------------------------
  1343. +
  1344. +The single jumper labeled STAR is used to configure the PC130E board for 
  1345. +star or bus topology.
  1346. +When the jumper is installed, the board may be used in a star network, when 
  1347. +it is removed, the board can be used in a bus topology.
  1348. +
  1349. +
  1350. +Diagnostic LEDs
  1351. +---------------
  1352. +
  1353. +Two diagnostic LEDs are visible on the rear bracket of the board.
  1354. +The green LED monitors the network activity: the red one shows the
  1355. +board activity:
  1356. +
  1357. + Green  | Status               Red      | Status
  1358. + -------|-------------------   ---------|-------------------
  1359. +  on    | normal activity      flash/on | data transfer
  1360. +  blink | reconfiguration      off      | no data transfer;
  1361. +  off   | defectiv board or             | incorect memory or
  1362. +        | node ID is zero               | I/O address
  1363. +
  1364. +
  1365. +*****************************************************************************
  1366. +
  1367. +** Standard Microsystems Corp (SMC) **
  1368. +PC500/PC550 Long Board (16-bit cards)
  1369. +-------------------------------------
  1370. +  - from Juergen Seifert <seifert@htwm.de>
  1371. +
  1372. +
  1373. +STANDARD MICROSYSTEMS CORPORATION (SMC) ARCNET-PC500/PC550 Long Board
  1374. +=====================================================================
  1375. +
  1376. +Note: There is another Version of the PC500 called Short Version, which 
  1377. +      is different in hard- and software! The most important differences
  1378. +      are:
  1379. +      - The long board has no Shared memory
  1380. +      - On the long board the selection of the interrupt is done by binary
  1381. +        coded switch, on the short board directly by jumper.
  1382. +
  1383. +
  1384. +This description has been written by Juergen Seifert <seifert@htwm.de>
  1385. +using information from the following Original SMC Manual 
  1386. +
  1387. +             "Configuration Guide for
  1388. +             SMC ARCNET-PC500/PC550
  1389. +         Series Network Controller Boards
  1390. +             Pub. # 900.033 Rev. A
  1391. +                November, 1989"
  1392. +
  1393. +ARCNET is a registered trademark of the Datapoint Corporation
  1394. +SMC is a registered trademark of the Standard Microsystems Corporation  
  1395. +
  1396. +The PC500 is equipped with a standard BNC female connector for connection
  1397. +to RG-62/U coax cable.
  1398. +The board is designed both for point-to-point connection in star networks
  1399. +and for connection to bus networks.
  1400. +
  1401. +The PC550 is equipped with two modular RJ11-type jacks for connection
  1402. +to twisted pair wiring.
  1403. +It can be used in a star or a daisy-chained network.
  1404. +
  1405. +       1 
  1406. +       0 9 8 7 6 5 4 3 2 1     6 5 4 3 2 1
  1407. +    ____________________________________________________________________
  1408. +   < |         SW1         | |     SW2     |                            |
  1409. +   > |_____________________| |_____________|                            |
  1410. +   <   IRQ    |I/O Addr                                                 |
  1411. +   >                                                                 ___|
  1412. +   <                                                            CR4 |___|
  1413. +   >                                                            CR3 |___|
  1414. +   <                                                                 ___|
  1415. +   >                                                              N |   | 8
  1416. +   <                                                              o |   | 7
  1417. +   >                                                              d | S | 6
  1418. +   <                                                              e | W | 5
  1419. +   >                                                              A | 3 | 4
  1420. +   <                                                              d |   | 3
  1421. +   >                                                              d |   | 2
  1422. +   <                                                              r |___| 1
  1423. +   >                                                        |o|    _____|
  1424. +   <                                                        |o|   | J1  |
  1425. +   >  3 1                                                   JP6   |_____|
  1426. +   < |o|o| JP2                                                    | J2  |
  1427. +   > |o|o|                                                        |_____|
  1428. +   <  4 2__                                               ______________|
  1429. +   >    |  |                                             |
  1430. +   <____|  |_____________________________________________|
  1431. +
  1432. +Legend:
  1433. +
  1434. +SW1    1-6:    I/O Base Address Select
  1435. +    7-10:    Interrupt Select
  1436. +SW2    1-6:    Reserved for Future Use
  1437. +SW3    1-8:    Node ID Select
  1438. +JP2    1-4:    Extended Timeout Select
  1439. +JP6        Selected - Star Topology    (PC500 only)
  1440. +        Deselected - Bus Topology    (PC500 only)
  1441. +CR3    Green    Monitors Network Activity
  1442. +CR4    Red    Monitors Board Activity
  1443. +J1        BNC RG62/U Connector        (PC500 only)
  1444. +J1        6-position Telephone Jack    (PC550 only)
  1445. +J2        6-position Telephone Jack    (PC550 only)
  1446. +
  1447. +Setting one of the switches to Off/Open means "1", On/Closed means "0".
  1448. +
  1449. +
  1450. +Setting the Node ID
  1451. +-------------------
  1452. +
  1453. +The eight switches in group SW3 are used to set the node ID. Each node
  1454. +attached to the network must have an unique node ID which must be 
  1455. +diffrent from 0.
  1456. +Switch 1 serves as the least significant bit (LSB).
  1457. +
  1458. +The node ID is the sum of the values of all switches set to "1"  
  1459. +These values are:
  1460. +
  1461. +    Switch | Value
  1462. +    -------|-------
  1463. +      1    |   1
  1464. +      2    |   2
  1465. +      3    |   4
  1466. +      4    |   8
  1467. +      5    |  16
  1468. +      6    |  32
  1469. +      7    |  64
  1470. +      8    | 128
  1471. +
  1472. +Some Examples:
  1473. +
  1474. +    Switch         | Hex     | Decimal 
  1475. +   8 7 6 5 4 3 2 1 | Node ID | Node ID
  1476. +   ----------------|---------|---------
  1477. +   0 0 0 0 0 0 0 0 |    not allowed
  1478. +   0 0 0 0 0 0 0 1 |    1    |    1 
  1479. +   0 0 0 0 0 0 1 0 |    2    |    2
  1480. +   0 0 0 0 0 0 1 1 |    3    |    3
  1481. +       . . .       |         |
  1482. +   0 1 0 1 0 1 0 1 |   55    |   85
  1483. +       . . .       |         |
  1484. +   1 0 1 0 1 0 1 0 |   AA    |  170
  1485. +       . . .       |         |  
  1486. +   1 1 1 1 1 1 0 1 |   FD    |  253
  1487. +   1 1 1 1 1 1 1 0 |   FE    |  254
  1488. +   1 1 1 1 1 1 1 1 |   FF    |  255 
  1489. +
  1490. +
  1491. +Setting the I/O Base Address
  1492. +----------------------------
  1493. +
  1494. +The first six switches in switch group SW1 are used to select one
  1495. +of 32 possible I/O Base addresses using the followig table
  1496. +
  1497. +   Switch       | Hex I/O
  1498. +   6 5  4 3 2 1 | Address
  1499. +   -------------|--------
  1500. +   0 1  0 0 0 0 |  200
  1501. +   0 1  0 0 0 1 |  210
  1502. +   0 1  0 0 1 0 |  220
  1503. +   0 1  0 0 1 1 |  230
  1504. +   0 1  0 1 0 0 |  240
  1505. +   0 1  0 1 0 1 |  250
  1506. +   0 1  0 1 1 0 |  260
  1507. +   0 1  0 1 1 1 |  270
  1508. +   0 1  1 0 0 0 |  280
  1509. +   0 1  1 0 0 1 |  290
  1510. +   0 1  1 0 1 0 |  2A0
  1511. +   0 1  1 0 1 1 |  2B0
  1512. +   0 1  1 1 0 0 |  2C0
  1513. +   0 1  1 1 0 1 |  2D0
  1514. +   0 1  1 1 1 0 |  2E0 (Manufactor's default)
  1515. +   0 1  1 1 1 1 |  2F0
  1516. +   1 1  0 0 0 0 |  300
  1517. +   1 1  0 0 0 1 |  310
  1518. +   1 1  0 0 1 0 |  320
  1519. +   1 1  0 0 1 1 |  330
  1520. +   1 1  0 1 0 0 |  340
  1521. +   1 1  0 1 0 1 |  350
  1522. +   1 1  0 1 1 0 |  360
  1523. +   1 1  0 1 1 1 |  370
  1524. +   1 1  1 0 0 0 |  380
  1525. +   1 1  1 0 0 1 |  390
  1526. +   1 1  1 0 1 0 |  3A0
  1527. +   1 1  1 0 1 1 |  3B0
  1528. +   1 1  1 1 0 0 |  3C0
  1529. +   1 1  1 1 0 1 |  3D0
  1530. +   1 1  1 1 1 0 |  3E0
  1531. +   1 1  1 1 1 1 |  3F0
  1532. +
  1533. +
  1534. +Setting the Interrupt
  1535. +---------------------
  1536. +
  1537. +Switches seven through ten of switch group SW1 are used to select the 
  1538. +interrupt level. The interrupt level is binary coded, so selections 
  1539. +from 0 to 15 would be possible, but only the following eight values will
  1540. +be supported: 3, 4, 5, 7, 9, 10, 11, 12.
  1541. +
  1542. +   Switch   | IRQ
  1543. +   10 9 8 7 | 
  1544. +   ---------|-------- 
  1545. +    0 0 1 1 |  3
  1546. +    0 1 0 0 |  4
  1547. +    0 1 0 1 |  5
  1548. +    0 1 1 1 |  7
  1549. +    1 0 0 1 |  9 (=2) (default)
  1550. +    1 0 1 0 | 10
  1551. +    1 0 1 1 | 11
  1552. +    1 1 0 0 | 12
  1553. +
  1554. +
  1555. +Setting the Timeouts 
  1556. +--------------------
  1557. +
  1558. +The two jumpers JP2 (1-4) are used to determine the timeout parameters. 
  1559. +These two jumpers are normally left open.
  1560. +Refer to the COM9026 Data Sheet for alternate configurations.
  1561. +
  1562. +
  1563. +Configuring the PC500 for Star or Bus Topology
  1564. +----------------------------------------------
  1565. +
  1566. +The single jumper labeled JP6 is used to configure the PC500 board for 
  1567. +star or bus topology.
  1568. +When the jumper is installed, the board may be used in a star network, when 
  1569. +it is removed, the board can be used in a bus topology.
  1570. +
  1571. +
  1572. +Diagnostic LEDs
  1573. +---------------
  1574. +
  1575. +Two diagnostic LEDs are visible on the rear bracket of the board.
  1576. +The green LED monitors the network activity: the red one shows the
  1577. +board activity:
  1578. +
  1579. + Green  | Status               Red      | Status
  1580. + -------|-------------------   ---------|-------------------
  1581. +  on    | normal activity      flash/on | data transfer
  1582. +  blink | reconfiguration      off      | no data transfer;
  1583. +  off   | defectiv board or             | incorect memory or
  1584. +        | node ID is zero               | I/O address
  1585. +
  1586. +
  1587. +*****************************************************************************
  1588. +
  1589. +** PureData Corp **
  1590. +PDI507 (16-bit card)
  1591. +--------------------
  1592. +    - from Mark Rejhon <mdrejhon@magi.com> (slight modifications by
  1593. +      Avery)
  1594. +    - Send questions/suggestions/etc about this text to Mark.
  1595. +
  1596. +Jumpers:
  1597. +
  1598. +    There is a jumper array at the bottom of the card, near the edge
  1599. +        connector.  This array is labelled J1.  They control the IRQs and
  1600. +        something else.  Put only one jumper on the IRQ pins.
  1601. +
  1602. +    IRQ2    - Use IRQ 2 (same as IRQ 9 as far as software is concerned)
  1603. +    IRQ3    - Use IRQ 3 (used by COM2 or COM4 serial port if either exists)
  1604. +    IRQ4    - Use IRQ 4 (used by COM1 or COM3 serial port if either exists)
  1605. +    IRQ5    - Use IRQ 5 (used by LPT2 parallel port if one exists)
  1606. +    IRQ6    - Use IRQ 6 (used by Floppy Disk Controller if one exists)
  1607. +    IRQ7    - Use IRQ 7 (used by LPT1 parallel port if one exists)
  1608. +
  1609. +[Avery's note:  This "unknown" set of two jumpers appears to be on all
  1610. +ARCnet cards by SMC as well.  Putting jumpers on them seems to affect the
  1611. +status register, but only for the two "reserved" bits, ETS1 and ETS2.  Any
  1612. +further information is welcome.]
  1613. +
  1614. +    ET1    - What is this?  (Not tested, no jumper put on it)
  1615. +    ET2    - What is this?  (Not tested, no jumper put on it)
  1616. +
  1617. +    There is a J2 jumper on two pins.  A jumper should be put on them,
  1618. +        since it was already there when I got the card.  I don't know what
  1619. +        this jumper is for though.
  1620. +
  1621. +    There is a two-jumper array for J3.  I don't know what it is for,
  1622. +        but there were already two jumpers on it when I got the card.  It's
  1623. +        a six pin grid in a two-by-three fashion.  The jumpers were
  1624. +        configured as follows:
  1625. +
  1626. +       .-------.
  1627. +     o | o   o |
  1628. +       :-------:    ------> Accessible end of card with connectors
  1629. +     o | o   o |             in this direction ------->
  1630. +       `-------'
  1631. +
  1632. +    There is also a J4 jumper on two pins.  A jumper should be put on
  1633. +        them, since it was already there when I got the card.  I don't know
  1634. +        what this jumper is for though.
  1635. +
  1636. +
  1637. +DIP Switches:
  1638. +
  1639. +    The dipswitches accessible on the accessible end of the card while
  1640. +        it is installed, is used to set the arcnet address.  There are 8
  1641. +        switches.  Use an address from 1 to 254.
  1642. +
  1643. +    Switch No.
  1644. +    12345678    Arcnet address
  1645. +    -----------------------------------------
  1646. +    00000000    FF      (Don't use this!)
  1647. +    00000001    FE
  1648. +    00000010    FD
  1649. +    ....
  1650. +    11111101    2    
  1651. +    11111110    1
  1652. +    11111111    0    (Don't use this!)
  1653. +
  1654. +    There is another dipswitch array of 8 switches at the top of the
  1655. +        card.  There are five labelled MS0-MS4 which seem to control the
  1656. +        memory address, and another three labelled IO0-IO2 which seem to
  1657. +        control the base I/O address of the card.
  1658. +
  1659. +    This was difficult to test by trial and error, and the I/O addresses
  1660. +        are in a weird order.  This was tested by setting the DIP switches,
  1661. +        rebooting the computer, and attempting to load ARCETHER at various
  1662. +        addresses (mostly between 0x200 and 0x400).  The address that caused
  1663. +        the red transmit LED to blink, is the one that I thought works.
  1664. +
  1665. +    Also, the address 0x3D0 seem to have a special meaning, since the
  1666. +        ARCETHER packet driver loaded fine, but without the red LED
  1667. +        blinking.  I don't know what 0x3D0 is for though.  I recommend using
  1668. +        an address of 0x300 since Windows may not like addresses below
  1669. +        0x300.
  1670. +
  1671. +    IO Switch No.
  1672. +    210             I/O address
  1673. +    -------------------------------
  1674. +    111             0x260
  1675. +    110             0x290
  1676. +    101             0x2E0
  1677. +    100             0x2F0
  1678. +    011             0x300
  1679. +    010             0x350
  1680. +    001             0x380
  1681. +    000             0x3E0
  1682. +
  1683. +    The memory switches set a reserved address space of 0x1000 bytes
  1684. +        (0x100 segment units, or 4k).  For example if I set an address of
  1685. +        0xD000, it will use up addresses 0xD000 to 0xD100.
  1686. +
  1687. +    The memory switches were tested by booting using QEMM386 stealth,
  1688. +        and using LOADHI to see what address automatically became excluded
  1689. +        from the upper memory regions, and then attempting to load ARCETHER
  1690. +        using these addresses.
  1691. +
  1692. +    I recommend using an arcnet memory address of 0xD000, and putting
  1693. +        the EMS page frame at 0xC000 while using QEMM stealth mode.  That
  1694. +        way, you get contiguous high memory from 0xD100 almost all the way
  1695. +        the end of the megabyte.
  1696. +
  1697. +    Memory Switch 0 (MS0) didn't seem to work properly when set to OFF
  1698. +        on my card.  It could be malfunctioning on my card.  Experiment with
  1699. +        it ON first, and if it doesn't work, set it to OFF.  (It may be a
  1700. +        modifier for the 0x200 bit?)
  1701. +
  1702. +    MS Switch No.
  1703. +    43210           Memory address
  1704. +    --------------------------------
  1705. +    00001           0xE100  (guessed - was not detected by QEMM)
  1706. +    00011           0xE000  (guessed - was not detected by QEMM)
  1707. +    00101           0xDD00
  1708. +    00111           0xDC00
  1709. +    01001           0xD900
  1710. +    01011           0xD800
  1711. +    01101           0xD500
  1712. +    01111           0xD400
  1713. +    10001           0xD100
  1714. +    10011           0xD000
  1715. +    10101           0xCD00
  1716. +    10111           0xCC00
  1717. +    11001           0xC900 (guessed - crashes tested system)
  1718. +    11011           0xC800 (guessed - crashes tested system)
  1719. +    11101           0xC500 (guessed - crashes tested system)
  1720. +    11111           0xC400 (guessed - crashes tested system)
  1721. +    
  1722. +    
  1723. +*****************************************************************************
  1724. +
  1725. +** CNet Technology Inc. **
  1726. +120 Series (8-bit cards)
  1727. +------------------------
  1728. +  - from Juergen Seifert <seifert@htwm.de>
  1729. +
  1730. +CNET TECHNOLOGY INC. (CNet) ARCNET 120A SERIES
  1731. +==============================================
  1732. +
  1733. +This description has been written by Juergen Seifert <seifert@htwm.de>
  1734. +using information from the following Original CNet Manual 
  1735. +
  1736. +              "ARCNET
  1737. +            USER'S MANUAL 
  1738. +                for
  1739. +               CN120A
  1740. +               CN120AB
  1741. +               CN120TP
  1742. +               CN120ST
  1743. +               CN120SBT
  1744. +             P/N:12-01-0007
  1745. +             Revision 3.00"
  1746. +
  1747. +ARCNET is a registered trademark of the Datapoint Corporation
  1748. +
  1749. +P/N 120A   ARCNET 8 bit XT/AT Star
  1750. +P/N 120AB  ARCNET 8 bit XT/AT Bus
  1751. +P/N 120TP  ARCNET 8 bit XT/AT Twisted Pair
  1752. +P/N 120ST  ARCNET 8 bit XT/AT Star, Twisted Pair
  1753. +P/N 120SBT ARCNET 8 bit XT/AT Star, Bus, Twisted Pair
  1754. +
  1755. +    __________________________________________________________________
  1756. +   |                                                                  |
  1757. +   |                                                               ___|
  1758. +   |                                                          LED |___|
  1759. +   |                                                               ___|
  1760. +   |                                                            N |   | ID7
  1761. +   |                                                            o |   | ID6
  1762. +   |                                                            d | S | ID5
  1763. +   |                                                            e | W | ID4
  1764. +   |                     ___________________                    A | 2 | ID3
  1765. +   |                    |                   |                   d |   | ID2
  1766. +   |                    |                   |  1 2 3 4 5 6 7 8  d |   | ID1
  1767. +   |                    |                   | _________________ r |___| ID0
  1768. +   |                    |      90C65        ||       SW1       |  ____|
  1769. +   |  JP 8 7            |                   ||_________________| |    |
  1770. +   |    |o|o|  JP1      |                   |                    | J2 |
  1771. +   |    |o|o|  |oo|     |                   |         JP 1 1 1   |    |
  1772. +   |   ______________   |                   |            0 1 2   |____|
  1773. +   |  |  PROM        |  |___________________|           |o|o|o|  _____|
  1774. +   |  >  SOCKET      |  JP 6 5 4 3 2                    |o|o|o| | J1  |
  1775. +   |  |______________|    |o|o|o|o|o|                   |o|o|o| |_____|
  1776. +   |_____                 |o|o|o|o|o|                   ______________|
  1777. +         |                                             |
  1778. +         |_____________________________________________|
  1779. +
  1780. +Legend:
  1781. +
  1782. +90C65       ARCNET Probe
  1783. +S1  1-5:    Base Memory Address Select
  1784. +    6-8:    Base I/O Address Select
  1785. +S2  1-8:    Node ID Select (ID0-ID7)
  1786. +JP1     ROM Enable Select
  1787. +JP2     IRQ2
  1788. +JP3     IRQ3
  1789. +JP4     IRQ4
  1790. +JP5     IRQ5
  1791. +JP6     IRQ7
  1792. +JP7/JP8     ET1, ET2 Timeout Parameters
  1793. +JP10/JP11   Coax / Twisted Pair Select  (CN120ST/SBT only)
  1794. +JP12        Terminator Select       (CN120AB/ST/SBT only)
  1795. +J1      BNC RG62/U Connector        (all except CN120TP)
  1796. +J2      Two 6-position Telephone Jack   (CN120TP/ST/SBT only)
  1797. +
  1798. +Setting one of the switches to Off means "1", On means "0".
  1799. +
  1800. +
  1801. +Setting the Node ID
  1802. +-------------------
  1803. +
  1804. +The eight switches in SW2 are used to set the node ID. Each node attached
  1805. +to the network must have an unique node ID which must be diffrent from 0.
  1806. +Switch 1 (ID0) serves as the least significant bit (LSB).
  1807. +
  1808. +The node ID is the sum of the values of all switches set to "1"  
  1809. +These values are:
  1810. +
  1811. +   Switch | Label | Value
  1812. +   -------|-------|-------
  1813. +     1    | ID0   |   1
  1814. +     2    | ID1   |   2
  1815. +     3    | ID2   |   4
  1816. +     4    | ID3   |   8
  1817. +     5    | ID4   |  16
  1818. +     6    | ID5   |  32
  1819. +     7    | ID6   |  64
  1820. +     8    | ID7   | 128
  1821. +
  1822. +Some Examples:
  1823. +
  1824. +    Switch         | Hex     | Decimal 
  1825. +   8 7 6 5 4 3 2 1 | Node ID | Node ID
  1826. +   ----------------|---------|---------
  1827. +   0 0 0 0 0 0 0 0 |    not allowed
  1828. +   0 0 0 0 0 0 0 1 |    1    |    1 
  1829. +   0 0 0 0 0 0 1 0 |    2    |    2
  1830. +   0 0 0 0 0 0 1 1 |    3    |    3
  1831. +       . . .       |         |
  1832. +   0 1 0 1 0 1 0 1 |   55    |   85
  1833. +       . . .       |         |
  1834. +   1 0 1 0 1 0 1 0 |   AA    |  170
  1835. +       . . .       |         |  
  1836. +   1 1 1 1 1 1 0 1 |   FD    |  253
  1837. +   1 1 1 1 1 1 1 0 |   FE    |  254
  1838. +   1 1 1 1 1 1 1 1 |   FF    |  255
  1839. +
  1840. +
  1841. +Setting the I/O Base Address
  1842. +----------------------------
  1843. +
  1844. +The last three switches in switch block SW1 are used to select one
  1845. +of eight possible I/O Base addresses using the followig table
  1846. +
  1847. +
  1848. +   Switch      | Hex I/O
  1849. +    6   7   8  | Address
  1850. +   ------------|--------
  1851. +   ON  ON  ON  |  260
  1852. +   OFF ON  ON  |  290
  1853. +   ON  OFF ON  |  2E0  (Manufactor's default)
  1854. +   OFF OFF ON  |  2F0
  1855. +   ON  ON  OFF |  300
  1856. +   OFF ON  OFF |  350
  1857. +   ON  OFF OFF |  380
  1858. +   OFF OFF OFF |  3E0
  1859. +
  1860. +
  1861. +Setting the Base Memory (RAM) buffer Address
  1862. +--------------------------------------------
  1863. +
  1864. +The memory buffer (RAM) requires 2K. The base of this buffer can be 
  1865. +located in any of eight positions. The address of the Boot Prom is
  1866. +memory base + 8K or memory base + 0x2000.
  1867. +Switches 1-5 of switch block SW1 select the Memory Base address.
  1868. +
  1869. +   Switch              | Hex RAM | Hex ROM
  1870. +    1   2   3   4   5  | Address | Address *)
  1871. +   --------------------|---------|-----------
  1872. +   ON  ON  ON  ON  ON  |  C0000  |  C2000
  1873. +   ON  ON  OFF ON  ON  |  C4000  |  C6000
  1874. +   ON  ON  ON  OFF ON  |  CC000  |  CE000
  1875. +   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufactor's default)
  1876. +   ON  ON  ON  ON  OFF |  D4000  |  D6000
  1877. +   ON  ON  OFF ON  OFF |  D8000  |  DA000
  1878. +   ON  ON  ON  OFF OFF |  DC000  |  DE000
  1879. +   ON  ON  OFF OFF OFF |  E0000  |  E2000
  1880. +  
  1881. +*) To enable the Boot ROM install the jumper JP1
  1882. +
  1883. +Note: Since the switches 1 and 2 are always set to ON it may be possible
  1884. +      that they can be used to add an offset of 2K, 4K or 6K to the base
  1885. +      address, but this feature is not documented in the manual and I
  1886. +      haven't testet it yet.
  1887. +
  1888. +
  1889. +Setting the Interrupt Line
  1890. +--------------------------
  1891. +
  1892. +To select a hardware interrupt level install one (only one!) of the jumpers
  1893. +JP2, JP3, JP4, JP5, JP6. JP2 is the default.
  1894. +
  1895. +   Jumper | IRQ     
  1896. +   -------|-----
  1897. +     2    |  2
  1898. +     3    |  3
  1899. +     4    |  4
  1900. +     5    |  5
  1901. +     6    |  7
  1902. +
  1903. +
  1904. +Setting the Internal Terminator on CN120AB/TP/SBT
  1905. +--------------------------------------------------
  1906. +
  1907. +The jumper JP12 is used to enable the internal terminator. 
  1908. +
  1909. +                         -----
  1910. +       0                |  0  |     
  1911. +     -----   ON         |     |  ON
  1912. +    |  0  |             |  0  |
  1913. +    |     |  OFF         -----   OFF
  1914. +    |  0  |                0
  1915. +     -----
  1916. +   Terminator          Terminator 
  1917. +    disabled            enabled
  1918. +  
  1919. +
  1920. +Selecting the Connector Type on CN120ST/SBT
  1921. +-------------------------------------------
  1922. +
  1923. +     JP10    JP11        JP10    JP11
  1924. +                         -----   -----
  1925. +       0       0        |  0  | |  0  |       
  1926. +     -----   -----      |     | |     |
  1927. +    |  0  | |  0  |     |  0  | |  0  |
  1928. +    |     | |     |      -----   -----
  1929. +    |  0  | |  0  |        0       0 
  1930. +     -----   -----
  1931. +     Coaxial Cable       Twisted Pair Cable 
  1932. +       (Default)
  1933. +
  1934. +
  1935. +Setting the Timeout Parameters
  1936. +------------------------------
  1937. +
  1938. +The jumpers labeled EXT1 and EXT2 are used to determine the timeout 
  1939. +parameters. These two jumpers are normally left open.
  1940. +
  1941. +
  1942. +
  1943. +*****************************************************************************
  1944. +
  1945. +** CNet Technology Inc. **
  1946. +160 Series (16-bit cards)
  1947. +-------------------------
  1948. +  - from Juergen Seifert <seifert@htwm.de>
  1949. +
  1950. +CNET TECHNOLOGY INC. (CNet) ARCNET 160A SERIES
  1951. +==============================================
  1952. +
  1953. +This description has been written by Juergen Seifert <seifert@htwm.de>
  1954. +using information from the following Original CNet Manual 
  1955. +
  1956. +              "ARCNET
  1957. +            USER'S MANUAL 
  1958. +                for
  1959. +               CN160A
  1960. +               CN160AB
  1961. +               CN160TP
  1962. +             P/N:12-01-0006
  1963. +             Revision 3.00"
  1964. +
  1965. +ARCNET is a registered trademark of the Datapoint Corporation
  1966. +
  1967. +P/N 160A   ARCNET 16 bit XT/AT Star
  1968. +P/N 160AB  ARCNET 16 bit XT/AT Bus
  1969. +P/N 160TP  ARCNET 16 bit XT/AT Twisted Pair
  1970. +
  1971. +   ___________________________________________________________________
  1972. +  <                             _________________________          ___|
  1973. +  >               |oo| JP2     |                         |    LED |___|
  1974. +  <               |oo| JP1     |        9026             |    LED |___|
  1975. +  >                            |_________________________|         ___|
  1976. +  <                                                             N |   | ID7
  1977. +  >                                                      1      o |   | ID6
  1978. +  <                                    1 2 3 4 5 6 7 8 9 0      d | S | ID5
  1979. +  >         _______________           _____________________     e | W | ID4
  1980. +  <        |     PROM      |         |         SW1         |    A | 2 | ID3
  1981. +  >        >    SOCKET     |         |_____________________|    d |   | ID2
  1982. +  <        |_______________|          | IO-Base   | MEM   |     d |   | ID1
  1983. +  >                                                             r |___| ID0
  1984. +  <                                                               ____|
  1985. +  >                                                              |    |
  1986. +  <                                                              | J1 |
  1987. +  >                                                              |    |
  1988. +  <                                                              |____|
  1989. +  >                            1 1 1 1                                |
  1990. +  <  3 4 5 6 7      JP     8 9 0 1 2 3                                |
  1991. +  > |o|o|o|o|o|           |o|o|o|o|o|o|                               |
  1992. +  < |o|o|o|o|o| __        |o|o|o|o|o|o|                    ___________|
  1993. +  >            |  |                                       |
  1994. +  <____________|  |_______________________________________|
  1995. +
  1996. +Legend:
  1997. +
  1998. +9026            ARCNET Probe
  1999. +SW1 1-6:    Base I/O Address Select
  2000. +    7-10:   Base Memory Address Select
  2001. +SW2 1-8:    Node ID Select (ID0-ID7)
  2002. +JP1/JP2     ET1, ET2 Timeout Parameters
  2003. +JP3-JP13    Interrupt Select
  2004. +J1      BNC RG62/U Connector        (CN160A/AB only)
  2005. +J1      Two 6-position Telephone Jack   (CN160TP only)
  2006. +LED
  2007. +
  2008. +Setting one of the switches to Off means "1", On means "0".
  2009. +
  2010. +
  2011. +Setting the Node ID
  2012. +-------------------
  2013. +
  2014. +The eight switches in SW2 are used to set the node ID. Each node attached
  2015. +to the network must have an unique node ID which must be diffrent from 0.
  2016. +Switch 1 (ID0) serves as the least significant bit (LSB).
  2017. +
  2018. +The node ID is the sum of the values of all switches set to "1"  
  2019. +These values are:
  2020. +
  2021. +   Switch | Label | Value
  2022. +   -------|-------|-------
  2023. +     1    | ID0   |   1
  2024. +     2    | ID1   |   2
  2025. +     3    | ID2   |   4
  2026. +     4    | ID3   |   8
  2027. +     5    | ID4   |  16
  2028. +     6    | ID5   |  32
  2029. +     7    | ID6   |  64
  2030. +     8    | ID7   | 128
  2031. +
  2032. +Some Examples:
  2033. +
  2034. +    Switch         | Hex     | Decimal 
  2035. +   8 7 6 5 4 3 2 1 | Node ID | Node ID
  2036. +   ----------------|---------|---------
  2037. +   0 0 0 0 0 0 0 0 |    not allowed
  2038. +   0 0 0 0 0 0 0 1 |    1    |    1 
  2039. +   0 0 0 0 0 0 1 0 |    2    |    2
  2040. +   0 0 0 0 0 0 1 1 |    3    |    3
  2041. +       . . .       |         |
  2042. +   0 1 0 1 0 1 0 1 |   55    |   85
  2043. +       . . .       |         |
  2044. +   1 0 1 0 1 0 1 0 |   AA    |  170
  2045. +       . . .       |         |  
  2046. +   1 1 1 1 1 1 0 1 |   FD    |  253
  2047. +   1 1 1 1 1 1 1 0 |   FE    |  254
  2048. +   1 1 1 1 1 1 1 1 |   FF    |  255
  2049. +
  2050. +
  2051. +Setting the I/O Base Address
  2052. +----------------------------
  2053. +
  2054. +The first six switches in switch block SW1 are used to select the I/O Base
  2055. +address using the followig table:
  2056. +
  2057. +             Switch        | Hex I/O
  2058. +    1   2   3   4   5   6  | Address
  2059. +   ------------------------|--------
  2060. +   OFF ON  ON  OFF OFF ON  |  260
  2061. +   OFF ON  OFF ON  ON  OFF |  290
  2062. +   OFF ON  OFF OFF OFF ON  |  2E0  (Manufactor's default)
  2063. +   OFF ON  OFF OFF OFF OFF |  2F0
  2064. +   OFF OFF ON  ON  ON  ON  |  300
  2065. +   OFF OFF ON  OFF ON  OFF |  350
  2066. +   OFF OFF OFF ON  ON  ON  |  380
  2067. +   OFF OFF OFF OFF OFF ON  |  3E0
  2068. +
  2069. +Note: Other IO-Base addresses seem to be selectable, but only the above
  2070. +      combinations are documented.
  2071. +
  2072. +
  2073. +Setting the Base Memory (RAM) buffer Address
  2074. +--------------------------------------------
  2075. +
  2076. +The switches 7-10 of switch block SW1 are used to select the Memory
  2077. +Base address of the RAM (2K) and the PROM.
  2078. +
  2079. +   Switch          | Hex RAM | Hex ROM
  2080. +    7   8   9  10  | Address | Address
  2081. +   ----------------|---------|-----------
  2082. +   OFF OFF ON  ON  |  C0000  |  C8000
  2083. +   OFF OFF ON  OFF |  D0000  |  D8000 (Default)
  2084. +   OFF OFF OFF ON  |  E0000  |  E8000
  2085. +
  2086. +Note: Other MEM-Base addresses seem to be selectable, but only the above
  2087. +      combinations are documented.
  2088. +
  2089. +
  2090. +Setting the Interrupt Line
  2091. +--------------------------
  2092. +
  2093. +To select a hardware interrupt level install one (only one!) of the jumpers
  2094. +JP3 through JP13 using the following table:
  2095. +
  2096. +   Jumper | IRQ     
  2097. +   -------|-----------------
  2098. +     3    |  14
  2099. +     4    |  15
  2100. +     5    |  12
  2101. +     6    |  11
  2102. +     7    |  10
  2103. +     8    |   3
  2104. +     9    |   4
  2105. +    10    |   5
  2106. +    11    |   6
  2107. +    12    |   7
  2108. +    13    |   2 (=9) Default!
  2109. +
  2110. +Note:  - Do not use JP11=IRQ6, it may conflict with your Floppy Disk
  2111. +         Controler
  2112. +       - Use JP3=IRQ14 only, if you don't have an IDE-, MFM-, or RLL-
  2113. +         Hard Disk, it may conflict with their controlers
  2114. +
  2115. +
  2116. +Setting the Timeout Parameters
  2117. +------------------------------
  2118. +
  2119. +The jumpers labeled JP1 and JP2 are used to determine the timeout
  2120. +parameters. These two jumpers are normally left open.
  2121. +
  2122. +
  2123. +*****************************************************************************
  2124. +
  2125. +** No Name **
  2126. +8-bit cards, 16-bit cards
  2127. +-------------------------
  2128. +  - from Juergen Seifert <seifert@htwm.de>
  2129. +  
  2130. +NONAME 8-BIT ARCNET
  2131. +===================
  2132. +
  2133. +I have named this ARCnet card "NONAME", since there is no name of any
  2134. +manufactor on the Installation manual nor on the shipping box. The only
  2135. +hint to the existence of a manufactor at all is written into cupper,
  2136. +it is "Made in Taiwan"
  2137. +
  2138. +This description has been written by Juergen Seifert <seifert@htwm.de>
  2139. +using information from the Original
  2140. +                    "ARCnet Installation Manual"
  2141. +
  2142. +
  2143. +    ________________________________________________________________
  2144. +   | |STAR| BUS| T/P|                                               |
  2145. +   | |____|____|____|                                               |
  2146. +   |                            _____________________               |
  2147. +   |                           |                     |              |
  2148. +   |                           |                     |              |
  2149. +   |                           |                     |              |
  2150. +   |                           |        SMC          |              |
  2151. +   |                           |                     |              |
  2152. +   |                           |       COM90C65      |              |
  2153. +   |                           |                     |              |
  2154. +   |                           |                     |              |
  2155. +   |                           |__________-__________|              |
  2156. +   |                                                           _____|
  2157. +   |      _______________                                     |  CN |
  2158. +   |     | PROM          |                                    |_____|
  2159. +   |     > SOCKET        |                                          |
  2160. +   |     |_______________|         1 2 3 4 5 6 7 8  1 2 3 4 5 6 7 8 |
  2161. +   |                               _______________  _______________ |
  2162. +   |           |o|o|o|o|o|o|o|o|  |      SW1      ||      SW2      ||
  2163. +   |           |o|o|o|o|o|o|o|o|  |_______________||_______________||
  2164. +   |___         2 3 4 5 7 E E R        Node ID       IOB__|__MEM____|
  2165. +       |        \ IRQ   / T T O                      |
  2166. +       |__________________1_2_M______________________|
  2167. +
  2168. +Legend:
  2169. +
  2170. +COM90C65:       Arcnet Probe
  2171. +S1  1-8:    Node ID Select
  2172. +S2  1-3:    I/O Base Address Select
  2173. +    4-6:    Memory Base Address Select
  2174. +    7-8:    RAM Offset Select
  2175. +ET1, ET2    Extended Timeout Select
  2176. +ROM     ROM Enable Select
  2177. +CN              RG62 Coax Connector
  2178. +STAR| BUS | T/P Three fields for placing a sign (colored circle)
  2179. +                indicating the topologie of the card
  2180. +
  2181. +Setting one of the switches to Off means "1", On means "0".
  2182. +
  2183. +
  2184. +Setting the Node ID
  2185. +-------------------
  2186. +
  2187. +The eight switches in group SW1 are used to set the node ID.
  2188. +Each node attached to the network must have an unique node ID which
  2189. +must be diffrent from 0.
  2190. +Switch 8 serves as the least significant bit (LSB).
  2191. +
  2192. +The node ID is the sum of the values of all switches set to "1"  
  2193. +These values are:
  2194. +
  2195. +    Switch | Value
  2196. +    -------|-------
  2197. +      8    |   1
  2198. +      7    |   2
  2199. +      6    |   4
  2200. +      5    |   8
  2201. +      4    |  16
  2202. +      3    |  32
  2203. +      2    |  64
  2204. +      1    | 128
  2205. +
  2206. +Some Examples:
  2207. +
  2208. +    Switch         | Hex     | Decimal 
  2209. +   1 2 3 4 5 6 7 8 | Node ID | Node ID
  2210. +   ----------------|---------|---------
  2211. +   0 0 0 0 0 0 0 0 |    not allowed
  2212. +   0 0 0 0 0 0 0 1 |    1    |    1 
  2213. +   0 0 0 0 0 0 1 0 |    2    |    2
  2214. +   0 0 0 0 0 0 1 1 |    3    |    3
  2215. +       . . .       |         |
  2216. +   0 1 0 1 0 1 0 1 |   55    |   85
  2217. +       . . .       |         |
  2218. +   1 0 1 0 1 0 1 0 |   AA    |  170
  2219. +       . . .       |         |  
  2220. +   1 1 1 1 1 1 0 1 |   FD    |  253
  2221. +   1 1 1 1 1 1 1 0 |   FE    |  254
  2222. +   1 1 1 1 1 1 1 1 |   FF    |  255
  2223. +
  2224. +
  2225. +Setting the I/O Base Address
  2226. +----------------------------
  2227. +
  2228. +The first three switches in switch group SW2 are used to select one
  2229. +of eight possible I/O Base addresses using the followig table
  2230. +
  2231. +   Switch      | Hex I/O
  2232. +    1   2   3  | Address
  2233. +   ------------|--------
  2234. +   ON  ON  ON  |  260
  2235. +   ON  ON  OFF |  290
  2236. +   ON  OFF ON  |  2E0  (Manufactor's default)
  2237. +   ON  OFF OFF |  2F0
  2238. +   OFF ON  ON  |  300
  2239. +   OFF ON  OFF |  350
  2240. +   OFF OFF ON  |  380
  2241. +   OFF OFF OFF |  3E0
  2242. +
  2243. +
  2244. +Setting the Base Memory (RAM) buffer Address
  2245. +--------------------------------------------
  2246. +
  2247. +The memory buffer requires 2K of a 16K block of RAM. The base of this
  2248. +16K block can be located in any of eight positions.
  2249. +Switches 4-6 of switch group SW2 select the Base of the 16K block.
  2250. +Within that 16K address space, the buffer may be assigned any one of four
  2251. +positions, determined by the offset, switches 7 and 8 of group SW2.
  2252. +
  2253. +   Switch     | Hex RAM | Hex ROM
  2254. +   4 5 6  7 8 | Address | Address *)
  2255. +   -----------|---------|-----------
  2256. +   0 0 0  0 0 |  C0000  |  C2000
  2257. +   0 0 0  0 1 |  C0800  |  C2000
  2258. +   0 0 0  1 0 |  C1000  |  C2000
  2259. +   0 0 0  1 1 |  C1800  |  C2000
  2260. +              |         |
  2261. +   0 0 1  0 0 |  C4000  |  C6000
  2262. +   0 0 1  0 1 |  C4800  |  C6000
  2263. +   0 0 1  1 0 |  C5000  |  C6000
  2264. +   0 0 1  1 1 |  C5800  |  C6000
  2265. +              |         |
  2266. +   0 1 0  0 0 |  CC000  |  CE000
  2267. +   0 1 0  0 1 |  CC800  |  CE000
  2268. +   0 1 0  1 0 |  CD000  |  CE000
  2269. +   0 1 0  1 1 |  CD800  |  CE000
  2270. +              |         |
  2271. +   0 1 1  0 0 |  D0000  |  D2000  (Manufactor's default)
  2272. +   0 1 1  0 1 |  D0800  |  D2000
  2273. +   0 1 1  1 0 |  D1000  |  D2000
  2274. +   0 1 1  1 1 |  D1800  |  D2000
  2275. +              |         |
  2276. +   1 0 0  0 0 |  D4000  |  D6000
  2277. +   1 0 0  0 1 |  D4800  |  D6000
  2278. +   1 0 0  1 0 |  D5000  |  D6000
  2279. +   1 0 0  1 1 |  D5800  |  D6000
  2280. +              |         |
  2281. +   1 0 1  0 0 |  D8000  |  DA000
  2282. +   1 0 1  0 1 |  D8800  |  DA000
  2283. +   1 0 1  1 0 |  D9000  |  DA000
  2284. +   1 0 1  1 1 |  D9800  |  DA000
  2285. +              |         |
  2286. +   1 1 0  0 0 |  DC000  |  DE000
  2287. +   1 1 0  0 1 |  DC800  |  DE000
  2288. +   1 1 0  1 0 |  DD000  |  DE000
  2289. +   1 1 0  1 1 |  DD800  |  DE000
  2290. +              |         |
  2291. +   1 1 1  0 0 |  E0000  |  E2000
  2292. +   1 1 1  0 1 |  E0800  |  E2000
  2293. +   1 1 1  1 0 |  E1000  |  E2000
  2294. +   1 1 1  1 1 |  E1800  |  E2000
  2295. +  
  2296. +*) To enable the 8K Boot PROM install the jumper ROM.
  2297. +   The default is jumper ROM not installed.
  2298. +
  2299. +
  2300. +Setting Interrupt Request Lines (IRQ)
  2301. +-------------------------------------
  2302. +
  2303. +To select a hardware interrupt level set one (only one!) of the jumpers
  2304. +IRQ2, IRQ3, IRQ4, IRQ5 or IRQ7. The Manufactor's default is IRQ2.
  2305. +
  2306. +Setting the Timeouts
  2307. +--------------------
  2308. +
  2309. +The two jumpers labeled ET1 and ET2 are used to determine the timeout
  2310. +parameters (respons and reconfiguration time). Every node in a network
  2311. +must be set to the same timeout values.
  2312. +
  2313. +   ET1 ET2 | Response Time (us) | Reconfiguration Time (ms)
  2314. +   --------|--------------------|--------------------------
  2315. +   Off Off |        78          |          840   (Default)
  2316. +   Off On  |       285          |         1680
  2317. +   On  Off |       563          |         1680
  2318. +   On  On  |      1130          |         1680
  2319. +
  2320. +On means jumper installed, Off means jumper not installed
  2321. +
  2322. +
  2323. +NONAME 16-BIT ARCNET
  2324. +====================
  2325. +
  2326. +The manual of my 8-Bit NONAME ARCnet Card contains another description
  2327. +of a 16-Bit Coax / Twisted Pair Card. This description is incomplete,
  2328. +because there are missing two pages in the manual booklet. (The table
  2329. +of contents reports pages ... 2-9, 2-11, 2-12, 3-1, ... but inside
  2330. +the booklet there is a diffrent way of counting ... 2-9, 2-10, A-1,
  2331. +(empty page), 3-1, ..., 3-18, A-1 (again), A-2)
  2332. +Also the picture of the board layout is not as good as the picture of
  2333. +8-Bit card, because there isn't any letter like "SW1" written to the
  2334. +picture.
  2335. +Should somebody have such a board, please feel free to complete this
  2336. +description or to send a mail to me!
  2337. +
  2338. +This description has been written by Juergen Seifert <seifert@htwm.de>
  2339. +using information from the Original
  2340. +                    "ARCnet Installation Manual"
  2341. +
  2342. +
  2343. +   ___________________________________________________________________
  2344. +  <                    _________________  _________________           |
  2345. +  >                   |       SW?       ||      SW?        |          |
  2346. +  <                   |_________________||_________________|          |
  2347. +  >                       ____________________                        |
  2348. +  <                      |                    |                       |
  2349. +  >                      |                    |                       |
  2350. +  <                      |                    |                       |
  2351. +  >                      |                    |                       |
  2352. +  <                      |                    |                       |
  2353. +  >                      |                    |                       |
  2354. +  <                      |                    |                       |
  2355. +  >                      |____________________|                       |
  2356. +  <                                                               ____|
  2357. +  >                       ____________________                   |    |
  2358. +  <                      |                    |                  | J1 |
  2359. +  >                      |                    <                  |    |
  2360. +  <                      |____________________|  ? ? ? ? ? ?     |____|
  2361. +  >                                             |o|o|o|o|o|o|         |
  2362. +  <                                             |o|o|o|o|o|o|         |
  2363. +  >                                                                   |
  2364. +  <             __                                         ___________|
  2365. +  >            |  |                                       |
  2366. +  <____________|  |_______________________________________|
  2367. +
  2368. +
  2369. +Setting one of the switches to Off means "1", On means "0".
  2370. +
  2371. +
  2372. +Setting the Node ID
  2373. +-------------------
  2374. +
  2375. +The eight switches in group SW2 are used to set the node ID.
  2376. +Each node attached to the network must have an unique node ID which
  2377. +must be diffrent from 0.
  2378. +Switch 8 serves as the least significant bit (LSB).
  2379. +
  2380. +The node ID is the sum of the values of all switches set to "1"  
  2381. +These values are:
  2382. +
  2383. +    Switch | Value
  2384. +    -------|-------
  2385. +      8    |   1
  2386. +      7    |   2
  2387. +      6    |   4
  2388. +      5    |   8
  2389. +      4    |  16
  2390. +      3    |  32
  2391. +      2    |  64
  2392. +      1    | 128
  2393. +
  2394. +Some Examples:
  2395. +
  2396. +    Switch         | Hex     | Decimal 
  2397. +   1 2 3 4 5 6 7 8 | Node ID | Node ID
  2398. +   ----------------|---------|---------
  2399. +   0 0 0 0 0 0 0 0 |    not allowed
  2400. +   0 0 0 0 0 0 0 1 |    1    |    1 
  2401. +   0 0 0 0 0 0 1 0 |    2    |    2
  2402. +   0 0 0 0 0 0 1 1 |    3    |    3
  2403. +       . . .       |         |
  2404. +   0 1 0 1 0 1 0 1 |   55    |   85
  2405. +       . . .       |         |
  2406. +   1 0 1 0 1 0 1 0 |   AA    |  170
  2407. +       . . .       |         |  
  2408. +   1 1 1 1 1 1 0 1 |   FD    |  253
  2409. +   1 1 1 1 1 1 1 0 |   FE    |  254
  2410. +   1 1 1 1 1 1 1 1 |   FF    |  255
  2411. +
  2412. +
  2413. +Setting the I/O Base Address
  2414. +----------------------------
  2415. +
  2416. +The first three switches in switch group SW1 are used to select one
  2417. +of eight possible I/O Base addresses using the followig table
  2418. +
  2419. +   Switch      | Hex I/O
  2420. +    3   2   1  | Address
  2421. +   ------------|--------
  2422. +   ON  ON  ON  |  260
  2423. +   ON  ON  OFF |  290
  2424. +   ON  OFF ON  |  2E0  (Manufactor's default)
  2425. +   ON  OFF OFF |  2F0
  2426. +   OFF ON  ON  |  300
  2427. +   OFF ON  OFF |  350
  2428. +   OFF OFF ON  |  380
  2429. +   OFF OFF OFF |  3E0
  2430. +
  2431. +
  2432. +Setting the Base Memory (RAM) buffer Address
  2433. +--------------------------------------------
  2434. +
  2435. +The memory buffer requires 2K of a 16K block of RAM. The base of this
  2436. +16K block can be located in any of eight positions.
  2437. +Switches 6-8 of switch group SW1 select the Base of the 16K block.
  2438. +Within that 16K address space, the buffer may be assigned any one of four
  2439. +positions, determined by the offset, switches 4 and 5 of group SW1.
  2440. +
  2441. +   Switch     | Hex RAM | Hex ROM
  2442. +   8 7 6  5 4 | Address | Address
  2443. +   -----------|---------|-----------
  2444. +   0 0 0  0 0 |  C0000  |  C2000
  2445. +   0 0 0  0 1 |  C0800  |  C2000
  2446. +   0 0 0  1 0 |  C1000  |  C2000
  2447. +   0 0 0  1 1 |  C1800  |  C2000
  2448. +              |         |
  2449. +   0 0 1  0 0 |  C4000  |  C6000
  2450. +   0 0 1  0 1 |  C4800  |  C6000
  2451. +   0 0 1  1 0 |  C5000  |  C6000
  2452. +   0 0 1  1 1 |  C5800  |  C6000
  2453. +              |         |
  2454. +   0 1 0  0 0 |  CC000  |  CE000
  2455. +   0 1 0  0 1 |  CC800  |  CE000
  2456. +   0 1 0  1 0 |  CD000  |  CE000
  2457. +   0 1 0  1 1 |  CD800  |  CE000
  2458. +              |         |
  2459. +   0 1 1  0 0 |  D0000  |  D2000  (Manufactor's default)
  2460. +   0 1 1  0 1 |  D0800  |  D2000
  2461. +   0 1 1  1 0 |  D1000  |  D2000
  2462. +   0 1 1  1 1 |  D1800  |  D2000
  2463. +              |         |
  2464. +   1 0 0  0 0 |  D4000  |  D6000
  2465. +   1 0 0  0 1 |  D4800  |  D6000
  2466. +   1 0 0  1 0 |  D5000  |  D6000
  2467. +   1 0 0  1 1 |  D5800  |  D6000
  2468. +              |         |
  2469. +   1 0 1  0 0 |  D8000  |  DA000
  2470. +   1 0 1  0 1 |  D8800  |  DA000
  2471. +   1 0 1  1 0 |  D9000  |  DA000
  2472. +   1 0 1  1 1 |  D9800  |  DA000
  2473. +              |         |
  2474. +   1 1 0  0 0 |  DC000  |  DE000
  2475. +   1 1 0  0 1 |  DC800  |  DE000
  2476. +   1 1 0  1 0 |  DD000  |  DE000
  2477. +   1 1 0  1 1 |  DD800  |  DE000
  2478. +              |         |
  2479. +   1 1 1  0 0 |  E0000  |  E2000
  2480. +   1 1 1  0 1 |  E0800  |  E2000
  2481. +   1 1 1  1 0 |  E1000  |  E2000
  2482. +   1 1 1  1 1 |  E1800  |  E2000
  2483. +  
  2484. +
  2485. +Setting Interrupt Request Lines (IRQ)
  2486. +-------------------------------------
  2487. +
  2488. +??????????????????????????????????????
  2489. +
  2490. +
  2491. +Setting the Timeouts
  2492. +--------------------
  2493. +
  2494. +??????????????????????????????????????
  2495. +
  2496. +
  2497. +*****************************************************************************
  2498. +
  2499. +Other Cards
  2500. +-----------
  2501. +
  2502. +I have no information on other models of ARCnet cards at the moment.  Please
  2503. +send any and all info to:
  2504. +    apenwarr@tourism.807-city.on.ca
  2505. +
  2506. +Thanks.
  2507. diff -u --recursive --new-file v1.2.1/linux/drivers/net/Space.c linux/drivers/net/Space.c
  2508. --- v1.2.1/linux/drivers/net/Space.c    Sun Feb 12 16:11:56 1995
  2509. +++ linux/drivers/net/Space.c    Sun Mar 26 10:49:58 1995
  2510. @@ -170,6 +170,14 @@
  2511.  #   define NEXT_DEV    (&atp_dev)
  2512.  #endif
  2513.  
  2514. +#ifdef CONFIG_ARCNET
  2515. +    extern int arcnet_probe(struct device *dev);
  2516. +    static struct device arcnet_dev = {
  2517. +    "arc0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, arcnet_probe, };
  2518. +#   undef    NEXT_DEV
  2519. +#   define    NEXT_DEV    (&arcnet_dev)
  2520. +#endif
  2521. +
  2522.  /* The first device defaults to I/O base '0', which means autoprobe. */
  2523.  #ifndef ETH0_ADDR
  2524.  # define ETH0_ADDR 0
  2525. @@ -292,14 +300,6 @@
  2526.  #undef NEXT_DEV
  2527.  #define NEXT_DEV (&ppp0_dev)
  2528.  #endif   /* PPP */
  2529. -
  2530. -#ifdef CONFIG_ARCNET
  2531. -    extern int arcnet_probe(struct device *dev);
  2532. -    static struct device arcnet_dev = {
  2533. -    "arc0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, arcnet_probe, };
  2534. -#   undef    NEXT_DEV
  2535. -#   define    NEXT_DEV    (&arcnet_dev)
  2536. -#endif
  2537.  
  2538.  #ifdef CONFIG_DUMMY
  2539.      extern int dummy_init(struct device *dev);
  2540. diff -u --recursive --new-file v1.2.1/linux/drivers/net/arcnet.c linux/drivers/net/arcnet.c
  2541. --- v1.2.1/linux/drivers/net/arcnet.c    Thu Feb 23 13:53:58 1995
  2542. +++ linux/drivers/net/arcnet.c    Sun Mar 26 10:49:58 1995
  2543. @@ -15,7 +15,10 @@
  2544.           
  2545.      **********************
  2546.  
  2547. -
  2548. +    v1.01 (95/03/24)
  2549. +      - Fixed some IPX-related bugs. (Thanks to Tomasz Motylewski
  2550. +            <motyl@tichy.ch.uj.edu.pl> for the patches to make arcnet work
  2551. +            with dosemu!)
  2552.      v1.0 (95/02/15)
  2553.        - Initial non-alpha release.
  2554.      
  2555. @@ -25,15 +28,12 @@
  2556.           - Test in systems with NON-ARCnet network cards, just to see if
  2557.             autoprobe kills anything.  With any luck, it won't.  (It's pretty
  2558.             careful.)
  2559. -               - Except some unfriendly NE2000's die. (0.40)
  2560. +               - Except some unfriendly NE2000's die. (as of 0.40-ALPHA)
  2561.           - cards with shared memory that can be "turned off?"
  2562.           - NFS mount freezes after several megabytes to SOSS for DOS. 
  2563.          unmount/remount works.  Is this arcnet-specific?  I don't know.
  2564.        - Add support for the various stupid bugs ("I didn't read the RFC"
  2565. -        syndrome) in MS Windows for Workgroups and LanMan.
  2566. -        
  2567. -      - get the net people to probe last for arcnet, and first for ne2000
  2568. -        in Space.c...  
  2569. +           syndrome) in Windows for Workgroups and LanMan.
  2570.   */
  2571.   
  2572.  /**************************************************************************/
  2573. @@ -87,7 +87,7 @@
  2574.  /**************************************************************************/
  2575.   
  2576.  static char *version =
  2577. - "arcnet.c:v1.00 95/02/15 Avery Pennarun <apenwarr@tourism.807-city.on.ca>\n";
  2578. + "arcnet.c:v1.01 95/03/24 Avery Pennarun <apenwarr@tourism.807-city.on.ca>\n";
  2579.  
  2580.  /*
  2581.    Sources:
  2582. @@ -140,6 +140,7 @@
  2583.   * D_NORMAL    verification
  2584.   * D_INIT    show init/detect messages
  2585.   * D_DURING    show messages during normal use (ie interrupts)
  2586. + * D_DATA   show packets data from skb's, not on Arcnet card
  2587.   * D_TX        show tx packets
  2588.   * D_RX        show tx+rx packets
  2589.   */
  2590. @@ -148,8 +149,9 @@
  2591.  #define    D_INIT        2
  2592.  #define D_EXTRA        3
  2593.  #define D_DURING    4
  2594. -#define D_TX        5
  2595. -#define D_RX        6
  2596. +#define D_DATA        6
  2597. +#define D_TX        8
  2598. +#define D_RX        9
  2599.  
  2600.  #ifndef NET_DEBUG
  2601.  #define NET_DEBUG     D_INIT
  2602. @@ -289,7 +291,7 @@
  2603.                   *   but WE MUST GET RID OF IT BEFORE SENDING A
  2604.                   *   PACKET!!
  2605.                   */
  2606. -    u_char  stupid;        /* filler to make struct an even # of bytes */
  2607. +    u_char  saddr;        /* Source address - neccesary for IPX protocol */
  2608.      
  2609.      /* data that IS part of real packet */
  2610.      u_char    protocol_id,    /* ARC_P_IP, ARC_P_ARP, or ARC_P_RARP */
  2611. @@ -446,9 +448,12 @@
  2612.          printk(version);
  2613.          printk("arcnet: ***\n");
  2614.          printk("arcnet: * Read linux/drivers/net/README.arcnet for important release notes!\n");
  2615. +        printk("arcnet: *\n");
  2616. +        printk("arcnet: * This version should be stable, but e-mail me if you have any\n");
  2617. +        printk("arcnet: * questions, comments, or bug reports!\n");
  2618.          printk("arcnet: ***\n");
  2619.      }
  2620. -    
  2621. +
  2622.      BUGLVL(D_INIT)
  2623.          printk("arcnet: given: base %lXh, IRQ %Xh, shmem %lXh\n",
  2624.              dev->base_addr,dev->irq,dev->mem_start);
  2625. @@ -1003,6 +1008,15 @@
  2626.          out->length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
  2627.          out->hdr=(struct ClientData*)skb->data;
  2628.          out->skb=skb;
  2629. +        BUGLVL( D_DATA ) {
  2630. +            short i;
  2631. +            for( i=0; i< skb->len; i++)
  2632. +            {
  2633. +                if( i%16 == 0 ) printk("\n[%04hX] ",i);
  2634. +                printk("%02hX ",((unsigned char*)skb->data)[i]);
  2635. +            }
  2636. +            printk("\n");
  2637. +        }
  2638.  
  2639.  #ifdef IRQ_XMIT
  2640.          if (lp->txready && inb(STATUS)&TXFREEflag)
  2641. @@ -1566,7 +1580,7 @@
  2642.          BUGLVL(D_RX) printk("arcnet: incoming is not split (splitflag=%d)\n",
  2643.              arcsoft->split_flag);
  2644.              
  2645. -            if (in->skb)    /* already assembling one! */
  2646. +        if (in->skb)    /* already assembling one! */
  2647.              {
  2648.                  BUGLVL(D_INIT) printk("arcnet: aborting assembly (seq=%d) for unsplit packet (splitflag=%d, seq=%d)\n",
  2649.                      in->sequence,arcsoft->split_flag,
  2650. @@ -1593,6 +1607,7 @@
  2651.                   (u_char *)arcsoft+EXTRA_CLIENTDATA,
  2652.                   length-EXTRA_CLIENTDATA);
  2653.               soft->daddr=daddr;
  2654. +             soft->saddr=saddr;
  2655.               
  2656.               BUGLVL(D_DURING)
  2657.                   printk("arcnet: received packet from %02Xh to %02Xh (%d bytes, type=%d)\n",
  2658. @@ -1648,7 +1663,15 @@
  2659.                           arp->ar_hln,arp->ar_pln);
  2660.                   }
  2661.               }
  2662. -
  2663. +        BUGLVL( D_DATA ) {
  2664. +                short i;
  2665. +                       for( i=0; i< skb->len; i++)
  2666. +                       {
  2667. +                               if( i%16 == 0 ) printk("\n[%04hX] ",i);
  2668. +                               printk("%02hX ",((unsigned char*)skb->data)[i]);
  2669. +                       }
  2670. +                       printk("\n");
  2671. +                }
  2672.               netif_rx(skb);
  2673.               lp->stats.rx_packets++;
  2674.           }
  2675. @@ -1725,13 +1748,6 @@
  2676.                       */
  2677.                      skb->free=1;
  2678.                      
  2679. -                    if (skb==NULL)
  2680. -                    {
  2681. -                        printk("%s: Memory squeeze, dropping packet.\n", 
  2682. -                            dev->name);
  2683. -                        lp->stats.rx_dropped++;
  2684. -                        return;
  2685. -                    }
  2686.                      soft=(struct ClientData *)skb->data;
  2687.                      
  2688.                      skb->len=sizeof(struct ClientData);
  2689. @@ -1789,6 +1805,7 @@
  2690.               skb->len+=length-sizeof(struct ClientData);
  2691.               
  2692.               soft->daddr=daddr;
  2693. +             soft->saddr=saddr;
  2694.               
  2695.               BUGLVL(D_DURING)
  2696.                   printk("arcnet: received packet from %02Xh to %02Xh (%d bytes, type=%d)\n",
  2697. @@ -1818,6 +1835,15 @@
  2698.                           skb,in->skb);
  2699.                   in->skb=NULL;
  2700.                   in->lastpacket=in->numpackets=0;
  2701. +            BUGLVL( D_DATA ) {
  2702. +                    short i;
  2703. +                           for( i=0; i< skb->len; i++)
  2704. +                           {
  2705. +                                   if( i%16 == 0 ) printk("\n[%04hX] ",i);
  2706. +                                   printk("%02hX ",((unsigned char*)skb->data)[i]);
  2707. +                           }
  2708. +                           printk("\n");
  2709. +                    }
  2710.                   netif_rx(skb);
  2711.                   lp->stats.rx_packets++;
  2712.              }
  2713. @@ -1980,22 +2006,26 @@
  2714.      case ETH_P_IPX:
  2715.          head->protocol_id=ARC_P_IPX;
  2716.          break;
  2717. +    case ETH_P_ATALK:
  2718. +        head->protocol_id=ARC_P_ATALK;
  2719. +        break;
  2720.      default:
  2721.          printk("arcnet: I don't understand protocol %d (%Xh)\n",
  2722.              type,type);
  2723.          return 0;
  2724.      }    
  2725.  
  2726. -#if 0
  2727. +#if 1
  2728.      /*
  2729.       *    Set the source hardware address.
  2730.       *    AVE: we can't do this, so we don't.  Code below is directly
  2731.       *         stolen from eth.c driver and won't work.
  2732. +     ** TM: but for debugging I would like to have saddr in the header
  2733.       */
  2734.      if(saddr)
  2735. -        memcpy(eth->h_source,saddr,dev->addr_len);
  2736. +        head->saddr=((u_char*)saddr)[0];
  2737.      else
  2738. -        memcpy(eth->h_source,dev->dev_addr,dev->addr_len);
  2739. +        head->saddr=((u_char*)(dev->dev_addr))[0];
  2740.  #endif
  2741.  
  2742.  #if 0
  2743. @@ -2007,7 +2037,7 @@
  2744.       */
  2745.      if (dev->flags & IFF_LOOPBACK) 
  2746.      {
  2747. -        memset(eth->h_dest, 0, dev->addr_len);
  2748. +        head->daddr=0;
  2749.          return(dev->hard_header_len);
  2750.      }
  2751.  #endif
  2752. @@ -2098,8 +2128,8 @@
  2753.      case ARC_P_ARP:        return htons(ETH_P_ARP);
  2754.      case ARC_P_RARP:    return htons(ETH_P_RARP);
  2755.      case ARC_P_IPX:        return htons(ETH_P_IPX);
  2756. +    case ARC_P_ATALK:   return htons(ETH_P_ATALK); /* appletalk, not tested */
  2757.      case ARC_P_LANSOFT: /* don't understand.  fall through. */
  2758. -    case ARC_P_ATALK:   /* appletalk - don't understand.  fall through. */
  2759.      default:
  2760.          BUGLVL(D_DURING)
  2761.              printk("arcnet: received packet of unknown protocol id %d (%Xh)\n",
  2762. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/Makefile linux/drivers/scsi/Makefile
  2763. --- v1.2.1/linux/drivers/scsi/Makefile    Thu Mar  9 20:37:34 1995
  2764. +++ linux/drivers/scsi/Makefile    Sun Mar 19 12:54:09 1995
  2765. @@ -62,6 +62,8 @@
  2766.  ifdef CONFIG_SCSI_AHA152X
  2767.  SCSI_OBJS := $(SCSI_OBJS) aha152x.o
  2768.  SCSI_SRCS := $(SCSI_SRCS) aha152x.c
  2769. +else
  2770. +SCSI_MODULE_OBJS := $(SCSI_MODULE_OBJS) aha152x.o
  2771.  endif
  2772.  
  2773.  ifdef CONFIG_SCSI_AHA1542
  2774. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/NCR5380.c linux/drivers/scsi/NCR5380.c
  2775. --- v1.2.1/linux/drivers/scsi/NCR5380.c    Wed Feb  1 09:19:36 1995
  2776. +++ linux/drivers/scsi/NCR5380.c    Wed Mar 22 10:34:00 1995
  2777. @@ -538,7 +538,7 @@
  2778.      *prev = instance;
  2779.      timer_table[NCR5380_TIMER].expires = expires_first->time_expires;
  2780.      timer_active |= 1 << NCR5380_TIMER;
  2781. -    sti;
  2782. +    sti();
  2783.      return 0;
  2784.  }    
  2785.  
  2786. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c
  2787. --- v1.2.1/linux/drivers/scsi/aha152x.c    Sun Jan 22 22:13:38 1995
  2788. +++ linux/drivers/scsi/aha152x.c    Wed Mar 22 17:41:24 1995
  2789. @@ -20,10 +20,13 @@
  2790.   * General Public License for more details.
  2791.   
  2792.   *
  2793. - * $Id: aha152x.c,v 1.8 1995/01/21 22:07:19 root Exp root $
  2794. + * $Id: aha152x.c,v 1.9 1995/03/18 09:20:24 root Exp root $
  2795.   *
  2796.  
  2797.   * $Log: aha152x.c,v $
  2798. + * Revision 1.9  1995/03/18  09:20:24  root
  2799. + * - patches for PCMCIA and modules
  2800. + *
  2801.   * Revision 1.8  1995/01/21  22:07:19  root
  2802.   * - snarf_region => request_region
  2803.   * - aha152x_intr interface change
  2804. @@ -197,6 +200,11 @@
  2805.  
  2806.   **************************************************************************/
  2807.  
  2808. +#ifdef MODULE
  2809. +#include <linux/config.h>
  2810. +#include <linux/module.h>
  2811. +#endif
  2812. +
  2813.  #include <linux/sched.h>
  2814.  #include <asm/io.h>
  2815.  #include "../block/blk.h"
  2816. @@ -214,6 +222,10 @@
  2817.  
  2818.  /* DEFINES */
  2819.  
  2820. +/* For PCMCIA cards, always use AUTOCONF */
  2821. +#ifdef PCMCIA
  2822. +#define AUTOCONF
  2823. +#endif
  2824.  
  2825.  /* If auto configuration is disabled, IRQ, SCSI_ID and RECONNECT have to
  2826.     be predefined */
  2827. @@ -530,7 +542,7 @@
  2828.  {
  2829.    int i;
  2830.  
  2831. -  if(check_region(port_base, TEST-SCSISEQ))
  2832. +  if(check_region(port_base, 0x20))
  2833.      return 0;
  2834.  
  2835.    SETPORT( DMACNTRL1, 0 );          /* reset stack pointer */
  2836. @@ -551,6 +563,7 @@
  2837.    aha152x_config      conf;
  2838.  #endif
  2839.    int                 interrupt_level;
  2840. +  struct Scsi_Host    *hreg;
  2841.    
  2842.    if(setup_called)
  2843.      {
  2844. @@ -580,6 +593,7 @@
  2845.        aha152x_debug   = setup_debug;
  2846.  #endif
  2847.  
  2848. +#ifndef PCMCIA
  2849.        for( i=0; i<PORT_COUNT && (port_base != ports[i]); i++)
  2850.          ;
  2851.  
  2852. @@ -588,13 +602,19 @@
  2853.            printk("unknown portbase 0x%03x\n", port_base);
  2854.            panic("aha152x panics in line %d", __LINE__);
  2855.          }
  2856. +#endif
  2857.  
  2858.        if(!aha152x_porttest(port_base))
  2859.          {
  2860.            printk("portbase 0x%03x fails probe\n", port_base);
  2861. +#ifdef PCMCIA
  2862. +          return 0;
  2863. +#else
  2864.            panic("aha152x panics in line %d", __LINE__);
  2865. +#endif
  2866.          }
  2867.  
  2868. +#ifndef PCMCIA
  2869.        i=0;
  2870.        while(irqs[i] && (interrupt_level!=irqs[i]))
  2871.          i++;
  2872. @@ -603,7 +623,8 @@
  2873.            printk("illegal IRQ %d\n", interrupt_level);
  2874.            panic("aha152x panics in line %d", __LINE__);
  2875.          }
  2876. -
  2877. +#endif
  2878. +      
  2879.        if( (this_host < 0) || (this_host > 7) )
  2880.          {
  2881.            printk("illegal SCSI ID %d\n", this_host);
  2882. @@ -735,7 +756,12 @@
  2883.           can_disconnect ? "enabled" : "disabled",
  2884.           can_doparity ? "enabled" : "disabled");
  2885.  
  2886. -  request_region(port_base, TEST-SCSISEQ, "aha152x");        /* Register */
  2887. +  request_region(port_base, 0x20, "aha152x");        /* Register */
  2888. +
  2889. +  hreg = scsi_register(tpnt, 0);
  2890. +  hreg->io_port = port_base;
  2891. +  hreg->n_io_port = 0x20;
  2892. +  hreg->irq = interrupt_level;
  2893.    
  2894.    /* not expecting any interrupts */
  2895.    SETPORT(SIMODE0, 0);
  2896. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/aha152x.h linux/drivers/scsi/aha152x.h
  2897. --- v1.2.1/linux/drivers/scsi/aha152x.h    Sun Jan 22 22:13:47 1995
  2898. +++ linux/drivers/scsi/aha152x.h    Sun Mar 19 12:54:09 1995
  2899. @@ -2,7 +2,7 @@
  2900.  #define _AHA152X_H
  2901.  
  2902.  /*
  2903. - * $Id: aha152x.h,v 1.8 1995/01/21 22:11:07 root Exp root $
  2904. + * $Id: aha152x.h,v 1.9 1995/03/18 09:21:04 root Exp root $
  2905.   */
  2906.  
  2907.  #if defined(__KERNEL__)
  2908. @@ -22,7 +22,7 @@
  2909.     (unless we support more than 1 cmd_per_lun this should do) */
  2910.  #define AHA152X_MAXQUEUE    7        
  2911.  
  2912. -#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 1.8 $"
  2913. +#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 1.9 $"
  2914.  
  2915.  /* Initial value of Scsi_Host entry */
  2916.  #define AHA152X       { /* next */        NULL,                \
  2917. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/eata.c linux/drivers/scsi/eata.c
  2918. --- v1.2.1/linux/drivers/scsi/eata.c    Wed Feb 15 10:23:44 1995
  2919. +++ linux/drivers/scsi/eata.c    Mon Mar 20 09:13:46 1995
  2920. @@ -1,6 +1,13 @@
  2921.  /*
  2922.   *      eata.c - Low-level driver for EATA/DMA SCSI host adapters.
  2923.   *
  2924. + *      11 Mar 1995 rev. 2.00 for linux 1.2.0
  2925. + *          Fixed a bug which prevented media change detection for removable
  2926. + *          disk drives.
  2927. + *
  2928. + *      23 Feb 1995 rev. 1.18 for linux 1.1.94
  2929. + *          Added a check for scsi_register returning NULL.
  2930. + *
  2931.   *      11 Feb 1995 rev. 1.17 for linux 1.1.91
  2932.   *          Now DEBUG_RESET is disabled by default.
  2933.   *          Register a board even if it does not assert DMA protocol support
  2934. @@ -460,6 +467,17 @@
  2935.  #endif
  2936.  
  2937.     sh[j] = scsi_register(tpnt, sizeof(struct hostdata));
  2938. +
  2939. +   if (sh[j] == NULL) {
  2940. +      printk("%s: unable to register host, detaching.\n", name);
  2941. +
  2942. +      if (irqlist[irq] == NO_IRQ) free_irq(irq);
  2943. +
  2944. +      if (subversion == ISA) free_dma(dma_channel);
  2945. +
  2946. +      return FALSE;
  2947. +      }
  2948. +
  2949.     sh[j]->io_port = *port_base;
  2950.     sh[j]->n_io_port = REGION_SIZE;
  2951.     sh[j]->dma_channel = dma_channel;
  2952. @@ -959,11 +977,6 @@
  2953.                             && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
  2954.                       status = DID_BUS_BUSY << 16;
  2955.  
  2956. -                  else if (tstatus == CHECK_CONDITION
  2957. -                           && SCpnt->device->type == TYPE_DISK
  2958. -                           && (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION)
  2959. -                     status = DID_ERROR << 16;
  2960. -   
  2961.                    else
  2962.                       status = DID_OK << 16;
  2963.     
  2964. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/eata.h linux/drivers/scsi/eata.h
  2965. --- v1.2.1/linux/drivers/scsi/eata.h    Wed Feb 15 10:23:49 1995
  2966. +++ linux/drivers/scsi/eata.h    Mon Mar 20 09:13:46 1995
  2967. @@ -7,7 +7,7 @@
  2968.  
  2969.  #include <linux/scsicam.h>
  2970.  
  2971. -#define EATA_VERSION "1.17.00"
  2972. +#define EATA_VERSION "2.00.00"
  2973.  
  2974.  int eata2x_detect(Scsi_Host_Template *);
  2975.  int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  2976. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
  2977. --- v1.2.1/linux/drivers/scsi/scsi.c    Mon Feb 20 10:57:10 1995
  2978. +++ linux/drivers/scsi/scsi.c    Sun Mar 19 12:54:09 1995
  2979. @@ -454,11 +454,16 @@
  2980.              scsi_result[1] |= 0x80;  /* removable */
  2981.          }
  2982.  
  2983. -          SDpnt->manufacturer = SCSI_MAN_UNKNOWN;
  2984. -          if (!strncmp(scsi_result+8,"NEC",3))
  2985. -        SDpnt->manufacturer = SCSI_MAN_NEC;
  2986. -          if (!strncmp(scsi_result+8,"TOSHIBA",7))
  2987. -        SDpnt->manufacturer = SCSI_MAN_TOSHIBA;
  2988. +          if (!strncmp(scsi_result+8,"NEC",3)) {
  2989. +          if (!strncmp(scsi_result+16,"CD-ROM DRIVE:84 ",16) ||
  2990. +              !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15))
  2991. +              SDpnt->manufacturer = SCSI_MAN_NEC_OLDCDR;
  2992. +          else
  2993. +              SDpnt->manufacturer = SCSI_MAN_NEC;
  2994. +          } else if (!strncmp(scsi_result+8,"TOSHIBA",7))
  2995. +          SDpnt->manufacturer = SCSI_MAN_TOSHIBA;
  2996. +          else
  2997. +          SDpnt->manufacturer = SCSI_MAN_UNKNOWN;
  2998.  
  2999.            SDpnt->removable = (0x80 &
  3000.                    scsi_result[1]) >> 7;
  3001. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/scsi.h linux/drivers/scsi/scsi.h
  3002. --- v1.2.1/linux/drivers/scsi/scsi.h    Thu Mar  9 20:37:35 1995
  3003. +++ linux/drivers/scsi/scsi.h    Sun Mar 19 12:54:09 1995
  3004. @@ -270,6 +270,7 @@
  3005.  #define SCSI_MAN_UNKNOWN     0
  3006.  #define SCSI_MAN_NEC         1
  3007.  #define SCSI_MAN_TOSHIBA     2
  3008. +#define SCSI_MAN_NEC_OLDCDR  3
  3009.  
  3010.  /*
  3011.      The scsi_device struct contains what we know about each given scsi
  3012. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/seagate.c linux/drivers/scsi/seagate.c
  3013. --- v1.2.1/linux/drivers/scsi/seagate.c    Thu Feb 23 13:31:41 1995
  3014. +++ linux/drivers/scsi/seagate.c    Fri Mar 24 17:18:00 1995
  3015. @@ -181,6 +181,7 @@
  3016.  {"FUTURE DOMAIN CORP. (C) 1986-1990 V6.0209/18/90",5, 47, FD},
  3017.  {"FUTURE DOMAIN CORP. (C) 1986-1990 V7.009/18/90", 5, 46, FD},
  3018.  {"FUTURE DOMAIN CORP. (C) 1992 V8.00.004/02/92",   5, 44, FD},
  3019. +{"IBM F1 BIOS V1.1004/30/92",               5, 25, FD},
  3020.  {"FUTURE DOMAIN TMC-950",                        5, 21, FD},
  3021.  #endif /* CONFIG_SCSI_SEAGATE */
  3022.  }
  3023. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
  3024. --- v1.2.1/linux/drivers/scsi/sr.c    Thu Feb 23 13:31:41 1995
  3025. +++ linux/drivers/scsi/sr.c    Sun Mar 19 12:54:09 1995
  3026. @@ -309,7 +309,7 @@
  3027.  
  3028.    if (scsi_CDs[MINOR(inode->i_rdev)].xa_flags & 0x02) {
  3029.  #ifdef DEBUG
  3030. -    printk("sr_photocd: drive does not support multisession CD's");
  3031. +    printk("sr_photocd: CDROM and/or the driver does not support multisession CD's");
  3032.  #endif
  3033.      return;
  3034.    }
  3035. @@ -452,11 +452,11 @@
  3036.      }
  3037.      break;
  3038.  
  3039. +  case SCSI_MAN_NEC_OLDCDR:
  3040.    case SCSI_MAN_UNKNOWN:
  3041.    default:
  3042. -#ifdef DEBUG
  3043. -    printk("sr_photocd: unknown drive, no special multisession code\n");
  3044. -#endif
  3045. +    sector = 0;
  3046. +    no_multi = 1;
  3047.      break; }
  3048.  
  3049.    scsi_CDs[MINOR(inode->i_rdev)].mpcd_sector = sector;
  3050. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/u14-34f.c linux/drivers/scsi/u14-34f.c
  3051. --- v1.2.1/linux/drivers/scsi/u14-34f.c    Tue Feb 14 08:06:50 1995
  3052. +++ linux/drivers/scsi/u14-34f.c    Mon Mar 20 09:13:46 1995
  3053. @@ -1,6 +1,13 @@
  3054.  /*
  3055.   *      u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters.
  3056.   *
  3057. + *      11 Mar 1995 rev. 2.00 for linux 1.2.0
  3058. + *          Fixed a bug which prevented media change detection for removable
  3059. + *          disk drives.
  3060. + *
  3061. + *      23 Feb 1995 rev. 1.18 for linux 1.1.94
  3062. + *          Added a check for scsi_register returning NULL.
  3063. + *
  3064.   *      11 Feb 1995 rev. 1.17 for linux 1.1.91
  3065.   *          U14F qualified to run with 32 sglists.
  3066.   *          Now DEBUG_RESET is disabled by default.
  3067. @@ -398,6 +405,17 @@
  3068.        }
  3069.  
  3070.     sh[j] = scsi_register(tpnt, sizeof(struct hostdata));
  3071. +
  3072. +   if (sh[j] == NULL) {
  3073. +      printk("%s: unable to register host, detaching.\n", name);
  3074. +
  3075. +      if (irqlist[irq] == NO_IRQ) free_irq(irq);
  3076. +
  3077. +      if (subversion == ISA) free_dma(dma_channel);
  3078. +
  3079. +      return FALSE;
  3080. +      }
  3081. +
  3082.     sh[j]->io_port = *port_base;
  3083.     sh[j]->n_io_port = REGION_SIZE;
  3084.     sh[j]->base = bios_segment_table[config_1.bios_segment];
  3085. @@ -895,11 +913,6 @@
  3086.                          && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR)
  3087.                    status = DID_BUS_BUSY << 16;
  3088.  
  3089. -               else if (tstatus == CHECK_CONDITION
  3090. -                        && SCpnt->device->type == TYPE_DISK
  3091. -                        && (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION)
  3092. -                  status = DID_ERROR << 16;
  3093. -   
  3094.                 else
  3095.                    status = DID_OK << 16;
  3096.  
  3097. diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/u14-34f.h linux/drivers/scsi/u14-34f.h
  3098. --- v1.2.1/linux/drivers/scsi/u14-34f.h    Tue Feb 14 08:06:50 1995
  3099. +++ linux/drivers/scsi/u14-34f.h    Mon Mar 20 09:13:46 1995
  3100. @@ -10,7 +10,7 @@
  3101.  int u14_34f_reset(Scsi_Cmnd *);
  3102.  int u14_34f_biosparam(Disk *, int, int *);
  3103.  
  3104. -#define U14_34F_VERSION "1.17.00"
  3105. +#define U14_34F_VERSION "2.00.00"
  3106.  
  3107.  #define ULTRASTOR_14_34F {                                            \
  3108.                  NULL, /* Ptr for modules */                           \
  3109. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/CHANGES linux/fs/ext2/CHANGES
  3110. --- v1.2.1/linux/fs/ext2/CHANGES    Fri Nov  4 12:38:44 1994
  3111. +++ linux/fs/ext2/CHANGES    Wed Mar 22 10:33:59 1995
  3112. @@ -1,5 +1,12 @@
  3113.  Changes from version 0.5 to version 0.5a
  3114.  ========================================
  3115. +    - Zero the partial block following the end of the file when a file
  3116. +      is truncated.
  3117. +    - Dates updated in the copyrigth.
  3118. +    - More checks when the filesystem is mounted: the count of blocks,
  3119. +      fragments, and inodes per group is checked against the block size.
  3120. +    - The buffers used by the error routines are now static variables, to
  3121. +      avoid using space on the kernel stack, as requested by Linus.
  3122.      - Some cleanups in the error messages (some versions of syslog contain
  3123.        a bug which truncates an error message if it contains '\n').
  3124.      - Check that no data can be written to a file past the 2GB limit.
  3125. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/acl.c linux/fs/ext2/acl.c
  3126. --- v1.2.1/linux/fs/ext2/acl.c    Wed Jan 11 08:11:02 1995
  3127. +++ linux/fs/ext2/acl.c    Wed Mar 22 10:33:59 1995
  3128. @@ -1,9 +1,10 @@
  3129.  /*
  3130.   * linux/fs/ext2/acl.c
  3131.   *
  3132. - * Copyright (C) 1993, 1994  Remy Card (card@masi.ibp.fr)
  3133. - *                           Laboratoire MASI - Institut Blaise Pascal
  3134. - *                           Universite Pierre et Marie Curie (Paris VI)
  3135. + * Copyright (C) 1993, 1994, 1995
  3136. + * Remy Card (card@masi.ibp.fr)
  3137. + * Laboratoire MASI - Institut Blaise Pascal
  3138. + * Universite Pierre et Marie Curie (Paris VI)
  3139.   */
  3140.  
  3141.  /*
  3142. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/balloc.c linux/fs/ext2/balloc.c
  3143. --- v1.2.1/linux/fs/ext2/balloc.c    Sun Feb 26 18:52:02 1995
  3144. +++ linux/fs/ext2/balloc.c    Wed Mar 22 10:33:59 1995
  3145. @@ -1,9 +1,10 @@
  3146.  /*
  3147.   *  linux/fs/ext2/balloc.c
  3148.   *
  3149. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3150. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3151. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3152. + * Copyright (C) 1992, 1993, 1994, 1995
  3153. + * Remy Card (card@masi.ibp.fr)
  3154. + * Laboratoire MASI - Institut Blaise Pascal
  3155. + * Universite Pierre et Marie Curie (Paris VI)
  3156.   *
  3157.   *  Enhanced block allocation by Stephen Tweedie (sct@dcs.ed.ac.uk), 1993
  3158.   */
  3159. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/bitmap.c linux/fs/ext2/bitmap.c
  3160. --- v1.2.1/linux/fs/ext2/bitmap.c    Fri Dec 31 11:59:48 1993
  3161. +++ linux/fs/ext2/bitmap.c    Wed Mar 22 10:33:59 1995
  3162. @@ -1,9 +1,10 @@
  3163.  /*
  3164.   *  linux/fs/ext2/bitmap.c
  3165.   *
  3166. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3167. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3168. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3169. + * Copyright (C) 1992, 1993, 1994, 1995
  3170. + * Remy Card (card@masi.ibp.fr)
  3171. + * Laboratoire MASI - Institut Blaise Pascal
  3172. + * Universite Pierre et Marie Curie (Paris VI)
  3173.   */
  3174.  
  3175.  #include <linux/fs.h>
  3176. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/dir.c linux/fs/ext2/dir.c
  3177. --- v1.2.1/linux/fs/ext2/dir.c    Sun Feb 26 18:52:02 1995
  3178. +++ linux/fs/ext2/dir.c    Wed Mar 22 10:33:59 1995
  3179. @@ -1,9 +1,10 @@
  3180.  /*
  3181.   *  linux/fs/ext2/dir.c
  3182.   *
  3183. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3184. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3185. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3186. + * Copyright (C) 1992, 1993, 1994, 1995
  3187. + * Remy Card (card@masi.ibp.fr)
  3188. + * Laboratoire MASI - Institut Blaise Pascal
  3189. + * Universite Pierre et Marie Curie (Paris VI)
  3190.   *
  3191.   *  from
  3192.   *
  3193. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/file.c linux/fs/ext2/file.c
  3194. --- v1.2.1/linux/fs/ext2/file.c    Wed Oct 26 09:42:21 1994
  3195. +++ linux/fs/ext2/file.c    Wed Mar 22 10:33:59 1995
  3196. @@ -1,9 +1,10 @@
  3197.  /*
  3198.   *  linux/fs/ext2/file.c
  3199.   *
  3200. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3201. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3202. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3203. + * Copyright (C) 1992, 1993, 1994, 1995
  3204. + * Remy Card (card@masi.ibp.fr)
  3205. + * Laboratoire MASI - Institut Blaise Pascal
  3206. + * Universite Pierre et Marie Curie (Paris VI)
  3207.   *
  3208.   *  from
  3209.   *
  3210. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/ialloc.c linux/fs/ext2/ialloc.c
  3211. --- v1.2.1/linux/fs/ext2/ialloc.c    Thu Mar  9 20:37:35 1995
  3212. +++ linux/fs/ext2/ialloc.c    Wed Mar 22 10:33:59 1995
  3213. @@ -1,9 +1,10 @@
  3214.  /*
  3215.   *  linux/fs/ext2/ialloc.c
  3216.   *
  3217. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3218. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3219. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3220. + * Copyright (C) 1992, 1993, 1994, 1995
  3221. + * Remy Card (card@masi.ibp.fr)
  3222. + * Laboratoire MASI - Institut Blaise Pascal
  3223. + * Universite Pierre et Marie Curie (Paris VI)
  3224.   *
  3225.   *  BSD ufs-inspired inode and directory allocation by 
  3226.   *  Stephen Tweedie (sct@dcs.ed.ac.uk), 1993
  3227. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/inode.c linux/fs/ext2/inode.c
  3228. --- v1.2.1/linux/fs/ext2/inode.c    Sun Feb 26 18:52:02 1995
  3229. +++ linux/fs/ext2/inode.c    Wed Mar 22 10:33:59 1995
  3230. @@ -1,9 +1,10 @@
  3231.  /*
  3232.   *  linux/fs/ext2/inode.c
  3233.   *
  3234. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3235. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3236. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3237. + * Copyright (C) 1992, 1993, 1994, 1995
  3238. + * Remy Card (card@masi.ibp.fr)
  3239. + * Laboratoire MASI - Institut Blaise Pascal
  3240. + * Universite Pierre et Marie Curie (Paris VI)
  3241.   *
  3242.   *  from
  3243.   *
  3244. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/ioctl.c linux/fs/ext2/ioctl.c
  3245. --- v1.2.1/linux/fs/ext2/ioctl.c    Mon Jan 23 23:04:10 1995
  3246. +++ linux/fs/ext2/ioctl.c    Wed Mar 22 10:33:59 1995
  3247. @@ -1,9 +1,10 @@
  3248.  /*
  3249.   * linux/fs/ext2/ioctl.c
  3250.   *
  3251. - * Copyright (C) 1993, 1994  Remy Card (card@masi.ibp.fr)
  3252. - *                           Laboratoire MASI - Institut Blaise Pascal
  3253. - *                           Universite Pierre et Marie Curie (Paris VI)
  3254. + * Copyright (C) 1993, 1994, 1995
  3255. + * Remy Card (card@masi.ibp.fr)
  3256. + * Laboratoire MASI - Institut Blaise Pascal
  3257. + * Universite Pierre et Marie Curie (Paris VI)
  3258.   */
  3259.  
  3260.  #include <asm/segment.h>
  3261. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/namei.c linux/fs/ext2/namei.c
  3262. --- v1.2.1/linux/fs/ext2/namei.c    Wed Oct 19 10:23:17 1994
  3263. +++ linux/fs/ext2/namei.c    Wed Mar 22 10:33:59 1995
  3264. @@ -1,9 +1,10 @@
  3265.  /*
  3266.   *  linux/fs/ext2/namei.c
  3267.   *
  3268. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3269. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3270. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3271. + * Copyright (C) 1992, 1993, 1994, 1995
  3272. + * Remy Card (card@masi.ibp.fr)
  3273. + * Laboratoire MASI - Institut Blaise Pascal
  3274. + * Universite Pierre et Marie Curie (Paris VI)
  3275.   *
  3276.   *  from
  3277.   *
  3278. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/super.c linux/fs/ext2/super.c
  3279. --- v1.2.1/linux/fs/ext2/super.c    Sun Feb 26 18:52:02 1995
  3280. +++ linux/fs/ext2/super.c    Wed Mar 22 10:33:59 1995
  3281. @@ -1,9 +1,10 @@
  3282.  /*
  3283.   *  linux/fs/ext2/super.c
  3284.   *
  3285. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3286. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3287. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3288. + * Copyright (C) 1992, 1993, 1994, 1995
  3289. + * Remy Card (card@masi.ibp.fr)
  3290. + * Laboratoire MASI - Institut Blaise Pascal
  3291. + * Universite Pierre et Marie Curie (Paris VI)
  3292.   *
  3293.   *  from
  3294.   *
  3295. @@ -26,10 +27,11 @@
  3296.  #include <linux/string.h>
  3297.  #include <linux/locks.h>
  3298.  
  3299. +static char error_buf[1024];
  3300. +
  3301.  void ext2_error (struct super_block * sb, const char * function,
  3302.           const char * fmt, ...)
  3303.  {
  3304. -    char buf[1024];
  3305.      va_list args;
  3306.  
  3307.      if (!(sb->s_flags & MS_RDONLY)) {
  3308. @@ -39,15 +41,15 @@
  3309.          sb->s_dirt = 1;
  3310.      }
  3311.      va_start (args, fmt);
  3312. -    vsprintf (buf, fmt, args);
  3313. +    vsprintf (error_buf, fmt, args);
  3314.      va_end (args);
  3315.      if (test_opt (sb, ERRORS_PANIC) ||
  3316.          (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_PANIC &&
  3317.           !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_RO)))
  3318.          panic ("EXT2-fs panic (device %d/%d): %s: %s\n",
  3319. -               MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
  3320. +               MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf);
  3321.      printk (KERN_CRIT "EXT2-fs error (device %d/%d): %s: %s\n",
  3322. -        MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
  3323. +        MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf);
  3324.      if (test_opt (sb, ERRORS_RO) ||
  3325.          (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_RO &&
  3326.           !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_PANIC))) {
  3327. @@ -59,7 +61,6 @@
  3328.  NORET_TYPE void ext2_panic (struct super_block * sb, const char * function,
  3329.                  const char * fmt, ...)
  3330.  {
  3331. -    char buf[1024];
  3332.      va_list args;
  3333.  
  3334.      if (!(sb->s_flags & MS_RDONLY)) {
  3335. @@ -69,23 +70,22 @@
  3336.          sb->s_dirt = 1;
  3337.      }
  3338.      va_start (args, fmt);
  3339. -    vsprintf (buf, fmt, args);
  3340. +    vsprintf (error_buf, fmt, args);
  3341.      va_end (args);
  3342.      panic ("EXT2-fs panic (device %d/%d): %s: %s\n",
  3343. -           MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
  3344. +           MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf);
  3345.  }
  3346.  
  3347.  void ext2_warning (struct super_block * sb, const char * function,
  3348.             const char * fmt, ...)
  3349.  {
  3350. -    char buf[1024];
  3351.      va_list args;
  3352.  
  3353.      va_start (args, fmt);
  3354. -    vsprintf (buf, fmt, args);
  3355. +    vsprintf (error_buf, fmt, args);
  3356.      va_end (args);
  3357.      printk (KERN_WARNING "EXT2-fs warning (device %d/%d): %s: %s\n",
  3358. -        MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf);
  3359. +        MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf);
  3360.  }
  3361.  
  3362.  void ext2_put_super (struct super_block * sb)
  3363. @@ -550,6 +550,31 @@
  3364.          brelse (bh);
  3365.          printk ("EXT2-fs: fragsize %lu != blocksize %lu (not supported yet)\n",
  3366.              sb->u.ext2_sb.s_frag_size, sb->s_blocksize);
  3367. +        return NULL;
  3368. +    }
  3369. +
  3370. +    if (sb->u.ext2_sb.s_blocks_per_group > sb->s_blocksize * 8) {
  3371. +        sb->s_dev = 0;
  3372. +        unlock_super (sb);
  3373. +        brelse (bh);
  3374. +        printk ("EXT2-fs: #blocks per group too big: %lu\n",
  3375. +            sb->u.ext2_sb.s_blocks_per_group);
  3376. +        return NULL;
  3377. +    }
  3378. +    if (sb->u.ext2_sb.s_frags_per_group > sb->s_blocksize * 8) {
  3379. +        sb->s_dev = 0;
  3380. +        unlock_super (sb);
  3381. +        brelse (bh);
  3382. +        printk ("EXT2-fs: #fragments per group too big: %lu\n",
  3383. +            sb->u.ext2_sb.s_frags_per_group);
  3384. +        return NULL;
  3385. +    }
  3386. +    if (sb->u.ext2_sb.s_inodes_per_group > sb->s_blocksize * 8) {
  3387. +        sb->s_dev = 0;
  3388. +        unlock_super (sb);
  3389. +        brelse (bh);
  3390. +        printk ("EXT2-fs: #inodes per group too big: %lu\n",
  3391. +            sb->u.ext2_sb.s_inodes_per_group);
  3392.          return NULL;
  3393.      }
  3394.  
  3395. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/symlink.c linux/fs/ext2/symlink.c
  3396. --- v1.2.1/linux/fs/ext2/symlink.c    Mon Aug 15 15:53:48 1994
  3397. +++ linux/fs/ext2/symlink.c    Wed Mar 22 10:33:59 1995
  3398. @@ -1,9 +1,10 @@
  3399.  /*
  3400.   *  linux/fs/ext2/symlink.c
  3401.   *
  3402. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3403. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3404. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3405. + * Copyright (C) 1992, 1993, 1994, 1995
  3406. + * Remy Card (card@masi.ibp.fr)
  3407. + * Laboratoire MASI - Institut Blaise Pascal
  3408. + * Universite Pierre et Marie Curie (Paris VI)
  3409.   *
  3410.   *  from
  3411.   *
  3412. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/truncate.c linux/fs/ext2/truncate.c
  3413. --- v1.2.1/linux/fs/ext2/truncate.c    Sun Feb 26 18:52:02 1995
  3414. +++ linux/fs/ext2/truncate.c    Wed Mar 22 10:33:59 1995
  3415. @@ -1,9 +1,10 @@
  3416.  /*
  3417.   *  linux/fs/ext2/truncate.c
  3418.   *
  3419. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3420. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3421. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3422. + * Copyright (C) 1992, 1993, 1994, 1995
  3423. + * Remy Card (card@masi.ibp.fr)
  3424. + * Laboratoire MASI - Institut Blaise Pascal
  3425. + * Universite Pierre et Marie Curie (Paris VI)
  3426.   *
  3427.   *  from
  3428.   *
  3429. @@ -320,6 +321,9 @@
  3430.  void ext2_truncate (struct inode * inode)
  3431.  {
  3432.      int retry;
  3433. +    struct buffer_head * bh;
  3434. +    int err;
  3435. +    int offset;
  3436.  
  3437.      if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
  3438.          S_ISLNK(inode->i_mode)))
  3439. @@ -343,6 +347,23 @@
  3440.              ext2_sync_inode (inode);
  3441.          current->counter = 0;
  3442.          schedule ();
  3443. +    }
  3444. +    /*
  3445. +     * If the file is not being truncated to a block boundary, the
  3446. +     * contents of the partial block following the end of the file must be
  3447. +     * zero'ed in case it ever become accessible again because of
  3448. +     * subsequent file growth.
  3449. +     */
  3450. +    offset = inode->i_size % inode->i_sb->s_blocksize;
  3451. +    if (offset) {
  3452. +        bh = ext2_bread (inode, inode->i_size / inode->i_sb->s_blocksize,
  3453. +                 0, &err);
  3454. +        if (bh) {
  3455. +            memset (bh->b_data + offset, 0,
  3456. +                inode->i_sb->s_blocksize - offset);
  3457. +            mark_buffer_dirty (bh, 0);
  3458. +            brelse (bh);
  3459. +        }
  3460.      }
  3461.      inode->i_mtime = inode->i_ctime = CURRENT_TIME;
  3462.      inode->i_dirt = 1;
  3463. diff -u --recursive --new-file v1.2.1/linux/fs/msdos/misc.c linux/fs/msdos/misc.c
  3464. --- v1.2.1/linux/fs/msdos/misc.c    Mon Jan 23 10:38:29 1995
  3465. +++ linux/fs/msdos/misc.c    Wed Mar 22 10:31:42 1995
  3466. @@ -19,6 +19,7 @@
  3467.  #include "msbuffer.h"
  3468.  
  3469.  #define PRINTK(x)
  3470. +#define Printk(x)    printk x
  3471.  /* Well-known binary file extensions */
  3472.  
  3473.  static char bin_extensions[] =
  3474. @@ -117,7 +118,7 @@
  3475.  int msdos_add_cluster(struct inode *inode)
  3476.  {
  3477.      struct super_block *sb = inode->i_sb;
  3478. -    int count,nr,limit,last,current,sector,last_sector;
  3479. +    int count,nr,limit,last,current,sector,last_sector,file_cluster;
  3480.      struct buffer_head *bh;
  3481.      int cluster_size = MSDOS_SB(inode->i_sb)->cluster_size;
  3482.  
  3483. @@ -130,6 +131,7 @@
  3484.          nr = ((count+MSDOS_SB(inode->i_sb)->prev_free) % limit)+2;
  3485.          if (fat_access(inode->i_sb,nr,-1) == 0) break;
  3486.      }
  3487. +    PRINTK (("cnt = %d --",count));
  3488.  #ifdef DEBUG
  3489.  printk("free cluster: %d\n",nr);
  3490.  #endif
  3491. @@ -149,14 +151,30 @@
  3492.  printk("set to %x\n",fat_access(inode->i_sb,nr,-1));
  3493.  #endif
  3494.      last = 0;
  3495. +    /* We must locate the last cluster of the file to add this
  3496. +       new one (nr) to the end of the link list (the FAT).
  3497. +       
  3498. +       Here file_cluster will be the number of the last cluster of the
  3499. +       file (before we add nr).
  3500. +       
  3501. +       last is the corresponding cluster number on the disk. We will
  3502. +       use last to plug the nr cluster. We will use file_cluster to
  3503. +       update the cache.
  3504. +    */
  3505. +    file_cluster = 0;
  3506.      if ((current = MSDOS_I(inode)->i_start) != 0) {
  3507.          cache_lookup(inode,INT_MAX,&last,¤t);
  3508. -        while (current && current != -1)
  3509. +        file_cluster = last;
  3510. +        while (current && current != -1){
  3511. +            PRINTK (("."));
  3512. +            file_cluster++;
  3513.              if (!(current = fat_access(inode->i_sb,
  3514.                  last = current,-1))) {
  3515.                  fs_panic(inode->i_sb,"File without EOF");
  3516.                  return -ENOSPC;
  3517.              }
  3518. +        }
  3519. +        PRINTK ((" --  "));
  3520.      }
  3521.  #ifdef DEBUG
  3522.  printk("last = %d\n",last);
  3523. @@ -183,6 +201,12 @@
  3524.              mark_buffer_dirty(bh, 1);
  3525.              brelse(bh);
  3526.          }
  3527. +    }
  3528. +    if (file_cluster != inode->i_blocks/cluster_size){
  3529. +        printk ("file_cluster badly computed!!! %d <> %ld\n"
  3530. +            ,file_cluster,inode->i_blocks/cluster_size);
  3531. +    }else{
  3532. +        cache_add(inode,file_cluster,nr);
  3533.      }
  3534.      inode->i_blocks += cluster_size;
  3535.      if (S_ISDIR(inode->i_mode)) {
  3536. diff -u --recursive --new-file v1.2.1/linux/fs/umsdos/dir.c linux/fs/umsdos/dir.c
  3537. --- v1.2.1/linux/fs/umsdos/dir.c    Mon Jan 23 10:38:30 1995
  3538. +++ linux/fs/umsdos/dir.c    Wed Mar 22 10:31:42 1995
  3539. @@ -652,7 +652,7 @@
  3540.                  if (*pt == '/') *pt++ = '\0';
  3541.                  if (dir->u.umsdos_i.i_emd_dir == 0){
  3542.                      /* This is a DOS directory */
  3543. -                    ret = msdos_lookup(dir,start,len,result);
  3544. +                    ret = umsdos_rlookup_x(dir,start,len,result,1);
  3545.                  }else{
  3546.                      ret = umsdos_lookup_x(dir,start,len,result,1);
  3547.                  }
  3548. diff -u --recursive --new-file v1.2.1/linux/fs/umsdos/inode.c linux/fs/umsdos/inode.c
  3549. --- v1.2.1/linux/fs/umsdos/inode.c    Mon Jan 23 10:38:28 1995
  3550. +++ linux/fs/umsdos/inode.c    Wed Mar 22 10:31:43 1995
  3551. @@ -418,8 +418,8 @@
  3552.              /* #Specification: pseudo root / mount
  3553.                  When a umsdos fs is mounted, a special handling is done
  3554.                  if it is the root partition. We check for the presence
  3555. -                of the file /linux/etc/init or /linux/etc/rc.
  3556. -                If one is there, we do a chroot("/linux").
  3557. +                of the file /linux/etc/init or /linux/etc/rc or
  3558. +                /linux/sbin/init. If one is there, we do a chroot("/linux").
  3559.  
  3560.                  We check both because (see init/main.c) the kernel
  3561.                  try to exec init at different place and if it fails
  3562. @@ -452,25 +452,42 @@
  3563.                      ,UMSDOS_PSDROOT_LEN,&pseudo)==0
  3564.                  && S_ISDIR(pseudo->i_mode)){
  3565.                  struct inode *etc = NULL;
  3566. -                struct inode *rc = NULL;
  3567. +                struct inode *sbin = NULL;
  3568. +                int pseudo_ok = 0;
  3569.                  Printk (("/%s is there\n",UMSDOS_PSDROOT_NAME));
  3570.                  if (umsdos_real_lookup (pseudo,"etc",3,&etc)==0
  3571.                      && S_ISDIR(etc->i_mode)){
  3572. -                    struct inode *init;
  3573. +                    struct inode *init = NULL;
  3574. +                    struct inode *rc = NULL;
  3575.                      Printk (("/%s/etc is there\n",UMSDOS_PSDROOT_NAME));
  3576.                      if ((umsdos_real_lookup (etc,"init",4,&init)==0
  3577.                              && S_ISREG(init->i_mode))
  3578.                          || (umsdos_real_lookup (etc,"rc",2,&rc)==0
  3579.                              && S_ISREG(rc->i_mode))){
  3580. -                        umsdos_setup_dir_inode (pseudo);
  3581. -                        Printk (("Activating pseudo root /%s\n",UMSDOS_PSDROOT_NAME));
  3582. -                        pseudo_root = pseudo;
  3583. -                        pseudo->i_count++;
  3584. -                        pseudo = NULL;
  3585. +                        pseudo_ok = 1;
  3586.                      }
  3587.                      iput (init);
  3588.                      iput (rc);
  3589.                  }
  3590. +                if (!pseudo_ok
  3591. +                    && umsdos_real_lookup (pseudo,"sbin",4,&sbin)==0
  3592. +                    && S_ISDIR(sbin->i_mode)){
  3593. +                    struct inode *init = NULL;
  3594. +                    Printk (("/%s/sbin is there\n",UMSDOS_PSDROOT_NAME));
  3595. +                    if (umsdos_real_lookup (sbin,"init",4,&init)==0
  3596. +                            && S_ISREG(init->i_mode)){
  3597. +                        pseudo_ok = 1;
  3598. +                    }
  3599. +                    iput (init);
  3600. +                }
  3601. +                if (pseudo_ok){
  3602. +                    umsdos_setup_dir_inode (pseudo);
  3603. +                    Printk (("Activating pseudo root /%s\n",UMSDOS_PSDROOT_NAME));
  3604. +                    pseudo_root = pseudo;
  3605. +                    pseudo->i_count++;
  3606. +                    pseudo = NULL;
  3607. +                }
  3608. +                iput (sbin);
  3609.                  iput (etc);
  3610.              }
  3611.              iput (pseudo);
  3612. diff -u --recursive --new-file v1.2.1/linux/fs/umsdos/rdir.c linux/fs/umsdos/rdir.c
  3613. --- v1.2.1/linux/fs/umsdos/rdir.c    Mon Jan 23 10:38:30 1995
  3614. +++ linux/fs/umsdos/rdir.c    Wed Mar 22 10:31:43 1995
  3615. @@ -66,11 +66,18 @@
  3616.      return ret;
  3617.  }
  3618.  
  3619. -int UMSDOS_rlookup(
  3620. +/*
  3621. +    Lookup into a non promoted directory.
  3622. +    If the result is a directory, make sure we find out if it is
  3623. +    a promoted one or not (calling umsdos_setup_dir_inode(inode)).
  3624. +*/
  3625. +int umsdos_rlookup_x(
  3626.      struct inode *dir,
  3627.      const char *name,
  3628.      int len,
  3629. -    struct inode **result)    /* Will hold inode of the file, if successful */
  3630. +    struct inode **result,    /* Will hold inode of the file, if successful */
  3631. +    int nopseudo)            /* Don't care about pseudo root mode */
  3632. +                            /* so locating "linux" will work */
  3633.  {
  3634.      int ret;
  3635.      if (pseudo_root != NULL
  3636. @@ -90,7 +97,7 @@
  3637.          ret = umsdos_real_lookup (dir,name,len,result);
  3638.          if (ret == 0){
  3639.              struct inode *inode = *result;
  3640. -            if (inode == pseudo_root){
  3641. +            if (inode == pseudo_root && !nopseudo){
  3642.                  /* #Specification: pseudo root / DOS/linux
  3643.                      Even in the real root directory (c:\), the directory
  3644.                      /linux won't show
  3645. @@ -107,6 +114,14 @@
  3646.      }
  3647.      iput (dir);
  3648.      return ret;
  3649. +}
  3650. +int UMSDOS_rlookup(
  3651. +    struct inode *dir,
  3652. +    const char *name,
  3653. +    int len,
  3654. +    struct inode **result)    /* Will hold inode of the file, if successful */
  3655. +{
  3656. +    return umsdos_rlookup_x(dir,name,len,result,0);
  3657.  }
  3658.  
  3659.  static int UMSDOS_rrmdir (
  3660. diff -u --recursive --new-file v1.2.1/linux/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h
  3661. --- v1.2.1/linux/include/asm-i386/pgtable.h    Thu Mar  9 20:37:36 1995
  3662. +++ linux/include/asm-i386/pgtable.h    Wed Mar 22 13:57:41 1995
  3663. @@ -146,7 +146,6 @@
  3664.  extern inline void pmd_clear(pmd_t * pmdp)    { pmd_val(*pmdp) = 0; }
  3665.  extern inline void pmd_reuse(pmd_t * pmdp)    { }
  3666.  
  3667. -#ifdef THREE_LEVEL
  3668.  /*
  3669.   * The "pgd_xxx()" functions here are trivial for a folded two-level
  3670.   * setup: the pgd is never bad, and a pmd always exists (as it's folded
  3671. @@ -162,16 +161,6 @@
  3672.      if (!(mem_map[MAP_NR(pgdp)] & MAP_PAGE_RESERVED))
  3673.          mem_map[MAP_NR(pgdp)]++;
  3674.  }
  3675. -#else
  3676. -/*
  3677. - * These are the old (and incorrect) ones needed for code that doesn't
  3678. - * know about three-level yet..
  3679. - */
  3680. -extern inline int pgd_none(pgd_t pgd)        { return !pgd_val(pgd); }
  3681. -extern inline int pgd_bad(pgd_t pgd)        { return (pgd_val(pgd) & ~PAGE_MASK) != _PAGE_TABLE || pgd_val(pgd) > high_memory; }
  3682. -extern inline int pgd_present(pgd_t pgd)    { return pgd_val(pgd) & _PAGE_PRESENT; }
  3683. -extern inline void pgd_clear(pgd_t * pgdp)    { pgd_val(*pgdp) = 0; }
  3684. -#endif
  3685.  
  3686.  /*
  3687.   * The following only work if pte_present() is true.
  3688. @@ -212,21 +201,6 @@
  3689.  
  3690.  extern inline unsigned long pmd_page(pmd_t pmd)
  3691.  { return pmd_val(pmd) & PAGE_MASK; }
  3692. -
  3693. -#ifndef THREE_LEVEL
  3694. -
  3695. -extern inline unsigned long pgd_page(pgd_t pgd)
  3696. -{ return pgd_val(pgd) & PAGE_MASK; }
  3697. -
  3698. -extern inline void pgd_set(pgd_t * pgdp, pte_t * ptep)
  3699. -{ pgd_val(*pgdp) = _PAGE_TABLE | (unsigned long) ptep; }
  3700. -
  3701. -#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
  3702. -
  3703. -/* the no. of pointers that fit on a page: this will go away */
  3704. -#define PTRS_PER_PAGE    (PAGE_SIZE/sizeof(void*))
  3705. -
  3706. -#endif
  3707.  
  3708.  /* to find an entry in a page-table-directory */
  3709.  extern inline pgd_t * pgd_offset(struct task_struct * tsk, unsigned long address)
  3710. diff -u --recursive --new-file v1.2.1/linux/include/linux/aztcd.h linux/include/linux/aztcd.h
  3711. --- v1.2.1/linux/include/linux/aztcd.h    Fri Feb  3 15:15:09 1995
  3712. +++ linux/include/linux/aztcd.h    Sun Mar 26 11:56:23 1995
  3713. @@ -1,4 +1,4 @@
  3714. -/* $Id: aztcd.h,v 0.90 1995/02/02 18:14:28 root Exp $
  3715. +/* $Id: aztcd.h,v 1.0 1995/03/25 08:27:19 root Exp $
  3716.   * Definitions for a AztechCD268 CD-ROM interface
  3717.   *    Copyright (C) 1994, 1995  Werner Zimmermann
  3718.   *
  3719. @@ -25,6 +25,9 @@
  3720.  /* *** change this to set the I/O port address */
  3721.  #define AZT_BASE_ADDR        0x320
  3722.  
  3723. +/* Comment this out to prevent tray from locking */
  3724. +#define AZT_ALLOW_TRAY_LOCK    1
  3725. +
  3726.  /* use incompatible ioctls for reading in raw and cooked mode */
  3727.  #define AZT_PRIVATE_IOCTLS
  3728.  
  3729. @@ -72,6 +75,8 @@
  3730.  #define ACMD_GET_Q_CHANNEL      0x50        /* read info from q channel */
  3731.  #define ACMD_EJECT        0x60        /* eject/open tray */
  3732.  #define ACMD_CLOSE              0x61            /* close tray */
  3733. +#define ACMD_LOCK        0x71        /* lock tray closed */
  3734. +#define ACMD_UNLOCK        0x72        /* unlock tray */
  3735.  #define ACMD_PAUSE        0x80        /* pause */
  3736.  #define ACMD_STOP        0x81        /* stop play */
  3737.  #define ACMD_PLAY_AUDIO        0x90        /* play audio track */
  3738. diff -u --recursive --new-file v1.2.1/linux/include/linux/cyclades.h linux/include/linux/cyclades.h
  3739. --- v1.2.1/linux/include/linux/cyclades.h    Sat Mar 18 12:45:46 1995
  3740. +++ linux/include/linux/cyclades.h    Fri Mar 24 17:18:01 1995
  3741. @@ -86,7 +86,7 @@
  3742.  
  3743.  
  3744.  
  3745. -#define CyMaxChipsPerCard 4
  3746. +#define CyMaxChipsPerCard 8
  3747.  
  3748.  /**** CD1400 registers ****/
  3749.  
  3750. diff -u --recursive --new-file v1.2.1/linux/include/linux/ext2_fs.h linux/include/linux/ext2_fs.h
  3751. --- v1.2.1/linux/include/linux/ext2_fs.h    Thu Mar  9 20:37:36 1995
  3752. +++ linux/include/linux/ext2_fs.h    Wed Mar 22 10:33:59 1995
  3753. @@ -1,9 +1,10 @@
  3754.  /*
  3755.   *  linux/include/linux/ext2_fs.h
  3756.   *
  3757. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3758. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3759. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3760. + * Copyright (C) 1992, 1993, 1994, 1995
  3761. + * Remy Card (card@masi.ibp.fr)
  3762. + * Laboratoire MASI - Institut Blaise Pascal
  3763. + * Universite Pierre et Marie Curie (Paris VI)
  3764.   *
  3765.   *  from
  3766.   *
  3767. @@ -49,7 +50,7 @@
  3768.  /*
  3769.   * The second extended file system version
  3770.   */
  3771. -#define EXT2FS_DATE        "94/10/23"
  3772. +#define EXT2FS_DATE        "95/03/19"
  3773.  #define EXT2FS_VERSION        "0.5a"
  3774.  
  3775.  /*
  3776. diff -u --recursive --new-file v1.2.1/linux/include/linux/ext2_fs_i.h linux/include/linux/ext2_fs_i.h
  3777. --- v1.2.1/linux/include/linux/ext2_fs_i.h    Sun Feb 26 18:52:02 1995
  3778. +++ linux/include/linux/ext2_fs_i.h    Wed Mar 22 10:33:59 1995
  3779. @@ -1,9 +1,10 @@
  3780.  /*
  3781.   *  linux/include/linux/ext2_fs_i.h
  3782.   *
  3783. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3784. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3785. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3786. + * Copyright (C) 1992, 1993, 1994, 1995
  3787. + * Remy Card (card@masi.ibp.fr)
  3788. + * Laboratoire MASI - Institut Blaise Pascal
  3789. + * Universite Pierre et Marie Curie (Paris VI)
  3790.   *
  3791.   *  from
  3792.   *
  3793. diff -u --recursive --new-file v1.2.1/linux/include/linux/ext2_fs_sb.h linux/include/linux/ext2_fs_sb.h
  3794. --- v1.2.1/linux/include/linux/ext2_fs_sb.h    Fri Nov  4 12:38:45 1994
  3795. +++ linux/include/linux/ext2_fs_sb.h    Wed Mar 22 10:33:59 1995
  3796. @@ -1,9 +1,10 @@
  3797.  /*
  3798.   *  linux/include/linux/ext2_fs_sb.h
  3799.   *
  3800. - *  Copyright (C) 1992, 1993, 1994  Remy Card (card@masi.ibp.fr)
  3801. - *                                  Laboratoire MASI - Institut Blaise Pascal
  3802. - *                                  Universite Pierre et Marie Curie (Paris VI)
  3803. + * Copyright (C) 1992, 1993, 1994, 1995
  3804. + * Remy Card (card@masi.ibp.fr)
  3805. + * Laboratoire MASI - Institut Blaise Pascal
  3806. + * Universite Pierre et Marie Curie (Paris VI)
  3807.   *
  3808.   *  from
  3809.   *
  3810. diff -u --recursive --new-file v1.2.1/linux/include/linux/umsdos_fs.h linux/include/linux/umsdos_fs.h
  3811. --- v1.2.1/linux/include/linux/umsdos_fs.h    Wed Jan 25 09:25:39 1995
  3812. +++ linux/include/linux/umsdos_fs.h    Wed Mar 22 10:31:43 1995
  3813. @@ -4,16 +4,19 @@
  3814.  #define UMSDOS_VERSION    0
  3815.  #define UMSDOS_RELEASE    4
  3816.  
  3817. -#ifndef LINUX_FS_H
  3818. -#include <linux/fs.h>
  3819. -#endif
  3820. -
  3821.  /* This is the file acting as a directory extension */
  3822.  #define UMSDOS_EMD_FILE        "--linux-.---"
  3823.  #define UMSDOS_EMD_NAMELEN    12
  3824.  #define UMSDOS_PSDROOT_NAME    "linux"
  3825.  #define UMSDOS_PSDROOT_LEN    5
  3826.  
  3827. +#ifndef _LINUX_TYPES_H
  3828. +#include <linux/types.h>
  3829. +#endif
  3830. +#ifndef _LINUX_DIRENT_H
  3831. +#include <linux/dirent.h>
  3832. +#endif
  3833. +
  3834.  struct umsdos_fake_info {
  3835.      char fname[13];
  3836.      int  len;
  3837. @@ -81,7 +84,6 @@
  3838.  
  3839.  #define UMSDOS_RENAME_DOS    1244    /* rename a file/directory in the DOS */
  3840.                                      /* directory only */
  3841. -
  3842.  struct umsdos_ioctl{
  3843.      struct dirent dos_dirent;
  3844.      struct umsdos_dirent umsdos_dirent;
  3845. @@ -121,6 +123,10 @@
  3846.  #define EDM_ENTRY_ISUSED(e) ((e)->name_len!=0)
  3847.  
  3848.  #ifdef __KERNEL__
  3849. +
  3850. +#ifndef LINUX_FS_H
  3851. +#include <linux/fs.h>
  3852. +#endif
  3853.  
  3854.  extern struct inode_operations umsdos_dir_inode_operations;
  3855.  extern struct file_operations  umsdos_file_operations;
  3856. diff -u --recursive --new-file v1.2.1/linux/include/linux/umsdos_fs.p linux/include/linux/umsdos_fs.p
  3857. --- v1.2.1/linux/include/linux/umsdos_fs.p    Mon Oct 24 07:51:44 1994
  3858. +++ linux/include/linux/umsdos_fs.p    Wed Mar 22 10:31:43 1995
  3859. @@ -1,6 +1,6 @@
  3860. -/* check.c 20/07/94 10.08.36 */
  3861. +/* check.c 30/01/95 22.05.32 */
  3862.  void check_page_tables (void);
  3863. -/* dir.c 22/07/94 01.06.58 */
  3864. +/* dir.c 18/03/95 00.30.50 */
  3865.  int UMSDOS_dir_read (struct inode *inode,
  3866.       struct file *filp,
  3867.       char *buf,
  3868. @@ -19,7 +19,7 @@
  3869.       int len,
  3870.       struct inode **result);
  3871.  int umsdos_hlink2inode (struct inode *hlink, struct inode **result);
  3872. -/* emd.c 22/07/94 01.06.38 */
  3873. +/* emd.c 30/01/95 22.05.32 */
  3874.  int umsdos_readdir_kmem (struct inode *inode,
  3875.       struct file *filp,
  3876.       struct dirent *dirent,
  3877. @@ -57,8 +57,8 @@
  3878.  int umsdos_findentry (struct inode *dir,
  3879.       struct umsdos_info *info,
  3880.       int expect);
  3881. -/* file.c 20/07/94 10.08.36 */
  3882. -/* inode.c 20/07/94 10.08.36 */
  3883. +/* file.c 30/01/95 22.05.56 */
  3884. +/* inode.c 25/02/95 09.21.46 */
  3885.  void UMSDOS_put_inode (struct inode *inode);
  3886.  void UMSDOS_put_super (struct super_block *sb);
  3887.  void UMSDOS_statfs (struct super_block *sb, struct statfs *buf);
  3888. @@ -81,16 +81,16 @@
  3889.  struct super_block *UMSDOS_read_super (struct super_block *s,
  3890.       void *data,
  3891.       int silent);
  3892. -/* ioctl.c 20/07/94 10.08.36 */
  3893. +/* ioctl.c 21/02/95 20.58.22 */
  3894.  int UMSDOS_ioctl_dir (struct inode *dir,
  3895.       struct file *filp,
  3896.       unsigned int cmd,
  3897.       unsigned long data);
  3898. -/* mangle.c 20/07/94 10.08.36 */
  3899. +/* mangle.c 30/01/95 22.05.56 */
  3900.  void umsdos_manglename (struct umsdos_info *info);
  3901.  int umsdos_evalrecsize (int len);
  3902.  int umsdos_parse (const char *fname, int len, struct umsdos_info *info);
  3903. -/* namei.c 22/07/94 00.59.28 */
  3904. +/* namei.c 30/01/95 22.05.56 */
  3905.  void umsdos_lockcreate (struct inode *dir);
  3906.  void umsdos_startlookup (struct inode *dir);
  3907.  void umsdos_unlockcreate (struct inode *dir);
  3908. @@ -125,9 +125,14 @@
  3909.       struct inode *new_dir,
  3910.       const char *new_name,
  3911.       int new_len);
  3912. -/* rdir.c 20/07/94 10.08.38 */
  3913. +/* rdir.c 18/03/95 00.30.18 */
  3914. +int umsdos_rlookup_x (struct inode *dir,
  3915. +     const char *name,
  3916. +     int len,
  3917. +     struct inode **result,
  3918. +     int nopseudo);
  3919.  int UMSDOS_rlookup (struct inode *dir,
  3920.       const char *name,
  3921.       int len,
  3922.       struct inode **result);
  3923. -/* symlink.c 22/07/94 00.59.10 */
  3924. +/* symlink.c 30/01/95 22.05.32 */
  3925. diff -u --recursive --new-file v1.2.1/linux/include/linux/umsdos_fs_i.h linux/include/linux/umsdos_fs_i.h
  3926. --- v1.2.1/linux/include/linux/umsdos_fs_i.h    Wed Aug 10 19:26:45 1994
  3927. +++ linux/include/linux/umsdos_fs_i.h    Wed Mar 22 10:31:43 1995
  3928. @@ -68,73 +68,3 @@
  3929.  };
  3930.  
  3931.  #endif
  3932. -#ifndef UMSDOS_FS_I_H
  3933. -#define UMSDOS_FS_I_H
  3934. -
  3935. -#ifndef _LINUX_TYPES_H
  3936. -#include <linux/types.h>
  3937. -#endif
  3938. -#include <linux/msdos_fs_i.h>
  3939. -#include <linux/pipe_fs_i.h>
  3940. -
  3941. -/* #Specification: strategy / in memory inode
  3942. -    Here is the information specific to the inode of the UMSDOS file
  3943. -    system. This information is added to the end of the standard struct
  3944. -    inode. Each file system has its own extension to struct inode,
  3945. -    so do the umsdos file system.
  3946. -
  3947. -    The strategy is to have the umsdos_inode_info as a superset of
  3948. -    the msdos_inode_info, since most of the time the job is done
  3949. -    by the msdos fs code.
  3950. -
  3951. -    So we duplicate the msdos_inode_info, and add our own info at the
  3952. -    end.
  3953. -
  3954. -    For all file type (and directory) the inode has a reference to:
  3955. -        the directory which hold this entry: i_dir_owner
  3956. -        The EMD file of i_dir_owner: i_emd_owner
  3957. -        The offset in this EMD file of the entry: pos
  3958. -
  3959. -    For directory, we also have a reference to the inode of its
  3960. -    own EMD file. Also, we have dir_locking_info to help synchronise
  3961. -    file creation and file lookup. This data is sharing space with
  3962. -    the pipe_inode_info not used by directory. See also msdos_fs_i.h
  3963. -    for more information about pipe_inode_info and msdos_inode_info.
  3964. -
  3965. -    Special file and fifo do have an inode which correspond to an
  3966. -    empty MSDOS file.
  3967. -
  3968. -    symlink are processed mostly like regular file. The content is the
  3969. -    link.
  3970. -
  3971. -    fifos add there own extension to the inode. I have reserved some
  3972. -    space for fifos side by side with msdos_inode_info. This is just
  3973. -    to for the show, because msdos_inode_info already include the
  3974. -    pipe_inode_info.
  3975. -
  3976. -    The UMSDOS specific extension is placed after the union.
  3977. -*/
  3978. -struct dir_locking_info {
  3979. -    struct wait_queue *p;
  3980. -    short int looking;        /* How many process doing a lookup */
  3981. -    short int creating;        /* Is there any creation going on here */
  3982. -                            /* Only one at a time, although one */
  3983. -                            /* may recursively lock, so it is a counter */
  3984. -    long pid;                /* pid of the process owning the creation */
  3985. -                            /* lock */
  3986. -};
  3987. -struct umsdos_inode_info {
  3988. -    union {
  3989. -        struct msdos_inode_info msdos_info;
  3990. -        struct pipe_inode_info pipe_info;
  3991. -        struct dir_locking_info dir_info;
  3992. -    }u;    /* Simply a filler, never referenced by fs/umsdos/... */
  3993. -    unsigned long i_dir_owner;    /* Inode of the dir which hold this */
  3994. -                                /* entry */
  3995. -    unsigned long i_emd_owner;    /* Inode of the EMD file of i_dir_owner */
  3996. -    off_t pos;                    /* Entry offset in the emd_owner file */
  3997. -    /* The rest is used only if this inode describe a directory */
  3998. -    unsigned long i_emd_dir;    /* Inode of the EMD file of this inode */
  3999. -};
  4000. -
  4001. -#endif
  4002. diff -u --recursive --new-file v1.2.1/linux/ipc/shm.c linux/ipc/shm.c
  4003. --- v1.2.1/linux/ipc/shm.c    Sat Feb 25 15:42:57 1995
  4004. +++ linux/ipc/shm.c    Fri Mar 24 17:18:01 1995
  4005. @@ -661,7 +661,7 @@
  4006.  }
  4007.  
  4008.  /*
  4009. - * Goes through counter = (shm_rss << prio) present shm pages.
  4010. + * Goes through counter = (shm_rss >> prio) present shm pages.
  4011.   */
  4012.  static unsigned long swap_id = 0; /* currently being swapped */
  4013.  static unsigned long swap_idx = 0; /* next to swap */
  4014. @@ -672,7 +672,8 @@
  4015.      struct shmid_ds *shp;
  4016.      struct vm_area_struct *shmd;
  4017.      unsigned int swap_nr;
  4018. -    unsigned long id, idx, invalid = 0;
  4019. +    unsigned long id, idx;
  4020. +    int loop = 0, invalid = 0;
  4021.      int counter;
  4022.  
  4023.      counter = shm_rss >> prio;
  4024. @@ -682,21 +683,22 @@
  4025.   check_id:
  4026.      shp = shm_segs[swap_id];
  4027.      if (shp == IPC_UNUSED || shp == IPC_NOID || shp->shm_perm.mode & SHM_LOCKED ) {
  4028. +        next_id:
  4029.          swap_idx = 0;
  4030. -        if (++swap_id > max_shmid)
  4031. +        if (++swap_id > max_shmid) {
  4032. +            if (loop)
  4033. +                goto failed;
  4034. +            loop = 1;
  4035.              swap_id = 0;
  4036. +        }
  4037.          goto check_id;
  4038.      }
  4039.      id = swap_id;
  4040.  
  4041.   check_table:
  4042.      idx = swap_idx++;
  4043. -    if (idx >= shp->shm_npages) {
  4044. -        swap_idx = 0;
  4045. -        if (++swap_id > max_shmid)
  4046. -            swap_id = 0;
  4047. -        goto check_id;
  4048. -    }
  4049. +    if (idx >= shp->shm_npages)
  4050. +        goto next_id;
  4051.  
  4052.      pte_val(page) = shp->shm_pages[idx];
  4053.      if (!pte_present(page))
  4054. @@ -704,6 +706,7 @@
  4055.      swap_attempts++;
  4056.  
  4057.      if (--counter < 0) { /* failed */
  4058. +        failed:
  4059.          if (invalid)
  4060.              invalidate();
  4061.          swap_free (swap_nr);
  4062. diff -u --recursive --new-file v1.2.1/linux/ipc/util.c linux/ipc/util.c
  4063. --- v1.2.1/linux/ipc/util.c    Mon Jan 23 23:04:10 1995
  4064. +++ linux/ipc/util.c    Fri Mar 24 17:18:00 1995
  4065. @@ -132,7 +132,9 @@
  4066.                  put_fs_long (raddr, (ulong *) third);
  4067.                  return 0;
  4068.                  }
  4069. -            case 1:
  4070. +            case 1:    /* iBCS2 emulator entry point */
  4071. +                if (get_fs() != get_ds())
  4072. +                    return -EINVAL;
  4073.                  return sys_shmat (first, (char *) ptr, second, (ulong *) third);
  4074.              }
  4075.          case SHMDT: 
  4076. diff -u --recursive --new-file v1.2.1/linux/kernel/ksyms.c linux/kernel/ksyms.c
  4077. --- v1.2.1/linux/kernel/ksyms.c    Thu Feb 23 13:52:40 1995
  4078. +++ linux/kernel/ksyms.c    Sun Mar 19 12:54:09 1995
  4079. @@ -62,6 +62,7 @@
  4080.  #ifdef CONFIG_SCSI
  4081.  #include "../drivers/scsi/scsi.h"
  4082.  #include "../drivers/scsi/hosts.h"
  4083. +#include "../drivers/scsi/constants.h"
  4084.  #endif
  4085.  
  4086.  extern int sys_tz;
  4087. @@ -315,6 +316,7 @@
  4088.      X(scsi_register),
  4089.      X(scsi_unregister),
  4090.      X(scsicam_bios_param),
  4091. +    X(print_command),
  4092.  #endif
  4093.      /* Added to make file system as module */
  4094.      X(set_writetime),
  4095. diff -u --recursive --new-file v1.2.1/linux/kernel/sched.c linux/kernel/sched.c
  4096. --- v1.2.1/linux/kernel/sched.c    Wed Feb  1 21:46:08 1995
  4097. +++ linux/kernel/sched.c    Sun Mar 26 15:48:40 1995
  4098. @@ -426,9 +426,6 @@
  4099.  static void second_overflow(void)
  4100.  {
  4101.      long ltemp;
  4102. -    /* last time the cmos clock got updated */
  4103. -    static long last_rtc_update=0;
  4104. -    extern int set_rtc_mmss(unsigned long);
  4105.  
  4106.      /* Bump the maxerror field */
  4107.      time_maxerror = (0x70000000-time_maxerror < time_tolerance) ?
  4108. @@ -458,7 +455,7 @@
  4109.          if (xtime.tv_sec % 86400 == 0) {
  4110.              xtime.tv_sec--; /* !! */
  4111.              time_status = TIME_OOP;
  4112. -            printk("Clock: inserting leap second 23:59:60 GMT\n");
  4113. +            printk("Clock: inserting leap second 23:59:60 UTC\n");
  4114.          }
  4115.          break;
  4116.  
  4117. @@ -467,7 +464,7 @@
  4118.          if (xtime.tv_sec % 86400 == 86399) {
  4119.              xtime.tv_sec++;
  4120.              time_status = TIME_OK;
  4121. -            printk("Clock: deleting leap second 23:59:59 GMT\n");
  4122. +            printk("Clock: deleting leap second 23:59:59 UTC\n");
  4123.          }
  4124.          break;
  4125.  
  4126. @@ -475,11 +472,6 @@
  4127.          time_status = TIME_OK;
  4128.          break;
  4129.      }
  4130. -    if (time_status != TIME_BAD && xtime.tv_sec > last_rtc_update + 660)
  4131. -      if (set_rtc_mmss(xtime.tv_sec) == 0)
  4132. -        last_rtc_update = xtime.tv_sec;
  4133. -      else
  4134. -        last_rtc_update = xtime.tv_sec - 600; /* do it again in one min */
  4135.  }
  4136.  
  4137.  /*
  4138. @@ -537,6 +529,9 @@
  4139.  {
  4140.      unsigned long mask;
  4141.      struct timer_struct *tp;
  4142. +    /* last time the cmos clock got updated */
  4143. +    static long last_rtc_update=0;
  4144. +    extern int set_rtc_mmss(unsigned long);
  4145.  
  4146.      long ltemp, psecs;
  4147.  
  4148. @@ -585,6 +580,18 @@
  4149.          xtime.tv_sec++;
  4150.          second_overflow();
  4151.      }
  4152. +
  4153. +    /* If we have an externally synchronized Linux clock, then update
  4154. +     * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
  4155. +     * called as close as possible to 500 ms before the new second starts.
  4156. +     */
  4157. +    if (time_status != TIME_BAD && xtime.tv_sec > last_rtc_update + 660 &&
  4158. +        xtime.tv_usec > 500000 - (tick >> 1) &&
  4159. +        xtime.tv_usec < 500000 + (tick >> 1))
  4160. +      if (set_rtc_mmss(xtime.tv_sec) == 0)
  4161. +        last_rtc_update = xtime.tv_sec;
  4162. +      else
  4163. +        last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
  4164.  
  4165.      jiffies++;
  4166.      calc_load();
  4167. diff -u --recursive --new-file v1.2.1/linux/kernel/time.c linux/kernel/time.c
  4168. --- v1.2.1/linux/kernel/time.c    Wed Feb  1 09:19:36 1995
  4169. +++ linux/kernel/time.c    Sun Mar 26 15:48:40 1995
  4170. @@ -10,12 +10,19 @@
  4171.  /*
  4172.   * Modification history kernel/time.c
  4173.   * 
  4174. - * 02 Sep 93    Philip Gladstone
  4175. + * 1993-09-02    Philip Gladstone
  4176.   *      Created file with time related functions from sched.c and adjtimex() 
  4177. - * 08 Oct 93    Torsten Duwe
  4178. + * 1993-10-08    Torsten Duwe
  4179.   *      adjtime interface update and CMOS clock write code
  4180. - * 02 Jul 94    Alan Modra
  4181. + * 1994-07-02    Alan Modra
  4182.   *    fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
  4183. + * 1995-03-26    Markus Kuhn
  4184. + *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
  4185. + *      precision CMOS clock update
  4186. + *
  4187. + * to do: adjtimex() has to be updated to recent (1994-12-13) revision
  4188. + *        of David Mill's kernel clock model. For more information, check
  4189. + *        <ftp://louie.udel.edu/pub/ntp/kernel.tar.Z>. 
  4190.   */
  4191.  
  4192.  #include <linux/errno.h>
  4193. @@ -31,16 +38,20 @@
  4194.  #include <linux/mc146818rtc.h>
  4195.  #include <linux/timex.h>
  4196.  
  4197. -/* converts date to days since 1/1/1970
  4198. - * assumes year,mon,day in normal date format
  4199. - * ie. 1/1/1970 => year=1970, mon=1, day=1
  4200. +/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
  4201. + * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
  4202. + * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
  4203.   *
  4204. - * For the Julian calendar (which was used in Russia before 1917,
  4205. + * [For the Julian calendar (which was used in Russia before 1917,
  4206.   * Britain & colonies before 1752, anywhere else before 1582,
  4207.   * and is still in use by some communities) leave out the
  4208. - * -year/100+year/400 terms, and add 10.
  4209. + * -year/100+year/400 terms, and add 10.]
  4210.   *
  4211.   * This algorithm was first published by Gauss (I think).
  4212. + *
  4213. + * WARNING: this function will overflow on 2106-02-07 06:28:16 on
  4214. + * machines were long is 32-bit! (However, as time_t is signed, we
  4215. + * will already get problems at other places on 2038-01-19 03:14:08)
  4216.   */
  4217.  static inline unsigned long mktime(unsigned int year, unsigned int mon,
  4218.      unsigned int day, unsigned int hour,
  4219. @@ -63,16 +74,16 @@
  4220.      unsigned int year, mon, day, hour, min, sec;
  4221.      int i;
  4222.  
  4223. -    /* checking for Update-In-Progress could be done more elegantly
  4224. -     * (using the "update finished"-interrupt for example), but that
  4225. -     * would require excessive testing. promise I'll do that when I find
  4226. -     * the time.            - Torsten
  4227. +    /* The Linux interpretation of the CMOS clock register contents:
  4228. +     * When the Update-In-Progress (UIP) flag goes from 1 to 0, the
  4229. +     * RTC registers show the second which has precisely just started.
  4230. +     * Let's hope other operating systems interpret the RTC the same way.
  4231.       */
  4232.      /* read RTC exactly on falling edge of update flag */
  4233.      for (i = 0 ; i < 1000000 ; i++)    /* may take up to 1 second... */
  4234.          if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)
  4235.              break;
  4236. -    for (i = 0 ; i < 1000000 ; i++)    /* must try at least 2.228 ms*/
  4237. +    for (i = 0 ; i < 1000000 ; i++)    /* must try at least 2.228 ms */
  4238.          if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
  4239.              break;
  4240.      do { /* Isn't this overkill ? UIP above should guarantee consistency */
  4241. @@ -97,6 +108,7 @@
  4242.      xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
  4243.      xtime.tv_usec = 0;
  4244.  }
  4245. +
  4246.  /* 
  4247.   * The timezone where the local system is located.  Used as a default by some
  4248.   * programs who obtain this value by using gettimeofday.
  4249. @@ -146,25 +158,25 @@
  4250.   * counter rather than 11932! This has an adverse impact on
  4251.   * do_gettimeoffset() -- it stops working! What is also not
  4252.   * good is that the interval that our timer function gets called
  4253. - * is no longer 10.0002 msecs, but 9.9767 msec. To get around this
  4254. + * is no longer 10.0002 ms, but 9.9767 ms. To get around this
  4255.   * would require using a different timing source. Maybe someone
  4256.   * could use the RTC - I know that this can interrupt at frequencies
  4257.   * ranging from 8192Hz to 2Hz. If I had the energy, I'd somehow fix
  4258.   * it so that at startup, the timer code in sched.c would select
  4259.   * using either the RTC or the 8253 timer. The decision would be
  4260.   * based on whether there was any other device around that needed
  4261. - * to trample on the 8253. I'd set up the RTC to interrupt at 1024Hz,
  4262. + * to trample on the 8253. I'd set up the RTC to interrupt at 1024 Hz,
  4263.   * and then do some jiggery to have a version of do_timer that 
  4264. - * advanced the clock by 1/1024 sec. Every time that reached over 1/100
  4265. + * advanced the clock by 1/1024 s. Every time that reached over 1/100
  4266.   * of a second, then do all the old code. If the time was kept correct
  4267.   * then do_gettimeoffset could just return 0 - there is no low order
  4268.   * divider that can be accessed.
  4269.   *
  4270.   * Ideally, you would be able to use the RTC for the speaker driver,
  4271.   * but it appears that the speaker driver really needs interrupt more
  4272. - * often than every 120us or so.
  4273. + * often than every 120 us or so.
  4274.   *
  4275. - * Anyway, this needs more thought....        pjsg (28 Aug 93)
  4276. + * Anyway, this needs more thought....        pjsg (1993-08-28)
  4277.   * 
  4278.   * If you are really that interested, you should be reading
  4279.   * comp.protocols.time.ntp!
  4280. @@ -237,7 +249,7 @@
  4281.  }
  4282.  
  4283.  /*
  4284. - * Adjust the time obtained from the CMOS to be GMT time instead of
  4285. + * Adjust the time obtained from the CMOS to be UTC time instead of
  4286.   * local time.
  4287.   * 
  4288.   * This is ugly, but preferable to the alternatives.  Otherwise we
  4289. @@ -246,11 +258,11 @@
  4290.   * hard to make the program warp the clock precisely n hours)  or
  4291.   * compile in the timezone information into the kernel.  Bad, bad....
  4292.   *
  4293. - * XXX Currently does not adjust for daylight savings time.  May not
  4294. - * need to do anything, depending on how smart (dumb?) the BIOS
  4295. - * is.  Blast it all.... the best thing to do not depend on the CMOS
  4296. - * clock at all, but get the time via NTP or timed if you're on a 
  4297. - * network....                - TYT, 1/1/92
  4298. + *                              - TYT, 1992-01-01
  4299. + *
  4300. + * The best thing to do is to keep the CMOS clock in universal time (UTC)
  4301. + * as real UNIX machines always do it. This avoids all headaches about
  4302. + * daylight saving times and warping kernel clocks.
  4303.   */
  4304.  inline static void warp_clock(void)
  4305.  {
  4306. @@ -260,12 +272,13 @@
  4307.  }
  4308.  
  4309.  /*
  4310. - * The first time we set the timezone, we will warp the clock so that
  4311. - * it is ticking GMT time instead of local time.  Presumably, 
  4312. - * if someone is setting the timezone then we are running in an
  4313. - * environment where the programs understand about timezones.
  4314. - * This should be done at boot time in the /etc/rc script, as
  4315. - * soon as possible, so that the clock can be set right.  Otherwise,
  4316. + * In case for some reason the CMOS clock has not already been running
  4317. + * in UTC, but in some local time: The first time we set the timezone,
  4318. + * we will warp the clock so that it is ticking UTC time instead of
  4319. + * local time. Presumably, if someone is setting the timezone then we
  4320. + * are running in an environment where the programs understand about
  4321. + * timezones. This should be done at boot time in the /etc/rc script,
  4322. + * as soon as possible, so that the clock can be set right. Otherwise,
  4323.   * various programs will get confused when the clock gets warped.
  4324.   */
  4325.  asmlinkage int sys_settimeofday(struct timeval *tv, struct timezone *tz)
  4326. @@ -438,6 +451,13 @@
  4327.      return time_status;
  4328.  }
  4329.  
  4330. +/*
  4331. + * In order to set the CMOS clock precisely, set_rtc_mmss has to be
  4332. + * called 500 ms after the second nowtime has started, because when
  4333. + * nowtime is written into the registers of the CMOS clock, it will
  4334. + * jump to the next second precisely 500 ms later. Check the Motorola
  4335. + * MC146818A or Dallas DS12887 data sheet for details.
  4336. + */
  4337.  int set_rtc_mmss(unsigned long nowtime)
  4338.  {
  4339.    int retval = 0;
  4340. @@ -478,7 +498,15 @@
  4341.    else
  4342.      retval = -1;
  4343.  
  4344. -  CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
  4345. +  /* The following flags have to be released exactly in this order,
  4346. +   * otherwise the DS12887 (popular MC146818A clone with integrated
  4347. +   * battery and quartz) will not reset the oscillator and will not
  4348. +   * update precisely 500 ms later. You won't find this mentioned in
  4349. +   * the Dallas Semiconductor data sheets, but who believes data
  4350. +   * sheets anyway ...                           -- Markus Kuhn
  4351. +   */
  4352.    CMOS_WRITE(save_control, RTC_CONTROL);
  4353. +  CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
  4354. +
  4355.    return retval;
  4356.  }
  4357. diff -u --recursive --new-file v1.2.1/linux/mm/swap.c linux/mm/swap.c
  4358. --- v1.2.1/linux/mm/swap.c    Thu Mar  9 20:37:36 1995
  4359. +++ linux/mm/swap.c    Fri Mar 24 17:18:01 1995
  4360. @@ -468,6 +468,11 @@
  4361.  {
  4362.      unsigned long end;
  4363.  
  4364. +    /* Don't swap out areas like shared memory which have their
  4365. +        own separate swapping mechanism. */
  4366. +    if (vma->vm_flags & VM_SHM)
  4367. +        return 0;
  4368. +
  4369.      end = vma->vm_end;
  4370.      while (start < end) {
  4371.          int result = swap_out_pgd(vma, pgdir, start, end);
  4372. diff -u --recursive --new-file v1.2.1/linux/net/inet/ipx.c linux/net/inet/ipx.c
  4373. --- v1.2.1/linux/net/inet/ipx.c    Sat Mar 18 12:45:46 1995
  4374. +++ linux/net/inet/ipx.c    Wed Mar 22 10:34:00 1995
  4375. @@ -551,7 +551,8 @@
  4376.  
  4377.      /* See if we should update our network number */
  4378.      if ((intrfc->if_netnum == 0L) && 
  4379. -        (ipx->ipx_source.net == ipx->ipx_dest.net)) {
  4380. +        (ipx->ipx_source.net == ipx->ipx_dest.net) &&
  4381. +        (ipx->ipx_source.net != 0L)) {
  4382.          /* NB: NetWare servers lie about their hop count so we
  4383.           * dropped the test based on it.  This is the best way
  4384.           * to determine this is a 0 hop count packet.
  4385. diff -u --recursive --new-file v1.2.1/linux/net/inet/tcp.c linux/net/inet/tcp.c
  4386. --- v1.2.1/linux/net/inet/tcp.c    Thu Mar  9 20:37:37 1995
  4387. +++ linux/net/inet/tcp.c    Wed Mar 22 10:34:00 1995
  4388. @@ -132,6 +132,9 @@
  4389.   *        Alan Cox    :    Fixed the closing state machine to
  4390.   *                    resemble the RFC.
  4391.   *        Alan Cox    :    More 'per spec' fixes.
  4392. + *        Alan Cox    :    tcp_data() doesn't ack illegal PSH
  4393. + *                    only frames. At least one pc tcp stack
  4394. + *                    generates them.
  4395.   *
  4396.   *
  4397.   * To Fix:
  4398. @@ -3810,7 +3813,7 @@
  4399.         
  4400.      sk->bytes_rcv += skb->len;
  4401.      
  4402. -    if (skb->len == 0 && !th->fin && !th->urg && !th->psh) 
  4403. +    if (skb->len == 0 && !th->fin) 
  4404.      {
  4405.          /* 
  4406.           *    Don't want to keep passing ack's back and forth. 
  4407.