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

diff -urN linux-2.4.28-rc3/Makefile linux-2.4.28-rc4/Makefile
--- linux-2.4.28-rc3/Makefile	2004-11-16 18:47:44.867697030 -0800
+++ linux-2.4.28-rc4/Makefile	2004-11-16 18:47:48.790856726 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 28
-EXTRAVERSION = -rc3
+EXTRAVERSION = -rc4
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.28-rc3/drivers/acpi/system.c linux-2.4.28-rc4/drivers/acpi/system.c
--- linux-2.4.28-rc3/drivers/acpi/system.c	2004-04-14 06:05:29.000000000 -0700
+++ linux-2.4.28-rc4/drivers/acpi/system.c	2004-11-16 18:47:49.023866211 -0800
@@ -102,7 +102,6 @@
 		BUG();
 	/* Some SMP machines only can poweroff in boot CPU */
 	set_cpus_allowed(current, 1UL << cpu_logical_map(0));
-	acpi_system_save_state(ACPI_STATE_S5);
 	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
 	ACPI_DISABLE_IRQS();
 	acpi_enter_sleep_state(ACPI_STATE_S5);
diff -urN linux-2.4.28-rc3/drivers/net/tg3.c linux-2.4.28-rc4/drivers/net/tg3.c
--- linux-2.4.28-rc3/drivers/net/tg3.c	2004-11-16 18:47:45.527723897 -0800
+++ linux-2.4.28-rc4/drivers/net/tg3.c	2004-11-16 18:47:49.198873335 -0800
@@ -59,8 +59,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"3.13"
-#define DRV_MODULE_RELDATE	"November 1, 2004"
+#define DRV_MODULE_VERSION	"3.14"
+#define DRV_MODULE_RELDATE	"November 15, 2004"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -204,6 +204,14 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751F,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753M,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5781,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX,
@@ -865,34 +873,54 @@
 			      GRC_LCLCTRL_GPIO_OUTPUT1));
 			udelay(100);
 		} else {
+			int no_gpio2;
+			u32 grc_local_ctrl;
+
 			if (tp_peer != tp &&
 			    (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0)
 				return;
 
+			/* On 5753 and variants, GPIO2 cannot be used. */
+			no_gpio2 = (tp->nic_sram_data_cfg &
+				    NIC_SRAM_DATA_CFG_NO_GPIO2) != 0;
+
+			grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 |
+					 GRC_LCLCTRL_GPIO_OE1 |
+					 GRC_LCLCTRL_GPIO_OE2 |
+					 GRC_LCLCTRL_GPIO_OUTPUT1 |
+					 GRC_LCLCTRL_GPIO_OUTPUT2;
+			if (no_gpio2) {
+				grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 |
+						    GRC_LCLCTRL_GPIO_OUTPUT2);
+			}
 			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
-			     (GRC_LCLCTRL_GPIO_OE0 |
-			      GRC_LCLCTRL_GPIO_OE1 |
-			      GRC_LCLCTRL_GPIO_OE2 |
-			      GRC_LCLCTRL_GPIO_OUTPUT1 |
-			      GRC_LCLCTRL_GPIO_OUTPUT2));
+			       grc_local_ctrl);
 			udelay(100);
 
+			grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 |
+					 GRC_LCLCTRL_GPIO_OE1 |
+					 GRC_LCLCTRL_GPIO_OE2 |
+					 GRC_LCLCTRL_GPIO_OUTPUT0 |
+					 GRC_LCLCTRL_GPIO_OUTPUT1 |
+					 GRC_LCLCTRL_GPIO_OUTPUT2;
+			if (no_gpio2) {
+				grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 |
+						    GRC_LCLCTRL_GPIO_OUTPUT2);
+			}
 			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
