## Automatically generated incremental diff
## From:   linux-2.4.28-bk5
## To:     linux-2.4.28-bk6
## Robot:  $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $

diff -urN linux-2.4.28-bk5/Makefile linux-2.4.28-bk6/Makefile
--- linux-2.4.28-bk5/Makefile	2004-11-25 10:16:56.212957989 -0800
+++ linux-2.4.28-bk6/Makefile	2004-11-25 10:16:59.660096422 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 28
-EXTRAVERSION = -bk5
+EXTRAVERSION = -bk6
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.28-bk5/arch/i386/kernel/microcode.c linux-2.4.28-bk6/arch/i386/kernel/microcode.c
--- linux-2.4.28-bk5/arch/i386/kernel/microcode.c	2004-04-14 06:05:25.000000000 -0700
+++ linux-2.4.28-bk6/arch/i386/kernel/microcode.c	2004-11-25 10:16:59.661096462 -0800
@@ -109,7 +109,10 @@
 #define get_datasize(mc) \
 	(((microcode_t *)mc)->hdr.datasize ? \
 	 ((microcode_t *)mc)->hdr.datasize : DEFAULT_UCODE_DATASIZE)
-#define sigmatch(s1, s2, p1, p2) (((s1) == (s2)) && ((p1) & (p2)))
+
+#define sigmatch(s1, s2, p1, p2) \
+	(((s1) == (s2)) && (((p1) & (p2)) || (((p1) == 0) && ((p2) == 0))))
+
 #define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
 
 /* serialize access to the physical write to MSR 0x79 */
diff -urN linux-2.4.28-bk5/drivers/scsi/ide-scsi.c linux-2.4.28-bk6/drivers/scsi/ide-scsi.c
--- linux-2.4.28-bk5/drivers/scsi/ide-scsi.c	2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.28-bk6/drivers/scsi/ide-scsi.c	2004-11-25 10:17:00.302122205 -0800
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/scsi/ide-scsi.c	Version 0.93    June 10, 2002
+ * linux/drivers/scsi/ide-scsi.c	Version 0.94    Sept 09, 2003
  *
  * Copyright (C) 1996 - 1999 Gadi Oxman <gadio@netvision.net.il>
  * Copyright (C) 2001 - 2002 Andre Hedrick <andre@linux-ide.org>
@@ -35,9 +35,12 @@
  * Ver 0.92  Mar 21 02   Include DevFs support
  *                        Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
  * Ver 0.93  Jun 10 02   Fix "off by one" error in transforms
+ * Ver 0.94  Sep 09 03   Added transform for reading ATAPI tape drive block
+ *                        limits (ATAPI tapes report block limits in mode
+ *                        page 0x2A, not by "read block limits" command)
  */
 
-#define IDESCSI_VERSION "0.93"
+#define IDESCSI_VERSION "0.94"
 
 #include <linux/module.h>
 #include <linux/config.h>
@@ -234,6 +237,25 @@
 			pc->buffer_size += 4;
 		}
 	}
+	if (drive->media == ide_tape) {
+		if (sc[0] == READ_BLOCK_LIMITS) {	/* IDE tapes have blk lmts in mode page 0x2a */
+			if (!scsi_buf)
+				return;
+			/* buffer size should be 6 for READ_BLOCK_LIMITS    */
+			/* we need 12 bytes (4 for header + 8 for mode page */
+			if ((atapi_buf = kmalloc(12, GFP_ATOMIC)) == NULL)
+				return;
+			memset(atapi_buf, 0, 12);
+			memset (c, 0, 12);
+			c[0] = MODE_SENSE;
+			c[1] = 8;  	/* no block descriptors     */
+			c[2] = 0x2A;	/* mode page 0x2A           */
+			c[4] = 12;	/* buffer length 12 decimal */
+			pc->buffer = atapi_buf;
+			pc->request_transfer = 12;
+			pc->buffer_size = 12;
+		}
+	}
 }
 
 static inline void idescsi_transform_pc2 (ide_drive_t *drive, idescsi_pc_t *pc)
