diff -u --recursive --new-file v1.2.1/linux/CREDITS linux/CREDITS --- v1.2.1/linux/CREDITS Thu Mar 9 20:37:33 1995 +++ linux/CREDITS Wed Mar 22 10:42:43 1995 @@ -275,10 +275,11 @@ S: USA N: Nigel Gamble -E: nigel%gamble.uucp@gate.net +E: nigel@nrg.org +E: nigel@sgi.com D: Interrupt-driven printer driver -S: 301 Norwood Terrace, Apartment N226 -S: Boca Raton, Florida 33431-6588 +S: 765 N Rengstorff Ave, Apartment 7 +S: Mountain View, California 94043-2420 S: USA N: Jacques Gelinas diff -u --recursive --new-file v1.2.1/linux/Makefile linux/Makefile --- v1.2.1/linux/Makefile Sat Mar 18 12:45:44 1995 +++ linux/Makefile Wed Mar 22 10:34:26 1995 @@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 2 -SUBLEVEL = 1 +SUBLEVEL = 2 ARCH = i386 diff -u --recursive --new-file v1.2.1/linux/README linux/README --- v1.2.1/linux/README Sat Mar 18 12:45:44 1995 +++ linux/README Wed Mar 22 11:43:35 1995 @@ -59,7 +59,7 @@ rm -rf linux rm -rf asm ln -s /usr/src/linux/include/linux . - ln -s /usr/src/linux/include/asm . + ln -s /usr/src/linux/include/asm-i386 . - make sure you have no stale .o files and dependencies lying around: diff -u --recursive --new-file v1.2.1/linux/README.modules linux/README.modules --- v1.2.1/linux/README.modules Tue Jan 31 09:39:02 1995 +++ linux/README.modules Sun Mar 26 11:56:23 1995 @@ -45,6 +45,9 @@ Some misc modules: lp: line printer binfmt_elf: elf loader + sbpcd: CDROM-driver for Matsushita,Panasonic CR52x,CR56x + sonycd535: CDROM-driver for Sony CD535 + aztcd: CDROM-driver for Aztech,Orchid,Okano,Wearnes When you have made the kernel, you create the modules by doing: diff -u --recursive --new-file v1.2.1/linux/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c --- v1.2.1/linux/arch/i386/kernel/vm86.c Sun Feb 5 13:21:31 1995 +++ linux/arch/i386/kernel/vm86.c Wed Mar 22 14:11:42 1995 @@ -69,26 +69,34 @@ static void mark_screen_rdonly(struct task_struct * tsk) { - pgd_t *pg_dir; + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte; + int i; - pg_dir = PAGE_DIR_OFFSET(tsk, 0); - if (!pgd_none(*pg_dir)) { - pte_t *pg_table; - int i; - - if (pgd_bad(*pg_dir)) { - printk("vm86: bad page table directory entry %08lx\n", pgd_val(*pg_dir)); - pgd_clear(pg_dir); - return; - } - pg_table = (pte_t *) pgd_page(*pg_dir); - pg_table += 0xA0000 >> PAGE_SHIFT; - for (i = 0 ; i < 32 ; i++) { - if (pte_present(*pg_table)) - *pg_table = pte_wrprotect(*pg_table); - pg_table++; - } + pgd = pgd_offset(tsk, 0xA0000); + if (pgd_none(*pgd)) + return; + if (pgd_bad(*pgd)) { + printk("vm86: bad pgd entry [%p]:%08lx\n", pgd, pgd_val(*pgd)); + pgd_clear(pgd); + return; + } + pmd = pmd_offset(pgd, 0xA0000); + if (pmd_none(*pmd)) + return; + if (pmd_bad(*pmd)) { + printk("vm86: bad pmd entry [%p]:%08lx\n", pmd, pmd_val(*pmd)); + pmd_clear(pmd); + return; + } + pte = pte_offset(pmd, 0xA0000); + for (i = 0; i < 32; i++) { + if (pte_present(*pte)) + *pte = pte_wrprotect(*pte); + pte++; } + invalidate(); } asmlinkage int sys_vm86(struct vm86_struct * v86) diff -u --recursive --new-file v1.2.1/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c --- v1.2.1/linux/arch/i386/mm/init.c Tue Jan 31 09:39:01 1995 +++ linux/arch/i386/mm/init.c Wed Mar 22 14:54:33 1995 @@ -45,7 +45,7 @@ __asm__ __volatile__("cld ; rep ; stosl": :"a" (pte_val(BAD_PAGE)), "D" ((long) empty_bad_page_table), - "c" (PTRS_PER_PAGE) + "c" (PAGE_SIZE/4) :"di","cx"); return (pte_t *) empty_bad_page_table; } @@ -57,7 +57,7 @@ __asm__ __volatile__("cld ; rep ; stosl": :"a" (0), "D" ((long) empty_bad_page), - "c" (PTRS_PER_PAGE) + "c" (PAGE_SIZE/4) :"di","cx"); return pte_mkdirty(mk_pte((unsigned long) empty_bad_page, PAGE_SHARED)); } @@ -69,7 +69,7 @@ __asm__ __volatile__("cld ; rep ; stosl": :"a" (0), "D" ((long) empty_zero_page), - "c" (PTRS_PER_PAGE) + "c" (PAGE_SIZE/4) :"di","cx"); return (unsigned long) empty_zero_page; } @@ -132,17 +132,17 @@ pg_dir = swapper_pg_dir; while (address < end_mem) { /* map the memory at virtual addr 0xC0000000 */ - if (pgd_none(pg_dir[768])) { - pgd_set(pg_dir+768, (pte_t *) start_mem); + pg_table = (pte_t *) (PAGE_MASK & pgd_val(pg_dir[768])); + if (!pg_table) { + pg_table = (pte_t *) start_mem; start_mem += PAGE_SIZE; } - pg_table = (pte_t *) pgd_page(pg_dir[768]); /* also map it temporarily at 0x0000000 for init */ - pgd_set(pg_dir+768, pg_table); - pgd_set(pg_dir, pg_table); + pgd_val(pg_dir[0]) = _PAGE_TABLE | (unsigned long) pg_table; + pgd_val(pg_dir[768]) = _PAGE_TABLE | (unsigned long) pg_table; pg_dir++; - for (tmp = 0 ; tmp < PTRS_PER_PAGE ; tmp++,pg_table++) { + for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { if (address < end_mem) *pg_table = mk_pte(address, PAGE_SHARED); else diff -u --recursive --new-file v1.2.1/linux/drivers/block/Makefile linux/drivers/block/Makefile --- v1.2.1/linux/drivers/block/Makefile Sat Mar 18 12:45:45 1995 +++ linux/drivers/block/Makefile Sun Mar 26 11:56:23 1995 @@ -43,6 +43,8 @@ ifdef CONFIG_AZTCD OBJS := $(OBJS) aztcd.o SRCS := $(SRCS) aztcd.c +else +BLOCK_MODULE_OBJS := $(BLOCK_MODULE_OBJS) aztcd.o endif ifdef CONFIG_SBPCD diff -u --recursive --new-file v1.2.1/linux/drivers/block/README.aztcd linux/drivers/block/README.aztcd --- v1.2.1/linux/drivers/block/README.aztcd Fri Feb 3 15:15:09 1995 +++ linux/drivers/block/README.aztcd Sun Mar 26 11:56:23 1995 @@ -1,7 +1,7 @@ Readme-File README.aztcd for Aztech CD-ROM CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110 CD-ROM Driver - BETA-Version 0.6 and newer + Version 1.0 and newer (for other drives see 6.-8.) NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE @@ -28,15 +28,13 @@ ---------------------------------------------------------------------------- 1. NOTE -This software has now been tested in some different machines with AZTECH -CDA268-01A, ORCHID CDS-3110 and ORCHID/WEARNES CDD110 and has proven to be -pretty stable with kernel versions 1.0.0 to 1.1.75. Nevertheless I'd only -assign BETA status to the software, as the number of known users is still -small. So when in 'day to day' use or when used with different firmware -versions of the CD-ROM drives, there still may be some problems. So I'm -quite sure I'll see some bug reports (see chapter BUG REPORTS) and you are -invited in helping us to increase the number of drives, which are supported, -and in debugging this software (see chapters OTHER DRIVES and DEBUGGING). +This software has been successfully in alpha and beta test for quite a long +time with AZTECH CDA268-01A, ORCHID CDS-3110 and ORCHID/WEARNES CDD110 +and has proven to be stable with kernel versions 1.0.9 to 1.2.0. But with +any software there still may be bugs in it. So if you encounter problems, +you are invited to help us improve this software. Please send me a detailed +bug report (see chapter BUG REPORTS). You are also invited in helping us to +increase the number of drives, which are supported. Please read the README-files carefully and always keep a backup copy of your old kernel, in order to reboot if something goes wrong! @@ -54,7 +52,7 @@ your kernel needs to have the ISO9660-filesystem support included. -3. CONFIGURING YOUR KERNEL +3. CONFIGURING YOUR KERNEL If your kernel is already configured for using the AZTECH driver you will see the following message while Linux boots: Aztech CD-ROM Init: DriverVersion= BaseAddress= @@ -88,6 +86,7 @@ Slackware from CDROM. You can find the disk images at 'sunsite.unc.edu'; see file 'aztech.gz.README' for instructions on how to use it. + 4. RECOMPILING YOUR KERNEL If your kernel is not yet configured for the AZTECH driver and the ISO9660- filesystem, you have to recompile your kernel: @@ -99,16 +98,22 @@ Users of other drives should read chapter OTHER DRIVES of this file. You also can configure that address by LILO boot parameter aztcd=... - Build a new kernel, configure it for 'Aztech/Orchid/Okano/Wearnes support' - and include the ISO9660-filesystem. + (if you want aztcd to be part of the kernel). Do not configure it for + 'Aztech... support', if you want to use aztcd as a run time loadable module. + But in any case you must have the ISO9660-filesystem included in your + kernel. - Activate the new kernel, normally this is done by running lilo (don't for- get to configure it before and to keep a copy of your old kernel in case something goes wrong!). - Reboot -- You now should see during boot some messages like +- If you've included aztcd in your kernel, you now should see during boot + some messages like Aztech CD-ROM Init: DriverVersion= BaseAddress= Aztech CD-ROM Init: FirmwareVersion= Aztech CD-ROM Init: detected Aztech CD-ROM Init: End +- If you have not included aztcd in your kernel, but want to load aztcd as a + run time loadable module see 4.1. - If the message looks correct, as user 'root' you should be able to mount the drive by mount -t iso9660 -r /dev/aztcd0 /mnt @@ -118,6 +123,26 @@ mkdir /mnt - If this still does not help, see chapters OTHER DRIVES and DEBUGGING. +4.1 AZTCD AS A RUN-TIME LOADABLE MODULE +If you do not need aztcd permanently, you can also load and remove the driver +during runtime via insmod and rmmod. To build aztcd as a loadable module you +must *not* configure your kernel for AZTECH support. But you need to have +the ISO9660-filesystem included! So rebuild your kernel, if necessary. + +Now edit the base adress of your AZTECH interface card in +/usr/src/linux/include/linux/aztcd.h to the appropriate value. Then change +to /usr/src/linux and do a + make modules + make modules_install +After that you can run-time load the driver via + insmod /lib/modules/X.X.X/misc/aztcd.o +and remove it via rmmod aztcd. +If you have not configured the correct base address, you can also supply the +base address when loading the driver via + insmod /lib/modules/X.X.X/misc/aztcd.o aztcd= +In all commands 'X.X.X' is the current linux kernel version number. For details +see file README.modules in /usr/src/linux. + 5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS The driver does not support applications such as photo CD, multi session CD @@ -185,9 +210,7 @@ driver before (especially if combined with a sound card) and then do a warm boot (CTRL-ALT-RESET) or start Linux from DOS, e.g. with 'loadlin'. -Please give me positive or negative feedback, if you have tried it. Especially -you should tell me, how the version string reads during initialization. If you -don't succeed, read chapter DEBUGGING. Thanks in advance! +If you do not succeed, read chapter DEBUGGING. Thanks in advance! Sorry for the inconvenience, but it is difficult to develop for hardware, which you don't have available for testing. So if you like, please help us. @@ -412,7 +435,7 @@ Werner Zimmermann Fachhochschule fuer Technik Esslingen (EMail: zimmerma@rz.fht-esslingen.de) -Jan. 8, 1994 +Mar 24, 1995 --------------------------------------------------------------------------- APPENDIX: Source code of cdplay.c diff -u --recursive --new-file v1.2.1/linux/drivers/block/README.sbpcd linux/drivers/block/README.sbpcd --- v1.2.1/linux/drivers/block/README.sbpcd Sat Mar 18 12:45:45 1995 +++ linux/drivers/block/README.sbpcd Sat Mar 18 12:45:05 1995 @@ -18,7 +18,7 @@ The quad-speed TEAC CD-55A drive uses the same interface types, but has a totally different command and flow control scheme. Support is under -construction, but splitted: Greg Nowicki (nowicki@tardis.larc.nasa.gov) +construction, but split: Greg Nowicki (nowicki@tardis.larc.nasa.gov) cares about the separate driver "teaccd". Please, do not mail him merely for asking "user questions" at the moment - the project is still a "baby". diff -u --recursive --new-file v1.2.1/linux/drivers/block/aztcd.c linux/drivers/block/aztcd.c --- v1.2.1/linux/drivers/block/aztcd.c Mon Feb 6 20:42:52 1995 +++ linux/drivers/block/aztcd.c Sun Mar 26 11:56:23 1995 @@ -1,5 +1,5 @@ -#define AZT_VERSION "V0.9" -/* $Id: aztcd.c,v 0.90 1995/02/02 18:14:17 root Exp $ +#define AZT_VERSION "V1.0" +/* $Id: aztcd.c,v 1.0 1995/03/25 08:27:11 root Exp $ linux/drivers/block/aztcd.c - AztechCD268 CDROM driver Copyright (C) 1994,1995 Werner Zimmermann (zimmerma@rz.fht-esslingen.de) @@ -99,12 +99,25 @@ the channels on and off. If it works better with your drive, please mail me. Also implemented ACMD_CLOSE for CDROMSTART. W.Zimmermann, Jan. 24, 1995 + V1.00 Implemented close and lock tray commands. Patches supplied by + Frank Racis + Added support for loadable MODULEs, so aztcd can now also be + loaded by insmod and removed by rmmod during run time + Werner Zimmermann, Mar. 24, 95 NOTE: Points marked with ??? are questionable ! */ #include #include +#ifdef MODULE +# include +# include +# ifndef CONFIG_MODVERSIONS + char kernel_version[]= UTS_RELEASE; +# endif +#endif + #include #include #include @@ -121,7 +134,14 @@ #define MAJOR_NR AZTECH_CDROM_MAJOR -#include "blk.h" +#ifdef MODULE +# include "/usr/src/linux/drivers/block/blk.h" +#else +# include "blk.h" +# define MOD_INC_USE_COUNT +# define MOD_DEC_USE_COUNT +#endif + #include static int aztPresent = 0; @@ -174,7 +194,9 @@ #define READ_TIMEOUT 3000 +#define azt_port aztcd /*needed for the modutils*/ static short azt_port = AZT_BASE_ADDR; + static char azt_cont = 0; static char azt_init_end = 0; @@ -208,6 +230,9 @@ static int aztGetToc(void); static int aztGetValue(unsigned char *result); static void aztStatTimer(void); +static void aztCloseDoor(void); +static void aztLockDoor(void); +static void aztUnlockDoor(void); static unsigned char aztIndatum; static unsigned long aztTimeOutCount; @@ -300,6 +325,36 @@ azt_cont = ints[2]; } +/* + * Subroutines to automatically close the door (tray) and + * lock it closed when the cd is mounted. Leave the tray + * locking as an option + */ +static void aztCloseDoor(void) +{ + aztSendCmd(ACMD_CLOSE); + STEN_LOW; + return; +} + +static void aztLockDoor(void) +{ +#ifdef AZT_ALLOW_TRAY_LOCK + aztSendCmd(ACMD_LOCK); + STEN_LOW; +#endif + return; +} + +static void aztUnlockDoor(void) +{ +#ifdef AZT_ALLOW_TRAY_LOCK + aztSendCmd(ACMD_UNLOCK); + STEN_LOW; +#endif + return; +} + /* * Send a single command, return -1 on error, else 0 */ @@ -653,6 +708,7 @@ STEN_LOW_WAIT; break; case CDROMEJECT: + aztUnlockDoor(); /* Assume user knows what they're doing */ /* all drives can at least stop! */ if (aztAudioStatus == CDROM_AUDIO_PLAY) { if (aztSendCmd(ACMD_STOP)) return -1; @@ -1193,8 +1249,15 @@ if (st == -1) return -EIO; /* drive doesn't respond */ + if (st&AST_DOOR_OPEN) + { + /* close door, then get the status again. */ + aztCloseDoor(); + st = getAztStatus(); + } + if ((st&AST_DOOR_OPEN)||(st&AST_NOT_READY)) /* no disk in drive or door open*/ - { /*???*/ + { /* Door should be closed, probably no disk in drive */ printk("aztcd: no disk in drive or door open\n"); return -EIO; } @@ -1204,6 +1267,8 @@ } ++azt_open_count; + MOD_INC_USE_COUNT; + aztLockDoor(); #ifdef AZT_DEBUG printk("aztcd: exiting aztcd_open\n"); #endif @@ -1220,10 +1285,12 @@ printk("aztcd: executing aztcd_release\n"); printk("inode: %p, inode->i_rdev: %x file: %p\n",inode,inode->i_rdev,file); #endif + MOD_DEC_USE_COUNT; if (!--azt_open_count) { azt_invalidate_buffers(); sync_dev(inode->i_rdev); /*??? isn't it a read only dev?*/ invalidate_buffers(inode -> i_rdev); + aztUnlockDoor(); CLEAR_TIMER; } return; @@ -1249,14 +1316,22 @@ /* * Test for presence of drive and initialize it. Called at boot time. */ +#ifndef MODULE unsigned long aztcd_init(unsigned long mem_start, unsigned long mem_end) +#else +int init_module(void) +#endif { long int count, max_count; unsigned char result[50]; int st; if (azt_port <= 0) { printk("aztcd: no Aztech CD-ROM Initialization"); +#ifndef MODULE return (mem_start); +#else + return -EIO; +#endif } printk("Aztech CD-ROM Init: Aztech, Orchid, Okano, Wearnes CD-ROM Driver\n"); printk("Aztech CD-ROM Init: (C) 1994,1995 Werner Zimmermann\n"); @@ -1265,7 +1340,11 @@ if (check_region(azt_port, 4)) { printk("aztcd: conflict, I/O port (%X) already used\n", azt_port); +#ifndef MODULE return (mem_start); +#else + return -EIO; +#endif } /* check for card */ @@ -1287,12 +1366,20 @@ STEN_LOW; if (inb(DATA_PORT)!=AFL_OP_OK) /*OP_OK?*/ { printk("aztcd: no AZTECH CD-ROM drive found\n"); +#ifndef MODULE return (mem_start); +#else + return -EIO; +#endif } for (count = 0; count < AZT_TIMEOUT; count++); /* delay a bit */ if ((st=getAztStatus())==-1) { printk("aztcd: Drive Status Error Status=%x\n",st); +#ifndef MODULE return (mem_start); +#else + return -EIO; +#endif } #ifdef AZT_DEBUG printk("aztcd: Status = %x\n",st); @@ -1337,14 +1424,22 @@ for (count=1;count<5;count++) printk("%c",result[count]); printk("\n"); printk("Aztech CD-ROM Init: Aborted\n"); - return (mem_start); +#ifndef MODULE + return (mem_start); +#else + return -EIO; +#endif } } if (register_blkdev(MAJOR_NR, "aztcd", &azt_fops) != 0) { printk("aztcd: Unable to get major %d for Aztech CD-ROM\n", MAJOR_NR); +#ifndef MODULE return (mem_start); +#else + return -EIO; +#endif } blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; read_ahead[MAJOR_NR] = 4; @@ -1353,8 +1448,13 @@ azt_invalidate_buffers(); aztPresent = 1; + aztCloseDoor(); printk("Aztech CD-ROM Init: End\n"); +#ifndef MODULE return (mem_start); +#else + return (0); +#endif } @@ -1552,8 +1652,10 @@ i = DiskInfo.last + 3; +/* Is there a good reason to stop motor before TOC read? if (aztSendCmd(ACMD_STOP)) return -1; STEN_LOW_WAIT; +*/ azt_mode = 0x05; if (aztSendCmd(ACMD_SEEK_TO_LEADIN)) return -1; /*???*/ @@ -1595,3 +1697,17 @@ return limit > 0 ? 0 : -1; } +#ifdef MODULE +void cleanup_module(void) +{ if (MOD_IN_USE) + { printk("aztcd module in use - can't remove it.\n"); + return; + } + if ((unregister_blkdev(MAJOR_NR, "aztcd") == -EINVAL)) + { printk("What's that: can't unregister aztcd\n"); + return; + } + release_region(azt_port,4); + printk("aztcd module released.\n"); +} +#endif MODULE diff -u --recursive --new-file v1.2.1/linux/drivers/block/sbpcd.c linux/drivers/block/sbpcd.c --- v1.2.1/linux/drivers/block/sbpcd.c Sat Mar 18 12:45:45 1995 +++ linux/drivers/block/sbpcd.c Wed Mar 22 10:34:00 1995 @@ -228,17 +228,17 @@ #endif SBPCD_ISSUE #include -#include #ifdef MODULE -#include #include #include +#include #ifndef CONFIG_MODVERSIONS char kernel_version[]=UTS_RELEASE; #endif #endif MODULE +#include #include #include #include @@ -1081,7 +1081,7 @@ i=inb(CDi_info); DPRINTF((DBG_STA,"SBPCD: ResponseStatus: response %2X.\n", i)); EvaluateStatus(i); - return (0); + return (i); } /*==========================================================================*/ static void xx_ReadStatus(void) diff -u --recursive --new-file v1.2.1/linux/drivers/char/cyclades.c linux/drivers/char/cyclades.c --- v1.2.1/linux/drivers/char/cyclades.c Sat Mar 18 12:45:46 1995 +++ linux/drivers/char/cyclades.c Fri Mar 24 17:18:01 1995 @@ -1,5 +1,5 @@ static char rcsid[] = -"$Revision: 1.36.1.1 $$Date: 1995/03/13 15:44:43 $"; +"$Revision: 1.36.1.3 $$Date: 1995/03/23 22:15:35 $"; /* * linux/kernel/cyclades.c * @@ -18,6 +18,14 @@ * int cy_open(struct tty_struct *tty, struct file *filp); * * $Log: cyclades.c,v $ + * Revision 1.36.1.3 1995/03/23 22:15:35 bentson + * add missing break in modem control block in ioctl switch statement + * (discovered by Michael Edward Chastain ); + * + * Revision 1.36.1.2 1995/03/22 19:16:22 bentson + * make sure CTS flow control is set as soon as possible (thanks + * to note from David Lambert ); + * * Revision 1.36.1.1 1995/03/13 15:44:43 bentson * initialize defaults for receive threshold and stale data timeout; * cosmetic changes; @@ -26,7 +34,7 @@ * added support of chips 4-7 in 32 port Cyclom-Ye; * fix cy_interrupt pointer dereference problem * (Joe Portman ); - * give better error response if open is attempted on non-existant port + * give better error response if open is attempted on non-existent port * (Zachariah Vaum ); * correct command timeout (Kenneth Lerman ); * conditional compilation for -16Y on systems with fast, noisy bus; @@ -1386,15 +1394,27 @@ } /* CTS flow control flag */ - if (cflag & CRTSCTS) + if (cflag & CRTSCTS){ info->flags |= ASYNC_CTS_FLOW; - else + info->cor2 |= CyCtsAE; + }else{ info->flags &= ~ASYNC_CTS_FLOW; + info->cor2 &= ~CyCtsAE; + } if (cflag & CLOCAL) info->flags &= ~ASYNC_CHECK_CD; else info->flags |= ASYNC_CHECK_CD; + /*********************************************** + The hardware option, CyRtsAO, presents RTS when + the chip has characters to send. Since most modems + use RTS as reverse (inbound) flow control, this + option is not used. If inbound flow control is + necessary, DTR can be programmed to provide the + appropriate signals for use with a non-standard + cable. Contact Marcio Saito for details. + ***********************************************/ card = info->card; channel = (info->line) - (cy_card[card].first_line); @@ -1459,19 +1479,6 @@ #endif } - /* The hardware option, CyRtsAO, presents RTS when - the chip has characters to send. Since most modems - use RTS as reverse (inbound) flow control, this - option is not used. If inbound flow control is - necessary, DTR can be programmed to provide the - appropriate signals. Contact Marcio Saito for - details. */ - if (C_CRTSCTS(info->tty)) { - info->cor2 |= CyCtsAE; - }else{ - info->cor2 &= ~CyCtsAE; - } - if (info->tty){ clear_bit(TTY_IO_ERROR, &info->tty->flags); } @@ -2155,6 +2162,7 @@ case TIOCMBIC: case TIOCMSET: ret_val = set_modem_info(info, cmd, (unsigned int *) arg); + break; /* The following commands are incompletely implemented!!! */ case TIOCGSOFTCAR: diff -u --recursive --new-file v1.2.1/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c --- v1.2.1/linux/drivers/char/vc_screen.c Wed Feb 15 10:50:55 1995 +++ linux/drivers/char/vc_screen.c Wed Mar 22 10:34:00 1995 @@ -80,6 +80,7 @@ if (!vc_cons_allocated(cons)) return -ENXIO; + clear_selection(); size = vcs_size(inode); if (count < 0 || p > size) return -EINVAL; @@ -138,6 +139,7 @@ if (!vc_cons_allocated(cons)) return -ENXIO; + clear_selection(); size = vcs_size(inode); if (count < 0 || p > size) return -EINVAL; diff -u --recursive --new-file v1.2.1/linux/drivers/net/README.arcnet linux/drivers/net/README.arcnet --- v1.2.1/linux/drivers/net/README.arcnet Thu Jan 1 02:00:00 1970 +++ linux/drivers/net/README.arcnet Fri Mar 24 17:20:02 1995 @@ -0,0 +1,204 @@ + +--------------------------------------------------------------------------- +NOTE: See also README.arcnet-jumpers in this directory for jumper-setting +information if you're like most of us and didn't happen to get a manual with +your ARCnet card. +--------------------------------------------------------------------------- + +Since no one seems to listen to me otherwise, perhaps a poem will get your +attention: + This is scary software + If it works I DO CARE. + +Hmm, I think I'm allowed to call that a poem, even though it's only two +lines. Hey, I'm in Computer Science, not English. Give me a break. + +The point is: I REALLY REALLY REALLY REALLY REALLY want to hear from you if +you test this and get it working. Or if you don't. Or anything. + +ARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was +nice, but after that even FEWER people started writing to me because they +didn't even have to install the patch. + +Come on, be a sport! Send me a success report! + +(hey, that was even better than my original poem... this is getting bad!) + +Anyway, enough complaining. Let's get started: + +--------------------------------------------------------------------------- + +These are the ARCnet drivers for Linux. + +This is the first non-ALPHA release, so please be careful, and send all +possible success/failure reports to me. If I don't know when/if/how it +works, I won't be able to answer people's questions. Do we want that? Of +course not. + +Once again: DO send me success reports! I want to know if this is working! +(You know, it might be argued that I'm pushing this point a little too much. +If you think so, why not flame me in a quick little email? Please also +include the type of card(s) you're using, software, size of network, and +whether it's working or not.) + +My e-mail address is: + apenwarr@tourism.807-city.on.ca + + +Where do I discuss these drivers? +--------------------------------- + +As of the 0.22 release, we have a mailing list specifically for discussion +of the ARCnet drivers for Linux, and anything you might want to interface +them with (ie. DOS). I'll also post new versions of the Linux-ARCnet +distribution to the list in tar-gzip-uuencode format. + +To subscribe to the list, send a message to listserv@tourism.807-city.on.ca +with the following line in the BODY (not the SUBJECT) of your message: + subscribe linux-arcnet YOUR REAL NAME +Remember to remove your signature, or you'll get an error back. + +Send all bug (or success) reports to me or to the list. + +You're free to use the comp.os.linux.development newsgroup too, but I can't +guarantee I'll see it there. (Hopefully, if my news server stays sane, I +will.) + +Also, SMC (one of the companies that makes ARCnet cards) has a WorldWideWeb +site you might be interested in, which includes several drivers for various +cards including ARCnet. Try: + http://www.smc.com/ + +Novell makes a networking stack for DOS which includes ARCnet drivers. Try +ftp'ing to ftp.novell.com. + +You can get the Crynwr packet driver collection (including arcether.com, the +one you'll want for arcnet cards) from oak.oakland.edu:/pub/msdos/pktdrvr. +It won't work perfectly on a 386+ without patches, though, and also doesn't +like several cards. Mail me if you want a fixed version. + + +Last warning: This driver may be extremely dangerous, crash your computer, +or kill your dog! (although I'm pretty sure that I've worked that one +out...) + + +Loadable Module Support +----------------------- + +This is a new feature as of 0.42 ALPHA. + +Configure and rebuild Linux. When asked, say NO to "arcnet support" if you +want loadable module support. + + make config + make dep + make clean + make zImage + make modules + + +Booting into your "ARCnet" Kernel +--------------------------------- + +If you're using a loadable module, you need to use insmod to load the +module, and you need to specify various characteristics of your card on the +command line. For example: + cd /usr/src/linux/modules + insmod arcnet.o io=0x300 irqnum=2 shmem=0xd0000 +You can also add a num=1, num=2 etc for additional arcnet cards that will +use arc1, arc2 etc for their device names (instead of the default, arc0). + +Otherwise the driver will load and probe for your card automatically. + +Now go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be +available where you picked up this driver. Think of your ARCnet as a +souped-up (or down, as the case may be) ethernet card. + +By the way, be sure to change all references from "eth0" to "arc0" in the +HOWTOs. Remember that ARCnet isn't a "true" ethernet, and the device name +is DIFFERENT. + + +How do I get it to work with...? +-------------------------------- + +NFS: Should be fine linux->linux, just pretend you're using ethernet cards. + oak.oakland.edu:/pub/msdos/nfs has some nice DOS clients. I can't + get SOSS (dos-based server) to work, although someone has and can't + figure out why it won't work for me. + +DOS: If you're using the freeware arcether.com, you might want to install + the source code patch. It helps with PC/TCP, and also can get + arcether to load if it timed out too quickly. Mail me if you need a + precompiled version of arcether.com. (ie. you if don't have a DOS + assembler) + +Windows: See DOS :) + +OS2: May work okay. Please e-mail me if you find a freeware TCP/IP stack + for OS/2. + +LAN Manager and Windows for Workgroups: These programs use protocols that + are incompatible with ARCnet for Linux. Rather than using the + internet-standard ARCnet protocol, they try to pretend the cards are + ethernet, and confuse everyone else on the network. + + An upcoming release of ARCnet for Linux may have workarounds for + this stupid behaviour. + + +It works: what now? +------------------- + +Send mail describing your setup, preferably including driver version, kernel +version, ARCnet card model, CPU type, number of systems on your network, and +list of software in use to me at the following address: + apenwarr@tourism.807-city.on.ca + +I do send (sometimes automated) replies to all messages I receive. My mail +host is quite weird, so if you don't get a reply within a reasonable time, +please resend. + + +It doesn't work: what now? +-------------------------- + +Do the same as above, but also include the output of the ifconfig and route +commands, as well as any pertinent log entries (ie: anything that starts +with "arcnet:" and has shown up since the last reboot) in your mail. + +If you want to try fixing it yourself (I highly recommend that you mail me +about the problem first, since it might already have been solved) you may +want to try some of the debug levels available. For heavy testing on +DEBUG_DURING or more, it would be a REALLY good idea to kill your klogd +daemon first! DEBUG_DURING displays 4-5 lines for each packet sent or +received. DEBUG_TX and RX actually DISPLAY each packet as it is sent or +received, which is obviously quite big. + +You can run the arcdump shell script (available from me) as root to list the +contents of the arcnet buffers at any time. To make any sense at all out of +this, you should grab the pertinent RFC's. (some are listed near the top of +arcnet.c). arcdump assumes your card is at 0xD0000. If it isn't, edit the +script. + +Buffers #0 and 1 are used for receiving, and Buffers #2 and 3 are for +sending. Ping-pong buffers are implemented both ways, just to confuse you. + +If your debug level is DEBUG_DURING or more, the buffers are cleared to a +constant value of 0x42 every time the card is reset (which should only +happen when you do an ifconfig up, or when Linux decides that the driver is +broken). This is to make it easier to figure out which bytes are being used +by a packet. + +You can change the debug level without recompiling the kernel by typing: + ifconfig arc0 down metric 1x + /etc/rc.d/rc.inet1 +where "x" is the debug level you want. For example, "metric 14" would put +you at debug level 4. Debug level 3 is the default (D_EXTRA). + + +I want to send money: what now? +------------------------------- + +Go take a nap or something. You'll feel better in the morning. diff -u --recursive --new-file v1.2.1/linux/drivers/net/README.arcnet-jumpers linux/drivers/net/README.arcnet-jumpers --- v1.2.1/linux/drivers/net/README.arcnet-jumpers Thu Jan 1 02:00:00 1970 +++ linux/drivers/net/README.arcnet-jumpers Fri Mar 24 17:20:02 1995 @@ -0,0 +1,1561 @@ + +----------------------------------------------------------------------------- +This file is a supplement to README.arcnet. Please read that for general +driver configuration help. +----------------------------------------------------------------------------- + +Because so many people (myself included) seem to have obtained ARCnet cards +without manuals, this will be a quick listing of all jumper settings I can +find. Please e-mail apenwarr@tourism.807-city.on.ca with any settings for +your particular card. + +Even if your ARCnet model isn't listed, but has the same jumpers, please +e-mail me to say so. + +If your model isn't listed, and has different settings, PLEASE PLEASE tell +me. I had to figure mine out without the manual, and it WASN'T FUN! + +Cards Listed in this file: + + Manufacturer Model # Bits + ------------ ------- ---- + SMC PC100 8 + SMC PC110 8 + SMC PC120 8 + SMC PC130 8 + SMC PC270E 8 + SMC PC500 16 + SMC PC500Longboard 16 + SMC PC550Longboard 16 + SMC PC600 16 + Puredata PDI507 16 + CNet Tech CN120-Series 8 + CNet Tech CN160-Series 16 + No Name -- 8/16 + +** SMC = Standard Microsystems Corp. +** CNet Tech = CNet Technology, Inc. + +The model # is listed right above specifics for that card. Don't forget to +read "quick briefing" first, since it applies to all ARCnets. + + +Unclassified Stuff +------------------ + - Please send any other information you can find. + + - And some unknowns (other info is welcome!): + From: root@ultraworld.xs4all.nl (Timo Hilbrink) + To: apenwarr@tourism.807-city.on.ca (Avery Pennarun) + Date: Wed, 26 Oct 1994 02:10:32 +0000 (GMT) + Reply-To: timoh@xs4all.nl + + [...parts deleted...] + + About the jumpers: On my PC130 there is one more jumper, located near the + cable-connector and it's for changing to star or bus topology; + closed: star - open: bus + On the PC500 are some more jumper-pins, one block labled with RX,PDN,TXI + and another with ALE,LA17,LA18,LA19 these are undocumented.. + + [...more parts deleted...] + + --- CUT --- + + +Quick Briefing: +--------------- + +All ARCnet cards should have a total of four different settings: + - the I/O address: this is the "port" your ARCnet card is on. Probed + values, as of v0.14, are only from 0x200 through 0x3F0. (If your card + has additional ones, which is possible, please tell me.) This should not + be the same as any other device on your system. Supposedly MS Windows + prefers values of 0x300 or more, eating netconnections on my system + otherwise. + - Avery's favourite: 0x300. + + - the IRQ: on 8-bit cards, it might be 2 (9), 3, 4, 5, or 7. + on 16-bit cards, it might be 2 (9), 3, 4, 5, 7, or 9-15. Make + sure this is different from any other card on your system. Note that + IRQ2 is the same as IRQ9, as far as Linux is concerned. + - Avery's favourite: IRQ2. + + - the memory address: Unlike most cards, ARCnets use "shared memory" for + copying buffers around. Make SURE it doesn't conflict with any other + used memory in your system! + A0000 - VGA graphics memory (ok if you don't have VGA) + B0000 - Monochrome text mode + C0000 \ One of these is your VGA BIOS - usually C0000. + E0000 / + F0000 - System BIOS + + Anything less than 0xA0000 is, well, a BAD idea since it isn't above + 640k. + - Avery's favourite: 0xD0000 + + - the station address: Every ARCnet card has its own "unique" network + address from 0 to 255. Unlike ethernet, you can set this address + yourself. Since it's only 8 bits, you can only have 254 ARCnet cards on + a network. DON'T use 0 or 255, since these are reserved. (although neat + stuff will probably happen if you DO use them). By the way, if you + haven't already guessed, don't set this the same as any other ARCnet on + your network! + - Avery's favourite: 3 and 4. Not that it matters. + + +** Standard Microsystems Corp (SMC) ** +PC100, PC110, PC120, PC130 (8-bit cards) +PC500, PC600 (16-bit cards) +--------------------------------- + - mainly from Avery Pennarun + - values depicted are from Avery's setup. + - special thanks to Timo Hilbrink for noting that PC120, + 130, 500, and 600 all have the same switches as Avery's PC100. + PC500/600 have several extra, undocumented pins though. (?) + - PC110 settings were verified by Stephen A. Wood + + + JP5 [|] : : : : +(IRQ Setting) IRQ2 IRQ3 IRQ4 IRQ5 IRQ7 + Put exactly one jumper on exactly one set of pins. + + 1 2 3 4 5 6 7 8 9 10 + S1 /----------------------------------\ +(I/O and Memory | 1 1 * 0 0 0 0 * 1 1 0 1 | + addresses) \----------------------------------/ + |--| |--------| |--------| + (a) (b) (m) + + a: The first digit of the I/O address. + Setting Value + ------- ----- + 00 0 + 01 1 + 10 2 + 11 3 + + b: The second digit of the I/O address. + Setting Value + ------- ----- + 0000 0 + 0001 1 + 0010 2 + ... ... + 1110 E + 1111 F + + The I/O address is in the form ab0. For example, if + a is 0x2 and b is 0xE, the address will be 0x2E0. + + DO NOT SET THIS LESS THAN 0x200!!!!! + + + m: The first digit of the memory address. + Setting Value + ------- ----- + 0000 0 + 0001 1 + 0010 2 + ... ... + 1110 E + 1111 F + + The memory address is in the form m0000. For example, if + m is D, the address will be 0xD0000. + + DO NOT SET THIS TO C0000, F0000, OR LESS THAN A0000! + + 1 2 3 4 5 6 7 8 + S2 /--------------------------\ +(Station Address) | 1 1 0 0 0 0 0 0 | + \--------------------------/ + + Setting Value + ------- ----- + 00000000 00 + 10000000 01 + 01000000 02 + ... + 01111111 FE + 11111111 FF + + Note that this is binary with the digits reversed! + + DO NOT SET THIS TO 0 OR 255 (0xFF)! + +***************************************************************************** + +** Standard Microsystems Corp (SMC) ** +PC130E/PC270E (8-bit cards) +--------------------------- + - from Juergen Seifert + + +STANDARD MICROSYSTEMS CORPORATION (SMC) ARCNET(R)-PC130E/PC270E +=============================================================== + +This description has been written by Juergen Seifert +using information from the following Original SMC Manual + + "Configuration Guide for + ARCNET(R)-PC130E/PC270 + Network Controller Boards + Pub. # 900.044A + June, 1989" + +ARCNET is a registered trademark of the Datapoint Corporation +SMC is a registered trademark of the Standard Microsystems Corporation + +The PC130E is an enhanced version of the PC130 board, is equipped with a +standard BNC female connector for connection to RG-62/U coax cable. +Since this board is designed both for point-to-point connection in star +networks and for connection to bus networks, it is downwardly compatible +with all the other standard boards designed for coax networks (that is, +the PC120, PC110 and PC100 star topology boards and the PC220, PC210 and +PC200 bus topology boards). + +The PC270E is an enhanced version of the PC260 board, is equipped with two +modular RJ11-type jacks for connection to twisted pair wiring. +It can be used in a star or a daisy-chained network. + + + 8 7 6 5 4 3 2 1 + ________________________________________________________________ + | | S1 | | + | |_________________| | + | Offs|Base |I/O Addr | + | RAM Addr | ___| + | ___ ___ CR3 |___| + | | \/ | CR4 |___| + | | PROM | ___| + | | | N | | 8 + | | SOCKET | o | | 7 + | |________| d | | 6 + | ___________________ e | | 5 + | | | A | S | 4 + | |oo| EXT2 | | d | 2 | 3 + | |oo| EXT1 | SMC | d | | 2 + | |oo| ROM | 90C63 | r |___| 1 + | |oo| IRQ7 | | |o| _____| + | |oo| IRQ5 | | |o| | J1 | + | |oo| IRQ4 | | STAR |_____| + | |oo| IRQ3 | | | J2 | + | |oo| IRQ2 |___________________| |_____| + |___ ______________| + | | + |_____________________________________________| + +Legend: + +SMC 90C63 ARCNET Controller / Transceiver /Logic +S1 1-3: I/O Base Address Select + 4-6: Memory Base Address Select + 7-8: RAM Offset Select +S2 1-8: Node ID Select +EXT Extended Timeout Select +ROM ROM Enable Select +STAR Selected - Star Topology (PC130E only) + Deselected - Bus Topology (PC130E only) +CR3/CR4 Diagnostic LEDs +J1 BNC RG62/U Connector (PC130E only) +J1 6-position Telephone Jack (PC270E only) +J2 6-position Telephone Jack (PC270E only) + +Setting one of the switches to Off/Open means "1", On/Closed means "0". + + +Setting the Node ID +------------------- + +The eight switches in group S2 are used to set the node ID. +Each node attached to the network must have an unique node ID which +must be diffrent from 0. +Switch 1 serves as the least significant bit (LSB). + +The node ID is the sum of the values of all switches set to "1" +These values are: + Switch | Value + -------|------- + 1 | 1 + 2 | 2 + 3 | 4 + 4 | 8 + 5 | 16 + 6 | 32 + 7 | 64 + 8 | 128 + +Some Examples: + + Switch | Hex | Decimal + 8 7 6 5 4 3 2 1 | Node ID | Node ID + ----------------|---------|--------- + 0 0 0 0 0 0 0 0 | not allowed + 0 0 0 0 0 0 0 1 | 1 | 1 + 0 0 0 0 0 0 1 0 | 2 | 2 + 0 0 0 0 0 0 1 1 | 3 | 3 + . . . | | + 0 1 0 1 0 1 0 1 | 55 | 85 + . . . | | + 1 0 1 0 1 0 1 0 | AA | 170 + . . . | | + 1 1 1 1 1 1 0 1 | FD | 253 + 1 1 1 1 1 1 1 0 | FE | 254 + 1 1 1 1 1 1 1 1 | FF | 255 + + +Setting the I/O Base Address +---------------------------- + +The first three switches in switch group S1 are used to select one +of eight possible I/O Base addresses using the followig table + + + Switch | Hex I/O + 1 2 3 | Address + -------|-------- + 0 0 0 | 260 + 0 0 1 | 290 + 0 1 0 | 2E0 (Manufactor's default) + 0 1 1 | 2F0 + 1 0 0 | 300 + 1 0 1 | 350 + 1 1 0 | 380 + 1 1 1 | 3E0 + + +Setting the Base Memory (RAM) buffer Address +-------------------------------------------- + +The memory buffer requires 2K of a 16K block of RAM. The base of this +16K block can be located in any of eight positions. +Switches 4-6 of switch group S1 select the Base of the 16K block. +Within that 16K address space, the buffer may be assigned any one of four +positions, determined by the offset, switches 7 and 8 of group S1. + + Switch | Hex RAM | Hex ROM + 4 5 6 7 8 | Address | Address *) + -----------|---------|----------- + 0 0 0 0 0 | C0000 | C2000 + 0 0 0 0 1 | C0800 | C2000 + 0 0 0 1 0 | C1000 | C2000 + 0 0 0 1 1 | C1800 | C2000 + | | + 0 0 1 0 0 | C4000 | C6000 + 0 0 1 0 1 | C4800 | C6000 + 0 0 1 1 0 | C5000 | C6000 + 0 0 1 1 1 | C5800 | C6000 + | | + 0 1 0 0 0 | CC000 | CE000 + 0 1 0 0 1 | CC800 | CE000 + 0 1 0 1 0 | CD000 | CE000 + 0 1 0 1 1 | CD800 | CE000 + | | + 0 1 1 0 0 | D0000 | D2000 (Manufactor's default) + 0 1 1 0 1 | D0800 | D2000 + 0 1 1 1 0 | D1000 | D2000 + 0 1 1 1 1 | D1800 | D2000 + | | + 1 0 0 0 0 | D4000 | D6000 + 1 0 0 0 1 | D4800 | D6000 + 1 0 0 1 0 | D5000 | D6000 + 1 0 0 1 1 | D5800 | D6000 + | | + 1 0 1 0 0 | D8000 | DA000 + 1 0 1 0 1 | D8800 | DA000 + 1 0 1 1 0 | D9000 | DA000 + 1 0 1 1 1 | D9800 | DA000 + | | + 1 1 0 0 0 | DC000 | DE000 + 1 1 0 0 1 | DC800 | DE000 + 1 1 0 1 0 | DD000 | DE000 + 1 1 0 1 1 | DD800 | DE000 + | | + 1 1 1 0 0 | E0000 | E2000 + 1 1 1 0 1 | E0800 | E2000 + 1 1 1 1 0 | E1000 | E2000 + 1 1 1 1 1 | E1800 | E2000 + +*) To enable the 8K Boot PROM install the jumper ROM. + The default is jumper ROM not installed. + + +Setting the Timeouts and Interrupt +---------------------------------- + +The jumpers labeled EXT1 and EXT2 are used to determine the timeout +parameters. These two jumpers are normally left open. +Refer to the COM9026 Data Sheet for alternate configurations. + +To select a hardware interrupt level set one (only one!) of the jumpers +IRQ2, IRQ3, IRQ4, IRQ5, IRQ7. The Manufactor's default is IRQ2. + + +Configuring the PC130E for Star or Bus Topology +----------------------------------------------- + +The single jumper labeled STAR is used to configure the PC130E board for +star or bus topology. +When the jumper is installed, the board may be used in a star network, when +it is removed, the board can be used in a bus topology. + + +Diagnostic LEDs +--------------- + +Two diagnostic LEDs are visible on the rear bracket of the board. +The green LED monitors the network activity: the red one shows the +board activity: + + Green | Status Red | Status + -------|------------------- ---------|------------------- + on | normal activity flash/on | data transfer + blink | reconfiguration off | no data transfer; + off | defectiv board or | incorect memory or + | node ID is zero | I/O address + + +***************************************************************************** + +** Standard Microsystems Corp (SMC) ** +PC500/PC550 Long Board (16-bit cards) +------------------------------------- + - from Juergen Seifert + + +STANDARD MICROSYSTEMS CORPORATION (SMC) ARCNET-PC500/PC550 Long Board +===================================================================== + +Note: There is another Version of the PC500 called Short Version, which + is different in hard- and software! The most important differences + are: + - The long board has no Shared memory + - On the long board the selection of the interrupt is done by binary + coded switch, on the short board directly by jumper. + + +This description has been written by Juergen Seifert +using information from the following Original SMC Manual + + "Configuration Guide for + SMC ARCNET-PC500/PC550 + Series Network Controller Boards + Pub. # 900.033 Rev. A + November, 1989" + +ARCNET is a registered trademark of the Datapoint Corporation +SMC is a registered trademark of the Standard Microsystems Corporation + +The PC500 is equipped with a standard BNC female connector for connection +to RG-62/U coax cable. +The board is designed both for point-to-point connection in star networks +and for connection to bus networks. + +The PC550 is equipped with two modular RJ11-type jacks for connection +to twisted pair wiring. +It can be used in a star or a daisy-chained network. + + 1 + 0 9 8 7 6 5 4 3 2 1 6 5 4 3 2 1 + ____________________________________________________________________ + < | SW1 | | SW2 | | + > |_____________________| |_____________| | + < IRQ |I/O Addr | + > ___| + < CR4 |___| + > CR3 |___| + < ___| + > N | | 8 + < o | | 7 + > d | S | 6 + < e | W | 5 + > A | 3 | 4 + < d | | 3 + > d | | 2 + < r |___| 1 + > |o| _____| + < |o| | J1 | + > 3 1 JP6 |_____| + < |o|o| JP2 | J2 | + > |o|o| |_____| + < 4 2__ ______________| + > | | | + <____| |_____________________________________________| + +Legend: + +SW1 1-6: I/O Base Address Select + 7-10: Interrupt Select +SW2 1-6: Reserved for Future Use +SW3 1-8: Node ID Select +JP2 1-4: Extended Timeout Select +JP6 Selected - Star Topology (PC500 only) + Deselected - Bus Topology (PC500 only) +CR3 Green Monitors Network Activity +CR4 Red Monitors Board Activity +J1 BNC RG62/U Connector (PC500 only) +J1 6-position Telephone Jack (PC550 only) +J2 6-position Telephone Jack (PC550 only) + +Setting one of the switches to Off/Open means "1", On/Closed means "0". + + +Setting the Node ID +------------------- + +The eight switches in group SW3 are used to set the node ID. Each node +attached to the network must have an unique node ID which must be +diffrent from 0. +Switch 1 serves as the least significant bit (LSB). + +The node ID is the sum of the values of all switches set to "1" +These values are: + + Switch | Value + -------|------- + 1 | 1 + 2 | 2 + 3 | 4 + 4 | 8 + 5 | 16 + 6 | 32 + 7 | 64 + 8 | 128 + +Some Examples: + + Switch | Hex | Decimal + 8 7 6 5 4 3 2 1 | Node ID | Node ID + ----------------|---------|--------- + 0 0 0 0 0 0 0 0 | not allowed + 0 0 0 0 0 0 0 1 | 1 | 1 + 0 0 0 0 0 0 1 0 | 2 | 2 + 0 0 0 0 0 0 1 1 | 3 | 3 + . . . | | + 0 1 0 1 0 1 0 1 | 55 | 85 + . . . | | + 1 0 1 0 1 0 1 0 | AA | 170 + . . . | | + 1 1 1 1 1 1 0 1 | FD | 253 + 1 1 1 1 1 1 1 0 | FE | 254 + 1 1 1 1 1 1 1 1 | FF | 255 + + +Setting the I/O Base Address +---------------------------- + +The first six switches in switch group SW1 are used to select one +of 32 possible I/O Base addresses using the followig table + + Switch | Hex I/O + 6 5 4 3 2 1 | Address + -------------|-------- + 0 1 0 0 0 0 | 200 + 0 1 0 0 0 1 | 210 + 0 1 0 0 1 0 | 220 + 0 1 0 0 1 1 | 230 + 0 1 0 1 0 0 | 240 + 0 1 0 1 0 1 | 250 + 0 1 0 1 1 0 | 260 + 0 1 0 1 1 1 | 270 + 0 1 1 0 0 0 | 280 + 0 1 1 0 0 1 | 290 + 0 1 1 0 1 0 | 2A0 + 0 1 1 0 1 1 | 2B0 + 0 1 1 1 0 0 | 2C0 + 0 1 1 1 0 1 | 2D0 + 0 1 1 1 1 0 | 2E0 (Manufactor's default) + 0 1 1 1 1 1 | 2F0 + 1 1 0 0 0 0 | 300 + 1 1 0 0 0 1 | 310 + 1 1 0 0 1 0 | 320 + 1 1 0 0 1 1 | 330 + 1 1 0 1 0 0 | 340 + 1 1 0 1 0 1 | 350 + 1 1 0 1 1 0 | 360 + 1 1 0 1 1 1 | 370 + 1 1 1 0 0 0 | 380 + 1 1 1 0 0 1 | 390 + 1 1 1 0 1 0 | 3A0 + 1 1 1 0 1 1 | 3B0 + 1 1 1 1 0 0 | 3C0 + 1 1 1 1 0 1 | 3D0 + 1 1 1 1 1 0 | 3E0 + 1 1 1 1 1 1 | 3F0 + + +Setting the Interrupt +--------------------- + +Switches seven through ten of switch group SW1 are used to select the +interrupt level. The interrupt level is binary coded, so selections +from 0 to 15 would be possible, but only the following eight values will +be supported: 3, 4, 5, 7, 9, 10, 11, 12. + + Switch | IRQ + 10 9 8 7 | + ---------|-------- + 0 0 1 1 | 3 + 0 1 0 0 | 4 + 0 1 0 1 | 5 + 0 1 1 1 | 7 + 1 0 0 1 | 9 (=2) (default) + 1 0 1 0 | 10 + 1 0 1 1 | 11 + 1 1 0 0 | 12 + + +Setting the Timeouts +-------------------- + +The two jumpers JP2 (1-4) are used to determine the timeout parameters. +These two jumpers are normally left open. +Refer to the COM9026 Data Sheet for alternate configurations. + + +Configuring the PC500 for Star or Bus Topology +---------------------------------------------- + +The single jumper labeled JP6 is used to configure the PC500 board for +star or bus topology. +When the jumper is installed, the board may be used in a star network, when +it is removed, the board can be used in a bus topology. + + +Diagnostic LEDs +--------------- + +Two diagnostic LEDs are visible on the rear bracket of the board. +The green LED monitors the network activity: the red one shows the +board activity: + + Green | Status Red | Status + -------|------------------- ---------|------------------- + on | normal activity flash/on | data transfer + blink | reconfiguration off | no data transfer; + off | defectiv board or | incorect memory or + | node ID is zero | I/O address + + +***************************************************************************** + +** PureData Corp ** +PDI507 (16-bit card) +-------------------- + - from Mark Rejhon (slight modifications by + Avery) + - Send questions/suggestions/etc about this text to Mark. + +Jumpers: + + There is a jumper array at the bottom of the card, near the edge + connector. This array is labelled J1. They control the IRQs and + something else. Put only one jumper on the IRQ pins. + + IRQ2 - Use IRQ 2 (same as IRQ 9 as far as software is concerned) + IRQ3 - Use IRQ 3 (used by COM2 or COM4 serial port if either exists) + IRQ4 - Use IRQ 4 (used by COM1 or COM3 serial port if either exists) + IRQ5 - Use IRQ 5 (used by LPT2 parallel port if one exists) + IRQ6 - Use IRQ 6 (used by Floppy Disk Controller if one exists) + IRQ7 - Use IRQ 7 (used by LPT1 parallel port if one exists) + +[Avery's note: This "unknown" set of two jumpers appears to be on all +ARCnet cards by SMC as well. Putting jumpers on them seems to affect the +status register, but only for the two "reserved" bits, ETS1 and ETS2. Any +further information is welcome.] + + ET1 - What is this? (Not tested, no jumper put on it) + ET2 - What is this? (Not tested, no jumper put on it) + + There is a J2 jumper on two pins. A jumper should be put on them, + since it was already there when I got the card. I don't know what + this jumper is for though. + + There is a two-jumper array for J3. I don't know what it is for, + but there were already two jumpers on it when I got the card. It's + a six pin grid in a two-by-three fashion. The jumpers were + configured as follows: + + .-------. + o | o o | + :-------: ------> Accessible end of card with connectors + o | o o | in this direction -------> + `-------' + + There is also a J4 jumper on two pins. A jumper should be put on + them, since it was already there when I got the card. I don't know + what this jumper is for though. + + +DIP Switches: + + The dipswitches accessible on the accessible end of the card while + it is installed, is used to set the arcnet address. There are 8 + switches. Use an address from 1 to 254. + + Switch No. + 12345678 Arcnet address + ----------------------------------------- + 00000000 FF (Don't use this!) + 00000001 FE + 00000010 FD + .... + 11111101 2 + 11111110 1 + 11111111 0 (Don't use this!) + + There is another dipswitch array of 8 switches at the top of the + card. There are five labelled MS0-MS4 which seem to control the + memory address, and another three labelled IO0-IO2 which seem to + control the base I/O address of the card. + + This was difficult to test by trial and error, and the I/O addresses + are in a weird order. This was tested by setting the DIP switches, + rebooting the computer, and attempting to load ARCETHER at various + addresses (mostly between 0x200 and 0x400). The address that caused + the red transmit LED to blink, is the one that I thought works. + + Also, the address 0x3D0 seem to have a special meaning, since the + ARCETHER packet driver loaded fine, but without the red LED + blinking. I don't know what 0x3D0 is for though. I recommend using + an address of 0x300 since Windows may not like addresses below + 0x300. + + IO Switch No. + 210 I/O address + ------------------------------- + 111 0x260 + 110 0x290 + 101 0x2E0 + 100 0x2F0 + 011 0x300 + 010 0x350 + 001 0x380 + 000 0x3E0 + + The memory switches set a reserved address space of 0x1000 bytes + (0x100 segment units, or 4k). For example if I set an address of + 0xD000, it will use up addresses 0xD000 to 0xD100. + + The memory switches were tested by booting using QEMM386 stealth, + and using LOADHI to see what address automatically became excluded + from the upper memory regions, and then attempting to load ARCETHER + using these addresses. + + I recommend using an arcnet memory address of 0xD000, and putting + the EMS page frame at 0xC000 while using QEMM stealth mode. That + way, you get contiguous high memory from 0xD100 almost all the way + the end of the megabyte. + + Memory Switch 0 (MS0) didn't seem to work properly when set to OFF + on my card. It could be malfunctioning on my card. Experiment with + it ON first, and if it doesn't work, set it to OFF. (It may be a + modifier for the 0x200 bit?) + + MS Switch No. + 43210 Memory address + -------------------------------- + 00001 0xE100 (guessed - was not detected by QEMM) + 00011 0xE000 (guessed - was not detected by QEMM) + 00101 0xDD00 + 00111 0xDC00 + 01001 0xD900 + 01011 0xD800 + 01101 0xD500 + 01111 0xD400 + 10001 0xD100 + 10011 0xD000 + 10101 0xCD00 + 10111 0xCC00 + 11001 0xC900 (guessed - crashes tested system) + 11011 0xC800 (guessed - crashes tested system) + 11101 0xC500 (guessed - crashes tested system) + 11111 0xC400 (guessed - crashes tested system) + + +***************************************************************************** + +** CNet Technology Inc. ** +120 Series (8-bit cards) +------------------------ + - from Juergen Seifert + +CNET TECHNOLOGY INC. (CNet) ARCNET 120A SERIES +============================================== + +This description has been written by Juergen Seifert +using information from the following Original CNet Manual + + "ARCNET + USER'S MANUAL + for + CN120A + CN120AB + CN120TP + CN120ST + CN120SBT + P/N:12-01-0007 + Revision 3.00" + +ARCNET is a registered trademark of the Datapoint Corporation + +P/N 120A ARCNET 8 bit XT/AT Star +P/N 120AB ARCNET 8 bit XT/AT Bus +P/N 120TP ARCNET 8 bit XT/AT Twisted Pair +P/N 120ST ARCNET 8 bit XT/AT Star, Twisted Pair +P/N 120SBT ARCNET 8 bit XT/AT Star, Bus, Twisted Pair + + __________________________________________________________________ + | | + | ___| + | LED |___| + | ___| + | N | | ID7 + | o | | ID6 + | d | S | ID5 + | e | W | ID4 + | ___________________ A | 2 | ID3 + | | | d | | ID2 + | | | 1 2 3 4 5 6 7 8 d | | ID1 + | | | _________________ r |___| ID0 + | | 90C65 || SW1 | ____| + | JP 8 7 | ||_________________| | | + | |o|o| JP1 | | | J2 | + | |o|o| |oo| | | JP 1 1 1 | | + | ______________ | | 0 1 2 |____| + | | PROM | |___________________| |o|o|o| _____| + | > SOCKET | JP 6 5 4 3 2 |o|o|o| | J1 | + | |______________| |o|o|o|o|o| |o|o|o| |_____| + |_____ |o|o|o|o|o| ______________| + | | + |_____________________________________________| + +Legend: + +90C65 ARCNET Probe +S1 1-5: Base Memory Address Select + 6-8: Base I/O Address Select +S2 1-8: Node ID Select (ID0-ID7) +JP1 ROM Enable Select +JP2 IRQ2 +JP3 IRQ3 +JP4 IRQ4 +JP5 IRQ5 +JP6 IRQ7 +JP7/JP8 ET1, ET2 Timeout Parameters +JP10/JP11 Coax / Twisted Pair Select (CN120ST/SBT only) +JP12 Terminator Select (CN120AB/ST/SBT only) +J1 BNC RG62/U Connector (all except CN120TP) +J2 Two 6-position Telephone Jack (CN120TP/ST/SBT only) + +Setting one of the switches to Off means "1", On means "0". + + +Setting the Node ID +------------------- + +The eight switches in SW2 are used to set the node ID. Each node attached +to the network must have an unique node ID which must be diffrent from 0. +Switch 1 (ID0) serves as the least significant bit (LSB). + +The node ID is the sum of the values of all switches set to "1" +These values are: + + Switch | Label | Value + -------|-------|------- + 1 | ID0 | 1 + 2 | ID1 | 2 + 3 | ID2 | 4 + 4 | ID3 | 8 + 5 | ID4 | 16 + 6 | ID5 | 32 + 7 | ID6 | 64 + 8 | ID7 | 128 + +Some Examples: + + Switch | Hex | Decimal + 8 7 6 5 4 3 2 1 | Node ID | Node ID + ----------------|---------|--------- + 0 0 0 0 0 0 0 0 | not allowed + 0 0 0 0 0 0 0 1 | 1 | 1 + 0 0 0 0 0 0 1 0 | 2 | 2 + 0 0 0 0 0 0 1 1 | 3 | 3 + . . . | | + 0 1 0 1 0 1 0 1 | 55 | 85 + . . . | | + 1 0 1 0 1 0 1 0 | AA | 170 + . . . | | + 1 1 1 1 1 1 0 1 | FD | 253 + 1 1 1 1 1 1 1 0 | FE | 254 + 1 1 1 1 1 1 1 1 | FF | 255 + + +Setting the I/O Base Address +---------------------------- + +The last three switches in switch block SW1 are used to select one +of eight possible I/O Base addresses using the followig table + + + Switch | Hex I/O + 6 7 8 | Address + ------------|-------- + ON ON ON | 260 + OFF ON ON | 290 + ON OFF ON | 2E0 (Manufactor's default) + OFF OFF ON | 2F0 + ON ON OFF | 300 + OFF ON OFF | 350 + ON OFF OFF | 380 + OFF OFF OFF | 3E0 + + +Setting the Base Memory (RAM) buffer Address +-------------------------------------------- + +The memory buffer (RAM) requires 2K. The base of this buffer can be +located in any of eight positions. The address of the Boot Prom is +memory base + 8K or memory base + 0x2000. +Switches 1-5 of switch block SW1 select the Memory Base address. + + Switch | Hex RAM | Hex ROM + 1 2 3 4 5 | Address | Address *) + --------------------|---------|----------- + ON ON ON ON ON | C0000 | C2000 + ON ON OFF ON ON | C4000 | C6000 + ON ON ON OFF ON | CC000 | CE000 + ON ON OFF OFF ON | D0000 | D2000 (Manufactor's default) + ON ON ON ON OFF | D4000 | D6000 + ON ON OFF ON OFF | D8000 | DA000 + ON ON ON OFF OFF | DC000 | DE000 + ON ON OFF OFF OFF | E0000 | E2000 + +*) To enable the Boot ROM install the jumper JP1 + +Note: Since the switches 1 and 2 are always set to ON it may be possible + that they can be used to add an offset of 2K, 4K or 6K to the base + address, but this feature is not documented in the manual and I + haven't testet it yet. + + +Setting the Interrupt Line +-------------------------- + +To select a hardware interrupt level install one (only one!) of the jumpers +JP2, JP3, JP4, JP5, JP6. JP2 is the default. + + Jumper | IRQ + -------|----- + 2 | 2 + 3 | 3 + 4 | 4 + 5 | 5 + 6 | 7 + + +Setting the Internal Terminator on CN120AB/TP/SBT +-------------------------------------------------- + +The jumper JP12 is used to enable the internal terminator. + + ----- + 0 | 0 | + ----- ON | | ON + | 0 | | 0 | + | | OFF ----- OFF + | 0 | 0 + ----- + Terminator Terminator + disabled enabled + + +Selecting the Connector Type on CN120ST/SBT +------------------------------------------- + + JP10 JP11 JP10 JP11 + ----- ----- + 0 0 | 0 | | 0 | + ----- ----- | | | | + | 0 | | 0 | | 0 | | 0 | + | | | | ----- ----- + | 0 | | 0 | 0 0 + ----- ----- + Coaxial Cable Twisted Pair Cable + (Default) + + +Setting the Timeout Parameters +------------------------------ + +The jumpers labeled EXT1 and EXT2 are used to determine the timeout +parameters. These two jumpers are normally left open. + + + +***************************************************************************** + +** CNet Technology Inc. ** +160 Series (16-bit cards) +------------------------- + - from Juergen Seifert + +CNET TECHNOLOGY INC. (CNet) ARCNET 160A SERIES +============================================== + +This description has been written by Juergen Seifert +using information from the following Original CNet Manual + + "ARCNET + USER'S MANUAL + for + CN160A + CN160AB + CN160TP + P/N:12-01-0006 + Revision 3.00" + +ARCNET is a registered trademark of the Datapoint Corporation + +P/N 160A ARCNET 16 bit XT/AT Star +P/N 160AB ARCNET 16 bit XT/AT Bus +P/N 160TP ARCNET 16 bit XT/AT Twisted Pair + + ___________________________________________________________________ + < _________________________ ___| + > |oo| JP2 | | LED |___| + < |oo| JP1 | 9026 | LED |___| + > |_________________________| ___| + < N | | ID7 + > 1 o | | ID6 + < 1 2 3 4 5 6 7 8 9 0 d | S | ID5 + > _______________ _____________________ e | W | ID4 + < | PROM | | SW1 | A | 2 | ID3 + > > SOCKET | |_____________________| d | | ID2 + < |_______________| | IO-Base | MEM | d | | ID1 + > r |___| ID0 + < ____| + > | | + < | J1 | + > | | + < |____| + > 1 1 1 1 | + < 3 4 5 6 7 JP 8 9 0 1 2 3 | + > |o|o|o|o|o| |o|o|o|o|o|o| | + < |o|o|o|o|o| __ |o|o|o|o|o|o| ___________| + > | | | + <____________| |_______________________________________| + +Legend: + +9026 ARCNET Probe +SW1 1-6: Base I/O Address Select + 7-10: Base Memory Address Select +SW2 1-8: Node ID Select (ID0-ID7) +JP1/JP2 ET1, ET2 Timeout Parameters +JP3-JP13 Interrupt Select +J1 BNC RG62/U Connector (CN160A/AB only) +J1 Two 6-position Telephone Jack (CN160TP only) +LED + +Setting one of the switches to Off means "1", On means "0". + + +Setting the Node ID +------------------- + +The eight switches in SW2 are used to set the node ID. Each node attached +to the network must have an unique node ID which must be diffrent from 0. +Switch 1 (ID0) serves as the least significant bit (LSB). + +The node ID is the sum of the values of all switches set to "1" +These values are: + + Switch | Label | Value + -------|-------|------- + 1 | ID0 | 1 + 2 | ID1 | 2 + 3 | ID2 | 4 + 4 | ID3 | 8 + 5 | ID4 | 16 + 6 | ID5 | 32 + 7 | ID6 | 64 + 8 | ID7 | 128 + +Some Examples: + + Switch | Hex | Decimal + 8 7 6 5 4 3 2 1 | Node ID | Node ID + ----------------|---------|--------- + 0 0 0 0 0 0 0 0 | not allowed + 0 0 0 0 0 0 0 1 | 1 | 1 + 0 0 0 0 0 0 1 0 | 2 | 2 + 0 0 0 0 0 0 1 1 | 3 | 3 + . . . | | + 0 1 0 1 0 1 0 1 | 55 | 85 + . . . | | + 1 0 1 0 1 0 1 0 | AA | 170 + . . . | | + 1 1 1 1 1 1 0 1 | FD | 253 + 1 1 1 1 1 1 1 0 | FE | 254 + 1 1 1 1 1 1 1 1 | FF | 255 + + +Setting the I/O Base Address +---------------------------- + +The first six switches in switch block SW1 are used to select the I/O Base +address using the followig table: + + Switch | Hex I/O + 1 2 3 4 5 6 | Address + ------------------------|-------- + OFF ON ON OFF OFF ON | 260 + OFF ON OFF ON ON OFF | 290 + OFF ON OFF OFF OFF ON | 2E0 (Manufactor's default) + OFF ON OFF OFF OFF OFF | 2F0 + OFF OFF ON ON ON ON | 300 + OFF OFF ON OFF ON OFF | 350 + OFF OFF OFF ON ON ON | 380 + OFF OFF OFF OFF OFF ON | 3E0 + +Note: Other IO-Base addresses seem to be selectable, but only the above + combinations are documented. + + +Setting the Base Memory (RAM) buffer Address +-------------------------------------------- + +The switches 7-10 of switch block SW1 are used to select the Memory +Base address of the RAM (2K) and the PROM. + + Switch | Hex RAM | Hex ROM + 7 8 9 10 | Address | Address + ----------------|---------|----------- + OFF OFF ON ON | C0000 | C8000 + OFF OFF ON OFF | D0000 | D8000 (Default) + OFF OFF OFF ON | E0000 | E8000 + +Note: Other MEM-Base addresses seem to be selectable, but only the above + combinations are documented. + + +Setting the Interrupt Line +-------------------------- + +To select a hardware interrupt level install one (only one!) of the jumpers +JP3 through JP13 using the following table: + + Jumper | IRQ + -------|----------------- + 3 | 14 + 4 | 15 + 5 | 12 + 6 | 11 + 7 | 10 + 8 | 3 + 9 | 4 + 10 | 5 + 11 | 6 + 12 | 7 + 13 | 2 (=9) Default! + +Note: - Do not use JP11=IRQ6, it may conflict with your Floppy Disk + Controler + - Use JP3=IRQ14 only, if you don't have an IDE-, MFM-, or RLL- + Hard Disk, it may conflict with their controlers + + +Setting the Timeout Parameters +------------------------------ + +The jumpers labeled JP1 and JP2 are used to determine the timeout +parameters. These two jumpers are normally left open. + + +***************************************************************************** + +** No Name ** +8-bit cards, 16-bit cards +------------------------- + - from Juergen Seifert + +NONAME 8-BIT ARCNET +=================== + +I have named this ARCnet card "NONAME", since there is no name of any +manufactor on the Installation manual nor on the shipping box. The only +hint to the existence of a manufactor at all is written into cupper, +it is "Made in Taiwan" + +This description has been written by Juergen Seifert +using information from the Original + "ARCnet Installation Manual" + + + ________________________________________________________________ + | |STAR| BUS| T/P| | + | |____|____|____| | + | _____________________ | + | | | | + | | | | + | | | | + | | SMC | | + | | | | + | | COM90C65 | | + | | | | + | | | | + | |__________-__________| | + | _____| + | _______________ | CN | + | | PROM | |_____| + | > SOCKET | | + | |_______________| 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 | + | _______________ _______________ | + | |o|o|o|o|o|o|o|o| | SW1 || SW2 || + | |o|o|o|o|o|o|o|o| |_______________||_______________|| + |___ 2 3 4 5 7 E E R Node ID IOB__|__MEM____| + | \ IRQ / T T O | + |__________________1_2_M______________________| + +Legend: + +COM90C65: Arcnet Probe +S1 1-8: Node ID Select +S2 1-3: I/O Base Address Select + 4-6: Memory Base Address Select + 7-8: RAM Offset Select +ET1, ET2 Extended Timeout Select +ROM ROM Enable Select +CN RG62 Coax Connector +STAR| BUS | T/P Three fields for placing a sign (colored circle) + indicating the topologie of the card + +Setting one of the switches to Off means "1", On means "0". + + +Setting the Node ID +------------------- + +The eight switches in group SW1 are used to set the node ID. +Each node attached to the network must have an unique node ID which +must be diffrent from 0. +Switch 8 serves as the least significant bit (LSB). + +The node ID is the sum of the values of all switches set to "1" +These values are: + + Switch | Value + -------|------- + 8 | 1 + 7 | 2 + 6 | 4 + 5 | 8 + 4 | 16 + 3 | 32 + 2 | 64 + 1 | 128 + +Some Examples: + + Switch | Hex | Decimal + 1 2 3 4 5 6 7 8 | Node ID | Node ID + ----------------|---------|--------- + 0 0 0 0 0 0 0 0 | not allowed + 0 0 0 0 0 0 0 1 | 1 | 1 + 0 0 0 0 0 0 1 0 | 2 | 2 + 0 0 0 0 0 0 1 1 | 3 | 3 + . . . | | + 0 1 0 1 0 1 0 1 | 55 | 85 + . . . | | + 1 0 1 0 1 0 1 0 | AA | 170 + . . . | | + 1 1 1 1 1 1 0 1 | FD | 253 + 1 1 1 1 1 1 1 0 | FE | 254 + 1 1 1 1 1 1 1 1 | FF | 255 + + +Setting the I/O Base Address +---------------------------- + +The first three switches in switch group SW2 are used to select one +of eight possible I/O Base addresses using the followig table + + Switch | Hex I/O + 1 2 3 | Address + ------------|-------- + ON ON ON | 260 + ON ON OFF | 290 + ON OFF ON | 2E0 (Manufactor's default) + ON OFF OFF | 2F0 + OFF ON ON | 300 + OFF ON OFF | 350 + OFF OFF ON | 380 + OFF OFF OFF | 3E0 + + +Setting the Base Memory (RAM) buffer Address +-------------------------------------------- + +The memory buffer requires 2K of a 16K block of RAM. The base of this +16K block can be located in any of eight positions. +Switches 4-6 of switch group SW2 select the Base of the 16K block. +Within that 16K address space, the buffer may be assigned any one of four +positions, determined by the offset, switches 7 and 8 of group SW2. + + Switch | Hex RAM | Hex ROM + 4 5 6 7 8 | Address | Address *) + -----------|---------|----------- + 0 0 0 0 0 | C0000 | C2000 + 0 0 0 0 1 | C0800 | C2000 + 0 0 0 1 0 | C1000 | C2000 + 0 0 0 1 1 | C1800 | C2000 + | | + 0 0 1 0 0 | C4000 | C6000 + 0 0 1 0 1 | C4800 | C6000 + 0 0 1 1 0 | C5000 | C6000 + 0 0 1 1 1 | C5800 | C6000 + | | + 0 1 0 0 0 | CC000 | CE000 + 0 1 0 0 1 | CC800 | CE000 + 0 1 0 1 0 | CD000 | CE000 + 0 1 0 1 1 | CD800 | CE000 + | | + 0 1 1 0 0 | D0000 | D2000 (Manufactor's default) + 0 1 1 0 1 | D0800 | D2000 + 0 1 1 1 0 | D1000 | D2000 + 0 1 1 1 1 | D1800 | D2000 + | | + 1 0 0 0 0 | D4000 | D6000 + 1 0 0 0 1 | D4800 | D6000 + 1 0 0 1 0 | D5000 | D6000 + 1 0 0 1 1 | D5800 | D6000 + | | + 1 0 1 0 0 | D8000 | DA000 + 1 0 1 0 1 | D8800 | DA000 + 1 0 1 1 0 | D9000 | DA000 + 1 0 1 1 1 | D9800 | DA000 + | | + 1 1 0 0 0 | DC000 | DE000 + 1 1 0 0 1 | DC800 | DE000 + 1 1 0 1 0 | DD000 | DE000 + 1 1 0 1 1 | DD800 | DE000 + | | + 1 1 1 0 0 | E0000 | E2000 + 1 1 1 0 1 | E0800 | E2000 + 1 1 1 1 0 | E1000 | E2000 + 1 1 1 1 1 | E1800 | E2000 + +*) To enable the 8K Boot PROM install the jumper ROM. + The default is jumper ROM not installed. + + +Setting Interrupt Request Lines (IRQ) +------------------------------------- + +To select a hardware interrupt level set one (only one!) of the jumpers +IRQ2, IRQ3, IRQ4, IRQ5 or IRQ7. The Manufactor's default is IRQ2. + + +Setting the Timeouts +-------------------- + +The two jumpers labeled ET1 and ET2 are used to determine the timeout +parameters (respons and reconfiguration time). Every node in a network +must be set to the same timeout values. + + ET1 ET2 | Response Time (us) | Reconfiguration Time (ms) + --------|--------------------|-------------------------- + Off Off | 78 | 840 (Default) + Off On | 285 | 1680 + On Off | 563 | 1680 + On On | 1130 | 1680 + +On means jumper installed, Off means jumper not installed + + +NONAME 16-BIT ARCNET +==================== + +The manual of my 8-Bit NONAME ARCnet Card contains another description +of a 16-Bit Coax / Twisted Pair Card. This description is incomplete, +because there are missing two pages in the manual booklet. (The table +of contents reports pages ... 2-9, 2-11, 2-12, 3-1, ... but inside +the booklet there is a diffrent way of counting ... 2-9, 2-10, A-1, +(empty page), 3-1, ..., 3-18, A-1 (again), A-2) +Also the picture of the board layout is not as good as the picture of +8-Bit card, because there isn't any letter like "SW1" written to the +picture. +Should somebody have such a board, please feel free to complete this +description or to send a mail to me! + +This description has been written by Juergen Seifert +using information from the Original + "ARCnet Installation Manual" + + + ___________________________________________________________________ + < _________________ _________________ | + > | SW? || SW? | | + < |_________________||_________________| | + > ____________________ | + < | | | + > | | | + < | | | + > | | | + < | | | + > | | | + < | | | + > |____________________| | + < ____| + > ____________________ | | + < | | | J1 | + > | < | | + < |____________________| ? ? ? ? ? ? |____| + > |o|o|o|o|o|o| | + < |o|o|o|o|o|o| | + > | + < __ ___________| + > | | | + <____________| |_______________________________________| + + +Setting one of the switches to Off means "1", On means "0". + + +Setting the Node ID +------------------- + +The eight switches in group SW2 are used to set the node ID. +Each node attached to the network must have an unique node ID which +must be diffrent from 0. +Switch 8 serves as the least significant bit (LSB). + +The node ID is the sum of the values of all switches set to "1" +These values are: + + Switch | Value + -------|------- + 8 | 1 + 7 | 2 + 6 | 4 + 5 | 8 + 4 | 16 + 3 | 32 + 2 | 64 + 1 | 128 + +Some Examples: + + Switch | Hex | Decimal + 1 2 3 4 5 6 7 8 | Node ID | Node ID + ----------------|---------|--------- + 0 0 0 0 0 0 0 0 | not allowed + 0 0 0 0 0 0 0 1 | 1 | 1 + 0 0 0 0 0 0 1 0 | 2 | 2 + 0 0 0 0 0 0 1 1 | 3 | 3 + . . . | | + 0 1 0 1 0 1 0 1 | 55 | 85 + . . . | | + 1 0 1 0 1 0 1 0 | AA | 170 + . . . | | + 1 1 1 1 1 1 0 1 | FD | 253 + 1 1 1 1 1 1 1 0 | FE | 254 + 1 1 1 1 1 1 1 1 | FF | 255 + + +Setting the I/O Base Address +---------------------------- + +The first three switches in switch group SW1 are used to select one +of eight possible I/O Base addresses using the followig table + + Switch | Hex I/O + 3 2 1 | Address + ------------|-------- + ON ON ON | 260 + ON ON OFF | 290 + ON OFF ON | 2E0 (Manufactor's default) + ON OFF OFF | 2F0 + OFF ON ON | 300 + OFF ON OFF | 350 + OFF OFF ON | 380 + OFF OFF OFF | 3E0 + + +Setting the Base Memory (RAM) buffer Address +-------------------------------------------- + +The memory buffer requires 2K of a 16K block of RAM. The base of this +16K block can be located in any of eight positions. +Switches 6-8 of switch group SW1 select the Base of the 16K block. +Within that 16K address space, the buffer may be assigned any one of four +positions, determined by the offset, switches 4 and 5 of group SW1. + + Switch | Hex RAM | Hex ROM + 8 7 6 5 4 | Address | Address + -----------|---------|----------- + 0 0 0 0 0 | C0000 | C2000 + 0 0 0 0 1 | C0800 | C2000 + 0 0 0 1 0 | C1000 | C2000 + 0 0 0 1 1 | C1800 | C2000 + | | + 0 0 1 0 0 | C4000 | C6000 + 0 0 1 0 1 | C4800 | C6000 + 0 0 1 1 0 | C5000 | C6000 + 0 0 1 1 1 | C5800 | C6000 + | | + 0 1 0 0 0 | CC000 | CE000 + 0 1 0 0 1 | CC800 | CE000 + 0 1 0 1 0 | CD000 | CE000 + 0 1 0 1 1 | CD800 | CE000 + | | + 0 1 1 0 0 | D0000 | D2000 (Manufactor's default) + 0 1 1 0 1 | D0800 | D2000 + 0 1 1 1 0 | D1000 | D2000 + 0 1 1 1 1 | D1800 | D2000 + | | + 1 0 0 0 0 | D4000 | D6000 + 1 0 0 0 1 | D4800 | D6000 + 1 0 0 1 0 | D5000 | D6000 + 1 0 0 1 1 | D5800 | D6000 + | | + 1 0 1 0 0 | D8000 | DA000 + 1 0 1 0 1 | D8800 | DA000 + 1 0 1 1 0 | D9000 | DA000 + 1 0 1 1 1 | D9800 | DA000 + | | + 1 1 0 0 0 | DC000 | DE000 + 1 1 0 0 1 | DC800 | DE000 + 1 1 0 1 0 | DD000 | DE000 + 1 1 0 1 1 | DD800 | DE000 + | | + 1 1 1 0 0 | E0000 | E2000 + 1 1 1 0 1 | E0800 | E2000 + 1 1 1 1 0 | E1000 | E2000 + 1 1 1 1 1 | E1800 | E2000 + + +Setting Interrupt Request Lines (IRQ) +------------------------------------- + +?????????????????????????????????????? + + +Setting the Timeouts +-------------------- + +?????????????????????????????????????? + + +***************************************************************************** + +Other Cards +----------- + +I have no information on other models of ARCnet cards at the moment. Please +send any and all info to: + apenwarr@tourism.807-city.on.ca + +Thanks. diff -u --recursive --new-file v1.2.1/linux/drivers/net/Space.c linux/drivers/net/Space.c --- v1.2.1/linux/drivers/net/Space.c Sun Feb 12 16:11:56 1995 +++ linux/drivers/net/Space.c Sun Mar 26 10:49:58 1995 @@ -170,6 +170,14 @@ # define NEXT_DEV (&atp_dev) #endif +#ifdef CONFIG_ARCNET + extern int arcnet_probe(struct device *dev); + static struct device arcnet_dev = { + "arc0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, arcnet_probe, }; +# undef NEXT_DEV +# define NEXT_DEV (&arcnet_dev) +#endif + /* The first device defaults to I/O base '0', which means autoprobe. */ #ifndef ETH0_ADDR # define ETH0_ADDR 0 @@ -292,14 +300,6 @@ #undef NEXT_DEV #define NEXT_DEV (&ppp0_dev) #endif /* PPP */ - -#ifdef CONFIG_ARCNET - extern int arcnet_probe(struct device *dev); - static struct device arcnet_dev = { - "arc0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, arcnet_probe, }; -# undef NEXT_DEV -# define NEXT_DEV (&arcnet_dev) -#endif #ifdef CONFIG_DUMMY extern int dummy_init(struct device *dev); diff -u --recursive --new-file v1.2.1/linux/drivers/net/arcnet.c linux/drivers/net/arcnet.c --- v1.2.1/linux/drivers/net/arcnet.c Thu Feb 23 13:53:58 1995 +++ linux/drivers/net/arcnet.c Sun Mar 26 10:49:58 1995 @@ -15,7 +15,10 @@ ********************** - + v1.01 (95/03/24) + - Fixed some IPX-related bugs. (Thanks to Tomasz Motylewski + for the patches to make arcnet work + with dosemu!) v1.0 (95/02/15) - Initial non-alpha release. @@ -25,15 +28,12 @@ - Test in systems with NON-ARCnet network cards, just to see if autoprobe kills anything. With any luck, it won't. (It's pretty careful.) - - Except some unfriendly NE2000's die. (0.40) + - Except some unfriendly NE2000's die. (as of 0.40-ALPHA) - cards with shared memory that can be "turned off?" - NFS mount freezes after several megabytes to SOSS for DOS. unmount/remount works. Is this arcnet-specific? I don't know. - Add support for the various stupid bugs ("I didn't read the RFC" - syndrome) in MS Windows for Workgroups and LanMan. - - - get the net people to probe last for arcnet, and first for ne2000 - in Space.c... + syndrome) in Windows for Workgroups and LanMan. */ /**************************************************************************/ @@ -87,7 +87,7 @@ /**************************************************************************/ static char *version = - "arcnet.c:v1.00 95/02/15 Avery Pennarun \n"; + "arcnet.c:v1.01 95/03/24 Avery Pennarun \n"; /* Sources: @@ -140,6 +140,7 @@ * D_NORMAL verification * D_INIT show init/detect messages * D_DURING show messages during normal use (ie interrupts) + * D_DATA show packets data from skb's, not on Arcnet card * D_TX show tx packets * D_RX show tx+rx packets */ @@ -148,8 +149,9 @@ #define D_INIT 2 #define D_EXTRA 3 #define D_DURING 4 -#define D_TX 5 -#define D_RX 6 +#define D_DATA 6 +#define D_TX 8 +#define D_RX 9 #ifndef NET_DEBUG #define NET_DEBUG D_INIT @@ -289,7 +291,7 @@ * but WE MUST GET RID OF IT BEFORE SENDING A * PACKET!! */ - u_char stupid; /* filler to make struct an even # of bytes */ + u_char saddr; /* Source address - neccesary for IPX protocol */ /* data that IS part of real packet */ u_char protocol_id, /* ARC_P_IP, ARC_P_ARP, or ARC_P_RARP */ @@ -446,9 +448,12 @@ printk(version); printk("arcnet: ***\n"); printk("arcnet: * Read linux/drivers/net/README.arcnet for important release notes!\n"); + printk("arcnet: *\n"); + printk("arcnet: * This version should be stable, but e-mail me if you have any\n"); + printk("arcnet: * questions, comments, or bug reports!\n"); printk("arcnet: ***\n"); } - + BUGLVL(D_INIT) printk("arcnet: given: base %lXh, IRQ %Xh, shmem %lXh\n", dev->base_addr,dev->irq,dev->mem_start); @@ -1003,6 +1008,15 @@ out->length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; out->hdr=(struct ClientData*)skb->data; out->skb=skb; + BUGLVL( D_DATA ) { + short i; + for( i=0; i< skb->len; i++) + { + if( i%16 == 0 ) printk("\n[%04hX] ",i); + printk("%02hX ",((unsigned char*)skb->data)[i]); + } + printk("\n"); + } #ifdef IRQ_XMIT if (lp->txready && inb(STATUS)&TXFREEflag) @@ -1566,7 +1580,7 @@ BUGLVL(D_RX) printk("arcnet: incoming is not split (splitflag=%d)\n", arcsoft->split_flag); - if (in->skb) /* already assembling one! */ + if (in->skb) /* already assembling one! */ { BUGLVL(D_INIT) printk("arcnet: aborting assembly (seq=%d) for unsplit packet (splitflag=%d, seq=%d)\n", in->sequence,arcsoft->split_flag, @@ -1593,6 +1607,7 @@ (u_char *)arcsoft+EXTRA_CLIENTDATA, length-EXTRA_CLIENTDATA); soft->daddr=daddr; + soft->saddr=saddr; BUGLVL(D_DURING) printk("arcnet: received packet from %02Xh to %02Xh (%d bytes, type=%d)\n", @@ -1648,7 +1663,15 @@ arp->ar_hln,arp->ar_pln); } } - + BUGLVL( D_DATA ) { + short i; + for( i=0; i< skb->len; i++) + { + if( i%16 == 0 ) printk("\n[%04hX] ",i); + printk("%02hX ",((unsigned char*)skb->data)[i]); + } + printk("\n"); + } netif_rx(skb); lp->stats.rx_packets++; } @@ -1725,13 +1748,6 @@ */ skb->free=1; - if (skb==NULL) - { - printk("%s: Memory squeeze, dropping packet.\n", - dev->name); - lp->stats.rx_dropped++; - return; - } soft=(struct ClientData *)skb->data; skb->len=sizeof(struct ClientData); @@ -1789,6 +1805,7 @@ skb->len+=length-sizeof(struct ClientData); soft->daddr=daddr; + soft->saddr=saddr; BUGLVL(D_DURING) printk("arcnet: received packet from %02Xh to %02Xh (%d bytes, type=%d)\n", @@ -1818,6 +1835,15 @@ skb,in->skb); in->skb=NULL; in->lastpacket=in->numpackets=0; + BUGLVL( D_DATA ) { + short i; + for( i=0; i< skb->len; i++) + { + if( i%16 == 0 ) printk("\n[%04hX] ",i); + printk("%02hX ",((unsigned char*)skb->data)[i]); + } + printk("\n"); + } netif_rx(skb); lp->stats.rx_packets++; } @@ -1980,22 +2006,26 @@ case ETH_P_IPX: head->protocol_id=ARC_P_IPX; break; + case ETH_P_ATALK: + head->protocol_id=ARC_P_ATALK; + break; default: printk("arcnet: I don't understand protocol %d (%Xh)\n", type,type); return 0; } -#if 0 +#if 1 /* * Set the source hardware address. * AVE: we can't do this, so we don't. Code below is directly * stolen from eth.c driver and won't work. + ** TM: but for debugging I would like to have saddr in the header */ if(saddr) - memcpy(eth->h_source,saddr,dev->addr_len); + head->saddr=((u_char*)saddr)[0]; else - memcpy(eth->h_source,dev->dev_addr,dev->addr_len); + head->saddr=((u_char*)(dev->dev_addr))[0]; #endif #if 0 @@ -2007,7 +2037,7 @@ */ if (dev->flags & IFF_LOOPBACK) { - memset(eth->h_dest, 0, dev->addr_len); + head->daddr=0; return(dev->hard_header_len); } #endif @@ -2098,8 +2128,8 @@ case ARC_P_ARP: return htons(ETH_P_ARP); case ARC_P_RARP: return htons(ETH_P_RARP); case ARC_P_IPX: return htons(ETH_P_IPX); + case ARC_P_ATALK: return htons(ETH_P_ATALK); /* appletalk, not tested */ case ARC_P_LANSOFT: /* don't understand. fall through. */ - case ARC_P_ATALK: /* appletalk - don't understand. fall through. */ default: BUGLVL(D_DURING) printk("arcnet: received packet of unknown protocol id %d (%Xh)\n", diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/Makefile linux/drivers/scsi/Makefile --- v1.2.1/linux/drivers/scsi/Makefile Thu Mar 9 20:37:34 1995 +++ linux/drivers/scsi/Makefile Sun Mar 19 12:54:09 1995 @@ -62,6 +62,8 @@ ifdef CONFIG_SCSI_AHA152X SCSI_OBJS := $(SCSI_OBJS) aha152x.o SCSI_SRCS := $(SCSI_SRCS) aha152x.c +else +SCSI_MODULE_OBJS := $(SCSI_MODULE_OBJS) aha152x.o endif ifdef CONFIG_SCSI_AHA1542 diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/NCR5380.c linux/drivers/scsi/NCR5380.c --- v1.2.1/linux/drivers/scsi/NCR5380.c Wed Feb 1 09:19:36 1995 +++ linux/drivers/scsi/NCR5380.c Wed Mar 22 10:34:00 1995 @@ -538,7 +538,7 @@ *prev = instance; timer_table[NCR5380_TIMER].expires = expires_first->time_expires; timer_active |= 1 << NCR5380_TIMER; - sti; + sti(); return 0; } diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c --- v1.2.1/linux/drivers/scsi/aha152x.c Sun Jan 22 22:13:38 1995 +++ linux/drivers/scsi/aha152x.c Wed Mar 22 17:41:24 1995 @@ -20,10 +20,13 @@ * General Public License for more details. * - * $Id: aha152x.c,v 1.8 1995/01/21 22:07:19 root Exp root $ + * $Id: aha152x.c,v 1.9 1995/03/18 09:20:24 root Exp root $ * * $Log: aha152x.c,v $ + * Revision 1.9 1995/03/18 09:20:24 root + * - patches for PCMCIA and modules + * * Revision 1.8 1995/01/21 22:07:19 root * - snarf_region => request_region * - aha152x_intr interface change @@ -197,6 +200,11 @@ **************************************************************************/ +#ifdef MODULE +#include +#include +#endif + #include #include #include "../block/blk.h" @@ -214,6 +222,10 @@ /* DEFINES */ +/* For PCMCIA cards, always use AUTOCONF */ +#ifdef PCMCIA +#define AUTOCONF +#endif /* If auto configuration is disabled, IRQ, SCSI_ID and RECONNECT have to be predefined */ @@ -530,7 +542,7 @@ { int i; - if(check_region(port_base, TEST-SCSISEQ)) + if(check_region(port_base, 0x20)) return 0; SETPORT( DMACNTRL1, 0 ); /* reset stack pointer */ @@ -551,6 +563,7 @@ aha152x_config conf; #endif int interrupt_level; + struct Scsi_Host *hreg; if(setup_called) { @@ -580,6 +593,7 @@ aha152x_debug = setup_debug; #endif +#ifndef PCMCIA for( i=0; i 7) ) { printk("illegal SCSI ID %d\n", this_host); @@ -735,7 +756,12 @@ can_disconnect ? "enabled" : "disabled", can_doparity ? "enabled" : "disabled"); - request_region(port_base, TEST-SCSISEQ, "aha152x"); /* Register */ + request_region(port_base, 0x20, "aha152x"); /* Register */ + + hreg = scsi_register(tpnt, 0); + hreg->io_port = port_base; + hreg->n_io_port = 0x20; + hreg->irq = interrupt_level; /* not expecting any interrupts */ SETPORT(SIMODE0, 0); diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/aha152x.h linux/drivers/scsi/aha152x.h --- v1.2.1/linux/drivers/scsi/aha152x.h Sun Jan 22 22:13:47 1995 +++ linux/drivers/scsi/aha152x.h Sun Mar 19 12:54:09 1995 @@ -2,7 +2,7 @@ #define _AHA152X_H /* - * $Id: aha152x.h,v 1.8 1995/01/21 22:11:07 root Exp root $ + * $Id: aha152x.h,v 1.9 1995/03/18 09:21:04 root Exp root $ */ #if defined(__KERNEL__) @@ -22,7 +22,7 @@ (unless we support more than 1 cmd_per_lun this should do) */ #define AHA152X_MAXQUEUE 7 -#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 1.8 $" +#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 1.9 $" /* Initial value of Scsi_Host entry */ #define AHA152X { /* next */ NULL, \ diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/eata.c linux/drivers/scsi/eata.c --- v1.2.1/linux/drivers/scsi/eata.c Wed Feb 15 10:23:44 1995 +++ linux/drivers/scsi/eata.c Mon Mar 20 09:13:46 1995 @@ -1,6 +1,13 @@ /* * eata.c - Low-level driver for EATA/DMA SCSI host adapters. * + * 11 Mar 1995 rev. 2.00 for linux 1.2.0 + * Fixed a bug which prevented media change detection for removable + * disk drives. + * + * 23 Feb 1995 rev. 1.18 for linux 1.1.94 + * Added a check for scsi_register returning NULL. + * * 11 Feb 1995 rev. 1.17 for linux 1.1.91 * Now DEBUG_RESET is disabled by default. * Register a board even if it does not assert DMA protocol support @@ -460,6 +467,17 @@ #endif sh[j] = scsi_register(tpnt, sizeof(struct hostdata)); + + if (sh[j] == NULL) { + printk("%s: unable to register host, detaching.\n", name); + + if (irqlist[irq] == NO_IRQ) free_irq(irq); + + if (subversion == ISA) free_dma(dma_channel); + + return FALSE; + } + sh[j]->io_port = *port_base; sh[j]->n_io_port = REGION_SIZE; sh[j]->dma_channel = dma_channel; @@ -959,11 +977,6 @@ && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) status = DID_BUS_BUSY << 16; - else if (tstatus == CHECK_CONDITION - && SCpnt->device->type == TYPE_DISK - && (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) - status = DID_ERROR << 16; - else status = DID_OK << 16; diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/eata.h linux/drivers/scsi/eata.h --- v1.2.1/linux/drivers/scsi/eata.h Wed Feb 15 10:23:49 1995 +++ linux/drivers/scsi/eata.h Mon Mar 20 09:13:46 1995 @@ -7,7 +7,7 @@ #include -#define EATA_VERSION "1.17.00" +#define EATA_VERSION "2.00.00" int eata2x_detect(Scsi_Host_Template *); int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c --- v1.2.1/linux/drivers/scsi/scsi.c Mon Feb 20 10:57:10 1995 +++ linux/drivers/scsi/scsi.c Sun Mar 19 12:54:09 1995 @@ -454,11 +454,16 @@ scsi_result[1] |= 0x80; /* removable */ } - SDpnt->manufacturer = SCSI_MAN_UNKNOWN; - if (!strncmp(scsi_result+8,"NEC",3)) - SDpnt->manufacturer = SCSI_MAN_NEC; - if (!strncmp(scsi_result+8,"TOSHIBA",7)) - SDpnt->manufacturer = SCSI_MAN_TOSHIBA; + if (!strncmp(scsi_result+8,"NEC",3)) { + if (!strncmp(scsi_result+16,"CD-ROM DRIVE:84 ",16) || + !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15)) + SDpnt->manufacturer = SCSI_MAN_NEC_OLDCDR; + else + SDpnt->manufacturer = SCSI_MAN_NEC; + } else if (!strncmp(scsi_result+8,"TOSHIBA",7)) + SDpnt->manufacturer = SCSI_MAN_TOSHIBA; + else + SDpnt->manufacturer = SCSI_MAN_UNKNOWN; SDpnt->removable = (0x80 & scsi_result[1]) >> 7; diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/scsi.h linux/drivers/scsi/scsi.h --- v1.2.1/linux/drivers/scsi/scsi.h Thu Mar 9 20:37:35 1995 +++ linux/drivers/scsi/scsi.h Sun Mar 19 12:54:09 1995 @@ -270,6 +270,7 @@ #define SCSI_MAN_UNKNOWN 0 #define SCSI_MAN_NEC 1 #define SCSI_MAN_TOSHIBA 2 +#define SCSI_MAN_NEC_OLDCDR 3 /* The scsi_device struct contains what we know about each given scsi diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/seagate.c linux/drivers/scsi/seagate.c --- v1.2.1/linux/drivers/scsi/seagate.c Thu Feb 23 13:31:41 1995 +++ linux/drivers/scsi/seagate.c Fri Mar 24 17:18:00 1995 @@ -181,6 +181,7 @@ {"FUTURE DOMAIN CORP. (C) 1986-1990 V6.0209/18/90",5, 47, FD}, {"FUTURE DOMAIN CORP. (C) 1986-1990 V7.009/18/90", 5, 46, FD}, {"FUTURE DOMAIN CORP. (C) 1992 V8.00.004/02/92", 5, 44, FD}, +{"IBM F1 BIOS V1.1004/30/92", 5, 25, FD}, {"FUTURE DOMAIN TMC-950", 5, 21, FD}, #endif /* CONFIG_SCSI_SEAGATE */ } diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c --- v1.2.1/linux/drivers/scsi/sr.c Thu Feb 23 13:31:41 1995 +++ linux/drivers/scsi/sr.c Sun Mar 19 12:54:09 1995 @@ -309,7 +309,7 @@ if (scsi_CDs[MINOR(inode->i_rdev)].xa_flags & 0x02) { #ifdef DEBUG - printk("sr_photocd: drive does not support multisession CD's"); + printk("sr_photocd: CDROM and/or the driver does not support multisession CD's"); #endif return; } @@ -452,11 +452,11 @@ } break; + case SCSI_MAN_NEC_OLDCDR: case SCSI_MAN_UNKNOWN: default: -#ifdef DEBUG - printk("sr_photocd: unknown drive, no special multisession code\n"); -#endif + sector = 0; + no_multi = 1; break; } scsi_CDs[MINOR(inode->i_rdev)].mpcd_sector = sector; diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/u14-34f.c linux/drivers/scsi/u14-34f.c --- v1.2.1/linux/drivers/scsi/u14-34f.c Tue Feb 14 08:06:50 1995 +++ linux/drivers/scsi/u14-34f.c Mon Mar 20 09:13:46 1995 @@ -1,6 +1,13 @@ /* * u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters. * + * 11 Mar 1995 rev. 2.00 for linux 1.2.0 + * Fixed a bug which prevented media change detection for removable + * disk drives. + * + * 23 Feb 1995 rev. 1.18 for linux 1.1.94 + * Added a check for scsi_register returning NULL. + * * 11 Feb 1995 rev. 1.17 for linux 1.1.91 * U14F qualified to run with 32 sglists. * Now DEBUG_RESET is disabled by default. @@ -398,6 +405,17 @@ } sh[j] = scsi_register(tpnt, sizeof(struct hostdata)); + + if (sh[j] == NULL) { + printk("%s: unable to register host, detaching.\n", name); + + if (irqlist[irq] == NO_IRQ) free_irq(irq); + + if (subversion == ISA) free_dma(dma_channel); + + return FALSE; + } + sh[j]->io_port = *port_base; sh[j]->n_io_port = REGION_SIZE; sh[j]->base = bios_segment_table[config_1.bios_segment]; @@ -895,11 +913,6 @@ && (SCpnt->sense_buffer[2] & 0xf) == RECOVERED_ERROR) status = DID_BUS_BUSY << 16; - else if (tstatus == CHECK_CONDITION - && SCpnt->device->type == TYPE_DISK - && (SCpnt->sense_buffer[2] & 0xf) == UNIT_ATTENTION) - status = DID_ERROR << 16; - else status = DID_OK << 16; diff -u --recursive --new-file v1.2.1/linux/drivers/scsi/u14-34f.h linux/drivers/scsi/u14-34f.h --- v1.2.1/linux/drivers/scsi/u14-34f.h Tue Feb 14 08:06:50 1995 +++ linux/drivers/scsi/u14-34f.h Mon Mar 20 09:13:46 1995 @@ -10,7 +10,7 @@ int u14_34f_reset(Scsi_Cmnd *); int u14_34f_biosparam(Disk *, int, int *); -#define U14_34F_VERSION "1.17.00" +#define U14_34F_VERSION "2.00.00" #define ULTRASTOR_14_34F { \ NULL, /* Ptr for modules */ \ diff -u --recursive --new-file v1.2.1/linux/fs/ext2/CHANGES linux/fs/ext2/CHANGES --- v1.2.1/linux/fs/ext2/CHANGES Fri Nov 4 12:38:44 1994 +++ linux/fs/ext2/CHANGES Wed Mar 22 10:33:59 1995 @@ -1,5 +1,12 @@ Changes from version 0.5 to version 0.5a ======================================== + - Zero the partial block following the end of the file when a file + is truncated. + - Dates updated in the copyrigth. + - More checks when the filesystem is mounted: the count of blocks, + fragments, and inodes per group is checked against the block size. + - The buffers used by the error routines are now static variables, to + avoid using space on the kernel stack, as requested by Linus. - Some cleanups in the error messages (some versions of syslog contain a bug which truncates an error message if it contains '\n'). - Check that no data can be written to a file past the 2GB limit. diff -u --recursive --new-file v1.2.1/linux/fs/ext2/acl.c linux/fs/ext2/acl.c --- v1.2.1/linux/fs/ext2/acl.c Wed Jan 11 08:11:02 1995 +++ linux/fs/ext2/acl.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/acl.c * - * Copyright (C) 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) */ /* diff -u --recursive --new-file v1.2.1/linux/fs/ext2/balloc.c linux/fs/ext2/balloc.c --- v1.2.1/linux/fs/ext2/balloc.c Sun Feb 26 18:52:02 1995 +++ linux/fs/ext2/balloc.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/balloc.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * Enhanced block allocation by Stephen Tweedie (sct@dcs.ed.ac.uk), 1993 */ diff -u --recursive --new-file v1.2.1/linux/fs/ext2/bitmap.c linux/fs/ext2/bitmap.c --- v1.2.1/linux/fs/ext2/bitmap.c Fri Dec 31 11:59:48 1993 +++ linux/fs/ext2/bitmap.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/bitmap.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) */ #include diff -u --recursive --new-file v1.2.1/linux/fs/ext2/dir.c linux/fs/ext2/dir.c --- v1.2.1/linux/fs/ext2/dir.c Sun Feb 26 18:52:02 1995 +++ linux/fs/ext2/dir.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/dir.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/fs/ext2/file.c linux/fs/ext2/file.c --- v1.2.1/linux/fs/ext2/file.c Wed Oct 26 09:42:21 1994 +++ linux/fs/ext2/file.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/file.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/fs/ext2/ialloc.c linux/fs/ext2/ialloc.c --- v1.2.1/linux/fs/ext2/ialloc.c Thu Mar 9 20:37:35 1995 +++ linux/fs/ext2/ialloc.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/ialloc.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * BSD ufs-inspired inode and directory allocation by * Stephen Tweedie (sct@dcs.ed.ac.uk), 1993 diff -u --recursive --new-file v1.2.1/linux/fs/ext2/inode.c linux/fs/ext2/inode.c --- v1.2.1/linux/fs/ext2/inode.c Sun Feb 26 18:52:02 1995 +++ linux/fs/ext2/inode.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/inode.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/fs/ext2/ioctl.c linux/fs/ext2/ioctl.c --- v1.2.1/linux/fs/ext2/ioctl.c Mon Jan 23 23:04:10 1995 +++ linux/fs/ext2/ioctl.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/ioctl.c * - * Copyright (C) 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) */ #include diff -u --recursive --new-file v1.2.1/linux/fs/ext2/namei.c linux/fs/ext2/namei.c --- v1.2.1/linux/fs/ext2/namei.c Wed Oct 19 10:23:17 1994 +++ linux/fs/ext2/namei.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/namei.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/fs/ext2/super.c linux/fs/ext2/super.c --- v1.2.1/linux/fs/ext2/super.c Sun Feb 26 18:52:02 1995 +++ linux/fs/ext2/super.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/super.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * @@ -26,10 +27,11 @@ #include #include +static char error_buf[1024]; + void ext2_error (struct super_block * sb, const char * function, const char * fmt, ...) { - char buf[1024]; va_list args; if (!(sb->s_flags & MS_RDONLY)) { @@ -39,15 +41,15 @@ sb->s_dirt = 1; } va_start (args, fmt); - vsprintf (buf, fmt, args); + vsprintf (error_buf, fmt, args); va_end (args); if (test_opt (sb, ERRORS_PANIC) || (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_PANIC && !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_RO))) panic ("EXT2-fs panic (device %d/%d): %s: %s\n", - MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); + MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf); printk (KERN_CRIT "EXT2-fs error (device %d/%d): %s: %s\n", - MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); + MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf); if (test_opt (sb, ERRORS_RO) || (sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_RO && !test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_PANIC))) { @@ -59,7 +61,6 @@ NORET_TYPE void ext2_panic (struct super_block * sb, const char * function, const char * fmt, ...) { - char buf[1024]; va_list args; if (!(sb->s_flags & MS_RDONLY)) { @@ -69,23 +70,22 @@ sb->s_dirt = 1; } va_start (args, fmt); - vsprintf (buf, fmt, args); + vsprintf (error_buf, fmt, args); va_end (args); panic ("EXT2-fs panic (device %d/%d): %s: %s\n", - MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); + MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf); } void ext2_warning (struct super_block * sb, const char * function, const char * fmt, ...) { - char buf[1024]; va_list args; va_start (args, fmt); - vsprintf (buf, fmt, args); + vsprintf (error_buf, fmt, args); va_end (args); printk (KERN_WARNING "EXT2-fs warning (device %d/%d): %s: %s\n", - MAJOR(sb->s_dev), MINOR(sb->s_dev), function, buf); + MAJOR(sb->s_dev), MINOR(sb->s_dev), function, error_buf); } void ext2_put_super (struct super_block * sb) @@ -550,6 +550,31 @@ brelse (bh); printk ("EXT2-fs: fragsize %lu != blocksize %lu (not supported yet)\n", sb->u.ext2_sb.s_frag_size, sb->s_blocksize); + return NULL; + } + + if (sb->u.ext2_sb.s_blocks_per_group > sb->s_blocksize * 8) { + sb->s_dev = 0; + unlock_super (sb); + brelse (bh); + printk ("EXT2-fs: #blocks per group too big: %lu\n", + sb->u.ext2_sb.s_blocks_per_group); + return NULL; + } + if (sb->u.ext2_sb.s_frags_per_group > sb->s_blocksize * 8) { + sb->s_dev = 0; + unlock_super (sb); + brelse (bh); + printk ("EXT2-fs: #fragments per group too big: %lu\n", + sb->u.ext2_sb.s_frags_per_group); + return NULL; + } + if (sb->u.ext2_sb.s_inodes_per_group > sb->s_blocksize * 8) { + sb->s_dev = 0; + unlock_super (sb); + brelse (bh); + printk ("EXT2-fs: #inodes per group too big: %lu\n", + sb->u.ext2_sb.s_inodes_per_group); return NULL; } diff -u --recursive --new-file v1.2.1/linux/fs/ext2/symlink.c linux/fs/ext2/symlink.c --- v1.2.1/linux/fs/ext2/symlink.c Mon Aug 15 15:53:48 1994 +++ linux/fs/ext2/symlink.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/symlink.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/fs/ext2/truncate.c linux/fs/ext2/truncate.c --- v1.2.1/linux/fs/ext2/truncate.c Sun Feb 26 18:52:02 1995 +++ linux/fs/ext2/truncate.c Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/fs/ext2/truncate.c * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * @@ -320,6 +321,9 @@ void ext2_truncate (struct inode * inode) { int retry; + struct buffer_head * bh; + int err; + int offset; if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) @@ -343,6 +347,23 @@ ext2_sync_inode (inode); current->counter = 0; schedule (); + } + /* + * If the file is not being truncated to a block boundary, the + * contents of the partial block following the end of the file must be + * zero'ed in case it ever become accessible again because of + * subsequent file growth. + */ + offset = inode->i_size % inode->i_sb->s_blocksize; + if (offset) { + bh = ext2_bread (inode, inode->i_size / inode->i_sb->s_blocksize, + 0, &err); + if (bh) { + memset (bh->b_data + offset, 0, + inode->i_sb->s_blocksize - offset); + mark_buffer_dirty (bh, 0); + brelse (bh); + } } inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_dirt = 1; diff -u --recursive --new-file v1.2.1/linux/fs/msdos/misc.c linux/fs/msdos/misc.c --- v1.2.1/linux/fs/msdos/misc.c Mon Jan 23 10:38:29 1995 +++ linux/fs/msdos/misc.c Wed Mar 22 10:31:42 1995 @@ -19,6 +19,7 @@ #include "msbuffer.h" #define PRINTK(x) +#define Printk(x) printk x /* Well-known binary file extensions */ static char bin_extensions[] = @@ -117,7 +118,7 @@ int msdos_add_cluster(struct inode *inode) { struct super_block *sb = inode->i_sb; - int count,nr,limit,last,current,sector,last_sector; + int count,nr,limit,last,current,sector,last_sector,file_cluster; struct buffer_head *bh; int cluster_size = MSDOS_SB(inode->i_sb)->cluster_size; @@ -130,6 +131,7 @@ nr = ((count+MSDOS_SB(inode->i_sb)->prev_free) % limit)+2; if (fat_access(inode->i_sb,nr,-1) == 0) break; } + PRINTK (("cnt = %d --",count)); #ifdef DEBUG printk("free cluster: %d\n",nr); #endif @@ -149,14 +151,30 @@ printk("set to %x\n",fat_access(inode->i_sb,nr,-1)); #endif last = 0; + /* We must locate the last cluster of the file to add this + new one (nr) to the end of the link list (the FAT). + + Here file_cluster will be the number of the last cluster of the + file (before we add nr). + + last is the corresponding cluster number on the disk. We will + use last to plug the nr cluster. We will use file_cluster to + update the cache. + */ + file_cluster = 0; if ((current = MSDOS_I(inode)->i_start) != 0) { cache_lookup(inode,INT_MAX,&last,¤t); - while (current && current != -1) + file_cluster = last; + while (current && current != -1){ + PRINTK ((".")); + file_cluster++; if (!(current = fat_access(inode->i_sb, last = current,-1))) { fs_panic(inode->i_sb,"File without EOF"); return -ENOSPC; } + } + PRINTK ((" -- ")); } #ifdef DEBUG printk("last = %d\n",last); @@ -183,6 +201,12 @@ mark_buffer_dirty(bh, 1); brelse(bh); } + } + if (file_cluster != inode->i_blocks/cluster_size){ + printk ("file_cluster badly computed!!! %d <> %ld\n" + ,file_cluster,inode->i_blocks/cluster_size); + }else{ + cache_add(inode,file_cluster,nr); } inode->i_blocks += cluster_size; if (S_ISDIR(inode->i_mode)) { diff -u --recursive --new-file v1.2.1/linux/fs/umsdos/dir.c linux/fs/umsdos/dir.c --- v1.2.1/linux/fs/umsdos/dir.c Mon Jan 23 10:38:30 1995 +++ linux/fs/umsdos/dir.c Wed Mar 22 10:31:42 1995 @@ -652,7 +652,7 @@ if (*pt == '/') *pt++ = '\0'; if (dir->u.umsdos_i.i_emd_dir == 0){ /* This is a DOS directory */ - ret = msdos_lookup(dir,start,len,result); + ret = umsdos_rlookup_x(dir,start,len,result,1); }else{ ret = umsdos_lookup_x(dir,start,len,result,1); } diff -u --recursive --new-file v1.2.1/linux/fs/umsdos/inode.c linux/fs/umsdos/inode.c --- v1.2.1/linux/fs/umsdos/inode.c Mon Jan 23 10:38:28 1995 +++ linux/fs/umsdos/inode.c Wed Mar 22 10:31:43 1995 @@ -418,8 +418,8 @@ /* #Specification: pseudo root / mount When a umsdos fs is mounted, a special handling is done if it is the root partition. We check for the presence - of the file /linux/etc/init or /linux/etc/rc. - If one is there, we do a chroot("/linux"). + of the file /linux/etc/init or /linux/etc/rc or + /linux/sbin/init. If one is there, we do a chroot("/linux"). We check both because (see init/main.c) the kernel try to exec init at different place and if it fails @@ -452,25 +452,42 @@ ,UMSDOS_PSDROOT_LEN,&pseudo)==0 && S_ISDIR(pseudo->i_mode)){ struct inode *etc = NULL; - struct inode *rc = NULL; + struct inode *sbin = NULL; + int pseudo_ok = 0; Printk (("/%s is there\n",UMSDOS_PSDROOT_NAME)); if (umsdos_real_lookup (pseudo,"etc",3,&etc)==0 && S_ISDIR(etc->i_mode)){ - struct inode *init; + struct inode *init = NULL; + struct inode *rc = NULL; Printk (("/%s/etc is there\n",UMSDOS_PSDROOT_NAME)); if ((umsdos_real_lookup (etc,"init",4,&init)==0 && S_ISREG(init->i_mode)) || (umsdos_real_lookup (etc,"rc",2,&rc)==0 && S_ISREG(rc->i_mode))){ - umsdos_setup_dir_inode (pseudo); - Printk (("Activating pseudo root /%s\n",UMSDOS_PSDROOT_NAME)); - pseudo_root = pseudo; - pseudo->i_count++; - pseudo = NULL; + pseudo_ok = 1; } iput (init); iput (rc); } + if (!pseudo_ok + && umsdos_real_lookup (pseudo,"sbin",4,&sbin)==0 + && S_ISDIR(sbin->i_mode)){ + struct inode *init = NULL; + Printk (("/%s/sbin is there\n",UMSDOS_PSDROOT_NAME)); + if (umsdos_real_lookup (sbin,"init",4,&init)==0 + && S_ISREG(init->i_mode)){ + pseudo_ok = 1; + } + iput (init); + } + if (pseudo_ok){ + umsdos_setup_dir_inode (pseudo); + Printk (("Activating pseudo root /%s\n",UMSDOS_PSDROOT_NAME)); + pseudo_root = pseudo; + pseudo->i_count++; + pseudo = NULL; + } + iput (sbin); iput (etc); } iput (pseudo); diff -u --recursive --new-file v1.2.1/linux/fs/umsdos/rdir.c linux/fs/umsdos/rdir.c --- v1.2.1/linux/fs/umsdos/rdir.c Mon Jan 23 10:38:30 1995 +++ linux/fs/umsdos/rdir.c Wed Mar 22 10:31:43 1995 @@ -66,11 +66,18 @@ return ret; } -int UMSDOS_rlookup( +/* + Lookup into a non promoted directory. + If the result is a directory, make sure we find out if it is + a promoted one or not (calling umsdos_setup_dir_inode(inode)). +*/ +int umsdos_rlookup_x( struct inode *dir, const char *name, int len, - struct inode **result) /* Will hold inode of the file, if successful */ + struct inode **result, /* Will hold inode of the file, if successful */ + int nopseudo) /* Don't care about pseudo root mode */ + /* so locating "linux" will work */ { int ret; if (pseudo_root != NULL @@ -90,7 +97,7 @@ ret = umsdos_real_lookup (dir,name,len,result); if (ret == 0){ struct inode *inode = *result; - if (inode == pseudo_root){ + if (inode == pseudo_root && !nopseudo){ /* #Specification: pseudo root / DOS/linux Even in the real root directory (c:\), the directory /linux won't show @@ -107,6 +114,14 @@ } iput (dir); return ret; +} +int UMSDOS_rlookup( + struct inode *dir, + const char *name, + int len, + struct inode **result) /* Will hold inode of the file, if successful */ +{ + return umsdos_rlookup_x(dir,name,len,result,0); } static int UMSDOS_rrmdir ( diff -u --recursive --new-file v1.2.1/linux/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h --- v1.2.1/linux/include/asm-i386/pgtable.h Thu Mar 9 20:37:36 1995 +++ linux/include/asm-i386/pgtable.h Wed Mar 22 13:57:41 1995 @@ -146,7 +146,6 @@ extern inline void pmd_clear(pmd_t * pmdp) { pmd_val(*pmdp) = 0; } extern inline void pmd_reuse(pmd_t * pmdp) { } -#ifdef THREE_LEVEL /* * The "pgd_xxx()" functions here are trivial for a folded two-level * setup: the pgd is never bad, and a pmd always exists (as it's folded @@ -162,16 +161,6 @@ if (!(mem_map[MAP_NR(pgdp)] & MAP_PAGE_RESERVED)) mem_map[MAP_NR(pgdp)]++; } -#else -/* - * These are the old (and incorrect) ones needed for code that doesn't - * know about three-level yet.. - */ -extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); } -extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~PAGE_MASK) != _PAGE_TABLE || pgd_val(pgd) > high_memory; } -extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_PRESENT; } -extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; } -#endif /* * The following only work if pte_present() is true. @@ -212,21 +201,6 @@ extern inline unsigned long pmd_page(pmd_t pmd) { return pmd_val(pmd) & PAGE_MASK; } - -#ifndef THREE_LEVEL - -extern inline unsigned long pgd_page(pgd_t pgd) -{ return pgd_val(pgd) & PAGE_MASK; } - -extern inline void pgd_set(pgd_t * pgdp, pte_t * ptep) -{ pgd_val(*pgdp) = _PAGE_TABLE | (unsigned long) ptep; } - -#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address)) - -/* the no. of pointers that fit on a page: this will go away */ -#define PTRS_PER_PAGE (PAGE_SIZE/sizeof(void*)) - -#endif /* to find an entry in a page-table-directory */ extern inline pgd_t * pgd_offset(struct task_struct * tsk, unsigned long address) diff -u --recursive --new-file v1.2.1/linux/include/linux/aztcd.h linux/include/linux/aztcd.h --- v1.2.1/linux/include/linux/aztcd.h Fri Feb 3 15:15:09 1995 +++ linux/include/linux/aztcd.h Sun Mar 26 11:56:23 1995 @@ -1,4 +1,4 @@ -/* $Id: aztcd.h,v 0.90 1995/02/02 18:14:28 root Exp $ +/* $Id: aztcd.h,v 1.0 1995/03/25 08:27:19 root Exp $ * Definitions for a AztechCD268 CD-ROM interface * Copyright (C) 1994, 1995 Werner Zimmermann * @@ -25,6 +25,9 @@ /* *** change this to set the I/O port address */ #define AZT_BASE_ADDR 0x320 +/* Comment this out to prevent tray from locking */ +#define AZT_ALLOW_TRAY_LOCK 1 + /* use incompatible ioctls for reading in raw and cooked mode */ #define AZT_PRIVATE_IOCTLS @@ -72,6 +75,8 @@ #define ACMD_GET_Q_CHANNEL 0x50 /* read info from q channel */ #define ACMD_EJECT 0x60 /* eject/open tray */ #define ACMD_CLOSE 0x61 /* close tray */ +#define ACMD_LOCK 0x71 /* lock tray closed */ +#define ACMD_UNLOCK 0x72 /* unlock tray */ #define ACMD_PAUSE 0x80 /* pause */ #define ACMD_STOP 0x81 /* stop play */ #define ACMD_PLAY_AUDIO 0x90 /* play audio track */ diff -u --recursive --new-file v1.2.1/linux/include/linux/cyclades.h linux/include/linux/cyclades.h --- v1.2.1/linux/include/linux/cyclades.h Sat Mar 18 12:45:46 1995 +++ linux/include/linux/cyclades.h Fri Mar 24 17:18:01 1995 @@ -86,7 +86,7 @@ -#define CyMaxChipsPerCard 4 +#define CyMaxChipsPerCard 8 /**** CD1400 registers ****/ diff -u --recursive --new-file v1.2.1/linux/include/linux/ext2_fs.h linux/include/linux/ext2_fs.h --- v1.2.1/linux/include/linux/ext2_fs.h Thu Mar 9 20:37:36 1995 +++ linux/include/linux/ext2_fs.h Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/include/linux/ext2_fs.h * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * @@ -49,7 +50,7 @@ /* * The second extended file system version */ -#define EXT2FS_DATE "94/10/23" +#define EXT2FS_DATE "95/03/19" #define EXT2FS_VERSION "0.5a" /* diff -u --recursive --new-file v1.2.1/linux/include/linux/ext2_fs_i.h linux/include/linux/ext2_fs_i.h --- v1.2.1/linux/include/linux/ext2_fs_i.h Sun Feb 26 18:52:02 1995 +++ linux/include/linux/ext2_fs_i.h Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/include/linux/ext2_fs_i.h * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/include/linux/ext2_fs_sb.h linux/include/linux/ext2_fs_sb.h --- v1.2.1/linux/include/linux/ext2_fs_sb.h Fri Nov 4 12:38:45 1994 +++ linux/include/linux/ext2_fs_sb.h Wed Mar 22 10:33:59 1995 @@ -1,9 +1,10 @@ /* * linux/include/linux/ext2_fs_sb.h * - * Copyright (C) 1992, 1993, 1994 Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) * * from * diff -u --recursive --new-file v1.2.1/linux/include/linux/umsdos_fs.h linux/include/linux/umsdos_fs.h --- v1.2.1/linux/include/linux/umsdos_fs.h Wed Jan 25 09:25:39 1995 +++ linux/include/linux/umsdos_fs.h Wed Mar 22 10:31:43 1995 @@ -4,16 +4,19 @@ #define UMSDOS_VERSION 0 #define UMSDOS_RELEASE 4 -#ifndef LINUX_FS_H -#include -#endif - /* This is the file acting as a directory extension */ #define UMSDOS_EMD_FILE "--linux-.---" #define UMSDOS_EMD_NAMELEN 12 #define UMSDOS_PSDROOT_NAME "linux" #define UMSDOS_PSDROOT_LEN 5 +#ifndef _LINUX_TYPES_H +#include +#endif +#ifndef _LINUX_DIRENT_H +#include +#endif + struct umsdos_fake_info { char fname[13]; int len; @@ -81,7 +84,6 @@ #define UMSDOS_RENAME_DOS 1244 /* rename a file/directory in the DOS */ /* directory only */ - struct umsdos_ioctl{ struct dirent dos_dirent; struct umsdos_dirent umsdos_dirent; @@ -121,6 +123,10 @@ #define EDM_ENTRY_ISUSED(e) ((e)->name_len!=0) #ifdef __KERNEL__ + +#ifndef LINUX_FS_H +#include +#endif extern struct inode_operations umsdos_dir_inode_operations; extern struct file_operations umsdos_file_operations; diff -u --recursive --new-file v1.2.1/linux/include/linux/umsdos_fs.p linux/include/linux/umsdos_fs.p --- v1.2.1/linux/include/linux/umsdos_fs.p Mon Oct 24 07:51:44 1994 +++ linux/include/linux/umsdos_fs.p Wed Mar 22 10:31:43 1995 @@ -1,6 +1,6 @@ -/* check.c 20/07/94 10.08.36 */ +/* check.c 30/01/95 22.05.32 */ void check_page_tables (void); -/* dir.c 22/07/94 01.06.58 */ +/* dir.c 18/03/95 00.30.50 */ int UMSDOS_dir_read (struct inode *inode, struct file *filp, char *buf, @@ -19,7 +19,7 @@ int len, struct inode **result); int umsdos_hlink2inode (struct inode *hlink, struct inode **result); -/* emd.c 22/07/94 01.06.38 */ +/* emd.c 30/01/95 22.05.32 */ int umsdos_readdir_kmem (struct inode *inode, struct file *filp, struct dirent *dirent, @@ -57,8 +57,8 @@ int umsdos_findentry (struct inode *dir, struct umsdos_info *info, int expect); -/* file.c 20/07/94 10.08.36 */ -/* inode.c 20/07/94 10.08.36 */ +/* file.c 30/01/95 22.05.56 */ +/* inode.c 25/02/95 09.21.46 */ void UMSDOS_put_inode (struct inode *inode); void UMSDOS_put_super (struct super_block *sb); void UMSDOS_statfs (struct super_block *sb, struct statfs *buf); @@ -81,16 +81,16 @@ struct super_block *UMSDOS_read_super (struct super_block *s, void *data, int silent); -/* ioctl.c 20/07/94 10.08.36 */ +/* ioctl.c 21/02/95 20.58.22 */ int UMSDOS_ioctl_dir (struct inode *dir, struct file *filp, unsigned int cmd, unsigned long data); -/* mangle.c 20/07/94 10.08.36 */ +/* mangle.c 30/01/95 22.05.56 */ void umsdos_manglename (struct umsdos_info *info); int umsdos_evalrecsize (int len); int umsdos_parse (const char *fname, int len, struct umsdos_info *info); -/* namei.c 22/07/94 00.59.28 */ +/* namei.c 30/01/95 22.05.56 */ void umsdos_lockcreate (struct inode *dir); void umsdos_startlookup (struct inode *dir); void umsdos_unlockcreate (struct inode *dir); @@ -125,9 +125,14 @@ struct inode *new_dir, const char *new_name, int new_len); -/* rdir.c 20/07/94 10.08.38 */ +/* rdir.c 18/03/95 00.30.18 */ +int umsdos_rlookup_x (struct inode *dir, + const char *name, + int len, + struct inode **result, + int nopseudo); int UMSDOS_rlookup (struct inode *dir, const char *name, int len, struct inode **result); -/* symlink.c 22/07/94 00.59.10 */ +/* symlink.c 30/01/95 22.05.32 */ diff -u --recursive --new-file v1.2.1/linux/include/linux/umsdos_fs_i.h linux/include/linux/umsdos_fs_i.h --- v1.2.1/linux/include/linux/umsdos_fs_i.h Wed Aug 10 19:26:45 1994 +++ linux/include/linux/umsdos_fs_i.h Wed Mar 22 10:31:43 1995 @@ -68,73 +68,3 @@ }; #endif -#ifndef UMSDOS_FS_I_H -#define UMSDOS_FS_I_H - -#ifndef _LINUX_TYPES_H -#include -#endif -#include -#include - -/* #Specification: strategy / in memory inode - Here is the information specific to the inode of the UMSDOS file - system. This information is added to the end of the standard struct - inode. Each file system has its own extension to struct inode, - so do the umsdos file system. - - The strategy is to have the umsdos_inode_info as a superset of - the msdos_inode_info, since most of the time the job is done - by the msdos fs code. - - So we duplicate the msdos_inode_info, and add our own info at the - end. - - For all file type (and directory) the inode has a reference to: - the directory which hold this entry: i_dir_owner - The EMD file of i_dir_owner: i_emd_owner - The offset in this EMD file of the entry: pos - - For directory, we also have a reference to the inode of its - own EMD file. Also, we have dir_locking_info to help synchronise - file creation and file lookup. This data is sharing space with - the pipe_inode_info not used by directory. See also msdos_fs_i.h - for more information about pipe_inode_info and msdos_inode_info. - - Special file and fifo do have an inode which correspond to an - empty MSDOS file. - - symlink are processed mostly like regular file. The content is the - link. - - fifos add there own extension to the inode. I have reserved some - space for fifos side by side with msdos_inode_info. This is just - to for the show, because msdos_inode_info already include the - pipe_inode_info. - - The UMSDOS specific extension is placed after the union. -*/ -struct dir_locking_info { - struct wait_queue *p; - short int looking; /* How many process doing a lookup */ - short int creating; /* Is there any creation going on here */ - /* Only one at a time, although one */ - /* may recursively lock, so it is a counter */ - long pid; /* pid of the process owning the creation */ - /* lock */ -}; -struct umsdos_inode_info { - union { - struct msdos_inode_info msdos_info; - struct pipe_inode_info pipe_info; - struct dir_locking_info dir_info; - }u; /* Simply a filler, never referenced by fs/umsdos/... */ - unsigned long i_dir_owner; /* Inode of the dir which hold this */ - /* entry */ - unsigned long i_emd_owner; /* Inode of the EMD file of i_dir_owner */ - off_t pos; /* Entry offset in the emd_owner file */ - /* The rest is used only if this inode describe a directory */ - unsigned long i_emd_dir; /* Inode of the EMD file of this inode */ -}; - -#endif diff -u --recursive --new-file v1.2.1/linux/ipc/shm.c linux/ipc/shm.c --- v1.2.1/linux/ipc/shm.c Sat Feb 25 15:42:57 1995 +++ linux/ipc/shm.c Fri Mar 24 17:18:01 1995 @@ -661,7 +661,7 @@ } /* - * Goes through counter = (shm_rss << prio) present shm pages. + * Goes through counter = (shm_rss >> prio) present shm pages. */ static unsigned long swap_id = 0; /* currently being swapped */ static unsigned long swap_idx = 0; /* next to swap */ @@ -672,7 +672,8 @@ struct shmid_ds *shp; struct vm_area_struct *shmd; unsigned int swap_nr; - unsigned long id, idx, invalid = 0; + unsigned long id, idx; + int loop = 0, invalid = 0; int counter; counter = shm_rss >> prio; @@ -682,21 +683,22 @@ check_id: shp = shm_segs[swap_id]; if (shp == IPC_UNUSED || shp == IPC_NOID || shp->shm_perm.mode & SHM_LOCKED ) { + next_id: swap_idx = 0; - if (++swap_id > max_shmid) + if (++swap_id > max_shmid) { + if (loop) + goto failed; + loop = 1; swap_id = 0; + } goto check_id; } id = swap_id; check_table: idx = swap_idx++; - if (idx >= shp->shm_npages) { - swap_idx = 0; - if (++swap_id > max_shmid) - swap_id = 0; - goto check_id; - } + if (idx >= shp->shm_npages) + goto next_id; pte_val(page) = shp->shm_pages[idx]; if (!pte_present(page)) @@ -704,6 +706,7 @@ swap_attempts++; if (--counter < 0) { /* failed */ + failed: if (invalid) invalidate(); swap_free (swap_nr); diff -u --recursive --new-file v1.2.1/linux/ipc/util.c linux/ipc/util.c --- v1.2.1/linux/ipc/util.c Mon Jan 23 23:04:10 1995 +++ linux/ipc/util.c Fri Mar 24 17:18:00 1995 @@ -132,7 +132,9 @@ put_fs_long (raddr, (ulong *) third); return 0; } - case 1: + case 1: /* iBCS2 emulator entry point */ + if (get_fs() != get_ds()) + return -EINVAL; return sys_shmat (first, (char *) ptr, second, (ulong *) third); } case SHMDT: diff -u --recursive --new-file v1.2.1/linux/kernel/ksyms.c linux/kernel/ksyms.c --- v1.2.1/linux/kernel/ksyms.c Thu Feb 23 13:52:40 1995 +++ linux/kernel/ksyms.c Sun Mar 19 12:54:09 1995 @@ -62,6 +62,7 @@ #ifdef CONFIG_SCSI #include "../drivers/scsi/scsi.h" #include "../drivers/scsi/hosts.h" +#include "../drivers/scsi/constants.h" #endif extern int sys_tz; @@ -315,6 +316,7 @@ X(scsi_register), X(scsi_unregister), X(scsicam_bios_param), + X(print_command), #endif /* Added to make file system as module */ X(set_writetime), diff -u --recursive --new-file v1.2.1/linux/kernel/sched.c linux/kernel/sched.c --- v1.2.1/linux/kernel/sched.c Wed Feb 1 21:46:08 1995 +++ linux/kernel/sched.c Sun Mar 26 15:48:40 1995 @@ -426,9 +426,6 @@ static void second_overflow(void) { long ltemp; - /* last time the cmos clock got updated */ - static long last_rtc_update=0; - extern int set_rtc_mmss(unsigned long); /* Bump the maxerror field */ time_maxerror = (0x70000000-time_maxerror < time_tolerance) ? @@ -458,7 +455,7 @@ if (xtime.tv_sec % 86400 == 0) { xtime.tv_sec--; /* !! */ time_status = TIME_OOP; - printk("Clock: inserting leap second 23:59:60 GMT\n"); + printk("Clock: inserting leap second 23:59:60 UTC\n"); } break; @@ -467,7 +464,7 @@ if (xtime.tv_sec % 86400 == 86399) { xtime.tv_sec++; time_status = TIME_OK; - printk("Clock: deleting leap second 23:59:59 GMT\n"); + printk("Clock: deleting leap second 23:59:59 UTC\n"); } break; @@ -475,11 +472,6 @@ time_status = TIME_OK; break; } - if (time_status != TIME_BAD && xtime.tv_sec > last_rtc_update + 660) - if (set_rtc_mmss(xtime.tv_sec) == 0) - last_rtc_update = xtime.tv_sec; - else - last_rtc_update = xtime.tv_sec - 600; /* do it again in one min */ } /* @@ -537,6 +529,9 @@ { unsigned long mask; struct timer_struct *tp; + /* last time the cmos clock got updated */ + static long last_rtc_update=0; + extern int set_rtc_mmss(unsigned long); long ltemp, psecs; @@ -585,6 +580,18 @@ xtime.tv_sec++; second_overflow(); } + + /* If we have an externally synchronized Linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if (time_status != TIME_BAD && xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec > 500000 - (tick >> 1) && + xtime.tv_usec < 500000 + (tick >> 1)) + if (set_rtc_mmss(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ jiffies++; calc_load(); diff -u --recursive --new-file v1.2.1/linux/kernel/time.c linux/kernel/time.c --- v1.2.1/linux/kernel/time.c Wed Feb 1 09:19:36 1995 +++ linux/kernel/time.c Sun Mar 26 15:48:40 1995 @@ -10,12 +10,19 @@ /* * Modification history kernel/time.c * - * 02 Sep 93 Philip Gladstone + * 1993-09-02 Philip Gladstone * Created file with time related functions from sched.c and adjtimex() - * 08 Oct 93 Torsten Duwe + * 1993-10-08 Torsten Duwe * adjtime interface update and CMOS clock write code - * 02 Jul 94 Alan Modra + * 1994-07-02 Alan Modra * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime + * 1995-03-26 Markus Kuhn + * fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887 + * precision CMOS clock update + * + * to do: adjtimex() has to be updated to recent (1994-12-13) revision + * of David Mill's kernel clock model. For more information, check + * . */ #include @@ -31,16 +38,20 @@ #include #include -/* converts date to days since 1/1/1970 - * assumes year,mon,day in normal date format - * ie. 1/1/1970 => year=1970, mon=1, day=1 +/* Converts Gregorian date to seconds since 1970-01-01 00:00:00. + * Assumes input in normal date format, i.e. 1980-12-31 23:59:59 + * => year=1980, mon=12, day=31, hour=23, min=59, sec=59. * - * For the Julian calendar (which was used in Russia before 1917, + * [For the Julian calendar (which was used in Russia before 1917, * Britain & colonies before 1752, anywhere else before 1582, * and is still in use by some communities) leave out the - * -year/100+year/400 terms, and add 10. + * -year/100+year/400 terms, and add 10.] * * This algorithm was first published by Gauss (I think). + * + * WARNING: this function will overflow on 2106-02-07 06:28:16 on + * machines were long is 32-bit! (However, as time_t is signed, we + * will already get problems at other places on 2038-01-19 03:14:08) */ static inline unsigned long mktime(unsigned int year, unsigned int mon, unsigned int day, unsigned int hour, @@ -63,16 +74,16 @@ unsigned int year, mon, day, hour, min, sec; int i; - /* checking for Update-In-Progress could be done more elegantly - * (using the "update finished"-interrupt for example), but that - * would require excessive testing. promise I'll do that when I find - * the time. - Torsten + /* The Linux interpretation of the CMOS clock register contents: + * When the Update-In-Progress (UIP) flag goes from 1 to 0, the + * RTC registers show the second which has precisely just started. + * Let's hope other operating systems interpret the RTC the same way. */ /* read RTC exactly on falling edge of update flag */ for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */ if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP) break; - for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms*/ + for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */ if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) break; do { /* Isn't this overkill ? UIP above should guarantee consistency */ @@ -97,6 +108,7 @@ xtime.tv_sec = mktime(year, mon, day, hour, min, sec); xtime.tv_usec = 0; } + /* * The timezone where the local system is located. Used as a default by some * programs who obtain this value by using gettimeofday. @@ -146,25 +158,25 @@ * counter rather than 11932! This has an adverse impact on * do_gettimeoffset() -- it stops working! What is also not * good is that the interval that our timer function gets called - * is no longer 10.0002 msecs, but 9.9767 msec. To get around this + * is no longer 10.0002 ms, but 9.9767 ms. To get around this * would require using a different timing source. Maybe someone * could use the RTC - I know that this can interrupt at frequencies * ranging from 8192Hz to 2Hz. If I had the energy, I'd somehow fix * it so that at startup, the timer code in sched.c would select * using either the RTC or the 8253 timer. The decision would be * based on whether there was any other device around that needed - * to trample on the 8253. I'd set up the RTC to interrupt at 1024Hz, + * to trample on the 8253. I'd set up the RTC to interrupt at 1024 Hz, * and then do some jiggery to have a version of do_timer that - * advanced the clock by 1/1024 sec. Every time that reached over 1/100 + * advanced the clock by 1/1024 s. Every time that reached over 1/100 * of a second, then do all the old code. If the time was kept correct * then do_gettimeoffset could just return 0 - there is no low order * divider that can be accessed. * * Ideally, you would be able to use the RTC for the speaker driver, * but it appears that the speaker driver really needs interrupt more - * often than every 120us or so. + * often than every 120 us or so. * - * Anyway, this needs more thought.... pjsg (28 Aug 93) + * Anyway, this needs more thought.... pjsg (1993-08-28) * * If you are really that interested, you should be reading * comp.protocols.time.ntp! @@ -237,7 +249,7 @@ } /* - * Adjust the time obtained from the CMOS to be GMT time instead of + * Adjust the time obtained from the CMOS to be UTC time instead of * local time. * * This is ugly, but preferable to the alternatives. Otherwise we @@ -246,11 +258,11 @@ * hard to make the program warp the clock precisely n hours) or * compile in the timezone information into the kernel. Bad, bad.... * - * XXX Currently does not adjust for daylight savings time. May not - * need to do anything, depending on how smart (dumb?) the BIOS - * is. Blast it all.... the best thing to do not depend on the CMOS - * clock at all, but get the time via NTP or timed if you're on a - * network.... - TYT, 1/1/92 + * - TYT, 1992-01-01 + * + * The best thing to do is to keep the CMOS clock in universal time (UTC) + * as real UNIX machines always do it. This avoids all headaches about + * daylight saving times and warping kernel clocks. */ inline static void warp_clock(void) { @@ -260,12 +272,13 @@ } /* - * The first time we set the timezone, we will warp the clock so that - * it is ticking GMT time instead of local time. Presumably, - * if someone is setting the timezone then we are running in an - * environment where the programs understand about timezones. - * This should be done at boot time in the /etc/rc script, as - * soon as possible, so that the clock can be set right. Otherwise, + * In case for some reason the CMOS clock has not already been running + * in UTC, but in some local time: The first time we set the timezone, + * we will warp the clock so that it is ticking UTC time instead of + * local time. Presumably, if someone is setting the timezone then we + * are running in an environment where the programs understand about + * timezones. This should be done at boot time in the /etc/rc script, + * as soon as possible, so that the clock can be set right. Otherwise, * various programs will get confused when the clock gets warped. */ asmlinkage int sys_settimeofday(struct timeval *tv, struct timezone *tz) @@ -438,6 +451,13 @@ return time_status; } +/* + * In order to set the CMOS clock precisely, set_rtc_mmss has to be + * called 500 ms after the second nowtime has started, because when + * nowtime is written into the registers of the CMOS clock, it will + * jump to the next second precisely 500 ms later. Check the Motorola + * MC146818A or Dallas DS12887 data sheet for details. + */ int set_rtc_mmss(unsigned long nowtime) { int retval = 0; @@ -478,7 +498,15 @@ else retval = -1; - CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); + /* The following flags have to be released exactly in this order, + * otherwise the DS12887 (popular MC146818A clone with integrated + * battery and quartz) will not reset the oscillator and will not + * update precisely 500 ms later. You won't find this mentioned in + * the Dallas Semiconductor data sheets, but who believes data + * sheets anyway ... -- Markus Kuhn + */ CMOS_WRITE(save_control, RTC_CONTROL); + CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); + return retval; } diff -u --recursive --new-file v1.2.1/linux/mm/swap.c linux/mm/swap.c --- v1.2.1/linux/mm/swap.c Thu Mar 9 20:37:36 1995 +++ linux/mm/swap.c Fri Mar 24 17:18:01 1995 @@ -468,6 +468,11 @@ { unsigned long end; + /* Don't swap out areas like shared memory which have their + own separate swapping mechanism. */ + if (vma->vm_flags & VM_SHM) + return 0; + end = vma->vm_end; while (start < end) { int result = swap_out_pgd(vma, pgdir, start, end); diff -u --recursive --new-file v1.2.1/linux/net/inet/ipx.c linux/net/inet/ipx.c --- v1.2.1/linux/net/inet/ipx.c Sat Mar 18 12:45:46 1995 +++ linux/net/inet/ipx.c Wed Mar 22 10:34:00 1995 @@ -551,7 +551,8 @@ /* See if we should update our network number */ if ((intrfc->if_netnum == 0L) && - (ipx->ipx_source.net == ipx->ipx_dest.net)) { + (ipx->ipx_source.net == ipx->ipx_dest.net) && + (ipx->ipx_source.net != 0L)) { /* NB: NetWare servers lie about their hop count so we * dropped the test based on it. This is the best way * to determine this is a 0 hop count packet. diff -u --recursive --new-file v1.2.1/linux/net/inet/tcp.c linux/net/inet/tcp.c --- v1.2.1/linux/net/inet/tcp.c Thu Mar 9 20:37:37 1995 +++ linux/net/inet/tcp.c Wed Mar 22 10:34:00 1995 @@ -132,6 +132,9 @@ * Alan Cox : Fixed the closing state machine to * resemble the RFC. * Alan Cox : More 'per spec' fixes. + * Alan Cox : tcp_data() doesn't ack illegal PSH + * only frames. At least one pc tcp stack + * generates them. * * * To Fix: @@ -3810,7 +3813,7 @@ sk->bytes_rcv += skb->len; - if (skb->len == 0 && !th->fin && !th->urg && !th->psh) + if (skb->len == 0 && !th->fin) { /* * Don't want to keep passing ack's back and forth.