-			     (GRC_LCLCTRL_GPIO_OE0 |
-			      GRC_LCLCTRL_GPIO_OE1 |
-			      GRC_LCLCTRL_GPIO_OE2 |
-			      GRC_LCLCTRL_GPIO_OUTPUT0 |
-			      GRC_LCLCTRL_GPIO_OUTPUT1 |
-			      GRC_LCLCTRL_GPIO_OUTPUT2));
+			       grc_local_ctrl);
 			udelay(100);
 
-			tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
-			     (GRC_LCLCTRL_GPIO_OE0 |
-			      GRC_LCLCTRL_GPIO_OE1 |
-			      GRC_LCLCTRL_GPIO_OE2 |
-			      GRC_LCLCTRL_GPIO_OUTPUT0 |
-			      GRC_LCLCTRL_GPIO_OUTPUT1));
-			udelay(100);
+			grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 |
+					 GRC_LCLCTRL_GPIO_OE1 |
+					 GRC_LCLCTRL_GPIO_OE2 |
+					 GRC_LCLCTRL_GPIO_OUTPUT0 |
+					 GRC_LCLCTRL_GPIO_OUTPUT1;
+			if (!no_gpio2) {
+				tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
+				       grc_local_ctrl);
+				udelay(100);
+			}
 		}
 	} else {
 		if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
@@ -7594,7 +7622,8 @@
 	      tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901_2 ||
 	      tp->pdev->device == PCI_DEVICE_ID_TIGON3_5705F)) ||
 	    (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM &&
-	     tp->pdev->device == PCI_DEVICE_ID_TIGON3_5751F))
+	     (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5751F ||
+	      tp->pdev->device == PCI_DEVICE_ID_TIGON3_5753F)))
 		tp->tg3_flags |= TG3_FLAG_10_100_ONLY;
 
 	err = tg3_phy_probe(tp);
@@ -7902,7 +7931,8 @@
 #endif
 
 	if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
-		tp->dma_rwctrl |= 0x001f0000;
+		/* DMA read watermark not used on PCIE */
+		tp->dma_rwctrl |= 0x00180000;
 	} else if (!(tp->tg3_flags & TG3_FLAG_PCIX_MODE)) {
 		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
 		    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
diff -urN linux-2.4.28-rc3/drivers/net/tg3.h linux-2.4.28-rc4/drivers/net/tg3.h
--- linux-2.4.28-rc3/drivers/net/tg3.h	2004-11-16 18:47:45.529723979 -0800
+++ linux-2.4.28-rc4/drivers/net/tg3.h	2004-11-16 18:47:49.200873417 -0800
@@ -1436,6 +1436,7 @@
 #define  NIC_SRAM_DATA_CFG_EEPROM_WP		 0x00000100
 #define  NIC_SRAM_DATA_CFG_MINI_PCI		 0x00001000
 #define  NIC_SRAM_DATA_CFG_FIBER_WOL		 0x00004000
+#define  NIC_SRAM_DATA_CFG_NO_GPIO2		 0x00100000
 
 #define NIC_SRAM_DATA_PHY_ID		0x00000b74
 #define  NIC_SRAM_DATA_PHY_ID1_MASK	 0xffff0000
diff -urN linux-2.4.28-rc3/drivers/scsi/aic7xxx/aic79xx_osm_pci.c linux-2.4.28-rc4/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
--- linux-2.4.28-rc3/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.28-rc4/drivers/scsi/aic7xxx/aic79xx_osm_pci.c	2004-11-16 18:47:49.314878057 -0800
@@ -52,9 +52,12 @@
 					const struct pci_device_id *ent);
 static int	ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd,
 						 u_long *base, u_long *base2);
+#ifdef MMAPIO
 static int	ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
 						 u_long *bus_addr,
 						 uint8_t **maddr);
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 static void	ahd_linux_pci_dev_remove(struct pci_dev *pdev);
 
@@ -271,6 +274,7 @@
 	return (0);
 }
 
+#ifdef MMAPIO
 static int
 ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
 				 u_long *bus_addr,
@@ -318,6 +322,7 @@
 		error = ENOMEM;
 	return (error);
 }
