## Automatically generated incremental diff
## From:   linux-2.2.17-pre11
## To:     linux-2.2.17-pre12
## Robot:  $Id: make-incremental-diff,v 1.8 2001/12/04 06:05:04 hpa Exp $

diff -urN linux-2.2.17-pre11/Documentation/cpqarray.txt linux/Documentation/cpqarray.txt
--- linux-2.2.17-pre11/Documentation/cpqarray.txt	Wed May  3 17:16:30 2000
+++ linux/Documentation/cpqarray.txt	Mon Dec  3 22:09:26 2001
@@ -17,6 +17,7 @@
 	* SA 4200
 	* SA 4250ES
 	* SA 431
+	* RAID LC2 Controller
 
 It should also work with some really old Disk array adapters, but I am
 unable to test against these cards:
diff -urN linux-2.2.17-pre11/MAINTAINERS linux/MAINTAINERS
--- linux-2.2.17-pre11/MAINTAINERS	Mon Dec  3 22:09:20 2001
+++ linux/MAINTAINERS	Mon Dec  3 22:09:26 2001
@@ -297,8 +297,9 @@
 COMPAQ SMART2 RAID DRIVER
 P:	Charles White	
 M:	Charles White <arrays@compaq.com>
-L:	compaqandlinux@yps.org	
-S:	Maintained
+L:	compaqandlinux@cpqlin.van-dijk.net
+W:	ftp.compaq.com/pub/products/drivers/linux
+S:	Supported
 
 DAC960 RAID DRIVER
 P:	Leonard N. Zubkoff
diff -urN linux-2.2.17-pre11/Makefile linux/Makefile
--- linux-2.2.17-pre11/Makefile	Mon Dec  3 22:09:20 2001
+++ linux/Makefile	Mon Dec  3 22:09:26 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 17
-EXTRAVERSION = pre11
+EXTRAVERSION = pre12
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff -urN linux-2.2.17-pre11/arch/sparc64/kernel/power.c linux/arch/sparc64/kernel/power.c
--- linux-2.2.17-pre11/arch/sparc64/kernel/power.c	Tue Oct 26 17:53:39 1999
+++ linux/arch/sparc64/kernel/power.c	Mon Dec  3 22:09:26 2001
@@ -1,4 +1,4 @@
-/* $Id: power.c,v 1.3.2.1 1999/08/31 18:21:23 davem Exp $
+/* $Id: power.c,v 1.3.2.2 2000/07/11 22:42:09 davem Exp $
  * power.c: Power management driver.
  *
  * Copyright (C) 1999 David S. Miller (davem@redhat.com)
@@ -54,7 +54,7 @@
 static int powerd(void *__unused)
 {
 	static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
-	char *argv[] = { "/usr/bin/shutdown", "-h", "now", NULL };
+	char *argv[] = { "/sbin/shutdown", "-h", "now", NULL };
 
 	current->session = 1;
 	current->pgrp = 1;
@@ -69,7 +69,7 @@
 	}
 
 	/* Ok, down we go... */