@@ -262,7 +284,19 @@
 			/* response data format */
 			scsi_buf[3] = (scsi_buf[3] & 0xf0) | 2;
 		}
+	}	
+	if (drive->media == ide_tape) {
+		if (sc[0] == READ_BLOCK_LIMITS) {
+			memset(scsi_buf, 0, pc->scsi_cmd->request_bufflen);
+			/* granularity of 9 (always 9 for ide tapes) */
+			scsi_buf[0] = 9;
+			/* block length of 1024 bytes supported? */
+			scsi_buf[2] = (atapi_buf[11] & 0x04) ? 4 : 2;
+			/* block length of 512 bytes supported?  */
+			scsi_buf[4] = (atapi_buf[11] & 0x02) ? 2 : 4;
+		}
 	}
+
 	if (atapi_buf && atapi_buf != scsi_buf)
 		kfree(atapi_buf);
 }
diff -urN linux-2.4.28-bk5/include/linux/netlink.h linux-2.4.28-bk6/include/linux/netlink.h
--- linux-2.4.28-bk5/include/linux/netlink.h	2004-08-07 16:26:06.000000000 -0700
+++ linux-2.4.28-bk6/include/linux/netlink.h	2004-11-25 10:17:00.495129956 -0800
@@ -113,6 +113,7 @@
 extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
 extern int netlink_register_notifier(struct notifier_block *nb);
 extern int netlink_unregister_notifier(struct notifier_block *nb);
+extern int netlink_proto_init(void);
 
 /*
  *	skb should fit one page. This choice is good for headerless malloc.
diff -urN linux-2.4.28-bk5/lib/rwsem-spinlock.c linux-2.4.28-bk6/lib/rwsem-spinlock.c
--- linux-2.4.28-bk5/lib/rwsem-spinlock.c	2004-08-07 16:26:06.000000000 -0700
+++ linux-2.4.28-bk6/lib/rwsem-spinlock.c	2004-11-25 10:17:00.655136382 -0800
@@ -32,7 +32,7 @@
 /*
  * initialise the semaphore
  */
