VERSION = 1
PATCHLEVEL = 0
-SUBLEVEL = 5
+SUBLEVEL = 6
all: Version zImage
* 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)))))
/* 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;
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;
}
*/
{
int i, ogmb;
+ unsigned char start_cmd;
unsigned long flags;
DEB(printk("wd7000_scb_out: %06x");)
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);
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
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;
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]);
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)
* 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.
+ * <johnsonm@stolaf.edu>
+ *
+ * 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.
+ * <middelin@calvin.iaf.nl>
*/
#include <linux/types.h>
"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,
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;
for (;;) {
addr = get_phys_addr(p, start);
if (!addr)
- return result;
+ goto ready;
do {
c = *(char *) addr;
if (!c)
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)
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.
unsigned long paddr;
unsigned long router;
unsigned long net;
- unsigned long up:1,destroy:1;
+ unsigned up:1,destroy:1;
};
#endif /* FIXME: */
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();
/* 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;
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) {
*/
unsigned long __get_free_page(int priority)
{
- extern unsigned long intr_count;
unsigned long result, flag;
static unsigned long index = 0;
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;
if (newsock->data) {
struct sock * sk = (struct sock *) newsock->data;
newsock->data = NULL;
+ sk->dead = 1;
destroy_sock(sk);
}