-	if (execve("/usr/bin/shutdown", argv, envp) < 0) {
+	if (execve("/sbin/shutdown", argv, envp) < 0) {
 		printk("powerd: shutdown execution failed\n");
 		button_pressed = 0;
 		goto again;
diff -urN linux-2.2.17-pre11/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
--- linux-2.2.17-pre11/drivers/block/cpqarray.c	Wed May  3 17:16:33 2000
+++ linux/drivers/block/cpqarray.c	Mon Dec  3 22:09:26 2001
@@ -41,8 +41,8 @@
 
 #define SMART2_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
 
-#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.6)"
-#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,6)
+#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.9)"
+#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,9)
 #define MAJOR_NR COMPAQ_SMART2_MAJOR
 #include <linux/blk.h>
 #include <linux/blkdev.h>
@@ -70,7 +70,7 @@
  *  product = Marketing Name for the board
  *  access = Address of the struct of function pointers 
  */
-struct board_type products[] = {
+static struct board_type products[] = {
 	{ 0x0040110E, "IDA",			&smart1_access },
 	{ 0x0140110E, "IDA-2",			&smart1_access },
 	{ 0x1040110E, "IAES",			&smart1_access },
@@ -82,6 +82,7 @@
 	{ 0x40330E11, "Smart Array 3100ES",	&smart2_access },
 	{ 0x40340E11, "Smart Array 221",	&smart2_access },
 	{ 0x40400E11, "Integrated Array",	&smart4_access },
+	{ 0x40480E11, "Compaq Raid LC2",        &smart4_access },
 	{ 0x40500E11, "Smart Array 4200",	&smart4_access },
 	{ 0x40510E11, "Smart Array 4250ES",	&smart4_access },
 	{ 0x40580E11, "Smart Array 431",	&smart4_access },
@@ -93,7 +94,7 @@
 static int * ida_hardsizes;
 static struct gendisk ida_gendisk[MAX_CTLR];
 
-struct proc_dir_entry *proc_array = NULL;
+static struct proc_dir_entry *proc_array = NULL;
 
 /* Debug... */
 #define DBG(s)	do { s } while(0)
@@ -847,8 +848,10 @@
 
 /*
  * Get a request and submit it to the controller.
- * This routine needs to grab all the requests it possibly can from the
- * req Q and submit them.  Interrupts are off (and need to be off) when you
+ * This routine needs to grab one requests and submits it.  We would like 
+ * to grab all possible requests, but there is a danger of holding the 
+ * io_request lock to long.  
+ * Interrupts are off (and need to be off) when you
  * are in here (either via the dummy do_ida_request functions or by being
  * called from the interrupt handler
  */
@@ -1005,28 +1008,24 @@
  */
 static inline void complete_command(cmdlist_t *cmd, int timeout)
 {
-	char buf[80];
 	int ok=1;
 
 	if (cmd->req.hdr.rcode & RCODE_NONFATAL &&
 	   (hba[cmd->ctlr]->misc_tflags & MISC_NONFATAL_WARN) == 0) {
-		sprintf(buf, "Non Fatal error on ida/c%dd%d\n",
+		printk(KERN_WARNING "Non Fatal error on ida/c%dd%d\n",
 				cmd->ctlr, cmd->hdr.unit);
-		console_print(buf);
 		hba[cmd->ctlr]->misc_tflags |= MISC_NONFATAL_WARN;
 	}
 	if (cmd->req.hdr.rcode & RCODE_FATAL) {
-		sprintf(buf, "Fatal error on ida/c%dd%d\n",
+		printk(KERN_WARNING "Fatal error on ida/c%dd%d\n",
 				cmd->ctlr, cmd->hdr.unit);
-		console_print(buf);
 		ok = 0;
 	}
 	if (cmd->req.hdr.rcode & RCODE_INVREQ) {
-				sprintf(buf, "Invalid request on ida/c%dd%d = (cmd=%x sect=%d cnt=%d sg=%d ret=%x)\n",
+				printk(KERN_WARNING "Invalid request on ida/c%dd%d = (cmd=%x sect=%d cnt=%d sg=%d ret=%x)\n",
 				cmd->ctlr, cmd->hdr.unit, cmd->req.hdr.cmd,
 				cmd->req.hdr.blk, cmd->req.hdr.blk_cnt,
 				cmd->req.hdr.sg_cnt, cmd->req.hdr.rcode);
-		console_print(buf);
 		ok = 0;	
 	}
 	if (timeout) ok = 0;
@@ -1586,7 +1585,8 @@
 		id_ctlr_t *id_ctlr_buf; 
 	int ret_code;
 
-	if(	hba[ctlr]->board_id != 0x40400E11)
+	if(	(hba[ctlr]->board_id != 0x40400E11)
+		&& (hba[ctlr]->board_id != 0x40480E11) )
 	/* Not a Integrated Raid, so there is nothing for us to do */
 		return;
 	printk(KERN_DEBUG "cpqarray: Starting firmware's background"
diff -urN linux-2.2.17-pre11/drivers/block/smart1,2.h linux/drivers/block/smart1,2.h
--- linux-2.2.17-pre11/drivers/block/smart1,2.h	Mon Aug  9 12:04:39 1999
+++ linux/drivers/block/smart1,2.h	Mon Dec  3 22:09:27 2001
@@ -62,13 +62,14 @@
 }
 
 /*
- *  For this card fifo is full if reading this port returns 0! 
+ *  For older cards FIFO Full = 0. 
+ *  On this card 0 means there is room, anything else FIFO Full. 
  * 
  */ 
 static unsigned long smart4_fifo_full(ctlr_info_t *h)
 {
 	
-        return (~readl(h->vaddr + S42XX_REQUEST_PORT_OFFSET));
+        return (!readl(h->vaddr + S42XX_REQUEST_PORT_OFFSET));
 }
 
 /* This type of controller returns -1 if the fifo is empty, 
@@ -81,7 +82,7 @@
 		= readl(h->vaddr + S42XX_REPLY_PORT_OFFSET);
 
 	/* Fifo is empty */
-	if( register_value == -1)
+	if( register_value == 0xffffffff)
 		return 0; 	
 
 	/* Need to let it know we got the reply */
diff -urN linux-2.2.17-pre11/drivers/char/cyclades.c linux/drivers/char/cyclades.c
--- linux-2.2.17-pre11/drivers/char/cyclades.c	Wed Jun  7 14:26:42 2000
+++ linux/drivers/char/cyclades.c	Mon Dec  3 22:09:27 2001
@@ -1,7 +1,8 @@
 #undef	BLOCKMOVE
 #define	Z_WAKE
+#undef	Z_EXT_CHARS_IN_BUFFER
 static char rcsid[] =
-"$Revision: 2.3.2.6 $$Date: 2000/05/05 13:56:05 $";
+"$Revision: 2.3.2.8 $$Date: 2000/07/06 18:14:16 $";
 
 /*
  *  linux/drivers/char/cyclades.c
@@ -24,6 +25,17 @@
  * This version supports shared IRQ's (only for PCI boards).
  *
  * $Log: cyclades.c,v $
+ * Revision 2.3.2.8   2000/07/06 18:14:16 ivan
+ * Fixed the PCI detection function to work properly on Alpha systems.
+ * Implemented support for TIOCSERGETLSR ioctl.
+ * Implemented full support for non-standard baud rates.
+ *
+ * Revision 2.3.2.7   2000/06/01 18:26:34 ivan
+ * Request PLX I/O region, although driver doesn't use it, to avoid 
+ * problems with other drivers accessing it.
+ * Removed count for on-board buffer characters in cy_chars_in_buffer
+ * (Cyclades-Z only).
+ *
  * Revision 2.3.2.6   2000/05/05 13:56:05 ivan
  * Driver now reports physical instead of virtual memory addresses.
  * Masks were added to some Cyclades-Z read accesses.
@@ -634,6 +646,7 @@
 #include <linux/ptrace.h>
 #include <linux/cyclades.h>
 #include <linux/mm.h>
+#include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 
@@ -1365,9 +1378,16 @@
 
                     while (char_count-- > 0){
 			if (!info->xmit_cnt){
-                            cy_writeb((u_long)base_addr+(CySRER<<index),
-				cy_readb(base_addr+(CySRER<<index)) & 
-					~CyTxRdy);
+			    if (cy_readb(base_addr+(CySRER<<index))&CyTxMpty) {
+				cy_writeb((u_long)base_addr+(CySRER<<index), 
+					  cy_readb(base_addr+(CySRER<<index)) &
+					  ~CyTxMpty);
+			    } else {
+				cy_writeb((u_long)base_addr+(CySRER<<index), 
+					  ((cy_readb(base_addr+(CySRER<<index))
+					    & ~CyTxRdy)
+					   | CyTxMpty));
+			    }
 			    goto txdone;
 			}
 			if (info->xmit_buf == 0){
@@ -3133,12 +3153,15 @@
     card = info->card;
     channel = (info->line) - (cy_card[card].first_line);
 
+#ifdef Z_EXT_CHARS_IN_BUFFER
     if (!IS_CYC_Z(cy_card[card])) {
+#endif /* Z_EXT_CHARS_IN_BUFFER */
 #ifdef CY_DEBUG_IO
 	printk("cyc:cy_chars_in_buffer ttyC%d %d\n",
 		info->line, info->xmit_cnt); /* */
 #endif
 	return info->xmit_cnt;
+#ifdef Z_EXT_CHARS_IN_BUFFER
     } else {
 	static volatile struct FIRM_ID *firm_id;
 	static volatile struct ZFW_CTRL *zfw_ctrl;
@@ -3167,6 +3190,7 @@
 #endif
 	return (info->xmit_cnt + char_count);
     }
+#endif /* Z_EXT_CHARS_IN_BUFFER */
 } /* cy_chars_in_buffer */
 
 
@@ -3176,6 +3200,30 @@
  * ------------------------------------------------------------
  */
 
+static void
+cyy_baud_calc(struct cyclades_port *info, uclong baud)
+{
+    int co, co_val, bpr;
+    uclong cy_clock = ((info->chip_rev >= CD1400_REV_J) ? 60000000 : 25000000);
+
+    if (baud == 0) {
+	info->tbpr = info->tco = info->rbpr = info->rco = 0;
+	return;
+    }
+
+    /* determine which prescaler to use */
+    for (co = 4, co_val = 2048; co; co--, co_val >>= 2) {
+	if (cy_clock / co_val / baud > 63)
+	    break;
+    }
+
+    bpr = (cy_clock / co_val * 2 / baud + 1) / 2;
+    if (bpr > 255)
+	bpr = 255;
+
+    info->tbpr = info->rbpr = bpr;
+    info->tco = info->rco = co;
+}
 
 /*
  * This routine finds or computes the various line characteristics.
@@ -3189,7 +3237,7 @@
   int card,chip,channel,index;
   unsigned cflag, iflag;
   unsigned short chip_number;
-  int baud;
+  int baud, baud_rate = 0;
   int   i;
 
 
@@ -3225,12 +3273,14 @@
 	index = cy_card[card].bus_index;
 
 	/* baud rate */
-	if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) {
-	    baud = info->baud;
-	} else {
-	    baud = tty_get_baud_rate(info->tty);
-	}
-	if (baud > CD1400_MAX_SPEED) {
+	baud = tty_get_baud_rate(info->tty);
+	if ((baud == 38400) && 
+	    ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)) {
+	    if (info->custom_divisor)
+		baud_rate = info->baud / info->custom_divisor;
+	    else
+		baud_rate = info->baud;
+	} else if (baud > CD1400_MAX_SPEED) {
 	    baud = CD1400_MAX_SPEED;
 	}
 	/* find the baud index */
@@ -3243,22 +3293,29 @@
 	    i = 19; /* CD1400_MAX_SPEED */
 	} 
 
-
-	if(info->chip_rev >= CD1400_REV_J) {
-	    /* It is a CD1400 rev. J or later */
-	    info->tbpr = baud_bpr_60[i]; /* Tx BPR */
-	    info->tco = baud_co_60[i]; /* Tx CO */
-	    info->rbpr = baud_bpr_60[i]; /* Rx BPR */
-	    info->rco = baud_co_60[i]; /* Rx CO */
+	if ((baud == 38400) && 
+	    ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)) {
+	    cyy_baud_calc(info, baud_rate);
 	} else {
-	    info->tbpr = baud_bpr_25[i]; /* Tx BPR */
-	    info->tco = baud_co_25[i]; /* Tx CO */
-	    info->rbpr = baud_bpr_25[i]; /* Rx BPR */
-	    info->rco = baud_co_25[i]; /* Rx CO */
+	    if(info->chip_rev >= CD1400_REV_J) {
+		/* It is a CD1400 rev. J or later */
+		info->tbpr = baud_bpr_60[i]; /* Tx BPR */
+		info->tco = baud_co_60[i]; /* Tx CO */
+		info->rbpr = baud_bpr_60[i]; /* Rx BPR */
+		info->rco = baud_co_60[i]; /* Rx CO */
+	    } else {
+		info->tbpr = baud_bpr_25[i]; /* Tx BPR */
+		info->tco = baud_co_25[i]; /* Tx CO */
+		info->rbpr = baud_bpr_25[i]; /* Rx BPR */
+		info->rco = baud_co_25[i]; /* Rx CO */
+	    }
 	}
 	if (baud_table[i] == 134) {
-	    info->timeout = (info->xmit_fifo_size*HZ*15/269) + 2;
 	    /* get it right for 134.5 baud */
+	    info->timeout = (info->xmit_fifo_size*HZ*30/269) + 2;
+	} else if ((baud == 38400) && 
+		   ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)) {
+	    info->timeout = (info->xmit_fifo_size*HZ*15/baud_rate) + 2;
 	} else if (baud_table[i]) {
 	    info->timeout = (info->xmit_fifo_size*HZ*15/baud_table[i]) + 2;
 	    /* this needs to be propagated into the card info */
@@ -3447,19 +3504,24 @@
 	buf_ctrl = &zfw_ctrl->buf_ctrl[channel];
 
 	/* baud rate */
-	if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) {
-	    baud = info->baud;
-	} else {
-	    baud = tty_get_baud_rate(info->tty);
-	}
-	if (baud > CYZ_MAX_SPEED) {
+	baud = tty_get_baud_rate(info->tty);
+	if ((baud == 38400) && 
+	    ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)) {
+	    if (info->custom_divisor)
+		baud_rate = info->baud / info->custom_divisor;
+	    else
+		baud_rate = info->baud;
+	} else if (baud > CYZ_MAX_SPEED) {
 	    baud = CYZ_MAX_SPEED;
 	}
 	cy_writel(&ch_ctrl->comm_baud , baud);
 
 	if (baud == 134) {
-	    info->timeout = (info->xmit_fifo_size*HZ*30/269) + 2;
 	    /* get it right for 134.5 baud */
+	    info->timeout = (info->xmit_fifo_size*HZ*30/269) + 2;
+	} else if ((baud == 38400) && 
+		   ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)) {
+	    info->timeout = (info->xmit_fifo_size*HZ*15/baud_rate) + 2;
 	} else if (baud) {
 	    info->timeout = (info->xmit_fifo_size*HZ*15/baud) + 2;
 	    /* this needs to be propagated into the card info */
@@ -3549,8 +3611,6 @@
 	    clear_bit(TTY_IO_ERROR, &info->tty->flags);
 	}
     }
-
-
 } /* set_line_char */
 
 
