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

diff -urN linux-2.4.27-rc2/Documentation/Configure.help linux-2.4.27-rc3/Documentation/Configure.help
--- linux-2.4.27-rc2/Documentation/Configure.help	2004-07-03 16:49:26.242559312 -0700
+++ linux-2.4.27-rc3/Documentation/Configure.help	2004-07-03 16:49:28.240646382 -0700
@@ -16227,6 +16227,27 @@
    Say "y" to link the driver statically, or "m" to build a
    dynamically linked module called "g_ether".
 
+CONFIG_USB_ETH_RNDIS
+  Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
+  and Microsoft provides redistributable binary RNDIS drivers for
+  older versions of Windows.
+
+  If you say "y" here, the Ethernet gadget driver will try to provide
+  a second device configuration, supporting RNDIS to talk to such
+  Microsoft USB hosts.
+
+CONFIG_USB_FILE_STORAGE
+  The File-backed Storage Gadget acts as a USB Mass Storage
+  disk drive.  As its storage repository it can use a regular
+  file or a block device (in much the same way as the "loop"
+  device driver), specified as a module parameter.
+
+CONFIG_USB_FILE_STORAGE_TEST
+  Say "y" to generate the larger testing version of the
+  File-backed Storage Gadget, useful for probing the
+  behavior of USB Mass Storage hosts.  Not needed for
+  normal operation.
+
 Always do synchronous disk IO for UBD
 CONFIG_BLK_DEV_UBD_SYNC
   The User-Mode Linux port includes a driver called UBD which will let
diff -urN linux-2.4.27-rc2/Makefile linux-2.4.27-rc3/Makefile
--- linux-2.4.27-rc2/Makefile	2004-07-03 16:49:26.440567941 -0700
+++ linux-2.4.27-rc3/Makefile	2004-07-03 16:49:28.248646731 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 27
-EXTRAVERSION = -rc2
+EXTRAVERSION = -rc3
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.27-rc2/arch/ppc/cpm2_io/fcc_enet.c linux-2.4.27-rc3/arch/ppc/cpm2_io/fcc_enet.c
--- linux-2.4.27-rc2/arch/ppc/cpm2_io/fcc_enet.c	2004-04-14 06:05:27.000000000 -0700
+++ linux-2.4.27-rc3/arch/ppc/cpm2_io/fcc_enet.c	2004-07-03 16:49:28.273647821 -0700
@@ -305,6 +305,8 @@
 	ushort	skb_cur;
 	ushort	skb_dirty;
 
+	atomic_t n_pkts;        /* Number of packets in tx ring */
+
 	/* CPM dual port RAM relative addresses.
 	*/
 	cbd_t	*rx_bd_base;		/* Address of Rx and Tx buffers. */
@@ -396,13 +398,15 @@
 	bdp->cbd_datlen = skb->len;
 	bdp->cbd_bufaddr = __pa(skb->data);
 
+	spin_lock_irq(&cep->lock);
+
 	/* Save skb pointer. */
 	cep->tx_skbuff[cep->skb_cur] = skb;
 
 	cep->stats.tx_bytes += skb->len;
 	cep->skb_cur = (cep->skb_cur+1) & TX_RING_MOD_MASK;
 
-	spin_lock_irq(&cep->lock);
+	atomic_inc(&cep->n_pkts);
 
 	/* Send it on its way.  Tell CPM its ready, interrupt when done,
 	 * its the last BD of the frame, and to put the CRC on the end.
@@ -421,9 +425,12 @@
 	else
 		bdp++;
 
-	if (bdp->cbd_sc & BD_ENET_TX_READY) {
-		netif_stop_queue(dev);
+	/* If the tx_ring is full, stop the queue */
+	if (atomic_read(&cep->n_pkts) >= (TX_RING_SIZE-1)) {
+	  if (!netif_queue_stopped(dev)) {
+	  	netif_stop_queue(dev);
 		cep->tx_full = 1;
+	  }
 	}
 
 	cep->cur_tx = (cbd_t *)bdp;
@@ -542,6 +549,8 @@
 		dev_kfree_skb_irq(cep->tx_skbuff[cep->skb_dirty]);
 		cep->skb_dirty = (cep->skb_dirty + 1) & TX_RING_MOD_MASK;
 
+		atomic_dec(&cep->n_pkts);
+
 		/* Update pointer to next buffer descriptor to be transmitted. */
 		if (bdp->cbd_sc & BD_ENET_TX_WRAP)
 			bdp = cep->tx_bd_base;
@@ -1782,6 +1791,7 @@
 	while (cp->cp_cpcr & CPM_CR_FLG);
 
 	cep->skb_cur = cep->skb_dirty = 0;
