## Automatically generated incremental diff
## From:   linux-2.5.75-bk2
## To:     linux-2.5.75-bk3
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.5.75-bk2/MAINTAINERS linux-2.5.75-bk3/MAINTAINERS
--- linux-2.5.75-bk2/MAINTAINERS	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/MAINTAINERS	2003-07-13 04:37:53.000000000 -0700
@@ -879,6 +879,8 @@
 S:	Supported 
 
 IDE DRIVER [GENERAL]
+P:	Bartlomiej Zolnierkiewicz
+M:	B.Zolnierkiewicz@elka.pw.edu.pl
 L:	linux-kernel@vger.kernel.org
 L:	linux-ide@vger.kernel.org
 S:	Maintained
diff -urN linux-2.5.75-bk2/Makefile linux-2.5.75-bk3/Makefile
--- linux-2.5.75-bk2/Makefile	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/Makefile	2003-07-13 04:37:53.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 75
-EXTRAVERSION = -bk2
+EXTRAVERSION = -bk3
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
diff -urN linux-2.5.75-bk2/arch/i386/kernel/entry.S linux-2.5.75-bk3/arch/i386/kernel/entry.S
--- linux-2.5.75-bk2/arch/i386/kernel/entry.S	2003-07-10 13:06:48.000000000 -0700
+++ linux-2.5.75-bk3/arch/i386/kernel/entry.S	2003-07-13 04:37:53.000000000 -0700
@@ -876,6 +876,7 @@
  	.long sys_clock_nanosleep
 	.long sys_statfs64
 	.long sys_fstatfs64	
-	.long sys_tgkill
+	.long sys_tgkill	/* 270 */
+	.long sys_utimes
  
 nr_syscalls=(.-sys_call_table)/4
diff -urN linux-2.5.75-bk2/arch/x86_64/boot/setup.S linux-2.5.75-bk3/arch/x86_64/boot/setup.S
--- linux-2.5.75-bk2/arch/x86_64/boot/setup.S	2003-07-10 13:14:59.000000000 -0700
+++ linux-2.5.75-bk3/arch/x86_64/boot/setup.S	2003-07-13 04:37:53.000000000 -0700
@@ -350,6 +350,11 @@
 sse_ok:
 	popw	%ds
 	
+# tell BIOS we want to go to long mode
+	movl  $0xec00,%eax	# declare target operating mode
+	movl  $2,%ebx		# long mode
+	int $0x15			
+	
 # Get memory size (extended mem, kB)
 
 	xorl	%eax, %eax
diff -urN linux-2.5.75-bk2/arch/x86_64/ia32/ipc32.c linux-2.5.75-bk3/arch/x86_64/ia32/ipc32.c
--- linux-2.5.75-bk2/arch/x86_64/ia32/ipc32.c	2003-07-10 13:08:51.000000000 -0700
+++ linux-2.5.75-bk3/arch/x86_64/ia32/ipc32.c	2003-07-13 04:37:53.000000000 -0700
@@ -271,7 +271,7 @@
 		fourth.__pad = &s;
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
-		err = sys_semctl(first, second, third|IPC_64, fourth);
+		err = sys_semctl(first, second, third, fourth);
 		set_fs(old_fs);
 		if (!err)
 			err = put_semid((void *)A(pad), &s, version);