@@ -3571,7 +3631,7 @@
     tmp.flags = info->flags;
     tmp.close_delay = info->close_delay;
     tmp.baud_base = info->baud;
-    tmp.custom_divisor = 0;     /*!!!*/
+    tmp.custom_divisor = info->custom_divisor;
     tmp.hub6 = 0;               /*!!!*/
     return copy_to_user(retinfo,&tmp,sizeof(*retinfo))?-EFAULT:0;
 } /* get_serial_info */
@@ -3597,6 +3657,7 @@
             info->flags = ((info->flags & ~ASYNC_USR_MASK) |
                            (new_serial.flags & ASYNC_USR_MASK));
             info->baud = new_serial.baud_base;
+	    info->custom_divisor = new_serial.custom_divisor;
             goto check_and_exit;
     }
 
@@ -3607,6 +3668,7 @@
      */
 
     info->baud = new_serial.baud_base;
+    info->custom_divisor = new_serial.custom_divisor;
     info->flags = ((info->flags & ~ASYNC_FLAGS) |
                     (new_serial.flags & ASYNC_FLAGS));
     info->close_delay = new_serial.close_delay * HZ/100;
@@ -3621,6 +3683,43 @@
     }
 } /* set_serial_info */
 
+/*
+ * get_lsr_info - get line status register info
+ *
+ * Purpose: Let user call ioctl() to get info when the UART physically
+ *	    is emptied.  On bus types like RS485, the transmitter must
+ *	    release the bus after transmitting. This must be done when
+ *	    the transmit shift register is empty, not be done when the
+ *	    transmit holding register is empty.  This functionality
+ *	    allows an RS485 driver to be written in user space.
+ */
+static int get_lsr_info(struct cyclades_port *info, unsigned int *value)
+{
+    int card, chip, channel, index;
+    unsigned char status;
+    unsigned int result;
+    unsigned long flags;
+    unsigned char *base_addr;
+
+    card = info->card;
+    channel = (info->line) - (cy_card[card].first_line);
+    if (!IS_CYC_Z(cy_card[card])) {
+	chip = channel>>2;
+	channel &= 0x03;
+	index = cy_card[card].bus_index;
+	base_addr = (unsigned char *)
+		     (cy_card[card].base_addr + (cy_chip_offset[chip]<<index));
+
+	CY_LOCK(info, flags);
+	status = cy_readb(base_addr+(CySRER<<index)) & (CyTxRdy|CyTxMpty);
+	CY_UNLOCK(info, flags);
+	result = (status ? 0 : TIOCSER_TEMT);
+    } else {
+	/* Not supported yet */
+	return -EINVAL;
+    }
+    return cy_put_user(result, (unsigned long *) value);
+}
 
 static int
 get_modem_info(struct cyclades_port * info, unsigned int *value)
