diff -u --recursive --new-file v1.0.5/linux/Makefile linux/Makefile --- v1.0.5/linux/Makefile Sun Apr 3 14:58:21 1994 +++ linux/Makefile Sun Apr 3 14:43:03 1994 @@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 0 -SUBLEVEL = 5 +SUBLEVEL = 6 all: Version zImage diff -u --recursive --new-file v1.0.5/linux/drivers/block/blk.h linux/drivers/block/blk.h --- v1.0.5/linux/drivers/block/blk.h Sat Jan 29 14:55:06 1994 +++ linux/drivers/block/blk.h Sat Apr 2 20:03:32 1994 @@ -42,9 +42,12 @@ * This is used in the elevator algorithm: Note that * reads always go before writes. This is natural: reads * are much more time-critical than writes. + * + * Update: trying with writes being preferred due to test + * by Alessandro Rubini.. */ #define IN_ORDER(s1,s2) \ -((s1)->cmd < (s2)->cmd || ((s1)->cmd == (s2)->cmd && \ +((s1)->cmd > (s2)->cmd || ((s1)->cmd == (s2)->cmd && \ ((s1)->dev < (s2)->dev || (((s1)->dev == (s2)->dev && \ (s1)->sector < (s2)->sector))))) diff -u --recursive --new-file v1.0.5/linux/drivers/net/3c509.c linux/drivers/net/3c509.c --- v1.0.5/linux/drivers/net/3c509.c Mon Mar 14 11:30:53 1994 +++ linux/drivers/net/3c509.c Thu Mar 31 09:40:04 1994 @@ -95,17 +95,20 @@ /* First check for a board on the EISA bus. */ if (EISA_bus) { for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) { - if (inw(ioaddr) != 0x6d50) + /* Check the standard EISA ID register for an encoded '3Com'. */ + if (inw(ioaddr + 0xC80) != 0x6d50) continue; + /* Change the register set to the configuration window 0. */ + outw(0x0800, ioaddr + 0xC80 + EL3_CMD); + irq = inw(ioaddr + 8) >> 12; if_port = inw(ioaddr + 6)>>14; for (i = 0; i < 3; i++) phys_addr[i] = htons(read_eeprom(ioaddr, i)); - /* Restore the "Manufacturer ID" to the EEPROM read register. */ - /* The manual says to restore "Product ID" (reg. 3). !???! */ - read_eeprom(ioaddr, 7); + /* Restore the "Product ID" to the EEPROM read register. */ + read_eeprom(ioaddr, 3); /* Was the EISA code an add-on hack? Nahhhhh... */ goto found; diff -u --recursive --new-file v1.0.5/linux/drivers/scsi/wd7000.c linux/drivers/scsi/wd7000.c --- v1.0.5/linux/drivers/scsi/wd7000.c Thu Jan 27 15:42:03 1994 +++ linux/drivers/scsi/wd7000.c Thu Mar 31 11:44:57 1994 @@ -120,13 +120,27 @@ static inline int command_out(unchar *cmdp, int len) { + if(len == 1) { + while(1==1){ + WAIT(ASC_STAT, STATMASK, CMD_RDY, 0); + cli(); + if(!(inb(ASC_STAT) & CMD_RDY)) {sti(); continue;} + outb(*cmdp, COMMAND); + sti(); + return 1; + } + } else { + cli(); while (len--) { - WAIT(ASC_STAT, STATMASK, CMD_RDY, 0); - outb(*cmdp++, COMMAND); + WAIT(ASC_STAT, STATMASK, CMD_RDY, 0); + outb(*cmdp++, COMMAND); } + sti(); + } return 1; fail: + sti(); printk("wd7000_out WAIT failed(%d): ", len+1); return 0; } @@ -189,6 +203,7 @@ */ { int i, ogmb; + unsigned char start_cmd; unsigned long flags; DEB(printk("wd7000_scb_out: %06x");) @@ -217,10 +232,11 @@ return 0; } + start_cmd = START_OGMB | ogmb; + wd7000_enable_intr(); do { - WAIT(ASC_STAT,STATMASK,CMD_RDY,0); - outb(START_OGMB|ogmb, COMMAND); + command_out(&start_cmd, 1); WAIT(ASC_STAT,STATMASK,CMD_RDY,0); } while (inb(ASC_STAT) & CMD_REJ); diff -u --recursive --new-file v1.0.5/linux/fs/ext2/file.c linux/fs/ext2/file.c --- v1.0.5/linux/fs/ext2/file.c Sun Jan 9 16:47:21 1994 +++ linux/fs/ext2/file.c Thu Mar 31 10:26:28 1994 @@ -241,10 +241,7 @@ inode->i_mode); return -EINVAL; } -/* - * ok, append may not work when many processes are writing at the same time - * but so what. That way leads to madness anyway. - */ + down(&inode->i_sem); if (filp->f_flags & O_APPEND) pos = inode->i_size; else @@ -283,6 +280,7 @@ bh->b_dirt = 1; brelse (bh); } + up(&inode->i_sem); inode->i_ctime = inode->i_mtime = CURRENT_TIME; filp->f_pos = pos; inode->i_dirt = 1; diff -u --recursive --new-file v1.0.5/linux/fs/ext2/truncate.c linux/fs/ext2/truncate.c --- v1.0.5/linux/fs/ext2/truncate.c Tue Feb 22 08:15:49 1994 +++ linux/fs/ext2/truncate.c Thu Mar 31 10:27:50 1994 @@ -335,6 +335,7 @@ return; ext2_discard_prealloc(inode); while (1) { + down(&inode->i_sem); retry = trunc_direct(inode); retry |= trunc_indirect (inode, EXT2_IND_BLOCK, (unsigned long *) &inode->u.ext2_i.i_data[EXT2_IND_BLOCK]); @@ -342,6 +343,7 @@ EXT2_ADDR_PER_BLOCK(inode->i_sb), (unsigned long *) &inode->u.ext2_i.i_data[EXT2_DIND_BLOCK]); retry |= trunc_tindirect (inode); + up(&inode->i_sem); if (!retry) break; if (IS_SYNC(inode) && inode->i_dirt) diff -u --recursive --new-file v1.0.5/linux/fs/proc/array.c linux/fs/proc/array.c --- v1.0.5/linux/fs/proc/array.c Sun Apr 3 14:58:23 1994 +++ linux/fs/proc/array.c Thu Mar 31 12:56:13 1994 @@ -4,7 +4,15 @@ * Copyright (C) 1992 by Linus Torvalds * based on ideas by Darren Senn * - * stat,statm extensions by Michael K. Johnson, johnsonm@stolaf.edu + * Fixes: + * Michael. K. Johnson: stat,statm extensions. + * + * + * Pauline Middelink : Made cmdline,envline only break at '\0's, to + * make sure SET_PROCTITLE works. Also removed + * bad '!' which forced addres recalculation for + * EVERY character on the current page. + * */ #include @@ -98,7 +106,7 @@ "disk %u %u %u %u\n" "page %u %u\n" "swap %u %u\n" - "%u", + "intr %u", kstat.cpu_user, kstat.cpu_nice, kstat.cpu_system, @@ -177,12 +185,12 @@ if (!p || !*p || ptr >= TASK_SIZE) return 0; page = *PAGE_DIR_OFFSET((*p)->tss.cr3,ptr); - if (!(page & 1)) + if (!(page & PAGE_PRESENT)) return 0; page &= PAGE_MASK; page += PAGE_PTR(ptr); page = *(unsigned long *) page; - if (!(page & 1)) + if (!(page & PAGE_PRESENT)) return 0; page &= PAGE_MASK; page += ptr & ~PAGE_MASK; @@ -200,7 +208,7 @@ for (;;) { addr = get_phys_addr(p, start); if (!addr) - return result; + goto ready; do { c = *(char *) addr; if (!c) @@ -208,13 +216,18 @@ if (size < PAGE_SIZE) buffer[size++] = c; else - return result; + goto ready; addr++; start++; - if (start >= end) - return result; - } while (!(addr & ~PAGE_MASK)); + if (!c && start >= end) + goto ready; + } while (addr & ~PAGE_MASK); } +ready: + /* remove the trailing blanks, used to fillout argv,envp space */ + while (result>0 && buffer[result-1]==' ') + result--; + return result; } static int get_env(int pid, char * buffer) diff -u --recursive --new-file v1.0.5/linux/include/linux/sched.h linux/include/linux/sched.h --- v1.0.5/linux/include/linux/sched.h Fri Mar 4 14:13:32 1994 +++ linux/include/linux/sched.h Wed Mar 30 08:42:03 1994 @@ -21,6 +21,8 @@ extern int ignore_irq13; extern int wp_works_ok; +extern unsigned long intr_count; + /* * Bus types (default is ISA, but people can check others with these..) * MCA_bus hardcoded to 0 for now. diff -u --recursive --new-file v1.0.5/linux/include/linux/sockios.h linux/include/linux/sockios.h --- v1.0.5/linux/include/linux/sockios.h Sun Feb 13 16:44:20 1994 +++ linux/include/linux/sockios.h Sat Apr 2 20:05:43 1994 @@ -28,7 +28,7 @@ unsigned long paddr; unsigned long router; unsigned long net; - unsigned long up:1,destroy:1; + unsigned up:1,destroy:1; }; #endif /* FIXME: */ diff -u --recursive --new-file v1.0.5/linux/kernel/exit.c linux/kernel/exit.c --- v1.0.5/linux/kernel/exit.c Mon Mar 21 16:36:22 1994 +++ linux/kernel/exit.c Wed Mar 30 08:43:58 1994 @@ -355,6 +355,10 @@ struct task_struct *p; int i; + if (intr_count) { + printk("Aiee, killing interrupt handler\n"); + intr_count = 0; + } fake_volatile: if (current->semun) sem_exit(); diff -u --recursive --new-file v1.0.5/linux/kernel/sched.c linux/kernel/sched.c --- v1.0.5/linux/kernel/sched.c Mon Mar 21 20:42:10 1994 +++ linux/kernel/sched.c Wed Mar 30 08:45:59 1994 @@ -217,6 +217,10 @@ /* check alarm, wake up any interruptible tasks that have got a signal */ + if (intr_count) { + printk("Aiee: scheduling in interrupt\n"); + intr_count = 0; + } cli(); ticks = itimer_ticks; itimer_ticks = 0; diff -u --recursive --new-file v1.0.5/linux/mm/kmalloc.c linux/mm/kmalloc.c --- v1.0.5/linux/mm/kmalloc.c Mon Mar 21 16:36:23 1994 +++ linux/mm/kmalloc.c Wed Mar 30 08:42:34 1994 @@ -151,7 +151,6 @@ int order,tries,i,sz; struct block_header *p; struct page_descriptor *page; - extern unsigned long intr_count; /* Sanity check... */ if (intr_count && priority != GFP_ATOMIC) { diff -u --recursive --new-file v1.0.5/linux/mm/swap.c linux/mm/swap.c --- v1.0.5/linux/mm/swap.c Fri Mar 18 10:21:33 1994 +++ linux/mm/swap.c Wed Mar 30 08:42:45 1994 @@ -585,7 +585,6 @@ */ unsigned long __get_free_page(int priority) { - extern unsigned long intr_count; unsigned long result, flag; static unsigned long index = 0; diff -u --recursive --new-file v1.0.5/linux/net/inet/skbuff.c linux/net/inet/skbuff.c --- v1.0.5/linux/net/inet/skbuff.c Fri Mar 18 10:21:34 1994 +++ linux/net/inet/skbuff.c Wed Mar 30 08:46:42 1994 @@ -426,7 +426,6 @@ struct sk_buff *alloc_skb(unsigned int size,int priority) { struct sk_buff *skb; - extern unsigned long intr_count; if (intr_count && priority != GFP_ATOMIC) { static int count = 0; diff -u --recursive --new-file v1.0.5/linux/net/inet/sock.c linux/net/inet/sock.c --- v1.0.5/linux/net/inet/sock.c Mon Mar 21 20:42:12 1994 +++ linux/net/inet/sock.c Sun Apr 3 14:42:52 1994 @@ -1197,6 +1197,7 @@ if (newsock->data) { struct sock * sk = (struct sock *) newsock->data; newsock->data = NULL; + sk->dead = 1; destroy_sock(sk); }