@@ -396,7 +396,7 @@
 	      case MSG_STAT:
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
-		err = sys_msgctl(first, second|IPC_64, (void *) &m64);
+		err = sys_msgctl(first, second, (void *) &m64);
 		set_fs(old_fs);
 		if (version == IPC_64) {
 			if (!access_ok(VERIFY_WRITE, up64, sizeof(*up64))) {
@@ -529,7 +529,7 @@
 	      case IPC_INFO:
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
-		err = sys_shmctl(first, second|IPC_64, (struct shmid_ds *)&smi);
+		err = sys_shmctl(first, second, (struct shmid_ds *)&smi);
 		set_fs(old_fs);
 
 		if (version == IPC_64) {
@@ -587,7 +587,7 @@
 	      case SHM_STAT:
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
-		err = sys_shmctl(first, second|IPC_64, (void *) &s64);
+		err = sys_shmctl(first, second, (void *) &s64);
 		set_fs(old_fs);
 		
 		if (err < 0)
diff -urN linux-2.5.75-bk2/arch/x86_64/kernel/x8664_ksyms.c linux-2.5.75-bk3/arch/x86_64/kernel/x8664_ksyms.c
--- linux-2.5.75-bk2/arch/x86_64/kernel/x8664_ksyms.c	2003-07-10 13:05:33.000000000 -0700
+++ linux-2.5.75-bk3/arch/x86_64/kernel/x8664_ksyms.c	2003-07-13 04:37:53.000000000 -0700
@@ -214,5 +214,7 @@
 
 EXPORT_SYMBOL(clear_page);
 
+#ifdef CONFIG_SMP
 EXPORT_SYMBOL(flush_tlb_page);
 EXPORT_SYMBOL_GPL(flush_tlb_all);
+#endif
diff -urN linux-2.5.75-bk2/drivers/block/as-iosched.c linux-2.5.75-bk3/drivers/block/as-iosched.c
--- linux-2.5.75-bk2/drivers/block/as-iosched.c	2003-07-10 13:04:00.000000000 -0700
+++ linux-2.5.75-bk3/drivers/block/as-iosched.c	2003-07-13 04:37:53.000000000 -0700
@@ -837,7 +837,7 @@
 		aic->seek_total += 256*seek_dist;
 		if (aic->seek_samples) {
 			aic->seek_mean = aic->seek_total + 128;
-			do_div(aic->seek_mean, aic->seek_samples);
+			sector_div(aic->seek_mean, aic->seek_samples);
 		}
 		aic->seek_samples = (aic->seek_samples>>1)
 					+ (aic->seek_samples>>2);
diff -urN linux-2.5.75-bk2/drivers/char/drm/drm_drv.h linux-2.5.75-bk3/drivers/char/drm/drm_drv.h
--- linux-2.5.75-bk2/drivers/char/drm/drm_drv.h	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/drivers/char/drm/drm_drv.h	2003-07-13 04:37:53.000000000 -0700
@@ -88,6 +88,10 @@
 #ifndef __HAVE_SG
 #define __HAVE_SG			0
 #endif
+/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the drm modules in
+ * the DRI cvs tree, but it is required by the kernel tree's sparc
+ * driver.
+ */
 #ifndef __HAVE_KERNEL_CTX_SWITCH
 #define __HAVE_KERNEL_CTX_SWITCH	0
 #endif
@@ -1108,6 +1112,10 @@
 			DRIVER_DMA_QUIESCENT();
 		}
 #endif
+		/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the
+		 * drm modules in the DRI cvs tree, but it is required
+		 * by the Sparc driver.
+		 */
 #if __HAVE_KERNEL_CTX_SWITCH
 		if ( dev->last_context != lock.context ) {
 			DRM(context_switch)(dev, dev->last_context,
@@ -1150,6 +1158,10 @@
 
 	atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] );
 
+	/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the drm
+	 * modules in the DRI cvs tree, but it is required by the
+	 * Sparc driver.
+	 */
 #if __HAVE_KERNEL_CTX_SWITCH
 	/* We no longer really hold it, but if we are the next
 	 * agent to request it then we should just be able to
@@ -1175,13 +1187,9 @@
 	DRM(dma_schedule)( dev, 1 );
 #endif
 
-	/* FIXME: Do we ever really need to check this???
-	 */
-	if ( 1 /* !dev->context_flag */ ) {
-		if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock,
-				     DRM_KERNEL_CONTEXT ) ) {
-			DRM_ERROR( "\n" );
-		}
+	if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock,
+			     DRM_KERNEL_CONTEXT ) ) {
+		DRM_ERROR( "\n" );
 	}
 #endif /* !__HAVE_KERNEL_CTX_SWITCH */
 
diff -urN linux-2.5.75-bk2/drivers/ide/ide-cd.c linux-2.5.75-bk3/drivers/ide/ide-cd.c
--- linux-2.5.75-bk2/drivers/ide/ide-cd.c	2003-07-10 13:08:53.000000000 -0700
+++ linux-2.5.75-bk3/drivers/ide/ide-cd.c	2003-07-13 04:37:53.000000000 -0700
@@ -749,12 +749,17 @@
 		   by transferring the semaphore from the packet
 		   command request to the request sense request. */
 