@@ -4247,6 +4346,9 @@
         case TIOCSSERIAL:
             ret_val = set_serial_info(info, (struct serial_struct *) arg);
             break;
+	case TIOCSERGETLSR: /* Get line status register */
+	    ret_val = get_lsr_info(info, (unsigned int *) arg);
+	    break;
 	/*
 	 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change 
 	 * - mask passed in arg for lines of interest
@@ -4868,7 +4970,7 @@
   struct pci_dev	*pdev = NULL;
   unsigned char		cyy_rev_id;
   unsigned char         cy_pci_irq = 0;
-  uclong		cy_pci_phys0, cy_pci_phys2;
+  uclong		cy_pci_phys0, cy_pci_phys1, cy_pci_phys2;
   uclong		cy_pci_addr0, cy_pci_addr2;
   unsigned short        i,j,cy_pci_nchan, plx_ver;
   unsigned short        device_id,dev_index = 0;
@@ -4897,6 +4999,7 @@
                 /* read PCI configuration area */
 		cy_pci_irq = pdev->irq;
 		cy_pci_phys0 = pdev->base_address[0];
+		cy_pci_phys1 = pdev->base_address[1]; 
 		cy_pci_phys2 = pdev->base_address[2]; 
 		pci_read_config_byte(pdev, PCI_REVISION_ID, &cyy_rev_id);
 
@@ -4913,6 +5016,7 @@
 		(ulong)cy_pci_phys2, (ulong)cy_pci_phys0);
 #endif
 		cy_pci_phys0  &= PCI_BASE_ADDRESS_MEM_MASK;
+		cy_pci_phys1  &= PCI_BASE_ADDRESS_IO_MASK;
 		cy_pci_phys2  &= PCI_BASE_ADDRESS_MEM_MASK;
 
 		if (cy_pci_phys2 & ~PCI_BASE_ADDRESS_IO_MASK) {
@@ -4921,6 +5025,11 @@
 		    cy_pci_phys2 &= PCI_BASE_ADDRESS_IO_MASK;
 		}
 
+		/* Although we don't use this I/O region, we should 
+		   request it from the kernel anyway, to avoid problems 
+		   with other drivers accessing it. */
+		request_region(cy_pci_phys1, CyPCI_Yctl, "Cyclom-Y");
+
 #if defined(__alpha__)
                 if (device_id  == PCI_DEVICE_ID_CYCLOM_Y_Lo) { /* below 1M? */
 		    printk("Cyclom-Y/PCI (bus=0x0%x, pci_id=0x%x, ",
@@ -4934,10 +5043,9 @@
 		    i--;
 	            continue;
                 }
-#else
+#endif
 		cy_pci_addr0 = (ulong)ioremap(cy_pci_phys0, CyPCI_Yctl);
 		cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Ywin);
-#endif
 
 #ifdef CY_PCI_DEBUG
             printk("Cyclom-Y/PCI: relocate winaddr=0x%lx ctladdr=0x%lx\n",
@@ -5046,6 +5154,7 @@
                 (ulong)cy_pci_phys2, (ulong)cy_pci_phys0);
 #endif
                 cy_pci_phys0 &= PCI_BASE_ADDRESS_MEM_MASK;
+		cy_pci_phys1 &= PCI_BASE_ADDRESS_IO_MASK;
                 cy_pci_phys2 &= PCI_BASE_ADDRESS_MEM_MASK;
 
 		if (cy_pci_phys2 & ~PCI_BASE_ADDRESS_IO_MASK) {
@@ -5053,9 +5162,13 @@
 			   "Ignoring it...\n");
 		    cy_pci_phys2 &= PCI_BASE_ADDRESS_IO_MASK;
 		}
-#if !defined(__alpha__)
-                cy_pci_addr0 = (ulong)ioremap(cy_pci_phys0, CyPCI_Zctl);
-#endif
+
+		/* Although we don't use this I/O region, we should 
+		   request it from the kernel anyway, to avoid problems 
+		   with other drivers accessing it. */
+		request_region(cy_pci_phys1, CyPCI_Zctl, "Cyclades-Z");
+
+		cy_pci_addr0 = (ulong)ioremap(cy_pci_phys0, CyPCI_Zctl);
 
 		/* Disable interrupts on the PLX before resetting it */
 		cy_writew(cy_pci_addr0+0x68,
@@ -5071,9 +5184,7 @@
 		mailbox = (uclong)cy_readl(&((struct RUNTIME_9060 *) 
 			   cy_pci_addr0)->mail_box_0);
 		if (mailbox == ZE_V1) {
-#if !defined(__alpha__)
-               	    cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Ze_win);
-#endif
+		    cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Ze_win);
 		    if (ZeIndex == NR_CARDS) {
 			printk("Cyclades-Ze/PCI found at 0x%lx ",
 				(ulong)cy_pci_phys2);
@@ -5090,9 +5201,7 @@
 		    i--;
 		    continue;
 		} else {
-#if !defined(__alpha__)
-                    cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Zwin);
-#endif
+		    cy_pci_addr2 = (ulong)ioremap(cy_pci_phys2, CyPCI_Zwin);
 		}
 
 #ifdef CY_PCI_DEBUG
