Linux Kernel %n linux %v 1.1.51 %c * %l * %b * %d * %f ftp.funet.fi:/pub/OS/Linux/PEOPLE/Linus/v1.1 %t linux-1.1.45.tar.gz %p46 patch46.gz %p47 patch47.gz %p48 patch48.gz %p49 patch49.gz %p50 patch50.gz %p51 patch51.gz %w kernel/v1.1 %% # Copyright 1994 Rickard E. Faith, Kevin E. Martin, and Doug L. Hoffman # All rights reserved. # See the BOGUS.LICENSE file for distribution restrictions. # Always build and install kernel in /usr/src cd /usr/src rm -rf $NAME tar xvzf $SRCTARDIR/$TARFILE cd $NAME zcat $SRCTARDIR/$PATCHFILE46 | patch -p1 -s zcat $SRCTARDIR/$PATCHFILE47 | patch -p1 -s zcat $SRCTARDIR/$PATCHFILE48 | patch -p1 -s zcat $SRCTARDIR/$PATCHFILE49 | patch -p1 -s zcat $SRCTARDIR/$PATCHFILE50 | patch -p1 -s zcat $SRCTARDIR/$PATCHFILE51 | patch -p1 -s find . -name '*.orig' | xargs rm patch -p1 -s << 'PATCH_EOF' && --- linux/include/linux/autoconf.h.KEM Wed Sep 28 21:30:04 1994 +++ linux/include/linux/autoconf.h Wed Sep 28 21:30:04 1994 @@ -0,0 +1,123 @@ +/* + * Automatically generated C config: don't edit + */ + +/* + * General setup + */ +#define CONFIG_MATH_EMULATION 1 +#define CONFIG_BLK_DEV_HD 1 +#undef CONFIG_BLK_DEV_XD +#define CONFIG_NET 1 +#undef CONFIG_MAX_16M +#define CONFIG_SYSVIPC 1 +#define CONFIG_M486 1 + +/* + * Networking options + */ +#define CONFIG_INET 1 +#undef CONFIG_IP_FORWARD + +/* + * (it is safe to leave these untouched) + */ +#undef CONFIG_INET_PCTCP +#undef CONFIG_INET_RARP +#define CONFIG_INET_SNARL 1 +#undef CONFIG_TCP_NAGLE_OFF +#undef CONFIG_IPX + +/* + * SCSI support + */ +#define CONFIG_SCSI 1 + +/* + * SCSI support type (disk, tape, CDrom) + */ +#define CONFIG_BLK_DEV_SD 1 +#define CONFIG_CHR_DEV_ST 1 +#define CONFIG_BLK_DEV_SR 1 +#define CONFIG_CHR_DEV_SG 1 + +/* + * SCSI low-level drivers + */ +#define CONFIG_SCSI_AHA152X 1 +#define CONFIG_SCSI_AHA1542 1 +#define CONFIG_SCSI_AHA1740 1 +#define CONFIG_SCSI_BUSLOGIC 1 +#define CONFIG_SCSI_FUTURE_DOMAIN 1 +#define CONFIG_SCSI_GENERIC_NCR5380 1 +#define CONFIG_SCSI_NCR53C7xx 1 +#define CONFIG_SCSI_PAS16 1 +#define CONFIG_SCSI_SEAGATE 1 +#define CONFIG_SCSI_T128 1 +#define CONFIG_SCSI_ULTRASTOR 1 +#define CONFIG_SCSI_7000FASST 1 + +/* + * Network device support + */ +#define CONFIG_NETDEVICES 1 +#define CONFIG_DUMMY 1 +#undef CONFIG_SLIP +#undef CONFIG_PPP +#undef CONFIG_PLIP +#undef CONFIG_SLAVE_BALANCING +#undef CONFIG_NET_ALPHA +#undef CONFIG_NET_VENDOR_SMC +#define CONFIG_NET_VENDOR_3COM 1 +#undef CONFIG_EL1 +#undef CONFIG_EL2 +#define CONFIG_EL3 1 +#undef CONFIG_NET_ISA +#undef CONFIG_NET_EISA +#undef CONFIG_APRICOT +#undef CONFIG_NET_POCKET + +/* + * CD-ROM drivers + */ +#undef CONFIG_CDU31A +#undef CONFIG_MCD +#undef CONFIG_SBPCD + +/* + * Filesystems + */ +#define CONFIG_MINIX_FS 1 +#undef CONFIG_EXT_FS +#define CONFIG_EXT2_FS 1 +#undef CONFIG_XIA_FS +#define CONFIG_MSDOS_FS 1 +#undef CONFIG_UMSDOS_FS +#define CONFIG_PROC_FS 1 +#define CONFIG_NFS_FS 1 +#define CONFIG_ISO9660_FS 1 +#undef CONFIG_HPFS_FS +#undef CONFIG_SYSV_FS + +/* + * character devices + */ +#undef CONFIG_PRINTER +#undef CONFIG_BUSMOUSE +#undef CONFIG_PSMOUSE +#undef CONFIG_MS_BUSMOUSE +#undef CONFIG_ATIXL_BUSMOUSE +#undef CONFIG_SELECTION +#undef CONFIG_QIC02_TAPE +#undef CONFIG_FTAPE + +/* + * Sound + */ +#undef CONFIG_SOUND + +/* + * Kernel hacking + */ +#undef CONFIG_PROFILE +#undef CONFIG_SCSI_CONSTANTS --- linux/drivers/block/ramdisk.c.KEM Wed Sep 28 21:12:14 1994 +++ linux/drivers/block/ramdisk.c Wed Sep 28 21:30:04 1994 @@ -5,6 +5,9 @@ * * Modifications by Fred N. van Kempen to allow for bootable root * disks (which are used in LINUX/Pro). Also some cleanups. 03/03/93 + * + * Modified by Curtis Janssen (cljanss@ca.sandia.gov) to make the size + * of minix filesystems loaded into the ramdisk as big as possible. 1994/01/17 */ @@ -102,6 +105,7 @@ int i = 1; int nblocks; char *cp; + int nrdblocks = rd_length >> BLOCK_SIZE_BITS; /* * Check for a super block on the diskette. @@ -130,9 +134,9 @@ continue; } - if (nblocks > (rd_length >> BLOCK_SIZE_BITS)) { + if (nblocks > nrdblocks) { printk("RAMDISK: image too big! (%d/%d blocks)\n", - nblocks, rd_length >> BLOCK_SIZE_BITS); + nblocks, nrdblocks); return; } printk("RAMDISK: Loading %d blocks into RAM disk", nblocks); @@ -156,7 +160,42 @@ block++; i++; } - printk("\ndone\n"); + printk("\n"); + /* + * If there is leftover ram disk space and the filesystem is + * minix then modify the filesystem to be a bit bigger. + */ + nblocks = s.s_nzones << s.s_log_zone_size; + if (nrdblocks > nblocks) { + struct minix_super_block *sb + = (struct minix_super_block *)&rd_start[BLOCK_SIZE]; + printk("RAMDISK: have %d extra blocks\n",nrdblocks-nblocks); + if (sb->s_magic != MINIX_SUPER_MAGIC + && sb->s_magic != MINIX_SUPER_MAGIC2) { + printk("RAMDISK: couldn't find minix superblock in ramdisk\n"); + } + else { + char *zmap = &rd_start[BLOCK_SIZE*(1+1+sb->s_imap_blocks)]; + int nzones = sb->s_nzones; + int new_nzones = nrdblocks >> sb->s_log_zone_size; + int firstdatazone = sb->s_firstdatazone; + + if (new_nzones > sb->s_zmap_blocks*BLOCK_SIZE*8) + new_nzones = sb->s_zmap_blocks*BLOCK_SIZE*8; + printk("RAMDISK: increasing nzones: %d->%d\n", + nzones, new_nzones); + sb->s_nzones = new_nzones; + + /* + * Clear the zone map's bits for the new zones. + */ + for (i=nzones; i>3] &= 0xff - (1<<(zonenumber&7)); + } + } + } + printk("RAMDISK: done\n"); /* We loaded the file system image. Prepare for mounting it. */ ROOT_DEV = ((MEM_MAJOR << 8) | RAMDISK_MINOR); --- linux/.config.KEM Wed Sep 28 21:30:04 1994 +++ linux/.config Wed Sep 28 21:30:04 1994 @@ -0,0 +1,123 @@ +# +# Automatically generated make config: don't edit +# + +# +# General setup +# + CONFIG_MATH_EMULATION = CONFIG_MATH_EMULATION + CONFIG_BLK_DEV_HD = CONFIG_BLK_DEV_HD +# CONFIG_BLK_DEV_XD is not set + CONFIG_NET = CONFIG_NET +# CONFIG_MAX_16M is not set + CONFIG_SYSVIPC = CONFIG_SYSVIPC + CONFIG_M486 = CONFIG_M486 + +# +# Networking options +# + CONFIG_INET = CONFIG_INET +# CONFIG_IP_FORWARD is not set + +# +# (it is safe to leave these untouched) +# +# CONFIG_INET_PCTCP is not set +# CONFIG_INET_RARP is not set + CONFIG_INET_SNARL = CONFIG_INET_SNARL +# CONFIG_TCP_NAGLE_OFF is not set +# CONFIG_IPX is not set + +# +# SCSI support +# + CONFIG_SCSI = CONFIG_SCSI + +# +# SCSI support type (disk, tape, CDrom) +# + CONFIG_BLK_DEV_SD = CONFIG_BLK_DEV_SD + CONFIG_CHR_DEV_ST = CONFIG_CHR_DEV_ST + CONFIG_BLK_DEV_SR = CONFIG_BLK_DEV_SR + CONFIG_CHR_DEV_SG = CONFIG_CHR_DEV_SG + +# +# SCSI low-level drivers +# + CONFIG_SCSI_AHA152X = CONFIG_SCSI_AHA152X + CONFIG_SCSI_AHA1542 = CONFIG_SCSI_AHA1542 + CONFIG_SCSI_AHA1740 = CONFIG_SCSI_AHA1740 + CONFIG_SCSI_BUSLOGIC = CONFIG_SCSI_BUSLOGIC + CONFIG_SCSI_FUTURE_DOMAIN = CONFIG_SCSI_FUTURE_DOMAIN + CONFIG_SCSI_GENERIC_NCR5380 = CONFIG_SCSI_GENERIC_NCR5380 + CONFIG_SCSI_NCR53C7xx = CONFIG_SCSI_NCR53C7xx + CONFIG_SCSI_PAS16 = CONFIG_SCSI_PAS16 + CONFIG_SCSI_SEAGATE = CONFIG_SCSI_SEAGATE + CONFIG_SCSI_T128 = CONFIG_SCSI_T128 + CONFIG_SCSI_ULTRASTOR = CONFIG_SCSI_ULTRASTOR + CONFIG_SCSI_7000FASST = CONFIG_SCSI_7000FASST + +# +# Network device support +# + CONFIG_NETDEVICES = CONFIG_NETDEVICES + CONFIG_DUMMY = CONFIG_DUMMY +# CONFIG_SLIP is not set +# CONFIG_PPP is not set +# CONFIG_PLIP is not set +# CONFIG_SLAVE_BALANCING is not set +# CONFIG_NET_ALPHA is not set +# CONFIG_NET_VENDOR_SMC is not set + CONFIG_NET_VENDOR_3COM = CONFIG_NET_VENDOR_3COM +# CONFIG_EL1 is not set +# CONFIG_EL2 is not set + CONFIG_EL3 = CONFIG_EL3 +# CONFIG_NET_ISA is not set +# CONFIG_NET_EISA is not set +# CONFIG_APRICOT is not set +# CONFIG_NET_POCKET is not set + +# +# CD-ROM drivers +# +# CONFIG_CDU31A is not set +# CONFIG_MCD is not set +# CONFIG_SBPCD is not set + +# +# Filesystems +# + CONFIG_MINIX_FS = CONFIG_MINIX_FS +# CONFIG_EXT_FS is not set + CONFIG_EXT2_FS = CONFIG_EXT2_FS +# CONFIG_XIA_FS is not set + CONFIG_MSDOS_FS = CONFIG_MSDOS_FS +# CONFIG_UMSDOS_FS is not set + CONFIG_PROC_FS = CONFIG_PROC_FS + CONFIG_NFS_FS = CONFIG_NFS_FS + CONFIG_ISO9660_FS = CONFIG_ISO9660_FS +# CONFIG_HPFS_FS is not set +# CONFIG_SYSV_FS is not set + +# +# character devices +# +# CONFIG_PRINTER is not set +# CONFIG_BUSMOUSE is not set +# CONFIG_PSMOUSE is not set +# CONFIG_MS_BUSMOUSE is not set +# CONFIG_ATIXL_BUSMOUSE is not set +# CONFIG_SELECTION is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_FTAPE is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Kernel hacking +# +# CONFIG_PROFILE is not set +# CONFIG_SCSI_CONSTANTS is not set --- linux/config.in.KEM Wed Sep 28 21:30:04 1994 +++ linux/config.in Wed Sep 28 21:30:04 1994 @@ -0,0 +1,207 @@ +# +# For a description of the syntax of this configuration file, +# see the Configure script. +# + +comment 'General setup' + +bool 'Kernel math emulation' CONFIG_MATH_EMULATION y +bool 'Normal harddisk support' CONFIG_BLK_DEV_HD y +bool 'XT harddisk support' CONFIG_BLK_DEV_XD n +bool 'Networking support' CONFIG_NET y +bool 'Limit memory to low 16MB' CONFIG_MAX_16M n +bool 'System V IPC' CONFIG_SYSVIPC y +bool 'Use -m486 flag for 486-specific optimizations' CONFIG_M486 y + +if [ "$CONFIG_NET" = "y" ]; then +comment 'Networking options' +bool 'TCP/IP networking' CONFIG_INET y +if [ "$CONFIG_INET" "=" "y" ]; then +bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n +comment '(it is safe to leave these untouched)' +bool 'PC/TCP compatibility mode' CONFIG_INET_PCTCP n +bool 'Reverse ARP' CONFIG_INET_RARP n +bool 'Assume subnets are local' CONFIG_INET_SNARL y +bool 'Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n +fi +bool 'The IPX protocol' CONFIG_IPX n +#bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n +fi + +comment 'SCSI support' + +bool 'SCSI support?' CONFIG_SCSI y + +if [ "$CONFIG_SCSI" = "n" ]; then + +comment 'Skipping SCSI configuration options...' + +else + +comment 'SCSI support type (disk, tape, CDrom)' + +bool 'Scsi disk support' CONFIG_BLK_DEV_SD y +bool 'Scsi tape support' CONFIG_CHR_DEV_ST y +bool 'Scsi CDROM support' CONFIG_BLK_DEV_SR y +bool 'Scsi generic support' CONFIG_CHR_DEV_SG y + +comment 'SCSI low-level drivers' + +bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y +bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 y +bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 y +bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC y +bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN y +bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 y +bool 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx y +#bool 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 n +bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 y +bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE y +bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 y +bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR y +bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST y +#bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n +fi + + +if [ "$CONFIG_NET" = "y" ]; then + +comment 'Network device support' + +bool 'Network device support?' CONFIG_NETDEVICES y +if [ "$CONFIG_NETDEVICES" = "n" ]; then + +comment 'Skipping network driver configuration options...' + +else +bool 'Dummy net driver support' CONFIG_DUMMY y +bool 'SLIP (serial line) support' CONFIG_SLIP n +if [ "$CONFIG_SLIP" = "y" ]; then + bool ' CSLIP compressed headers' SL_COMPRESSED y +# bool ' SLIP debugging on' SL_DUMP y +fi +bool 'PPP (point-to-point) support' CONFIG_PPP n +bool 'PLIP (parallel port) support' CONFIG_PLIP n +bool 'Load balancing support (experimental)' CONFIG_SLAVE_BALANCING n +bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n +bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n +if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then + bool 'WD80*3 support' CONFIG_WD80x3 n + bool 'SMC Ultra support' CONFIG_ULTRA n +fi +bool '3COM cards' CONFIG_NET_VENDOR_3COM y +if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then + bool '3c501 support' CONFIG_EL1 n + bool '3c503 support' CONFIG_EL2 n + if [ "$CONFIG_NET_ALPHA" = "y" ]; then + bool '3c505 support' CONFIG_ELPLUS n + bool '3c507 support' CONFIG_EL16 n + fi + bool '3c509/3c579 support' CONFIG_EL3 y +fi +bool 'Other ISA cards' CONFIG_NET_ISA n +if [ "$CONFIG_NET_ISA" = "y" ]; then + bool 'AT1500 and NE2100 (LANCE and PCnet-ISA) support' CONFIG_LANCE n + bool 'Cabletron E21xx support (not recommended)' CONFIG_E2100 n + bool 'DEPCA support' CONFIG_DEPCA n + if [ "$CONFIG_NET_ALPHA" = "y" ]; then + bool 'EtherExpress support' CONFIG_EEXPRESS n + bool 'AT1700 support' CONFIG_AT1700 n + bool 'NI5210 support' CONFIG_NI52 n + bool 'NI6510 support' CONFIG_NI65 n + fi + bool 'HP PCLAN support' CONFIG_HPLAN n + bool 'NE2000/NE1000 support' CONFIG_NE2000 y + bool 'SK_G16 support' CONFIG_SK_G16 n +fi +bool 'EISA and on board controllers' CONFIG_NET_EISA n + if [ "$CONFIG_NET_ALPHA" = "y" ]; then + bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n + fi + bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n +bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n +if [ "$CONFIG_NET_POCKET" = "y" ]; then + bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n + bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n + bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n + bool 'Zenith Z-Note support' CONFIG_ZNET n +fi +fi +fi + +comment 'CD-ROM drivers' + +bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n +bool 'Mitsumi CDROM driver support' CONFIG_MCD n +bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n +if [ "$CONFIG_SBPCD" = "y" ]; then + bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n + if [ "$CONFIG_SBPCD2" = "y" ]; then + bool 'Matsushita/Panasonic third CDROM controller support' CONFIG_SBPCD3 n + if [ "$CONFIG_SBPCD3" = "y" ]; then + bool 'Matsushita/Panasonic fourth CDROM controller support' CONFIG_SBPCD4 n + fi + fi +fi + +comment 'Filesystems' + +bool 'Standard (minix) fs support' CONFIG_MINIX_FS y +bool 'Extended fs support' CONFIG_EXT_FS n +bool 'Second extended fs support' CONFIG_EXT2_FS y +bool 'xiafs filesystem support' CONFIG_XIA_FS n +bool 'msdos fs support' CONFIG_MSDOS_FS y +if [ "$CONFIG_MSDOS_FS" = "y" ]; then +bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n +fi +bool '/proc filesystem support' CONFIG_PROC_FS y +if [ "$CONFIG_INET" = "y" ]; then +bool 'NFS filesystem support' CONFIG_NFS_FS y +fi +bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y +bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n +bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n + +comment 'character devices' + +bool 'Parallel printer support' CONFIG_PRINTER n +bool 'Logitech busmouse support' CONFIG_BUSMOUSE n +bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE n +if [ "$CONFIG_PSMOUSE" = "y" ]; then +bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y +fi +bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n +bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n +bool 'Selection (cut and paste for virtual consoles)' CONFIG_SELECTION n + +bool 'QIC-02 tape support' CONFIG_QIC02_TAPE n +if [ "$CONFIG_QIC02_TAPE" = "y" ]; then +bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y +if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then + +comment '>>> Edit configuration parameters in ./include/linux/tpqic02.h!' + +else + +comment '>>> Setting runtime QIC-02 configuration is done with qic02conf' +comment '>>> Which is available from ftp://ftp.funet.fi/pub/OS/Linux/BETA/QIC-02/' + +fi +fi + +bool 'QIC-117 tape support' CONFIG_FTAPE n +if [ "$CONFIG_FTAPE" = "y" ]; then +int ' number of ftape buffers' NR_FTAPE_BUFFERS 3 +fi + +comment 'Sound' + +bool 'Sound card support' CONFIG_SOUND n + +comment 'Kernel hacking' + +#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n +bool 'Kernel profiling support' CONFIG_PROFILE n +if [ "$CONFIG_SCSI" = "y" ]; then +bool 'Verbose scsi error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS n +fi --- linux-1.1.51/drivers/block/floppy.c Sun Sep 18 11:41:35 1994 +++ linux/drivers/block/floppy.c Sun Oct 2 15:17:57 1994 @@ -295,12 +295,12 @@ { 2988,18,2,83,0,0x25,0x00,0xDF,0x02,"h1494" }, /* 18 1.49MB 5.25" */ { 3486,21,2,83,0,0x25,0x00,0xDF,0x0C,"H1743" }, /* 19 1.74 MB 3.5" */ - { 1760,11,2,80,0,0x1C,0x09,0xCF,0x6C,"d880" }, /* 20 880KB 5.25" */ + { 1760,11,2,80,0,0x1C,0x09,0xCF,0x6C,"h880" }, /* 20 880KB 5.25" */ { 2080,13,2,80,0,0x1C,0x01,0xCF,0x6C,"D1040" }, /* 21 1.04MB 3.5" */ { 2240,14,2,80,0,0x1C,0x19,0xCF,0x6C,"D1120" }, /* 22 1.12MB 3.5" */ { 3200,20,2,80,0,0x1C,0x20,0xCF,0x6C,"h1600" }, /* 23 1.6MB 5.25" */ { 3520,22,2,80,0,0x1C,0x08,0xCF,0x6C,"H1760" }, /* 24 1.76MB 3.5" */ - { 3840,24,2,80,0,0x1C,0x18,0xCF,0x6C,"H1920" }, /* 25 1.92MB 3.5" */ + { 3840,24,2,80,0,0x1C,0x20,0xCF,0x6C,"H1920" }, /* 25 1.92MB 3.5" */ { 6400,40,2,80,0,0x25,0x5B,0xCF,0x6C,"E3200" }, /* 26 3.20MB 3.5" */ { 7040,44,2,80,0,0x25,0x5B,0xCF,0x6C,"E3520" }, /* 27 3.52MB 3.5" */ { 7680,48,2,80,0,0x25,0x63,0xCF,0x6C,"E3840" }, /* 28 3.84MB 3.5" */ @@ -458,7 +458,7 @@ static int set_dor(int fdc, char mask, char data) { register unsigned char drive, unit, newdor,olddor; - + cli(); olddor = FDCS->dor; newdor = (olddor & mask) | data; if ( newdor != olddor ){ @@ -473,13 +473,16 @@ FDCS->dor = newdor; outb_p( newdor, FD_DOR); } + sti(); return olddor; } static void twaddle(void) { + cli(); outb_p(FDCS->dor & ~(0x10<dor, FD_DOR); + sti(); } /* reset all driver information about the current fdc. This is needed after @@ -621,6 +624,7 @@ * transfer */ static void fd_watchdog(void) { + cli(); if ( inb_p( FD_DIR ) & 0x80 ){ changed_floppies |= ( 1 << current_drive); floppy_shutdown(); @@ -629,6 +633,7 @@ fd_timer.function = (timeout_fn) fd_watchdog; fd_timer.expires = 10; add_timer(&fd_timer); + sti(); } } @@ -1214,7 +1219,6 @@ if ( initialising ) return; printk(DEVICE_NAME ": unexpected interrupt\n"); - inr = result(); if ( inr >= 0 ) for(i=0; ireset = 1; } -static void floppy_bh(void (*handler)(void)) -{ - inr = result(); - if ( inr == 0 ){ - do { - output_byte(FD_SENSEI); - inr = result(); - } while ( (ST0 & 0x83) != UNIT(current_drive) && inr == 2); - } - handler(); -} - struct tq_struct floppy_tq = -{ 0, 0, (void *) (void *) floppy_bh, 0 }; +{ 0, 0, (void *) (void *) unexpected_floppy_interrupt, 0 }; /* interrupt handler */ static void floppy_interrupt(int unused) @@ -1255,12 +1247,19 @@ printk("floppy interrupt on bizarre fdc\n"); return; } - if (!handler) + inr = result(); + if (!handler){ unexpected_floppy_interrupt(); - else { - floppy_tq.data = (void *) handler; - queue_task_irq(&floppy_tq, &tq_timer); + return; + } + if ( inr == 0 ){ + do { + output_byte(FD_SENSEI); + inr = result(); + } while ( (ST0 & 0x83) != UNIT(current_drive) && inr == 2); } + floppy_tq.routine = (void *)(void *) handler; + queue_task_irq(&floppy_tq, &tq_timer); } static void recalibrate_floppy(void) @@ -1300,9 +1299,11 @@ if ( FDCS->version >= FDC_82077 ) outb_p(0x80 | ( FDCS->dtr &3), FD_STATUS); else { + cli(); outb_p(FDCS->dor & ~0x04, FD_DOR); udelay(FD_RESET_DELAY); outb(FDCS->dor, FD_DOR); + sti(); } } @@ -1312,9 +1313,11 @@ static void floppy_shutdown(void) { + cli(); del_timer( &fd_timer); CLEAR_INTR; - floppy_tq.data = (void *) empty; + floppy_tq.routine = (void *) empty; + sti(); if ( !initialising ) printk(DEVICE_NAME ": timeout\n"); FDCS->reset = 1; @@ -1452,11 +1455,16 @@ { int ret; + cli(); while(command_status < 2) if (current->pid) sleep_on( & command_done ); - else + else { + sti(); run_task_queue(&tq_timer); + cli(); + } + sti(); if ( FDCS->reset ) command_status = FD_COMMAND_ERROR; if ( command_status == FD_COMMAND_OKAY ) @@ -2713,8 +2721,11 @@ { int drive= DRIVE(inode->i_rdev); - if(filp->f_mode & 2) + if(!filp || (filp->f_mode & 2)) { fsync_dev(inode->i_rdev); + lock_fdc(-1); + unlock_fdc(); + } if ( UDRS->fd_ref < 0) UDRS->fd_ref=0; else if (!UDRS->fd_ref--) { @@ -2827,8 +2838,10 @@ UDRS->maxtrack = 0; if ( buffer_drive == drive ) buffer_track = -1; + cli(); fake_change &= ~mask; changed_floppies &= ~mask; + sti(); return 1; } PATCH_EOF make symlinks make depend make clean make zImage %doc CHANGES COPYING CREDITS MAGIC README * echo 'To install the kernel:' * echo ' 1. cat /usr/src/linux/zImage > /["kernel name"]' * echo ' 2. [Add "kernel name" to /etc/lilo.conf]' * echo ' 3. Run /sbin/lilo' %i echo 'To install the kernel:' %i echo ' 1. cat /usr/src/linux/zImage > /["kernel name"]' %i echo ' 2. [Add "kernel name" to /etc/lilo.conf]' %i echo ' 3. Run /sbin/lilo' exit %% * usr/src/linux