+#endif
 
 int
 ahd_pci_map_registers(struct ahd_softc *ahd)
diff -urN linux-2.4.28-rc3/fs/binfmt_elf.c linux-2.4.28-rc4/fs/binfmt_elf.c
--- linux-2.4.28-rc3/fs/binfmt_elf.c	2004-11-16 18:47:45.937740587 -0800
+++ linux-2.4.28-rc4/fs/binfmt_elf.c	2004-11-16 18:47:49.459883960 -0800
@@ -516,7 +516,8 @@
 			 */
 
 			retval = -ENOMEM;
-			if (elf_ppnt->p_filesz > PATH_MAX)
+			if (elf_ppnt->p_filesz > PATH_MAX || 
+			    elf_ppnt->p_filesz == 0)
 				goto out_free_file;
 			elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz,
 							   GFP_KERNEL);
@@ -532,7 +533,9 @@
 				goto out_free_interp;
 			}
 			/* make sure path is NULL terminated */
-			elf_interpreter[elf_ppnt->p_filesz - 1] = '\0';
+			retval = -EINVAL;
+			if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0')
+				goto out_free_interp;
 
 			/* If the program interpreter is one of these two,
 			 * then assume an iBCS2 image. Otherwise assume
diff -urN linux-2.4.28-rc3/include/linux/pci_ids.h linux-2.4.28-rc4/include/linux/pci_ids.h
--- linux-2.4.28-rc3/include/linux/pci_ids.h	2004-11-16 18:47:46.059745554 -0800
+++ linux-2.4.28-rc4/include/linux/pci_ids.h	2004-11-16 18:47:49.582888967 -0800
@@ -1713,11 +1713,15 @@
 #define PCI_DEVICE_ID_TIGON3_5704S	0x16a8
 #define PCI_DEVICE_ID_TIGON3_5702A3	0x16c6
 #define PCI_DEVICE_ID_TIGON3_5703A3	0x16c7
+#define PCI_DEVICE_ID_TIGON3_5781	0x16dd
+#define PCI_DEVICE_ID_TIGON3_5753	0x16f7
+#define PCI_DEVICE_ID_TIGON3_5753M	0x16fd
+#define PCI_DEVICE_ID_TIGON3_5753F	0x16fe
 #define PCI_DEVICE_ID_TIGON3_5901	0x170d
+#define PCI_DEVICE_ID_BCM4401B1		0x170c
 #define PCI_DEVICE_ID_TIGON3_5901_2	0x170e
 #define PCI_DEVICE_ID_BCM4401		0x4401
 #define PCI_DEVICE_ID_BCM4401B0		0x4402
-#define PCI_DEVICE_ID_BCM4401B1		0x170c
 
 #define PCI_VENDOR_ID_ENE		0x1524
 #define PCI_DEVICE_ID_ENE_1211		0x1211
diff -urN linux-2.4.28-rc3/net/core/Makefile linux-2.4.28-rc4/net/core/Makefile
--- linux-2.4.28-rc3/net/core/Makefile	2004-08-07 16:26:06.000000000 -0700
+++ linux-2.4.28-rc4/net/core/Makefile	2004-11-16 18:47:49.633891043 -0800
@@ -9,7 +9,7 @@
 
 O_TARGET := core.o
 
-export-objs := netfilter.o profile.o ethtool.o
+export-objs := netfilter.o profile.o ethtool.o neighbour.o
 
 obj-y := sock.o skbuff.o iovec.o datagram.o scm.o
 
diff -urN linux-2.4.28-rc3/net/core/neighbour.c linux-2.4.28-rc4/net/core/neighbour.c
--- linux-2.4.28-rc3/net/core/neighbour.c	2004-11-16 18:47:46.112747711 -0800
+++ linux-2.4.28-rc4/net/core/neighbour.c	2004-11-16 18:47:49.635891125 -0800
@@ -1569,6 +1569,7 @@
 	}
 	read_unlock_bh(&tbl->lock);
 }
+EXPORT_SYMBOL(neigh_for_each);
 
 /* The tbl->lock must be held as a writer and BH disabled. */
 void __neigh_for_each_release(struct neigh_table *tbl,
@@ -1596,6 +1597,7 @@
 		}
 	}
 }