@@ -5531,6 +5640,7 @@
                     info->tco = 0;
                     info->rbpr = 0;
                     info->rco = 0;
+		    info->custom_divisor = 0;
                     info->close_delay = 5*HZ/10;
 		    info->closing_wait = CLOSING_WAIT_DELAY;
 		    info->icount.cts = info->icount.dsr = 
@@ -5589,6 +5699,7 @@
                     info->cor3 = 0x08; /* _very_ small rcv threshold */
                     info->cor4 = 0;
                     info->cor5 = 0;
+		    info->custom_divisor = 0;
                     info->close_delay = 5*HZ/10;
 		    info->closing_wait = CLOSING_WAIT_DELAY;
 		    info->icount.cts = info->icount.dsr = 
diff -urN linux-2.2.17-pre11/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
--- linux-2.2.17-pre11/drivers/char/pc_keyb.c	Wed Jun  7 14:26:42 2000
+++ linux/drivers/char/pc_keyb.c	Mon Dec  3 22:09:27 2001
@@ -401,15 +401,14 @@
 	}
     else if(scancode == AUX_RECONNECT){
         queue->head = queue->tail = 0;  /* Flush input queue */
-        /*
-         * need this stuff? seems to work fine w/o it for me
-        aux_write_ack(AUX_SET_SAMPLE);
-        aux_write_ack(100);
-        aux_write_ack(AUX_SET_RES);
-        aux_write_ack(3);
-        aux_write_ack(AUX_SET_SCALE21);
-        */
-        aux_write_ack(AUX_ENABLE_DEV);  /* ping the mouse :) */
+        /* ping the mouse :) */
+	kb_wait();
+	kbd_write_command(KBD_CCMD_WRITE_MOUSE);
+	kb_wait();
+	kbd_write_output(AUX_ENABLE_DEV);
+	/* we expect an ACK in response. */
+	mouse_reply_expected++;
+	kb_wait();
         return;
     }
 
diff -urN linux-2.2.17-pre11/drivers/i2o/i2o_block.c linux/drivers/i2o/i2o_block.c
--- linux-2.2.17-pre11/drivers/i2o/i2o_block.c	Mon Dec  3 22:09:21 2001
+++ linux/drivers/i2o/i2o_block.c	Mon Dec  3 22:09:27 2001
@@ -1227,8 +1227,14 @@
 		else
 			b = c->devices;
 		
-		for (d=b;d!=NULL;d=d->next)
+		while(b != NULL)
 		{
+			d=b;
+			if(bios)
+				b = b->next;
+			else
+				b = b->prev;
+			
 			if(d->lct_data.class_id!=I2O_CLASS_RANDOM_BLOCK_STORAGE)
 				continue;
 			if(d->lct_data.user_tid != 0xFFF)
@@ -1303,7 +1309,7 @@
 	/*
 	 *	Now the remainder.
 	 */
-	 
+	printk(KERN_INFO "i2o_block: Checking for I2O Block devices...\n"); 
 	i2ob_scan(0);
 }
 
@@ -1651,7 +1657,7 @@
 	 *	Finally see what is actually plugged in to our controllers
 	 */
 	i2ob_probe();
-	
+
 	return 0;
 }
 
diff -urN linux-2.2.17-pre11/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.2.17-pre11/drivers/net/Config.in	Mon Dec  3 22:09:21 2001
+++ linux/drivers/net/Config.in	Mon Dec  3 22:09:27 2001
@@ -225,8 +225,8 @@
 fi
 
 tristate 'PPP (point-to-point) support' CONFIG_PPP
-if [ ! "$CONFIG_PPP" = "n" ]; then
-  comment 'CCP compressors for PPP are only built as modules.'
+if [ "$CONFIG_PPP" = "y" ]; then
+  comment 'CCP compressors for PPP will also be built in.'
 fi
 
 tristate 'SLIP (serial line) support' CONFIG_SLIP
diff -urN linux-2.2.17-pre11/drivers/net/Makefile linux/drivers/net/Makefile
--- linux-2.2.17-pre11/drivers/net/Makefile	Mon Dec  3 22:09:21 2001
+++ linux/drivers/net/Makefile	Mon Dec  3 22:09:27 2001
@@ -22,6 +22,8 @@
 CONFIG_8390_MODULE  :=
 CONFIG_SLHC_BUILTIN :=
 CONFIG_SLHC_MODULE  :=
+CONFIG_BSDCOMP_BUILTIN :=
+CONFIG_BSDCOMP_MODULE  :=
 CONFIG_PPPDEF_BUILTIN :=
 CONFIG_PPPDEF_MODULE  :=
 CONFIG_7990_BUILTIN :=
@@ -35,12 +37,14 @@
 
 ifeq ($(CONFIG_ISDN),y)
   ifeq ($(CONFIG_ISDN_PPP),y)
+    CONFIG_BSDCOMP_BUILTIN = y
     CONFIG_SLHC_BUILTIN = y
     CONFIG_PPPDEF_BUILTIN = y
   endif
 else
   ifeq ($(CONFIG_ISDN),m)
     ifeq ($(CONFIG_ISDN_PPP),y)
+      CONFIG_BSDCOMP_MODULE = y
       CONFIG_SLHC_MODULE = y
       CONFIG_PPPDEF_MODULE = y
     endif
@@ -311,19 +315,17 @@
   endif
 endif
 
-# bsd_comp.o is *always* a module, for some documented reason
-# (licensing).
 ifeq ($(CONFIG_PPP),y)
 LX_OBJS += ppp.o
-M_OBJS += bsd_comp.o
+CONFIG_BSDCOMP_BUILTIN = y
 CONFIG_SLHC_BUILTIN = y
 CONFIG_PPPDEF_BUILTIN = y
 else
   ifeq ($(CONFIG_PPP),m)
+  CONFIG_BSDCOMP_MODULE = y
   CONFIG_SLHC_MODULE = y
   CONFIG_PPPDEF_MODULE = y
   MX_OBJS += ppp.o