+		rq->flags |= REQ_FAILED;
 		if ((stat & ERR_STAT) != 0) {
 			wait = rq->waiting;
 			rq->waiting = NULL;
+			if ((rq->flags & REQ_BLOCK_PC) != 0) {
+				cdrom_queue_request_sense(drive, wait,
+							  rq->sense, rq);
+				return 1; /* REQ_BLOCK_PC self-cares */
+			}
 		}
 
-		rq->flags |= REQ_FAILED;
 		cdrom_end_request(drive, 0);
 
 		if ((stat & ERR_STAT) != 0)
@@ -1657,13 +1662,14 @@
 	dma = info->dma;
 	if (dma) {
 		info->dma = 0;
-		if ((dma_error = HWIF(drive)->ide_dma_end(drive))) {
-			printk("ide-cd: dma error\n");
-			HWIF(drive)->ide_dma_off(drive);
-		}
+		dma_error = HWIF(drive)->ide_dma_end(drive);
 	}
 
 	if (cdrom_decode_status(drive, 0, &stat)) {
+		if ((stat & ERR_STAT) != 0) {
+			end_that_request_chunk(rq, 0, rq->data_len);
+			goto end_request; /* purge the whole thing... */
+		}
 		end_that_request_chunk(rq, 1, rq->data_len);
 		return ide_stopped;
 	}