-void init_rwsem(struct rw_semaphore *sem)
+void fastcall init_rwsem(struct rw_semaphore *sem)
 {
 	sem->activity = 0;
 	spin_lock_init(&sem->wait_lock);
@@ -120,7 +120,7 @@
 /*
  * get a read lock on the semaphore
  */
-void __down_read(struct rw_semaphore *sem)
+void fastcall __down_read(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter waiter;
 	struct task_struct *tsk;
@@ -166,7 +166,7 @@
 /*
  * trylock for reading -- returns 1 if successful, 0 if contention
  */
-int __down_read_trylock(struct rw_semaphore *sem)
+int fastcall __down_read_trylock(struct rw_semaphore *sem)
 {
 	int ret = 0;
 	rwsemtrace(sem,"Entering __down_read_trylock");
@@ -189,7 +189,7 @@
  * get a write lock on the semaphore
  * - note that we increment the waiting count anyway to indicate an exclusive lock
  */
-void __down_write(struct rw_semaphore *sem)
+void fastcall __down_write(struct rw_semaphore *sem)
 {
 	struct rwsem_waiter waiter;
 	struct task_struct *tsk;
@@ -235,7 +235,7 @@
 /*
  * trylock for writing -- returns 1 if successful, 0 if contention
  */
-int __down_write_trylock(struct rw_semaphore *sem)
+int fastcall __down_write_trylock(struct rw_semaphore *sem)
 {
 	int ret = 0;
 	rwsemtrace(sem,"Entering __down_write_trylock");
@@ -257,7 +257,7 @@
 /*
  * release a read lock on the semaphore
  */
-void __up_read(struct rw_semaphore *sem)
+void fastcall __up_read(struct rw_semaphore *sem)
 {
 	rwsemtrace(sem,"Entering __up_read");
 
@@ -274,7 +274,7 @@
 /*
  * release a write lock on the semaphore
  */
-void __up_write(struct rw_semaphore *sem)
+void fastcall __up_write(struct rw_semaphore *sem)
 {
 	rwsemtrace(sem,"Entering __up_write");
 
diff -urN linux-2.4.28-bk5/net/netlink/af_netlink.c linux-2.4.28-bk6/net/netlink/af_netlink.c
--- linux-2.4.28-bk5/net/netlink/af_netlink.c	2004-11-25 10:16:56.706977828 -0800
+++ linux-2.4.28-bk6/net/netlink/af_netlink.c	2004-11-25 10:17:00.662136663 -0800
@@ -283,7 +283,7 @@
 
 static int netlink_insert(struct sock *sk, u32 pid)
 {
-	struct nl_pid_hash *hash = &nl_table[sk->sk_protocol].hash;
+	struct nl_pid_hash *hash = &nl_table[sk->protocol].hash;
 	struct sock **head;
 	int err = -EADDRINUSE;
 	struct sock *osk;
@@ -325,7 +325,7 @@
 static void netlink_remove(struct sock *sk)
 {
 	struct sock **skp;
-	struct netlink_table *table = &nl_table[sk->sk_protocol];
+	struct netlink_table *table = &nl_table[sk->protocol];
 	struct nl_pid_hash *hash = &table->hash;
 
 	netlink_table_grab();
@@ -425,7 +425,7 @@
 static int netlink_autobind(struct socket *sock)
 {
 	struct sock *sk = sock->sk;
-	struct nl_pid_hash *hash = &nl_table[sk->sk_protocol].hash;
+	struct nl_pid_hash *hash = &nl_table[sk->protocol].hash;
 	struct sock *osk;
 	s32 pid = current->pid;
 	int err;
@@ -488,7 +488,7 @@
 		return 0;
 
 	netlink_table_grab();
-	skp = &nl_table[sk->sk_protocol].mc_list;
+	skp = &nl_table[sk->protocol].mc_list;
 	if (nlk->groups && !nladdr->nl_groups) {
 		for (; *skp; skp = &((*skp)->bind_next)) {
 			if (*skp == sk) {
@@ -720,7 +720,7 @@
 
 	netlink_lock_table();
 
-	for (sk = nl_table[ssk->sk_protocol].mc_list; sk; sk = sk->bind_next)
+	for (sk = nl_table[ssk->protocol].mc_list; sk; sk = sk->bind_next)
 		do_one_broadcast(sk, &info);
 
 	netlink_unlock_table();
@@ -748,8 +748,8 @@
 	if (nlk->pid == p->pid || !(nlk->groups & p->group))
 		goto out;
 
-	sk->sk_err = p->code;
-	sk->sk_error_report(sk);
+	sk->err = p->code;
+	sk->error_report(sk);
 out:
 	return 0;
 }
@@ -765,7 +765,7 @@
 	info.code = code;
 
 	read_lock(&nl_table_lock);
-	for (sk = nl_table[ssk->sk_protocol].mc_list; sk; sk = sk->bind_next)
+	for (sk = nl_table[ssk->protocol].mc_list; sk; sk = sk->bind_next)
 		do_one_set_err(sk, &info);
 	read_unlock(&nl_table_lock);
 }
@@ -1231,7 +1231,7 @@
 
 extern void netlink_skb_parms_too_large(void);
 
-static int __init netlink_proto_init(void)
+int __init netlink_proto_init(void)
 {
 	struct sk_buff *dummy_skb;
 	int i;
@@ -1298,5 +1298,7 @@
 	nl_table = NULL;
 }
 
+#ifdef MODULE
 module_init(netlink_proto_init);
+#endif
 module_exit(netlink_proto_exit);
diff -urN linux-2.4.28-bk5/net/socket.c linux-2.4.28-bk6/net/socket.c
--- linux-2.4.28-bk5/net/socket.c	2004-11-17 03:54:22.000000000 -0800
+++ linux-2.4.28-bk6/net/socket.c	2004-11-25 10:17:00.663136703 -0800
@@ -1716,6 +1716,7 @@
 	 */
 
 #ifdef CONFIG_NET
+	netlink_proto_init();
 	rtnetlink_init();
 #endif
 #ifdef CONFIG_NETLINK_DEV