-  M_OBJS += bsd_comp.o
   endif
 endif
 
@@ -1022,6 +1024,16 @@
   endif
 endif
 
+# If anything built-in uses bsd_comp, then build it into the kernel also.
+# If not, but a module uses it, build as a module.
+ifdef CONFIG_BSDCOMP_BUILTIN
+LX_OBJS += bsd_comp.o
+else
+  ifdef CONFIG_BSDCOMP_MODULE
+  MX_OBJS += bsd_comp.o
+  endif
+endif
+
 # If anything built-in uses slhc, then build it into the kernel also.
 # If not, but a module uses it, build as a module.
 ifdef CONFIG_SLHC_BUILTIN
@@ -1034,10 +1046,8 @@
 
 # if anything built-in uses ppp_deflate, then build it into the kernel also.
 # If not, but a module uses it, build as a module.
-# ... NO!!!  ppp_deflate.o does not work as resident;
-# it works only as a module!
 ifdef CONFIG_PPPDEF_BUILTIN
-MX_OBJS += ppp_deflate.o
+LX_OBJS += ppp_deflate.o
 else
   ifdef CONFIG_PPPDEF_MODULE
   MX_OBJS += ppp_deflate.o
diff -urN linux-2.2.17-pre11/drivers/net/bsd_comp.c linux/drivers/net/bsd_comp.c
--- linux-2.2.17-pre11/drivers/net/bsd_comp.c	Wed Mar 10 16:51:35 1999
+++ linux/drivers/net/bsd_comp.c	Mon Dec  3 22:09:27 2001
@@ -1,3 +1,11 @@
+/*
+ * Update: The Berkeley copyright was changed, and the change
+ * is retroactive to all "true" BSD software (ie everything
+ * from UCB as opposed to other peoples code that just carried
+ * the same license). The new copyright doesn't clash with the
+ * GPL, so the module-only restriction has been removed..
+ */
+
 /* Because this code is derived from the 4.3BSD compress source:
  *
  * Copyright (c) 1985, 1986 The Regents of the University of California.
@@ -53,12 +61,9 @@
  * From: bsd_comp.c,v 1.3 1994/12/08 01:59:58 paulus Exp
  */
 
-#ifndef MODULE
-#error This file must be compiled as a module.
-#endif
-
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -1173,12 +1178,7 @@
     bsd_comp_stats		/* decomp_stat */
 };
 
-/*************************************************************
- * Module support routines
- *************************************************************/
-
-int
-init_module(void)
+__initfunc(int bsd_comp_install(void))
 {
 	int answer = ppp_register_compressor (&ppp_bsd_compress);
 	if (answer == 0)
@@ -1186,8 +1186,18 @@
 	return answer;
 }
 
+#ifdef MODULE
+
+int
+init_module(void)
+{
+	return bsd_comp_install();
+}
+
 void
 cleanup_module(void)
 {
 	ppp_unregister_compressor (&ppp_bsd_compress);
 }
+
+#endif /* MODULE */
diff -urN linux-2.2.17-pre11/drivers/net/de4x5.c linux/drivers/net/de4x5.c
--- linux-2.2.17-pre11/drivers/net/de4x5.c	Mon Dec  3 22:09:21 2001
+++ linux/drivers/net/de4x5.c	Mon Dec  3 22:09:27 2001
@@ -3242,6 +3242,7 @@
 
       case ANS:
 	lp->media = ANS;
+	lp->fdx = lp->params.fdx;
 	break;
 
       default: 
diff -urN linux-2.2.17-pre11/drivers/net/hamradio/baycom_epp.c linux/drivers/net/hamradio/baycom_epp.c
--- linux-2.2.17-pre11/drivers/net/hamradio/baycom_epp.c	Wed May  3 17:16:41 2000
+++ linux/drivers/net/hamradio/baycom_epp.c	Mon Dec  3 22:09:27 2001
@@ -51,12 +51,14 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include <asm/uaccess.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/if_arp.h>
 //#include <net/ax25dev.h>
 #include <linux/kmod.h>
+#include <linux/init.h>
 #include <linux/hdlcdrv.h>
 #include <linux/baycom.h>
 #include <linux/soundmodem.h>
@@ -70,56 +72,6 @@
 
 /* --------------------------------------------------------------------- */
 
-/*
- * currently this module is supposed to support both module styles, i.e.
- * the old one present up to about 2.1.9, and the new one functioning
- * starting with 2.1.21. The reason is I have a kit allowing to compile
- * this module also under 2.0.x which was requested by several people.
- * This will go in 2.2
- */
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE >= 0x20100
-#include <asm/uaccess.h>
-#else
-#include <asm/segment.h>
-#include <linux/mm.h>
-
-#undef put_user
-#undef get_user
-
-#define put_user(x,ptr) ({ __put_user((unsigned long)(x),(ptr),sizeof(*(ptr))); 0; })
-#define get_user(x,ptr) ({ x = ((__typeof__(*(ptr)))__get_user((ptr),sizeof(*(ptr)))); 0; })
-
-extern inline int copy_from_user(void *to, const void *from, unsigned long n)
-{
-        int i = verify_area(VERIFY_READ, from, n);
-        if (i)
-                return i;
-        memcpy_fromfs(to, from, n);
-        return 0;
-}
-
-extern inline int copy_to_user(void *to, const void *from, unsigned long n)
-{
-        int i = verify_area(VERIFY_WRITE, to, n);
-        if (i)
-                return i;
-        memcpy_tofs(to, from, n);
-        return 0;
-}
-#endif
-
-#if LINUX_VERSION_CODE >= 0x20123
-#include <linux/init.h>
-#else
-#define __init
-#define __initdata
-#define __initfunc(x) x
-#endif
-
-/* --------------------------------------------------------------------- */
-
 #define BAYCOM_DEBUG
 #define BAYCOM_MAGIC 19730510
 
@@ -455,12 +407,8 @@
 	sprintf(portarg, "%ld", bc->pdev->port->base);
 	printk(KERN_DEBUG "%s: %s -s -p %s -m %s\n", bc_drvname, eppconfig_path, portarg, modearg);
 