@@ -1672,8 +1678,11 @@
 	 * using dma, transfer is complete now
 	 */
 	if (dma) {
-		if (dma_error)
+		if (dma_error) {
+			printk("ide-cd: dma error\n");
+			HWIF(drive)->ide_dma_off(drive);
 			return DRIVER(drive)->error(drive, "dma error", stat);
+		}
 
 		end_that_request_chunk(rq, 1, rq->data_len);
 		rq->data_len = 0;
diff -urN linux-2.5.75-bk2/drivers/pcmcia/ti113x.h linux-2.5.75-bk3/drivers/pcmcia/ti113x.h
--- linux-2.5.75-bk2/drivers/pcmcia/ti113x.h	2003-07-10 13:08:07.000000000 -0700
+++ linux-2.5.75-bk3/drivers/pcmcia/ti113x.h	2003-07-13 04:37:53.000000000 -0700
@@ -176,6 +176,9 @@
 	if (new != reg)
 		exca_writeb(socket, I365_INTCTL, new);
 
+#if 0
+	/* THIS CAUSES HANGS! Disabled for now, do not know why */
+
 	/*
 	 * If ISA interrupts don't work, then fall back to routing card
 	 * interrupts to the PCI interrupt of the socket.
@@ -195,6 +198,7 @@
 		config_writel(socket, TI122X_IRQMUX, irqmux);
 		config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
 	}
+#endif
 
 	socket->socket.ss_entry->init = ti_init;
 	return 0;
diff -urN linux-2.5.75-bk2/include/asm-generic/div64.h linux-2.5.75-bk3/include/asm-generic/div64.h
--- linux-2.5.75-bk2/include/asm-generic/div64.h	2003-07-10 13:14:11.000000000 -0700
+++ linux-2.5.75-bk3/include/asm-generic/div64.h	2003-07-13 04:37:54.000000000 -0700
@@ -32,11 +32,15 @@
 
 #elif BITS_PER_LONG == 32
 
-extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor) __attribute_pure__;
+extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
 
+/* The unnecessary pointer compare is there
+ * to check for type safety (n must be 64bit)
+ */
 # define do_div(n,base) ({				\
 	uint32_t __base = (base);			\
 	uint32_t __rem;					\
+	(void)(((typeof((n)) *)0) == ((uint64_t *)0));	\
 	if (likely(((n) >> 32) == 0)) {			\
 		__rem = (uint32_t)(n) % __base;		\
 		(n) = (uint32_t)(n) / __base;		\
diff -urN linux-2.5.75-bk2/include/asm-i386/unistd.h linux-2.5.75-bk3/include/asm-i386/unistd.h
--- linux-2.5.75-bk2/include/asm-i386/unistd.h	2003-07-10 13:12:09.000000000 -0700
+++ linux-2.5.75-bk3/include/asm-i386/unistd.h	2003-07-13 04:37:54.000000000 -0700
@@ -276,8 +276,9 @@
 #define __NR_statfs64		268
 #define __NR_fstatfs64		269
 #define __NR_tgkill		270
+#define __NR_utimes		271
 
-#define NR_syscalls 271
+#define NR_syscalls 272
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
 
diff -urN linux-2.5.75-bk2/include/linux/sysctl.h linux-2.5.75-bk3/include/linux/sysctl.h
--- linux-2.5.75-bk2/include/linux/sysctl.h	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/include/linux/sysctl.h	2003-07-13 04:37:54.000000000 -0700
@@ -6,16 +6,10 @@
  ****************************************************************
  ****************************************************************
  **
- **  WARNING:  
  **  The values in this file are exported to user space via 
- **  the sysctl() binary interface.  Do *NOT* change the 
- **  numbering of any existing values here, and do not change
- **  any numbers within any one set of values.  If you have
- **  to redefine an existing interface, use a new number for it.
- **  The kernel will then return ENOTDIR to any application using
- **  the old binary interface.
- **
- **  --sct
+ **  the sysctl() binary interface.  However this interface
+ **  is unstable and deprecated and will be removed in the future. 
+ **  For a stable interface use /proc/sys.
  **
  ****************************************************************
  ****************************************************************
diff -urN linux-2.5.75-bk2/init/version.c linux-2.5.75-bk3/init/version.c
--- linux-2.5.75-bk2/init/version.c	2003-07-10 13:09:03.000000000 -0700
+++ linux-2.5.75-bk3/init/version.c	2003-07-13 04:37:54.000000000 -0700
@@ -17,8 +17,12 @@
 int version_string(LINUX_VERSION_CODE);
 
 struct new_utsname system_utsname = {
-	UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION,
-	UTS_MACHINE, UTS_DOMAINNAME
+	.sysname	= UTS_SYSNAME,
+	.nodename	= UTS_NODENAME,
+	.release	= UTS_RELEASE,
+	.version	= UTS_VERSION,
+	.machine	= UTS_MACHINE,
+	.domainname	= UTS_DOMAINNAME,
 };
 
 const char *linux_banner = 
diff -urN linux-2.5.75-bk2/kernel/sysctl.c linux-2.5.75-bk3/kernel/sysctl.c
--- linux-2.5.75-bk2/kernel/sysctl.c	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/kernel/sysctl.c	2003-07-13 04:37:54.000000000 -0700
@@ -852,7 +852,16 @@
 
 	if (copy_from_user(&tmp, args, sizeof(tmp)))
 		return -EFAULT;
-		
+	
+	if (tmp.nlen != 2 || tmp.name[0] != CTL_KERN ||
+	    tmp.name[1] != KERN_VERSION) { 
+		int i;
+		printk(KERN_INFO "%s: numerical sysctl ", current->comm); 
+		for (i = 0; i < tmp.nlen; i++) 
+			printk("%d ", tmp.name[i]); 
+		printk("is obsolete.\n");
+	} 
+
 	lock_kernel();
 	error = do_sysctl(tmp.name, tmp.nlen, tmp.oldval, tmp.oldlenp,
 			  tmp.newval, tmp.newlen);
diff -urN linux-2.5.75-bk2/lib/vsprintf.c linux-2.5.75-bk3/lib/vsprintf.c
--- linux-2.5.75-bk2/lib/vsprintf.c	2003-07-10 13:14:14.000000000 -0700
+++ linux-2.5.75-bk3/lib/vsprintf.c	2003-07-13 04:37:54.000000000 -0700
@@ -127,7 +127,7 @@
 #define SPECIAL	32		/* 0x */
 #define LARGE	64		/* use 'ABCDEF' instead of 'abcdef' */
 
-static char * number(char * buf, char * end, long long num, int base, int size, int precision, int type)
+static char * number(char * buf, char * end, unsigned long long num, int base, int size, int precision, int type)
 {
 	char c,sign,tmp[66];
 	const char *digits;
@@ -143,9 +143,9 @@
 	c = (type & ZEROPAD) ? '0' : ' ';
 	sign = 0;
 	if (type & SIGN) {
-		if (num < 0) {
+		if ((signed long long) num < 0) {
 			sign = '-';
-			num = -num;
+			num = - (signed long long) num;
 			size--;
 		} else if (type & PLUS) {
 			sign = '+';
diff -urN linux-2.5.75-bk2/mm/vmscan.c linux-2.5.75-bk3/mm/vmscan.c
--- linux-2.5.75-bk2/mm/vmscan.c	2003-07-10 13:05:27.000000000 -0700
+++ linux-2.5.75-bk3/mm/vmscan.c	2003-07-13 04:37:54.000000000 -0700
@@ -147,7 +147,7 @@
 
 	pages = nr_used_zone_pages();
 	list_for_each_entry(shrinker, &shrinker_list, list) {
-		long long delta;
+		unsigned long long delta;
 
 		delta = scanned * shrinker->seeks;
 		delta *= (*shrinker->shrinker)(0, gfp_mask);
diff -urN linux-2.5.75-bk2/sound/oss/ad1889.c linux-2.5.75-bk3/sound/oss/ad1889.c
--- linux-2.5.75-bk2/sound/oss/ad1889.c	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/sound/oss/ad1889.c	2003-07-13 04:37:54.000000000 -0700
@@ -236,16 +236,23 @@
 
 	for (i = 0; i < AD_MAX_STATES; i++) {
 		dmabuf = &dev->state[i].dmabuf;
-		if ((dmabuf->rawbuf = kmalloc(DMA_SIZE, GFP_KERNEL|GFP_DMA)) == NULL)
-			return NULL;
+		dmabuf->rawbuf = kmalloc(DMA_SIZE, GFP_KERNEL|GFP_DMA);
+		if (!dmabuf->rawbuf)
+			goto err_free_dmabuf;
 		dmabuf->rawbuf_size = DMA_SIZE;
 		dmabuf->dma_handle = 0;
 		dmabuf->rd_ptr = dmabuf->wr_ptr = dmabuf->dma_len = 0UL;
 		dmabuf->ready = 0;
 		dmabuf->rate = 44100;
 	}
-
+out:
 	return dev;
+
+err_free_dmabuf:
+	while (--i >= 0)
+		kfree(dev->state[i].dmabuf.rawbuf);
+	kfree(dev);
+	return NULL;
 }
 
 static void ad1889_free_dev(ad1889_dev_t *dev)
diff -urN linux-2.5.75-bk2/sound/oss/maestro.c linux-2.5.75-bk3/sound/oss/maestro.c
--- linux-2.5.75-bk2/sound/oss/maestro.c	2003-07-13 04:37:50.000000000 -0700
+++ linux-2.5.75-bk3/sound/oss/maestro.c	2003-07-13 04:37:54.000000000 -0700
@@ -726,6 +726,12 @@
 			left = (left * mh->scale) / 100;
 			if ((left == 0) && (right == 0))
 				val |= 0x8000;
+		} else if (mixer == SOUND_MIXER_PCM || mixer == SOUND_MIXER_CD) {
+			/* log conversion seems bad for them */
+			if ((left == 0) && (right == 0))
+				val = 0x8000;
+			right = ((100 - right) * mh->scale) / 100;
+			left = ((100 - left) * mh->scale) / 100;
 		} else {
 			/* log conversion for the stereo controls */
 			if((left == 0) && (right == 0))
@@ -1937,12 +1943,12 @@
 		   manner by adjusting the master mixer volume. */
 		volume = c->mix.mixer_state[0] & 0xff;
 		if (vol_evt == UP_EVT) {
-			volume += 10;
+			volume += 5;
 			if (volume > 100)
 				volume = 100;
 		}
 		else if (vol_evt == DOWN_EVT) {
-			volume -= 10;
+			volume -= 5;
 			if (volume < 0)
 				volume = 0;
 		} else {