+	atomic_set(&cep->n_pkts, 0);
 }
 
 /* Let 'er rip.
diff -urN linux-2.4.27-rc2/fs/attr.c linux-2.4.27-rc3/fs/attr.c
--- linux-2.4.27-rc2/fs/attr.c	2002-02-25 11:38:07.000000000 -0800
+++ linux-2.4.27-rc3/fs/attr.c	2004-07-03 16:49:31.564791236 -0700
@@ -33,7 +33,8 @@
 
 	/* Make sure caller can chgrp. */
 	if ((ia_valid & ATTR_GID) &&
-	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&
+	    (current->fsuid != inode->i_uid ||
+	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
 	    !capable(CAP_CHOWN))
 		goto error;
 
diff -urN linux-2.4.27-rc2/include/linux/netlink.h linux-2.4.27-rc3/include/linux/netlink.h
--- linux-2.4.27-rc2/include/linux/netlink.h	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.27-rc3/include/linux/netlink.h	2004-07-03 16:49:31.715797816 -0700
@@ -67,7 +67,8 @@
 #define NLMSG_DATA(nlh)  ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
 #define NLMSG_NEXT(nlh,len)	 ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
 				  (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
-#define NLMSG_OK(nlh,len) ((len) > 0 && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
+#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \
+			   (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
 			   (nlh)->nlmsg_len <= (len))
 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
 
diff -urN linux-2.4.27-rc2/include/linux/rtnetlink.h linux-2.4.27-rc3/include/linux/rtnetlink.h
--- linux-2.4.27-rc2/include/linux/rtnetlink.h	2004-07-03 16:49:27.031593696 -0700
+++ linux-2.4.27-rc3/include/linux/rtnetlink.h	2004-07-03 16:49:31.720798034 -0700
@@ -64,7 +64,8 @@
 
 #define RTA_ALIGNTO	4
 #define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
-#define RTA_OK(rta,len) ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \
+#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \
+			 (rta)->rta_len >= sizeof(struct rtattr) && \
 			 (rta)->rta_len <= (len))
 #define RTA_NEXT(rta,attrlen)	((attrlen) -= RTA_ALIGN((rta)->rta_len), \
 				 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
diff -urN linux-2.4.27-rc2/net/bridge/br_stp.c linux-2.4.27-rc3/net/bridge/br_stp.c
--- linux-2.4.27-rc2/net/bridge/br_stp.c	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.27-rc3/net/bridge/br_stp.c	2004-07-03 16:49:31.741798949 -0700
@@ -20,7 +20,10 @@
 #include "br_private.h"
 #include "br_private_stp.h"
 
-
+/* since time values in bpdu are in jiffies and then scaled (1/256)
+ * before sending, make sure that is at least one.
+ */
+#define MESSAGE_AGE_INCR	((HZ < 256) ? 1 : (HZ/256))
 
 /* called under ioctl_lock or bridge lock */
 int br_is_root_bridge(struct net_bridge *br)
@@ -160,24 +163,26 @@
 	bpdu.root_path_cost = br->root_path_cost;
 	bpdu.bridge_id = br->bridge_id;
 	bpdu.port_id = p->port_id;
-	bpdu.message_age = 0;
-	if (!br_is_root_bridge(br)) {
+	if (br_is_root_bridge(br)) 
+		bpdu.message_age = 0;
+	else {
 		struct net_bridge_port *root;
-		unsigned long age;
 
 		root = br_get_port(br, br->root_port);
-		age = br_timer_get_residue(&root->message_age_timer) + 1;
-		bpdu.message_age = age;
+		bpdu.message_age =  br_timer_get_residue(&root->message_age_timer)
+			+ MESSAGE_AGE_INCR;
 	}
 	bpdu.max_age = br->max_age;
 	bpdu.hello_time = br->hello_time;
 	bpdu.forward_delay = br->forward_delay;
 
-	br_send_config_bpdu(p, &bpdu);
+	if (bpdu.message_age < br->max_age) {
+		br_send_config_bpdu(p, &bpdu);
 
-	p->topology_change_ack = 0;
-	p->config_pending = 0;
-	br_timer_set(&p->hold_timer, jiffies);
+		p->topology_change_ack = 0;
+		p->config_pending = 0;
+		br_timer_set(&p->hold_timer, jiffies);
+	}
 }
 
 /* called under bridge lock */
diff -urN linux-2.4.27-rc2/net/core/sock.c linux-2.4.27-rc3/net/core/sock.c
--- linux-2.4.27-rc2/net/core/sock.c	2004-04-14 06:05:41.000000000 -0700
+++ linux-2.4.27-rc3/net/core/sock.c	2004-07-03 16:49:31.744799080 -0700
@@ -516,7 +516,7 @@
 				v.tm.tv_usec = 0;
 			} else {
 				v.tm.tv_sec = sk->rcvtimeo/HZ;
-				v.tm.tv_usec = ((sk->rcvtimeo%HZ)*1000)/HZ;
+				v.tm.tv_usec = ((sk->rcvtimeo%HZ)*1000000)/HZ;
 			}
 			break;
 
@@ -527,7 +527,7 @@
 				v.tm.tv_usec = 0;
 			} else {
 				v.tm.tv_sec = sk->sndtimeo/HZ;
-				v.tm.tv_usec = ((sk->sndtimeo%HZ)*1000)/HZ;
+				v.tm.tv_usec = ((sk->sndtimeo%HZ)*1000000)/HZ;
 			}
 			break;
 
diff -urN linux-2.4.27-rc2/net/ipv4/netfilter/ip_fw_compat_masq.c linux-2.4.27-rc3/net/ipv4/netfilter/ip_fw_compat_masq.c
--- linux-2.4.27-rc2/net/ipv4/netfilter/ip_fw_compat_masq.c	2004-01-05 05:53:56.000000000 -0800
+++ linux-2.4.27-rc3/net/ipv4/netfilter/ip_fw_compat_masq.c	2004-07-03 16:49:31.753799472 -0700
@@ -15,6 +15,7 @@
 #include <linux/proc_fs.h>
 #include <linux/version.h>
 #include <linux/module.h>
+#include <net/ip.h>
 #include <net/route.h>
 
 #define ASSERT_READ_LOCK(x) MUST_BE_READ_LOCKED(&ip_conntrack_lock)