-        for (i = 0; i < current->files->max_fds; i++ )
-		if (current->files->fd[i]) 
-			close(i);
-        set_fs(KERNEL_DS);      /* Allow execve args to be in kernel space. */
-        current->uid = current->euid = current->fsuid = 0;
-        if (execve(eppconfig_path, argv, envp) < 0) {
+        i = exec_usermodehelper(eppconfig_path, argv, envp);
+        if (i < 0) {
                 printk(KERN_ERR "%s: failed to exec %s -s -p %s -m %s, errno = %d\n",
                        bc_drvname, eppconfig_path, portarg, modearg, errno);
                 return -errno;
diff -urN linux-2.2.17-pre11/drivers/net/pc300.c linux/drivers/net/pc300.c
--- linux-2.2.17-pre11/drivers/net/pc300.c	Mon Dec  3 22:09:21 2001
+++ linux/drivers/net/pc300.c	Mon Dec  3 22:09:27 2001
@@ -1,6 +1,6 @@
 #define	USE_PCI_CLOCK
 static char rcsid[] =
-"$Revision: 3.1.0.1 $$Date: 2000/06/23 $";
+"$Revision: 3.1.0.2 $$Date: 2000/06/27 $";
 
 /*
  * pc300.c	Cyclades-PC300(tm) Driver.
@@ -15,6 +15,10 @@
  *	2 of the License, or (at your option) any later version.
  * 
  * $Log: pc300.c,v $
+ * Revision 3.1.0.2 2000/06/27 ivan
+ * Previous bugfix for the framing errors with external clock made X21 
+ * boards stop working. This version fixes it.
+ * 
  * Revision 3.1.0.1 2000/06/23 ivan
  * Revisited cpc_queue_xmit to prevent race conditions on Tx DMA buffer 
  * handling when Tx timeouts occur.
@@ -2205,17 +2209,24 @@
 		cpc_writeb(scabase + M_REG(TXS, ch), (TXS_DTRXC|TXS_IBRG|br));
 		cpc_writeb(scabase + M_REG(TMCR, ch), tmc);
 		cpc_writeb(scabase + M_REG(RXS, ch), (RXS_IBRG|br));
-		if (card->hw.type == PC300_X21)
+		if (card->hw.type == PC300_X21) {
 		    cpc_writeb(scabase + M_REG(GPO, ch), 1);
+		    cpc_writeb(scabase + M_REG(EXS, ch), EXS_TES1|EXS_RES1);
+		} else {
+		    cpc_writeb(scabase + M_REG(EXS, ch), EXS_TES1);
+		}
 	    } else {
 		cpc_writeb(scabase + M_REG(TMCT, ch), 1);
 		cpc_writeb(scabase + M_REG(TXS, ch), TXS_DTRXC);
 		cpc_writeb(scabase + M_REG(TMCR, ch), 1);
 		cpc_writeb(scabase + M_REG(RXS, ch), 0);
-		if (card->hw.type == PC300_X21)
+		if (card->hw.type == PC300_X21) {
 		    cpc_writeb(scabase + M_REG(GPO, ch), 0);
+		    cpc_writeb(scabase + M_REG(EXS, ch), EXS_TES1|EXS_RES1);
+		} else {
+		    cpc_writeb(scabase + M_REG(EXS, ch), EXS_TES1);
+		}
 	    }
-	    cpc_writeb(scabase + M_REG(EXS, ch), EXS_TES1);
 	    break;
 
 	case PC300_TE:
diff -urN linux-2.2.17-pre11/drivers/net/ppp.c linux/drivers/net/ppp.c
--- linux-2.2.17-pre11/drivers/net/ppp.c	Mon Dec  3 22:09:21 2001
+++ linux/drivers/net/ppp.c	Mon Dec  3 22:09:27 2001
@@ -49,6 +49,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/types.h>
@@ -94,8 +95,8 @@
  * Local functions
  */
 
+int ppp_register_compressor (struct compressor *cp);
 #ifdef CONFIG_MODULES
-static int ppp_register_compressor (struct compressor *cp);
 static void ppp_unregister_compressor (struct compressor *cp);
 #endif
 
@@ -317,6 +318,10 @@
 
 
 #ifndef MODULE
+
+extern int bsd_comp_install(void);
+extern int ppp_deflate_install(void);
+
 /*
  * Called at boot time if the PPP driver is compiled into the kernel.
  */
@@ -328,7 +333,11 @@
 
 	if (first_time) {
 		first_time = 0;
-		answer	   = ppp_first_time();
+		answer = ppp_first_time();
+		if (answer == 0) {
+			bsd_comp_install();
+			ppp_deflate_install();
+		}
 	}
 	if (answer == 0)
 		answer = -ENODEV;
@@ -3041,8 +3050,10 @@
 	return (struct compressor *) 0;
 }
 
-#ifdef CONFIG_MODULES
-static int ppp_register_compressor (struct compressor *cp)
+/* 
+ * If PPP is built-in then so are compressors, so __initfunc is okay here.
+ */
+__initfunc(int ppp_register_compressor (struct compressor *cp))
 {
 	struct compressor_link *new;
 	unsigned long flags;
@@ -3070,6 +3081,7 @@
 	return 0;
 }
 
+#ifdef CONFIG_MODULES
 static void ppp_unregister_compressor (struct compressor *cp)
 {
 	struct compressor_link *prev = (struct compressor_link *) 0;
diff -urN linux-2.2.17-pre11/drivers/net/ppp_deflate.c linux/drivers/net/ppp_deflate.c
--- linux-2.2.17-pre11/drivers/net/ppp_deflate.c	Wed Mar 10 16:51:35 1999
+++ linux/drivers/net/ppp_deflate.c	Mon Dec  3 22:09:27 2001
@@ -33,6 +33,7 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -656,13 +657,7 @@
 	z_comp_stats,		/* decomp_stat */
 };
 
-#ifdef MODULE
-/*************************************************************
- * Module support routines
- *************************************************************/
-
-int
-init_module(void)
+__initfunc(int ppp_deflate_install(void))
 {  
         int answer = ppp_register_compressor (&ppp_deflate);
         if (answer == 0)
@@ -670,6 +665,14 @@
 			"PPP Deflate Compression module registered\n");
 	ppp_register_compressor(&ppp_deflate_draft);
         return answer;
+}
+
+#ifdef MODULE
+
+int
+init_module(void)
+{
+	return ppp_deflate_install();
 }
      
 void
diff -urN linux-2.2.17-pre11/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
--- linux-2.2.17-pre11/drivers/scsi/scsi.c	Wed Jun  7 14:26:43 2000
+++ linux/drivers/scsi/scsi.c	Mon Dec  3 22:09:27 2001
@@ -307,7 +307,11 @@
 {"MATSHITA","PD-1","*", BLIST_FORCELUN | BLIST_SINGLELUN},
 {"iomega","jaz 1GB","J.86", BLIST_NOTQ | BLIST_NOLUN},
 {"TOSHIBA","CDROM","*", BLIST_ISROM},