+EXPORT_SYMBOL(__neigh_for_each_release);
 
 #ifdef CONFIG_PROC_FS
 
diff -urN linux-2.4.28-rc3/net/sctp/ipv6.c linux-2.4.28-rc4/net/sctp/ipv6.c
--- linux-2.4.28-rc3/net/sctp/ipv6.c	2004-08-07 16:26:07.000000000 -0700
+++ linux-2.4.28-rc4/net/sctp/ipv6.c	2004-11-16 18:47:49.699893730 -0800
@@ -78,7 +78,10 @@
 
 #include <asm/uaccess.h>
 
-extern struct notifier_block sctp_inetaddr_notifier;
+extern int sctp_inetaddr_event(struct notifier_block *, unsigned long, void *);
+static struct notifier_block sctp_inet6addr_notifier = {
+	.notifier_call = sctp_inetaddr_event,
+};
 
 /* FIXME: This macro needs to be moved to a common header file. */
 #define NIP6(addr) \
@@ -980,7 +983,7 @@
 	sctp_register_af(&sctp_ipv6_specific);
 
 	/* Register notifier for inet6 address additions/deletions. */
-	register_inet6addr_notifier(&sctp_inetaddr_notifier);
+	register_inet6addr_notifier(&sctp_inet6addr_notifier);
 
 	return 0;
 }
@@ -992,5 +995,5 @@
 	inet6_del_protocol(&sctpv6_protocol);
 	inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
 	inet6_unregister_protosw(&sctpv6_stream_protosw);
-	unregister_inet6addr_notifier(&sctp_inetaddr_notifier);
+	unregister_inet6addr_notifier(&sctp_inet6addr_notifier);
 }
diff -urN linux-2.4.28-rc3/net/sctp/protocol.c linux-2.4.28-rc4/net/sctp/protocol.c
--- linux-2.4.28-rc3/net/sctp/protocol.c	2004-11-16 18:47:46.178750398 -0800
+++ linux-2.4.28-rc4/net/sctp/protocol.c	2004-11-16 18:47:49.702893852 -0800
@@ -621,8 +621,8 @@
 /* Event handler for inet address addition/deletion events.
  * Basically, whenever there is an event, we re-build our local address list.
  */
-static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
-			       void *ptr)
+int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
+                        void *ptr)
 {
 	unsigned long flags;
 
@@ -823,7 +823,7 @@
 };
 
 /* Notifier for inetaddr addition/deletion events.  */
-struct notifier_block sctp_inetaddr_notifier = {
+static struct notifier_block sctp_inetaddr_notifier = {
 	.notifier_call = sctp_inetaddr_event,
 };
 
diff -urN linux-2.4.28-rc3/net/unix/af_unix.c linux-2.4.28-rc4/net/unix/af_unix.c
--- linux-2.4.28-rc3/net/unix/af_unix.c	2004-11-16 18:47:46.195751090 -0800
+++ linux-2.4.28-rc4/net/unix/af_unix.c	2004-11-16 18:47:49.720894585 -0800
@@ -1403,9 +1403,11 @@
 
 	msg->msg_namelen = 0;
 
+	down(&sk->protinfo.af_unix.readsem);
+
 	skb = skb_recv_datagram(sk, flags, noblock, &err);
 	if (!skb)
-		goto out;
+		goto out_unlock;
 
 	wake_up_interruptible(&sk->protinfo.af_unix.peer_wait);
 
@@ -1449,6 +1451,8 @@
 
 out_free:
 	skb_free_datagram(sk,skb);
+out_unlock:
+	up(&sk->protinfo.af_unix.readsem);
 out:
 	return err;
 }