-{"MegaRAID", "LD", "*", BLIST_FORCELUN},
+{"MegaRAID", "LD", "*", BLIST_FORCELUN},     /* Multiple luns always safe (logical raid vols) */
+{"DGC",  "RAID",      "*", BLIST_SPARSELUN}, /* Dell PV 650F (tgt @ LUN 0) */
+{"DGC",  "DISK",      "*", BLIST_SPARSELUN}, /* Dell PV 650F (no tgt @ LUN 0) */
+{"DELL", "PV530F",    "*", BLIST_SPARSELUN}, /* Dell PV 530F */
+{"SONY", "TSL",       "*", BLIST_FORCELUN},  /* DDS3 & DDS4 autoloaders */
 /*
  * Must be at end of list...
  */
diff -urN linux-2.2.17-pre11/drivers/scsi/scsi_error.c linux/drivers/scsi/scsi_error.c
--- linux-2.2.17-pre11/drivers/scsi/scsi_error.c	Mon Aug  9 12:04:40 1999
+++ linux/drivers/scsi/scsi_error.c	Mon Dec  3 22:09:27 2001
@@ -1941,7 +1941,11 @@
 	current->pgrp = 1;
 	
 	/* Become as one with the init task */
-	
+
+ 	exit_files(current);
+	current->files = init_task.files;
+	atomic_inc(&current->files->count);
+ 		
 	exit_fs(current);	/* current->fs->count--; */
 	fs = init_task.fs;
 	current->fs = fs;
diff -urN linux-2.2.17-pre11/fs/ext2/acl.c linux/fs/ext2/acl.c
--- linux-2.2.17-pre11/fs/ext2/acl.c	Wed May  6 10:56:08 1998
+++ linux/fs/ext2/acl.c	Mon Dec  3 22:09:27 2001
@@ -54,7 +54,7 @@
 	if (((mode & mask & S_IRWXO) == mask) || capable(CAP_DAC_OVERRIDE))
 		return 0;
 	if ((mask == S_IROTH) ||
-	    (S_ISDIR(mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
+	    (S_ISDIR(inode->i_mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
 		if (capable(CAP_DAC_READ_SEARCH))
 			return 0;
 	return -EACCES;
diff -urN linux-2.2.17-pre11/fs/namei.c linux/fs/namei.c
--- linux-2.2.17-pre11/fs/namei.c	Tue Jan  4 10:12:23 2000
+++ linux/fs/namei.c	Mon Dec  3 22:09:27 2001
@@ -155,7 +155,7 @@
 		return 0;
 	/* read and search access */
 	if ((mask == S_IROTH) ||
-	    (S_ISDIR(mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
+	    (S_ISDIR(inode->i_mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
 		if (capable(CAP_DAC_READ_SEARCH))
 			return 0;
 	return -EACCES;
diff -urN linux-2.2.17-pre11/fs/proc/inode.c linux/fs/proc/inode.c
--- linux-2.2.17-pre11/fs/proc/inode.c	Fri May  8 18:10:30 1998
+++ linux/fs/proc/inode.c	Mon Dec  3 22:09:27 2001
@@ -149,7 +149,7 @@
 		return 0;
 	/* read and search access */
 	if ((mask == S_IROTH) ||
-	    (S_ISDIR(mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
+	    (S_ISDIR(inode->i_mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
 		if (capable(CAP_DAC_READ_SEARCH))
 			return 0;
 	return -EACCES;
diff -urN linux-2.2.17-pre11/fs/ufs/acl.c linux/fs/ufs/acl.c
--- linux-2.2.17-pre11/fs/ufs/acl.c	Mon Jan  4 11:51:29 1999
+++ linux/fs/ufs/acl.c	Mon Dec  3 22:09:27 2001
@@ -61,7 +61,7 @@
 	if (((mode & mask & S_IRWXO) == mask) || capable(CAP_DAC_OVERRIDE))
 		return 0;
 	if ((mask == S_IROTH) ||
-	    (S_ISDIR(mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
+	    (S_ISDIR(inode->i_mode)  && !(mask & ~(S_IROTH | S_IXOTH))))
 		if (capable(CAP_DAC_READ_SEARCH))
 			return 0;
 	return -EACCES;
diff -urN linux-2.2.17-pre11/include/linux/kmod.h linux/include/linux/kmod.h
--- linux-2.2.17-pre11/include/linux/kmod.h	Tue May 11 10:35:44 1999
+++ linux/include/linux/kmod.h	Mon Dec  3 22:09:27 2001
@@ -6,7 +6,12 @@
 
 #ifdef CONFIG_KMOD
 extern int request_module(const char * name);
+extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]);
 #else
 #define request_module(x) do {} while(0)
+static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
+{
+        return -EACCES;
+}
 #endif
 
diff -urN linux-2.2.17-pre11/include/linux/pci.h linux/include/linux/pci.h
--- linux-2.2.17-pre11/include/linux/pci.h	Mon Dec  3 22:09:21 2001
+++ linux/include/linux/pci.h	Mon Dec  3 22:09:27 2001
@@ -1047,12 +1047,10 @@
 
 #define PCI_VENDOR_ID_TIMEDIA		0x1409
 #define PCI_DEVICE_ID_TIMEDIA_1889	0x7168
+#define PCI_DEVICE_ID_TIMEDIA_4008A	0x7268
 
 #define PCI_VENDOR_ID_AFAVLAB		0x14db
 #define PCI_DEVICE_ID_AFAVLAB_TK9902	0x2120
-
-#define PCI_VENDOR_ID_TIMEDIA		0x1409
-#define PCI_DEVICE_ID_TIMEDIA_4008A	0x7268
 
 #define PCI_VENDOR_ID_SYMPHONY		0x1c1c
 #define PCI_DEVICE_ID_SYMPHONY_101	0x0001
diff -urN linux-2.2.17-pre11/kernel/ksyms.c linux/kernel/ksyms.c
--- linux-2.2.17-pre11/kernel/ksyms.c	Wed Jun  7 14:26:44 2000
+++ linux/kernel/ksyms.c	Mon Dec  3 22:09:27 2001
@@ -75,6 +75,7 @@
 
 #ifdef CONFIG_KMOD
 EXPORT_SYMBOL(request_module);
+EXPORT_SYMBOL(exec_usermodehelper);
 #endif
 
 #ifdef CONFIG_MODULES
